/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fafafa;
}

/* Header */
header {
    background: white;
    padding: 2rem 0;
    text-align: center;
    border-bottom: 1px solid #eee;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

header p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

/* Container */
.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Tabs */
.tabs {
    display: flex;
    margin-bottom: 2rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-btn {
    flex: 1;
    padding: 1rem;
    border: none;
    background: white;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: #7f8c8d;
}

.tab-btn.active {
    background: #3498db;
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #ecf0f1;
}

/* Tab content */
.tab-content {
    display: none;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
}

.waitlist-note {
    background: #e8f4fd;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    color: #2980b9;
    border-left: 4px solid #3498db;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #3498db;
}

select[multiple] {
    height: auto;
    min-height: 100px;
}

small {
    color: #7f8c8d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkbox styles */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Checkbox group */
.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin: 0.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.checkbox-group .checkbox-label {
    margin: 0;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.checkbox-group .checkbox-label:hover {
    background: #e9ecef;
}

/* Premium section */
.premium-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    margin-top: 1rem;
}

.premium-section h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.premium-info {
    color: #6c757d;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Location status */
.location-status {
    background: #e8f4fd;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #3498db;
    text-align: center;
}

.location-loading {
    color: #2980b9;
    font-weight: 500;
}

.location-detected {
    color: #27ae60;
    font-weight: 500;
}

.location-error {
    color: #e74c3c;
    font-weight: 500;
}

/* Search and filter section */
.search-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.search-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.city-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #ecf0f1;
    border-radius: 6px;
    font-size: 1rem;
}

.filter-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #555;
}

.filter-checkbox input {
    width: auto;
    margin-right: 0.5rem;
}

/* Driver listings */
.driver-listings {
    margin-bottom: 2rem;
}

.driver-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.3s ease;
    position: relative;
}

.driver-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.driver-card.premium {
    border: 2px solid #f39c12;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.premium-badge {
    position: absolute;
    top: -8px;
    right: 15px;
    background: #f39c12;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.driver-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.driver-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.driver-rate {
    color: #27ae60;
    font-weight: 600;
    font-size: 1.1rem;
}

.driver-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-item {
    font-size: 0.9rem;
    color: #666;
}

.driver-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.badge {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge.parent {
    background: #e8f4fd;
    color: #2980b9;
}

.badge.camera {
    background: #e8f5e8;
    color: #27ae60;
}

.badge.short-notice {
    background: #fef2e7;
    color: #e67e22;
}

.driver-actions {
    display: flex;
    gap: 0.5rem;
}

.no-drivers {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-style: italic;
}

.divider {
    height: 1px;
    background: #ecf0f1;
    margin: 2rem 0;
}

.form-description {
    color: #7f8c8d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* Buttons */
.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    width: auto;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    margin-top: 3rem;
}

/* Success message */
.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
    display: none;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-btn {
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.close-btn:hover {
    color: #000;
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #ecf0f1;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    width: auto;
    min-width: 120px;
}

/* Time input rows */
.time-inputs {
    margin-bottom: 1rem;
}

.time-input-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.remove-time-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
}

.remove-time-btn:hover {
    background: #c0392b;
}

/* Service area rows */
.service-areas {
    margin-bottom: 1rem;
}

.service-area-row {
    display: grid;
    grid-template-columns: 1fr 120px auto;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    align-items: center;
}

.remove-area-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    white-space: nowrap;
}

.remove-area-btn:hover {
    background: #c0392b;
}

/* Modal animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .tab-content {
        padding: 1.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .time-input-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    header {
        padding: 1rem 0;
    }
    
    header h1 {
        font-size: 1.75rem;
    }
    
    .tabs {
        flex-direction: column;
    }
    
    .tab-content {
        padding: 1rem;
    }
}