/**
 * WHERE IS MY DOCTOR?
 * Modern Healthcare SaaS UI Theme
 */

:root {
    --primary: #0d6efd;
    --primary-dark: #0a58ca;
    --primary-light: #e7f1ff;
    --secondary: #6c757d;
    --success: #198754;
    --success-light: #d1e7dd;
    --warning: #ffc107;
    --warning-light: #fff3cd;
    --danger: #dc3545;
    --danger-light: #f8d7da;
    --dark: #212529;
    --light: #f8f9fa;
    --card-border: #e9ecef;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 8px 24px rgba(13, 110, 253, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f6f8fb;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Impersonation Banner */
.impersonation-banner {
    background: linear-gradient(90deg, #ffc107 0%, #ff9800 100%);
    color: #212529;
    padding: 10px 20px;
    font-weight: 600;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 1050;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.impersonation-banner a.btn-exit {
    background: #212529;
    color: #ffffff;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.impersonation-banner a.btn-exit:hover {
    background: #000;
}

/* Navbar */
.navbar-custom {
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    padding: 12px 0;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
    font-size: 20px;
    letter-spacing: -0.5px;
}

.navbar-brand span {
    color: #055160;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #004085 100%);
    color: #ffffff;
    padding: 70px 0 90px;
    position: relative;
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.search-box-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    color: #333;
}

/* Doctor & Place Cards */
.doctor-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    transition: all 0.25s ease-in-out;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.doctor-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-hover-shadow);
    border-color: #bcd0f7;
}

.doctor-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e7f1ff;
}

.doctor-photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #e7f1ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    border: 3px solid #e7f1ff;
}

.verified-badge {
    background-color: var(--success-light);
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.unverified-badge {
    background-color: var(--warning-light);
    color: #856404;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

/* Live Status Indicator Pill */
.live-status-pill {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #eef2f6;
    color: #495057;
}

.live-status-pill.success {
    background: #d1e7dd;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.live-status-pill.warning {
    background: #fff3cd;
    color: #664d03;
    border: 1px solid #ffecb5;
}

.live-status-pill.info {
    background: #cff4fc;
    color: #055160;
    border: 1px solid #b6effb;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #198754;
    border-radius: 50%;
    display: inline-block;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(25, 135, 84, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

/* Weekly Timetable Grid */
.timetable-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.timetable-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e2e8f0;
}

.timetable-table td {
    vertical-align: middle;
    font-size: 14px;
}

/* Map Styling */
#leaflet-map, .place-map {
    height: 380px;
    width: 100%;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    z-index: 1;
}

/* Mobile Fieldwork Camera & UI */
.camera-preview-box {
    width: 100%;
    max-height: 350px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.camera-preview-box video, .camera-preview-box canvas, .camera-preview-box img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
}

.camera-overlay-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    font-size: 11px;
    padding: 6px 10px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

/* Offline Sync Status Badge */
.sync-status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sync-status-badge.synced { background: #d1e7dd; color: #0f5132; }
.sync-status-badge.pending { background: #fff3cd; color: #664d03; }
.sync-status-badge.offline { background: #e2e3e5; color: #41464b; }

/* Disclaimer Box */
.medical-disclaimer {
    background-color: #f8f9fa;
    border-left: 4px solid #0d6efd;
    padding: 12px 16px;
    font-size: 13px;
    color: #6c757d;
    border-radius: 0 6px 6px 0;
}

/* Sidebar Dashboard Navigation */
.sidebar {
    background: #ffffff;
    min-height: calc(100vh - 60px);
    border-right: 1px solid #e9ecef;
}

.sidebar .nav-link {
    color: #495057;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.15s;
}

.sidebar .nav-link:hover, .sidebar .nav-link.active {
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar .nav-link i {
    font-size: 18px;
}

/* Stat Cards */
.stat-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #edf2f7;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
