/* Modern App Style - Option B */
:root {
    --primary: #4a6cf7;
    --primary-dark: #3a5ce5;
    --secondary: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --radius: 15px;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-sm: 0 5px 15px rgba(0,0,0,0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding-bottom: 50px;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.card.rounded-lg {
    border-radius: var(--radius);
}

.card-header {
    border-radius: var(--radius) var(--radius) 0 0 !important;
    border: none;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #6a11cb);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), #5a0cb5);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(74, 108, 247, 0.3);
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
    transition: border 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
}

.form-select {
    border-radius: 10px;
    border: 2px solid #e0e0e0;
    padding: 12px 15px;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .navbar-brand {
        font-size: 1.75rem;
    }
    
    .small-md-normal {
        font-size: 1rem !important;
    }
}

/* Client photos */
.client-photo {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
}

/* Alerts */
.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

/* Badges */
.badge {
    border-radius: 10px;
    padding: 6px 12px;
    font-weight: 500;
}

/* Table */
.table {
    border-radius: var(--radius);
    overflow: hidden;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--dark);
}

.table tbody tr:hover {
    background-color: rgba(74, 108, 247, 0.05);
}

/* Dashboard stats */
.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-card .number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-card .label {
    color: var(--secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Admin Pages - Back Button */
.back-to-drivers-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.2);
    transition: all 0.3s;
    width: fit-content;
    font-size: 0.9rem;
}

.back-to-drivers-btn:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    transform: translateX(-3px);
}

.back-to-drivers-btn i {
    font-size: 1rem;
}

/* Admin Pages - Client Cards */
.client-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.client-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.card-img-wrapper {
    overflow: hidden;
    height: 200px;
    background: #f8f9fa;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.client-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.card-info {
    font-size: 0.9rem;
}

.info-item {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.info-label {
    font-weight: 600;
    color: var(--dark);
    min-width: 70px;
}

.info-value {
    color: var(--secondary);
}

/* Table improvements */
.table code {
    background: rgba(74, 108, 247, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Badge improvements */
.badge {
    font-size: 0.85rem;
    padding: 5px 10px;
}

/* Alert improvements */
.alert i {
    margin-right: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card {
        margin-bottom: 15px;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-header {
        padding: 0.75rem 1rem !important;
    }
    
    .card-header h5 {
        font-size: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 8px 16px;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    .form-select {
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem;
    }
    
    .card-img-wrapper {
        height: 180px;
    }
    
    .info-label {
        min-width: 60px;
        font-size: 0.85rem;
    }
    
    .info-value {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .card-img-wrapper {
        height: 160px;
    }
    
    .card-title {
        font-size: 1rem;
    }
    
    .card-text {
        font-size: 0.85rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .d-flex.gap-2 {
        flex-direction: column;
    }
    
    .d-flex.gap-2 .btn {
        margin-bottom: 0;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Map preview */
.map-preview {
    width: 100%;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 20px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Photo upload */
.photo-upload {
    border: 2px dashed #dee2e6;
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.3s;
    background: #f8f9fa;
}

.photo-upload:hover {
    border-color: var(--primary);
}

.photo-upload i {
    font-size: 48px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.photo-upload input {
    display: none;
}