/* ==========================================================================
   CareHub Portal — Premium UI Layer
   Overrides design-system.css + style.css with a refined, modern palette.
   Load LAST in index.html so specificity wins cleanly.
   ========================================================================== */

/* ─────────────────────────────────────────────────────────────────────────
   1. DESIGN TOKEN OVERRIDE — replace warm beige with cool neutral palette
   ───────────────────────────────────────────────────────────────────────── */
:root {
    /* Page / surface */
    --bg-page:          #F0F4F8;
    --bg-secondary:     #E8EDF3;
    --bg-card:          #FFFFFF;
    --bg-elevated:      #FFFFFF;
    --bg-hover:         #F5F8FB;
    --bg-active:        #EAF0F7;

    /* Text */
    --text-primary:     #0F172A;
    --text-secondary:   #334155;
    --text-tertiary:    #64748B;
    --text-placeholder: #94A3B8;
    --text-inverse:     #FFFFFF;

    /* Brand — professional navy-blue */
    --brand-primary:         #1D5FCF;
    --brand-primary-hover:   #1548A8;
    --brand-primary-light:   #EBF2FF;
    --brand-primary-dark:    #1548A8;
    --brand-secondary:       #0EA5E9;
    --brand-secondary-hover: #0284C7;
    --brand-secondary-light: #E0F2FE;

    /* Semantic */
    --success-dark:  #15803D;
    --success:       #22C55E;
    --success-light: #DCFCE7;

    --warning-dark:  #92400E;
    --warning:       #F59E0B;
    --warning-light: #FEF3C7;

    --danger-dark:   #991B1B;
    --danger:        #EF4444;
    --danger-light:  #FEE2E2;

    --info-dark:     #1E40AF;
    --info:          #3B82F6;
    --info-light:    #DBEAFE;

    /* Borders */
    --border-light:  #E2E8F0;
    --border-medium: #CBD5E1;
    --border-strong: #94A3B8;

    /* Shadows — crisp cool-toned */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 4px 8px rgba(15, 23, 42, .08), 0 2px 4px rgba(15, 23, 42, .04);
    --shadow-lg: 0 12px 24px rgba(15, 23, 42, .10), 0 4px 8px rgba(15, 23, 42, .06);
    --shadow-xl: 0 24px 48px rgba(15, 23, 42, .14), 0 8px 16px rgba(15, 23, 42, .08);

    /* Legacy aliases used throughout style.css */
    --warm-bg:     #F0F4F8;
    --warm-card:   #FFFFFF;
    --warm-border: #E2E8F0;
    --warm-text:   #0F172A;
    --warm-muted:  #64748B;
    --primary:     #1D5FCF;
    --primary-dark: #1548A8;
    --primary-light: #EBF2FF;
    --accent:      #0EA5E9;
    --sidebar-bg:  #0F172A;
    --sidebar-text: #E2E8F0;
    --sidebar-active: #1E293B;

    /* Brand-prefixed variants used in style.css templates */
    --brand-danger:  #EF4444;
    --brand-warning: #F59E0B;
    --brand-success: #22C55E;
    --brand-info:    #3B82F6;
}

/* ─────────────────────────────────────────────────────────────────────────
   2. BODY & PAGE CHROME
   ───────────────────────────────────────────────────────────────────────── */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
}

/* ─────────────────────────────────────────────────────────────────────────
   3. SIDEBAR — deeper navy, sharper active state
   ───────────────────────────────────────────────────────────────────────── */
.sidebar {
    background: #0F172A;
    box-shadow: 2px 0 12px rgba(0,0,0,.22);
}

.sidebar-branding {
    border-bottom-color: rgba(255,255,255,.07);
    padding: 20px 18px 18px;
}

.sidebar-logo {
    background: #1D5FCF;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    font-size: 18px;
}

.sidebar-company {
    font-size: 14.5px;
    font-weight: 700;
    color: #F8FAFC;
    letter-spacing: -0.025em;
}

.sidebar-product {
    font-size: 10px;
    color: #64748B;
    letter-spacing: .06em;
}

.sidebar-nav { padding: 6px 0; }

.nav-item {
    padding: 9px 18px;
    font-size: 13px;
    color: #94A3B8;
    border-left: 3px solid transparent;
    border-radius: 0;
    gap: 10px;
    transition: background .14s, color .14s, border-color .14s;
}

.nav-item i {
    font-size: 17px;
    opacity: .65;
    flex-shrink: 0;
    transition: opacity .14s;
}

.nav-item:hover {
    background: rgba(255,255,255,.055);
    color: #E2E8F0;
}

.nav-item:hover i { opacity: .9; }

.nav-item.active {
    background: rgba(29,95,207,.18);
    color: #93C5FD;
    border-left-color: #1D5FCF;
    font-weight: 600;
}

.nav-item.active i { opacity: 1; color: #60A5FA; }

.sidebar-footer {
    border-top-color: rgba(255,255,255,.06);
    padding: 12px 14px;
}

.user-avatar {
    background: #1D5FCF;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    font-size: 15px;
}

.user-name { font-size: 12.5px; font-weight: 600; color: #F1F5F9; }
.user-role  { font-size: 10.5px; color: #64748B; }

.logout-btn {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.07);
    color: #94A3B8;
    font-size: 12.5px;
    border-radius: 7px;
    padding: 7px 10px;
    gap: 6px;
}

.logout-btn:hover {
    background: rgba(239,68,68,.14);
    color: #FCA5A5;
    border-color: rgba(239,68,68,.22);
}

/* ─────────────────────────────────────────────────────────────────────────
   4. MAIN CONTENT
   ───────────────────────────────────────────────────────────────────────── */
.main-content {
    padding: 24px 28px;
    background: var(--bg-page);
}

/* ─────────────────────────────────────────────────────────────────────────
   5. DASHBOARD TOPBAR / COMMAND CENTER HEADER
   ───────────────────────────────────────────────────────────────────────── */
.cc-header {
    background: linear-gradient(120deg, #0F172A 0%, #1E3A5F 55%, #1D4ED8 100%);
    border-radius: 14px;
    padding: 22px 28px;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 4px 20px rgba(15,23,42,.18);
    position: relative;
    overflow: hidden;
}

/* subtle shimmer overlay */
.cc-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 80% -20%, rgba(96,165,250,.18) 0%, transparent 55%),
                radial-gradient(ellipse at -10% 110%, rgba(14,165,233,.14) 0%, transparent 50%);
    pointer-events: none;
}

.cc-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.cc-date {
    font-size: 13px;
    color: rgba(255,255,255,.6);
    font-weight: 400;
    margin-top: 3px;
}

.cc-action-btn {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.18);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    gap: 6px;
    backdrop-filter: blur(8px);
    transition: background .16s, transform .1s;
}

.cc-action-btn:hover {
    background: rgba(255,255,255,.18);
    transform: translateY(-1px);
}

.cc-action-primary {
    background: #FFFFFF !important;
    color: #1D5FCF !important;
    border-color: rgba(255,255,255,.9) !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,.14);
}

.cc-action-primary:hover {
    background: #F0F6FF !important;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}

/* ─────────────────────────────────────────────────────────────────────────
   6. KPI CARDS
   ───────────────────────────────────────────────────────────────────────── */
.cc-kpi-grid {
    gap: 14px;
    margin-bottom: 20px;
}

.cc-kpi {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-top: 3px solid transparent;
    border-radius: 12px;
    padding: 16px 16px 14px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s, box-shadow .18s;
    position: relative;
    overflow: hidden;
}

.cc-kpi::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent);
}

.cc-kpi:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(15,23,42,.11);
    border-color: #CBD5E1;
}

/* colour accents */
.cc-kpi-orange { border-top-color: #F97316; }
.cc-kpi-yellow { border-top-color: #EAB308; }
.cc-kpi-purple { border-top-color: #8B5CF6; }
.cc-kpi-blue   { border-top-color: #1D5FCF; }
.cc-kpi-green  { border-top-color: #16A34A; }

.cc-kpi-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* icon colour per variant */
.cc-kpi-orange .cc-kpi-icon { background: #FFF7ED; color: #EA580C; }
.cc-kpi-yellow .cc-kpi-icon { background: #FEFCE8; color: #CA8A04; }
.cc-kpi-purple .cc-kpi-icon { background: #FAF5FF; color: #7C3AED; }
.cc-kpi-blue   .cc-kpi-icon { background: #EFF6FF; color: #1D5FCF; }
.cc-kpi-green  .cc-kpi-icon { background: #F0FDF4; color: #15803D; }

.cc-kpi-value {
    font-size: 1.65rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.04em;
    line-height: 1;
}

.cc-kpi-label {
    font-size: 11px;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 4px;
}

/* pulse animation in cool blue instead of orange */
.cc-kpi-pulse, .kpi-pulse {
    animation: premiumPulse 2.2s ease-in-out infinite;
}

@keyframes premiumPulse {
    0%, 100% { box-shadow: var(--shadow-sm); }
    50%       { box-shadow: 0 0 0 6px rgba(249,115,22,.12), var(--shadow-md); }
}

/* ─────────────────────────────────────────────────────────────────────────
   7. SECTION CARDS (cc-card)
   ───────────────────────────────────────────────────────────────────────── */
.cc-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.cc-card-header {
    padding: 14px 20px;
    background: #FAFBFC;
    border-bottom: 1px solid #EEF0F4;
}

.cc-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.01em;
    gap: 8px;
}

.cc-icon { font-size: 15px; color: #1D5FCF; }

.cc-badge {
    background: #1D5FCF;
    font-size: 10.5px;
    padding: 2px 9px;
    border-radius: 999px;
}

.cc-badge-alert { background: #DC2626; }

.cc-btn-text {
    font-size: 12px;
    font-weight: 600;
    color: #1D5FCF;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .14s;
}

.cc-btn-text:hover {
    background: #EFF6FF;
    text-decoration: none;
}

.cc-card-body { padding: 0; }

/* ─────────────────────────────────────────────────────────────────────────
   8. TODAY'S SCHEDULE LIST
   ───────────────────────────────────────────────────────────────────────── */
.cc-schedule-item {
    padding: 12px 20px;
    border-bottom: 1px solid #F1F5F9;
    gap: 14px;
    transition: background .14s;
}

.cc-schedule-item:hover { background: #F8FAFC; }
.cc-schedule-item:last-child { border-bottom: none; }

.cc-time-start {
    font-weight: 700;
    font-size: 13px;
    color: #0F172A;
}

.cc-time-end {
    font-size: 11.5px;
    color: #94A3B8;
}

.cc-schedule-client {
    font-weight: 600;
    font-size: 13.5px;
    color: #0F172A;
}

.cc-schedule-caregiver {
    font-size: 12px;
    color: #64748B;
    margin-top: 1px;
}

.cc-caregiver-name { color: #1D5FCF; font-weight: 500; }
.cc-unassigned { color: #DC2626; font-weight: 600; }

.cc-schedule-current {
    background: #EFF6FF;
    border-left: 3px solid #1D5FCF;
}

.cc-schedule-overdue {
    background: #FFFBEB;
    border-left: 3px solid #F59E0B;
}

.cc-schedule-completed {
    background: #F8FAFC;
    color: #94A3B8;
}

/* Status pills */
.cc-status {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .03em;
}

.cc-status-success   { background: #DCFCE7; color: #15803D; }
.cc-status-active    { background: #EFF6FF; color: #1D5FCF; }
.cc-status-warning   { background: #FEF3C7; color: #92400E; }
.cc-status-scheduled { background: #EDE9FE; color: #6D28D9; }
.cc-status-confirmed { background: #DBEAFE; color: #1E40AF; }

/* ─────────────────────────────────────────────────────────────────────────
   9. ACTIVITY FEED
   ───────────────────────────────────────────────────────────────────────── */
.cc-activity-item {
    padding: 11px 16px;
    border-bottom: 1px solid #F1F5F9;
    gap: 12px;
}

.cc-activity-item:last-child { border-bottom: none; }

.cc-activity-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 14px;
}

.cc-activity-success { background: #DCFCE7; color: #15803D; }
.cc-activity-danger  { background: #FEE2E2; color: #DC2626; }
.cc-activity-primary { background: #DBEAFE; color: #1D5FCF; }
.cc-activity-warning { background: #FEF3C7; color: #92400E; }

.cc-activity-title { font-size: 13px; font-weight: 600; color: #0F172A; }
.cc-activity-desc  { font-size: 11.5px; color: #64748B; }
.cc-activity-time  { font-size: 10.5px; color: #94A3B8; margin-top: 3px; }

/* ─────────────────────────────────────────────────────────────────────────
   10. ALERTS PANEL
   ───────────────────────────────────────────────────────────────────────── */
.cc-alert {
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border-left: 3px solid;
    border-top: none;
}

.cc-alert-urgent  { background: #FFF1F1; border-left-color: #DC2626; }
.cc-alert-warning { background: #FFFBEB; border-left-color: #F59E0B; }
.cc-alert-info    { background: #EFF6FF; border-left-color: #1D5FCF; }

.cc-alert-title   { font-size: 13px; font-weight: 700; color: #0F172A; }
.cc-alert-message { font-size: 12px; color: #64748B; }

.cc-alert-action {
    margin-top: 8px;
    padding: 5px 12px;
    background: #1D5FCF;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .01em;
    transition: background .15s;
}

.cc-alert-action:hover { background: #1548A8; }

/* ─────────────────────────────────────────────────────────────────────────
   11. MINI CALENDAR
   ───────────────────────────────────────────────────────────────────────── */
.cc-calendar-body {
    padding: 12px 14px 14px;
}

.cc-calendar-header {
    font-size: 13px;
    font-weight: 700;
    color: #0F172A;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.cc-cal-nav {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 14px;
    color: #64748B;
    padding: 0;
    transition: background .14s, color .14s;
}

.cc-cal-nav:hover {
    background: #EFF6FF;
    color: #1D5FCF;
}

.cc-calendar-days { gap: 2px; margin-bottom: 4px; }

.cc-day-header {
    font-size: 10px;
    font-weight: 700;
    color: #94A3B8;
    letter-spacing: .06em;
}

.cc-calendar-grid { gap: 2px; }

.cc-calendar-day {
    aspect-ratio: 1;
    font-size: 12px;
    font-weight: 500;
    border-radius: 7px;
    background: transparent;
    color: #334155;
    transition: background .13s, color .13s;
    position: relative;
}

.cc-calendar-day:hover {
    background: #EFF6FF;
    color: #1D5FCF;
}

/* today */
.cc-day-today {
    background: #1D5FCF !important;
    color: #FFFFFF !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(29,95,207,.35);
    border-radius: 7px;
}

.cc-day-today:hover { background: #1548A8 !important; }

/* days with events */
.cc-day-visit {
    background: #DBEAFE;
    color: #1E40AF;
    font-weight: 600;
}

.cc-day-warning {
    background: #FEF3C7;
    color: #92400E;
    font-weight: 600;
}

/* selected day (when navigated to from schedule) */
.cc-day-selected {
    background: #EEF4FF;
    color: #1D5FCF;
    font-weight: 700;
    border: 1.5px solid #93C5FD;
}

/* event dots */
.cc-day-dot {
    position: absolute;
    bottom: 3px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #1D5FCF;
}

.cc-dot-warning { background: #F59E0B; }
.cc-dot-blue    { background: #1D5FCF; }

/* calendar legend */
.cc-calendar-legend {
    border-top: 1px solid #F1F5F9;
    margin-top: 10px;
    padding-top: 8px;
    font-size: 10.5px;
    color: #94A3B8;
    gap: 10px;
}

.cc-legend-dot { width: 7px; height: 7px; }

/* Full schedule calendar */
.calendar-day.today {
    border: 2px solid #1D5FCF;
    background: #EFF6FF;
}

.calendar-day.today .calendar-date { color: #1D5FCF; font-weight: 700; }

.calendar-visit.scheduled  { border-left-color: #1D5FCF; background: #EFF6FF; }
.calendar-visit.in_progress{ border-left-color: #F59E0B; background: #FFFBEB; }
.calendar-visit.completed  { border-left-color: #16A34A; background: #F0FDF4; }

/* ─────────────────────────────────────────────────────────────────────────
   12. ONBOARDING SNAPSHOT
   ───────────────────────────────────────────────────────────────────────── */
.cc-onboarding-item {
    padding: 10px 16px;
    border-bottom: 1px solid #F1F5F9;
    gap: 12px;
    transition: background .13s;
}

.cc-onboarding-item:hover { background: #F8FAFC; }
.cc-onboarding-item:last-child { border-bottom: none; }

.cc-onboarding-avatar {
    width: 34px; height: 34px;
    border-radius: 8px;
    background: #EFF6FF;
    color: #1D5FCF;
    font-size: 13px;
    font-weight: 700;
}

.cc-onboarding-name { font-size: 13px; font-weight: 600; color: #0F172A; }
.cc-onboarding-meta { font-size: 11.5px; color: #64748B; }
.cc-onboarding-arrow { color: #CBD5E1; }

/* ─────────────────────────────────────────────────────────────────────────
   13. GENERAL CARDS (non-cc)
   ───────────────────────────────────────────────────────────────────────── */
.card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.card-header {
    background: #FAFBFC;
    border-bottom: 1px solid #EEF0F4;
    padding: 14px 20px;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.01em;
}

.card-body { padding: 20px; }

.stat-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform .18s, box-shadow .18s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-content h3 {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #0F172A;
}

.stat-content p {
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ─────────────────────────────────────────────────────────────────────────
   14. BUTTONS
   ───────────────────────────────────────────────────────────────────────── */
.btn {
    font-family: inherit;
    font-weight: 600;
    letter-spacing: .01em;
    border-radius: 8px;
    transition: background .16s, box-shadow .16s, transform .1s;
    gap: 7px;
}

.btn-primary {
    background: #1D5FCF;
    color: #FFFFFF;
    box-shadow: 0 2px 6px rgba(29,95,207,.28);
}

.btn-primary:hover {
    background: #1548A8;
    box-shadow: 0 4px 12px rgba(29,95,207,.36);
    transform: translateY(-1px);
}

.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-secondary {
    background: #F1F5F9;
    color: #334155;
    border: 1px solid #E2E8F0;
}

.btn-secondary:hover {
    background: #E2E8F0;
    color: #0F172A;
}

.btn-success {
    background: #16A34A;
    box-shadow: 0 2px 6px rgba(22,163,74,.28);
}

.btn-success:hover {
    background: #15803D;
    box-shadow: 0 4px 12px rgba(22,163,74,.36);
}

.btn-danger {
    background: #DC2626;
    box-shadow: 0 2px 6px rgba(220,38,38,.28);
}

.btn-danger:hover {
    background: #B91C1C;
    box-shadow: 0 4px 12px rgba(220,38,38,.36);
}

.btn:focus-visible {
    outline: 2.5px solid #60A5FA;
    outline-offset: 2px;
}

.btn:disabled {
    background: #F1F5F9 !important;
    color: #94A3B8 !important;
    border-color: #E2E8F0 !important;
    box-shadow: none !important;
    transform: none !important;
    cursor: not-allowed;
}

/* ─────────────────────────────────────────────────────────────────────────
   15. FILTER TABS
   ───────────────────────────────────────────────────────────────────────── */
.filter-tabs { gap: 6px; }

.filter-tab {
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    border-color: #E2E8F0;
    background: #FFFFFF;
    color: #475569;
    transition: all .15s;
}

.filter-tab:hover { background: #F8FAFC; color: #1D5FCF; border-color: #93C5FD; }

.filter-tab.active {
    background: #1D5FCF;
    color: #FFFFFF;
    border-color: #1D5FCF;
    box-shadow: 0 2px 6px rgba(29,95,207,.28);
}

/* ─────────────────────────────────────────────────────────────────────────
   16. STATUS BADGES
   ───────────────────────────────────────────────────────────────────────── */
.status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    letter-spacing: .03em;
}

.status-pending    { background: #FEF3C7; color: #92400E; }
.status-approved   { background: #DCFCE7; color: #15803D; }
.status-active     { background: #DCFCE7; color: #15803D; }
.status-denied     { background: #FEE2E2; color: #991B1B; }
.status-cancelled  { background: #FEE2E2; color: #991B1B; }
.status-onboarding { background: #DBEAFE; color: #1E40AF; }
.status-scheduled  { background: #EDE9FE; color: #6D28D9; }
.status-in-progress{ background: #FEF3C7; color: #92400E; }
.status-completed  { background: #DCFCE7; color: #15803D; }
.status-no-show    { background: #F3F4F6; color: #4B5563; }
.status-inactive   { background: #F3F4F6; color: #4B5563; }
.status-new        { background: #EDE9FE; color: #6D28D9; }

/* ─────────────────────────────────────────────────────────────────────────
   17. TABLES
   ───────────────────────────────────────────────────────────────────────── */
.data-table th {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    color: #64748B;
    border-bottom: 1.5px solid #E2E8F0;
    padding: 11px 16px;
    background: #FAFBFC;
}

.data-table td {
    font-size: 13.5px;
    border-bottom: 1px solid #F1F5F9;
    padding: 11px 16px;
    color: #0F172A;
}

.data-table tr:hover td { background: #F8FAFC; }

/* ─────────────────────────────────────────────────────────────────────────
   18. FORMS
   ───────────────────────────────────────────────────────────────────────── */
.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #334155;
    letter-spacing: .01em;
}

.form-input,
.form-select,
.form-textarea {
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: 13.5px;
    color: #0F172A;
    background: #FFFFFF;
    padding: 9px 12px;
    transition: border-color .16s, box-shadow .16s;
    -webkit-appearance: none;
    appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: #94A3B8; }

.form-input:hover,
.form-select:hover,
.form-textarea:hover { border-color: #CBD5E1; }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #1D5FCF;
    box-shadow: 0 0 0 3px rgba(29,95,207,.12);
    outline: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   19. MODALS
   ───────────────────────────────────────────────────────────────────────── */
.modal-overlay {
    background: rgba(10,18,35,.55);
    backdrop-filter: blur(5px);
}

.modal {
    background: #FFFFFF;
    border-radius: 16px;
    border: 1px solid #E2E8F0;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid #F1F5F9;
    background: #FAFBFC;
    border-radius: 16px 16px 0 0;
}

.modal-title {
    font-size: 16px;
    font-weight: 700;
    color: #0F172A;
    letter-spacing: -0.02em;
}

.modal-close {
    width: 30px; height: 30px;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #94A3B8;
    transition: background .14s, color .14s;
}

.modal-close:hover { background: #F1F5F9; color: #0F172A; }

.modal-body { padding: 20px 24px; }

.modal-footer {
    padding: 14px 24px;
    border-top: 1px solid #F1F5F9;
    background: #FAFBFC;
    border-radius: 0 0 16px 16px;
    gap: 10px;
}

/* confirm-modal system */
.confirm-modal {
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 0;
    overflow: hidden;
    border: 1px solid #E2E8F0;
}

.confirm-modal-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid #F1F5F9;
}

.confirm-modal-title {
    font-size: 15px;
    font-weight: 700;
    color: #0F172A;
}

.confirm-modal-body { padding: 14px 20px 6px; }

.confirm-modal-message {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.6;
}

.confirm-modal-footer {
    padding: 14px 20px;
    border-top: 1px solid #F1F5F9;
    background: #FAFBFC;
    gap: 10px;
}

.confirm-modal-footer .btn {
    padding: 9px 18px;
    font-size: 13px;
}

.confirm-modal-prompt .form-input {
    border: 1.5px solid #E2E8F0;
    border-radius: 8px;
    font-size: 13.5px;
    padding: 9px 12px;
    margin-top: 10px;
}

.confirm-modal-prompt .form-input:focus {
    border-color: #1D5FCF;
    box-shadow: 0 0 0 3px rgba(29,95,207,.12);
}

/* ─────────────────────────────────────────────────────────────────────────
   20. TOAST SYSTEM
   ───────────────────────────────────────────────────────────────────────── */
.toast {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15,23,42,.12);
    padding: 14px 16px;
}

.toast-message {
    font-size: 13.5px;
    font-weight: 500;
    color: #0F172A;
}

.toast-success { border-left: 4px solid #16A34A; }
.toast-error   { border-left: 4px solid #DC2626; }
.toast-warning { border-left: 4px solid #F59E0B; }
.toast-info    { border-left: 4px solid #1D5FCF; }

/* ─────────────────────────────────────────────────────────────────────────
   21. PAGE HEADER
   ───────────────────────────────────────────────────────────────────────── */
.page-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0F172A;
    letter-spacing: -0.03em;
}

.page-header p {
    font-size: 13.5px;
    color: #64748B;
    margin-top: 2px;
}

/* ─────────────────────────────────────────────────────────────────────────
   22. SPINNER / LOADING
   ───────────────────────────────────────────────────────────────────────── */
.spinner {
    border-color: #E2E8F0;
    border-top-color: #1D5FCF;
    width: 36px;
    height: 36px;
    border-width: 3px;
}

/* ─────────────────────────────────────────────────────────────────────────
   23. DETAIL VIEW
   ───────────────────────────────────────────────────────────────────────── */
.detail-item {
    background: #F8FAFC;
    border: 1px solid #F1F5F9;
    border-radius: 10px;
}

.detail-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94A3B8;
}

.detail-value {
    font-size: 13.5px;
    font-weight: 600;
    color: #0F172A;
    margin-top: 3px;
}

/* ─────────────────────────────────────────────────────────────────────────
   24. EMPTY STATES
   ───────────────────────────────────────────────────────────────────────── */
.cc-empty-icon { color: #CBD5E1; font-size: 2rem; }
.cc-empty-title { font-size: 13.5px; font-weight: 700; color: #334155; }
.cc-empty-text  { font-size: 12.5px; color: #94A3B8; }

/* ─────────────────────────────────────────────────────────────────────────
   25. SKELETON
   ───────────────────────────────────────────────────────────────────────── */
.cc-skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E8EDF3 50%, #F1F5F9 75%);
    background-size: 200% 100%;
    animation: ccSkeleton 1.4s infinite;
}

/* ─────────────────────────────────────────────────────────────────────────
   26. SCROLLBARS — unified
   ───────────────────────────────────────────────────────────────────────── */
.cc-schedule-list::-webkit-scrollbar,
.cc-activity-list::-webkit-scrollbar,
.cc-alerts-list::-webkit-scrollbar,
.cc-onboarding-list::-webkit-scrollbar,
.activity-feed::-webkit-scrollbar,
.modal::-webkit-scrollbar {
    width: 5px;
}

.cc-schedule-list::-webkit-scrollbar-track,
.cc-activity-list::-webkit-scrollbar-track,
.cc-alerts-list::-webkit-scrollbar-track,
.cc-onboarding-list::-webkit-scrollbar-track,
.activity-feed::-webkit-scrollbar-track,
.modal::-webkit-scrollbar-track {
    background: transparent;
}

.cc-schedule-list::-webkit-scrollbar-thumb,
.cc-activity-list::-webkit-scrollbar-thumb,
.cc-alerts-list::-webkit-scrollbar-thumb,
.cc-onboarding-list::-webkit-scrollbar-thumb,
.activity-feed::-webkit-scrollbar-thumb,
.modal::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 999px;
}

/* ─────────────────────────────────────────────────────────────────────────
   27. QUICK ACTIONS (dashboard widget)
   ───────────────────────────────────────────────────────────────────────── */
.quick-action-btn {
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 10px;
    transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}

.quick-action-btn:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
    box-shadow: 0 2px 8px rgba(29,95,207,.12);
    transform: translateY(-1px);
}

.quick-action-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
}

.quick-action-btn:hover .quick-action-label { color: #1D5FCF; }

/* ─────────────────────────────────────────────────────────────────────────
   28. SCHEDULE-PAGE CONTROLS (view toggle, filters)
   ───────────────────────────────────────────────────────────────────────── */
.schedule-controls,
.schedule-view-controls {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: var(--shadow-xs);
    gap: 10px;
}

/* ─────────────────────────────────────────────────────────────────────────
   29. MOBILE TOGGLE
   ───────────────────────────────────────────────────────────────────────── */
.mobile-menu-toggle {
    background: #0F172A;
    color: #E2E8F0;
    border-radius: 9px;
    width: 38px;
    height: 38px;
    box-shadow: 0 2px 8px rgba(0,0,0,.24);
}

.mobile-menu-toggle:hover { background: #1E293B; }

/* ─────────────────────────────────────────────────────────────────────────
   30. SIDEBAR OVERLAY
   ───────────────────────────────────────────────────────────────────────── */
.sidebar-overlay {
    background: rgba(10,18,35,.5);
    backdrop-filter: blur(2px);
}
