@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- GLOBAL VARIABLES --- */
:root {
    --color-hmb: #B22222;
    --color-hmb-light: #fff1f2;
    --color-text: #1e293b;
    --color-bg: #f8fafc;
    --font-ui: 'Inter', sans-serif;
    --font-content: 'Cambria', 'Georgia', serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body { 
    font-family: var(--font-ui); 
    background-color: var(--color-bg); 
    color: var(--color-text); 
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- TYPOGRAPHY UTILS --- */
.font-content {
    font-family: var(--font-content);
}

/* --- NAVIGATION (SHARED) --- */
.glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.3s ease;
}

.nav-item { 
    transition: all 0.3s ease; 
    position: relative;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: #475569;
    font-weight: 600;
    font-size: 0.875rem; /* 14px */
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

.nav-item:hover { 
    color: var(--color-hmb); 
    background-color: rgba(178, 34, 34, 0.05);
}

.nav-active {
    color: var(--color-hmb) !important;
    background-color: var(--color-hmb-light);
    font-weight: 800 !important;
}

/* --- COMPONENTS --- */

/* Badge số thứ tự (Dùng chung) */
.section-number {
    font-size: 0.85rem;
    font-weight: 800;
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-right: 12px;
    flex-shrink: 0;
    background-color: var(--color-hmb);
    box-shadow: 0 4px 6px -1px rgba(178, 34, 34, 0.3);
}

/* Card Hover Effect */
.card-hover { 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    transform: translateY(0);
    background: white;
    border: 1px solid #e2e8f0;
}
.card-hover:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); 
    border-color: #cbd5e1;
}

/* Chart Container */
.chart-container { 
    position: relative; 
    width: 100%; 
    max-width: 500px; 
    margin: 0 auto; 
    height: 350px; 
    max-height: 400px; 
}

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* --- PAGE SPECIFIC: ANALYSIS.HTML --- */

/* Table Styles cho trang Analysis */
.informatics-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    margin-bottom: 1.5rem;
}
.informatics-table th {
    background: #f1f5f9;
    color: #475569;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    padding: 1rem;
    border-bottom: 2px solid #cbd5e1;
    text-align: left;
}
.informatics-table td {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
    font-family: var(--font-content);
    font-size: 1rem;
}
.informatics-table tr:hover td {
    background-color: #f8fafc;
}

/* Diagram Container */
.diagram-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    justify-content: center;
    overflow-x: auto;
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
}

/* Animations */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up { animation: fade-in-up 0.5s ease-out forwards; }
/* --- TAB STYLES (Thêm vào cuối file) --- */
.tab-btn {
    border-bottom: 3px solid transparent;
}

/* Trạng thái Active (Đang chọn) */
.tab-active {
    background-color: #ffffff;
    color: var(--color-hmb); /* Chữ màu đỏ HMB */
    border-bottom-color: var(--color-hmb); /* Gạch chân màu đỏ */
    box-shadow: inset 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

/* Trạng thái Inactive (Chưa chọn) */
.tab-inactive {
    background-color: #f8fafc; /* Nền xám nhạt */
    color: #94a3b8; /* Chữ xám */
}

.tab-inactive:hover {
    background-color: #f1f5f9;
    color: #475569;
    cursor: pointer;
}