/* iOS Style CSS for CRM System */
:root {
    --ios-blue: #007aff;
    --ios-light-blue: #5ac8fa;
    --ios-green: #34c759;
    --ios-red: #ff3b30;
    --ios-orange: #ff9500;
    --ios-yellow: #ffcc00;
    --ios-purple: #af52de;
    --ios-pink: #ff2d55;
    --ios-gray: #8e8e93;
    --ios-light-gray: #e5e5ea;
    --ios-extra-light-gray: #f2f2f7;
    --ios-white: #ffffff;
    --ios-black: #000000;
    --ios-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --ios-radius: 10px;
    --ios-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --ios-transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: var(--ios-font);
    background-color: var(--ios-extra-light-gray);
    color: var(--ios-black);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* Container */
.container {
    max-width: 600px;
    margin: 30px auto;
    padding: 30px;
    background-color: var(--ios-white);
    border-radius: var(--ios-radius);
    box-shadow: var(--ios-shadow);
}

/* Headings */
h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--ios-blue);
    font-weight: 600;
    font-size: 24px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--ios-light-blue);
    background: linear-gradient(90deg, rgba(0,122,255,0.1) 0%, rgba(90,200,250,0.1) 100%);
    padding: 15px;
    border-radius: var(--ios-radius);
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
    padding: 15px;
    background-color: var(--ios-white);
    border-radius: var(--ios-radius);
    box-shadow: var(--ios-shadow);
    border-left: 4px solid var(--ios-blue);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--ios-gray);
    font-size: 14px;
}

/* Input Fields */
input[type="text"],
input[type="password"],
input[type="email"],
select {
    background-color: var(--ios-extra-light-gray);
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    border: 1px solid var(--ios-light-gray);
    border-radius: var(--ios-radius);
    background-color: var(--ios-white);
    transition: var(--ios-transition);
    -webkit-appearance: none;
    appearance: none;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
select:focus {
    border-color: var(--ios-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.2);
}

/* Select Styling */
select {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path fill="%238e8e93" d="M0 0h12L6 6z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px 6px;
    padding-right: 40px;
}

/* Buttons */
button {
    display: block;
    width: 100%;
    padding: 14px;
    background-color: var(--ios-blue);
    color: var(--ios-white);
    border: none;
    border-radius: var(--ios-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--ios-transition);
    -webkit-appearance: none;
    appearance: none;
}

button:hover {
    background-color: #0062cc; /* Darker blue */
}

button:active {
    transform: scale(0.98);
}

/* Links */
a {
    color: var(--ios-blue);
    text-decoration: none;
    transition: var(--ios-transition);
}

a:hover {
    text-decoration: none;
    opacity: 0.8;
}

/* Messages */
.success-message {
    padding: 15px;
    margin-bottom: 20px;
    background-color: rgba(52, 199, 89, 0.1); /* iOS green with opacity */
    color: var(--ios-green);
    border-radius: var(--ios-radius);
    border-left: 4px solid var(--ios-green);
    font-size: 14px;
}

.error-message {
    padding: 15px;
    margin-bottom: 20px;
    background-color: rgba(255, 59, 48, 0.1); /* iOS red with opacity */
    color: var(--ios-red);
    border-radius: var(--ios-radius);
    border-left: 4px solid var(--ios-red);
    font-size: 14px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    border-radius: var(--ios-radius);
    overflow: hidden;
    box-shadow: var(--ios-shadow);
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--ios-light-gray);
}

th {
    background-color: var(--ios-extra-light-gray);
    font-weight: 600;
    color: var(--ios-gray);
}

tr:last-child td {
    border-bottom: none;
}

/* Search Container */
.search-container {
    margin-bottom: 20px;
}

.search-container input[type="text"] {
    padding-left: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%238e8e93" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>');
    background-repeat: no-repeat;
    background-position: 15px center;
    background-size: 16px 16px;
}

/* iOS-style toggle switch */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 30px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ios-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--ios-light-gray);
    transition: var(--ios-transition);
    border-radius: 30px;
}

.ios-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 2px;
    bottom: 2px;
    background-color: var(--ios-white);
    transition: var(--ios-transition);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

input:checked + .ios-slider {
    background-color: var(--ios-green);
}

input:checked + .ios-slider:before {
    transform: translateX(20px);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .container {
        margin: 10px;
        padding: 15px;
        width: auto;
        max-width: none;
    }
    
    input[type="text"],
    input[type="password"],
    input[type="email"],
    select,
    button {
        padding: 12px;
    }
}