:root {
    --bg-main: #fcfbf7;
    --primary: #1e4620;
    --primary-light: #2d6630;
    --accent: #d97706;
    --accent-light: #fef3c7;
    --dark: #111827;
    --text-muted: #4b5563;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --success: #16a34a;
    --danger: #dc2626;
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Merriweather', serif;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--dark);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
}

p {
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    color: #2d3748;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Fixed Progress & Nav Bar */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(252, 251, 247, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    height: 64px;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo span {
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.nav-menu {
    display: flex;
    gap: 24px;
    list-style: none;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    position: relative;
    padding: 4px 0;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Hero Slide */
.hero-slide {
    padding: 140px 0 80px 0;
    background: linear-gradient(180deg, #f3f4ee 0%, var(--bg-main) 100%);
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.hero-tag {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 2rem;
    border-left: 3px solid var(--accent);
    padding-left: 16px;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    height: 420px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.05);
}

/* Sections general style */
.section-slide {
    padding: 80px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-title-block {
    margin-bottom: 48px;
    max-width: 700px;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* KPI Cards Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-light);
    opacity: 0;
    transition: opacity 0.3s;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px rgba(30, 70, 32, 0.05);
    border-color: #cbd5e1;
}

.kpi-card:hover::before {
    opacity: 1;
}

.kpi-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 12px;
}

.kpi-value {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.1;
    margin-bottom: 8px;
}

.kpi-unit {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.kpi-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}

.badge-up {
    background-color: #f0fdf4;
    color: var(--success);
}

.badge-down {
    background-color: #fef2f2;
    color: var(--danger);
}

/* Grid Content Layouts */
.content-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Interactive Dynamic Graph Section */
.chart-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.chart-legend {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Customized HTML/CSS Interactive Bar Graph simulating the image precisely */
.custom-bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    height: 300px;
    position: relative;
    padding-top: 40px;
    border-bottom: 2px solid #cbd5e1;
    margin-top: 20px;
}

.chart-y-axis {
    position: absolute;
    left: 0;
    top: 40px;
    bottom: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.y-line {
    width: 100%;
    border-top: 1px dashed #e2e8f0;
    position: relative;
}

.y-label {
    position: absolute;
    left: -35px;
    top: -10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    z-index: 2;
    height: 100%;
    justify-content: flex-end;
}

.bar-container {
    width: 45%;
    position: relative;
    background: #f1f5f9;
    border-radius: 6px 6px 0 0;
    overflow: visible;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    cursor: pointer;
    min-height: 5px;
}

.bar-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 6px 6px 0 0;
    transition: height 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67);
    position: relative;
}

.bar-group:hover .bar-fill {
    background: linear-gradient(180deg, var(--accent) 0%, #b45309 100%);
}

.bar-tooltip {
    position: absolute;
    top: -40px;
    background: var(--dark);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: var(--font-display);
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.2s ease;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

.bar-group:hover .bar-tooltip {
    opacity: 1;
    transform: translateY(0);
}

.bar-x-label {
    margin-top: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    white-space: nowrap;
}

.bar-group.highlight .bar-fill {
    background: linear-gradient(180deg, var(--accent) 0%, #b45309 100%);
}

/* Map and Geo Section */
.map-interactive-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    align-items: center;
}

.map-visual-panel {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fcfdfa;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #f1f5f9;
}

.map-svg-mock {
    max-width: 100%;
    height: auto;
    max-height: 480px;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.03));
}

.region-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg);
    transition: all 0.3s ease;
}

.accordion-header {
    padding: 18px 24px;
    background: var(--card-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    user-select: none;
}

.accordion-header:hover {
    background: #f9faf6;
}

.accordion-item.active {
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(30, 70, 32, 0.04);
}

.accordion-item.active .accordion-header {
    background: #f4f6f0;
}

.accordion-content {
    padding: 0 24px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: #fff;
}

.accordion-item.active .accordion-content {
    padding: 20px 24px;
    max-height: 250px;
    border-top: 1px solid var(--border-color);
}

.region-stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.region-stat-label {
    color: var(--text-muted);
}

.region-stat-value {
    font-weight: 600;
    color: var(--dark);
}

/* Market Interactive Matrix */
.market-tabs-container {
    margin-bottom: 32px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.market-tab-btn {
    background: #f1f5f9;
    border: none;
    padding: 10px 20px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s;
}

.market-tab-btn:hover {
    background: #e2e8f0;
    color: var(--dark);
}

.market-tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(30, 70, 32, 0.2);
}

.market-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.market-feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.01);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.market-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px rgba(0,0,0,0.04);
}

.market-card-top {
    margin-bottom: 20px;
}

.market-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.type-badge {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 6px;
}

.badge-danger-light { background: #fef2f2; color: var(--danger); }
.badge-success-light { background: #f0fdf4; color: var(--success); }

.share-badge {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 4px;
}

.market-name {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.market-desc-text {
    font-size: 0.95rem;
    color: #475569;
    margin-bottom: 16px;
    font-family: var(--font-serif);
    font-size: 0.95rem;
    line-height: 1.6;
}

.market-micro-stats {
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.micro-stat-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

/* Sortable/Searchable Master Datatable */
.datatable-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.01);
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.search-input-box {
    position: relative;
    flex: 1;
    max-width: 360px;
}

.search-input-box input {
    width: 100%;
    padding: 10px 16px 10px 36px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-input-box input:focus {
    border-color: var(--primary-light);
}

.search-input-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 16px;
    height: 16px;
}

.table-responsive-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.master-data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.master-data-table th {
    background: #f8fafc;
    padding: 14px 16px;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--border-color);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.master-data-table th:hover {
    background: #f1f5f9;
}

.master-data-table th .sort-icon {
    display: inline-block;
    margin-left: 4px;
    color: #94a3b8;
    font-size: 0.75rem;
}

.master-data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    color: #334155;
}

.master-data-table tr:last-child td {
    border-bottom: none;
}

.master-data-table tr:hover td {
    background-color: #f8faf6;
}

.text-right {
    text-align: right;
}

.tr-total {
    background: #f1f5f9 !important;
    font-weight: 700;
}

.tr-total td {
    color: var(--primary) !important;
}

/* Forecast & Recommendation Cards */
.forecast-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.insight-card {
    background: linear-gradient(135deg, var(--primary) 0%, #143216 100%);
    color: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 12px 30px rgba(30, 70, 32, 0.15);
}

.insight-card h3 {
    font-size: 1.6rem;
    margin-bottom: 16px;
    color: #fff;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 12px;
}

.insight-card p {
    color: #e2e8f0;
    font-size: 1.05rem;
    margin-bottom: 24px;
}

.strategy-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.strategy-item {
    display: flex;
    gap: 16px;
    background: rgba(255,255,255,0.06);
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: transform 0.3s;
}

.strategy-item:hover {
    transform: translateX(6px);
    background: rgba(255,255,255,0.1);
}

.strategy-icon {
    background: var(--accent);
    color: #fff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.strategy-text h4 {
    font-size: 1.05rem;
    color: #fff;
    margin-bottom: 4px;
}

.strategy-text p {
    font-size: 0.9rem;
    color: #cbd5e1;
    margin-bottom: 0;
}

/* Image grid wrapper */
.gallery-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.gallery-card {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.02);
    border: 1px solid var(--border-color);
    background: #fff;
}

.gallery-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.gallery-caption {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    background: #fff;
    border-top: 1px solid var(--border-color);
}

/* Footer */
footer {
    background: #111827;
    color: #9ca3af;
    padding: 40px 0;
    font-size: 0.9rem;
    border-top: 4px solid var(--primary);
}

.footer-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-credits strong {
    color: #fff;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease forwards;
}

/* Responsive Layouts */
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .market-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-grid, .content-split, .map-interactive-container, .forecast-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .section-title {
        font-size: 2rem;
    }
    .nav-menu {
        display: none; /* simple hidden for mobile illustration */
    }
    .market-cards-grid {
        grid-template-columns: 1fr;
    }
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}
body {
    padding-top: 55px !important;
}
.top-navbar {
    top: 55px !important; /* Thêm dòng này để đảm bảo class .top-navbar cũng bị đẩy xuống */
}
