/* ============================================================
   chuyendoiso145 — Web fonts (self-hosted)
   ============================================================ */

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-400-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-400-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-500-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-500-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-600-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-600-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-700-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-700-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-800-vietnamese.woff2') format('woff2');
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}

@font-face {
    font-family: 'Be Vietnam Pro';
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('/static/fonts/be-vietnam-pro-800-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   chuyendoiso145 — Design System v0.1 (P0)
   Tokens + components. Không phụ thuộc build step.
   ============================================================ */

:root {
    /* Brand */
    --brand-900: #0a2540;
    --brand-800: #0d3055;
    --brand-700: #123d7a;
    --brand-600: #1552a0;
    --brand-500: #1f6fd0;
    --brand-100: #e6f0fb;

    /* Accent */
    --teal-700: #0f5f59;
    --teal-600: #0f766e;
    --teal-500: #14b8a6;
    --teal-100: #d9f5f0;

    --orange-700: #c2410c;
    --orange-600: #ea580c;
    --orange-500: #f97316;
    --orange-100: #ffedd5;

    /* Neutral */
    --ink: #13233b;
    --ink-soft: #26374f;
    --muted: #566a84;
    --muted-light: #7286a0;
    --border: #dbe5f1;
    --border-strong: #c6d5e8;
    --bg: #f5f8fd;
    --surface: #ffffff;
    --surface-alt: #eef4fb;
    --dark: #0a1a2f;

    /* Feedback */
    --danger: #b42318;
    --danger-bg: #fef3f2;
    --info: #123d7a;
    --info-bg: #eff6ff;
    --success: #067647;

    /* Shape */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;

    --shadow-sm: 0 1px 2px rgba(10, 37, 64, 0.06), 0 1px 3px rgba(10, 37, 64, 0.08);
    --shadow-md: 0 8px 24px rgba(10, 37, 64, 0.08);
    --shadow-lg: 0 20px 48px rgba(10, 37, 64, 0.14);

    --font-sans: "Be Vietnam Pro", "Noto Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

    --container: 1180px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--brand-600);
    text-decoration: none;
}

a:hover {
    color: var(--brand-700);
}

h1, h2, h3, h4 {
    margin: 0 0 0.55em;
    line-height: 1.16;
    color: var(--ink);
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; line-height: 1.12; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.16rem; font-weight: 700; letter-spacing: -0.01em; }
h4 { font-size: 1rem; font-weight: 700; }

p { margin: 0 0 1rem; }

ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--brand-700);
    color: #fff;
    border-radius: var(--radius-sm);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
    color: #fff;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    flex-shrink: 0;
}

.brand:hover { color: var(--ink); }

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    box-shadow: var(--shadow-sm);
}

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

.brand-text strong { font-size: 1.02rem; letter-spacing: -0.01em; }
.brand-text small { font-size: 0.7rem; color: var(--muted); letter-spacing: 0.02em; }

.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
    flex-wrap: nowrap;
}

.nav-link {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: var(--ink-soft);
    font-size: 0.89rem;
    font-weight: 550;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--surface-alt);
    color: var(--brand-700);
}

.nav-link.is-active {
    color: var(--brand-700);
    background: var(--brand-100);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 1.1rem;
    cursor: pointer;
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
    color: #fff;
    box-shadow: 0 6px 16px rgba(21, 82, 160, 0.25);
}

.btn-primary:hover { color: #fff; box-shadow: 0 8px 22px rgba(21, 82, 160, 0.32); }

.btn-outline {
    border-color: var(--border-strong);
    background: var(--surface);
    color: var(--brand-700);
}

.btn-outline:hover { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-100); }

.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
}

.btn-ghost:hover { background: var(--surface-alt); color: var(--brand-700); }

.btn-dark {
    background: var(--dark);
    color: #fff;
}

.btn-dark:hover { color: #fff; background: var(--brand-800); }

.btn-light {
    background: #fff;
    color: var(--brand-800);
}

.btn-light:hover { color: var(--brand-800); }

.btn-sm { padding: 9px 14px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(48px, 7vw, 92px) 0 clamp(40px, 5vw, 64px);
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(20, 184, 166, 0.18), transparent 60%),
        radial-gradient(700px 420px at 8% 0%, rgba(31, 111, 208, 0.14), transparent 60%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal-700);
}

.eyebrow-light { color: #8fe3d8; }

.text-gradient {
    background: linear-gradient(100deg, var(--brand-600), var(--teal-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lead {
    font-size: clamp(1.04rem, 1.4vw, 1.17rem);
    color: var(--muted);
    max-width: 64ch;
    line-height: 1.7;
}

.lead-sm {
    font-size: 1rem;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0 22px;
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 0;
    margin: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.88rem;
}

.hero-points li {
    position: relative;
    padding-left: 18px;
}

.hero-points li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--teal-600);
    font-weight: 800;
}

.hero-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    padding: 26px;
}

.panel-head h2 { font-size: 1.3rem; margin-bottom: 6px; }
.panel-head p { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }

.panel-list {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.panel-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
}

.panel-item > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 0.72rem;
    font-weight: 800;
}

.panel-item strong { display: block; font-size: 0.92rem; }
.panel-item small { color: var(--muted); font-size: 0.8rem; }

/* ---------- Badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.02em;
    margin-bottom: 10px;
}

.badge-teal { background: var(--teal-100); color: var(--teal-700); }
.badge-orange { background: var(--orange-100); color: var(--orange-700); }

/* ---------- Stats ---------- */

.stats {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 22px;
    padding-bottom: 22px;
}

.stat {
    display: flex;
    align-items: baseline;
    gap: 10px;
    justify-content: center;
}

.stat strong {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--brand-700);
    letter-spacing: -0.02em;
}

.stat span { color: var(--muted); font-size: 0.86rem; }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 6.5vw, 92px) 0; }
.section-alt { background: var(--bg); }
.section-dark { background: var(--dark); color: #fff; }
.section-dark h2, .section-dark .lead-sm { color: #fff; }
.section-dark .lead-sm { color: #c7d7ea; }

.section-head {
    max-width: 720px;
    margin-bottom: 32px;
}

.section-head p { color: var(--muted); }

.card-grid {
    display: grid;
    gap: 20px;
}

.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 26px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.94rem; margin-bottom: 16px; line-height: 1.65; }

.card-accent {
    border-top: 4px solid var(--brand-500);
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
    display: grid;
    gap: 7px;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.check-list li { position: relative; padding-left: 20px; }
.check-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--teal-600);
    font-weight: 800;
}

.link-arrow {
    margin-top: auto;
    font-weight: 650;
    font-size: 0.9rem;
}

.link-arrow::after {
    content: " →";
    transition: margin-left 0.15s ease;
}

.link-arrow:hover::after { margin-left: 4px; }

.service-card { padding-top: 20px; }

.service-no {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--teal-600);
    margin-bottom: 10px;
}

.meta {
    margin-top: auto;
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--muted-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ---------- Split / lists ---------- */

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(34px, 5vw, 72px);
    align-items: center;
}

.stack { display: grid; gap: 12px; }

.list-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.list-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    color: #fff;
    font-weight: 800;
}

.list-card strong { display: block; font-size: 0.95rem; }
.list-card small { color: var(--muted); font-size: 0.82rem; }

.quote-card {
    padding: 30px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(31, 111, 208, 0.18), rgba(20, 184, 166, 0.16));
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.quote-card p {
    font-size: 1.2rem;
    font-weight: 650;
    line-height: 1.5;
    color: #fff;
}

.quote-card span { color: #b9cde6; font-size: 0.86rem; }

/* ---------- CTA ---------- */

.cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: clamp(28px, 4vw, 44px);
    border-radius: var(--radius-xl);
    background: linear-gradient(120deg, var(--brand-800), var(--brand-600) 60%, var(--teal-600));
    color: #fff;
    box-shadow: var(--shadow-md);
}

.cta h2 { color: #fff; }
.cta p { color: #d7e5f5; margin-bottom: 0; max-width: 60ch; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0; }

/* ---------- Page hero ---------- */

.page-hero {
    padding: clamp(44px, 6vw, 76px) 0 clamp(28px, 4vw, 44px);
    background:
        radial-gradient(700px 320px at 90% 0%, rgba(20, 184, 166, 0.14), transparent 65%),
        linear-gradient(180deg, #f8fbff, #ffffff);
    border-bottom: 1px solid var(--border);
}

.page-hero h1 { max-width: none; }
.page-hero .lead { margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--dark);
    color: #c7d7ea;
    padding: 56px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-footer { color: #fff; }
.brand-footer:hover { color: #fff; }
.brand-footer .brand-text small { color: #8fa8c4; }

.footer-note {
    margin-top: 16px;
    max-width: 38ch;
    color: #9fb4cd;
    font-size: 0.9rem;
}

.site-footer h3 {
    color: #fff;
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 9px;
}

.footer-links a { color: #b9cde6; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 20px;
    color: #8fa8c4;
    font-size: 0.82rem;
}

/* ---------- Forms / auth ---------- */

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(700px 420px at 15% 0%, rgba(31, 111, 208, 0.16), transparent 60%),
        radial-gradient(700px 420px at 90% 100%, rgba(20, 184, 166, 0.16), transparent 60%),
        var(--bg);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.auth-brand { margin-bottom: 22px; }
.auth-card h1 { font-size: 1.7rem; margin-bottom: 4px; }

.muted { color: var(--muted); font-size: 0.9rem; }

.form { display: grid; gap: 22px; margin-top: 20px; }

.field {
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 650;
    color: #24344d;
}

.field input {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.97rem;
    line-height: 1.5;
    color: var(--ink);
    background: #fbfdff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field input:focus {
    outline: none;
    border-color: var(--brand-500);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(31, 111, 208, 0.14);
}

.callout {
    padding: 15px 17px;
    border-radius: var(--radius-md);
    font-size: 0.89rem;
    line-height: 1.65;
    border: 1px solid transparent;
}

.callout-danger { background: var(--danger-bg); color: var(--danger); border-color: #fbd5d2; }
.callout-info { background: var(--info-bg); color: var(--info); border-color: #cfe0fb; margin-bottom: 22px; }

.auth-foot { margin: 20px 0 0; font-size: 0.86rem; text-align: center; }

/* ---------- Admin ---------- */

.admin-body { background: var(--bg); }

.admin-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    min-height: 100vh;
}

.admin-sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    background: var(--dark);
    color: #c7d7ea;
    overflow-y: auto;
}

.brand-admin { color: #fff; margin-bottom: 26px; padding: 0 6px; }
.brand-admin:hover { color: #fff; }
.brand-admin .brand-text small { color: #8fa8c4; }

.admin-nav { display: grid; gap: 2px; }

.admin-nav-label {
    margin: 16px 8px 6px;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #6e88a6;
}

.admin-nav a {
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: #b9cde6;
    font-size: 0.88rem;
}

.admin-nav a:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.admin-nav a.is-active { background: var(--brand-600); color: #fff; }

.admin-back {
    margin-top: auto;
    padding: 10px 8px 0;
    font-size: 0.86rem;
    color: #8fa8c4;
}

.admin-main { min-width: 0; }

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.admin-topbar h1 { font-size: 1.45rem; margin: 0; }

.admin-user { display: flex; align-items: center; gap: 10px; }

.avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.admin-user-meta strong { font-size: 0.88rem; }
.admin-user-meta small { color: var(--muted); font-size: 0.76rem; }

.admin-content { padding: 28px 32px 48px; }

.admin-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-card {
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.admin-card-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted-light);
    margin-bottom: 8px;
}

.admin-card strong { font-size: 2rem; font-weight: 800; color: var(--brand-700); line-height: 1; }
.admin-card p { margin: 6px 0 0; font-size: 0.82rem; color: var(--muted); }

.admin-panel {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.admin-panel h2 { font-size: 1.1rem; margin-bottom: 14px; }

.admin-tasks {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.admin-tasks li {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
    font-size: 0.9rem;
}

.admin-tasks span {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 26px;
    border-radius: 7px;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 0.72rem;
    font-weight: 800;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .card-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .split { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-shell { grid-template-columns: 220px minmax(0, 1fr); }
    .admin-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .nav {
        display: none;
        position: absolute;
        top: 78px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px 20px 18px;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-md);
    }

    .nav.is-open { display: flex; }
    .nav-toggle { display: inline-grid; place-items: center; }
    .header-actions .btn-ghost { display: none; }
}

@media (max-width: 820px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat { justify-content: flex-start; }

    .cta { flex-direction: column; align-items: flex-start; }

    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: static; height: auto; }
    .admin-topbar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px) {
    .container { padding: 0 18px; }
    .header-actions .btn-primary { display: none; }
    .nav-link { padding: 11px 12px; }
    .card-grid.three { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-cards { grid-template-columns: 1fr; }
    .admin-content { padding: 22px 18px 40px; }
    .admin-topbar { padding: 20px 18px; }
    .hero-panel { padding: 20px; }
    .auth-card { padding: 26px 22px; }
}

/* ---------- P1: bài viết ---------- */

.article-card h3 a { color: var(--ink); }
.article-card h3 a:hover { color: var(--brand-600); }

.article-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted-light);
    font-size: 0.82rem;
}

.article-hero .back-link {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 0.86rem;
    font-weight: 650;
    color: var(--muted);
}

.article-hero .back-link:hover { color: var(--brand-600); }

.article-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 0.86rem;
}

.article-container {
    max-width: 820px;
}

.article-body {
    padding: 40px 0 24px;
    font-size: 1.04rem;
    line-height: 1.75;
    color: var(--ink-soft);
}

.article-body h2 {
    margin-top: 2em;
    font-size: 1.5rem;
    color: var(--ink);
}

.article-body h3 { margin-top: 1.6em; font-size: 1.15rem; }

.article-body p, .article-body ul, .article-body ol { margin-bottom: 1.15em; }

.article-body ul, .article-body ol { padding-left: 1.35rem; }
.article-body li { margin-bottom: 0.4em; }

.article-body blockquote {
    margin: 1.6em 0;
    padding: 16px 20px;
    border-left: 4px solid var(--teal-500);
    background: var(--teal-100);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--teal-700);
    font-weight: 600;
}

.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.4em 0;
    font-size: 0.92rem;
}

.article-body th, .article-body td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.article-body th { background: var(--surface-alt); font-weight: 700; }
.article-body tr:nth-child(even) td { background: #fbfdff; }

.article-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0 64px;
    padding: 24px;
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
    border: 1px solid var(--border);
}

.article-cta h2 { font-size: 1.15rem; margin-bottom: 4px; }
.article-cta p { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ---------- P1: liên hệ ---------- */

.contact-split { align-items: start; }

.contact-form-wrap {
    padding: 34px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.contact-form { margin-top: 0; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.field select,
.field textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.97rem;
    line-height: 1.5;
    color: var(--ink);
    background: #fbfdff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--brand-500);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(31, 111, 208, 0.14);
}

.field textarea { resize: vertical; min-height: 160px; line-height: 1.65; }

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 2px 0;
    font-size: 0.87rem;
    color: var(--muted);
    line-height: 1.6;
}

.checkbox input { margin-top: 3px; width: 16px; height: 16px; flex-shrink: 0; }

.contact-aside { display: grid; gap: 18px; }

.contact-aside .card h3 { margin-bottom: 12px; }
.contact-aside .card p:last-child { margin-bottom: 0; }

.step-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 18px;
    counter-reset: step;
}

.step-list li {
    position: relative;
    padding-left: 44px;
    counter-increment: step;
}

.step-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 0.8rem;
    font-weight: 800;
}

.step-list strong { display: block; font-size: 0.93rem; margin-bottom: 2px; }
.step-list span { color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
    font-size: 0.91rem;
    line-height: 1.5;
}

.contact-list li { display: flex; gap: 10px; }
.contact-list li > span:first-child { min-width: 102px; flex-shrink: 0; color: var(--muted); }

.callout-success {
    background: #edfbf3;
    color: var(--success);
    border-color: #b7e4cc;
    margin-bottom: 18px;
}

/* ---------- P1: bảng quản trị ---------- */

.admin-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.admin-heading h1 { font-size: 1.55rem; margin: 0; }
.admin-heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.admin-topbar-title { display: flex; flex-direction: column; line-height: 1.25; }
.admin-topbar-title .eyebrow { margin-bottom: 2px; }
.admin-topbar-title strong { font-size: 1rem; }

.admin-card-link {
    display: inline-block;
    margin-top: 10px;
    font-size: 0.8rem;
    font-weight: 650;
}

.table-wrap {
    overflow-x: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    min-width: 860px;
}

.table th, .table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.table th {
    background: var(--surface-alt);
    font-size: 0.72rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
    white-space: nowrap;
}

.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfdff; }

.nowrap { white-space: nowrap; }
.cell-message { max-width: 320px; color: var(--ink-soft); }

.badge-compact { margin-bottom: 0; padding: 2px 8px; font-size: 0.66rem; }

.status {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 750;
    white-space: nowrap;
}

.status-new { background: var(--orange-100); color: var(--orange-700); }
.status-contacted { background: var(--brand-100); color: var(--brand-700); }
.status-closed { background: #e8f5ee; color: var(--success); }

.status-form { display: flex; gap: 6px; align-items: center; }
.status-form select {
    padding: 6px 8px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.82rem;
    background: var(--surface);
}

@media (max-width: 820px) {
    .form-row { grid-template-columns: 1fr; }
    .article-cta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 620px) {
    .contact-form-wrap { padding: 20px; }
    .admin-heading { align-items: flex-start; }
}

/* ---------- P1.1: biên tập bài viết ---------- */

.status-published { background: #e8f5ee; color: var(--success); }
.status-draft { background: var(--orange-100); color: var(--orange-700); }
.status-archived { background: #eef1f5; color: var(--muted); }

.row-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.row-actions form { display: inline; }
.danger-text { color: var(--danger); }
.danger-text:hover { background: var(--danger-bg); color: var(--danger); }

.editor-form { margin-top: 0; }

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.editor-main {
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.editor-side { display: grid; gap: 14px; position: sticky; top: 20px; }

.field-help {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.5;
}

.field-help code {
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--surface-alt);
    font-family: var(--font-mono);
    font-size: 0.76rem;
}

.code-area {
    font-family: var(--font-mono);
    font-size: 0.86rem;
    line-height: 1.6;
    min-height: 360px;
}

@media (max-width: 1024px) {
    .editor-grid { grid-template-columns: 1fr; }
    .editor-side { position: static; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
    .editor-main { padding: 18px; }
    .editor-side { grid-template-columns: 1fr; }
}

/* ---------- P1.2: năng lực công nghệ ---------- */

.catalog-stats {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.catalog-stats .stats-grid { padding-top: 20px; padding-bottom: 20px; }
.catalog-stats .stat strong { font-size: 1.55rem; }

.catalog-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 26px;
}

.catalog-intro h2 { margin-bottom: 8px; }
.catalog-intro p { margin-bottom: 0; max-width: 66ch; }

.catalog-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 46px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.catalog-nav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 600;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.catalog-nav a:hover { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-100); }

.catalog-nav a span {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--surface-alt);
    color: var(--brand-700);
    font-size: 0.7rem;
    font-weight: 800;
}

.catalog-section {
    margin-bottom: 56px;
    scroll-margin-top: 96px;
}

.catalog-section:last-child { margin-bottom: 0; }

.catalog-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.catalog-kicker {
    display: block;
    margin-bottom: 6px;
    font-size: 0.74rem;
    font-weight: 750;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--teal-700);
}

.catalog-section-head h2 { margin-bottom: 6px; }
.catalog-section-head p { margin-bottom: 0; color: var(--muted); max-width: 70ch; }

.catalog-section-head .link-arrow { white-space: nowrap; margin-top: 6px; }

.capability-card .status { align-self: flex-start; margin-bottom: 12px; }

.capability-card h3 { margin-bottom: 6px; }
.capability-card h3 a { color: var(--ink); }
.capability-card h3 a:hover { color: var(--brand-600); }

.capability-tagline {
    font-weight: 650;
    font-size: 0.9rem;
    color: var(--ink-soft);
    margin-bottom: 8px;
}

.capability-summary {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 14px 0 18px;
}

.tech-tags span {
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--brand-700);
    font-size: 0.71rem;
    font-weight: 650;
    white-space: nowrap;
}

.capability-card .link-arrow { margin-top: auto; }

.capability-hero .back-link {
    display: inline-block;
    margin-bottom: 18px;
    font-size: 0.86rem;
    font-weight: 650;
    color: var(--muted);
}

.capability-hero .back-link:hover { color: var(--brand-600); }
.capability-hero .article-kicker { align-items: center; }
.capability-hero .article-kicker .badge { margin-bottom: 0; }
.capability-hero .status { font-size: 0.72rem; }

.capability-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: clamp(28px, 4vw, 52px);
    align-items: start;
}

.capability-main { min-width: 0; }

.capability-block { margin-bottom: 38px; }
.capability-block:last-child { margin-bottom: 0; }
.capability-block h2 { font-size: 1.32rem; margin-bottom: 12px; }
.capability-block > p { color: var(--muted); font-size: 0.98rem; }

.capability-functions { gap: 12px; font-size: 0.96rem; }
.capability-functions li { line-height: 1.6; }

.capability-side {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 96px;
}

.capability-side .card { padding: 22px; }
.capability-side .card h3 { font-size: 1rem; margin-bottom: 10px; }
.capability-side .tech-tags { margin: 0; }
.capability-side .callout { font-size: 0.86rem; }

.plain-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--ink-soft);
}

.plain-list li { position: relative; padding-left: 16px; }
.plain-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--teal-500);
}

.outcome-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }

.outcome-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-alt);
}

.outcome-card span {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--teal-100);
    color: var(--teal-700);
    font-size: 0.72rem;
    font-weight: 800;
}

.outcome-card p { margin: 0; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.5; }

.related-block { margin-top: 64px; }
.related-block .section-head { margin-bottom: 24px; }

@media (max-width: 1024px) {
    .catalog-intro { flex-direction: column; align-items: flex-start; }
    .capability-layout { grid-template-columns: 1fr; }
    .capability-side { position: static; grid-template-columns: 1fr 1fr; }
    .outcome-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .catalog-section-head { flex-direction: column; }
    .capability-side { grid-template-columns: 1fr; }
    .outcome-grid { grid-template-columns: 1fr; }
    .catalog-nav { margin-bottom: 34px; }
}

/* ---------- P1.3: trang giải pháp ---------- */

.solutions-stats {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.solutions-stats .stats-grid { padding-top: 20px; padding-bottom: 20px; }
.solutions-stats .stat strong { font-size: 1.55rem; }

.solution-card .status { align-self: flex-start; margin-bottom: 12px; }
.solution-card h3 { margin-bottom: 6px; }
.solution-card > p { font-size: 0.9rem; }

.solution-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 14px;
}

.solution-links a {
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--brand-700);
    font-size: 0.72rem;
    font-weight: 650;
}

.solution-links a:hover { border-color: var(--brand-500); background: var(--brand-100); }

.section-dark .section-head p { color: #c7d7ea; }

.fast-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.fast-step {
    position: relative;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.06);
}

.fast-time {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(20, 184, 166, 0.18);
    color: #8fe3d8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.fast-step h3 { color: #fff; font-size: 1.05rem; margin-bottom: 6px; }
.fast-step p { color: #b9cde6; font-size: 0.86rem; margin: 0; line-height: 1.6; }

.fast-note {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: #c7d7ea;
    font-size: 0.88rem;
    line-height: 1.6;
}

.fast-note strong { color: #fff; }

.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.feature-card h3 { margin-bottom: 8px; }

.ai-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.ai-card p { font-size: 0.88rem; }
.ai-card .link-arrow { margin-top: auto; }

.ai-note { margin-top: 22px; }

.track-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.track-card {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.track-card-large {
    border-color: #b9e7df;
    background: linear-gradient(135deg, #ffffff, #f0fbf8);
}

.track-card h3 { margin: 10px 0 8px; font-size: 1.18rem; }
.track-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

.consult-table { border-radius: var(--radius-lg); }
.consult-table .table { min-width: 760px; }

.measurement-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.measure-item {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.measure-item strong { display: block; color: var(--brand-700); margin-bottom: 4px; }
.measure-item span { color: var(--muted); font-size: 0.84rem; line-height: 1.5; }

@media (max-width: 1024px) {
    .fast-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .card-grid.two { grid-template-columns: 1fr; }
    .track-cards { grid-template-columns: 1fr; }
    .measurement-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .fast-grid { grid-template-columns: 1fr; }
    .card-grid.four { grid-template-columns: 1fr; }
}

.ai-agent-cta { margin-top: 24px; }

/* ---------- Botchat widget ---------- */

.botchat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    font-family: var(--font-sans);
}

.botchat-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 19px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--brand-700), var(--teal-600));
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(10, 37, 64, 0.28);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.botchat-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(10, 37, 64, 0.34);
}

.botchat-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
    width: 384px;
    max-width: calc(100vw - 32px);
    height: min(560px, calc(100vh - 130px));
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(10, 37, 64, 0.24);
    overflow: hidden;
}

.botchat-panel[hidden] { display: none; }

.botchat-head {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    background: linear-gradient(120deg, var(--brand-800), var(--brand-600) 65%, var(--teal-600));
    color: #fff;
}

.botchat-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 0.72rem;
    font-weight: 800;
}

.botchat-head-info { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.botchat-head-info strong { font-size: 0.92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.botchat-head-info span { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; color: #d7e8f8; }

.botchat-online {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #43d9a3;
    box-shadow: 0 0 0 3px rgba(67, 217, 163, 0.22);
}

.botchat-close {
    margin-left: auto;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.botchat-close:hover { background: rgba(255, 255, 255, 0.22); }

.botchat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f7fbff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.botchat-msg { display: flex; }
.botchat-msg.is-user { justify-content: flex-end; }

.botchat-bubble {
    max-width: 86%;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: 0.87rem;
    line-height: 1.55;
    white-space: pre-line;
    word-break: break-word;
}

.botchat-msg.is-bot .botchat-bubble {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--ink-soft);
    border-bottom-left-radius: 5px;
}

.botchat-msg.is-user .botchat-bubble {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-500));
    color: #fff;
    border-bottom-right-radius: 5px;
}

.botchat-typing .botchat-bubble {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 13px 15px;
}

.botchat-typing .botchat-bubble span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--muted-light);
    animation: botchat-bounce 1s infinite ease-in-out;
}

.botchat-typing .botchat-bubble span:nth-child(2) { animation-delay: 0.15s; }
.botchat-typing .botchat-bubble span:nth-child(3) { animation-delay: 0.3s; }

@keyframes botchat-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.botchat-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.botchat-quick[hidden] { display: none; }

.botchat-quick button {
    padding: 6px 11px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--brand-700);
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 650;
    cursor: pointer;
}

.botchat-quick button:hover { border-color: var(--brand-500); background: var(--brand-100); }

.botchat-form {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.botchat-form input {
    flex: 1;
    min-width: 0;
    padding: 10px 13px;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--ink);
    background: #fbfdff;
}

.botchat-form input:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(31, 111, 208, 0.13);
}

.botchat-form button {
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: var(--brand-700);
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.botchat-form button:hover { background: var(--brand-800); }

.botchat-note {
    margin: 0;
    padding: 0 14px 11px;
    background: #fff;
    color: var(--muted-light);
    font-size: 0.68rem;
    line-height: 1.4;
}

/* ---------- Admin botchat ---------- */

.admin-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
}

.admin-panel + .admin-panel { margin-top: 20px; }
.admin-grid-two .admin-panel + .admin-panel { margin-top: 0; }

.admin-card-text {
    display: block;
    font-size: 1.05rem !important;
    line-height: 1.35;
    color: var(--brand-700) !important;
    word-break: break-word;
}

.admin-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 560px;
    overflow-y: auto;
    padding: 4px;
}

.admin-chat-row { display: flex; }
.admin-chat-row.is-user { justify-content: flex-end; }

.admin-chat-bubble {
    max-width: 78%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
}

.admin-chat-row.is-user .admin-chat-bubble {
    background: var(--brand-100);
    border-color: #cfe0fb;
}

.admin-chat-role {
    display: block;
    margin-bottom: 4px;
    font-size: 0.7rem;
    font-weight: 750;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.admin-chat-bubble p {
    margin: 0 0 6px;
    white-space: pre-line;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink-soft);
}

.admin-chat-bubble small { color: var(--muted-light); font-size: 0.72rem; }

.admin-faq-list { display: grid; gap: 10px; }

.admin-faq-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg);
}

.admin-faq-item strong { display: block; margin-bottom: 4px; font-size: 0.92rem; }
.admin-faq-item p { margin: 0 0 6px; font-size: 0.86rem; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 820px) {
    .admin-grid-two { grid-template-columns: 1fr; }
    .admin-grid-two .admin-panel + .admin-panel { margin-top: 0; }
}

@media (max-width: 620px) {
    .botchat { right: 14px; bottom: 14px; }
    .botchat-panel {
        width: calc(100vw - 28px);
        height: min(72vh, 560px);
    }
}

.botchat-profile {
    display: grid;
    gap: 9px;
    padding: 14px 16px;
    border-top: 1px solid var(--border);
    background: #fff;
}

.botchat-profile[hidden] { display: none; }

.botchat-profile-title {
    margin: 0 0 2px;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.botchat-profile label {
    display: grid;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 650;
    color: var(--ink-soft);
}

.botchat-profile input {
    padding: 9px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.86rem;
    color: var(--ink);
    background: #fbfdff;
}

.botchat-profile input:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(31, 111, 208, 0.13);
}

.botchat-profile button {
    margin-top: 2px;
    padding: 10px 14px;
    border: 0;
    border-radius: 9px;
    background: var(--brand-700);
    color: #fff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

.botchat-profile button:hover { background: var(--brand-800); }
.botchat-profile button:disabled { opacity: 0.6; cursor: wait; }

.botchat-profile-error {
    margin: 0;
    color: var(--danger);
    font-size: 0.78rem;
    line-height: 1.4;
}

.botchat-profile-error[hidden] { display: none; }

.botchat-form[hidden] { display: none; }

.botchat-full {
    margin-left: auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
}

.botchat-full:hover { background: rgba(255, 255, 255, 0.22); }
.botchat-close { margin-left: 0; }

.botchat-panel.is-fullscreen {
    position: fixed;
    inset: 14px;
    width: auto;
    max-width: none;
    height: auto;
    max-height: none;
    border-radius: 18px;
    z-index: 95;
}

body.botchat-full { overflow: hidden; }

@media (max-width: 620px) {
    .botchat-panel.is-fullscreen {
        inset: 0;
        border-radius: 0;
    }
}

.admin-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0;
}

.admin-actions-row form { display: inline; }

/* ---------- Hình ảnh minh họa ---------- */

.home-visual-section { background: var(--surface); }

.visual-media {
    position: relative;
    padding: 0 46px 48px 0;
}

.visual-main {
    width: 100%;
    height: clamp(300px, 34vw, 430px);
    object-fit: cover;
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
}

.visual-small {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 46%;
    height: 200px;
    object-fit: cover;
    border: 6px solid var(--surface);
    border-radius: 18px;
    box-shadow: var(--shadow-md);
}

.visual-badge {
    position: absolute;
    left: 18px;
    top: 18px;
    max-width: 160px;
    padding: 12px 15px;
    border-radius: 14px;
    background: rgba(10, 26, 47, 0.84);
    color: #fff;
    backdrop-filter: blur(6px);
}

.visual-badge strong { display: block; font-size: 1.75rem; line-height: 1; color: #fff; }
.visual-badge span { font-size: 0.72rem; color: #c7d7ea; line-height: 1.35; display: block; margin-top: 4px; }

.article-card { overflow: hidden; }

.article-cover {
    margin: -26px -26px 18px;
    width: calc(100% + 52px);
    max-width: none;
    height: 180px;
    object-fit: cover;
    border-radius: 17px 17px 0 0;
    display: block;
}

.article-hero-cover {
    width: 100%;
    height: clamp(220px, 32vw, 360px);
    object-fit: cover;
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    margin-bottom: 6px;
}

.feature-card { overflow: hidden; }

.feature-img {
    margin: -26px -26px 18px;
    width: calc(100% + 52px);
    max-width: none;
    height: 200px;
    object-fit: cover;
    border-radius: 17px 17px 0 0;
    display: block;
}

.solutions-hero {
    background:
        linear-gradient(95deg, rgba(248, 251, 255, 0.98) 0%, rgba(248, 251, 255, 0.93) 46%, rgba(248, 251, 255, 0.55) 100%),
        url('/static/img/hero-digital.webp') center / cover no-repeat;
}

.capabilities-hero {
    background:
        linear-gradient(95deg, rgba(248, 251, 255, 0.98) 0%, rgba(248, 251, 255, 0.92) 48%, rgba(248, 251, 255, 0.58) 100%),
        url('/static/img/ai-network.webp') center / cover no-repeat;
}

@media (max-width: 820px) {
    .visual-media { padding: 0 0 40px; }
    .visual-small { width: 52%; height: 150px; }
    .visual-main { height: 300px; }
}

@media (max-width: 620px) {
    .visual-small { display: none; }
    .article-cover { height: 160px; }
    .feature-img { height: 170px; }
}

.catalog-section-copy { flex: 1; min-width: 0; }
.catalog-section-copy .link-arrow { display: inline-block; margin-top: 4px; }

.catalog-section-img {
    width: 220px;
    height: 132px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.article-figure { margin: 30px 0 34px; }
.article-figure img {
    width: 100%;
    height: clamp(220px, 30vw, 340px);
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: block;
}
.article-figure figcaption {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--muted-light);
    text-align: center;
}

@media (max-width: 820px) {
    .catalog-section-img { width: 170px; height: 108px; }
}

@media (max-width: 620px) {
    .catalog-section-img { display: none; }
}

.page-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: center;
}

.page-hero-img {
    width: 100%;
    height: clamp(220px, 26vw, 320px);
    object-fit: cover;
    border-radius: 18px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
}

.contact-photo {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

@media (max-width: 820px) {
    .page-hero-grid { grid-template-columns: 1fr; }
    .page-hero-img { height: 220px; }
}

/* ---------- Đội ngũ & hồ sơ chuyên gia ---------- */

.profile-feature {
    display: flex;
    align-items: flex-start;
    gap: 28px;
    padding: clamp(24px, 4vw, 40px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(600px 300px at 100% 0%, rgba(20, 184, 166, 0.14), transparent 65%),
        linear-gradient(135deg, #ffffff, #f4f9ff);
    box-shadow: var(--shadow-md);
    margin-bottom: 56px;
}

.profile-avatar-xl {
    display: grid;
    place-items: center;
    width: 130px;
    height: 130px;
    flex-shrink: 0;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--brand-800), var(--brand-500) 60%, var(--teal-600));
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow: var(--shadow-lg);
}

.profile-feature-body { min-width: 0; }
.profile-feature-body h2 { margin: 8px 0 4px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }

.profile-role { font-weight: 650; color: var(--ink-soft); margin-bottom: 2px; }
.profile-affiliation { color: var(--muted); font-size: 0.9rem; }

.team-section-head { margin-top: 8px; }

.team-role-card { padding-top: 20px; }
.team-role-no {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--teal-600);
    margin-bottom: 8px;
}
.team-role-card h3 { font-size: 1.05rem; }
.team-role-card p { margin-bottom: 0; }

.profile-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
}

.profile-hero .back-link { display: inline-block; margin-bottom: 14px; font-size: 0.86rem; font-weight: 650; color: var(--muted); }

.profile-card {
    padding: 26px;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.profile-card .profile-avatar-xl { width: 92px; height: 92px; border-radius: 22px; font-size: 1.1rem; margin-bottom: 18px; }
.profile-card h3 { font-size: 1.02rem; margin-bottom: 12px; }

.profile-facts { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; font-size: 0.86rem; }
.profile-facts li { display: grid; gap: 2px; }
.profile-facts span { color: var(--muted-light); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.profile-facts strong, .profile-facts a { color: var(--ink-soft); font-weight: 600; line-height: 1.45; }

.profile-content { max-width: 1000px; }
.profile-main { min-width: 0; }
.profile-section { margin-bottom: 44px; }
.profile-section:last-child { margin-bottom: 0; }
.profile-section h2 { font-size: 1.42rem; margin-bottom: 14px; }
.profile-section > p { color: var(--muted); line-height: 1.7; }

.profile-value-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 20px;
}

.profile-value {
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.profile-value strong { display: block; font-size: 0.92rem; margin-bottom: 4px; color: var(--brand-700); }
.profile-value span { color: var(--muted); font-size: 0.84rem; line-height: 1.5; }

.publication-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.publication-list li {
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--ink-soft);
}
.publication-list li span {
    display: block;
    margin-bottom: 3px;
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--teal-700);
}

.profile-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.profile-steps > div {
    position: relative;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}
.profile-steps span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: var(--brand-100);
    color: var(--brand-700);
    font-size: 0.8rem;
    font-weight: 800;
    margin-bottom: 10px;
}
.profile-steps strong { display: block; font-size: 0.92rem; margin-bottom: 4px; }
.profile-steps p { margin: 0; color: var(--muted); font-size: 0.82rem; line-height: 1.5; }

.profile-contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.profile-contact {
    display: grid;
    gap: 2px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--ink-soft);
}
.profile-contact:hover { border-color: var(--brand-500); background: var(--brand-100); color: var(--brand-700); }
.profile-contact span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted-light); font-weight: 700; }
.profile-contact strong { font-size: 0.9rem; }

@media (max-width: 1024px) {
    .profile-hero-grid { grid-template-columns: 1fr; }
    .profile-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .profile-feature { flex-direction: column; }
    .profile-value-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .profile-steps { grid-template-columns: 1fr; }
    .profile-contact-grid { grid-template-columns: 1fr; }
    .profile-avatar-xl { width: 100px; height: 100px; font-size: 1.2rem; }
}

/* ---------- Thư viện ---------- */

.library-card { padding: 20px; }
.library-card h3 { font-size: 1rem; margin-bottom: 6px; }
.library-card p { margin: 0; font-size: 0.86rem; line-height: 1.55; }
.library-card .badge { margin-bottom: 8px; }

.library-copyright {
    padding-top: 28px;
    text-align: center;
    color: var(--muted-light);
    font-size: 0.82rem;
}
.library-copyright p { margin: 0; }

.copyright-note {
    margin: 6px 0 24px;
    font-size: 0.8rem;
    color: var(--muted-light);
    text-align: center;
}

/* ---------- Nội dung Markdown/LaTeX trong chat ---------- */

.botchat-bubble p,
.admin-chat-html p {
    margin: 0 0 0.6em;
}
.botchat-bubble p:last-child,
.admin-chat-html p:last-child { margin-bottom: 0; }

.botchat-bubble h1,
.botchat-bubble h2,
.botchat-bubble h3,
.botchat-bubble h4,
.admin-chat-html h1,
.admin-chat-html h2,
.admin-chat-html h3,
.admin-chat-html h4 {
    margin: 0.8em 0 0.4em;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--ink);
}
.botchat-bubble h1:first-child,
.botchat-bubble h2:first-child,
.botchat-bubble h3:first-child,
.admin-chat-html h1:first-child,
.admin-chat-html h2:first-child,
.admin-chat-html h3:first-child { margin-top: 0; }

.botchat-bubble ul,
.botchat-bubble ol,
.admin-chat-html ul,
.admin-chat-html ol {
    margin: 0.4em 0 0.7em;
    padding-left: 1.25em;
}
.botchat-bubble li,
.admin-chat-html li { margin: 0.2em 0; }

.botchat-bubble a,
.admin-chat-html a { color: var(--brand-600); text-decoration: underline; }

.botchat-bubble code,
.admin-chat-html code {
    padding: 1px 5px;
    border-radius: 5px;
    background: var(--surface-alt);
    font-family: var(--font-mono);
    font-size: 0.82em;
}

.botchat-bubble pre,
.admin-chat-html pre {
    margin: 0.6em 0;
    padding: 10px 12px;
    border-radius: 9px;
    background: #0f172a;
    color: #e2e8f0;
    overflow-x: auto;
    font-size: 0.8rem;
}
.botchat-bubble pre code,
.admin-chat-html pre code { background: transparent; padding: 0; color: inherit; }

.botchat-bubble table,
.admin-chat-html table {
    display: block;
    width: 100%;
    margin: 0.6em 0;
    border-collapse: collapse;
    overflow-x: auto;
    font-size: 0.8rem;
}
.botchat-bubble th,
.botchat-bubble td,
.admin-chat-html th,
.admin-chat-html td {
    padding: 6px 8px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}
.botchat-bubble th,
.admin-chat-html th { background: var(--surface-alt); font-weight: 700; }

.botchat-bubble blockquote,
.admin-chat-html blockquote {
    margin: 0.6em 0;
    padding: 8px 11px;
    border-left: 3px solid var(--teal-500);
    background: var(--teal-100);
    color: var(--teal-700);
    border-radius: 0 8px 8px 0;
}

.botchat-bubble .katex-display,
.admin-chat-html .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 0;
}

.botchat-bubble .math-display,
.admin-chat-html .math-display { display: block; overflow-x: auto; }

/* ---------- Đọc thử tài liệu ---------- */

.library-preview-btn { margin-top: 12px; align-self: flex-start; }
body.preview-open { overflow: hidden; }

.preview-modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 20px;
}

.preview-modal[hidden] { display: none; }

.preview-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 26, 47, 0.64);
    backdrop-filter: blur(3px);
}

.preview-dialog {
    position: relative;
    width: min(920px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(10, 37, 64, 0.35);
}

.preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(120deg, #ffffff, #f3f9ff);
}

.preview-head h2 { margin: 0; font-size: 1.08rem; }
.preview-head .eyebrow { margin-bottom: 2px; }

.preview-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-alt);
    color: var(--ink-soft);
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
}
.preview-close:hover { background: var(--brand-100); color: var(--brand-700); }

.preview-body {
    flex: 1;
    min-height: 0;
    background: #e8eef6;
}

.preview-body iframe {
    display: block;
    width: 100%;
    height: 70vh;
    border: 0;
}

.preview-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.preview-foot .muted { font-size: 0.8rem; margin: 0; }

@media (max-width: 620px) {
    .preview-modal { padding: 0; }
    .preview-dialog { max-height: 100vh; height: 100vh; border-radius: 0; }
    .preview-body iframe { height: calc(100vh - 150px); }
    .preview-foot { flex-direction: column; align-items: flex-start; }
}

/* ---------- Công cụ 3 bước ---------- */

.tool-step-card { padding-top: 20px; }
.tool-step-no {
    display: inline-block;
    margin-bottom: 10px;
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 750;
    color: var(--teal-700);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.tool-upload-form { display: grid; gap: 18px; max-width: 900px; }

.tool-upload-box {
    padding: 24px;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.tool-upload-box input[type="file"] {
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fbfdff;
    width: 100%;
}

.consent-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid #f3d7a8;
    border-radius: var(--radius-md);
    background: #fffaf0;
    color: #7a4a10;
    font-size: 0.85rem;
    line-height: 1.65;
}

.consent-box input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }
.consent-box strong { color: #7a3e00; }

.tool-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 26px;
}

.tool-progress-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.tool-progress-item > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 9px;
    background: var(--surface-alt);
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
}

.tool-progress-item.is-done { border-color: #b7e4cc; background: #f2fbf6; }
.tool-progress-item.is-done > span { background: #d9f5e5; color: var(--success); }
.tool-progress-item strong { display: block; font-size: 0.9rem; }
.tool-progress-item small { color: var(--muted); font-size: 0.78rem; }

.tool-downloads { display: grid; gap: 8px; }
.btn.is-disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

.callout-warning {
    background: #fff8e6;
    color: #7a4a10;
    border-color: #f3d7a8;
}

@media (max-width: 820px) {
    .tool-progress { grid-template-columns: 1fr; }
}

.tool-files-table { min-width: 0; }

.tool-progress-bar {
    height: 10px;
    margin: 0 0 20px;
    border-radius: 999px;
    background: var(--surface-alt);
    overflow: hidden;
    border: 1px solid var(--border);
}
.tool-progress-bar > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--brand-600), var(--teal-500));
    transition: width 0.5s ease;
}

.tool-guide {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 24px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.tool-guide h3 { margin-bottom: 10px; font-size: 1.05rem; }
.tool-guide .check-list { margin-bottom: 0; }
.tool-guide .callout { margin: 0; }
@media (max-width: 820px) { .tool-guide { grid-template-columns: 1fr; } }

/* ---------- Dịch vụ: modal chi tiết ---------- */

.service-detail-card { padding: 20px; }
.service-detail-card h3 { font-size: 1.05rem; }
.service-detail-card .check-list { margin-bottom: 14px; }
.service-detail-card .btn { margin-top: auto; align-self: flex-start; }

body.service-modal-open { overflow: hidden; }

.service-modal {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: grid;
    place-items: center;
    padding: 20px;
}
.service-modal[hidden] { display: none; }
.service-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 26, 47, 0.64);
    backdrop-filter: blur(3px);
}
.service-modal-dialog {
    position: relative;
    width: min(1040px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(10, 37, 64, 0.35);
}
.service-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(120deg, #ffffff, #f3f9ff);
}
.service-modal-head h2 { margin: 0; font-size: 1.15rem; }
.service-modal-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: var(--surface-alt);
    color: var(--ink-soft);
    font-size: 1.2rem;
    cursor: pointer;
    flex-shrink: 0;
}
.service-modal-close:hover { background: var(--brand-100); color: var(--brand-700); }
.service-modal-content {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 24px;
    padding: 22px;
    overflow-y: auto;
}
.service-modal-info h4 { margin: 16px 0 6px; font-size: 0.96rem; color: var(--brand-700); }
.service-modal-info ul, .service-modal-info ol { padding-left: 1.2rem; margin-bottom: 10px; }
.service-modal-info li { margin-bottom: 5px; color: var(--ink-soft); font-size: 0.9rem; }
.service-meta { margin-top: 14px; font-size: 0.84rem; color: var(--muted); }
.service-modal-form {
    align-self: start;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-alt);
}

/* ---------- Đào tạo ---------- */

.training-list { display: grid; gap: 18px; margin-top: 8px; }

.training-card { padding: 24px; }
.training-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; }
.training-head .service-no { margin: 4px 0 0; }
.training-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.training-head p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.training-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}
.training-grid h3 { font-size: 0.98rem; margin-bottom: 8px; }
.training-grid .check-list { margin-bottom: 0; }
.training-grid .plain-list { font-size: 0.88rem; }

.training-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.82rem;
}

@media (max-width: 820px) {
    .service-modal-content { grid-template-columns: 1fr; }
    .training-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    .service-modal { padding: 0; }
    .service-modal-dialog { max-height: 100vh; height: 100vh; border-radius: 0; }
    .service-modal-content { padding: 16px; }
}

.service-modal-form .form-row { grid-template-columns: 1fr; }

.section-tight { padding: 18px 0 0; }
.library-topnote { margin: 0; }
.unit-card { padding: 20px; }
.unit-card h3 { font-size: 1.02rem; margin-bottom: 6px; }
.unit-card p { margin-bottom: 14px; }
.unit-card .btn { margin-top: auto; align-self: flex-start; }

.unit-department-list {
    margin-top: 22px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.unit-department-list h3 { margin-bottom: 6px; }
.dept-list {
    list-style: none;
    padding: 0;
    margin: 10px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 20px;
    font-size: 0.88rem;
}
.dept-list li { display: flex; gap: 8px; color: var(--ink-soft); }
.dept-list li > span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--teal-700);
    font-weight: 700;
    min-width: 32px;
}
@media (max-width: 620px) { .dept-list { grid-template-columns: 1fr; } }
