@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap');

:root {
    --cyan: #06b6d4;
    --emerald: #10b981;
    --slate-900: #0f172a;
    --slate-950: #020617;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: #94a3b8;
}

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #164e63; border-radius: 10px; }

/* =============================================
   NAV LINKS
   ============================================= */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--cyan);
    background: rgba(6, 182, 212, 0.05);
}

.nav-link.active {
    color: white;
    background: linear-gradient(90deg, rgba(6, 182, 212, 0.2), transparent);
    border-left: 3px solid var(--cyan);
}

/* =============================================
   MOBILE HAMBURGER MENU
   ============================================= */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background: rgba(6, 182, 212, 0.2);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

.hamburger-btn svg {
    width: 22px;
    height: 22px;
    color: var(--cyan);
    transition: transform 0.3s ease;
}

/* Mobile Overlay Sidebar */
.mobile-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.8);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-sidebar-overlay.open {
    opacity: 1;
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background: #020617;
    border-right: 1px solid rgba(6, 182, 212, 0.2);
    z-index: 101;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.mobile-sidebar.open {
    transform: translateX(0);
}

.mobile-sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s ease;
}

.mobile-sidebar-close:hover {
    color: white;
    background: rgba(6,182,212,0.1);
}

@media (max-width: 1023px) {
    .hamburger-btn {
        display: flex;
    }
}

/* =============================================
   LANGUAGE TOGGLE
   ============================================= */
.lang-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(6,182,212,0.2);
    border-radius: 999px;
    padding: 3px;
    flex-shrink: 0;
}

.lang-btn {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #475569;
    border: none;
    background: transparent;
}

.lang-btn.active {
    background: var(--cyan);
    color: #020617;
    box-shadow: 0 0 10px rgba(6,182,212,0.5);
}

.lang-btn:not(.active):hover {
    color: var(--cyan);
}

/* =============================================
   PRINT / EXPORT PDF
   ============================================= */
.print-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(6,182,212,0.1);
    border: 1px solid rgba(6,182,212,0.3);
    color: var(--cyan);
    white-space: nowrap;
    flex-shrink: 0;
}

.print-btn:hover {
    background: rgba(6,182,212,0.2);
    box-shadow: 0 0 20px rgba(6,182,212,0.3);
}

/* =============================================
   EXPORT BUTTONS
   ============================================= */
.export-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
}

.export-btn.excel {
    background: rgba(16,185,129,0.1);
    border-color: rgba(16,185,129,0.3);
    color: #10b981;
}

.export-btn.csv {
    background: rgba(6,182,212,0.1);
    border-color: rgba(6,182,212,0.3);
    color: var(--cyan);
}

.export-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* =============================================
   LAZY LOADING IMAGES
   ============================================= */
.facility-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    filter: saturate(0.8) contrast(1.1);
    transition: filter 0.5s ease, opacity 0.5s ease;
    opacity: 0;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.facility-img.loaded {
    opacity: 1;
}

.facility-img.error {
    opacity: 0.5;
    filter: grayscale(1);
}

.img-skeleton {
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.img-skeleton::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(6,182,212,0.06), transparent);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.facility-card:hover .facility-img.loaded {
    filter: saturate(1.2) contrast(1);
}

/* =============================================
   GLASS PANEL & CARDS
   ============================================= */
.glass-panel {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(6, 182, 212, 0.1);
    border-radius: 2rem;
    backdrop-filter: blur(10px);
}

.stat-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(2, 6, 23, 1));
    border: 1px solid rgba(6, 182, 212, 0.1);
    padding: 2rem;
    border-radius: 1.5rem;
    transition: all 0.4s ease;
}

.stat-card:hover {
    border-color: var(--cyan);
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.1);
    transform: translateY(-5px);
}

.stat-card .label {
    font-size: 0.65rem;
    color: #475569;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-card .value {
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
    margin-top: 0.5rem;
    font-family: 'JetBrains Mono', monospace;
}

.stat-card .unit {
    font-size: 0.875rem;
    color: #475569;
}

.facility-card {
    border-radius: 2rem;
    overflow: hidden;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.5s ease;
}

.facility-card:hover {
    transform: scale(1.02);
}

.pccc-card {
    background: rgba(220, 38, 38, 0.03);
    border: 1px solid rgba(220, 38, 38, 0.1);
    padding: 2rem;
    border-radius: 2rem;
    transition: all 0.3s ease;
}

.pccc-card:hover {
    background: rgba(220, 38, 38, 0.06);
    border-color: #dc2626;
}

.font-mono { font-family: 'JetBrains Mono', monospace; }

input[type="range"] {
    -webkit-appearance: none;
    height: 6px;
    background: #1e293b;
    border-radius: 5px;
}

table tr:hover { background: rgba(6, 182, 212, 0.03); }

@keyframes pulse-cyan {
    0% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(6, 182, 212, 0); }
    100% { box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

/* =============================================
   PRINT STYLESHEET
   ============================================= */
@media print {
    @page {
        size: A4;
        margin: 1.5cm;
    }

    /* Reset for print */
    * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; }

    body {
        background: #ffffff !important;
        color: #1e293b !important;
        font-size: 11pt;
        line-height: 1.5;
    }

    /* Hide non-essential elements */
    aside,
    .hamburger-btn,
    .mobile-sidebar,
    .mobile-sidebar-overlay,
    .print-btn,
    .lang-toggle,
    .export-btn,
    input[type="range"],
    footer { display: none !important; }

    /* Layout adjustments */
    .flex.h-screen { display: block !important; height: auto !important; }
    main { overflow: visible !important; width: 100% !important; }
    header { position: static !important; background: transparent !important; border: none !important; }
    .sticky { position: static !important; }

    /* Sections page breaks */
    section { page-break-inside: avoid; page-break-before: auto; margin-bottom: 2rem !important; }
    section:not(:first-child) { page-break-before: always; }

    /* Typography */
    h1 { font-size: 20pt !important; color: #0f172a !important; }
    h2 { font-size: 16pt !important; color: #0f172a !important; border-bottom: 2px solid #06b6d4; padding-bottom: 8px; }
    h3, h4 { font-size: 12pt !important; color: #1e293b !important; }
    p, span, div { color: #334155 !important; }

    /* Cards & panels */
    .glass-panel {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        backdrop-filter: none !important;
    }

    .stat-card {
        background: #f1f5f9 !important;
        border: 1px solid #e2e8f0 !important;
        break-inside: avoid;
    }

    .stat-card .value { color: #06b6d4 !important; }
    .stat-card .label { color: #64748b !important; }

    .pccc-card {
        background: #fff5f5 !important;
        border: 1px solid #fecaca !important;
    }

    /* Images */
    .facility-img { height: 180px !important; opacity: 1 !important; }
    .img-skeleton::before { display: none !important; }

    /* Tables */
    table { font-size: 9pt !important; }
    thead { background: #e0f2fe !important; }
    th { color: #0369a1 !important; }
    td { color: #1e293b !important; border-bottom: 1px solid #e2e8f0 !important; }

    /* Grid - single column on print */
    .grid { display: grid !important; }
    .md\:grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .lg\:grid-cols-3, .xl\:grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }

    /* Charts - keep visible */
    canvas { max-width: 100% !important; }

    /* Print header watermark */
    header::after {
        content: 'BẢN KẾ HOẠCH | ĐỀ XUẤT CHIẾN LƯỢC 2026 | BẢN MẬT';
        display: block;
        font-size: 8pt;
        color: #94a3b8;
        text-align: right;
        border-top: 1px solid #e2e8f0;
        padding-top: 4px;
        margin-top: 8px;
    }
}
