/* ========================================================
   DIAPREDICT ML - PHONG CÁCH Y TẾ HIỆN ĐẠI (BLUE & WHITE)
   ======================================================== */

:root {
    --primary: #1d4ed8;         /* Xanh dương y tế chuẩn */
    --primary-hover: #1e40af;
    --primary-light: #eff6ff;
    --primary-glow: rgba(29, 78, 216, 0.15);
    
    --teal: #0d9488;
    --teal-light: #f0fdfa;
    
    --success: #15803d;        /* Xanh lá bình thường */
    --success-light: #f0fdf4;
    --success-border: #bbf7d0;
    
    --warning: #b45309;        /* Vàng cảnh báo */
    --warning-light: #fffbeb;
    --warning-border: #fde68a;
    
    --danger: #b91c1c;         /* Đỏ nguy cơ cao */
    --danger-light: #fef2f2;
    --danger-border: #fecaca;
    
    --text-main: #0f172a;      /* Slate 900 */
    --text-muted: #64748b;     /* Slate 500 */
    --text-light: #94a3b8;
    
    --bg-body: #f8fafc;        /* Nền xám xanh nhẹ */
    --bg-card: #ffffff;
    --border-color: #e2e8f0;   /* Slate 200 */
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 14px 25px -4px rgba(29, 78, 216, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* RESET & TYPOGRAPHY */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* ========================================================
   THANH ĐIỀU HƯỚNG (NAVBAR)
   ======================================================== */
.navbar-header {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #1d4ed8, #0284c7);
    color: #ffffff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.25);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.brand-badge {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.brand-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: #475569;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background-color: var(--primary-light);
}

/* ========================================================
   CẢNH BÁO Y TẾ BANNER
   ======================================================== */
.medical-disclaimer-banner {
    background-color: #fefce8;
    border-bottom: 1px solid #fef08a;
    color: #713f12;
    font-size: 0.85rem;
    padding: 8px 0;
}

.disclaimer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

.disclaimer-icon {
    font-size: 1rem;
}

/* ========================================================
   NÚT BẤM (BUTTONS)
   ======================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e40af, #1d4ed8);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: #ffffff;
    color: var(--primary);
    border-color: #cbd5e1;
}

.btn-outline:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
}

.btn-teal {
    background-color: var(--teal);
    color: #ffffff;
}

.btn-teal:hover {
    background-color: #0f766e;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1rem;
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
}

/* ========================================================
   HERO SECTION (TRANG CHỦ)
   ======================================================== */
.hero-section {
    padding: 70px 0 60px;
    background: radial-gradient(circle at top right, rgba(2, 132, 199, 0.08), transparent 50%),
                radial-gradient(circle at bottom left, rgba(29, 78, 216, 0.06), transparent 50%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 50px;
    align-items: center;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    border: 1px solid rgba(29, 78, 216, 0.15);
    margin-bottom: 20px;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 0 rgba(34, 197, 94, 0.5);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-title {
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.text-gradient {
    background: linear-gradient(135deg, #1d4ed8, #0284c7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 30px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 45px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 28px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-divider {
    width: 1px;
    height: 36px;
    background-color: var(--border-color);
}

/* PREVIEW CARD */
.preview-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 30px;
    position: relative;
    border-top: 4px solid var(--primary);
}

.preview-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-color);
}

.preview-icon {
    font-size: 2rem;
    background: var(--primary-light);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.preview-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.preview-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.preview-metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background-color: #f8fafc;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.p-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #334155;
}

.p-val {
    font-size: 0.95rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.val-normal {
    background-color: #dcfce7;
    color: #166534;
}

.val-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.preview-result {
    margin-top: 20px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(29, 78, 216, 0.08), rgba(2, 132, 199, 0.08));
    border: 1px dashed rgba(29, 78, 216, 0.3);
    border-radius: var(--radius-md);
    text-align: center;
}

.result-badge-demo {
    color: var(--primary);
    font-size: 0.95rem;
}

/* ========================================================
   CÁC PHẦN (SECTIONS & CARDS)
   ======================================================== */
.section {
    padding: 60px 0;
}

.bg-light {
    background-color: #f1f5f9;
}

.section-header {
    margin-bottom: 40px;
}

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

.sub-badge {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    background-color: var(--primary-light);
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 650px;
    margin: 0 auto;
}

/* CARDS */
.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    transition: all 0.25s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

/* STEPS GRID */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(29, 78, 216, 0.3);
}

.step-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.step-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.step-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* FEATURES GRID */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon-wrapper {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.icon-blue {
    background-color: var(--primary-light);
    color: var(--primary);
}

.icon-teal {
    background-color: var(--teal-light);
    color: var(--teal);
}

.icon-purple {
    background-color: #f3e8ff;
    color: #9333ea;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
}

.feature-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 15px;
    border-top: 1px dashed var(--border-color);
    font-size: 0.85rem;
    color: #475569;
}

/* CTA BANNER */
.cta-section {
    background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
    color: #ffffff;
    padding: 60px 0;
}

.cta-container {
    max-width: 800px;
}

.cta-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 15px;
}

.cta-desc {
    font-size: 1.1rem;
    color: #bfdbfe;
    margin-bottom: 30px;
    line-height: 1.6;
}

.cta-section .btn-primary {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-section .btn-primary:hover {
    background: #f8fafc;
    color: var(--primary-hover);
    transform: translateY(-2px);
}

/* ========================================================
   FORM DỰ ĐOÁN (PREDICT PAGE)
   ======================================================== */
.form-section {
    padding: 40px 0 60px;
}

.form-page-container {
    max-width: 1050px;
}

.page-title-block {
    margin-bottom: 35px;
}

.page-main-title {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.page-main-desc {
    font-size: 1rem;
    color: var(--text-muted);
}

.form-layout-grid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 30px;
    align-items: flex-start;
}

.form-card {
    border-top: 4px solid var(--primary);
}

.card-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.required {
    color: #dc2626;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 10px 85px 10px 16px;
    font-size: 1rem;
    font-family: inherit;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: #ffffff;
    color: #0f172a;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.input-unit {
    position: absolute;
    right: 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background-color: #f1f5f9;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    pointer-events: none;
}

.form-hint {
    display: block;
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 6px;
}

.invalid-feedback {
    display: none;
    font-size: 0.82rem;
    color: #dc2626;
    margin-top: 4px;
    font-weight: 500;
}

.form-control.is-invalid {
    border-color: #dc2626;
    background-color: #fef2f2;
}

.form-control.is-invalid + .input-unit + .form-hint + .invalid-feedback,
.is-invalid ~ .invalid-feedback {
    display: block;
}

/* QUICK BMI CALCULATOR */
.label-with-helper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.label-with-helper .form-label {
    margin-bottom: 0;
}

.btn-text-helper {
    background: none;
    border: none;
    color: var(--teal);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.btn-text-helper:hover {
    text-decoration: underline;
    color: #0f766e;
}

.bmi-quick-calculator {
    margin-top: 14px;
    padding: 16px;
    background-color: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: var(--radius-md);
}

.bmi-calc-header {
    font-size: 0.85rem;
    color: #0f766e;
    margin-bottom: 10px;
}

.bmi-calc-inputs {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.calc-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 110px;
}

.calc-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #134e4a;
}

.calc-field input {
    height: 38px;
    padding: 6px 10px;
    font-size: 0.9rem;
    border: 1px solid #5eead4;
    border-radius: var(--radius-sm);
    font-family: inherit;
}

.bmi-calc-result {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f766e;
}

/* SIDEBAR INFO */
.form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background-color: #ffffff;
    border-top: 4px solid var(--teal);
}

.info-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.ref-table {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ref-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.ref-label {
    color: #475569;
    font-weight: 500;
}

.ref-badge {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.badge-green {
    background-color: #dcfce7;
    color: #15803d;
}

.badge-yellow {
    background-color: #fef3c7;
    color: #b45309;
}

.badge-red {
    background-color: #fee2e2;
    color: #b91c1c;
}

.ref-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 14px 0;
}

.tip-card {
    display: flex;
    gap: 14px;
    background-color: #f8fafc;
    border-left: 4px solid var(--primary);
}

.tip-icon {
    font-size: 1.5rem;
}

.tip-heading {
    font-size: 0.92rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.tip-text {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* SPINNER */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ALERTS */
.alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ========================================================
   TRANG KẾT QUẢ (RESULT PAGE)
   ======================================================== */
.result-section {
    padding: 40px 0 60px;
}

.result-page-container {
    max-width: 950px;
}

/* HERO RESULT CARD */
.result-hero-card {
    background-color: #ffffff;
    border-radius: var(--radius-xl);
    padding: 35px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    border: 2px solid transparent;
}

.card-danger {
    border-color: #fca5a5;
    background: linear-gradient(180deg, #fff5f5, #ffffff 60%);
}

.card-success {
    border-color: #86efac;
    background: linear-gradient(180deg, #f0fdf4, #ffffff 60%);
}

.result-hero-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.card-danger .result-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background-color: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-success .result-hero-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background-color: #dcfce7;
    color: #16a34a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-hero-title-group {
    display: flex;
    flex-direction: column;
}

.result-tag {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.card-danger .result-tag {
    color: #dc2626;
}

.card-success .result-tag {
    color: #16a34a;
}

.result-main-heading {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
}

/* THANH TIẾN TRÌNH XÁC SUẤT */
.probability-container {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

.prob-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #334155;
}

.prob-value {
    font-size: 1.3rem;
    color: var(--text-main);
}

.prob-bar-track {
    width: 100%;
    height: 16px;
    background-color: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 12px;
}

.prob-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-danger {
    background: linear-gradient(90deg, #f87171, #dc2626);
}

.fill-success {
    background: linear-gradient(90deg, #4ade80, #16a34a);
}

.prob-split-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.split-neg strong {
    color: #15803d;
}

.split-pos strong {
    color: #b91c1c;
}

/* PHÂN TÍCH 3 CHỈ SỐ */
.result-detail-card, .result-chart-card, .recommendations-card, .disclaimer-alert-card {
    margin-bottom: 25px;
}

.section-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.section-card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.metric-card {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.metric-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.metric-card-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
}

.metric-card-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 8px;
}

.metric-card-note {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.status-pill {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.pill-normal, .pill-success {
    background-color: #dcfce7;
    color: #15803d;
}

.pill-warning {
    background-color: #fef3c7;
    color: #b45309;
}

.pill-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.pill-muted {
    background-color: #e2e8f0;
    color: #475569;
}

/* KHUYẾN NGHỊ */
.recommendation-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.6;
}

.rec-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* DISCLAIMER CARD */
.disclaimer-alert-card {
    display: flex;
    gap: 16px;
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-lg);
    padding: 22px;
}

.disclaimer-alert-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.disclaimer-alert-title {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 6px;
}

.disclaimer-alert-text {
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.6;
}

/* ACTIONS */
.result-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 35px;
}

/* ========================================================
   TRANG ABOUT (MÔ HÌNH & BÁO CÁO)
   ======================================================== */
.about-container {
    max-width: 1050px;
}

.about-card {
    margin-bottom: 30px;
}

.info-badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.info-badge-item {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.ib-title {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ib-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary);
}

.leakage-explanation-box {
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 18px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-top: 20px;
}

.leakage-explanation-box h4 {
    font-size: 0.95rem;
    color: #1e3a8a;
    margin-bottom: 8px;
}

.leakage-explanation-box ul {
    padding-left: 20px;
    font-size: 0.88rem;
    color: #1e40af;
    line-height: 1.6;
}

/* BẢNG SO SÁNH */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
}

.table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.table-custom th {
    background-color: #f1f5f9;
    color: #334155;
    text-align: left;
    padding: 14px 16px;
    font-weight: 700;
    border-bottom: 2px solid var(--border-color);
}

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

.row-highlight {
    background-color: #eff6ff;
}

.badge-chosen {
    display: inline-block;
    background-color: var(--primary);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
}

.text-bold-green {
    font-weight: 800;
    color: #15803d;
}

.rationale-box {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 18px;
    margin-top: 20px;
}

.rationale-box h4 {
    color: #166534;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.rationale-box p {
    font-size: 0.88rem;
    color: #14532d;
    line-height: 1.6;
}

/* BIỂU ĐỒ */
.charts-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-top: 20px;
}

.mt-4 {
    margin-top: 25px;
}

.chart-box {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.chart-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
}

.chart-img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

/* API DOCS */
.api-docs-box {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 15px;
}

.api-endpoint {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.api-method {
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
}

.method-post {
    background-color: #16a34a;
    color: #ffffff;
}

.api-url {
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
}

.api-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.api-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    margin: 12px 0 6px;
}

.code-block {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-family: monospace;
    overflow-x: auto;
}

/* ========================================================
   FOOTER
   ======================================================== */
.footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    padding-top: 45px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.footer-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 16px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.footer-links a:hover {
    color: var(--primary);
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-tag {
    background-color: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.footer-bottom {
    background-color: #f8fafc;
    border-top: 1px solid var(--border-color);
    padding: 18px 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* ========================================================
   RESPONSIVE (MOBILE & TABLET)
   ======================================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .steps-grid, .features-grid {
        grid-template-columns: 1fr;
    }

    .form-layout-grid {
        grid-template-columns: 1fr;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .info-badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid-2 {
        grid-template-columns: 1fr;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 640px) {
    .navbar-container {
        height: auto;
        padding: 12px 20px;
        flex-direction: column;
        gap: 12px;
    }

    .nav-menu {
        gap: 10px;
    }

    .nav-action {
        display: none;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }

    .stat-divider {
        display: none;
    }
}

/* PRINT STYLES */
@media print {
    .navbar-header, .medical-disclaimer-banner, .footer, .result-actions, .sub-badge {
        display: none !important;
    }

    body {
        background-color: #ffffff;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

