:root {
    --primary-blue: #003366;
    --secondary-blue: #00509d;
    --accent-blue: #00a8e8;
    --light-bg: #f0f5f9;
    --white: #ffffff;
    --text-dark: #003366;
    --text-light: #64748b;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.4);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

a {
    text-decoration: none;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #e9eff5;
    color: #003366;
    line-height: 1.4;
    font-size: 12.8px;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Strict 1-page fit */
}

.dashboard-header {
    background: #002b5c;
    color: var(--white);
    padding: 0.25rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 44px;
}

.header-left { display: flex; align-items: center; gap: 0.5rem; }
.logo img { height: 40px; background: white; padding: 2px; border-radius: 4px; }
.title h1 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.1;
}

.title p {
    font-size: 0.7rem;
    opacity: 0.8;
    line-height: 1.1;
}

.nav-tabs {
    display: flex;
    gap: 0.2rem;
    margin-top: 0.2rem;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.55rem;
    font-weight: 600;
    min-width: 80px;
    text-decoration: none;
}

.nav-tab i { 
    font-size: 0.9rem; 
    margin-bottom: 2px; 
}

.nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active { 
    background: #004d99; 
    color: white; 
    box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
}

.nav-tab.active i {
    color: #00a8e8;
}

.header-right { display: flex; align-items: center; gap: 1.5rem; }
.data-info { font-size: 0.65rem; display: flex; align-items: center; gap: 0.5rem; color: white; }

/* Main Content */
.main-content {
    padding: 0.25rem 0.6rem;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.section-container {
    margin-bottom: 0.15rem;
}

.section-title {
    color: #003366;
    font-size: 0.68rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    display: block;
    width: 100%;
}

.grid-macro {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 0.4rem;
}

.macro-card {
    background: linear-gradient(135deg, #ffffff 0%, #dceeff 100%);
    padding: 0.3rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,51,102,0.1);
    border: 1px solid #cce3f5;
}

.macro-card .top-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.macro-card .icon-box {
    width: 28px;
    height: 28px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
}

.macro-card .label { font-size: 0.6rem; color: #475569; font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.macro-card .year { font-size: 0.55rem; color: #94a3b8; }
.macro-card .value { font-size: 1.3rem; font-weight: 800; color: #003366; margin: 0.2rem 0; line-height: 1; }
.macro-card .comparison { display: flex; justify-content: space-between; font-size: 0.55rem; color: #64748b; border-top: 1px solid rgba(0,0,0,0.05); padding-top: 3px; }

/* Layout Rows */
.row {
    display: flex;
    gap: 0.25rem;
    flex: 1;
    overflow: hidden;
}

.card {
    background: linear-gradient(180deg, #ffffff 0%, #e8f4ff 100%);
    border-radius: 4px;
    padding: 0.35rem;
    box-shadow: 0 1px 4px rgba(0, 43, 92, 0.1);
    border: 1px solid #b3d7ff;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 0.2rem;
}

/* Tables */
table { width: 100%; border-collapse: collapse; }
.table-blue thead th { background: #003366; color: white; text-align: left; padding: 3px; font-size: 0.55rem; }
.table-blue td { padding: 1px 4px; font-size: 0.55rem; border-bottom: 1px solid #e2e8f0; }

.text-right { text-align: right; }
.status-up { color: #22c55e; }
.status-down { color: #ef4444; }

/* Profile Elements */
.stat-row { display: flex; justify-content: space-between; font-size: 0.65rem; margin-bottom: 3px; padding-bottom: 2px; border-bottom: 1px solid #f1f5f9; }
.top-sectors h5 { font-size: 0.6rem; color: #1e40af; margin-bottom: 0.3rem; text-transform: uppercase; }
.sector-row { display: flex; justify-content: space-between; font-size: 0.6rem; margin-bottom: 2px; }

/* Admin Modern Redesign */
.admin-sidebar {
    width: 180px;
    background: #002244;
    color: #f8fafc;
    padding: 1rem 0.5rem;
}

.sidebar-menu a {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
    color: #94a3b8;
    border-radius: 6px;
    margin-bottom: 0.2rem;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    background: #003366;
    color: #00a8e8;
}

.admin-header {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.admin-main {
    background: #f8fafc;
    overflow-y: auto;
}

.form-group label {
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.form-group input, .form-group select, .form-group textarea {
    font-size: 0.85rem;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.btn-feedback, .btn-more {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

/* Charts adjustment */
.apexcharts-canvas { margin: 0 auto; }
