/* AI Business Academy — design system (tokens + shared components).
   Palette from the approved prototypes (Lesson Player v2). */

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Brand */
  --deep: #073b3a;
  --deep-2: #052c2c;
  --teal: #087f72;
  --teal-strong: #079d8d;
  --mint: #43c6a5;
  --mint-soft: #e3f6f0;
  /* Accents with a purpose */
  --orange: #ff790f;          /* primary CTA */
  --orange-2: #f45a08;
  --orange-soft: #fff1e4;
  --purple: #8b5cf6;          /* AI / AI Mentor */
  --purple-soft: #f1ecff;
  --blue: #2f7fe0;            /* information, analytics */
  --blue-soft: #eaf3fe;
  --green: #12a46f;           /* success, completed */
  --green-soft: #e6f6ef;
  --red: #d9443a;             /* errors, warnings */
  --red-soft: #fdecea;
  /* Neutrals */
  --ink: #111b2c;
  --ink-2: #26354c;
  --muted: #58677d;
  --line: #e1e8ef;
  --line-strong: #d1dbe5;
  --bg: #f6f8fa;
  --surface: #ffffff;
  /* Shape */
  --r-sm: 8px;
  --r: 10px;
  --r-lg: 12px;
  --shadow: 0 1px 2px rgba(17, 27, 44, .04), 0 4px 14px rgba(17, 27, 44, .05);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --sidebar-w: 232px;
  --topbar-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
/* Form controls do not inherit fonts by default — this caused the serif buttons in the prototypes. */
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.02em; }
h1 { font-size: 28px; font-weight: 800; }
h2 { font-size: 19px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
small, .small { font-size: 12px; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r-sm); z-index: 100; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--teal-strong); outline-offset: 2px; }

/* ---------- App shell ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 30;
  display: flex; flex-direction: column; padding: 18px 14px 16px; overflow-y: auto;
  color: #fff;
  background:
    radial-gradient(120% 60% at -10% 105%, rgba(67, 198, 165, .55) 0%, rgba(67, 198, 165, .18) 30%, transparent 58%),
    linear-gradient(180deg, var(--deep-2) 0%, #04413e 70%, #06403d 100%);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 26px; color: #fff; font-weight: 800; font-size: 16px; line-height: 1.1; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { font-size: 44px; line-height: .8; font-weight: 800; color: #16b99e; letter-spacing: -.06em; }
.nav { display: grid; gap: 3px; }
.nav a, .nav button {
  display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px; width: 100%;
  border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer;
  color: #e8f6f3; font-size: 14px; font-weight: 600; text-align: left;
}
.nav a:hover, .nav button:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--teal-strong); color: #fff; box-shadow: inset 0 0 0 1px rgba(68, 212, 187, .4); }
.nav img { width: 20px; height: 20px; filter: brightness(0) invert(1); opacity: .95; }
.nav-bottom { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .18); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 32px;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
.topbar .spacer { flex: 1; }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: var(--r-sm); background: transparent; cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--bg); }
.icon-btn img { width: 22px; height: 22px; }
.menu-toggle { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip .avatar { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; background: var(--mint-soft); color: var(--teal); font-weight: 800; font-size: 14px; }
.user-chip b { display: block; font-size: 13px; line-height: 1.2; }
.user-chip small { display: block; color: var(--muted); }

.lang-switch { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--r-sm); overflow: hidden; }
.lang-switch button { border: 0; background: #fff; padding: 6px 10px; font-size: 12px; font-weight: 700; color: var(--muted); cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--deep); color: #fff; }

.content { width: 100%; max-width: 1440px; margin: 0 auto; padding: 32px; flex: 1; }
.page-footer { max-width: 1440px; width: 100%; margin: 0 auto; padding: 8px 32px 24px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.card-pad { padding: 24px; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 44px; padding: 0 20px; border-radius: var(--r); border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: filter .15s ease, transform .15s ease;
}
.btn:hover { text-decoration: none; filter: brightness(1.04); }
.btn:active { transform: translateY(1px); }
.btn-cta { background: linear-gradient(100deg, #ff8b16, var(--orange-2)); color: #fff; box-shadow: 0 6px 16px rgba(255, 121, 15, .22); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-ai { background: var(--purple-soft); color: #6d3fe0; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-block { width: 100%; }
.btn img { width: 18px; height: 18px; }

.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 13px; color: var(--ink-2); }
.input {
  height: 46px; width: 100%; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r);
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 114, .14); }
.input-code { letter-spacing: .5em; font-size: 22px; font-weight: 800; text-align: center; padding-left: calc(14px + .5em); }

.alert { padding: 12px 14px; border-radius: var(--r); font-size: 13px; border: 1px solid; }
.alert-error { background: var(--red-soft); border-color: #f5c9c4; color: #8f2a22; }
.alert-info { background: var(--blue-soft); border-color: #cfe2fb; color: #1d4f8f; }
.alert-success { background: var(--green-soft); border-color: #c4e9d8; color: #0c6b49; }

.progress { height: 10px; background: #e3eaf1; border-radius: 99px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0aa991, var(--mint)); }

.stat { display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 48px; height: 48px; border-radius: var(--r); display: grid; place-items: center; }
.stat-icon.purple { background: var(--purple-soft); }
.stat-icon.green { background: var(--green-soft); }
.stat-icon.blue { background: var(--blue-soft); }
.stat-icon.orange { background: var(--orange-soft); }
.stat-icon img { width: 24px; height: 24px; }
.stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
.stat small { color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.badge-teal { background: var(--mint-soft); color: var(--teal); }
.badge-orange { background: var(--orange-soft); color: #c94f00; }
.badge-red { background: var(--red-soft); color: #a3302a; }
.badge-blue { background: var(--blue-soft); color: #1d5fb0; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.page-head p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.accent-dot { color: var(--orange); }

.empty { text-align: center; padding: 48px 24px; }
.empty h2 { margin-bottom: 8px; }
.empty p { color: var(--muted); max-width: 520px; margin: 0 auto; }

/* ---------- Auth layout ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 40px 48px; display: flex; flex-direction: column;
  background:
    radial-gradient(90% 55% at 0% 100%, rgba(67, 198, 165, .6) 0%, rgba(67, 198, 165, .15) 40%, transparent 70%),
    linear-gradient(160deg, var(--deep-2), #04413e);
}
.auth-brand .brand { padding: 0; }
.auth-brand .pitch { margin-top: auto; max-width: 440px; }
.auth-brand .pitch h1 { font-size: 30px; color: #fff; }
.auth-brand .pitch p { margin-top: 12px; color: #cfe9e4; font-size: 15px; }
.auth-form { display: flex; flex-direction: column; padding: 32px 48px; background: #fff; }
.auth-form .lang-row { display: flex; justify-content: flex-end; }
.auth-card { width: 100%; max-width: 420px; margin: auto; }
.auth-card h1 { font-size: 26px; margin-bottom: 8px; }
.auth-card .lead { color: var(--muted); margin-bottom: 24px; }
.auth-card form + form, .auth-card .divider { margin-top: 18px; }
.auth-card .foot { margin-top: 22px; font-size: 13px; color: var(--muted); }

/* ---------- Minimal + public ---------- */
.minimal { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.minimal .card { max-width: 520px; width: 100%; padding: 36px; text-align: center; }
.minimal h1 { font-size: 24px; margin-bottom: 10px; }
.minimal p { color: var(--muted); }
.minimal code { display: inline-block; margin-top: 12px; padding: 6px 10px; background: var(--bg); border-radius: var(--r-sm); font-weight: 700; }
.minimal pre { text-align: left; font-size: 11px; overflow: auto; max-height: 300px; background: var(--bg); padding: 12px; margin-top: 16px; }

.public-header { display: flex; align-items: center; gap: 24px; max-width: 1200px; margin: 0 auto; padding: 20px 24px; }
.public-header .brand { color: var(--deep); padding: 0; }
.public-header .spacer { flex: 1; }
.hero { max-width: 1200px; margin: 0 auto; padding: 72px 24px 96px; }
.hero h1 { font-size: 44px; max-width: 760px; letter-spacing: -.035em; }
.hero p { font-size: 18px; color: var(--muted); max-width: 640px; margin-top: 18px; }
.hero .actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .25); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(5, 20, 20, .4); z-index: 25; }
  .main { margin-left: 0; }
  .menu-toggle { display: grid; }
  .topbar { padding: 0 16px; }
  .content { padding: 20px 16px; }
  .user-chip span { display: none; }
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth-brand { padding: 18px 20px; min-height: 0; }
  .auth-card { margin: 24px auto auto; }
  .auth-brand .pitch { display: none; }
  .auth-form { padding: 24px 20px 40px; }
  .hero h1 { font-size: 32px; }
  .page-head { flex-direction: column; align-items: flex-start; }
}

/* ---------- Phase 2: forms, tables, steps, menus, dialogs ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }
select.input { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2358677d' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
textarea.input { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input[aria-invalid="true"] { border-color: var(--red); }
.field-error { color: var(--red); font-size: 12px; font-weight: 600; }
.help { color: var(--muted); font-size: 12px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--teal); flex-shrink: 0; }
.notice { margin-bottom: 20px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-title h2 { font-size: 17px; }
.mt-24 { margin-top: 24px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
.btn-link { background: none; border: 0; padding: 0; color: var(--teal); font-weight: 700; cursor: pointer; }
.btn-danger-text { color: var(--red); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fafbfc; }
.table td { padding: 12px 14px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .person b { display: block; font-weight: 700; }
.table .person small { color: var(--muted); }
.table tr.is-muted td { color: var(--muted); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; padding: 16px; border-bottom: 1px solid var(--line); }
.toolbar .field { min-width: 160px; }
.toolbar .grow { flex: 1; min-width: 220px; }
.toolbar .input { height: 40px; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager .row-actions a { font-weight: 700; }

.menu { position: relative; display: inline-block; }
.menu > summary { list-style: none; cursor: pointer; width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line); background: #fff; font-weight: 800; letter-spacing: 1px; color: var(--muted); }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary { border-color: var(--teal); color: var(--teal); }
.menu-panel { position: absolute; right: 0; top: 40px; z-index: 15; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 12px 32px rgba(17, 27, 44, .14); padding: 6px; }
.menu-panel form { margin: 0; }
.menu-panel button.item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; }
.menu-panel button.item:hover { background: var(--bg); }
.menu-panel .item.danger { color: var(--red); }
.menu-panel hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-panel .inline { display: flex; gap: 6px; padding: 6px; }
.menu-panel .inline select { height: 34px; flex: 1; }

.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 24px; counter-reset: step; flex-wrap: wrap; }
.steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 8px 14px 8px 8px; border-radius: 99px; background: #fff; border: 1px solid var(--line); }
.steps li::before { counter-increment: step; content: counter(step); width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); font-size: 12px; }
.steps li.is-current { color: var(--ink); border-color: var(--teal); }
.steps li.is-current::before { background: var(--teal); color: #fff; }
.steps li.is-done::before { content: "✓"; background: var(--green-soft); color: var(--green); }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 24px; margin-bottom: 24px; border-radius: var(--r-lg); background: linear-gradient(100deg, var(--orange-soft), #fff 70%); border: 1px solid #fbd9bb; }
.banner h2 { font-size: 16px; }
.banner p { color: var(--ink-2); font-size: 13px; margin-top: 4px; }

.code-box { display: inline-flex; align-items: center; gap: 12px; font-size: 26px; font-weight: 800; letter-spacing: .12em; padding: 12px 18px; border-radius: var(--r); background: var(--mint-soft); color: var(--deep); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid #eef2f6; }
.list-plain li:last-child { border-bottom: 0; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }

dialog.confirm { border: 0; border-radius: var(--r-lg); padding: 24px; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 24px 60px rgba(17, 27, 44, .25); }
dialog.confirm::backdrop { background: rgba(5, 20, 20, .45); }
dialog.confirm p { font-size: 14px; margin-bottom: 20px; }
dialog.confirm .row-actions { justify-content: flex-end; }

.auth-card-wide { max-width: 560px; }
@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .form-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: 1fr; }
  .banner { flex-direction: column; align-items: flex-start; }
  .table .hide-sm { display: none; }
}
a.card { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.card:hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(17, 27, 44, .08); text-decoration: none; }
.menu-panel { min-width: 300px; }
details.card > summary { list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::after { content: "+"; font-size: 22px; font-weight: 600; color: var(--teal); line-height: 1; }
details.card[open] > summary::after { content: "–"; }
@media (max-width: 700px) {
  .toolbar .field, .toolbar .grow { flex: 1 1 100%; min-width: 0; }
  .toolbar .row-actions { width: 100%; }
}

/* ---------- Phase 4: employee dashboard (from the Dashboard prototype) ---------- */
.welcome { display: grid; grid-template-columns: 1fr minmax(320px, .8fr); gap: 32px; align-items: center; margin-bottom: 32px; }
.welcome h1 { font-size: 30px; margin-bottom: 6px; }
.welcome p { color: var(--ink-2); font-size: 15px; }
.overall > b { display: block; font-size: 16px; margin-bottom: 12px; }
.overall-row { display: flex; align-items: center; gap: 16px; }
.overall-row .progress { flex: 1; }
.overall-row strong { font-size: 17px; white-space: nowrap; }
.overall-row small { font-size: 13px; font-weight: 500; }
.overall.compact { min-width: 260px; }
.progress-lg { height: 14px; }
.primary-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); gap: 24px; align-items: stretch; }
.continue-card { padding: 20px 24px; display: grid; grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.15fr); gap: 28px; align-items: center; }
.hero-image { width: 100%; height: 250px; object-fit: cover; border-radius: 11px; background: #dff4ef; }
.continue-label { display: inline-flex; align-items: center; gap: 8px; background: var(--orange-soft); color: #d65400; padding: 6px 12px; border-radius: 99px; font-weight: 800; font-size: 12px; margin-bottom: 18px; }
.continue-label.done { background: var(--green-soft); color: var(--green); }
.continue-label img { width: 16px; height: 16px; }
.module-name { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.continue-info h2 { font-size: 21px; line-height: 1.3; margin-bottom: 16px; }
.lesson-meta { display: flex; gap: 18px; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.lesson-meta span { display: flex; align-items: center; gap: 7px; }
.lesson-meta img { width: 18px; height: 18px; }
.btn-lg { height: 52px; font-size: 15px; }
.path-card { padding: 18px 22px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card-heading h2 { font-size: 18px; }
.card-heading > span { font-size: 12px; color: var(--muted); }
.path-list { list-style: none; padding: 0; margin: 0; }
.path-list li { display: flex; align-items: center; gap: 12px; min-height: 40px; border-bottom: 1px solid #edf1f5; padding: 0 8px; font-size: 13px; }
.path-list li:last-child { border-bottom: 0; }
.path-list li b { font-weight: 600; flex: 1; }
.path-list .step { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #cdd7e1; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.path-list li.done .step { background: var(--teal-strong); border-color: var(--teal-strong); color: #fff; }
.path-list li.current { background: var(--orange-soft); border-radius: 9px; border-bottom-color: transparent; }
.path-list li.current .step { border-color: var(--orange); color: var(--orange); }
.path-list em { font-style: normal; font-weight: 800; font-size: 12px; color: #d65400; background: #ffe3cc; padding: 2px 8px; border-radius: 99px; }
.path-list img { width: 18px; height: 18px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); padding: 18px 24px; margin-top: 24px; gap: 16px; }

/* Program page */
.module-stack { display: grid; gap: 16px; }
.module-card { padding: 20px 22px; }
.module-card header { display: flex; gap: 14px; align-items: flex-start; }
.module-card header > div { flex: 1; }
.module-card header small { color: var(--muted); font-weight: 600; }
.module-card header h2 { font-size: 17px; margin: 2px 0 4px; }
.module-card header p { color: var(--muted); font-size: 13px; }
.module-card .step { width: 32px; height: 32px; border-radius: 9px; background: var(--deep); color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; }
.module-card.state-done .step { background: var(--teal-strong); }
.module-card.state-locked { opacity: .7; }
.module-card.state-locked .step { background: #c9d3dc; }
.lesson-rows { list-style: none; padding: 0; margin: 14px 0 0 46px; display: grid; gap: 4px; }
.lesson-rows li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bg); font-size: 13px; }
.lesson-rows .lesson-title { flex: 1; font-weight: 700; color: var(--ink); }
.lesson-rows a.lesson-title:hover { color: var(--teal); }
.lesson-rows li.status-locked .lesson-title { color: var(--muted); font-weight: 600; }

/* ---------- Lesson Player (from the Lesson Player prototype) ---------- */
.modulebar { display: flex; align-items: center; gap: 20px; padding: 14px 20px; margin-bottom: 18px; }
.modulebar-title { flex: 1; display: grid; gap: 6px; max-width: 520px; }
.modulebar-title b { font-size: 14px; }
.modulebar-pct { font-size: 15px; }
.lesson-nav { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.nav-arrow { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-size: 20px; color: var(--ink); background: #fff; }
.nav-arrow:hover { text-decoration: none; border-color: var(--teal); }
.nav-arrow.is-disabled { opacity: .35; }
.lesson-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.lesson-main { padding: 18px 22px 20px; }
.lesson-hero { display: grid; grid-template-columns: 1fr 200px; gap: 20px; align-items: center; padding: 22px 26px; border-radius: var(--r-lg); background: linear-gradient(110deg, #f3fbf8, #eef8f5); }
.lesson-hero .meta { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; color: var(--muted); }
.lesson-hero h1 { font-size: 26px; margin-bottom: 8px; }
.lesson-hero p { color: var(--ink-2); }
.lesson-hero img { width: 100%; }
.lesson-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 4px; margin: 18px 0 22px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
.lesson-tabs .tab { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border-radius: 8px; font-weight: 700; font-size: 13px; color: var(--ink-2); }
.lesson-tabs .tab img { width: 18px; height: 18px; }
.lesson-tabs .tab:hover { background: var(--bg); text-decoration: none; }
.lesson-tabs .tab.active { background: var(--mint-soft); color: var(--teal); }
.lesson-tabs .tab.seen:not(.active)::after { content: "✓"; color: var(--green); font-size: 12px; }
.lesson-panel .kicker { display: block; font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--teal); margin-bottom: 6px; text-transform: uppercase; }
.lesson-panel > h2 { font-size: 21px; margin-bottom: 8px; }
.lesson-panel .lead { color: var(--ink-2); margin-bottom: 16px; }
.lesson-body { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.lesson-body > * + * { margin-top: 14px; }
.lesson-body h2 { font-size: 18px; color: var(--ink); margin-top: 24px; }
.lesson-body h3 { font-size: 16px; color: var(--ink); margin-top: 20px; }
.lesson-body ul, .lesson-body ol { padding-left: 22px; }
.lesson-body li + li { margin-top: 6px; }
.lesson-body code { background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 13px; }
.principles { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.principles article { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: var(--r); }
.principles article img { width: 36px; height: 36px; padding: 7px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.principles b { display: block; color: var(--ink); }
.principles p { font-size: 13px; color: var(--muted); }
.principles .blue { background: var(--blue-soft); }
.principles .green { background: var(--green-soft); }
.principles .orange { background: var(--orange-soft); }
.principles .purple { background: var(--purple-soft); }
.note { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); background: #f1faf7; border: 1px solid #cfeee4; font-size: 14px; }
.note img { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare article { padding: 16px; border-radius: var(--r); border: 1px solid var(--line); }
.compare article b { display: flex; gap: 8px; align-items: center; color: var(--ink); margin-bottom: 6px; }
.compare i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; }
.compare .bad i { background: var(--red); }
.compare .good i { background: var(--green); }
.compare .good { background: #f4fbf8; border-color: #cfeee4; }
.compare small { display: block; color: var(--muted); margin-top: 8px; font-size: 13px; }
.prompt-box { margin: 0; padding: 14px 16px; border-radius: var(--r); background: #0f2a2a; }
.prompt-box pre { margin: 0; white-space: pre-wrap; color: #e3f6f0; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.lesson-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lesson-table th, .lesson-table td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; }
.lesson-table th { background: var(--bg); font-size: 13px; color: var(--ink); }
.task { margin: 18px 0 14px; padding: 16px; border-radius: var(--r); background: var(--purple-soft); }
.task b { font-size: 11px; letter-spacing: .12em; color: #5b30c9; }
.task p { margin: 6px 0; color: var(--ink); font-weight: 600; }
.task small { display: block; color: var(--ink-2); margin-top: 4px; }
.criteria { padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: var(--r); }
.criteria small { color: var(--muted); font-weight: 700; }
.criteria ul { margin: 6px 0 0; padding-left: 20px; font-size: 13px; }
.submission { padding: 14px; border-radius: var(--r); background: var(--bg); margin-bottom: 14px; }
.submission b { font-size: 13px; }
.submission p { margin: 6px 0; font-size: 14px; }
.quiz { display: grid; gap: 16px; }
.question { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 0; }
.question legend { float: left; width: 100%; display: grid; gap: 4px; padding: 0; margin-bottom: 12px; font-weight: 700; color: var(--ink); }
.question legend + * { clear: both; }
.question legend small { font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.question.is-correct { border-color: #9ad9bf; }
.question.is-wrong { border-color: #f0b4ad; }
.option { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-top: 8px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-size: 14px; }
.option:hover { border-color: var(--teal); }
.option input { accent-color: var(--teal); }
.option .letter { width: 24px; height: 24px; border-radius: 6px; background: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 12px; }
.option.right { background: var(--green-soft); border-color: #9ad9bf; }
.option.wrong { background: var(--red-soft); border-color: #f0b4ad; }
.explain { margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.lesson-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.lesson-footer small { color: var(--muted); }
.lesson-side { display: grid; gap: 16px; }
.side-card { padding: 18px 20px; }
.side-card h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 12px; }
.side-card h2 img { width: 20px; height: 20px; }
.check-ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.check-ul li { padding-left: 22px; position: relative; }
.check-ul li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.progress-caption { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: var(--muted); }
.req-list { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
.done-card { background: var(--green-soft); border-color: #c4e9d8; }
.done-card .btn { margin-top: 10px; }

@media (max-width: 1100px) {
  .welcome, .primary-grid, .lesson-layout { grid-template-columns: 1fr; }
  .continue-card { grid-template-columns: 1fr; }
  .hero-image { height: 180px; }
}
@media (max-width: 700px) {
  .stats-row { grid-template-columns: 1fr; }
  .lesson-hero { grid-template-columns: 1fr; padding: 18px; }
  .lesson-hero img { display: none; }
  .lesson-tabs { grid-template-columns: repeat(2, 1fr); }
  .compare { grid-template-columns: 1fr; }
  .modulebar { flex-wrap: wrap; }
  .lesson-nav { margin-left: 0; }
  .lesson-rows { margin-left: 0; }
  .lesson-footer { flex-wrap: wrap; }
}

/* ---------- Phase 4: company progress ---------- */
.kpi-grid.kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpi-grid.kpi-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kpi-grid.kpi-grid-3 { grid-template-columns: 1fr; } }
.progress-cell { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.progress-cell .progress { flex: 1; height: 8px; }
.progress-cell small { color: var(--muted); white-space: nowrap; }

/* ---------- Phase 4: content editor (Super Admin) ---------- */
.content-module-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.content-module-head h2 { font-size: 17px; margin-top: 2px; }
.content-module .empty { padding: 20px 24px; }
.content-module-edit { border-top: 1px solid var(--line); padding: 14px 24px; }
.content-module-edit summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--teal); }
.content-module-edit form { margin-top: 16px; }
.content-program summary h2 { font-size: 20px; }
.row-actions form.row-actions { margin: 0; }
.btn[disabled] { opacity: .4; pointer-events: none; }
.lang-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.lang-tabs .tab { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: var(--r-sm); background: #fff; border: 1px solid var(--line); font-weight: 700; font-size: 13px; color: var(--ink-2); }
.lang-tabs .tab:hover { text-decoration: none; border-color: var(--teal); }
.lang-tabs .tab.active { border-color: var(--teal); background: var(--mint-soft); color: var(--teal); }
.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.editor-side { position: sticky; top: 24px; }
@media (max-width: 1100px) { .editor-layout { grid-template-columns: 1fr; } .editor-side { position: static; } }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.field-narrow { max-width: 220px; }
.md-help pre { white-space: pre-wrap; font-size: 12px; background: var(--bg); border-radius: var(--r-sm); padding: 12px; margin: 10px 0; line-height: 1.5; }
.preview-panel { border-top: 1px solid var(--line); }
.preview-panel > .badge { margin-bottom: 10px; }
.quiz .question[disabled] .option { cursor: default; }
.copy-code { display: block; margin-top: 6px; padding: 10px 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12px; word-break: break-all; user-select: all; }

/* ---------- Phase 5: AI Mentor ---------- */
.mentor-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.mentor-heading .title { display: flex; gap: 14px; align-items: center; }
.mentor-heading h1 { font-size: 30px; }
.mentor-heading p { color: var(--muted); margin-top: 4px; }
.spark { color: var(--purple); font-size: 34px; line-height: 1; }
.context-pick { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 14px; box-shadow: var(--shadow); max-width: 100%; }
.context-pick img { width: 26px; height: 26px; }
.context-pick label small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.context-pick select { min-width: 240px; max-width: 360px; height: 38px; font-weight: 700; }
.mentor-workspace { display: grid; grid-template-columns: 270px minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.mentor-left { padding: 18px; display: grid; gap: 18px; }
.mentor-left h2 { font-size: 16px; }
.modes { display: grid; gap: 10px; }
.mode { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); background: #fff; }
.mode:hover { text-decoration: none; border-color: var(--line-strong); }
.mode i { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.mode i img { width: 20px; height: 20px; }
.mode-explain i { background: var(--purple-soft); }
.mode-practice i { background: var(--mint-soft); }
.mode-apply i { background: var(--green-soft); }
.mode-evaluate i { background: var(--orange-soft); }
.mode b { display: block; font-size: 14px; }
.mode small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.mode.selected { border-color: #c4b2fb; background: #faf8ff; box-shadow: 0 0 0 3px var(--purple-soft); }
.recent { border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 10px; }
.recent-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.recent ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.recent li a { display: flex; gap: 10px; align-items: center; padding: 7px 8px; border-radius: 6px; color: var(--ink-2); font-size: 13px; }
.recent li a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent li a:hover, .recent li.active a { background: var(--bg); text-decoration: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--purple); }
.dot-practice { background: var(--teal-strong); } .dot-apply { background: var(--green); } .dot-evaluate { background: var(--orange); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; font-weight: 700; color: var(--purple); cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.mentor-chat { display: flex; flex-direction: column; min-height: 640px; max-height: calc(100vh - 150px); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head > div { flex: 1; min-width: 0; }
.chat-head b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head small { color: var(--purple); font-size: 12px; font-weight: 700; }
.bot-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--purple-soft); display: grid; place-items: center; flex-shrink: 0; }
.bot-avatar img { width: 22px; height: 22px; }
.messages { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 10px; align-items: flex-start; max-width: 100%; }
.msg.user { justify-content: flex-end; }
.msg .bubble { border-radius: 14px; padding: 12px 16px; font-size: 14px; line-height: 1.6; max-width: 86%; min-width: 0; }
.msg.bot .bubble { background: #f8f6ff; border: 1px solid #ece6fe; }
.msg.user .bubble { background: var(--mint-soft); border: 1px solid #cdeee3; white-space: normal; }
.msg .bubble > b { display: block; margin-bottom: 6px; }
.mentor-body { font-size: 14px; }
.mentor-body > :first-child { margin-top: 0; }
.mentor-body p, .mentor-body ul, .mentor-body ol { margin: 0 0 10px; }
.mentor-body > :last-child { margin-bottom: 0; }
.mentor-body .prompt-box { margin: 10px 0; }
.mentor-body pre.code { white-space: pre-wrap; background: var(--bg); padding: 10px; border-radius: 8px; font-size: 13px; }
.suggest-title { margin-top: 12px; font-weight: 700; font-size: 13px; }
.suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.suggestions button { border: 1px solid #bfe7da; background: var(--mint-soft); color: var(--teal); font: inherit; font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 99px; cursor: pointer; }
.suggestions button:hover { background: #d4f0e6; }
.msg.pending .bubble { color: var(--muted); font-style: italic; }
.typing::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.chat-alert { margin: 0 18px 10px; }
.composer { display: flex; gap: 10px; align-items: flex-end; margin: 0 18px; padding: 8px 8px 8px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; }
.composer:focus-within { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); }
.composer textarea { flex: 1; border: 0; outline: 0; resize: none; font: inherit; font-size: 14px; line-height: 1.5; padding: 8px 0; max-height: 200px; background: transparent; }
.composer .send { width: 44px; height: 44px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #8b5cf6, #6d3fe0); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.composer .send img { width: 20px; height: 20px; }
.composer .send[disabled] { opacity: .5; cursor: wait; }
.mentor-chat .hint { font-size: 12px; color: var(--muted); padding: 8px 18px 14px; }
.mentor-right { display: grid; gap: 20px; }
.side-label { display: block; margin: 14px 0 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.lesson-link { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: var(--r); color: var(--ink); }
.lesson-link:hover { text-decoration: none; border-color: var(--teal); }
.lesson-link img { width: 56px; height: 44px; object-fit: contain; background: var(--mint-soft); border-radius: 8px; flex-shrink: 0; }
.lesson-link small { display: block; color: var(--teal); font-size: 11px; font-weight: 700; }
.lesson-link b { display: block; font-size: 13px; line-height: 1.4; }
.related { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.privacy-card p { margin-top: 8px; line-height: 1.55; }
.mentor-cta { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, #faf8ff, #f1ecff); border-color: #e2d8fd; color: var(--ink); }
.mentor-cta:hover { text-decoration: none; border-color: var(--purple); }
.mentor-cta .spark { font-size: 26px; }
.mentor-cta b { display: block; font-size: 14px; }
.mentor-cta small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
@media (max-width: 1280px) { .mentor-workspace { grid-template-columns: 240px minmax(0, 1fr); } .mentor-right { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) {
  .mentor-workspace { grid-template-columns: 1fr; }
  .mentor-chat { order: -1; min-height: 70vh; max-height: none; }
  .mentor-right { grid-template-columns: 1fr; }
  .context-pick { width: 100%; } .context-pick select { min-width: 0; flex: 1; }
  .msg .bubble { max-width: 100%; }
}

/* Evaluation card (mentor + exercises) */
.evaluation { display: grid; gap: 14px; }
.eval-head { display: flex; gap: 14px; align-items: center; }
.eval-head small { display: block; color: var(--muted); font-size: 12px; }
.eval-score { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; align-content: center; flex-shrink: 0; border: 4px solid; }
.eval-score b { font-size: 20px; line-height: 1; } .eval-score small { font-size: 10px; color: var(--muted); }
.eval-score.good { border-color: var(--green); } .eval-score.mid { border-color: var(--orange); } .eval-score.low { border-color: var(--red); }
.eval-criteria { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.eval-criteria li > div:first-child { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }
.eval-criteria .progress { height: 6px; }
.eval-criteria small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.eval-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.eval-lists > div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.eval-lists ul { margin: 6px 0 0; padding-left: 18px; }
.eval-strengths b { color: var(--green); } .eval-weaknesses b { color: var(--orange-2); } .eval-suggestions b { color: var(--blue); }
.exercise-eval { margin-top: 16px; padding: 16px; border: 1px solid #ece6fe; background: #f8f6ff; border-radius: var(--r); }
.exercise-eval h3 { font-size: 15px; margin-bottom: 12px; }
.form-table td { vertical-align: middle; }
.form-table .input { height: 38px; }
.input-num { max-width: 120px; }
.limit-set { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; margin: 0; }
.limit-set legend { font-weight: 700; padding: 0 6px; }
.limit-edit summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--teal); }
.limit-edit form { margin-top: 10px; min-width: 220px; }
.mentor-left, .mentor-left > *, .modes, .recent ul, .recent li, .recent li a { min-width: 0; }
.mode { white-space: normal; width: auto; }
.mode span { min-width: 0; flex: 1; }

/* ---------- Phase 6: AI Office Lab ---------- */
.fmt { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .06em; padding: 3px 7px; border-radius: 5px; color: #fff; vertical-align: middle; }
.fmt-docx { background: #2b579a; } .fmt-xlsx { background: #217346; } .fmt-pptx { background: #c43e1c; } .fmt-pdf { background: #b30b00; } .fmt-upload { background: var(--purple); }
.office-group { margin-bottom: 26px; }
.office-group h2 { font-size: 17px; margin-bottom: 12px; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.template-card { padding: 16px; display: grid; gap: 6px; align-content: start; color: var(--ink); transition: border-color .15s, transform .15s; }
.template-card:hover { text-decoration: none; border-color: var(--teal); transform: translateY(-1px); }
.template-card .fmt { justify-self: start; }
.template-card b { font-size: 15px; }
.template-card small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.office-new { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 960px) { .office-new { grid-template-columns: 1fr; } }
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 13px; font-weight: 700; background: #fff; }
.seg input:checked + span { border-color: var(--teal); background: var(--mint-soft); color: var(--teal); }
.seg input:focus-visible + span { outline: 2px solid var(--teal); outline-offset: 2px; }
.label { font-weight: 700; font-size: 13px; padding: 0; }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.steps-list { margin: 10px 0 14px; padding-left: 20px; display: grid; gap: 8px; font-size: 14px; }
.mentor-inline { display: flex; gap: 12px; align-items: flex-start; }
.office-working { display: flex; gap: 18px; align-items: center; }
.spinner { width: 38px; height: 38px; border-radius: 50%; border: 4px solid var(--purple-soft); border-top-color: var(--purple); animation: spin 0.9s linear infinite; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.office-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .office-layout { grid-template-columns: 1fr; } }
.office-side { display: grid; gap: 20px; }
.preview-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.preview-body { padding: 20px; background: var(--bg); border-radius: 0 0 var(--r) var(--r); overflow-x: auto; }
.paper { background: #fff; max-width: 760px; margin: 0 auto; padding: 48px 56px; box-shadow: 0 2px 10px rgba(17, 27, 44, .08); font-family: Calibri, Carlito, var(--font); font-size: 14px; line-height: 1.55; color: #1b2433; }
.paper h1 { font-size: 26px; color: #073b3a; margin-bottom: 4px; }
.paper .paper-sub { color: var(--muted); font-size: 15px; margin-bottom: 18px; }
.paper h2 { font-size: 17px; color: #087f72; margin: 24px 0 8px; }
.paper p, .paper ul, .paper ol { margin: 0 0 10px; }
.paper-callout { background: #e3f6f0; border-left: 4px solid #087f72; padding: 10px 14px; }
.paper-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 14px; }
.paper-table th { background: #087f72; color: #fff; text-align: left; padding: 6px 8px; }
.paper-table td { border: 1px solid #d1dbe5; padding: 6px 8px; }
@media (max-width: 640px) { .paper { padding: 24px 18px; } }
.deck { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
.slide { position: relative; aspect-ratio: 16 / 9; background: #fff; border-top: 5px solid #087f72; box-shadow: 0 2px 10px rgba(17, 27, 44, .08); padding: 5% 6%; font-family: Calibri, Carlito, var(--font); overflow: hidden; }
.slide h3 { color: #073b3a; font-size: clamp(16px, 3vw, 26px); margin-bottom: 4%; }
.slide h3::after { content: ""; display: block; width: 60px; height: 4px; background: #ff790f; margin-top: 8px; }
.slide ul { margin: 0; padding-left: 20px; font-size: clamp(12px, 1.8vw, 17px); display: grid; gap: 6px; }
.slide li::marker { color: #ff790f; }
.slide > small { position: absolute; right: 16px; bottom: 10px; font-size: 11px; color: var(--muted); }
.slide-title, .slide-closing { background: #073b3a; border-top: 0; color: #fff; }
.slide-title { display: flex; align-items: center; gap: 18px; }
.slide-title .accent { width: 6px; align-self: stretch; max-height: 40%; margin: auto 0; background: #ff790f; }
.slide-title h3, .slide-closing h3 { color: #fff; } .slide-title h3::after { display: none; }
.slide-title p { color: #bfe7da; margin-top: 8px; }
.slide-title small, .slide-closing small { color: #bfe7da; }
.slide .cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.slide .cols > div { background: #e3f6f0; padding: 12px 14px; border-radius: 4px; }
.slide .cols b { color: #087f72; display: block; margin-bottom: 6px; }
.slide .stats { display: flex; gap: 14px; }
.slide .stats > div { flex: 1; background: #e3f6f0; border-top: 4px solid #087f72; padding: 18px 10px; text-align: center; }
.slide .stats b { display: block; font-size: clamp(20px, 4vw, 38px); color: #073b3a; }
.slide .stats small { color: var(--muted); }
.slide blockquote { margin: 0; border-left: 5px solid #ff790f; padding-left: 18px; font-size: clamp(15px, 2.4vw, 22px); }
.slide blockquote cite { display: block; font-size: 14px; color: var(--muted); margin-top: 10px; font-style: normal; }
.slide .notes { position: absolute; left: 6%; bottom: 8px; font-size: 12px; color: var(--muted); max-width: 80%; }
.slide-closing .notes { color: #bfe7da; }
.sheet { margin-bottom: 18px; }
.sheet h3 { font-size: 15px; margin-bottom: 8px; }
.sheet-table { border-collapse: collapse; background: #fff; font-family: Calibri, Carlito, var(--font); font-size: 13px; }
.sheet-table td, .sheet-table th { border: 1px solid #dfe5ec; padding: 4px 8px; white-space: nowrap; }
.sheet-table th.rn { background: #f1f4f7; color: var(--muted); font-weight: 400; font-size: 11px; }
.sheet-table td.num { text-align: right; }
.sheet-table td.formula { background: #f1f4f7; }
.sheet-table tr.hdr td { background: #087f72; color: #fff; font-weight: 700; }
.versions { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.versions li { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: grid; gap: 4px; }
.versions li.active { border-color: var(--teal); background: var(--mint-soft); }
.versions li > a:first-child { color: var(--ink); }
.versions b { display: block; font-size: 14px; } .versions small { color: var(--muted); font-size: 12px; }
.delete-doc { text-align: right; }
.composer .attach { width: 40px; height: 44px; display: grid; place-items: center; cursor: pointer; flex-shrink: 0; border-radius: 8px; }
.composer .attach:hover { background: var(--bg); }
.composer .attach input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.composer .attach:focus-within { outline: 2px solid var(--purple); }
.composer .attach img { width: 20px; height: 20px; }
.attach-name { margin: 6px 18px 0; font-size: 12px; color: var(--purple); font-weight: 700; }
.attach-chip { display: inline-block; margin-top: 6px; font-size: 12px; font-weight: 700; color: var(--teal); background: #fff; border: 1px solid #cdeee3; border-radius: 99px; padding: 3px 10px; }

/* ---------- Phase 7: certificates ---------- */
.cert-list { display: grid; gap: 14px; margin-bottom: 22px; }
.cert-card { display: flex; gap: 18px; align-items: center; padding: 20px 22px; border-left: 5px solid var(--teal); flex-wrap: wrap; }
.cert-card.is-revoked { border-left-color: var(--red); opacity: .75; }
.cert-card > div:nth-child(2) { flex: 1; min-width: 220px; }
.cert-card h2 { font-size: 20px; margin: 2px 0 4px; }
.cert-seal { width: 52px; height: 52px; border-radius: 50%; background: var(--blue-soft); display: grid; place-items: center; flex-shrink: 0; }
.cert-seal img { width: 28px; height: 28px; }
.cert-actions { align-items: center; }
.name-form { display: flex; gap: 10px; flex-wrap: wrap; }
.name-form .input { flex: 1; min-width: 220px; }
.cert-level { margin-top: 20px; }
.cert-level-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.cert-level-head h2 { font-size: 19px; margin: 2px 0 4px; }
.cert-level-body { padding: 20px 22px; display: grid; gap: 16px; }
.req { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.req li { display: flex; gap: 12px; align-items: flex-start; }
.req li > div { flex: 1; display: grid; gap: 4px; }
.req small { font-size: 12px; }
.req-mark { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line-strong); display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--muted); flex-shrink: 0; }
.req li.ok .req-mark { background: var(--green); border-color: var(--green); color: #fff; }
.req.compact { margin-top: 10px; }
.review-answer { white-space: normal; line-height: 1.6; background: var(--bg); border-radius: 8px; padding: 14px 16px; font-size: 14px; }
.module-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-top: 8px; }
.level-edit { margin-bottom: 14px; }
.verify-form label { font-weight: 700; display: block; margin-bottom: 8px; }
.verify-result h2 { font-size: 22px; margin-bottom: 12px; }
.verify-result.valid { border-left: 5px solid var(--green); }
.verify-result.valid h2 { color: var(--green); }
.verify-result.invalid { border-left: 5px solid var(--red); }
.verify-result.invalid h2 { color: var(--red); }
.verify-result dl { display: grid; grid-template-columns: 170px 1fr; gap: 8px 16px; margin: 0 0 14px; }
.verify-result dt { color: var(--muted); }
.verify-result dd { margin: 0; font-weight: 700; }
@media (max-width: 640px) { .verify-result dl { grid-template-columns: 1fr; } .verify-result dt { margin-top: 6px; } }
.office-quota { margin-bottom: 22px; display: grid; gap: 4px; }

/* ---------- Billing (Phase 8) ---------- */
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mt-12 { margin-top: 12px; }
.back-link { display: inline-block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.back-link:hover { color: var(--teal); }
.billing-item { display: flex; flex-direction: column; }
.billing-item.is-featured { border-color: var(--teal); box-shadow: 0 10px 28px rgba(8, 127, 114, .12); }
.billing-item h3 { font-size: 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.billing-item .price { font-size: 28px; font-weight: 800; color: var(--ink); }
.billing-item .price small { font-size: 13px; font-weight: 600; color: var(--muted); }
.billing-item .check-ul { flex: 1; }
.billing-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.billing-row:first-of-type { border-top: 0; }
.billing-row b { display: block; }
.billing-row small { color: var(--muted); font-size: 12px; }
.billing-summary .billing-row { grid-template-columns: 1fr; padding-top: 0; }
.price-sm { font-weight: 800; white-space: nowrap; }
.btn.is-disabled { opacity: .5; pointer-events: none; }
.billing-checkout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 10px 16px; margin: 0; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.kv dd small { display: block; }
.label-like { display: block; font-size: 13px; }
@media (max-width: 900px) {
  .grid-2, .billing-checkout { grid-template-columns: 1fr; }
  .billing-row { grid-template-columns: 1fr auto; }
  .billing-row .btn { grid-column: 1 / -1; justify-self: start; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
}

/* ---------- Super Admin (Phase 9) ---------- */
.kpi { display: grid; gap: 4px; }
.kpi small { color: var(--muted); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi b { font-size: 26px; font-weight: 800; color: var(--ink); }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li a { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-top: 1px solid #eef2f6; color: var(--ink); font-weight: 600; font-size: 14px; }
.todo-list li:first-child a { border-top: 0; }
.todo-list li a:hover { color: var(--teal); }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 64px 1fr 96px; gap: 12px; align-items: center; }
.bar-row b { text-align: right; }
.bar { height: 10px; background: #eef2f6; border-radius: 99px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; padding: 14px 16px; font-size: 13px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 14px 16px 0; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); background: #fff; }
.chip[aria-current="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.danger-zone { border-color: #f5c9c4; }
.danger-zone h2 { color: #a3302a; }
.btn-danger { background: var(--red); color: #fff; }
.msg-body { white-space: pre-wrap; font-size: 14px; background: #fafbfc; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.log-box { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: #0f1d2b; color: #d9e6f2; border-radius: var(--r); padding: 14px; overflow-x: auto; max-height: 420px; white-space: pre; }
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.check-list li { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid #eef2f6; padding-bottom: 8px; }
.legal-editor textarea { min-height: 460px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.meta-json { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11px; color: var(--muted); max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .bar-row { grid-template-columns: 56px 1fr 80px; } }

.billing-packages { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1280px) { .billing-packages { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .billing-packages { grid-template-columns: 1fr; } }

/* Free trial banner (Phase 9b) */
.trial-banner { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 22px; border-color: #ffd2ae; background: linear-gradient(100deg, #fff7f0, #fff); }
.trial-banner p { margin-top: 4px; color: var(--ink-2); }
.office-template.is-trial-locked { opacity: .55; }
@media (max-width: 700px) { .trial-banner { flex-direction: column; align-items: flex-start; } }
