@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --background: #f8faf7;
  --paper: #f8faf7;
  --surface: rgba(255,255,255,.78);
  --surface-solid: #ffffff;
  --surface-muted: #f0f3ee;
  --ink: #15171b;
  --ink-2: #2d3138;
  --muted: #707782;
  --muted-2: #959ca5;
  --line: rgba(25,35,25,.10);
  --line-strong: rgba(25,35,25,.16);
  --table-surface: #202329;
  --table-header: #2a2e35;
  --table-stripe: #24282f;
  --table-hover: #2d3528;
  --table-border: #3a414b;
  --table-head-ink: #bcc4cb;
  --table-body-ink: #edf1ee;
  --lime: #a6ed1c;
  --lime-deep: #79bd00;
  --lime-soft: #efffd5;
  --teal: #55d9a4;
  --blue: #65b9e9;
  --amber: #f5b94d;
  --danger: #ea5b65;
  --white: #ffffff;
  --shadow-sm: 0 4px 16px rgba(20,30,20,.05);
  --shadow: 0 14px 44px rgba(20,30,20,.08);
  --shadow-lg: 0 22px 70px rgba(20,30,20,.14);
  --table-shadow: 0 18px 38px rgba(20,30,20,.13), 0 3px 9px rgba(20,30,20,.08);
  --table-highlight: rgba(255,255,255,.16);
  --gradient-primary: linear-gradient(135deg, #a6ed1c 0%, #83cf0a 100%);
  --gradient-secondary: linear-gradient(135deg, #eef0f1 0%, #dfe4e2 100%);
  --gradient-accent: linear-gradient(135deg, #a6ed1c 0%, #55d9a4 100%);
  --gradient-hero: linear-gradient(135deg, #a6ed1c 0%, #55d9a4 100%);
  --gradient-sidebar: linear-gradient(180deg, #17191e 0%, #25282f 100%);
  --glass-bg: rgba(255,255,255,.72);
  --glass-border: rgba(25,35,25,.08);
  --glass-shadow: 0 8px 32px rgba(25,35,25,.06);
  --sidebar-ink: #eef2ed;
  --sidebar-muted: rgba(238,242,237,.62);
  --sidebar-active: rgba(166,237,28,.14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --font-display: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 24px;
  --text-2xl: 30px;
  --text-3xl: 40px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #090a0c;
  --paper: #090a0c;
  --surface: rgba(17,20,24,.88);
  --surface-solid: #12151a;
  --surface-muted: #1a1f26;
  --ink: #f5f7fa;
  --ink-2: #e1e7ef;
  --muted: #bdc7d2;
  --muted-2: #929eab;
  --line: rgba(241,246,252,.14);
  --line-strong: rgba(241,246,252,.21);
  --table-surface: #15191e;
  --table-header: #1c2228;
  --table-stripe: #181d23;
  --table-hover: #273021;
  --table-border: rgba(241,246,252,.15);
  --table-head-ink: #c5cfda;
  --table-body-ink: #e2e8ef;
  --lime-deep: #b9ef48;
  --lime-soft: rgba(166,237,28,.16);
  --shadow-sm: 0 4px 18px rgba(0,0,0,.30);
  --shadow: 0 14px 44px rgba(0,0,0,.38);
  --shadow-lg: 0 22px 70px rgba(0,0,0,.52);
  --table-shadow: 0 20px 42px rgba(0,0,0,.44), 0 4px 12px rgba(0,0,0,.28);
  --table-highlight: rgba(255,255,255,.075);
  --gradient-secondary: linear-gradient(135deg, #222831 0%, #303843 100%);
  --gradient-sidebar: linear-gradient(180deg, #08090b 0%, #13171c 100%);
  --glass-bg: rgba(17,20,24,.84);
  --glass-border: rgba(241,246,252,.11);
  --glass-shadow: 0 8px 32px rgba(0,0,0,.38);
  --sidebar-ink: #f4f7fb;
  --sidebar-muted: rgba(234,240,247,.77);
  --sidebar-active: rgba(166,237,28,.15);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { min-height: 100%; margin: 0; overflow-x: hidden; background: var(--background); color: var(--ink); font-family: var(--font-ui); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-synthesis: none; text-rendering: optimizeLegibility; }
:root[data-theme="dark"] .app-shell,
:root[data-theme="dark"] .public-shell,
:root[data-theme="dark"] .login-page {
  background-color: #090a0c;
  background-image: radial-gradient(circle at 1px 1px, rgba(225,232,241,.16) 1px, transparent 1.15px);
  background-size: 22px 22px;
}
:root[data-theme="dark"] .landing-hero::after {
  background: radial-gradient(120% 100% at 50% 28%, rgba(9,10,12,.18) 20%, rgba(9,10,12,.48) 62%, rgba(9,10,12,.72) 100%);
}
:root[data-theme="dark"] .landing-section.alt { background: rgba(255,255,255,.018); }
:root[data-theme="dark"] .landing-page { --landing-card-bg: rgba(14,18,22,.68); --landing-card-border: rgba(235,242,248,.15); --landing-card-highlight: rgba(255,255,255,.07); --landing-card-shadow: 0 18px 52px rgba(0,0,0,.34), 0 2px 8px rgba(0,0,0,.22); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
::selection { background: rgba(166,237,28,.38); color: var(--ink); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Shared visual utilities */
.grid-bg { background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 12%, transparent) 1px, transparent 1px); background-size: 24px 24px; }
.glass-card { background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: inset 0 1px 0 rgba(255,255,255,.05), var(--glass-shadow); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.landing-page { --landing-card-bg: rgba(14,19,22,.68); --landing-card-border: rgba(235,242,248,.14); --landing-card-highlight: rgba(255,255,255,.075); --landing-card-shadow: 0 18px 52px rgba(0,0,0,.26), 0 2px 8px rgba(0,0,0,.18); color: var(--ink); font-family: var(--font-ui); }
.landing-page .glass-card { background: var(--landing-card-bg); border: 1px solid var(--landing-card-border); box-shadow: inset 0 1px 0 var(--landing-card-highlight), var(--landing-card-shadow); backdrop-filter: blur(20px) saturate(1.12); -webkit-backdrop-filter: blur(20px) saturate(1.12); }
.landing-page h1, .landing-page h2, .landing-page h3, .landing-page p { text-wrap: balance; }
:root[data-theme="light"] .landing-page { --landing-card-bg: rgba(255,255,255,.64); --landing-card-border: rgba(25,35,25,.14); --landing-card-highlight: rgba(255,255,255,.72); --landing-card-shadow: 0 18px 48px rgba(20,30,20,.12), 0 2px 8px rgba(20,30,20,.06); }
.gradient-primary { background: var(--gradient-primary); }
.gradient-secondary { background: var(--gradient-secondary); }
.gradient-accent { background: var(--gradient-accent); }
.gradient-text { background: var(--gradient-primary); background-clip: text; -webkit-background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.gradient-text-accent { background: var(--gradient-accent); background-clip: text; -webkit-background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
.glow-primary { box-shadow: 0 0 24px rgba(166,237,28,.24), 0 0 70px rgba(166,237,28,.10); }
.muted { color: var(--muted); font-size: 13px; }
.eyebrow { display: inline-block; color: var(--lime-deep); font-size: 10px; font-weight: 800; letter-spacing: 1.45px; line-height: 1.3; text-transform: uppercase; }

/* Buttons and controls */
.button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; border: 1px solid transparent; border-radius: 12px; padding: 10px 15px; color: var(--ink); font-size: 13px; font-weight: 750; text-decoration: none; isolation: isolate; transform: translateZ(0); transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, filter .2s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0) scale(.985); }
.button.primary { background: var(--gradient-primary); color: #17200d; box-shadow: 0 8px 22px rgba(129,199,12,.18); }
.button.primary:hover { box-shadow: 0 12px 28px rgba(129,199,12,.28); }
.button.ghost { background: var(--surface-solid); border-color: var(--line); color: var(--ink); }
.button.ghost:hover { border-color: rgba(166,237,28,.65); background: var(--lime-soft); }
.button.danger { background: rgba(234,91,101,.10); color: var(--danger); }
.button.secondary { background: var(--surface-muted); color: var(--ink); }
.button-lg { min-height: 50px; padding: 13px 18px; font-size: 14px; }
.button-arrow { font-size: 17px; line-height: 1; }
.icon-button { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: 18px; transition: background .2s ease, color .2s ease, transform .2s ease; }
.icon-button:hover { background: var(--surface-muted); color: var(--lime-deep); }
.icon-button:active { transform: scale(.94); }
.mobile-only { display: none; }
.input, .select, textarea, .form-stack input { width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; outline: 0; background: var(--surface-solid); color: var(--ink); padding: 11px 13px; transition: border .2s ease, box-shadow .2s ease, background .2s ease; }
.input::placeholder, textarea::placeholder, .form-stack input::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, textarea:focus, .form-stack input:focus { border-color: var(--lime-deep); box-shadow: 0 0 0 4px rgba(166,237,28,.16); }
textarea { min-height: 100px; resize: vertical; }

/* Public landing shell */
.public-shell { min-height: 100vh; background: var(--paper); }
.public-topbar { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; gap: 22px; min-height: 68px; padding: 0 clamp(18px, 5vw, 72px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 78%, transparent); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.public-brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; color: var(--ink); font-size: 19px; font-weight: 800; letter-spacing: -.7px; text-decoration: none; }
.brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--lime); color: #18200d; font-size: 11px; font-weight: 900; letter-spacing: -.4px; }
.brand-logo-image { display: block; width: 34px; height: 34px; flex: 0 0 34px; object-fit: contain; object-position: center; }
.login-brand .brand-logo-image { width: 42px; height: 42px; flex-basis: 42px; }
.sidebar-brand .brand-logo-image { width: 34px; height: 34px; flex-basis: 34px; }
.public-links { display: flex; align-items: center; justify-content: center; gap: 2px; flex: 1; }
.public-links a { position: relative; border-radius: 10px; padding: 9px 11px; color: var(--muted); font-size: 12px; font-weight: 600; text-decoration: none; transition: color .2s ease, background .2s ease; }
.public-links a:hover, .public-links a.active { background: rgba(166,237,28,.10); color: var(--ink); }
.public-links a.active::after { content: ''; position: absolute; right: 11px; bottom: 4px; left: 11px; height: 2px; border-radius: 10px; background: var(--lime); }
.public-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.public-login-link { display: inline-flex; min-height: 38px; flex: 0 0 auto; padding: 9px 13px; white-space: nowrap; }
.public-user-link { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; max-width: 190px; flex: 0 0 auto; padding: 6px 11px 6px 7px; overflow: hidden; white-space: nowrap; }
.public-user-link #public-user-name { overflow: hidden; text-overflow: ellipsis; }
.public-user-avatar { display: inline-grid; width: 25px; height: 25px; flex: 0 0 25px; place-items: center; border-radius: 50%; background: var(--lime); color: #10130d; font-size: 11px; font-weight: 900; }
.public-stage { min-height: 100vh; padding: 0; }

/* Landing page content generated by app.js */
.landing-page { overflow: hidden; }

/* Homepage motion system — viewport reveal without transforming the fixed shell/widgets. */
.landing-page.homepage-motion-ready [data-reveal],
.landing-page.homepage-motion-ready [data-reveal-group] > * {
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(.985);
  transition: opacity .72s cubic-bezier(.22,.61,.36,1), transform .72s cubic-bezier(.22,.61,.36,1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
.landing-page.homepage-motion-ready [data-reveal="hero"] { transform: translate3d(0, 16px, 0) scale(.992); }
.landing-page.homepage-motion-ready [data-reveal].is-revealed,
.landing-page.homepage-motion-ready [data-reveal-group].is-revealed > * {
  opacity: 1;
  transform: none;
}
.landing-page.homepage-motion-ready [data-reveal-group] > :nth-child(1) { transition-delay: 70ms; }
.landing-page.homepage-motion-ready [data-reveal-group] > :nth-child(2) { transition-delay: 140ms; }
.landing-page.homepage-motion-ready [data-reveal-group] > :nth-child(3) { transition-delay: 210ms; }
.landing-page.homepage-motion-ready [data-reveal-group] > :nth-child(4) { transition-delay: 280ms; }
.landing-page.homepage-motion-ready [data-reveal-group] > :nth-child(5) { transition-delay: 350ms; }
.landing-page.homepage-motion-ready [data-reveal-group] > :nth-child(6) { transition-delay: 420ms; }
.landing-page .hero-ambient { animation: homepageAmbientFloat 14s ease-in-out infinite alternate; }
.landing-page .hero-ambient.two { animation-delay: -5s; animation-duration: 17s; }
.landing-page .hero-image { animation: homepageImageDrift 18s ease-in-out infinite alternate; }
.landing-page .hero-image.two { animation-delay: -4s; animation-duration: 21s; }
.landing-page .hero-image.three { animation-delay: -8s; animation-duration: 19s; }
.landing-page .hero-image.four { animation-delay: -12s; animation-duration: 23s; }
@keyframes homepageAmbientFloat {
  from { transform: translate3d(-14px, -10px, 0) scale(.96); }
  to { transform: translate3d(18px, 14px, 0) scale(1.08); }
}
@keyframes homepageImageDrift {
  from { background-position: 48% 46%; transform: scale(1.015); }
  to { background-position: 53% 54%; transform: scale(1.045); }
}
.landing-hero { position: relative; display: flex; min-height: 780px; flex-direction: column; align-items: center; justify-content: center; gap: 34px; overflow: hidden; padding: 120px 24px 84px; isolation: isolate; }
.landing-hero::after { position: absolute; inset: 0; z-index: 2; background: radial-gradient(120% 100% at 50% 28%, color-mix(in srgb, var(--paper) 55%, transparent) 20%, color-mix(in srgb, var(--paper) 18%, transparent) 58%, color-mix(in srgb, var(--paper) 88%, transparent) 100%); content: ''; pointer-events: none; }
.hero-ambient { position: absolute; z-index: 1; width: 420px; height: 420px; border-radius: 50%; opacity: .24; filter: blur(64px); pointer-events: none; }
.hero-ambient.one { top: 7%; left: 16%; background: var(--lime); }
.hero-ambient.two { right: 15%; bottom: 8%; background: var(--teal); }
.hero-collage { position: absolute; inset: 68px 18px 14px; z-index: 0; display: grid; grid-template: repeat(12, 1fr) / repeat(2, 1fr); gap: 14px; opacity: .42; }
.hero-image { position: relative; overflow: hidden; min-height: 80px; border: 1px solid var(--glass-border); border-radius: 22px; background-size: cover; background-position: center; box-shadow: var(--shadow); filter: contrast(1.06) saturate(1.08); }
.hero-image::after { position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(10,15,10,.16)); content: ''; }
.hero-image.one { grid-row: 1 / span 5; }
.hero-image.two { grid-row: 1 / span 7; }
.hero-image.three { grid-row: 6 / span 7; }
.hero-image.four { grid-row: 8 / span 5; }
.hero-content { position: relative; z-index: 3; width: min(820px, 100%); padding: 36px 44px 34px; border-radius: 28px; text-align: center; }
.hero-content h1 { margin: 12px auto 15px; max-width: 720px; color: var(--ink); font-size: clamp(38px, 6vw, 76px); font-weight: 760; letter-spacing: -3.6px; line-height: 1.01; }
.hero-content h1 em { font-style: normal; }
.hero-content p { max-width: 650px; margin: 0 auto; color: var(--ink-2); font-size: 15px; font-weight: 430; letter-spacing: -.1px; line-height: 1.65; }
.hero-content .eyebrow { letter-spacing: 1.75px; }
.hero-content .public-branch-chip { margin-top: 23px; }
.public-branch-chip { display: inline-flex; align-items: baseline; gap: 9px; max-width: min(420px, 100%); margin: 20px auto 0; padding: 11px 22px; border: 1px solid var(--line-strong); border-radius: 999px; background: color-mix(in srgb, var(--surface-solid) 72%, transparent); box-shadow: 0 8px 22px rgba(0,0,0,.14); text-align: center; }
.public-branch-chip-label { color: var(--ink-2); font-size: 11.5px; font-weight: 800; letter-spacing: 1.4px; line-height: 1.3; text-transform: uppercase; }
.public-branch-chip-name { overflow: hidden; color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -.2px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
/* Session 99 — branch selector moved into the public topbar, left of theme toggle and login. */
.public-topbar-branch-picker { display: inline-flex; align-items: center; margin: 0; }
.public-topbar-branch-picker .select { width: auto; max-width: 252px; min-width: 132px; min-height: 38px; padding: 8px 30px 8px 12px; border-radius: 11px; font-size: 12.5px; font-weight: 700; letter-spacing: -.1px; white-space: nowrap; }
.course-grid { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(2, minmax(230px, 292px)); gap: 20px; }
.course-card { cursor: pointer; min-height: 190px; padding: 25px 22px 22px; border-radius: 24px; text-align: center; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease, background .35s ease; }
.course-card:hover { transform: translateY(-7px); border-color: rgba(166,237,28,.55); background: color-mix(in srgb, var(--landing-card-bg) 86%, var(--lime-soft) 14%); box-shadow: 0 22px 54px rgba(0,0,0,.28); }
.course-icon { position: relative; display: grid; place-items: center; width: 176px; height: 112px; margin: 0 auto 16px; overflow: visible; background: transparent; border: 0; border-radius: 21px; box-shadow: none; transition: transform .35s ease; }
.course-icon::after { content: none; }
.course-icon.bike, .course-icon.car { background: transparent; color: inherit; }
.course-logo-image { display: block; width: 100%; height: 100%; box-sizing: border-box; padding: 0; border-radius: 21px; object-fit: contain; object-position: center; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 8px 14px rgba(0,0,0,.22)); }
.course-icon-svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 4.4; stroke-linecap: round; stroke-linejoin: round; }
.course-icon.bike { color: var(--lime-deep); }
.course-icon.car { color: var(--teal); }
.course-card:hover .course-icon, .course-detail-card:hover .course-icon { transform: translateY(-3px) scale(1.035); }
.course-card h3 { margin: 0 0 7px; font-size: 19px; font-weight: 720; letter-spacing: -.4px; }
.course-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.course-card .course-link { display: block; margin-top: 15px; color: var(--lime-deep); font-size: 11px; font-weight: 760; letter-spacing: .15px; }
.stats-row { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 14px; width: min(780px, 100%); }
.landing-stat { min-height: 126px; padding: 18px 14px 16px; border-radius: 19px; text-align: center; }
  .landing-stat .stat-icon { display: grid; place-items: center; width: 64px; height: 56px; margin: 0 auto 8px; border: 0; border-radius: 0; background: transparent; color: inherit; font-size: 18px; }
  .stat-logo-image { display: block; width: 64px; height: 56px; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; user-select: none; -webkit-user-drag: none; filter: drop-shadow(0 7px 10px rgba(0,0,0,.22)); }

.landing-stat strong { display: block; color: var(--lime-deep); font-size: 25px; font-weight: 760; letter-spacing: -.7px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.landing-stat span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; font-weight: 520; letter-spacing: .05px; }
.landing-section { position: relative; padding: 96px 24px; scroll-margin-top: 76px; }
.landing-section.alt { background: color-mix(in srgb, var(--surface-muted) 64%, transparent); }
.section-container { width: min(1120px, 100%); margin: 0 auto; }
.section-heading { max-width: 710px; margin: 0 auto 44px; text-align: center; }
.section-heading h2 { margin: 8px 0 10px; color: var(--ink); font-size: clamp(30px, 4vw, 44px); letter-spacing: -1.8px; line-height: 1.04; }
.section-heading p { margin: 0 auto; color: var(--muted); font-size: 15px; line-height: 1.65; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.feature-card { padding: 26px 22px; border-radius: 20px; text-align: center; transition: transform .25s ease, border-color .25s ease; }
.feature-card:hover { transform: translateY(-5px); border-color: rgba(166,237,28,.45); }
.feature-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 17px; background: var(--gradient-primary); color: #17200d; font-size: 23px; }
.feature-card h3, .service-card h3 { margin: 0 0 7px; font-size: 17px; }
.feature-card p, .service-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.course-section-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.course-detail-card { padding: 26px; border-radius: 22px; }
.course-detail-head { display: flex; align-items: center; gap: 13px; margin-bottom: 18px; }
.course-detail-head .course-icon { flex: 0 0 118px; width: 118px; height: 76px; margin: 0; border-radius: 22px; }
.course-detail-head .course-logo-image { border-radius: 22px; }
.course-detail-head h3 { margin: 0; font-size: 20px; }
.course-detail-item { padding: 14px 0; border-top: 1px solid var(--line); }
.course-detail-item > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.course-detail-item b { font-size: 14px; }
.price-pill { border-radius: 99px; padding: 5px 10px; background: var(--lime-soft); color: var(--lime-deep); font-size: 11px; font-weight: 800; white-space: nowrap; }
.course-detail-item p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.service-card { padding: 23px 18px; border-radius: 20px; text-align: center; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gallery-card { position: relative; min-height: 230px; overflow: hidden; border-radius: 20px; }
.gallery-card.featured { grid-column: span 2; grid-row: span 2; min-height: 480px; }
.gallery-media-stage { position: absolute; inset: 0; overflow: hidden; background: var(--surface-muted); }
.gallery-card img { display: block; width: 100%; height: 100%; min-height: 230px; object-fit: cover; transition: transform .5s ease; }
.gallery-media-stage img { position: absolute; inset: 0; min-height: 0; will-change: opacity, transform; }
.gallery-media-stage .gallery-image-current { opacity: 1; transform: scale(1.015); transition: opacity .9s cubic-bezier(.22,.61,.36,1), transform 5s cubic-bezier(.22,.61,.36,1); }
.gallery-media-stage .gallery-image-next { opacity: 0; transform: scale(1.065); transition: opacity .95s cubic-bezier(.22,.61,.36,1), transform 1.35s cubic-bezier(.22,.61,.36,1); }
.gallery-media-stage .gallery-image-next.is-visible { opacity: 1; transform: scale(1.015); }
.gallery-card:hover .gallery-media-stage .gallery-image-current { transform: scale(1.06); }
.gallery-card:hover .gallery-media-stage .gallery-image-next.is-visible { transform: scale(1.06); }
.gallery-card::after { position: absolute; inset: 38% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.68)); content: ''; pointer-events: none; }
.gallery-caption { position: absolute; right: 18px; bottom: 15px; left: 18px; z-index: 1; color: #fff; font-size: 13px; font-weight: 700; }
.documents-list { display: grid; max-width: 780px; margin: 0 auto; gap: 13px; }
.document-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 17px; text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.document-card:hover { transform: translateX(5px); border-color: rgba(166,237,28,.55); }
.document-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 14px; background: var(--gradient-primary); color: #17200d; }
.document-copy { min-width: 0; flex: 1; }
.document-copy b, .document-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.document-copy b { font-size: 14px; }
.document-copy span { margin-top: 3px; color: var(--muted); font-size: 12px; }
.document-arrow { color: var(--lime-deep); font-size: 20px; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-card { display: flex; align-items: flex-start; gap: 13px; padding: 20px; border-radius: 18px; }
.contact-card .contact-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 13px; background: var(--lime-soft); color: var(--lime-deep); }
.contact-card b, .contact-card span { display: block; }
.contact-card b { margin-bottom: 4px; font-size: 14px; }
.contact-card span, .contact-card a { color: var(--muted); font-size: 13px; text-decoration: none; }
.landing-footer { padding: 30px 24px 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; text-align: center; }
.course-modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(5,8,6,.55); backdrop-filter: blur(8px); }
.course-modal { width: min(520px, 100%); max-height: min(650px, 90vh); overflow-y: auto; padding: 26px; border-radius: 24px; }
.course-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.course-modal-head h3 { margin: 0; font-size: 21px; }
.course-modal .course-detail-item:last-child { padding-bottom: 0; }
.floating-actions { position: fixed; right: 24px; bottom: 24px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.floating-action { display: grid; place-items: center; width: 56px; height: 56px; border: 0; border-radius: 50%; color: #17200d; font-size: 22px; box-shadow: 0 12px 28px rgba(30,50,20,.20); transition: transform .25s ease, box-shadow .25s ease; }
.floating-icon { display: block; width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.floating-action:hover { transform: scale(1.10); box-shadow: 0 16px 36px rgba(30,50,20,.28); }
.widget-panel { position: fixed; right: 24px; bottom: 160px; z-index: 61; width: min(340px, calc(100vw - 28px)); overflow: hidden; border-radius: 20px; }
.widget-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: var(--gradient-primary); color: #17200d; font-size: 14px; font-weight: 800; }
.widget-header .icon-button { width: 28px; height: 28px; color: #17200d; }
.widget-body { display: grid; gap: 11px; padding: 18px; background: var(--surface-solid); }
.widget-body p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.widget-messages { display: grid; max-height: 270px; gap: 8px; overflow-y: auto; padding: 14px; background: var(--surface-muted); }
.widget-message { max-width: 78%; border-radius: 16px 16px 16px 4px; padding: 9px 11px; background: var(--surface-solid); color: var(--ink); font-size: 12px; line-height: 1.4; box-shadow: var(--shadow-sm); }
.widget-message.me { margin-left: auto; border-radius: 16px 16px 4px 16px; background: var(--gradient-primary); color: #17200d; }
.widget-composer { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface-solid); }
.widget-composer .input { min-width: 0; }

/* Authenticated dashboard shell */
.app-shell { display: flex; min-height: 100vh; background: var(--paper); background-image: radial-gradient(circle, color-mix(in srgb, var(--ink) 10%, transparent) 1px, transparent 1px); background-size: 24px 24px; }
.sidebar { position: sticky; top: 0; z-index: 50; display: flex; width: 260px; height: 100vh; flex: 0 0 260px; flex-direction: column; overflow: hidden; padding: 22px 13px 14px; background: var(--gradient-sidebar); color: var(--sidebar-ink); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 0 9px 23px; }
.sidebar-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--sidebar-ink); font-size: 19px; font-weight: 800; letter-spacing: -.7px; text-decoration: none; }
.sidebar-close { color: var(--sidebar-ink); }
.branch-chip { display: flex; align-items: center; gap: 7px; margin: 0 9px 10px; color: var(--sidebar-muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(166,237,28,.08); }
.role-chip { width: max-content; margin: 0 9px 20px; border-radius: 99px; padding: 5px 11px; background: var(--gradient-primary); color: #17200d; font-size: 10px; font-weight: 850; letter-spacing: .75px; }
.nav-menu { min-height: 0; display: grid; flex: 1; align-content: start; gap: 4px; overflow-y: auto; padding: 2px 0; scrollbar-color: rgba(255,255,255,.22) transparent; scrollbar-width: thin; }
.nav-menu a { display: flex; align-items: center; gap: 11px; min-height: 43px; width: 100%; border: 1px solid transparent; border-radius: 12px; padding: 10px 11px; color: var(--sidebar-muted); font-size: 12px; font-weight: 550; line-height: 1.35; text-decoration: none; transition: background .2s ease, color .2s ease, border .2s ease, transform .2s ease; }
.nav-menu a:hover { transform: translateX(2px); background: var(--sidebar-active); color: var(--sidebar-ink); }
.nav-menu a.active { background: var(--gradient-primary); color: #17200d; font-weight: 800; box-shadow: 0 8px 18px rgba(0,0,0,.16); }
.nav-icon { display: grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px; color: currentColor; }
.nav-icon svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.nav-label { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: auto; border-radius: 99px; background: var(--danger); color: #fff; font-size: 10px; font-style: normal; font-weight: 800; }
.sidebar-footer { margin-top: auto; padding: 14px 0 0; border-top: 1px solid rgba(255,255,255,.09); }
.logout { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-radius: 12px; background: transparent; padding: 11px; color: var(--sidebar-muted); font-size: 12px; text-align: left; transition: background .2s ease, color .2s ease; }
.logout:hover { background: var(--sidebar-active); color: var(--sidebar-ink); }
.logout-icon { font-size: 17px; }
.sidebar-overlay { display: none; }
.main-stage { width: calc(100% - 260px); min-width: 0; min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; min-height: 68px; align-items: center; gap: 8px; padding: 0 clamp(20px, 3vw, 42px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 80%, transparent); backdrop-filter: blur(17px); -webkit-backdrop-filter: blur(17px); }
.topbar-context { display: grid; gap: 2px; min-width: 0; }
.topbar-context b { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.topbar-spacer { flex: 1; }
/* Session 100 — SUPERADMIN branch selector in the workspace topbar (left of theme toggle).
   Mirrors .public-topbar-branch-picker sizing so both shells stay visually in sync. */
.workspace-branch-picker { display: inline-flex; align-items: center; gap: 7px; margin: 0 2px; min-width: 0; }
.workspace-branch-label { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 1.3px; line-height: 1.2; text-transform: uppercase; }
.workspace-branch-picker .select { width: auto; max-width: 252px; min-width: 128px; min-height: 38px; padding: 8px 30px 8px 12px; border-radius: 11px; font-size: 12.5px; font-weight: 700; letter-spacing: -.1px; white-space: nowrap; }
.workspace-branch-picker .select:disabled { opacity: .6; cursor: not-allowed; }
.notification-wrap { position: relative; }
.notification-button { font-size: 17px; }
.notification-dot { position: absolute; top: 7px; right: 8px; width: 6px; height: 6px; border: 2px solid var(--surface-solid); border-radius: 50%; background: var(--danger); }
.notifications-panel { position: absolute; top: 49px; right: 0; z-index: 100; width: 300px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-solid); box-shadow: var(--shadow-lg); }
.notifications-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; border-bottom: 1px solid var(--line); font-size: 13px; }
.notifications-head .icon-button { width: 27px; height: 27px; }
.notifications-body { max-height: 360px; overflow-y: auto; padding: 6px; color: var(--muted); font-size: 12px; text-align: center; }
.notifications-body:empty::before { content: 'Chưa có thông báo mới.'; display: block; padding: 17px; }
.notifications-body p { padding: 17px; margin: 0; }

/* Bell icon (topbar) */
#notifications-toggle .bell-icon { width: 22px; height: 22px; fill: currentColor; stroke: none; transition: transform .25s ease; }
#notifications-toggle:hover .bell-icon { transform: rotate(8deg); }
#notifications-toggle.has-unread .bell-icon { animation: bell-ring 1.6s ease-in-out infinite; }
@keyframes bell-ring {
  0%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(12deg); }
  20%, 40% { transform: rotate(-12deg); }
  50% { transform: rotate(0); }
}
@media (prefers-reduced-motion: reduce) {
  #notifications-toggle.has-unread .bell-icon { animation: none; }
}

/* Notification list items */
.notification-item { display: flex; gap: 10px; width: 100%; align-items: flex-start; padding: 10px 12px; border: 0; border-radius: 11px; background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background .15s ease; position: relative; }
.notification-item + .notification-item { margin-top: 2px; }
.notification-item:hover, .notification-item:focus-visible { background: var(--surface-muted); outline: none; }
.notification-item-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--surface-muted); color: var(--muted); font-size: 13px; font-weight: 800; }
.notification-item.unread .notification-item-icon { background: var(--gradient-primary); color: #17200d; }
.notification-unread-dot { display: block; width: 8px; height: 8px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 2px rgba(255,59,48,.18); }
.notification-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.notification-item-body b { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notification-item.unread .notification-item-body b { color: var(--ink); }
.notification-item:not(.unread) .notification-item-body b { font-weight: 600; color: var(--muted); }
.notification-item-body small { font-size: 12px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notification-item.unread .notification-item-body small { color: var(--ink); }
.notification-item-time { font-size: 11px; color: var(--muted); opacity: .85; }
.notification-item.unread::before { content: ''; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gradient-primary); }
/* Session 101 — nhấp nháy nhấn mạnh thông báo mới nhất khi mở panel từ chuông */
.notification-item.notification-focus-flash { animation: notification-focus-flash 1.6s ease-out 1; }
@keyframes notification-focus-flash {
  0% { background: rgba(16, 185, 129, .22); box-shadow: 0 0 0 0 rgba(16, 185, 129, .45); }
  40% { background: rgba(16, 185, 129, .22); }
  100% { background: transparent; box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .notification-item.notification-focus-flash { animation: none; background: rgba(16, 185, 129, .22); }
}

/* Notification badge dot in topbar */
#notifications-toggle .notification-dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #ff3b30; color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--surface-solid, #fff); }
#notifications-toggle .notification-dot[hidden] { display: none !important; }
.notification-button { position: relative; }
.profile { display: flex; align-items: center; gap: 9px; border: 0; border-radius: 99px; background: transparent; padding: 4px 5px 4px 4px; color: var(--ink); text-align: left; transition: background .2s ease; }
.profile:hover { background: var(--surface-muted); }
.profile > span:first-child { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--gradient-primary); color: #17200d; font-size: 13px; font-weight: 850; }
.profile-copy { display: grid; gap: 2px; min-width: 78px; }
.profile-copy b { font-size: 12px; }
.profile-copy small { color: var(--muted); font-size: 9px; font-weight: 700; }
.profile-chevron { color: var(--muted); font-size: 15px; }
.page-root { width: min(1500px, 100%); margin: 0 auto; padding: clamp(24px, 4vw, 42px); }
#page-content.route-enter { animation: routeContentIn .24s ease both; }
@keyframes routeContentIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.page-heading h1 { margin: 6px 0 0; color: var(--ink); font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -1.4px; line-height: 1.05; }
.foundation-pill { border: 1px solid rgba(166,237,28,.45); border-radius: 99px; padding: 7px 11px; background: var(--lime-soft); color: var(--lime-deep); font-size: 10px; font-weight: 850; white-space: nowrap; }
.mobile-bottom-nav { display: none; }

/* Data screens */
.card { border: 1px solid var(--glass-border); border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 1px 0 rgba(255,255,255,.045), var(--shadow-sm); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.card-pad { padding: 24px; }
.grid { display: grid; gap: 18px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-card { position: relative; overflow: hidden; padding: 20px; transform: translateZ(0); transition: transform .24s cubic-bezier(.2,.8,.2,1), box-shadow .24s ease, border-color .24s ease; }
.stat-card:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--lime) 38%, var(--glass-border)); box-shadow: inset 0 1px 0 rgba(255,255,255,.07), var(--shadow); }
.stat-card::after { position: absolute; right: -30px; bottom: -46px; width: 120px; height: 120px; border-radius: 50%; background: rgba(166,237,28,.10); content: ''; }
.stat-card .stat-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: var(--lime-soft); color: var(--lime-deep); font-size: 18px; }
.stat-card strong { display: block; margin-top: 18px; color: var(--ink); font-size: 29px; font-weight: 800; letter-spacing: -1px; }
.stat-card span { color: var(--muted); font-size: 12px; }
.section-title { margin: 0 0 14px; color: var(--ink); font-size: 18px; font-weight: 750; letter-spacing: -.35px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .inputs { display: flex; gap: 10px; flex-wrap: wrap; }
.toolbar .input, .toolbar .select { min-width: 170px; }
.table-wrap { position: relative; overflow-x: auto; overflow-y: hidden; isolation: isolate; border: 1px solid var(--table-border); border-radius: 14px; background: var(--table-surface); background-clip: padding-box; box-shadow: inset 0 1px 0 var(--table-highlight), var(--table-shadow); transform: translateZ(0); }
.table-wrap::before { position: absolute; inset: 0; z-index: 1; border-radius: inherit; box-shadow: inset 0 1px 0 var(--table-highlight); content: ''; pointer-events: none; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--table-surface); color: var(--table-body-ink); font-size: 12px; font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1, 'lnum' 1; }
.data-table thead { background: var(--table-header); }
.data-table th { padding: 14px 15px; border-bottom: 1px solid var(--table-border); background: var(--table-header); color: var(--table-head-ink); font-size: 10px; font-weight: 800; letter-spacing: .55px; text-align: left; text-transform: uppercase; white-space: nowrap; }
.data-table thead th:first-child { border-top-left-radius: 13px; }
.data-table thead th:last-child { border-top-right-radius: 13px; }
.data-table td { padding: 15px; border-bottom: 1px solid var(--table-border); color: var(--table-body-ink); text-shadow: 0 1px 0 rgba(0,0,0,.12); white-space: nowrap; }
.data-table tbody tr { background: var(--table-surface); transition: background .2s ease, box-shadow .2s ease, transform .2s ease; }
.data-table tbody tr:nth-child(even) { background: var(--table-stripe); }
.data-table tbody tr:hover, .data-table tbody tr:focus-within { position: relative; z-index: 1; background: var(--table-hover); box-shadow: inset 3px 0 0 rgba(166,237,28,.7); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:last-child td:first-child { border-bottom-left-radius: 13px; }
.data-table tbody tr:last-child td:last-child { border-bottom-right-radius: 13px; }
.tag { display: inline-flex; align-items: center; border: 1px solid var(--table-border); border-radius: 99px; padding: 5px 9px; background: #f3f5f2; color: #677166; font-size: 10px; font-weight: 800; transition: transform .18s ease, border-color .18s ease, filter .18s ease; }
.tag:hover { transform: translateY(-1px); filter: brightness(1.06); }
.tag.green { border-color: #d5e6bd; background: #eaf4dc; color: #4e711d; }
.tag.amber { border-color: #f0ddb5; background: #fff3df; color: #926216; }
.tag.red { border-color: #f3cbd1; background: #fcebed; color: #ad3f4a; }
.tag.purple { border-color: #dfd3f2; background: #f1edfb; color: #7056a7; }
:root[data-theme="dark"] .tag { background: #252b2e; color: #b7c0b5; }
:root[data-theme="dark"] .tag.green { border-color: rgba(166,237,28,.22); background: rgba(166,237,28,.13); color: #bce574; }
:root[data-theme="dark"] .tag.amber { border-color: rgba(245,185,77,.24); background: rgba(245,185,77,.13); color: #f3ca7c; }
:root[data-theme="dark"] .tag.red { border-color: rgba(239,95,95,.25); background: rgba(239,95,95,.14); color: #f19aa1; }
:root[data-theme="dark"] .tag.purple { border-color: rgba(151,116,241,.27); background: rgba(151,116,241,.15); color: #bea7ef; }
/* Table content uses the same charcoal family as the sidebar in both themes. */
.table-wrap .tag { border-color: #3d4650; background: #2a3037; color: #c8d0ca; }
.table-wrap .tag.green { border-color: #49643a; background: #28351f; color: #bfe781; }
.table-wrap .tag.amber { border-color: #6b5734; background: #3b3020; color: #f0cc8d; }
.table-wrap .tag.red { border-color: #6d4149; background: #3a252b; color: #f1a1a8; }
.table-wrap .tag.purple { border-color: #5c4d79; background: #302843; color: #c7b1f2; }
.table-wrap .mini-button { border-color: #414954; background: #292f36; color: #e5eae5; }
.table-wrap .mini-button:hover { border-color: var(--lime); background: #323c27; color: #f2f7ee; }
.action-row { display: flex; align-items: center; gap: 7px; }
.mini-button { border: 1px solid var(--line); border-radius: 9px; background: var(--surface-solid); padding: 7px 9px; color: var(--ink-2); font-size: 11px; font-weight: 700; transform: translateZ(0); transition: transform .18s ease, border-color .18s ease, background .18s ease, color .18s ease; }
.mini-button:hover { transform: translateY(-1px); border-color: var(--lime-deep); }
.mini-button:active { transform: translateY(0) scale(.97); }
.mini-button.danger { border-color: rgba(239,95,95,.35); color: #c53535; }
.mini-button.warning { border-color: rgba(245,185,77,.40); color: #a66a00; }
.table-wrap .mini-button.danger { border-color: #6d4149; background: #3a252b; color: #f1a1a8; }
.table-wrap .mini-button.warning { border-color: #6b5734; background: #3b3020; color: #f0cc8d; }
.user-editor { margin: 18px 0; padding: 18px; }
.editor-motion { margin: 0; max-height: 0; overflow: clip; padding-top: 0; padding-bottom: 0; border-color: transparent; opacity: 0; transform: translateY(-8px) scale(.992); transition: max-height .32s cubic-bezier(.2,.8,.2,1), margin .32s cubic-bezier(.2,.8,.2,1), padding .32s cubic-bezier(.2,.8,.2,1), opacity .2s ease, transform .28s cubic-bezier(.2,.8,.2,1), border-color .2s ease; }
.editor-motion.is-open { margin: 18px 0; max-height: 980px; padding-top: 18px; padding-bottom: 18px; border-color: var(--glass-border); opacity: 1; transform: translateY(0) scale(1); }
.editor-motion.is-closing { pointer-events: none; }
.user-editor-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; max-width: 720px; }
.user-editor-fields .form-field { display: grid; gap: 6px; }
.user-editor-fields .form-field > span { color: var(--ink-2); font-size: 12px; font-weight: 750; }
.user-editor-fields .input, .user-editor-fields .select { min-height: 44px; }
.user-editor-table th, .user-editor-table td { min-width: 130px; vertical-align: top; }
.user-editor-table .input, .user-editor-table .select { width: 100%; min-width: 120px; }
.table-wrap:has(.lead-row) { overflow-x: auto; }
.table-wrap:has(.lead-row) .data-table { min-width: 1000px; table-layout: fixed; }
.table-wrap:has(.lead-row) .data-table th:nth-child(1), .table-wrap:has(.lead-row) .data-table td:nth-child(1) { width: 16%; }
.table-wrap:has(.lead-row) .data-table th:nth-child(2), .table-wrap:has(.lead-row) .data-table td:nth-child(2) { width: 14%; }
.table-wrap:has(.lead-row) .data-table th:nth-child(3), .table-wrap:has(.lead-row) .data-table td:nth-child(3) { width: 20%; }
.table-wrap:has(.lead-row) .data-table th:nth-child(4), .table-wrap:has(.lead-row) .data-table td:nth-child(4) { width: 15%; }
.table-wrap:has(.lead-row) .data-table th:nth-child(5), .table-wrap:has(.lead-row) .data-table td:nth-child(5) { width: 10%; }
.table-wrap:has(.lead-row) .data-table th:nth-child(6), .table-wrap:has(.lead-row) .data-table td:nth-child(6) { width: 25%; }
.table-wrap:has(.lead-row) .data-table th, .table-wrap:has(.lead-row) .data-table td { padding: 13px 16px; vertical-align: middle; }
.lead-name-cell b { display: block; overflow: hidden; text-overflow: ellipsis; }
.lead-name-cell small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .15px; }
.lead-phone-cell, .lead-date-cell { color: var(--table-body-ink); font-variant-numeric: tabular-nums; }
.lead-content-cell { max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap !important; line-height: 1.4; }
.lead-status-cell { white-space: nowrap !important; }
.lead-status-cell .tag { margin-right: 5px; padding: 4px 8px; vertical-align: middle; }
.table-wrap .lead-status-cell .tag.amber { border-color: #36393e; background: #2b2e32; color: #a8adb2; }
.table-wrap .lead-status-cell .tag.green { border-color: rgba(166,237,28,.38); background: rgba(166,237,28,.16); color: #b9ee62; }
.lead-note-toggle { padding: 4px 7px; border-radius: 7px; color: #929aa1; font-size: 10px; vertical-align: middle; }
.lead-note-toggle.is-open { border-color: var(--lime); color: var(--lime); }
.lead-actions-cell { white-space: nowrap !important; }
.lead-action-stack { display: flex; align-items: center; justify-content: flex-start; gap: 8px; }
.table-wrap .lead-status-select { width: 128px; min-width: 0; padding: 8px 28px 8px 11px; border-color: #414954; background: #242a31; color: #edf1ee; box-shadow: inset 0 1px 0 rgba(255,255,255,.035); font-size: 11px; font-weight: 750; }
.table-wrap .lead-status-select:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(166,237,28,.16); }
.table-wrap .lead-status-select:disabled { cursor: not-allowed; opacity: .72; }
.table-wrap .lead-status-select option { background: #242a31; color: #edf1ee; }
.lead-convert-button { min-width: auto; padding: 8px 11px; border-radius: 10px; white-space: nowrap; font-size: 11px; }
.lead-convert-icon { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.lead-converted-tag { white-space: nowrap; }
.lead-note-row td { padding: 0 !important; background: rgba(255,255,255,.018) !important; white-space: normal !important; }
.lead-note-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 16px; border-top: 1px solid rgba(255,255,255,.06); background: rgba(16,18,20,.72); }
.lead-note-panel > div:first-child { display: grid; gap: 3px; min-width: 130px; }
.lead-note-panel small { color: var(--muted); font-size: 10px; }
.lead-note-editor { display: flex; align-items: center; flex: 1; gap: 8px; max-width: 560px; }
.table-wrap .lead-note-input { min-width: 0; width: 100%; min-height: 42px; resize: vertical; line-height: 1.4; }
.lead-note-editor .mini-button { flex: 0 0 auto; }

.empty { display: grid; min-height: 260px; place-items: center; color: var(--muted); text-align: center; }
.empty .empty-icon { margin-bottom: 10px; color: var(--lime-deep); font-size: 34px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.form-field { display: grid; gap: 7px; color: var(--ink-2); font-size: 12px; font-weight: 700; }
.form-field.full { grid-column: 1 / -1; }
.form-field textarea { min-height: 95px; }
.cms-tabs { display: flex; gap: 8px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 3px; }
.cms-tabs button { border: 1px solid var(--line); border-radius: 99px; background: var(--surface-solid); padding: 8px 12px; color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.cms-tabs button:hover, .cms-tabs button.active { border-color: var(--lime); background: var(--lime-soft); color: var(--ink); }
.cms-branch-bar { display: flex; align-items: end; gap: 14px; margin: 18px 0; border: 1px solid var(--glass-border); border-radius: 16px; background: color-mix(in srgb, var(--surface-muted) 68%, transparent); padding: 14px 16px; }
.cms-branch-bar .form-field { width: min(380px, 100%); }
.cms-editor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; min-height: 220px; }
.cms-field { min-width: 0; }
.cms-field.full { grid-column: 1 / -1; }
.cms-field > span { display: grid; gap: 3px; }
.cms-field-key { color: var(--muted); font-size: 10px; font-weight: 500; letter-spacing: .1px; }
.cms-json-input { min-height: 180px; resize: vertical; font-family: var(--font-mono); font-size: 11px; line-height: 1.55; }
.cms-empty-state { display: grid; min-height: 220px; grid-column: 1 / -1; place-content: center; gap: 7px; border: 1px dashed var(--glass-border); border-radius: 17px; background: color-mix(in srgb, var(--surface-muted) 48%, transparent); padding: 28px; color: var(--muted); text-align: center; }
.cms-empty-state strong { color: var(--ink); font-size: 15px; }
.cms-empty-state p { margin: 0; font-size: 12px; }
.cms-gallery-manager { display: grid; gap: 14px; }
.cms-gallery-heading { display: grid; gap: 3px; color: var(--ink-2); font-size: 12px; font-weight: 800; }
.cms-gallery-upload { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 10px; border: 1px dashed color-mix(in srgb, var(--lime) 58%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--lime-soft) 46%, transparent); padding: 12px; }
.cms-gallery-file-button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; cursor: pointer; white-space: nowrap; }
.cms-gallery-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cms-gallery-item { min-width: 0; overflow: hidden; border: 1px solid var(--glass-border); border-radius: 14px; background: var(--surface-solid); box-shadow: var(--shadow-sm); }
.cms-gallery-item img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--surface-muted); }
.cms-gallery-item-body { display: grid; gap: 7px; padding: 10px; }
.cms-gallery-item-body small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.cms-gallery-item-body .mini-button { justify-self: start; }
.cms-gallery-empty { grid-column: 1 / -1; border: 1px dashed var(--glass-border); border-radius: 14px; padding: 22px; color: var(--muted); text-align: center; }
.cms-gallery-json { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
@media (max-width: 820px) { .cms-gallery-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cms-gallery-upload { grid-template-columns: 1fr; } }
@media (max-width: 540px) { .cms-gallery-items { grid-template-columns: 1fr; } }
/* Homepage theme picker (CMS key home.site.theme — Session 104). Theme 1 = skin hiện tại; theme 2 chờ code skin riêng. */
.cms-theme-manager { display: grid; gap: 14px; }
.cms-theme-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cms-theme-card { display: flex; align-items: center; gap: 13px; border: 1.5px solid var(--glass-border); border-radius: 15px; background: var(--surface-solid); padding: 13px; cursor: pointer; text-align: left; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.cms-theme-card:hover:not(:disabled) { border-color: color-mix(in srgb, var(--lime) 55%, var(--line)); transform: translateY(-1px); }
.cms-theme-card.is-selected { border-color: var(--lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 22%, transparent), var(--shadow-sm); }
.cms-theme-card:disabled { cursor: not-allowed; opacity: .62; }
.cms-theme-swatch { position: relative; display: grid; place-items: center; width: 74px; height: 52px; flex: 0 0 74px; overflow: hidden; border-radius: 11px; border: 1px solid var(--glass-border); background: var(--surface-muted); }
.cms-theme-swatch-theme-1 { background: linear-gradient(135deg, rgba(6,59,39,.86), rgba(10,83,56,.62)); }
.cms-theme-swatch-theme-2 { background: linear-gradient(135deg, rgba(58,64,88,.82), rgba(96,102,128,.55)); }
.cms-theme-swatch-hero { width: 34px; height: 12px; border-radius: 4px; background: rgba(255,255,255,.16); box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.cms-theme-swatch-chip { position: absolute; right: 7px; bottom: 6px; width: 16px; height: 7px; border-radius: 3px; background: var(--lime); opacity: .85; }
.cms-theme-copy { display: grid; min-width: 0; gap: 3px; }
.cms-theme-copy b { color: var(--ink); font-size: 12.5px; }
.cms-theme-copy span { color: var(--muted); font-size: 10.5px; line-height: 1.4; }
.cms-theme-check { display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; margin-left: auto; border-radius: 50%; background: var(--gradient-primary); color: #17200d; font-size: 11px; font-weight: 850; opacity: 0; transition: opacity .18s ease; }
.cms-theme-card.is-selected .cms-theme-check { opacity: 1; }
.cms-theme-badge { margin-left: auto; border: 1px solid rgba(245,158,11,.45); border-radius: 999px; background: rgba(245,158,11,.14); color: #b45309; padding: 3px 9px; font-size: 9.5px; font-weight: 800; white-space: nowrap; }
:root[data-theme="dark"] .cms-theme-badge { color: #fbbf24; }
@media (max-width: 540px) { .cms-theme-options { grid-template-columns: 1fr; } }
/* Theme 2 homepage skin hook: applyHomepageContent đặt body[data-home-theme="theme-2"] khi CMS chọn theme-2.
   Skin CSS của theme 2 sẽ được bổ sung trong session sau (scope gợi ý: body[data-home-theme="theme-2"] .landing-page …). */
.question-upload { margin-bottom: 18px; border: 1.5px dashed rgba(121,189,0,.55); border-radius: 17px; background: var(--lime-soft); padding: 22px; }
.question-upload b { color: var(--ink); }
.question-upload p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }

/* Chat screens */
.split-chat { display: grid; height: min(575px, calc(100vh - 190px)); min-height: 500px; max-height: calc(100vh - 150px); grid-template-columns: 310px minmax(0,1fr); overflow: hidden; border: 1px solid var(--glass-border); border-radius: var(--radius); background: var(--surface); box-shadow: inset 0 1px 0 rgba(255,255,255,.045), var(--shadow-sm); transform: translateZ(0); }
.chat-list { border-right: 1px solid var(--line); background: color-mix(in srgb, var(--surface-muted) 54%, transparent); }
.chat-list-head { padding: 19px; border-bottom: 1px solid var(--line); }
.chat-list-head b { color: var(--ink); font-size: 14px; }
.chat-contact { display: flex; align-items: center; gap: 11px; border-bottom: 1px solid var(--line); padding: 14px 17px; cursor: pointer; transition: background .18s ease; }
.chat-contact:hover, .chat-contact.selected { background: var(--lime-soft); }
.avatar { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 37px; border-radius: 50%; background: var(--gradient-primary); color: #17200d; font-size: 12px; font-weight: 850; }
.contact-meta { min-width: 0; }
.contact-meta b, .contact-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-meta b { color: var(--ink); font-size: 12px; }
.contact-meta small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.chat-window { display: flex; min-width: 0; min-height: 0; flex-direction: column; background: var(--surface-solid); }
.chat-window-head { min-height: 51px; display: flex; align-items: center; padding: 0 22px; border-bottom: 1px solid var(--line); color: var(--ink); font-size: 13px; font-weight: 800; }
.chat-contact .contact-meta { min-width: 0; flex: 1; }
.chat-contact > .tag { flex: 0 0 auto; }
.messages { display: grid; min-height: 0; flex: 1 1 auto; align-content: start; align-items: start; grid-auto-rows: max-content; gap: 11px; overflow-x: hidden; overflow-y: auto; padding: 22px; }
.message { justify-self: start; width: fit-content; min-width: 0; max-width: min(70%, 680px); max-height: 240px; overflow: hidden; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; border-radius: 16px 16px 16px 4px; background: var(--surface-muted); padding: 11px 13px; color: var(--ink); font-size: 13px; line-height: 1.45; }
.message.me { justify-self: end; margin-left: auto; border-radius: 16px 16px 4px 16px; background: var(--gradient-primary); color: #17200d; }
.message.is-long { overflow-y: auto; }
.message-body { min-width: 0; overflow-wrap: anywhere; word-break: break-word; white-space: pre-wrap; }
.message small { display: block; margin-top: 4px; opacity: .55; font-size: 9px; white-space: normal; }
.chat-composer { display: flex; gap: 8px; border-top: 1px solid var(--line); padding: 14px; }
.chat-composer .input { min-width: 0; flex: 1; }

/* Login */
.login-page { position: relative; display: grid; min-height: 100vh; grid-template-columns: minmax(360px, 470px) minmax(0, 1fr); gap: 0; overflow: hidden; background: var(--paper); isolation: isolate; }
.login-ambient { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.login-ambient span { position: absolute; width: 380px; height: 380px; border-radius: 50%; opacity: .17; filter: blur(80px); }
.login-ambient span:nth-child(1) { top: -150px; right: 33%; background: var(--lime); }
.login-ambient span:nth-child(2) { bottom: -180px; left: -70px; background: var(--teal); }
.login-ambient span:nth-child(3) { right: -100px; bottom: 10%; background: var(--blue); }
.login-panel { z-index: 2; width: min(420px, calc(100% - 48px)); margin: auto; border-radius: 26px; padding: 34px; }
.login-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 21px; font-weight: 800; text-decoration: none; }
.login-intro { margin-top: 48px; }
.login-intro h1 { margin: 10px 0 8px; color: var(--ink); font-size: 32px; letter-spacing: -1.4px; line-height: 1.05; }
.login-intro p { margin: 0; line-height: 1.55; }
.form-stack { display: grid; gap: 15px; margin: 28px 0 25px; }
.form-stack > label { display: grid; gap: 7px; color: var(--ink-2); font-size: 12px; font-weight: 750; }
.remember-login { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 9px !important; color: var(--muted) !important; font-size: 12px !important; font-weight: 650 !important; cursor: pointer; }
.remember-login input { width: 16px; height: 16px; margin: 0; accent-color: var(--lime-deep); }
.remember-login span { line-height: 1.35; }
.password-field { position: relative; }
.password-field input { padding-right: 43px; }
.password-toggle { position: absolute; top: 50%; right: 8px; width: 32px; height: 32px; transform: translateY(-50%); border: 0; border-radius: 9px; background: transparent; color: var(--muted); }
.password-toggle:hover { background: var(--surface-muted); color: var(--lime-deep); }
.demo-accounts { padding-top: 20px; border-top: 1px solid var(--line); }
.demo-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.demo-heading strong, .demo-heading span { display: block; }
.demo-heading strong { color: var(--ink); font-size: 13px; }
.demo-heading span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.password-hint { text-align: right; }
.password-hint b { color: var(--ink-2); font-family: var(--font-mono); font-size: 10px; }
.account-grid { display: grid; max-height: 280px; gap: 7px; overflow-y: auto; padding-right: 2px; }
.account-grid button { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); border-radius: 13px; background: color-mix(in srgb, var(--surface-solid) 72%, transparent); padding: 9px 10px; color: var(--ink); text-align: left; transition: border .2s ease, background .2s ease, transform .2s ease; }
.account-grid button:hover { transform: translateX(3px); border-color: rgba(166,237,28,.65); background: var(--lime-soft); }
.account-grid button > span:nth-child(2) { min-width: 0; flex: 1; }
.account-grid b, .account-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-grid b { font-size: 11px; }
.account-grid small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.account-grid i { color: var(--muted); font-size: 15px; font-style: normal; }
.account-avatar { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 10px; font-size: 9px; font-weight: 900; }
.account-avatar.lime { background: var(--gradient-primary); color: #17200d; }
.account-avatar.amber { background: #ffd889; color: #705000; }
.account-avatar.teal { background: var(--gradient-accent); color: #07392e; }
.account-avatar.blue { background: #8fd0f1; color: #124464; }
.login-visual { position: relative; display: grid; min-height: 100vh; place-items: center; overflow: hidden; background-color: #090a0c; background-image: radial-gradient(circle at 1px 1px, rgba(225,232,241,.16) 1px, transparent 1.15px); background-size: 22px 22px; color: #f7f9fc; }
.login-visual-art { position: absolute; inset: 0; background: radial-gradient(circle at 58% 25%, rgba(166,237,28,.13), transparent 22%), radial-gradient(circle at 30% 78%, rgba(85,217,164,.06), transparent 30%); filter: none; }
.login-visual-copy { position: relative; width: min(480px, calc(100% - 80px)); z-index: 1; }
.login-visual-copy .eyebrow { color: var(--lime); }
.login-visual-copy h2 { margin: 13px 0 17px; color: #fff; font-size: clamp(45px, 5vw, 72px); letter-spacing: -4px; line-height: .96; }
.login-visual-copy h2 em { color: var(--lime); font-style: normal; }
.login-visual-copy p { max-width: 310px; color: rgba(244,248,252,.82); font-size: 15px; line-height: 1.55; }
.visual-metric { display: flex; align-items: baseline; gap: 10px; margin-top: 38px; color: rgba(244,248,252,.76); font-size: 11px; }
.visual-metric b { color: var(--lime); font-size: 22px; }

@media (max-width: 1160px) {
  .public-topbar { padding-inline: 24px; }
  .public-links a { padding-inline: 8px; font-size: 11px; }
  .login-page { grid-template-columns: minmax(350px, 430px) minmax(0,1fr); }
  .grid.stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 980px) {
  .mobile-only { display: inline-grid; }
  .public-links { position: absolute; top: 68px; right: 16px; left: 16px; display: none; flex-direction: column; align-items: stretch; gap: 2px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-solid); padding: 8px; box-shadow: var(--shadow-lg); }
  .public-links.open { display: flex; }
  .public-links a.active::after { display: none; }
  .public-links a { padding: 11px 12px; }
  .public-login-link, .public-user-link { min-height: 36px; padding: 7px 9px; font-size: 11px; }
  .public-user-link { max-width: 145px; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); transition: transform .3s ease; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 40; display: none; background: rgba(5,8,6,.42); backdrop-filter: blur(4px); }
  .sidebar-overlay.open { display: block; }
  .main-stage { width: 100%; }
  .topbar { padding-inline: 18px; }
  .page-root { padding: 25px 20px 90px; }
  .mobile-bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 35; display: flex; min-height: 63px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 88%, transparent); backdrop-filter: blur(15px); }
  .mobile-bottom-nav a { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 7px 3px; color: var(--muted); font-size: 9px; font-weight: 650; text-decoration: none; }
  .mobile-bottom-nav a.active { color: var(--lime-deep); }
  .mobile-bottom-nav .mobile-nav-icon { font-size: 17px; line-height: 1; }
  .login-page { display: block; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; width: min(520px, calc(100% - 32px)); padding-top: 42px; }
  .landing-hero { min-height: 740px; }
}
@media (max-width: 680px) {
  .public-topbar { min-height: 62px; padding-inline: 14px; }
  .public-brand { font-size: 17px; }
  .public-topbar .brand-logo-image { width: 29px; height: 29px; flex-basis: 29px; }
  .login-brand .brand-logo-image { width: 38px; height: 38px; flex-basis: 38px; }
  .sidebar-brand .brand-logo-image { width: 31px; height: 31px; flex-basis: 31px; }
  .landing-hero { min-height: 760px; gap: 23px; padding: 110px 16px 60px; }
  .hero-collage { inset: 62px 10px 10px; gap: 8px; opacity: .22; }
  .hero-image { border-radius: 14px; }
  .hero-content { padding: 15px 9px; }
  .hero-content h1 { font-size: clamp(37px, 12vw, 58px); letter-spacing: -2.7px; }
  .hero-content p { font-size: 13px; }
  .course-grid { width: 100%; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .course-card { padding: 17px 10px; border-radius: 18px; }
  .course-icon { width: 80px; height: 80px; border-radius: 18px; }
  .course-card h3 { font-size: 15px; }
  .course-card p { font-size: 10px; }
  .stats-row { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .landing-stat { padding: 13px 8px; }
  .landing-stat strong { font-size: 21px; }
  .landing-section { padding: 72px 16px; }
  .feature-grid, .course-section-grid, .service-grid, .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
  .gallery-card, .gallery-card.featured { grid-column: span 1; grid-row: span 1; min-height: 180px; }
  .gallery-card img { min-height: 180px; }
  .gallery-card.featured { grid-column: span 2; }
  .floating-actions { right: 14px; bottom: 78px; gap: 9px; }
  .floating-action { width: 49px; height: 49px; font-size: 18px; }
  .widget-panel { right: 14px; bottom: 138px; }
  .profile-copy, .profile-chevron { display: none; }
  .page-heading { align-items: flex-end; flex-wrap: wrap; gap: 10px; }
  .page-heading h1 { font-size: 22px; }
  .page-heading > div { min-width: 0; flex: 1 1 100%; }
  .foundation-pill { padding: 5px 8px; font-size: 9px; }
  .grid.stats { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card strong { margin-top: 13px; font-size: 24px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .split-chat { height: min(680px, calc(100vh - 150px)); min-height: 500px; grid-template-columns: 1fr; }
  .chat-list { max-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); overflow-y: auto; }
  /* Compact chat-contact rows on mobile so name + preview stay readable. */
  .chat-contact { gap: 9px; padding: 11px 13px; }
  .chat-contact .avatar { width: 30px; height: 30px; flex: 0 0 30px; font-size: 11px; }
  .chat-contact .contact-meta { min-width: 0; flex: 1 1 auto; }
  .chat-contact .contact-meta b { font-size: 12px; }
  .chat-contact .contact-meta small { font-size: 10px; }
  .chat-contact > .tag { flex: 0 0 auto; padding: 3px 7px; font-size: 9px; }
  /* Session 95 — compact chat paddings on phones: card padding 24 -> 14px,
     message area 22 -> 14px so bubbles get real room inside the stacked
     1-column layout; composer stays fully visible above the bottom nav. */
  .card-pad { padding: 14px; }
  .chat-list-head { padding: 13px 14px 11px; }
  .chat-window-head { padding: 0 14px; }
  .messages { padding: 14px; gap: 9px; }
  .chat-composer { padding: 10px 12px; gap: 7px; }
  .chat-compose-row .file-button { width: 34px; height: 34px; flex: 0 0 34px; font-size: 14px; }
  .chat-compose-row .button { padding-inline: 14px; }
  .chat-attachment.is-missing { min-width: 0; }
  .chat-window { scroll-margin-top: 64px; }
  .message { max-width: 88%; }
  .data-table { min-width: 700px; }
  /* Horizontal-scroll hint on table-wrap so users see there's more content. */
  .table-wrap { position: relative; }
  .table-wrap::after { position: absolute; top: 0; right: 0; bottom: 0; z-index: 2; width: 28px; pointer-events: none; content: ''; background: linear-gradient(to left, var(--table-surface) 12%, transparent); opacity: .9; }
  /* Topbar on mobile: shrink context b (function name) and hide eyebrow to save space. */
  .topbar { min-height: 56px; padding-inline: 14px; gap: 6px; }
  .topbar-context { min-width: 0; flex: 1 1 auto; }
  .topbar-context .eyebrow { display: none; }
  .topbar-context b { font-size: 13px; }
  /* Notification/profile icons slightly smaller on mobile. */
  .topbar .icon-button { width: 38px; height: 38px; }
  /* Session 100 — compact SUPERADMIN branch selector on mobile. */
  .workspace-branch-picker { gap: 5px; }
  .workspace-branch-picker .select { max-width: 138px; min-width: 96px; min-height: 36px; padding: 7px 26px 7px 10px; border-radius: 10px; font-size: 11px; }
  .workspace-branch-label { display: none; }
  .topbar .profile { padding: 4px 8px 4px 4px; gap: 6px; }
  .topbar .profile-copy { display: none; }
  .login-panel { width: min(100% - 24px, 520px); padding: 26px 15px 40px; }
  .login-intro { margin-top: 34px; }
  .login-intro h1 { font-size: 29px; }
  .demo-heading { align-items: flex-start; flex-direction: column; }
  .password-hint { text-align: left; }
}
@media (max-width: 480px) {
  /* On very narrow phones, hide the foundation-pill badge to give the title room. */
  .page-heading .foundation-pill { display: none; }
  /* On very narrow phones, hide the OPEN/CLOSED tag in chat-contact rows — the
     selected chat window head already shows the status, and the tag squeezes
     the name + preview too much on <= 360px viewports. */
  .chat-contact > .tag { display: none; }
}


/* Native hidden state must win over component display rules. */
[hidden] { display: none !important; }

/* Session 18 — branch-scoped internal chat and multi-file attachments */
.chat-compose-row { display: flex; width: 100%; align-items: center; gap: 8px; }
.chat-compose-row .input { min-width: 0; flex: 1; }
.file-button { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; cursor: pointer; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted); color: var(--ink); font-size: 16px; transition: border-color .18s ease, background .18s ease; }
.file-button:hover { border-color: var(--lime); background: var(--lime-soft); }
.file-preview { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.file-preview:empty { display: none; }
.file-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid var(--line); border-radius: 99px; padding: 4px 8px; background: var(--surface-muted); color: var(--muted); font-size: 10px; }
.file-chip small { margin-left: 4px; opacity: .75; }
.chat-attachment { display: flex; align-items: center; gap: 8px; min-width: min(180px, 100%); max-width: 100%; margin-top: 8px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ink) 13%, transparent); border-radius: 10px; padding: 7px 8px; background: color-mix(in srgb, var(--surface-solid) 82%, transparent); color: inherit; text-align: left; text-decoration: none; }
button.chat-attachment { width: 100%; font: inherit; cursor: pointer; }
.chat-attachment:hover { border-color: var(--teal); }
.chat-attachment > span:last-child { min-width: 0; }
.chat-attachment b, .chat-attachment small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-attachment b { font-size: 11px; }
.chat-attachment small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.attachment-icon { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 8px; background: var(--teal-soft); color: var(--teal); }
.internal-chat-shell { position: relative; overflow: visible; }
.chat-attachment.image { display: block; min-width: 0; padding: 5px; }
.chat-attachment.image img { display: block; width: min(260px, 100%); max-height: 220px; object-fit: cover; border-radius: 7px; }
.chat-attachment.image > span:last-child { display: block; padding: 6px 3px 1px; }
.chat-attachment.media-attachment { display: block; width: min(270px, 100%); min-width: 0; margin-top: 7px; padding: 0; overflow: visible; border: 0; border-radius: 14px; background: transparent; box-shadow: none; }
.chat-attachment.media-attachment:hover { border: 0; background: transparent; }
.chat-attachment.media-attachment:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.media-preview { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 14px; background: #11151a; box-shadow: 0 5px 14px rgba(0,0,0,.16); }
.media-preview img, .media-preview video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 0; }
.media-play-icon { position: absolute; top: 50%; left: 50%; display: grid; width: 42px; height: 42px; place-items: center; transform: translate(-50%, -50%); border: 1px solid rgba(255,255,255,.58); border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 17px; line-height: 1; pointer-events: none; }
.message.me .media-preview { box-shadow: 0 5px 14px rgba(0,0,0,.22); }
.message.me .chat-attachment.media-attachment { color: inherit; }
.chat-attachment.media-attachment .attachment-icon { display: none; }
.chat-attachment.is-missing { display: flex; min-width: min(180px, 100%); padding: 8px; }
.chat-attachment.is-missing::before { display: none; content: none; }
.attachment-missing { display: block; margin-bottom: 2px; color: var(--amber); font-size: 9px; }
.internal-user-picker { position: relative; z-index: 60; margin-top: 10px; }
.internal-user-search-field { display: block; }
.internal-user-search { width: 100%; }
.internal-user-picker-panel { position: absolute; top: calc(100% + 8px); right: 0; left: 0; z-index: 80; display: block; max-height: 310px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface-solid); box-shadow: var(--shadow-lg); }
.internal-user-picker-panel[hidden] { display: none; }
.internal-user-picker-panel #internal-user-list { max-height: 308px; overflow-y: auto; }
.internal-user { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; font: inherit; }
.internal-user:last-child { border-bottom: 0; }
.internal-user:hover, .internal-user:focus-visible { background: var(--teal-soft); }
.internal-user-loading { padding: 13px 15px; }
.chat-list { position: relative; z-index: 1; overflow: visible; }
.chat-open-icon { color: var(--teal); font-weight: 800; }
.attachment-viewer-backdrop { position: fixed; inset: 0; z-index: 200; display: grid; width: 100vw; height: 100dvh; place-items: center; padding: clamp(12px, 3vw, 32px); background: rgba(4,6,8,.84); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.attachment-viewer { display: grid; width: min(900px, 100%); max-height: calc(100dvh - 48px); overflow: hidden; border: 1px solid rgba(255,255,255,.18); border-radius: 20px; background: var(--surface-solid); box-shadow: 0 24px 80px rgba(0,0,0,.46); }
.attachment-viewer-close { width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-muted); color: var(--ink); font-size: 23px; line-height: 1; }
.attachment-viewer-close:hover { border-color: var(--lime); background: var(--lime-soft); color: var(--ink); }
.attachment-viewer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.attachment-viewer-head-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.attachment-viewer-icon-button { display: inline-grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-muted); color: var(--ink); text-decoration: none; transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease; }
.attachment-viewer-icon-button:hover, .attachment-viewer-icon-button:focus-visible { border-color: var(--lime); background: var(--lime-soft); color: var(--ink); transform: translateY(-1px); }
.attachment-viewer-icon-button svg { width: 18px; height: 18px; }
.attachment-info-icon { display: grid; width: 18px; height: 18px; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; font: 700 12px/1 Georgia, serif; }
.attachment-viewer-download { color: var(--lime); }
.attachment-viewer-head h3 { max-width: 620px; margin: 4px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.attachment-viewer-preview { display: grid; min-height: 240px; max-height: calc(100dvh - 210px); place-items: center; overflow: auto; padding: clamp(14px, 3vw, 28px); background: radial-gradient(circle at 50% 35%, rgba(166,237,28,.08), transparent 42%), color-mix(in srgb, var(--background) 82%, #000 18%); }
.attachment-viewer-image { display: block; max-width: 100%; max-height: calc(100dvh - 270px); object-fit: contain; border-radius: 12px; transform: scale(var(--attachment-image-zoom, 1)); transform-origin: center center; transition: transform .12s ease-out; user-select: none; }
.attachment-viewer-image[aria-label*="phóng"] { cursor: zoom-in; }
.attachment-viewer-video { display: block; width: min(100%, 780px); max-height: calc(100dvh - 270px); border-radius: 12px; background: #000; }
.attachment-viewer-frame { width: 100%; min-height: 430px; border: 0; border-radius: 10px; background: #fff; }
.attachment-viewer-text { width: 100%; max-height: 500px; margin: 0; overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-solid); padding: 16px; color: var(--ink); font: 12px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.attachment-viewer-file { display: grid; max-width: 430px; justify-items: center; gap: 9px; color: var(--ink); text-align: center; }
.attachment-viewer-file .attachment-icon { width: 54px; height: 54px; font-size: 23px; }
.attachment-viewer-file p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.attachment-viewer-info { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--surface-muted); }
.attachment-info-grid { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 7px 12px; font-size: 11px; }
.attachment-info-grid span { color: var(--muted); }
.attachment-info-grid b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-viewer-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 18px; border-top: 1px solid var(--line); }
@media (max-width: 700px) {
  .chat-attachment { min-width: 0; }
  .chat-attachment.media-attachment { width: min(230px, 100%); }
  .chat-attachment.image img { width: min(210px, 100%); }
  .file-chip { max-width: 100%; }
  .attachment-viewer-backdrop { padding: 10px; }
  .attachment-viewer { max-height: calc(100dvh - 20px); }
  .attachment-viewer-preview { max-height: 60dvh; min-height: 180px; padding: 12px; }
  .attachment-viewer-image, .attachment-viewer-video { max-height: 58dvh; }
  .attachment-viewer-actions { flex-wrap: wrap; }
  .attachment-viewer-head-actions { gap: 5px; }
  .attachment-viewer-icon-button, .attachment-viewer-close { width: 34px; height: 34px; flex-basis: 34px; }
}

.chat-list-divider { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 9px 17px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.form-field.compact { display: grid; gap: 5px; margin-top: 10px; }
.form-field.compact > span { color: var(--muted); font-size: 10px; font-weight: 750; }
.widget-composer { display: block; }
.widget-composer .chat-compose-row { display: flex; }
/* Session 19 — profile and password settings */
/* Topbar already has `position: sticky; top: 0;` (line ~347) and `backdrop-filter`
   which establishes a containing block for the absolutely-positioned profile-panel
   below — no need to override to `position: relative`. Keeping sticky means the
   top feature bar stays in place when the user scrolls, on both desktop and mobile. */
.profile-panel { position: absolute; top: calc(100% + 10px); right: 18px; z-index: 70; width: min(560px, calc(100vw - 36px)); max-height: calc(100vh - 92px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 18px; background: var(--surface-solid); box-shadow: var(--shadow-lg); padding: 20px; }
.profile-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.profile-panel-head h3 { margin: 4px 0 0; font-size: 21px; }
.profile-settings-form { display: grid; gap: 13px; }
.profile-settings-form h4 { margin: 0; font-size: 15px; }
.profile-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
.profile-settings-grid .input[readonly] { background: var(--surface-muted); color: var(--muted); }
.profile-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.form-status { min-height: 18px; color: var(--muted); font-size: 11px; }
.form-status.success { color: var(--success); }
.form-status.error { color: var(--danger); }
.profile-divider { height: 1px; margin: 20px 0; background: var(--line); }
@media (max-width: 680px) {
  .profile-panel { top: calc(100% + 7px); right: 10px; width: calc(100vw - 20px); padding: 15px; }
  .profile-settings-grid { grid-template-columns: 1fr; }
}

/* Session 27 — smooth feedback, async state and accessible confirmations */
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 160; display: grid; width: min(390px, calc(100vw - 32px)); gap: 9px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line-strong); border-left: 3px solid var(--lime); border-radius: 14px; padding: 12px 14px; background: color-mix(in srgb, var(--surface-solid) 92%, transparent); box-shadow: var(--shadow-lg); color: var(--ink); font-size: 12px; line-height: 1.45; opacity: 0; transform: translateY(10px) scale(.985); transition: opacity .22s ease, transform .22s ease; }
.toast.show { opacity: 1; transform: translateY(0) scale(1); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--amber); }
.toast-icon { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border-radius: 50%; background: var(--lime-soft); color: var(--lime-deep); font-size: 11px; font-weight: 900; }
.toast.error .toast-icon { background: color-mix(in srgb, var(--danger) 17%, transparent); color: var(--danger); }
.toast.warning .toast-icon { background: color-mix(in srgb, var(--amber) 17%, transparent); color: var(--amber); }
.action-dialog-backdrop { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; background: rgba(2,4,6,.68); backdrop-filter: blur(8px); animation: feedback-fade-in .18s ease both; }
.action-dialog { width: min(430px, 100%); padding: 24px; border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); animation: feedback-pop-in .2s cubic-bezier(.2,.8,.2,1) both; }
.action-dialog h2 { margin: 7px 0 8px; font-size: 22px; }
.action-dialog p { margin: 0; }
.action-dialog-actions { justify-content: flex-end; margin-top: 22px; }
.button.is-busy, .mini-button.is-busy { pointer-events: none; opacity: .72; }
.button.is-busy::before, .mini-button.is-busy::before { display: inline-block; width: .82em; height: .82em; margin-right: .42em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; content: ''; vertical-align: -.08em; animation: feedback-spin .7s linear infinite; }
.table-wrap { transition: opacity .18s ease, transform .18s ease, box-shadow .22s ease; }
.table-wrap.is-refreshing { opacity: .60; box-shadow: inset 0 1px 0 var(--table-highlight), 0 8px 18px rgba(0,0,0,.16); transform: translateY(2px); will-change: opacity, transform; }
.data-table tbody.table-fade-in { animation: table-fade-in .22s ease both; }
.user-editor, .profile-panel, .widget-panel, .course-modal { transform-origin: top center; }
.editor-motion { will-change: max-height, margin, padding, opacity, transform; }
.profile-panel:not([hidden]), .widget-panel:not([hidden]), .course-modal-backdrop:not([hidden]) .course-modal { animation: feedback-pop-in .2s cubic-bezier(.2,.8,.2,1) both; }
@keyframes feedback-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes feedback-pop-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes feedback-spin { to { transform: rotate(360deg); } }
@keyframes table-fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 980px) {
  .public-links { display: flex; visibility: hidden; opacity: 0; transform: translateY(-8px) scale(.985); transition: opacity .18s ease, transform .18s ease, visibility .18s ease; }
  .public-links.open { visibility: visible; opacity: 1; transform: translateY(0) scale(1); }
  .sidebar-overlay { display: block; visibility: hidden; opacity: 0; transition: opacity .25s ease, visibility .25s ease; }
  .sidebar-overlay.open { visibility: visible; opacity: 1; }
}
@media (max-width: 680px) { .toast-region { right: 12px; bottom: 76px; width: calc(100vw - 24px); } .action-dialog { padding: 20px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }


/* Homepage polish — Session 43 */
.landing-page .button:focus-visible,
.landing-page a:focus-visible,
.landing-page [tabindex]:focus-visible,
.landing-page select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--lime) 72%, white 28%);
  outline-offset: 3px;
}
.landing-hero {
  min-height: 700px;
  gap: 24px;
  padding: 104px 24px 64px;
}
.hero-content {
  padding: 31px 40px 28px;
  border-radius: 26px;
}
.hero-content h1 { margin-top: 10px; }
.hero-content p { max-width: 610px; font-size: 14px; }
.hero-content .public-branch-chip { margin-top: 19px; }
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 17px;
}
.hero-actions .button { min-width: 164px; }
.course-grid { gap: 16px; }
.course-card {
  min-height: 176px;
  padding: 21px 20px 18px;
  border-radius: 21px;
}
.course-card:focus-visible { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(166,237,28,.18), 0 20px 48px rgba(0,0,0,.24); }
  .course-icon { width: 176px; height: 112px; margin-bottom: 16px; border-radius: 21px; }
.course-card h3 { font-size: 18px; }
.course-card .course-link { margin-top: 11px; }
.stats-row { gap: 12px; width: min(760px, 100%); }
.landing-stat { min-height: 112px; padding: 14px 12px 13px; border-radius: 17px; }
  .landing-stat .stat-icon { width: 58px; height: 50px; margin-bottom: 7px; border: 0; border-radius: 0; background: transparent; }
  .stat-logo-image { width: 58px; height: 50px; filter: drop-shadow(0 5px 8px rgba(0,0,0,.18)); }

.landing-stat strong { font-size: 23px; }
.landing-section { padding: 78px 24px; }
.section-heading { margin-bottom: 33px; }
.section-heading h2 { margin-top: 7px; }
.feature-grid { gap: 16px; }
.feature-card { min-height: 174px; padding: 22px 20px; }
.course-section-grid { gap: 18px; }
.course-detail-card { padding: 23px; }
.service-grid { gap: 14px; }
.service-card { min-height: 156px; padding: 20px 17px; display: grid; align-content: center; }
.gallery-grid { gap: 15px; }
.gallery-card { min-height: 210px; border-radius: 18px; }
.gallery-card.featured { min-height: 440px; }
.gallery-card img { min-height: 210px; }
.gallery-caption { right: 16px; bottom: 14px; left: 16px; font-size: 12px; }
.documents-list { gap: 11px; }
.document-card { min-height: 68px; padding: 13px 16px; }
.document-card:focus-visible { border-color: var(--lime); box-shadow: 0 0 0 4px rgba(166,237,28,.16), var(--landing-card-shadow); }
.contact-grid { gap: 13px; }
.contact-card { min-height: 82px; padding: 17px; transition: transform .22s ease, border-color .22s ease; }
.contact-card:hover { transform: translateY(-3px); border-color: rgba(166,237,28,.48); }

@media (max-width: 980px) {
  .landing-hero { min-height: 680px; }
}
@media (max-width: 680px) {
  .landing-hero { min-height: auto; gap: 16px; padding: 96px 16px 48px; }
  .hero-content { padding: 21px 14px 20px; border-radius: 21px; }
  .hero-content h1 { margin-top: 9px; }
  .hero-content p { font-size: 12px; line-height: 1.55; }
  .hero-content .public-branch-chip { margin-top: 16px; padding: 9px 16px; }
  .public-branch-chip-label { font-size: 10.5px; letter-spacing: 1.1px; }
  .public-branch-chip-name { font-size: 14.5px; }
  .public-topbar-branch-picker .select { max-width: 138px; min-width: 96px; min-height: 36px; padding: 7px 26px 7px 10px; border-radius: 10px; font-size: 11px; }
  .hero-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
  .hero-actions .button { min-width: 0; min-height: 43px; padding: 10px 9px; font-size: 12px; }
  .course-grid { gap: 9px; }
  .course-card { min-height: 158px; padding: 14px 8px 13px; }
  .course-icon { width: 150px; height: 96px; margin-bottom: 11px; border-radius: 18px; }
  .course-logo-image { border-radius: 18px; }
  .course-detail-head .course-icon { flex-basis: 96px; width: 96px; height: 62px; border-radius: 22px; }
  .course-detail-head .course-logo-image { border-radius: 22px; }
  .course-card h3 { font-size: 15px; }
  .course-card p { min-height: 29px; }
  .course-card .course-link { margin-top: 8px; font-size: 10px; }
  .landing-stat { min-height: 104px; }
  .landing-section { padding: 60px 16px; }
  .section-heading { margin-bottom: 26px; }
  .section-heading h2 { font-size: clamp(27px, 8vw, 36px); letter-spacing: -1.35px; }
  .section-heading p { font-size: 13px; line-height: 1.55; }
  .feature-card { min-height: 0; padding: 20px 17px; }
  .course-detail-card { padding: 19px 17px; }
  .service-card { min-height: 136px; }
  .gallery-card, .gallery-card.featured { min-height: 174px; }
  .gallery-card img { min-height: 174px; }
  .gallery-card.featured { grid-column: span 2; }
  .document-card { min-height: 64px; padding: 12px 13px; }
  .contact-card { min-height: 75px; padding: 14px; }
}


/* Fixed public widgets must not inherit a transformed route container. */
#page-content.route-enter { animation: routeContentFade .24s ease both; }
@keyframes routeContentFade { from { opacity: 0; } to { opacity: 1; } }


/* Gallery six-slot layout and viewer — Session 44 */
.gallery-grid {
  grid-template-rows: repeat(3, minmax(180px, 1fr));
}
.gallery-card {
  cursor: pointer;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}
.gallery-card.gallery-slot-0 { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.gallery-card.gallery-slot-1 { grid-column: 3; grid-row: 1; }
.gallery-card.gallery-slot-2 { grid-column: 3; grid-row: 2; }
.gallery-card.gallery-slot-3 { grid-column: 1; grid-row: 3; }
.gallery-card.gallery-slot-4 { grid-column: 2; grid-row: 3; }
.gallery-card.gallery-slot-5 { grid-column: 3; grid-row: 3; }
.gallery-card:hover { transform: translateY(-3px); border-color: rgba(166,237,28,.58); box-shadow: 0 20px 48px rgba(0,0,0,.28); }
.gallery-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--lime) 72%, white 28%); outline-offset: 3px; }
.gallery-card.gallery-slot-0, .gallery-card.gallery-slot-0 img { min-height: 440px; }
.gallery-card img { min-height: 210px; }

.gallery-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3,5,4,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.gallery-viewer-open { overflow: hidden; }
.gallery-viewer-shell {
  display: grid;
  width: min(1040px, 100%);
  max-height: min(900px, 94vh);
  overflow: hidden;
  border: 1px solid rgba(241,246,252,.16);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: 0 28px 100px rgba(0,0,0,.48), inset 0 1px 0 rgba(255,255,255,.08);
}
.gallery-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.gallery-viewer-head h2 { margin: 5px 0 0; color: var(--ink); font-size: 22px; letter-spacing: -.8px; }
.gallery-viewer-close { width: 42px; height: 42px; border: 1px solid var(--line); background: var(--surface-muted); }
.gallery-viewer-stage { display: grid; grid-template-columns: 52px minmax(0,1fr) 52px; align-items: center; gap: 12px; min-height: 420px; padding: 22px; background: radial-gradient(circle at 50% 38%, rgba(166,237,28,.08), transparent 46%); }
.gallery-viewer-stage img { display: block; width: 100%; height: min(54vh, 560px); border-radius: 16px; object-fit: contain; }
.gallery-viewer-nav { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface-muted); color: var(--ink); font-size: 31px; line-height: 1; transition: background .2s ease, border-color .2s ease, transform .2s ease; }
.gallery-viewer-nav:hover { transform: scale(1.06); border-color: var(--lime); background: var(--lime-soft); }
.gallery-viewer-caption-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 22px 14px; color: var(--muted); font-size: 13px; }
.gallery-viewer-caption-row b { color: var(--lime-deep); font-variant-numeric: tabular-nums; }
.gallery-viewer-thumbs { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 9px; overflow-x: auto; padding: 0 22px 20px; }
.gallery-viewer-thumb { min-width: 0; overflow: hidden; border: 2px solid transparent; border-radius: 11px; background: var(--surface-muted); padding: 0; opacity: .62; transition: opacity .2s ease, border-color .2s ease, transform .2s ease; }
.gallery-viewer-thumb:hover, .gallery-viewer-thumb.active { border-color: var(--lime); opacity: 1; transform: translateY(-2px); }
.gallery-viewer-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

.cms-gallery-instruction { margin: -2px 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.cms-gallery-items { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.cms-gallery-slot-card { position: relative; }
.cms-gallery-slot-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 11px 11px 0; }
.cms-gallery-slot-label b { color: var(--ink); font-size: 12px; }
.cms-gallery-slot-label span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.cms-gallery-preview { display: grid; min-height: 156px; margin: 10px 10px 0; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-muted); color: var(--muted); font-size: 11px; }
.cms-gallery-preview img { width: 100%; height: 156px; object-fit: cover; }
.cms-gallery-preview.is-empty { border-style: dashed; }
.cms-gallery-card-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cms-gallery-card-actions .cms-gallery-file-button { min-height: 33px; padding: 8px 10px; font-size: 11px; }
.cms-gallery-slot-card.is-uploading { opacity: .58; pointer-events: none; }
@media (max-width: 820px) {
  .cms-gallery-items { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0,1fr)); grid-template-rows: repeat(4, minmax(150px, 1fr)); gap: 9px; }
  .gallery-card.gallery-slot-0 { grid-column: 1 / span 2; grid-row: 1; }
  .gallery-card.gallery-slot-1 { grid-column: 1; grid-row: 2; }
  .gallery-card.gallery-slot-2 { grid-column: 2; grid-row: 2; }
  .gallery-card.gallery-slot-3 { grid-column: 1; grid-row: 3; }
  .gallery-card.gallery-slot-4 { grid-column: 2; grid-row: 3; }
  .gallery-card.gallery-slot-5 { grid-column: 1 / span 2; grid-row: 4; }
  .gallery-card.gallery-slot-0, .gallery-card.gallery-slot-0 img, .gallery-card img { min-height: 174px; }
  .gallery-viewer-backdrop { padding: 10px; }
  .gallery-viewer-shell { max-height: 94vh; border-radius: 18px; }
  .gallery-viewer-head { padding: 14px 15px; }
  .gallery-viewer-head h2 { font-size: 18px; }
  .gallery-viewer-stage { grid-template-columns: 36px minmax(0,1fr) 36px; gap: 5px; min-height: 300px; padding: 12px 9px; }
  .gallery-viewer-stage img { height: min(48vh, 420px); }
  .gallery-viewer-nav { width: 34px; height: 34px; font-size: 25px; }
  .gallery-viewer-caption-row { padding: 0 15px 11px; font-size: 11px; }
  .gallery-viewer-thumbs { gap: 6px; padding: 0 15px 15px; }
  .cms-gallery-items { grid-template-columns: 1fr; }
}


/* Session 45 — fixed six-slot gallery frame */
.gallery-grid[data-home-gallery-items] {
  height: clamp(500px, 52vw, 640px);
  max-height: calc(100svh - 210px);
  min-height: 500px;
  grid-template-columns: minmax(0, 1.72fr) repeat(2, minmax(0, .86fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.25vw, 16px);
  overflow: hidden;
}
.gallery-grid[data-home-gallery-items] .gallery-card,
.gallery-grid[data-home-gallery-items] .gallery-card.featured,
.gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-0 {
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.gallery-grid[data-home-gallery-items] .gallery-card .gallery-media-stage,
.gallery-grid[data-home-gallery-items] .gallery-card .gallery-media-stage img,
.gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-0 .gallery-media-stage,
.gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-0 .gallery-media-stage img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}
.gallery-grid[data-home-gallery-items] .gallery-caption {
  right: 12px;
  bottom: 11px;
  left: 12px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 980px) and (min-width: 681px) {
  .gallery-grid[data-home-gallery-items] {
    height: 500px;
    min-height: 500px;
  }
}

@media (max-width: 680px) {
  .gallery-grid[data-home-gallery-items] {
    height: 540px;
    max-height: none;
    min-height: 540px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-0,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-1,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-2,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-3,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-4,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-5 {
    grid-column: auto;
    grid-row: auto;
  }
}


/* Session 45 refinement — six fixed positions, compact 6-column frame */
.gallery-grid[data-home-gallery-items] {
  height: clamp(470px, 46vw, 560px);
  max-height: 560px;
  min-height: 0;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.2vw, 16px);
}
.gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-0 { grid-column: 1 / span 4; grid-row: 1 / span 2; }
.gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-1 { grid-column: 5 / span 2; grid-row: 1; }
.gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-2 { grid-column: 5 / span 2; grid-row: 2; }
.gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-3 { grid-column: 1 / span 2; grid-row: 3; }
.gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-4 { grid-column: 3 / span 2; grid-row: 3; }
.gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-5 { grid-column: 5 / span 2; grid-row: 3; }

@media (max-width: 980px) and (min-width: 681px) {
  .gallery-grid[data-home-gallery-items] { height: 470px; max-height: 470px; }
}

@media (max-width: 680px) {
  .gallery-grid[data-home-gallery-items] {
    height: 520px;
    max-height: 520px;
    min-height: 520px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
  }
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-0,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-1,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-2,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-3,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-4,
  .gallery-grid[data-home-gallery-items] .gallery-card.gallery-slot-5 {
    grid-column: auto;
    grid-row: auto;
  }
}


/* Remove browser default figure margins from the fixed gallery cards. */
.gallery-grid[data-home-gallery-items] .gallery-card { margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .landing-page .hero-ambient,
  .landing-page .hero-image,
  .landing-page.homepage-motion-ready [data-reveal],
  .landing-page.homepage-motion-ready [data-reveal-group] > * {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
  .gallery-media-stage .gallery-image-current,
  .gallery-media-stage .gallery-image-next,
  .gallery-media-stage .gallery-image-next.is-visible { transition: none !important; transform: none !important; }
}


/* Session 46 — multi-image groups inside each fixed gallery slot */
.cms-gallery-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  min-height: 156px;
  margin: 10px 10px 0;
  padding: 7px;
  place-items: stretch;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-muted);
}
.cms-gallery-preview-grid.is-empty { place-items: center; border-style: dashed; color: var(--muted); font-size: 11px; }
.cms-gallery-thumb { position: relative; min-width: 0; aspect-ratio: 1; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid); }
.cms-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cms-gallery-thumb-delete { position: absolute; top: 3px; right: 3px; display: grid; width: 22px; height: 22px; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(15,18,20,.82); color: #fff; font-size: 15px; line-height: 1; }
.cms-gallery-thumb-delete:hover, .cms-gallery-thumb-delete:focus-visible { background: var(--danger); border-color: var(--danger); }
.cms-gallery-slot-label small { color: var(--lime-deep); font-size: 10px; font-weight: 700; white-space: nowrap; }
.cms-gallery-item-body > small { display: block; min-height: 17px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 820px) { .cms-gallery-preview-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 680px) { .cms-gallery-preview-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 132px; } }

/* Session 49 — four fixed homepage hero images inside Trang chủ CMS */
.cms-hero-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cms-hero-slot-card .cms-gallery-preview-grid { min-height: 176px; }
.cms-hero-thumb { position: relative; width: 100%; height: 100%; min-height: 160px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid); }
.cms-hero-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cms-hero-preview-grid { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 820px) { .cms-hero-items { grid-template-columns: 1fr; } }

/* Homepage video section */
.video-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.15rem; }
.video-card { overflow: hidden; padding: 0; cursor: pointer; border: 1px solid var(--line, rgba(148,163,184,.22)); transition: transform .28s ease, border-color .28s ease, box-shadow .28s ease; }
.video-card:hover, .video-card:focus-visible { transform: translateY(-5px); border-color: var(--lime-deep, #a6ed1c); box-shadow: 0 18px 42px rgba(2,6,23,.2); outline: none; }
.video-card.is-empty { cursor: default; }
.video-card.is-empty:hover { transform: none; border-color: var(--line, rgba(148,163,184,.22)); box-shadow: none; }
.video-card-media { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(15,23,42,.72)); }
.video-card-preview { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.video-card-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, rgba(2,6,23,.58)); pointer-events: none; }
.video-card-play { position: absolute; z-index: 1; display: grid; place-items: center; width: 3rem; height: 3rem; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; color: #fff; background: rgba(15,23,42,.62); backdrop-filter: blur(8px); font-size: 1rem; padding-left: .14rem; transition: transform .25s ease, background .25s ease; }
.video-card:hover .video-card-play, .video-card:focus-visible .video-card-play { transform: scale(1.08); background: var(--lime-deep, #a6ed1c); color: #17200d; }
.video-card-placeholder { position: relative; z-index: 1; color: var(--muted, #94a3b8); font-size: .82rem; letter-spacing: .04em; }
.video-card-copy { padding: 1rem 1.05rem 1.15rem; }
.video-card-copy h3 { margin: 0 0 .38rem; font-size: 1rem; }
.video-card-copy p { margin: 0; min-height: 2.6em; color: var(--muted, #94a3b8); font-size: .86rem; line-height: 1.55; }
.video-viewer-backdrop { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: clamp(1rem, 3vw, 2rem); background: rgba(2,6,23,.78); backdrop-filter: blur(14px); }
.video-viewer-backdrop[hidden] { display: none; }
.video-viewer-shell { width: min(100%, 980px); max-height: calc(100vh - 2rem); overflow: auto; padding: clamp(1rem, 2.5vw, 1.6rem); border: 1px solid rgba(148,163,184,.3); border-radius: 1.25rem; background: var(--surface-solid, #0f172a); box-shadow: 0 30px 90px rgba(0,0,0,.42); }
.video-viewer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.video-viewer-head h2 { margin: .15rem 0 .35rem; }
.video-viewer-head p { margin: 0; }
.video-viewer-player { display: block; width: 100%; max-height: min(70vh, 640px); border-radius: .8rem; background: #020617; }
body.video-viewer-open { overflow: hidden; }
.cms-video-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cms-video-slot-card { min-width: 0; }
.cms-video-preview-grid { min-height: 150px; }
.cms-video-preview { position: relative; width: 100%; height: 100%; min-height: 150px; }
.cms-video-preview video { display: block; width: 100%; height: 100%; min-height: 150px; object-fit: cover; background: #020617; }
.cms-video-preview .cms-gallery-thumb-delete { z-index: 2; }
.cms-video-preview-grid.is-empty { display: grid; place-items: center; color: var(--muted, #94a3b8); }
.cms-video-slot-card.is-uploading { opacity: .62; pointer-events: none; }
@media (max-width: 1050px) { .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .video-grid, .cms-video-items { grid-template-columns: 1fr; } .video-viewer-shell { max-height: calc(100vh - 1rem); border-radius: 1rem; } }
@media (prefers-reduced-motion: reduce) { .video-card, .video-card-play { transition: none; } }


/* Service illustration assets: preserve the complete reference crop inside the existing icon tile. */
.feature-icon .service-logo-image,
.feature-icon .feature-logo-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }

/* Contact illustration assets: preserve the complete reference crop inside the existing icon tile. */
.contact-card .contact-icon .contact-logo-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }

/* Shared document illustration: preserve the complete learning reference inside the card icon tile. */
.document-icon .document-logo-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }

/* Reference floating illustrations replace the former inline SVG symbols. */
.floating-image-action { padding: 0; overflow: hidden; background: transparent !important; box-shadow: none; color: transparent; }
.floating-icon-image { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.floating-image-action:hover { box-shadow: 0 16px 36px rgba(30,50,20,.22); }
@media (max-width: 640px) {
  .floating-icon-image { width: 100%; height: 100%; }
}


/* Session 70 — compact internal-chat identity layout */
.chat-list-head { padding: 16px 15px 14px; }
.chat-list-brand { display: grid; gap: 7px; }
.chat-list-brand .eyebrow { margin: 0; font-size: 9px; }
.chat-list-brand-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-list-brand-row strong { color: var(--ink); font-size: 17px; letter-spacing: -.02em; }
.chat-list-brand-row .tag { flex: 0 0 auto; max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list .form-field.compact { margin-top: 14px; }
.chat-list .form-field.compact > span { font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.chat-list .internal-user-search { min-height: 42px; border-radius: 12px; }
.chat-list-divider { padding: 10px 15px 8px; background: color-mix(in srgb, var(--surface-muted) 35%, transparent); font-size: 9px; letter-spacing: .12em; }
.conversation-contact { width: 100%; align-items: flex-start; min-height: 67px; padding: 11px 15px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; font: inherit; }
.conversation-contact .avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 11px; }
.conversation-contact .contact-meta { display: grid; gap: 3px; align-content: center; }
.conversation-contact .contact-meta b { font-size: 12px; }
.conversation-contact .contact-meta small { display: flex; align-items: center; gap: 5px; margin-top: 0; overflow: visible; white-space: normal; }
.conversation-contact .contact-meta em { display: block; overflow: hidden; color: var(--muted); font-size: 9px; font-style: normal; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.conversation-contact .conversation-status { flex: 0 0 auto; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.internal-user .contact-meta { display: grid; gap: 3px; align-content: center; }
.internal-user .contact-meta small { display: flex; align-items: center; gap: 5px; margin-top: 0; overflow: visible; white-space: normal; }
.internal-user .contact-meta em { display: block; overflow: hidden; color: var(--muted); font-size: 9px; font-style: normal; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.role-chip { display: inline-flex; max-width: 145px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--lime) 55%, transparent); border-radius: 999px; background: var(--lime-soft); padding: 2px 6px; color: var(--lime); font-size: 8px; font-weight: 850; letter-spacing: .03em; line-height: 1.1; text-overflow: ellipsis; white-space: nowrap; }
.chat-selected-identity { display: grid; min-width: 0; gap: 5px; }
.chat-selected-identity strong { overflow: hidden; color: var(--ink); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.chat-selected-identity small { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-width: 0; color: var(--muted); font-size: 10px; font-weight: 500; }
.chat-selected-identity small > span:not(.role-chip) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.internal-user-picker-panel { top: calc(100% + 7px); max-height: 360px; border-radius: 13px; }
.internal-user-picker-panel #internal-user-list { max-height: 358px; }
.internal-user { min-height: 66px; padding: 10px 13px; }
.internal-user .avatar { width: 34px; height: 34px; flex-basis: 34px; }
@media (max-width: 700px) {
  .chat-list-brand-row strong { font-size: 15px; }
  .conversation-contact, .internal-user { min-height: 62px; padding: 9px 12px; }
  .chat-selected-identity strong { font-size: 13px; }
}


/* Session 40 — internal chat reference layout */
.internal-chat-shell .split-chat { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: min(680px, calc(100vh - 180px)); min-height: 560px; border-color: rgba(255,255,255,.10); border-radius: 15px; background: #0d0e10; box-shadow: 0 18px 42px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.035); }
.internal-chat-shell .chat-list { min-width: 0; border-right: 1px solid rgba(255,255,255,.10); background: #0d0e10; }
.internal-chat-shell .chat-window { min-width: 0; background: #0d0e10; }
.internal-chat-shell .chat-list-head { padding: 16px 14px 13px; border-bottom: 1px solid rgba(255,255,255,.09); }
.internal-scope-tabs { display: flex; align-items: center; gap: 4px; width: 100%; margin-bottom: 12px; padding: 3px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; background: #111216; }
.internal-scope-tab { display: inline-flex; min-width: 0; flex: 1 1 0; align-items: center; justify-content: center; gap: 5px; min-height: 29px; overflow: hidden; border: 0; border-radius: 9px; background: transparent; padding: 5px 7px; color: #777b84; font-size: 10px; font-weight: 650; line-height: 1; white-space: nowrap; }
.internal-scope-tab.is-active { background: #08090b; color: #e7e9ed; box-shadow: 0 2px 8px rgba(0,0,0,.28); }
.internal-scope-tab:disabled { cursor: default; opacity: .72; }
.internal-tab-icon { color: currentColor; font-size: 12px; line-height: 1; }
.internal-scope-code { max-width: 52px; overflow: hidden; color: #8f949d; font-size: 8px; font-weight: 500; text-overflow: ellipsis; }
.internal-scope-tab.is-active .internal-scope-code { color: #b8bec8; }
.internal-chat-shell .chat-list .form-field.compact { margin: 0 0 10px; gap: 5px; }
.internal-chat-shell .chat-list .form-field.compact > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.internal-chat-shell .chat-list .form-field.compact .select { min-height: 36px; border-color: rgba(255,255,255,.12); border-radius: 11px; background: #111216; color: #c9ced6; padding: 8px 11px; font-size: 10px; }
.internal-chat-shell .internal-user-search { min-height: 38px; border-color: rgba(255,255,255,.14); border-radius: 11px; background: #0b0c0f; color: #e8ebef; padding: 9px 12px 9px 33px; font-size: 11px; }
.internal-chat-shell .internal-user-search:focus { border-color: rgba(166,237,28,.72); box-shadow: 0 0 0 3px rgba(166,237,28,.12); }
.internal-chat-shell .internal-user-search-field { position: relative; }
.internal-chat-shell .internal-user-search-field::before { position: absolute; top: 50%; left: 12px; z-index: 1; color: #7b818a; content: '⌕'; font-size: 17px; line-height: 1; pointer-events: none; transform: translateY(-54%); }
.internal-chat-shell .chat-list-divider { display: none; }
.internal-chat-shell #internal-conversation-list { overflow-y: auto; }
.internal-chat-shell .conversation-contact, .internal-chat-shell .internal-user { min-height: 66px; gap: 11px; padding: 12px 14px; border-bottom-color: rgba(255,255,255,.075); background: transparent; }
.internal-chat-shell .conversation-contact:hover, .internal-chat-shell .conversation-contact.selected, .internal-chat-shell .internal-user:hover, .internal-chat-shell .internal-user:focus-visible { background: rgba(166,237,28,.08); }
.internal-chat-shell .conversation-contact .avatar, .internal-chat-shell .internal-user .avatar { width: 35px; height: 35px; flex-basis: 35px; background: linear-gradient(145deg, #a6ed1c, #72be0b); color: #11170b; font-size: 12px; }
.internal-chat-shell .conversation-contact .contact-meta b, .internal-chat-shell .internal-user .contact-meta b { color: #e8ebef; font-size: 12px; font-weight: 750; }
.internal-chat-shell .conversation-contact .contact-meta em, .internal-chat-shell .internal-user .contact-meta em { color: #848a94; font-size: 9px; }
.internal-chat-shell .conversation-contact .conversation-status { color: #71dcb0; font-size: 0; }
.internal-chat-shell .conversation-contact .conversation-status::after { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #18bd7f; content: ''; }
.internal-chat-shell .internal-user-picker-panel { top: calc(100% + 6px); border-color: rgba(255,255,255,.14); border-radius: 12px; background: #111216; box-shadow: 0 18px 38px rgba(0,0,0,.40); }
.internal-chat-shell .internal-user-picker-panel #internal-user-list { max-height: 330px; }
.internal-chat-shell .chat-window-head { min-height: 66px; border-bottom-color: rgba(255,255,255,.09); padding: 0 18px; background: #0d0e10; }
.internal-chat-shell .chat-window-head.is-empty { display: none; }
.internal-chat-shell .messages { align-content: start; background: #0d0e10; padding: 20px; }
.internal-chat-shell .messages:has(.internal-empty-state) { place-items: center; align-content: center; padding: 28px; }
.internal-empty-state { display: grid; min-height: 0; gap: 13px; place-items: center; max-width: 250px; color: #747983; text-align: center; }
.internal-empty-state strong { display: block; color: #9a9ea7; font-size: 13px; font-weight: 500; line-height: 1.5; }
.internal-empty-state p { margin: 4px 0 0; color: #686d77; font-size: 12px; line-height: 1.5; }
.internal-empty-icon { display: grid; width: 42px; height: 42px; place-items: center; color: #555a64; }
.internal-empty-icon svg { display: block; width: 38px; height: 38px; }
.internal-chat-shell .chat-composer { background: #0d0e10; border-top-color: rgba(255,255,255,.09); padding: 12px 14px; }
@media (max-width: 700px) {
  .internal-chat-shell .split-chat { height: min(700px, calc(100vh - 150px)); min-height: 560px; grid-template-columns: 1fr; }
  .internal-chat-shell .chat-list { max-height: 310px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.10); }
  .internal-scope-tab { font-size: 9px; }
  .internal-scope-code { display: none; }
}


/* Session 40 reference refinement — user directory is the primary sidebar list. */
.internal-chat-shell .chat-list { display: flex; flex-direction: column; overflow: hidden; }
.internal-chat-shell .chat-list-head { flex: 0 0 auto; border-bottom: 0; }
.internal-chat-shell .internal-user-picker-panel { position: absolute; top: calc(100% + 6px); right: 0; left: 0; z-index: 80; display: block; max-height: 330px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 12px; background: #111216; box-shadow: 0 18px 38px rgba(0,0,0,.40); }
.internal-chat-shell .internal-user-picker-panel[hidden] { display: none; }
.internal-chat-shell .internal-user-picker-panel #internal-user-list { height: auto; max-height: 328px; overflow-x: hidden; overflow-y: auto; border-top: 0; }
.internal-chat-shell #internal-conversation-list { display: block; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; }
.internal-chat-shell .internal-user { position: relative; min-height: 66px; padding: 12px 14px; }
.internal-chat-shell .internal-user .contact-meta { flex: 1 1 auto; }
.internal-chat-shell .internal-user-email { min-width: 0; overflow: hidden; color: #848a94; text-overflow: ellipsis; white-space: nowrap; }
.internal-chat-shell .internal-user-branch { display: block; overflow: hidden; color: #6f7680; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.internal-chat-shell .internal-user-status { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #18bd7f; box-shadow: 0 0 0 3px rgba(24,189,127,.08); }
.internal-chat-shell .internal-user .chat-open-icon { display: none; }
@media (max-width: 700px) {
  .internal-chat-shell .chat-list { max-height: 330px; }
  .internal-chat-shell .internal-user-picker-panel { min-height: 0; }
}


.internal-chat-shell .internal-user-search-field > .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: -1px; padding: 0; border: 0; white-space: nowrap; }
.internal-chat-shell .role-chip.role-staff, .internal-chat-shell .role-chip.role-nhan-vien { border-color: rgba(245,185,77,.58); background: rgba(245,185,77,.16); color: #f5c567; }
.internal-chat-shell .role-chip.role-teacher, .internal-chat-shell .role-chip.role-giao-vien { border-color: rgba(166,237,28,.65); background: rgba(166,237,28,.16); color: #a6ed1c; }
.internal-chat-shell .role-chip.role-admin, .internal-chat-shell .role-chip.role-superadmin { border-color: rgba(166,237,28,.65); background: rgba(166,237,28,.20); color: #b9f35a; }


/* Session 42 — emphasize the conversation currently being viewed. */
.internal-chat-shell .conversation-contact.selected { position: relative; border-left: 3px solid #a6ed1c; background: linear-gradient(90deg, rgba(166,237,28,.18), rgba(166,237,28,.07)); box-shadow: inset 0 1px 0 rgba(166,237,28,.10), inset 0 -1px 0 rgba(166,237,28,.08); }
.internal-chat-shell .conversation-contact.selected::after { position: absolute; top: 50%; right: 13px; width: 7px; height: 7px; border: 2px solid #0d0e10; border-radius: 50%; background: #a6ed1c; box-shadow: 0 0 0 2px rgba(166,237,28,.22); content: ''; transform: translateY(-50%); }
.internal-chat-shell .conversation-contact.selected .avatar { box-shadow: 0 0 0 2px rgba(166,237,28,.40), 0 0 14px rgba(166,237,28,.16); }
.internal-chat-shell .conversation-contact.selected .contact-meta b { color: #f3f6f0; font-weight: 900; }
.internal-chat-shell .conversation-contact.selected .contact-meta em { color: #adb5a8; }
.internal-chat-shell .conversation-contact.selected .conversation-status::after { background: #a6ed1c; }
.internal-chat-shell .chat-window-head:not(.is-empty) { background: linear-gradient(90deg, rgba(166,237,28,.08), transparent 72%); box-shadow: inset 3px 0 0 rgba(166,237,28,.72); }
.internal-chat-shell .chat-window-head.is-pending { box-shadow: inset 3px 0 0 rgba(245,197,103,.75); }
.internal-chat-shell .pending-chat-status { color: #f5c567; font-size: 9px; font-weight: 700; }


/* Session 74 — Forest / mint / emerald visual system
 * Approved from the browser-only preview. This block intentionally stays CSS-only:
 * no route, data, permission, or business behavior is changed.
 */
:root {
  color-scheme: light;
  --background: #f3faf5;
  --paper: #f3faf5;
  --surface: rgba(255,255,255,.86);
  --surface-solid: #ffffff;
  --surface-muted: #e9f7ef;
  --ink: #102a1e;
  --ink-2: #254b38;
  --muted: #60766a;
  --muted-2: #8ca49a;
  --line: rgba(6,59,39,.12);
  --line-strong: rgba(6,59,39,.19);
  --table-surface: #063b27;
  --table-header: #0a5338;
  --table-stripe: #08472f;
  --table-hover: #0d6040;
  --table-border: #1f7d5b;
  --table-head-ink: #bfe7ce;
  --table-body-ink: #f0fbf4;
  --lime: #07945f;
  --lime-deep: #067c4f;
  --lime-soft: #e1f5e9;
  --teal: #44c78b;
  --blue: #4eaf99;
  --amber: #d9a441;
  --danger: #c9525f;
  --white: #ffffff;
  --shadow-sm: 0 4px 16px rgba(6,59,39,.06);
  --shadow: 0 14px 44px rgba(6,59,39,.10);
  --shadow-lg: 0 22px 70px rgba(6,59,39,.16);
  --table-shadow: 0 18px 38px rgba(6,59,39,.15), 0 3px 9px rgba(6,59,39,.08);
  --table-highlight: rgba(255,255,255,.14);
  --gradient-primary: linear-gradient(135deg, #07945f 0%, #0a5338 100%);
  --gradient-secondary: linear-gradient(135deg, #f3faf5 0%, #e1f2e8 100%);
  --gradient-accent: linear-gradient(135deg, #07945f 0%, #44c78b 100%);
  --gradient-hero: linear-gradient(135deg, #063b27 0%, #0a5338 100%);
  --gradient-sidebar: linear-gradient(180deg, #03170d 0%, #063b27 100%);
  --glass-bg: rgba(255,255,255,.86);
  --glass-border: rgba(6,59,39,.12);
  --glass-shadow: 0 8px 32px rgba(6,59,39,.08);
  --sidebar-ink: #effbf3;
  --sidebar-muted: rgba(239,251,243,.74);
  --sidebar-active: rgba(7,148,95,.20);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #03170d;
  --paper: #03170d;
  --surface: rgba(7,40,25,.90);
  --surface-solid: #08281b;
  --surface-muted: #0e3a28;
  --ink: #effbf3;
  --ink-2: #d7f0df;
  --muted: #a9c3b2;
  --muted-2: #7c9a8a;
  --line: rgba(222,248,232,.13);
  --line-strong: rgba(222,248,232,.21);
  --table-surface: #062719;
  --table-header: #0b3b27;
  --table-stripe: #08311f;
  --table-hover: #104d34;
  --table-border: rgba(188,235,207,.24);
  --table-head-ink: #bde3cb;
  --table-body-ink: #effbf3;
  --lime: #14b978;
  --lime-deep: #46d39b;
  --lime-soft: rgba(20,185,120,.18);
  --teal: #5ed9ac;
  --blue: #68c2aa;
  --amber: #e5b45a;
  --danger: #ef727c;
  --shadow-sm: 0 4px 18px rgba(0,0,0,.30);
  --shadow: 0 14px 44px rgba(0,0,0,.38);
  --shadow-lg: 0 22px 70px rgba(0,0,0,.52);
  --table-shadow: 0 20px 42px rgba(0,0,0,.44), 0 4px 12px rgba(0,0,0,.28);
  --table-highlight: rgba(255,255,255,.075);
  --gradient-secondary: linear-gradient(135deg, #0e3a28 0%, #155238 100%);
  --gradient-sidebar: linear-gradient(180deg, #021109 0%, #063b27 100%);
  --glass-bg: rgba(7,40,25,.88);
  --glass-border: rgba(222,248,232,.14);
  --glass-shadow: 0 8px 32px rgba(0,0,0,.38);
  --sidebar-ink: #effbf3;
  --sidebar-muted: rgba(239,251,243,.78);
  --sidebar-active: rgba(20,185,120,.22);
}

html, body { background: var(--background); color: var(--ink); }
::selection { background: rgba(7,148,95,.25); color: var(--ink); }
.grid-bg { background-image: radial-gradient(circle, color-mix(in srgb, var(--lime) 18%, transparent) 1px, transparent 1px); }
.glass-card, .card { border-color: var(--glass-border); background: var(--glass-bg); box-shadow: inset 0 1px 0 rgba(255,255,255,.08), var(--glass-shadow); }
.gradient-primary, .button.primary, .nav-menu a.active { background: var(--gradient-primary)!important; }
.gradient-accent { background: var(--gradient-accent)!important; }
.gradient-secondary { background: var(--gradient-secondary)!important; }
.gradient-text { background: linear-gradient(135deg, #07945f 0%, #0a5338 78%); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.button.primary { color: #fff!important; box-shadow: 0 10px 24px rgba(7,148,95,.22); }
.button.primary:hover { box-shadow: 0 14px 30px rgba(7,148,95,.30); }
.button.ghost:hover, .icon-button:hover, .profile:hover { background: var(--lime-soft); border-color: rgba(7,148,95,.36); }
.button.secondary { background: var(--surface-muted); color: var(--ink); border-color: var(--line); }
.input, .select, textarea, .form-stack input { background: var(--surface-solid); color: var(--ink); border-color: var(--line-strong); }
.input:focus, .select:focus, textarea:focus, .form-stack input:focus { border-color: var(--lime-deep); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 17%, transparent); }
.eyebrow, .section-eyebrow, .section-kicker { color: var(--lime-deep)!important; }

/* Public homepage */
.public-shell { background: var(--paper)!important; color: var(--ink); }
.public-topbar, .topbar { border-color: var(--line)!important; background: color-mix(in srgb, var(--surface-solid) 88%, transparent)!important; box-shadow: 0 8px 30px rgba(6,59,39,.07); }
.public-brand, .public-links a, .public-user-link { color: var(--ink); }
.public-links a:hover, .public-links a.active { background: color-mix(in srgb, var(--lime-soft) 72%, transparent)!important; color: var(--ink)!important; }
.public-links a.active::after { background: var(--lime)!important; }
.public-login-link, .public-user-link { border-color: var(--lime)!important; }
.public-user-avatar, .brand-mark { background: var(--gradient-primary)!important; color: #fff!important; }
.landing-page { --landing-card-bg: rgba(255,255,255,.90); --landing-card-border: rgba(6,59,39,.13); --landing-card-highlight: rgba(255,255,255,.86); --landing-card-shadow: 0 18px 52px rgba(6,59,39,.11), 0 2px 8px rgba(6,59,39,.05); color: var(--ink); }
:root[data-theme="dark"] .landing-page { --landing-card-bg: rgba(7,40,25,.82); --landing-card-border: rgba(222,248,232,.15); --landing-card-highlight: rgba(255,255,255,.08); --landing-card-shadow: 0 18px 52px rgba(0,0,0,.34), 0 2px 8px rgba(0,0,0,.22); }
.landing-page .glass-card { background: var(--landing-card-bg)!important; border-color: var(--landing-card-border)!important; box-shadow: inset 0 1px 0 var(--landing-card-highlight), var(--landing-card-shadow); }
.landing-hero .hero-content { background: var(--gradient-hero)!important; border-color: rgba(255,255,255,.20)!important; color: #f7fcf8!important; box-shadow: 0 24px 60px rgba(6,59,39,.25)!important; }
.landing-hero .hero-content h1, .landing-hero .hero-content p, .landing-hero .hero-content label { color: #f7fcf8!important; }
.landing-hero .hero-content .gradient-text { background: none!important; color: #9cf0ba!important; -webkit-text-fill-color: #9cf0ba!important; }
.landing-hero .hero-content .eyebrow { color: #a9edc2!important; }
.landing-page .landing-section.alt { background: color-mix(in srgb, var(--surface-muted) 56%, transparent)!important; }
.landing-page h1, .landing-page h2, .landing-page h3 { color: var(--ink); }
.landing-page .course-card, .landing-page .landing-stat, .landing-page .feature-card, .landing-page .service-card, .landing-page .document-card, .landing-page .contact-card, .landing-page .video-card { border-color: var(--landing-card-border)!important; }
.landing-page .course-card:hover, .landing-page .feature-card:hover, .landing-page .service-card:hover, .landing-page .document-card:hover { border-color: color-mix(in srgb, var(--lime) 52%, var(--landing-card-border))!important; box-shadow: 0 18px 38px rgba(6,59,39,.14)!important; }
.landing-page .course-link, .landing-page .document-arrow { color: var(--lime-deep)!important; }
.landing-page .landing-stat strong { color: var(--lime-deep)!important; }

/* Harmonized mini icons and existing illustration assets. */
.landing-page .course-icon, .landing-page .stat-icon, .landing-page .feature-icon, .landing-page .document-icon, .landing-page .contact-icon { background: linear-gradient(145deg,#effbf3,#d9efe1)!important; border-color: rgba(7,148,95,.24)!important; color: var(--lime-deep)!important; box-shadow: 0 10px 22px rgba(6,59,39,.08), inset 0 1px 0 rgba(255,255,255,.92)!important; }
:root[data-theme="dark"] .landing-page .course-icon, :root[data-theme="dark"] .landing-page .stat-icon, :root[data-theme="dark"] .landing-page .feature-icon, :root[data-theme="dark"] .landing-page .document-icon, :root[data-theme="dark"] .landing-page .contact-icon { background: linear-gradient(145deg,#0e3a28,#155238)!important; border-color: rgba(70,211,155,.28)!important; }
.landing-page .course-logo-image, .landing-page .stat-logo-image, .landing-page .service-logo-image, .landing-page .feature-logo-image, .landing-page .document-logo-image, .landing-page .contact-logo-image { filter: saturate(.68) hue-rotate(42deg) brightness(.80) contrast(1.08) drop-shadow(0 5px 8px rgba(6,59,39,.18)); }
.landing-page .floating-icon-image { filter: saturate(.62) hue-rotate(42deg) brightness(.78) contrast(1.10) drop-shadow(0 6px 10px rgba(6,59,39,.22)); }
.landing-page .floating-image-action { background: linear-gradient(145deg,#07945f,#0a5338)!important; border-color: rgba(255,255,255,.76)!important; box-shadow: 0 14px 32px rgba(6,59,39,.22)!important; }
.landing-page .floating-image-action:hover { box-shadow: 0 18px 40px rgba(6,59,39,.30)!important; }

/* Dashboard shell, sidebar and table family. */
.app-shell { background: var(--paper)!important; background-image: radial-gradient(circle, color-mix(in srgb, var(--lime) 13%, transparent) 1px, transparent 1px)!important; }
.sidebar { background: var(--gradient-sidebar)!important; color: var(--sidebar-ink)!important; box-shadow: 8px 0 30px rgba(6,59,39,.12); }
.sidebar-brand, .sidebar-close { color: var(--sidebar-ink)!important; }
.nav-menu a { color: var(--sidebar-muted); }
.nav-menu a:hover, .logout:hover { background: var(--sidebar-active)!important; color: var(--sidebar-ink)!important; }
.nav-menu a.active { color: #fff!important; box-shadow: 0 10px 22px rgba(7,148,95,.22); }
.status-dot { background: var(--lime)!important; box-shadow: 0 0 0 4px rgba(7,148,95,.14); }
.role-chip, .foundation-pill { border-color: rgba(7,148,95,.34)!important; background: var(--lime-soft)!important; color: var(--lime-deep)!important; }
.profile > span:first-child { background: var(--gradient-primary)!important; color: #fff!important; }
.table-wrap { border-color: var(--table-border)!important; background: var(--table-surface)!important; box-shadow: var(--table-shadow); }
.data-table, .data-table tbody tr { background: var(--table-surface)!important; color: var(--table-body-ink)!important; }
.data-table thead, .data-table th { background: var(--table-header)!important; color: var(--table-head-ink)!important; }
.data-table td { border-color: var(--table-border)!important; color: var(--table-body-ink)!important; }
.data-table tbody tr:nth-child(even) { background: var(--table-stripe)!important; }
.data-table tbody tr:hover, .data-table tbody tr:focus-within { background: var(--table-hover)!important; box-shadow: inset 3px 0 0 rgba(7,148,95,.78)!important; }
.table-wrap .tag.green, .tag.green { border-color: rgba(7,148,95,.40)!important; background: rgba(7,148,95,.16)!important; color: #bcebd0!important; }
.table-wrap .mini-button:hover, .mini-button:hover { border-color: var(--lime)!important; background: color-mix(in srgb, var(--lime) 18%, var(--surface-solid))!important; }

/* Internal chat surfaces and active states. */
.internal-chat-shell .split-chat { border-color: var(--line)!important; background: var(--surface-solid)!important; box-shadow: 0 18px 42px rgba(6,59,39,.14), inset 0 1px 0 rgba(255,255,255,.8)!important; }
.internal-chat-shell .chat-list, .internal-chat-shell .chat-window, .internal-chat-shell .messages, .internal-chat-shell .chat-composer, .internal-chat-shell .chat-window-head { background: var(--surface-solid)!important; color: var(--ink)!important; }
.internal-chat-shell .chat-list { border-right-color: var(--line)!important; }
.internal-chat-shell .chat-window-head { border-bottom-color: var(--line)!important; }
.internal-scope-tabs { border-color: var(--line)!important; background: var(--surface-muted)!important; }
.internal-scope-tab { color: var(--muted)!important; }
.internal-scope-tab.is-active { background: var(--gradient-primary)!important; color: #fff!important; box-shadow: 0 4px 12px rgba(7,148,95,.20); }
.internal-chat-shell .internal-user-search, .internal-chat-shell .chat-list .form-field.compact .select { background: var(--surface-solid)!important; color: var(--ink)!important; border-color: var(--line-strong)!important; }
.internal-chat-shell .internal-user-search:focus { border-color: var(--lime)!important; box-shadow: 0 0 0 3px rgba(7,148,95,.14)!important; }
.internal-chat-shell .conversation-contact:hover, .internal-chat-shell .conversation-contact.selected, .internal-chat-shell .internal-user:hover, .internal-chat-shell .internal-user:focus-visible { background: color-mix(in srgb, var(--lime-soft) 78%, transparent)!important; }
.internal-chat-shell .conversation-contact .avatar, .internal-chat-shell .internal-user .avatar { background: var(--gradient-primary)!important; color: #fff!important; }
.internal-chat-shell .conversation-contact .contact-meta b, .internal-chat-shell .internal-user .contact-meta b { color: var(--ink)!important; }
.internal-chat-shell .conversation-contact .contact-meta em, .internal-chat-shell .internal-user .contact-meta em { color: var(--muted)!important; }
.internal-chat-shell .conversation-contact.selected { border-left-color: var(--lime)!important; background: linear-gradient(90deg, rgba(7,148,95,.18), rgba(7,148,95,.06))!important; }
.internal-chat-shell .conversation-contact.selected::after { border-color: var(--surface-solid)!important; background: var(--lime)!important; box-shadow: 0 0 0 2px rgba(7,148,95,.22); }
.internal-chat-shell .conversation-contact.selected .contact-meta b { color: var(--ink)!important; }
.internal-chat-shell .internal-user-picker-panel { border-color: var(--line-strong)!important; background: var(--surface-solid)!important; box-shadow: 0 18px 38px rgba(6,59,39,.18)!important; }
.internal-empty-state strong { color: var(--ink-2)!important; }
.internal-empty-state p { color: var(--muted)!important; }
.internal-empty-icon { color: var(--lime-deep)!important; }
.internal-chat-shell .chat-composer { border-top-color: var(--line)!important; }
.internal-chat-shell .role-chip.role-staff, .internal-chat-shell .role-chip.role-nhan-vien, .internal-chat-shell .role-chip.role-teacher, .internal-chat-shell .role-chip.role-giao-vien, .internal-chat-shell .role-chip.role-admin, .internal-chat-shell .role-chip.role-superadmin { border-color: rgba(7,148,95,.34)!important; background: var(--lime-soft)!important; color: var(--lime-deep)!important; }

/* Guest chat and login surfaces. */
.widget-panel { border-color: var(--line)!important; background: var(--surface-solid)!important; box-shadow: 0 20px 50px rgba(6,59,39,.18)!important; }
.widget-header { background: var(--gradient-primary)!important; color: #fff!important; }
.widget-header .icon-button { color: #fff!important; }
.widget-body, .widget-composer { background: var(--surface-solid)!important; }
.widget-messages { background: var(--surface-muted)!important; }
.widget-message.me { background: var(--gradient-primary)!important; color: #fff!important; }
.login-page { background: var(--background)!important; }
.login-visual { background-color: #03170d!important; background-image: radial-gradient(circle at 1px 1px, rgba(169,237,194,.16) 1px, transparent 1.15px)!important; }
.login-card { background: var(--surface-solid)!important; border-color: var(--line)!important; box-shadow: 0 24px 70px rgba(6,59,39,.18)!important; }

@media (max-width: 700px) {
  .public-topbar, .topbar { box-shadow: 0 5px 18px rgba(6,59,39,.08); }
  .landing-page .stat-icon, .landing-page .feature-icon, .landing-page .document-icon, .landing-page .contact-icon { width: 54px!important; height: 54px!important; border-radius: 16px!important; }
  .landing-page .stat-icon img, .landing-page .feature-icon img, .landing-page .document-icon img, .landing-page .contact-icon img { width: 38px!important; height: 38px!important; }
}


/* Session 75 — approved homepage course-logo treatment.
 * Keep the source assets unchanged; remove the palette filter's colored edge
 * and use the same black matte treatment for motorcycle and car silhouettes.
 */
.landing-page .course-card .course-icon {
  position: relative;
  box-sizing: border-box;
  width: 144px;
  height: 88px;
  min-width: 144px;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 21px;
  background: radial-gradient(ellipse at 50% 22%, rgba(255,255,255,.11), transparent 42%), linear-gradient(145deg, #1a392c, #06140e 82%) !important;
  border: 1px solid rgba(183,233,202,.38) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -10px 20px rgba(0,0,0,.24), 0 9px 18px rgba(0,0,0,.22) !important;
}
.landing-page .course-card .course-icon::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: none !important;
}
.landing-page .course-card .course-icon::after {
  content: '';
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: 7px;
  height: 7px;
  z-index: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  filter: blur(7px);
  pointer-events: none;
}
.landing-page .course-card .course-logo-image {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 76px;
  max-width: 132px;
  max-height: 76px;
  object-fit: contain;
  object-position: center;
  transform: none;
  transform-origin: center center;
  filter: grayscale(1) saturate(0) brightness(.46) contrast(1.55) drop-shadow(0 5px 2px rgba(0,0,0,.55)) drop-shadow(0 9px 7px rgba(0,0,0,.28)) !important;
}
.landing-page .course-card .course-icon.car {
  background: radial-gradient(ellipse at 50% 22%, rgba(255,255,255,.11), transparent 42%), linear-gradient(145deg, #1a392c, #06140e 82%) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -10px 20px rgba(0,0,0,.24), 0 9px 18px rgba(0,0,0,.22) !important;
}
.landing-page .course-card .course-icon.car::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: none !important;
}
.landing-page .course-card .course-icon.car .course-logo-image {
  filter: grayscale(1) saturate(0) brightness(.46) contrast(1.55) drop-shadow(0 5px 2px rgba(0,0,0,.55)) drop-shadow(0 9px 7px rgba(0,0,0,.28)) !important;
  transform: none;
}
@media (max-width: 680px) {
  .landing-page .course-card .course-icon {
    width: 128px;
    height: 80px;
    min-width: 128px;
    min-height: 80px;
    border-radius: 18px;
  }
  .landing-page .course-card .course-logo-image {
    width: 118px;
    height: 68px;
    max-width: 118px;
    max-height: 68px;
  }
}


/* Session 76 — centered public branch picker, branch-aware brand and shared course-logo tone.
   Session 99 — picker moved to topbar; hero slot now shows the selected branch name chip. */
.public-brand {
  gap: 8px;
  white-space: nowrap;
}
.landing-page .course-card .course-icon,
.landing-page .course-detail-head .course-icon {
  background: radial-gradient(ellipse at 50% 20%, rgba(255,255,255,.15), transparent 40%), linear-gradient(145deg, #234b39, #0b2116 82%) !important;
  border-color: rgba(183,233,202,.32) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.19), inset 0 -10px 20px rgba(0,0,0,.22), 0 9px 18px rgba(0,0,0,.20) !important;
}
.landing-page .course-card .course-logo-image,
.landing-page .course-detail-head .course-logo-image {
  filter: grayscale(1) saturate(0) brightness(.46) contrast(1.48) drop-shadow(0 4px 2px rgba(5,34,20,.44)) drop-shadow(0 10px 7px rgba(5,34,20,.20)) !important;
}
.landing-page .course-card .course-icon::before,
.landing-page .course-detail-head .course-icon::before {
  display: none !important;
  content: none !important;
  border: 0 !important;
  background: none !important;
}
/* Session 89 — light-theme course logos: brighten the matte so dark silhouettes remain prominent. */
:root[data-theme="light"] .landing-page .course-card .course-icon,
:root[data-theme="light"] .landing-page .course-detail-head .course-icon {
  background: linear-gradient(135deg, rgba(6, 59, 39, .68), rgba(10, 83, 56, .54)) !important;
  border-color: rgba(202, 244, 218, .24) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 9px 18px rgba(6,59,39,.16) !important;
}
:root[data-theme="light"] .landing-page .course-card .course-icon.car,
:root[data-theme="light"] .landing-page .course-detail-head .course-icon.car {
  background: linear-gradient(135deg, rgba(6, 59, 39, .68), rgba(10, 83, 56, .54)) !important;
}
:root[data-theme="light"] .landing-page .course-card .course-logo-image,
:root[data-theme="light"] .landing-page .course-detail-head .course-logo-image {
  filter: grayscale(1) saturate(0) brightness(.46) contrast(1.48) drop-shadow(0 4px 2px rgba(5, 34, 20, .44)) drop-shadow(0 10px 7px rgba(5, 34, 20, .20)) !important;
}

@media (max-width: 680px) {
  .landing-page .hero-content .public-branch-chip,
  .landing-page .public-branch-chip {
    max-width: min(100%, 380px);
  }
  .public-branch-chip-name { max-width: 240px; }
}


/* Keep the car-specific cascade aligned with the shared course-logo tone. */
.landing-page .course-card .course-icon.car .course-logo-image,
.landing-page .course-detail-head .course-icon.car .course-logo-image {
  filter: grayscale(1) saturate(0) brightness(.46) contrast(1.48) drop-shadow(0 4px 2px rgba(5,34,20,.44)) drop-shadow(0 10px 7px rgba(5,34,20,.20)) !important;
}

/* Session 90 — course-logo background aligned with the translucent hero card. */
.landing-page .course-card .course-icon,
.landing-page .course-detail-head .course-icon {
  background: linear-gradient(135deg, rgba(6, 59, 39, .76), rgba(10, 83, 56, .62)) !important;
  border-color: rgba(202, 244, 218, .24) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 9px 18px rgba(6,59,39,.20) !important;
}
.landing-page .course-card .course-icon::after,
.landing-page .course-detail-head .course-icon::after {
  display: none !important;
  content: none !important;
  background: none !important;
  box-shadow: none !important;
}


/* Session 77 — center the login panel more comfortably and provide a public-home return action. */
.login-home-link {
  align-self: flex-start;
  min-height: 36px;
  margin-top: 20px;
  padding: 8px 12px;
  border-color: var(--line-strong);
  font-size: 11px;
  font-weight: 750;
}
.login-home-link:hover {
  border-color: var(--lime-deep);
}
@media (min-width: 981px) and (max-width: 1160px) {
  .login-page {
    grid-template-columns: minmax(500px, 48vw) minmax(0, 1fr);
  }
}
@media (min-width: 1161px) {
  .login-page {
    grid-template-columns: minmax(560px, 38vw) minmax(0, 1fr);
  }
}
@media (max-width: 980px) {
  .login-home-link {
    margin-top: 17px;
  }
}


/* Session 78 — horizontal Login/Home page transition and aligned login header. */
.login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.login-head .login-brand {
  min-width: 0;
}
.login-head .login-home-link {
  align-self: center;
  flex: 0 0 auto;
  margin-top: 0;
  white-space: nowrap;
}
.login-page,
.public-shell {
  backface-visibility: hidden;
}
.login-page.page-enter-from-left,
.public-shell.page-enter-from-left,
.login-page.page-enter-from-right,
.public-shell.page-enter-from-right,
.login-page.page-exit-to-login,
.public-shell.page-exit-to-login,
.login-page.page-exit-to-home,
.public-shell.page-exit-to-home {
  will-change: transform, opacity;
}
.login-page.page-enter-from-left,
.public-shell.page-enter-from-left {
  animation: dm-page-enter-from-left .46s cubic-bezier(.22, .8, .24, 1) both;
}
.login-page.page-enter-from-right,
.public-shell.page-enter-from-right {
  animation: dm-page-enter-from-right .46s cubic-bezier(.22, .8, .24, 1) both;
}
.login-page.page-exit-to-login,
.public-shell.page-exit-to-login {
  animation: dm-page-exit-to-login .38s cubic-bezier(.6, 0, .8, .2) both;
  pointer-events: none;
}
.login-page.page-exit-to-home,
.public-shell.page-exit-to-home {
  animation: dm-page-exit-to-home .38s cubic-bezier(.6, 0, .8, .2) both;
  pointer-events: none;
}
@keyframes dm-page-enter-from-left {
  from { opacity: 0; transform: translate3d(-9vw, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes dm-page-enter-from-right {
  from { opacity: 0; transform: translate3d(9vw, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes dm-page-exit-to-login {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(9vw, 0, 0); }
}
@keyframes dm-page-exit-to-home {
  from { opacity: 1; transform: translate3d(0, 0, 0); }
  to { opacity: 0; transform: translate3d(-9vw, 0, 0); }
}
@media (max-width: 540px) {
  .login-head { gap: 10px; }
  .login-head .login-brand { font-size: 18px; }
  .login-head .login-home-link { padding: 7px 9px; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-page,
  .public-shell,
  .login-page.page-enter-from-left,
  .public-shell.page-enter-from-left,
  .login-page.page-enter-from-right,
  .public-shell.page-enter-from-right,
  .login-page.page-exit-to-login,
  .public-shell.page-exit-to-login,
  .login-page.page-exit-to-home,
  .public-shell.page-exit-to-home {
    animation: none !important;
    transform: none !important;
    transition: none !important;
  }
}


/* Session 79 — keep homepage top information fixed and make active navigation single-source. */
.public-shell > .public-topbar {
  position: fixed !important;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  width: 100%;
  box-sizing: border-box;
  transform: translateZ(0);
}
.public-shell .public-links a::after {
  display: none;
}
.public-shell .public-links a.active::after {
  display: block;
}
.public-shell .public-stage [id] {
  scroll-margin-top: 86px;
}
@media (max-width: 980px) {
  .public-shell .public-links {
    z-index: 101;
  }
  .public-shell .public-stage [id] {
    scroll-margin-top: 78px;
  }
}


/* Session 80 — runtime-safe public navigation override and cache-busted shell. */
body.public-page .public-shell .public-topbar-fixed {
  position: fixed !important;
  inset: 0 0 auto 0 !important;
  z-index: 100 !important;
  width: 100% !important;
  min-height: 68px;
  transform: translateZ(0);
}
html:has(.public-shell) {
  scroll-padding-top: 84px;
}
.public-shell .public-links a.active {
  background: rgba(166, 237, 28, .10);
  color: var(--ink);
}
.public-shell .public-links a:not(.active)::after {
  content: none !important;
}
.public-shell .public-links a.active::after {
  content: '' !important;
  display: block !important;
}


/* Session 82 — translucent homepage cards: reveal the background without sacrificing readability. */
.landing-page .landing-hero .hero-content {
  background: linear-gradient(135deg, rgba(6,59,39,.76), rgba(10,83,56,.62)) !important;
  border-color: rgba(202,244,218,.24) !important;
  box-shadow: 0 24px 60px rgba(6,59,39,.20), inset 0 1px 0 rgba(255,255,255,.12) !important;
  backdrop-filter: blur(10px) saturate(1.06);
  -webkit-backdrop-filter: blur(10px) saturate(1.06);
}
.landing-page .course-card,
.landing-page .landing-stat {
  background: color-mix(in srgb, var(--landing-card-bg) 64%, transparent) !important;
  backdrop-filter: blur(8px) saturate(1.04);
  -webkit-backdrop-filter: blur(8px) saturate(1.04);
}
:root[data-theme="dark"] .landing-page .course-card,
:root[data-theme="dark"] .landing-page .landing-stat {
  background: rgba(7,40,25,.58) !important;
}
:root[data-theme="light"] .landing-page .course-card,
:root[data-theme="light"] .landing-page .landing-stat {
  background: rgba(255,255,255,.68) !important;
}
.landing-page .course-card:hover {
  background: color-mix(in srgb, var(--landing-card-bg) 74%, transparent) !important;
}
.landing-page .landing-stat {
  box-shadow: inset 0 1px 0 var(--landing-card-highlight), 0 14px 34px rgba(0,0,0,.14) !important;
}
@media (prefers-reduced-transparency: reduce) {
  .landing-page .landing-hero .hero-content,
  .landing-page .course-card,
  .landing-page .landing-stat {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  :root[data-theme="dark"] .landing-page .course-card,
  :root[data-theme="dark"] .landing-page .landing-stat {
    background: rgba(7,40,25,.82) !important;
  }
  :root[data-theme="light"] .landing-page .course-card,
  :root[data-theme="light"] .landing-page .landing-stat {
    background: rgba(255,255,255,.90) !important;
  }
}

/* CMS Service Editor */
.cms-service-manager { display: grid; gap: 14px; }
.cms-service-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cms-service-item { position: relative; overflow: hidden; border: 1px solid var(--glass-border); border-radius: 14px; background: var(--surface-solid); box-shadow: var(--shadow-sm); }
.cms-service-slot-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 11px 11px 0; }
.cms-service-slot-label b { color: var(--ink); font-size: 12px; }
.cms-service-slot-label span { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.cms-service-preview { display: flex; align-items: center; gap: 12px; margin: 10px 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-muted); }
.cms-service-preview .feature-icon { flex: 0 0 42px; width: 42px; height: 42px; margin: 0; border-radius: 10px; font-size: 18px; }
.cms-service-preview div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.cms-service-preview strong { overflow: hidden; color: var(--ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cms-service-preview small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.cms-service-item-body { display: grid; gap: 10px; padding: 12px; }
.cms-service-item-body .form-field { gap: 4px; }
.cms-service-item-body .form-field span { font-size: 11px; font-weight: 700; }
.cms-service-json { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }

@media (max-width: 1024px) { .cms-service-items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cms-service-items { grid-template-columns: 1fr; } }

/* Eight-card service grid remains balanced on tablet widths. */
@media (max-width: 900px) and (min-width: 681px) {
  .landing-page .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
}

/* Session 84 — slightly lighter homepage glass surfaces. */
.landing-page .landing-hero .hero-content {
  background: linear-gradient(135deg, rgba(6, 59, 39, .68), rgba(10, 83, 56, .54)) !important;
  box-shadow: 0 24px 60px rgba(6, 59, 39, .16), inset 0 1px 0 rgba(255,255,255,.10) !important;
}

:root[data-theme="dark"] .landing-page .course-card,
:root[data-theme="dark"] .landing-page .landing-stat {
  background: rgba(7, 40, 25, .48) !important;
}

:root[data-theme="light"] .landing-page .course-card,
:root[data-theme="light"] .landing-page .landing-stat {
  background: rgba(255, 255, 255, .60) !important;
}

.landing-page .course-card:hover {
  background: rgba(7, 40, 25, .60) !important;
}

.landing-page .landing-hero .hero-content h1,
.landing-page .landing-hero .hero-content p,
.landing-page .landing-hero .hero-content label,
.landing-page .course-card h3,
.landing-page .course-card p,
.landing-page .landing-stat strong,
.landing-page .landing-stat span {
  text-shadow: 0 1px 9px rgba(0, 0, 0, .24);
}

@media (prefers-reduced-transparency: reduce) {
  .landing-page .landing-hero .hero-content {
    background: var(--gradient-hero) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  :root[data-theme="dark"] .landing-page .course-card,
  :root[data-theme="dark"] .landing-page .landing-stat {
    background: rgba(7, 40, 25, .82) !important;
  }
  :root[data-theme="light"] .landing-page .course-card,
  :root[data-theme="light"] .landing-page .landing-stat {
    background: rgba(255, 255, 255, .90) !important;
  }
}

/* Session 85 — homepage media viewers render as body-level portals. */
.gallery-viewer-backdrop,
.video-viewer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  box-sizing: border-box;
  isolation: isolate;
}

.gallery-viewer-backdrop[hidden],
.video-viewer-backdrop[hidden] {
  display: none !important;
}

.gallery-viewer-shell,
.video-viewer-shell {
  box-sizing: border-box;
  max-width: min(1040px, calc(100vw - 32px));
}

@media (max-width: 680px) {
  .gallery-viewer-shell,
  .video-viewer-shell {
    max-width: calc(100vw - 20px);
  }
}

/* ===== Chat attachment viewer + download icon (Fix 1 + Fix 2) ===== */
.chat-attachment-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin-top: 8px;
  vertical-align: top;
}
.chat-attachment-wrap .chat-attachment {
  margin-top: 0;
}
.chat-attachment-wrap.image {
  display: block;
  max-width: min(280px, 100%);
}
.chat-attachment-wrap.video .chat-attachment,
.chat-attachment-wrap.file .chat-attachment {
  display: flex;
}
.chat-attachment-download {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(15, 23, 12, 0.62);
  color: #fff;
  opacity: 0;
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  z-index: 3;
  text-decoration: none;
  cursor: pointer;
  border: 0;
}
.chat-attachment-wrap:hover .chat-attachment-download {
  opacity: 1;
}
.chat-attachment-download:hover {
  transform: scale(1.08);
  background: rgba(15, 23, 12, 0.85);
}
.chat-attachment-download:focus-visible {
  opacity: 1;
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}
.chat-attachment-download svg {
  width: 16px;
  height: 16px;
  display: block;
}
/* For image attachments, always show the download button (touch-friendly) */
.chat-attachment-wrap.image .chat-attachment-download {
  opacity: 0.88;
}
/* When image fails to load (broken), the wrap shows a fallback icon */
.chat-attachment-wrap.is-missing .chat-attachment-download {
  opacity: 0.55;
}
.chat-attachment-wrap.is-missing::after {
  content: 'Tệp không truy cập được';
  display: block;
  font-size: 10px;
  color: var(--danger, #d22);
  padding: 4px 6px 0;
}
/* Ensure the broken-image detection in app.js still styles .chat-attachment.is-missing */
.chat-attachment-wrap .chat-attachment.is-missing {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  padding: 8px;
}

/* ===== Chat widget minimize + new message notification (Fix 3) ===== */
.widget-header {
  position: relative;
  cursor: default;
}
.widget-panel.is-minimized .widget-header {
  cursor: pointer;
}
.widget-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
}
.widget-title-icon {
  display: inline-block;
  line-height: 1;
}
.widget-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.widget-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px var(--surface-solid, #fff), 0 0 10px rgba(34, 197, 94, 0.75);
  margin-left: 8px;
  display: inline-block;
  flex: 0 0 auto;
}
.widget-panel.is-minimized .widget-body,
.widget-panel.is-minimized #chat-active,
.widget-panel.is-minimized #chat-start {
  display: none !important;
}
.widget-panel.is-minimized {
  width: auto;
  min-width: 0;
  border-radius: 16px;
  overflow: hidden;
}
.widget-panel.is-minimized .widget-header {
  padding: 10px 14px;
  border-radius: 16px;
}

/* New message animation — wiggle for widget (header-only or full) */
@keyframes widget-wiggle {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-2.5deg); }
  40% { transform: rotate(2.5deg); }
  60% { transform: rotate(-1.5deg); }
  80% { transform: rotate(1.5deg); }
}
.widget-panel.has-new-message {
  animation: widget-wiggle 0.7s ease-in-out 4;
}
.widget-panel.has-new-message.is-minimized {
  animation: widget-wiggle 0.7s ease-in-out 4;
}
.widget-panel.has-new-message .widget-header {
  box-shadow: inset 0 0 0 2px rgba(34, 197, 94, 0.55);
}

/* New message on floating chat button (when widget is fully closed) */
@keyframes floating-chat-wiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(-8deg) scale(1.05); }
  40% { transform: rotate(8deg) scale(1.05); }
  60% { transform: rotate(-5deg) scale(1.03); }
  80% { transform: rotate(5deg) scale(1.03); }
}
.floating-action.has-new-message {
  animation: floating-chat-wiggle 0.7s ease-in-out 4;
  position: relative;
}
.floating-action.has-new-message::after {
  content: '';
  position: absolute;
  top: 4px;
  right: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #22c55e;
  border: 2px solid var(--surface-solid, #fff);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.85);
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .widget-panel.has-new-message,
  .widget-panel.has-new-message.is-minimized,
  .floating-action.has-new-message {
    animation: none;
  }
}


/* Session 87 — shared in-app attachment viewer triggers for CT guest/inbox and IC */
.chat-attachment.attachment-view-trigger {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  cursor: pointer;
}
.chat-attachment.file-attachment.attachment-view-trigger {
  text-align: left;
}
.chat-attachment.attachment-view-trigger:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}
.chat-attachment.attachment-view-trigger .media-preview {
  pointer-events: none;
}
.chat-attachment.attachment-view-trigger .attachment-icon,
.chat-attachment.attachment-view-trigger > span:last-child {
  pointer-events: none;
}
.chat-attachment.attachment-view-trigger:hover {
  border-color: var(--teal);
}
.chat-attachment.attachment-view-trigger.media-attachment:hover {
  border-color: transparent;
}
.chat-attachment.attachment-view-trigger.file-attachment {
  width: 100%;
}
.chat-attachment.attachment-view-trigger.file-attachment .attachment-icon {
  flex: 0 0 30px;
}

@media (prefers-reduced-motion: reduce) {
  .chat-attachment.attachment-view-trigger {
    transition: none;
  }
}


/* Typography refactor preview — Outfit for brand headings, Manrope for UI/body. */
:root,
body,
.app-shell,
.login-page,
.public-shell,
.landing-page,
button,
input,
select,
textarea {
  font-family: var(--font-ui);
}

/* Public brand/display hierarchy. */
.landing-page h1,
.landing-page h2,
.landing-page h3,
.landing-page .hero-content h1,
.landing-page .section-heading h2,
.landing-page .course-detail-head h2 {
  font-family: var(--font-display);
}

/* Admin SaaS UI hierarchy. */
.app-shell h1,
.app-shell h2,
.app-shell h3,
.app-shell h4,
.sidebar,
.topbar,
.nav-menu,
.data-table,
.data-table th,
.data-table td,
.form-field,
.form-stack,
.button,
.mini-button,
.tag,
.badge,
.modal,
.dropdown,
.toast,
.pagination,
.tabs,
.profile-panel {
  font-family: var(--font-ui);
}

.app-shell .nav-menu a {
  font-size: 13px;
  font-weight: 500;
}
.app-shell .data-table th {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .035em;
  line-height: 1.4;
}
.app-shell .data-table td {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}
.app-shell .button,
.app-shell .mini-button {
  font-size: 13px;
  font-weight: 600;
}
.app-shell .tag,
.app-shell .badge {
  font-size: 11px;
  font-weight: 600;
}
.app-shell .card,
.app-shell .table-wrap,
.app-shell .form-field,
.app-shell .profile-panel,
.app-shell .toast {
  line-height: 1.5;
}

/* Technical values only. */
.cms-json-input,
.password-hint b,
[data-mono],
code,
pre {
  font-family: var(--font-mono);
}


/* Session 92 — responsive admin list tables and CT inbox readability. */
.data-table th,
.data-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}
.data-table th {
  line-height: 1.35;
}
.data-table td {
  line-height: 1.45;
}
.data-table td .tag,
.data-table td .mini-button,
.data-table td select,
.data-table td input {
  max-width: 100%;
}
.table-wrap:has(.lead-row) .data-table {
  min-width: 1000px;
}
.lead-content-cell {
  max-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: normal !important;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.lead-status-cell,
.lead-actions-cell,
.lead-status-cell .tag,
.lead-actions-cell .mini-button,
.lead-convert-button {
  white-space: nowrap !important;
}
.lead-name-cell b,
.lead-name-cell small {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

/* Session 95 — CRITICAL FIX part 2: Session 92 also added this UNCONDITIONAL
   .split-chat override at the end of the file, which beat the (max-width:
   680px) stacked rule on phones too (grid collapsed to 310px + 8px). Wrap it
   in a desktop-only media query so it can never touch phone/tablet widths. */
@media (min-width: 821px) {
  .split-chat {
    grid-template-columns: minmax(250px, 310px) minmax(0, 1fr);
  }
  .chat-list,
  .chat-window {
    min-width: 0;
  }
}
/* Session 95 — dashboard main grid uses inline minmax(0, …) columns so its
   tracks can shrink; collapse to one column on phones (!important beats the
   inline style) so the activity table scrolls inside .table-wrap instead of
   stretching the page sideways. */
@media (max-width: 680px) {
  .grid.dashboard-grid {
    grid-template-columns: 1fr !important;
  }
  .grid.dashboard-grid > .card {
    min-width: 0;
  }
}
/* Session 96 — Session 92 left an unconditional `.chat-contact { align-items:
   flex-start }` here that beat the base `align-items: center` (line ~566).
   Result: avatar / name+preview / OPEN tag were all TOP-aligned inside each
   row (user screenshot 2026-09-02 — "nội dung danh sách phiên chat" bug: rows
   looked squashed toward the top edge, the OPEN pill floated high). Rows are
   single-line (nowrap + ellipsis, see below), so center alignment is correct
   and restores an even, vertically-balanced row. */
.chat-contact {
  align-items: center;
}
.contact-meta {
  min-width: 0;
  overflow: hidden;
}
/* Session 95 — inbox list rows must stay single-line with ellipsis so every
   row keeps an even height; Session 92's word-wrap made rows ragged (tall
   uneven blocks) and squeezed the status tag out of the row. Full text stays
   available via the title attribute added in app.js. */
.contact-meta b,
.contact-meta small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-contact > .tag {
  white-space: nowrap;
}
.chat-window-head {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.message {
  max-height: none;
  overflow: visible;
}
.message-body {
  max-height: 240px;
  overflow-y: auto;
}
/* Session 95 — CRITICAL FIX: Session 92 shipped a (max-width: 820px) override
   with a 2-column grid at the END of this file. Later + same specificity beat
   the stacked mobile layout in the (max-width: 680px) block above, so phones
   rendered 220px list + ~78px chat window (clipped content, composer jammed
   against the edge — see user screenshots). Restrict the 2-column squeeze to
   the tablet band ONLY; phones get the stacked 1-column layout again. */
@media (min-width: 681px) and (max-width: 820px) {
  .split-chat {
    grid-template-columns: minmax(200px, 32%) minmax(0, 1fr);
  }
  .chat-contact {
    gap: 8px;
    padding-inline: 11px;
  }
  .chat-contact > .tag {
    display: none;
  }
}

/* ============================================================
   Session 96 — Hộp thư chat (CTA0_0200) dialog + list layout fix
   (user screenshot 2026-09-02 09:45)
   Bug 1: .messages was display:grid with align-content:start, so a short
   conversation piled every bubble at the TOP of the tall conversation area
   leaving a huge void above the composer; the last staff bubble ("adf")
   looked detached / floating mid-window. Standard chat UX anchors the
   conversation to the BOTTOM. Fix: flex column + a ::before spacer whose
   margin-bottom:auto absorbs the free space (auto margins resolve BEFORE
   flex-grow, and collapse to 0 when content overflows, so scrolling from
   the top never breaks — unlike justify-content:flex-end / grid
   align-content:end which make top overflow unreachable).
   Bug 2: the admin inbox session list had no scroll region on desktop, so
   once rows exceeded the .split-chat height they were clipped by
   .split-chat{overflow:hidden} and unreachable. Fix: chat-list becomes a
   flex column (fixed head + scrollable #chat-session-list).
   ============================================================ */
.messages {
  display: flex;
  flex-direction: column;
}
.messages::before {
  content: '';
  flex: 0 0 0;
  margin-bottom: auto; /* anchor the conversation to the bottom */
}
.messages:has(> .empty)::before {
  content: none; /* empty state fills the area itself — no bottom anchor */
}
.messages > .message {
  align-self: flex-start;
}
.messages > .message.me {
  align-self: flex-end;
}
.messages > .empty {
  flex: 1 1 auto;
  align-self: stretch;
}
/* Admin inbox (CTA0_0200) only — keep the internal-chat picker untouched. */
[data-chat-inbox] .chat-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
[data-chat-inbox] .chat-list > .chat-list-head {
  flex: 0 0 auto;
}
[data-chat-inbox] #chat-session-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ============================================================
   Session 97 — Hộp thư chat (CTA0_0200): đóng phiên chat + icon ghim
   Nút "Đóng phiên" nằm trong .chat-window-head; staff/admin đóng phiên
   đã xử lý xong → session CLOSED rời inbox, guest widget tự reset và
   scheduler dọn dữ liệu sau 2 ngày (app.chat.closed-retention-hours).
   Icon đính kèm composer đổi từ ký tự ▤ sang SVG paperclip theo ảnh
   tham chiếu người dùng (hình 1, 2026-09-02).
   ============================================================ */
.chat-window-head { gap: 12px; justify-content: space-between; }
.chat-window-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-close-button {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  border: 1px solid #f0ddb5; border-radius: 99px; padding: 6px 12px;
  background: #fff3df; color: #926216; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.chat-close-button:hover { transform: translateY(-1px); filter: brightness(1.04); }
.chat-close-button svg { width: 13px; height: 13px; display: block; }
.chat-close-button[disabled] { opacity: .6; cursor: progress; transform: none; }
[data-theme="dark"] .chat-close-button { border-color: rgba(240, 221, 181, .4); background: rgba(146, 98, 22, .22); color: #f0ddb5; }
.file-button svg.file-button-icon { width: 16px; height: 16px; display: block; }
.chat-compose-row .file-button svg.file-button-icon { width: 15px; height: 15px; }
.widget-session-note {
  margin: 0 0 12px; border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; background: var(--surface-muted); color: var(--muted);
  font-size: 11px; line-height: 1.5;
}

/* ============================================================
   Session 98 — Chat với Học viên (CTA0_0300) / Chat với Trung
   Tâm (CTA0_0400) + thông báo lead mới trong chuông thông báo.
   ============================================================ */
.chat-window-actions { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; min-width: 0; }
.chat-claim-button {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  border: 1px solid #c9e6b8; border-radius: 99px; padding: 6px 12px;
  background: #e9f7dd; color: #2f7d1f; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.chat-claim-button:hover { transform: translateY(-1px); filter: brightness(1.04); }
.chat-claim-button svg { width: 13px; height: 13px; display: block; }
.chat-claim-button[disabled] { opacity: .6; cursor: progress; transform: none; }
[data-theme="dark"] .chat-claim-button { border-color: rgba(201, 230, 184, .4); background: rgba(47, 125, 31, .22); color: #c9e6b8; }
.chat-delete-button {
  display: inline-flex; align-items: center; gap: 7px; flex: 0 0 auto;
  border: 1px solid #f2c4bd; border-radius: 99px; padding: 6px 12px;
  background: #fdedeb; color: #b3372b; font-size: 10px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, filter .18s ease;
}
.chat-delete-button:hover { transform: translateY(-1px); filter: brightness(1.02); }
.chat-delete-button svg { width: 13px; height: 13px; display: block; }
.chat-delete-button[disabled] { opacity: .6; cursor: progress; transform: none; }
[data-theme="dark"] .chat-delete-button { border-color: rgba(242, 196, 189, .4); background: rgba(179, 55, 43, .22); color: #f2c4bd; }
.student-assignee-chip {
  flex: 0 0 auto; max-width: 160px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 10px; background: var(--surface-muted); color: var(--muted);
  font-size: 10.5px; font-weight: 700;
}
.student-create-button { width: 100%; margin-top: 10px; justify-content: center; }
.student-create-button svg { flex: 0 0 auto; }
.chat-contact.has-unread .contact-meta b { color: var(--ink); font-weight: 800; }
.chat-contact .chat-contact-unread { display: none; flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; background: #ff3b30; box-shadow: 0 0 0 2px rgba(255,59,48,.18); }
.chat-contact.has-unread .chat-contact-unread { display: block; }
.notification-item-icon svg { width: 15px; height: 15px; display: block; fill: currentColor; }
.notification-item.unread .notification-item-icon svg { fill: currentColor; }
@media (max-width: 680px) {
  .chat-window-actions { gap: 6px; }
  .chat-window-actions .chat-claim-button, .chat-window-actions .chat-delete-button { padding: 5px 9px; font-size: 9px; }
  .chat-window-actions .chat-claim-button span, .chat-window-actions .chat-delete-button span { display: none; }
  .student-assignee-chip { max-width: 110px; font-size: 9.5px; }
}

/* ============================================================
   Session 102 — Hộp thư chat: luồng nhận phiên (claim) + Dashboard Học viên
   ============================================================ */

.chat-contact .chat-contact-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.chat-contact .chat-claim-tag { font-size: 9px; padding: 2px 8px; border-radius: 99px; white-space: nowrap; }
.chat-readonly-note {
  display: flex; align-items: center; gap: 9px; margin: 0 0 10px;
  border: 1px solid rgba(146, 98, 22, .35); border-radius: 12px;
  padding: 10px 14px; background: rgba(146, 98, 22, .12); color: #8a5f16;
  font-size: 12.5px; font-weight: 600;
}
.chat-readonly-note svg { width: 15px; height: 15px; flex: 0 0 auto; }
[data-theme="dark"] .chat-readonly-note { border-color: rgba(240, 221, 181, .35); background: rgba(146, 98, 22, .24); color: #f0ddb5; }
@media (max-width: 680px) {
  .chat-contact .chat-contact-tags { flex-direction: row; align-items: center; gap: 3px; }
  .chat-readonly-note { font-size: 11.5px; padding: 8px 11px; }
}

/* ——— Dashboard Học viên (CTA0_0500) ——— */
.student-dashboard { display: block; }
.dash-header {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 22px 24px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(135deg, rgba(16, 185, 129, .16), rgba(5, 150, 105, .07));
  margin-bottom: 18px; flex-wrap: wrap;
}
.dash-header-main { display: block; min-width: 0; flex: 1 1 320px; }
.dash-header-main .section-title { margin: 6px 0 8px; }
.dash-header-tags { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dash-header-avatar {
  width: 58px; height: 58px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 22px; font-weight: 800;
  color: #ecfdf5; background: linear-gradient(135deg, #059669, #10b981);
  border: 3px solid rgba(255, 255, 255, .65); box-shadow: 0 10px 24px rgba(5, 150, 105, .35);
}
[data-theme="dark"] .dash-header-avatar { border-color: rgba(6, 78, 59, .8); }
.dash-section { display: block; margin: 0 0 18px; }
.dash-section-title { font-size: 14px; font-weight: 800; color: var(--ink); margin: 0 0 12px; letter-spacing: .2px; }
.dash-score-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px;
}
.dash-score-card {
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  background: var(--surface); display: flex; flex-direction: column; gap: 4px;
  transition: transform .16s ease, box-shadow .16s ease;
}
.dash-score-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(5, 150, 105, .14); }
.dash-score-card.is-empty { opacity: .62; }
.dash-score-label { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.dash-score-value { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.dash-score-card:not(.is-empty) .dash-score-value { color: #059669; }
[data-theme="dark"] .dash-score-card:not(.is-empty) .dash-score-value { color: #34d399; }
.dash-score-scale { font-size: 10.5px; color: var(--muted); }
.dash-two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.dash-progress-stack { display: flex; flex-direction: column; gap: 14px; }
.dash-progress-block { display: block; }
.dash-progress-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dash-progress-head span { font-size: 12.5px; font-weight: 700; color: var(--ink); }
.dash-progress-head b { font-size: 12px; color: var(--muted); font-weight: 800; }
.dash-progress-track { height: 10px; border-radius: 99px; background: var(--surface-muted); overflow: hidden; border: 1px solid var(--line); }
.dash-progress-bar { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #10b981, #059669); transition: width .5s ease; }
.dash-progress-bar.is-empty { background: repeating-linear-gradient(90deg, rgba(148, 163, 184, .3) 0 8px, transparent 8px 16px); }
.dash-schedule-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.dash-schedule-item {
  display: flex; align-items: center; gap: 10px; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 14px; background: var(--surface);
}
.dash-schedule-item svg { width: 16px; height: 16px; color: #059669; flex: 0 0 auto; }
[data-theme="dark"] .dash-schedule-item svg { color: #34d399; }
.dash-schedule-title { font-size: 12.5px; font-weight: 700; color: var(--ink); flex: 1 1 auto; min-width: 0; }
.dash-schedule-date { font-size: 11.5px; font-weight: 800; color: var(--muted); flex: 0 0 auto; }
.dash-teacher-note { border-left: 3px solid #10b981; border-radius: 0 12px 12px 0; background: var(--surface-muted); padding: 12px 16px; }
.dash-teacher-note-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; color: #059669; }
[data-theme="dark"] .dash-teacher-note-head { color: #34d399; }
.dash-teacher-note-head svg { width: 14px; height: 14px; }
.dash-teacher-note-head b { font-size: 12px; }
.dash-teacher-note p { margin: 0; font-size: 13px; color: var(--ink); line-height: 1.55; white-space: pre-wrap; }
.dash-empty-note { margin: 0; font-size: 12.5px; }
.dash-updated-at { margin: 10px 0 0; font-size: 11.5px; }
@media (max-width: 900px) { .dash-two-col { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 680px) {
  .dash-header { padding: 16px; }
  .dash-header-avatar { width: 44px; height: 44px; font-size: 17px; }
  .dash-score-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-score-value { font-size: 21px; }
}

/* ——— Editor Dashboard trong Quản lý người dùng (MSA0_0200) ——— */
.dash-editor-modal { max-width: 620px; }
.dash-editor-group { display: block; margin: 0 0 16px; }
.dash-editor-group > b { display: block; font-size: 12px; font-weight: 800; color: var(--ink); margin-bottom: 10px; }
.dash-editor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 10px; }
.dash-schedule-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.dash-schedule-row .mini-button { padding: 7px 10px; }
@media (max-width: 680px) {
  .dash-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-schedule-row { grid-template-columns: minmax(0, 1fr); }
}
