/* ================================================
   DASHBOARD v2 - Modern Healthcare SaaS Design
   Premium redesign for NDBlazor Home Page
   ================================================ */

:root {
    --dash-bg: #f8fafc;
    --dash-surface: #ffffff;
    --dash-surface-alt: #f1f5f9;
    --dash-border: #e2e8f0;
    --dash-text: #0f172a;
    --dash-text-muted: #64748b;
    --dash-primary: #0284c7;
    --dash-primary-dark: #0369a1;
    --dash-success: #10b981;
    --dash-warning: #f59e0b;
    --dash-danger: #ef4444;
    --dash-purple: #8b5cf6;
    --dash-radius-lg: 18px;
    --dash-radius-md: 12px;
    --dash-radius-sm: 8px;
}

[data-theme="dark"],
.dark-theme {
    --dash-bg: #0b1120;
    --dash-surface: #111827;
    --dash-surface-alt: #1f2937;
    --dash-border: #1f2937;
    --dash-text: #f9fafb;
    --dash-text-muted: #9ca3af;
    --dash-primary: #38bdf8;
    --dash-primary-dark: #0284c7;
}

/* ===== REALTIME PULSE ANIMATION ===== */
@keyframes dashPulse {
    0% { box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.45); transform: translateY(-2px); }
    50% { box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2); }
    100% { box-shadow: none; transform: translateY(0); }
}
.realtime-pulse {
    animation: dashPulse 2.8s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-color: #38bdf8 !important;
}

/* ===== DASHBOARD WRAPPER ===== */
.dashboard-wrapper {
    padding: 24px 28px 48px;
    max-width: 1680px;
    margin: 0 auto;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    box-sizing: border-box;
    color: var(--dash-text);
}

/* ===== HERO SECTION - NEW ===== */
.hero-section {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 45%, #0e7490 100%);
    border-radius: 24px;
    padding: 36px 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 16px 48px rgba(2, 132, 199, 0.28);
}

/* Animated background blobs */
.hero-section::before,
.hero-section::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(60px);
    opacity: 0.4;
    animation: float 12s ease-in-out infinite;
}

.hero-section::before {
    top: -120px;
    right: -100px;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(255,255,255,0.5) 0%, transparent 70%);
}

.hero-section::after {
    bottom: -150px;
    left: 30%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.5) 0%, transparent 70%);
    animation-delay: -6s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.hero-greeting {
    flex: 1;
    min-width: 280px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.hero-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #e0f2fe 100%);
    color: var(--dash-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 800;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.hero-greeting-text {
    flex: 1;
}

.greeting-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.18);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    margin-bottom: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.8);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.85); }
}

.greeting-title {
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px 0;
    letter-spacing: -0.6px;
    line-height: 1.15;
}

.greeting-subtitle {
    font-size: 14px;
    color: rgba(255,255,255,0.88);
    margin: 0;
    max-width: 480px;
    line-height: 1.5;
}

/* Search bar in hero */
.hero-search {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 14px;
    padding: 12px 16px;
    max-width: 480px;
    transition: all 0.2s ease;
}

.hero-search:focus-within {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.hero-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 14px;
    font-family: inherit;
}

.hero-search input::placeholder {
    color: rgba(255,255,255,0.7);
}

.hero-search-icon {
    color: rgba(255,255,255,0.85);
    flex-shrink: 0;
}

.hero-search-kbd {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
}

/* Hero right side - Date / Weather card */
.hero-compact-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 18px;
    padding: 16px 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: all 0.25s ease;
    min-width: 300px;
}

.hero-compact-card:hover {
    background: rgba(255,255,255,0.22);
    transform: translateY(-2px);
}

.compact-weather {
    display: flex;
    align-items: center;
    gap: 12px;
}

.weather-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.compact-weather-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.compact-temp {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    letter-spacing: -0.5px;
}

.weather-location {
    font-size: 11px;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
}

.compact-divider {
    width: 1px;
    height: 44px;
    background: rgba(255,255,255,0.25);
}

.compact-date {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-main {
    font-size: 44px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -1.5px;
}

.compact-date-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.day-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.compact-time {
    font-size: 13px;
    color: rgba(255,255,255,0.85);
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

/* Quick Stats Pills */
.hero-quick-stats {
    display: flex;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.quick-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    border-radius: 26px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.22);
    transition: all 0.25s ease;
}

.quick-stat-pill:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-2px);
}

.quick-stat-pill .pill-value {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.pill-blue { background: rgba(59, 130, 246, 0.4); border-color: rgba(59, 130, 246, 0.5); }
.pill-emerald { background: rgba(16, 185, 129, 0.4); border-color: rgba(16, 185, 129, 0.5); }
.pill-amber { background: rgba(245, 158, 11, 0.4); border-color: rgba(245, 158, 11, 0.5); }
.pill-purple { background: rgba(139, 92, 246, 0.4); border-color: rgba(139, 92, 246, 0.5); }

.skeleton-pill {
    background: rgba(255,255,255,0.1) !important;
    color: transparent !important;
    position: relative;
    overflow: hidden;
}

.skeleton-pill::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 24px;
    align-items: flex-start;
}

@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.grid-left, .grid-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

/* ===== STATS CARDS ===== */
.stats-modern-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 1280px) {
    .stats-modern-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .stats-modern-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card-modern {
    background: #fff;
    border-radius: var(--dash-radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.04), 0 1px 2px rgba(15,23,42,0.06);
    border: 1px solid var(--dash-border);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15,23,42,0.08), 0 2px 8px rgba(15,23,42,0.04);
    border-color: #cbd5e1;
}

.stat-card-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.sc-blue::before { background: linear-gradient(180deg, #3b82f6, #60a5fa); }
.sc-emerald::before { background: linear-gradient(180deg, #10b981, #34d399); }
.sc-cyan::before { background: linear-gradient(180deg, #06b6d4, #22d3ee); }
.sc-amber::before { background: linear-gradient(180deg, #f59e0b, #fbbf24); }

.sc-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.sc-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-bg-blue { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #2563eb; }
.icon-bg-emerald { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #059669; }
.icon-bg-cyan { background: linear-gradient(135deg, #cffafe, #a5f3fc); color: #0891b2; }
.icon-bg-amber { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #d97706; }
.icon-bg-rose { background: linear-gradient(135deg, #ffe4e6, #fecdd3); color: #e11d48; }
.icon-bg-indigo { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); color: #4f46e5; }
.icon-bg-purple { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); color: #7c3aed; }

.sc-trend {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trend-up {
    background: #ecfdf5;
    color: #059669;
}

.trend-down {
    background: #fef2f2;
    color: #dc2626;
}

.trend-neutral {
    background: #f0f9ff;
    color: #0284c7;
}

.sc-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sc-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dash-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sc-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--dash-text);
    line-height: 1;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.sc-progress {
    height: 6px;
    background: var(--dash-surface-alt);
    border-radius: 3px;
    overflow: hidden;
}

.sc-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    border-radius: 3px;
    transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-emerald { background: linear-gradient(90deg, #10b981, #34d399); }
.progress-cyan { background: linear-gradient(90deg, #06b6d4, #22d3ee); }
.progress-amber { background: linear-gradient(90deg, #f59e0b, #fbbf24); }

.sc-meta {
    font-size: 11.5px;
    color: var(--dash-text-muted);
    font-weight: 500;
}

/* Skeleton states */
.skeleton-card {
    background: #fff;
    border-radius: var(--dash-radius-lg);
    padding: 20px;
    border: 1px solid var(--dash-border);
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: 156px;
}

.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmerBg 1.5s infinite;
    border-radius: 6px;
}

@keyframes shimmerBg {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skel-line { height: 12px; width: 60%; }
.skel-line-short { height: 12px; width: 40%; }
.skel-bar { height: 6px; width: 100%; border-radius: 3px; }
.skel-block { height: 44px; width: 44px; border-radius: 12px; }
.skel-value { height: 32px; width: 50%; border-radius: 8px; }

/* ===== SECTION CARDS ===== */
.section-card {
    background: #fff;
    border-radius: var(--dash-radius-lg);
    border: 1px solid var(--dash-border);
    box-shadow: 0 1px 3px rgba(15,23,42,0.04);
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-primary { background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); color: #0284c7; }
.icon-emerald { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); color: #059669; }
.icon-purple { background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%); color: #7c3aed; }
.icon-amber { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #d97706; }
.icon-rose { background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%); color: #e11d48; }
.icon-indigo { background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%); color: #4f46e5; }

.section-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--dash-text);
    margin: 0;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.section-subtitle {
    font-size: 12px;
    color: var(--dash-text-muted);
    margin: 3px 0 0 0;
    font-weight: 500;
    line-height: 1.4;
}

/* Tab switcher */
.tab-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--dash-surface-alt);
    padding: 4px;
    border-radius: 12px;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dash-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.tab-btn:hover { color: var(--dash-text); }

.tab-btn.active {
    background: #fff;
    color: var(--dash-text);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-green { background: #22c55e; box-shadow: 0 0 6px rgba(34, 197, 94, 0.5); }
.dot-blue { background: #3b82f6; box-shadow: 0 0 6px rgba(59, 130, 246, 0.5); }

.tab-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--dash-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-left: 4px;
}

.tab-link:hover {
    background: #fff;
    color: var(--dash-primary);
}

/* ===== TIMELINE - LỊCH XE ===== */
.schedule-content {
    padding: 20px 24px;
    max-height: 460px;
    overflow-y: auto;
}

.timeline-list {
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: grid;
    grid-template-columns: 56px 28px 1fr;
    gap: 12px;
    position: relative;
    min-height: 90px;
}

.timeline-item:last-child .timeline-line {
    display: none;
}

.timeline-time {
    text-align: right;
    padding-top: 12px;
}

.time-text {
    font-size: 13px;
    font-weight: 700;
    color: var(--dash-text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.time-period {
    font-size: 10px;
    color: var(--dash-text-muted);
    margin-top: 2px;
    font-weight: 600;
}

.timeline-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.timeline-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #94a3b8;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #e2e8f0;
    flex-shrink: 0;
    margin-top: 16px;
    z-index: 1;
    position: relative;
}

.dot-completed {
    background: #10b981;
    box-shadow: 0 0 0 2px #d1fae5, 0 0 8px rgba(16, 185, 129, 0.4);
}

.dot-pending {
    background: #f59e0b;
    box-shadow: 0 0 0 2px #fef3c7, 0 0 8px rgba(245, 158, 11, 0.4);
    animation: pulse 2s infinite;
}

.dot-future {
    background: #cbd5e1;
    box-shadow: 0 0 0 2px #f1f5f9;
}

.timeline-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(180deg, #e2e8f0 0%, transparent 100%);
    margin: 4px 0;
}

.timeline-card {
    background: #f8fafc;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 8px 0 8px 0;
    border: 1px solid var(--dash-border);
    transition: all 0.2s ease;
    cursor: pointer;
}

.timeline-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(15,23,42,0.06);
    transform: translateX(2px);
}

.timeline-card.card-completed {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border-color: #bbf7d0;
}

.timeline-card.card-pending {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
}

.timeline-card.card-future {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-color: var(--dash-border);
}

.tc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 6px;
}

.tc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
}

.car-badge {
    background: #dbeafe;
    color: #1d4ed8;
}

.tc-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-done { background: #dcfce7; color: #15803d; }
.status-pending { background: #fef3c7; color: #b45309; }
.status-planned { background: #f1f5f9; color: #64748b; }

.tc-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--dash-text);
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tc-title-icon {
    color: var(--dash-primary);
    flex-shrink: 0;
}

.tc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.meta-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(255,255,255,0.8);
    border: 1px solid #e2e8f0;
    color: #475569;
    font-weight: 500;
}

.tag-company { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.tag-driver { background: #faf5ff; border-color: #e9d5ff; color: #7c3aed; }
.tag-note { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.tag-hospital { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 56px 24px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: #94a3b8;
}

.empty-state h3 {
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 13px;
    color: var(--dash-text-muted);
    margin: 0;
}

.empty-state a {
    color: var(--dash-primary);
    font-weight: 600;
    text-decoration: none;
}

.empty-state a:hover {
    text-decoration: underline;
}

/* ===== ACTIONS GRID ===== */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px 24px;
}

@media (max-width: 480px) {
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 12px;
    border-radius: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
    text-align: center;
    border: 1.5px solid transparent;
}

.action-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 0;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(15,23,42,0.08);
}

.action-card:hover::before {
    opacity: 1;
}

.action-card:hover .ac-arrow {
    opacity: 1;
    transform: translateX(0);
}

.action-blue { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.action-blue::before { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.action-cyan { background: #ecfeff; border-color: #a5f3fc; color: #164e63; }
.action-cyan::before { background: linear-gradient(135deg, #cffafe, #a5f3fc); }
.action-purple { background: #faf5ff; border-color: #e9d5ff; color: #4c1d95; }
.action-purple::before { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); }
.action-emerald { background: #ecfdf5; border-color: #a7f3d0; color: #14532d; }
.action-emerald::before { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.action-rose { background: #fff1f2; border-color: #fecdd3; color: #881337; }
.action-rose::before { background: linear-gradient(135deg, #ffe4e6, #fecdd3); }
.action-indigo { background: #eef2ff; border-color: #c7d2fe; color: #1e1b4b; }
.action-indigo::before { background: linear-gradient(135deg, #e0e7ff, #c7d2fe); }

.ac-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    transition: transform 0.25s ease;
}

.action-card:hover .ac-icon {
    transform: scale(1.08) rotate(-3deg);
}

.ac-label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    position: relative;
    z-index: 1;
}

.ac-sub {
    font-size: 11px;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

.ac-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateX(8px) translateY(-50%);
    opacity: 0;
    transition: all 0.2s ease;
    color: inherit;
    z-index: 1;
}

/* ===== CHARTS / DATA VISUAL ===== */
.chart-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

@media (max-width: 980px) {
    .chart-row { grid-template-columns: 1fr; }
}

.mini-chart {
    padding: 20px 24px;
}

.chart-bars {
    display: flex;
    align-items: stretch !important;
    justify-content: space-between;
    gap: 12px;
    height: 160px;
    margin-top: 24px;
    padding: 0 4px;
    position: relative;
}

.chart-bar-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-width: 0;
    position: relative;
}

.chart-bar-track {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    position: relative;
    padding-bottom: 2px;
}

.chart-bar {
    width: 100%;
    max-width: 32px;
    background: linear-gradient(180deg, #38bdf8 0%, #0284c7 100%);
    border-radius: 6px 6px 0 0;
    min-height: 8px;
    position: relative;
    transition: height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
    cursor: pointer;
}

.chart-bar:hover {
    background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.chart-bar-value {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    font-weight: 700;
    color: var(--dash-text, #1e293b);
    background: #ffffff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--dash-border, #cbd5e1);
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
    z-index: 10;
}

.chart-bar:hover .chart-bar-value {
    color: #b45309;
    border-color: #fcd34d;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .chart-bar-value,
.dark-theme .chart-bar-value {
    background: rgba(15, 23, 42, 0.95);
    color: #f8fafc;
    border-color: rgba(255, 255, 255, 0.2);
}

.chart-bar-label {
    height: 22px;
    line-height: 22px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    text-align: center;
    margin-top: 6px;
}

.chart-bar-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--dash-text-muted);
}

.chart-legend {
    display: flex;
    gap: 16px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--dash-text-muted);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

/* Donut chart */
.donut-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
}

.donut-svg {
    width: 140px;
    height: 140px;
}

.donut-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.donut-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}

.donut-stat-label {
    flex: 1;
    color: var(--dash-text-secondary);
    font-weight: 500;
}

.donut-stat-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* ===== ACTIVITY FEED ===== */
.activity-feed {
    padding: 12px 24px 20px;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.activity-item:hover {
    background: var(--dash-surface-alt);
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 13px;
    color: var(--dash-text);
    margin: 0 0 4px 0;
    line-height: 1.45;
}

.activity-text strong {
    font-weight: 700;
    color: var(--dash-text);
}

.activity-time {
    font-size: 11.5px;
    color: var(--dash-text-muted);
    font-weight: 500;
}

/* ===== RECENT PATIENTS ===== */
.recent-list {
    padding: 8px 16px 20px;
    max-height: 380px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.recent-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.recent-item:hover {
    background: #f0f9ff;
    border-color: #bae6fd;
    transform: translateX(2px);
}

.recent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0284c7 0%, #06b6d4 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.recent-info {
    flex: 1;
    min-width: 0;
}

.recent-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--dash-text);
    margin: 0 0 2px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-meta {
    font-size: 11.5px;
    color: var(--dash-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-badge {
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ===== SYSTEM STATUS ===== */
.status-list {
    padding: 16px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid var(--dash-border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.status-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(15,23,42,0.04);
}

.si-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.si-green { background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%); color: #15803d; }
.si-amber { background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); color: #b45309; }
.si-blue { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); color: #1d4ed8; }
.si-emerald { background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); color: #059669; }
.si-rose { background: linear-gradient(135deg, #ffe4e6 0%, #fecdd3 100%); color: #be123c; }

.si-label {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.si-meta {
    font-size: 11px;
    color: var(--dash-text-muted);
    font-weight: 500;
    margin-top: 1px;
}

.si-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
}

.status-ok { background: #dcfce7; color: #15803d; }
.status-warning { background: #fef3c7; color: #b45309; }
.status-error { background: #fee2e2; color: #b91c1c; }

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px 12px;
}

.status-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--dash-text);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-dot-main {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--dash-primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.view-all-link:hover {
    color: var(--dash-primary-dark);
    transform: translateX(2px);
}

/* ===== WEATHER WIDGET ===== */
.weather-card {
    padding: 20px 24px;
}

.weather-current {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.weather-big-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    flex-shrink: 0;
}

.weather-current-info {
    flex: 1;
}

.weather-temp-big {
    font-size: 32px;
    font-weight: 800;
    color: var(--dash-text);
    line-height: 1;
    letter-spacing: -1px;
}

.weather-condition {
    font-size: 13px;
    color: var(--dash-text-muted);
    margin-top: 2px;
    font-weight: 500;
}

.weather-loc {
    font-size: 12px;
    color: var(--dash-primary);
    font-weight: 700;
    margin-top: 2px;
}

.weather-tips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tip-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    text-align: center;
}

.tip-icon {
    font-size: 22px;
    line-height: 1;
}

.tip-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--dash-text);
}

.tip-label {
    font-size: 10.5px;
    color: var(--dash-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dashboard-wrapper {
        padding: 16px;
    }

    .hero-section {
        padding: 24px 20px;
        border-radius: 20px;
    }

    .hero-content {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-greeting {
        flex-direction: column;
        text-align: center;
    }

    .greeting-title {
        font-size: 24px;
    }

    .hero-compact-card {
        width: 100%;
        justify-content: center;
        min-width: 0;
    }

    .hero-search {
        max-width: 100%;
    }

    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .weather-tips {
        grid-template-columns: 1fr;
    }

    .section-header {
        padding: 16px;
    }

    .schedule-content {
        padding: 16px;
    }

    .stats-modern-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== COUNT-UP ANIMATION ===== */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: countUp 0.5s ease-out;
}