/*!************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.15_@playwright+test@1.60.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!../../node_modules/.pnpm/next@15.5.15_@playwright+test@1.60.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!../../node_modules/.pnpm/next@15.5.15_@playwright+test@1.60.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"Manrope","arguments":[{"subsets":["latin","cyrillic"],"variable":"--font-ui","display":"swap"}],"variableName":"sans"} ***!
  \************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/438aa629764e75f3-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/875ae681bfde4580-s.p.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* greek */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/51251f8b9793cdb3-s.woff2) format('woff2');
  unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
}
/* vietnamese */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/e857b654a2caa584-s.woff2) format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/cc978ac5ee68c2b6-s.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;
}
/* latin */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url(/_next/static/media/4c9affa5bc8f420e-s.p.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 Fallback';src: local("Arial");ascent-override: 103.31%;descent-override: 29.07%;line-gap-override: 0.00%;size-adjust: 103.19%
}.__className_fe7774 {font-family: 'Manrope', 'Manrope Fallback';font-style: normal
}.__variable_fe7774 {--font-ui: 'Manrope', 'Manrope Fallback'
}

/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.15_@playwright+test@1.60.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!../../node_modules/.pnpm/next@15.5.15_@playwright+test@1.60.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!../../node_modules/.pnpm/next@15.5.15_@playwright+test@1.60.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/font/google/target.css?{"path":"src/app/layout.tsx","import":"PT_Serif","arguments":[{"weight":["400","700"],"subsets":["latin","cyrillic"],"variable":"--font-display","display":"swap"}],"variableName":"serif"} ***!
  \******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/42ca72de112410a0-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/3457c9d168662d42-s.p.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/c6d85f2f9bf6fcef-s.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;
}
/* latin */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/886f446b96dc7734-s.p.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;
}
/* cyrillic-ext */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/5c5fd9d3e848a7f8-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/b0fec32b86be83d8-s.p.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/8c6f66cf306d9ee4-s.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;
}
/* latin */
@font-face {
  font-family: 'PT Serif';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/e693e841d50dcf2f-s.p.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: 'PT Serif Fallback';src: local("Times New Roman");ascent-override: 94.22%;descent-override: 25.93%;line-gap-override: 0.00%;size-adjust: 110.28%
}.__className_55065d {font-family: 'PT Serif', 'PT Serif Fallback';font-style: normal
}.__variable_55065d {--font-display: 'PT Serif', 'PT Serif Fallback'
}

/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/.pnpm/next@15.5.15_@playwright+test@1.60.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/.pnpm/next@15.5.15_@playwright+test@1.60.0_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
:root {
  --bg-deep: #0b1110;
  --bg-page: #101614;
  --bg-panel: rgba(21, 29, 27, 0.82);
  --bg-card: rgba(238, 244, 241, 0.045);
  --bg-card-hover: rgba(238, 244, 241, 0.075);
  --bg: #101614;
  --bg-secondary: rgba(21, 29, 27, 0.7);
  --border: rgba(230, 239, 235, 0.11);
  --text: #eef4f1;
  --text-muted: #9aaba4;
  --text-soft: #c4d1cc;
  --accent: #62d0bd;
  --accent-dim: #2f9e8c;
  --accent-glow: rgba(98, 208, 189, 0.22);
  --warn: #dfb66f;
  --danger: #ee8d8d;
  --radius: 12px;
  --radius-sm: 8px;
  --max: 1120px;
}

/* ——— Light Dashboard Theme ——— */
:root {
  /* Warm sage green palette - calm, trustworthy, natural */
  --light-bg: #F7F5F0;
  --light-page: #F2EFE8;
  --light-surface: #FAF8F4;
  --light-card: #FFFFFF;
  --light-card-hover: #FDFCFA;

  /* Text */
  --light-text: #2C3E35;
  --light-text-muted: #6B7C72;
  --light-text-soft: #9CA8A0;

  /* Borders */
  --light-border: #DDD8CF;
  --light-border-soft: #EDE9E1;

  /* Sage green accent */
  --light-accent: #3D8B6E;
  --light-accent-hover: #346A5C;
  --light-accent-dim: #2C5A4C;
  --light-accent-glow: rgba(61, 139, 110, 0.1);
  --light-accent-bg: rgba(61, 139, 110, 0.08);

  /* Semantic */
  --light-success: #2D8A5F;
  --light-success-bg: #EBF5F0;
  --light-warn: #B07830;
  --light-warn-bg: #FDF5E8;
  --light-danger: #C04040;
  --light-danger-bg: #FCEAEA;

  /* Shadows */
  --light-shadow: 0 1px 4px rgba(44, 62, 53, 0.06), 0 2px 8px rgba(44, 62, 53, 0.04);
  --light-shadow-md: 0 4px 16px rgba(44, 62, 53, 0.08), 0 2px 6px rgba(44, 62, 53, 0.05);
  --light-shadow-lg: 0 8px 32px rgba(44, 62, 53, 0.1), 0 4px 12px rgba(44, 62, 53, 0.06);
}

.light-theme {
  --bg: var(--light-page);
  --bg-secondary: var(--light-card);
  --bg-deep: var(--light-page);
  --bg-page: var(--light-page);
  --bg-panel: var(--light-card);
  --bg-card: var(--light-card);
  --bg-card-hover: var(--light-card-hover);
  --border: var(--light-border);
  --text: var(--light-text);
  --text-muted: var(--light-text-muted);
  --text-soft: var(--light-text-soft);
  --accent: var(--light-accent);
  --accent-dim: var(--light-accent-dim);
  --accent-glow: var(--light-accent-glow);
  --warn: var(--light-warn);
  --danger: var(--light-danger);
  background: var(--light-bg);
}

.light-theme body {
  color: var(--light-text);
  background: var(--light-bg);
  background-image: none;
}

/* Admin console in light theme */
.light-theme .admin-console {
  background: var(--light-page);
}

.light-theme .admin-sidebar,
.light-theme .admin-main,
.light-theme .admin-inspector,
.light-theme .admin-panel,
.light-theme .admin-metric {
  border: 1px solid var(--light-border);
  background: var(--light-card);
}

.light-theme .admin-brand {
  border-bottom-color: var(--light-border);
}

.light-theme .admin-json-inline,
.light-theme .admin-inspector-json {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--light-border);
  color: var(--light-text);
  max-height: 60vh;
}

.light-theme .admin-inspector-head strong {
  color: var(--light-text);
}

.light-theme .admin-table th {
  background: rgba(0, 0, 0, 0.04);
  border-bottom-color: var(--light-border);
  color: var(--light-text-muted);
}

.light-theme .admin-table td {
  border-bottom-color: rgba(0, 0, 0, 0.07);
  color: var(--light-text);
}

.light-theme .admin-table tr:hover td {
  background: rgba(0, 0, 0, 0.03);
}

.light-theme .admin-id-chip {
  background: rgba(0, 0, 0, 0.05);
  color: var(--light-text-muted);
}

.light-theme .admin-status {
  border-width: 1px;
  border-style: solid;
  border-radius: 4px;
  padding: 0.15em 0.5em;
  font-size: 0.78rem;
}

.light-theme .admin-status--good { color: #166534; background: rgba(22, 101, 52, 0.1); border-color: rgba(22, 101, 52, 0.25); }
.light-theme .admin-status--bad { color: #991b1b; background: rgba(153, 27, 27, 0.1); border-color: rgba(153, 27, 27, 0.25); }
.light-theme .admin-status--warn { color: #92400e; background: rgba(146, 64, 14, 0.1); border-color: rgba(146, 64, 14, 0.25); }
.light-theme .admin-status--neutral { color: #374151; background: rgba(55, 65, 81, 0.08); border-color: rgba(55, 65, 81, 0.2); }

.light-theme .admin-empty {
  color: var(--light-text-muted);
  text-align: center;
  padding: 2rem;
}

.light-theme .admin-empty--bad {
  color: #991b1b;
  background: rgba(153, 27, 27, 0.08);
  border: 1px solid rgba(153, 27, 27, 0.2);
  border-radius: 6px;
}

.light-theme .admin-inspector-head strong {
  color: var(--light-text);
}

.light-theme .admin-icon-button,
.light-theme .admin-row-button {
  color: var(--light-text-muted);
}

.light-theme .admin-inspector {
  background: var(--light-card);
  border-color: var(--light-border);
}

.light-theme .admin-inspector-head {
  border-bottom-color: var(--light-border);
}

.light-theme .admin-metric {
  border-color: var(--light-border);
  background: var(--light-card);
}

.light-theme .admin-metric strong {
  color: var(--light-text);
}

.light-theme .admin-metric span {
  color: var(--light-text-muted);
}

.light-theme .admin-panel h2 {
  color: var(--light-text);
  border-bottom-color: var(--light-border);
}

.light-theme .admin-llm-profile {
  border-color: var(--light-border);
  background: var(--light-card);
  color: var(--light-text);
}

.light-theme .admin-llm-profile strong {
  color: var(--light-text);
}

.light-theme .admin-llm-profile span {
  color: var(--light-text-muted);
}

.light-theme .admin-llm-profile.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--light-card));
}

.light-theme .admin-llm-model-row {
  color: var(--light-text);
}

.light-theme .admin-llm-model-row select {
  background: var(--light-card);
  border-color: var(--light-border);
  color: var(--light-text);
}

.light-theme .admin-toolbar h1 {
  color: var(--light-text);
}

.light-theme .admin-toolbar p {
  color: var(--light-text-muted);
}

.light-theme .admin-toolbar-actions input {
  background: var(--light-card);
  border-color: var(--light-border);
  color: var(--light-text);
}

.light-theme .admin-nav button,
.light-theme .admin-nav button.is-active {
  border-color: transparent;
  color: var(--light-text-muted);
}

.light-theme .admin-nav button:hover {
  border-color: var(--light-border);
  background: rgba(0, 0, 0, 0.04);
  color: var(--light-text);
}

.light-theme .admin-nav button.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
}

.light-theme .admin-brand {
  color: var(--light-text);
}

.light-theme .admin-brand strong {
  color: var(--light-text);
}

.light-theme .admin-brand span {
  color: var(--light-text-muted);
}

.admin-build-version {
  font-size: 0.7rem;
  opacity: 0.5;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.light-theme .admin-build-version {
  color: var(--light-text-muted);
}

/* ——— Buttons ——— */
.light-theme .btn--primary {
  background: var(--light-accent);
  color: #fff;
}

.light-theme .btn--primary:not(:disabled):hover {
  background: var(--light-accent-hover);
  filter: none;
}

.light-theme .btn--outline {
  border-color: var(--light-border);
  color: var(--light-text);
  background: transparent;
}

.light-theme .btn--outline:not(:disabled):hover {
  border-color: var(--light-accent);
  color: var(--light-accent);
  background: var(--light-accent-bg);
}

/* ——— Cards ——— */
.light-theme .dashboard-hero-card,
.light-theme .dashboard-card,
.light-theme .trust-card {
  background: var(--light-card);
  border: 1px solid var(--light-border-soft);
  box-shadow: var(--light-shadow);
}

.light-theme .dialog-card {
  background: var(--light-card);
  border: 1px solid var(--light-border-soft);
  box-shadow: var(--light-shadow);
}

.light-theme .dialog-card:hover {
  box-shadow: var(--light-shadow-md);
  border-color: var(--light-border);
}

.light-theme .dialog-progress-track {
  background: var(--light-border-soft);
}

/* ——— Trust cards ——— */
.light-theme .trust-card {
  background: var(--light-surface);
}

.light-theme .trust-card h3 {
  color: var(--light-text);
}

/* ——— Status summary ——— */
.light-theme .status-summary-item {
  background: var(--light-surface);
  border-color: var(--light-border-soft);
}

.light-theme .status-summary-item--accent {
  background: var(--light-accent-bg);
  border-color: var(--light-accent);
}

/* ——— Impact card ——— */
.light-theme .dashboard-impact-card {
  background: var(--light-surface);
  border-color: var(--light-border-soft);
}

.light-theme .impact-badge {
  background: var(--light-accent-bg);
  border-color: var(--light-accent);
  color: var(--light-accent);
}

/* ——— Badges ——— */
.light-theme .dashboard-badge {
  background: var(--light-accent-bg);
  border-color: var(--light-accent);
  color: var(--light-accent);
}

.light-theme .dashboard-badge--warn {
  background: var(--light-warn-bg);
  border-color: var(--light-warn);
  color: var(--light-warn);
}

.light-theme .dashboard-badge--success {
  background: var(--light-success-bg);
  border-color: var(--light-success);
  color: var(--light-success);
}

.light-theme .dashboard-badge--muted {
  background: rgba(107, 124, 114, 0.08);
  border-color: rgba(107, 124, 114, 0.25);
  color: var(--light-text-muted);
}

/* ——— Form elements ——— */
.light-theme .textarea-control {
  background: var(--light-surface);
  border-color: var(--light-border);
  color: var(--light-text);
}

.light-theme .textarea-control:focus {
  border-color: var(--light-accent);
  box-shadow: 0 0 0 3px var(--light-accent-glow);
}

.light-theme .form-row input,
.light-theme .form-row select {
  background: var(--light-surface);
  border-color: var(--light-border);
  color: var(--light-text);
}

.light-theme .form-row input:focus,
.light-theme .form-row select:focus {
  border-color: var(--light-accent);
  box-shadow: 0 0 0 3px var(--light-accent-glow);
}

/* ——— Tab bar ——— */
.light-theme .dashboard-tab-bar {
  border-bottom-color: var(--light-border-soft);
}

.light-theme .tab-btn {
  color: var(--light-text-muted);
}

.light-theme .tab-btn:hover {
  color: var(--light-text);
}

.light-theme .tab-btn--active {
  color: var(--light-accent);
  border-bottom-color: var(--light-accent);
}

.light-theme .tab-count {
  background: var(--light-surface);
  color: var(--light-text-muted);
}

/* ——— Empty state ——— */
.light-theme .dashboard-empty-state {
  border-color: var(--light-border-soft);
}

/* ——— Safety note ——— */
.light-theme .dashboard-safety-note {
  background: var(--light-surface);
  border-color: var(--light-border-soft);
}

/* ——— Modal ——— */
.light-theme .modal-backdrop {
  background: rgba(44, 62, 53, 0.4);
}

.light-theme .modal-card {
  background: var(--light-card);
  border: 1px solid var(--light-border);
  box-shadow: var(--light-shadow-lg);
}

.light-theme .modal-card h2 {
  color: var(--light-text);
}

.light-theme .modal-card p {
  color: var(--light-text-muted);
}

.light-theme .btn--danger {
  background: var(--light-danger);
}

/* ——— Reminder text ——— */
.light-theme .reminder-text {
  background: var(--light-surface);
  border-color: var(--light-border-soft);
  color: var(--light-text);
}

/* ——— Header ——— */
.light-theme .dashboard-nav {
  border-bottom-color: var(--light-border-soft);
}

.light-theme .dashboard-nav button {
  border-color: var(--light-border-soft);
  color: var(--light-text-muted);
  background: var(--light-surface);
}

.light-theme .dashboard-nav button:hover {
  border-color: var(--light-accent);
  color: var(--light-accent);
}

.light-theme .dashboard-brand {
  color: var(--light-text);
}

.light-theme .dashboard-link {
  color: var(--light-text-muted);
}

.light-theme .dashboard-menu .dashboard-link:hover {
  color: var(--light-accent);
}

/* ——— Role cards ——— */
.light-theme .role-card {
  background: var(--light-surface);
  border-color: var(--light-border-soft);
  color: var(--light-text);
}

.light-theme .role-card:hover {
  border-color: var(--light-accent);
  background: var(--light-accent-bg);
  color: var(--light-accent);
}

/* ——— Solo card highlight ——— */
.light-theme .dialog-card--solo {
  border-color: var(--light-warn);
  background: var(--light-warn-bg);
}

/* ——— Danger link ——— */
.light-theme .btn--danger-link {
  color: var(--light-danger);
  border-color: transparent;
}

.light-theme .btn--danger-link:hover {
  background: var(--light-danger-bg);
}

/* ——— Mini stats ——— */
.light-theme .dashboard-mini-stat {
  background: var(--light-surface);
  border-color: var(--light-border-soft);
}

.light-theme .dashboard-mini-stat--accent {
  background: var(--light-accent-bg);
  border-color: var(--light-accent);
}

.light-theme .dashboard-mini-stat strong,
.light-theme .dashboard-mini-stat span {
  color: var(--light-text);
}

.light-theme .dashboard-mini-stat span {
  color: var(--light-text-muted);
}

/* ——— Progress track ——— */
.light-theme .dialog-progress-line span {
  color: var(--light-text-muted);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: var(--bg-deep);
  background-image:
    linear-gradient(180deg, rgba(98, 208, 189, 0.12), transparent 18rem),
    linear-gradient(115deg, rgba(255, 255, 255, 0.04), transparent 36rem);
  font-family: var(--font-ui), system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
  font-family: var(--font-ui), system-ui, sans-serif;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.2;
}

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

a:hover {
  text-decoration: underline;
}

.l-wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.page-narrow {
  max-width: 860px;
  padding-bottom: 3rem;
}

.screen-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 2.55rem);
}

.screen-lead {
  max-width: 640px;
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.textarea-control {
  width: 100%;
  resize: vertical;
  min-height: 10rem;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font: inherit;
}

.textarea-control:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.subtle-link {
  color: var(--text-muted);
}

/* ——— Hero ——— */
.hero {
  padding-top: clamp(0.75rem, 2vw, 1.5rem);
  padding-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  grid-gap: clamp(1.5rem, 5vw, 4rem);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: start;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

.hero__cta {
  width: 100%;
  align-self: start;
}

.light-theme .hero {
  background: transparent;
}

.hero__badge {
  display: inline-flex;
  width: -moz-fit-content;
  width: fit-content;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--accent);
  border: 1px solid rgba(98, 208, 189, 0.35);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 0.85rem;
  background: rgba(61, 184, 168, 0.08);
}

.light-theme .hero__badge {
  background: rgba(61, 139, 110, 0.1);
  border-color: rgba(61, 139, 110, 0.3);
}

.hero__title {
  font-size: clamp(2.1rem, 5vw, 3.85rem);
  margin: 0 0 0.75rem;
  font-weight: 760;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.light-theme .hero__title {
  color: var(--light-text);
  letter-spacing: -0.02em;
}

.hero__lead {
  font-size: clamp(1.05rem, 2.4vw, 1.22rem);
  color: var(--text-muted);
  max-width: 38rem;
  margin: 0 0 1.15rem;
  line-height: 1.6;
}

.light-theme .hero__lead {
  color: var(--light-text-muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 1.1rem;
}

.hero__actions .btn {
  width: auto;
  min-width: 180px;
  padding: 0.72rem 1.2rem;
  font-size: 0.98rem;
}

.light-theme .hero__actions .btn--primary {
  background: var(--light-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(61, 139, 110, 0.25);
  transition: all 0.2s ease;
}

.light-theme .hero__actions .btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(61, 139, 110, 0.35);
}

.light-theme .hero__actions .btn--outline {
  border-color: var(--light-border);
  color: var(--light-text);
}

.hero__trust {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 34rem;
  margin: 0;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

.light-theme .hero__trust {
  color: var(--light-text-muted);
  border-top-color: var(--light-border-soft);
}

/* Sections */
.section {
  padding-top: clamp(1.1rem, 2.4vw, 1.65rem);
  padding-bottom: clamp(1.1rem, 2.4vw, 1.65rem);
}

.section--tight {
  padding-top: clamp(0.75rem, 1.5vw, 1.1rem);
  padding-bottom: clamp(0.75rem, 1.5vw, 1.1rem);
}

.section__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.35rem;
}

.section__subtitle {
  color: var(--text-muted);
  margin: 0 0 1.15rem;
  max-width: 36rem;
}

.section__subtitle--tight-steps {
  margin-bottom: 0.85rem;
}

.grid-3 {
  display: grid;
  grid-gap: 0.85rem;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ——— Steps 3 (How it works) ——— */
.steps-3 {
  display: grid;
  grid-gap: 1rem;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .steps-3 {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.25rem;
}

.step-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(61, 184, 168, 0.15);
  border: 1px solid rgba(61, 184, 168, 0.35);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
}

.step-card h3 {
  font-family: var(--font-ui), sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.step-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.light-theme .step-card {
  background: var(--light-card);
  border-color: var(--light-border-soft);
  box-shadow: var(--light-shadow);
}

.light-theme .step-card__num {
  background: var(--light-accent-bg);
  border-color: rgba(61, 139, 110, 0.3);
  color: var(--light-accent);
}

.light-theme .step-card h3 {
  color: var(--light-text);
}

.light-theme .step-card p {
  color: var(--light-text-muted);
}

/* ——— Demo Map ——— */
.demo-map {
  display: grid;
  grid-gap: 0.85rem;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .demo-map {
    grid-template-columns: repeat(2, 1fr);
  }
}

.demo-map__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem 1.15rem;
}

.demo-map__item strong {
  display: block;
  font-family: var(--font-ui), sans-serif;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.demo-map__item ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.demo-map__item ul li + li {
  margin-top: 0.2rem;
}

.demo-map__item p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.demo-map__item--agree {
  background: rgba(61, 184, 168, 0.06);
  border-color: rgba(61, 184, 168, 0.2);
}

.demo-map__item--step {
  background: rgba(61, 139, 110, 0.08);
  border-color: rgba(61, 139, 110, 0.2);
}

.light-theme .demo-map__item {
  background: var(--light-card);
  border-color: var(--light-border-soft);
  box-shadow: var(--light-shadow);
}

.light-theme .demo-map__item strong {
  color: var(--light-accent);
}

.light-theme .demo-map__item ul,
.light-theme .demo-map__item p {
  color: var(--light-text-muted);
}

.light-theme .demo-map__item--agree {
  background: var(--light-accent-bg);
  border-color: rgba(61, 139, 110, 0.2);
}

.light-theme .demo-map__item--step {
  background: rgba(61, 139, 110, 0.06);
  border-color: rgba(61, 139, 110, 0.15);
}

/* ——— Scenarios 4 ——— */
.scenarios-4 {
  display: grid;
  grid-gap: 0.85rem;
  gap: 0.85rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .scenarios-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .scenarios-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.scenario {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
}

.scenario h3 {
  font-family: var(--font-ui), sans-serif;
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.scenario p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.45;
}

.light-theme .scenario {
  background: var(--light-card);
  border-color: var(--light-border-soft);
  box-shadow: var(--light-shadow);
}

.light-theme .scenario h3 {
  color: var(--light-text);
}

.light-theme .scenario p {
  color: var(--light-text-muted);
}

/* ——— Trust Block ——— */
.trust-block {
  max-width: 560px;
}

.trust-list {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.trust-list li {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  padding-left: 1.25rem;
  position: relative;
}

.trust-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.light-theme .trust-list li {
  color: var(--light-text-muted);
}

.light-theme .trust-list li::before {
  color: var(--light-accent);
}

.trust-cta {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.trust-cta .btn {
  width: auto;
  min-width: 200px;
}

.trust-hint {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0;
}

.light-theme .trust-hint {
  color: var(--light-text-muted);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(61, 184, 168, 0.25);
}

.card__emoji {
  display: none;
}

.card__title {
  font-family: var(--font-ui), sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  letter-spacing: -0.01em;
}

.card__text {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.two-col {
  display: grid;
  grid-gap: 1.35rem;
  gap: 1.35rem;
  align-items: start;
}

@media (min-width: 900px) {
  .two-col {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

/* ——— Login panel ——— */
.login-panel {
  background: rgba(238, 244, 241, 0.05);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
}

.light-theme .login-panel {
  background: var(--light-card);
  border: 1px solid var(--light-border);
  box-shadow: var(--light-shadow-md);
}

.login-panel__title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.login-panel__hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.45;
}

.login-panel-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-panel-form .msg {
  margin: 0;
}

.login-panel-form .form-row {
  margin-bottom: 0;
}

.login-panel-logged {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.light-theme .login-panel__title {
  color: var(--light-text);
}

.light-theme .login-panel__hint {
  color: var(--light-text-muted);
}

/* ——— Card border-radius override for light ——— */
.light-theme .dashboard-hero-card,
.light-theme .dashboard-card,
.light-theme .trust-card,
.light-theme .dialog-card,
.light-theme .dashboard-impact-card,
.light-theme .dashboard-empty-state,
.light-theme .modal-card,
.light-theme .role-card,
.light-theme .dashboard-mini-stat,
.light-theme .dashboard-safety-note {
  border-radius: 20px;
}

.light-theme .dashboard-card--tight,
.light-theme .dashboard-card--compact {
  border-radius: 16px;
}

.light-theme .dialog-card-actions .btn,
.light-theme .dashboard-actions .btn {
  border-radius: 10px;
}

.light-theme .tab-btn {
  border-radius: 8px 8px 0 0;
}

.light-theme .tab-btn--active {
  background: var(--light-surface);
}

/* ——— Dashboard hero card ——— */
.light-theme .dashboard-hero-card h1 {
  color: var(--light-text);
}

.light-theme .dashboard-hero-card p {
  color: var(--light-text-muted);
}

.light-theme .dashboard-privacy-note {
  color: var(--light-text-muted) !important;
  border-top-color: var(--light-border-soft);
}

/* ——— Dialog progress track ——— */
.light-theme .dialog-progress-track {
  background: #EDE9E1;
}

.light-theme .dialog-progress-track i {
  background: var(--light-accent);
}

/* ——— Dashboard card titles ——— */
.light-theme .dashboard-card h2,
.light-theme .dashboard-card-head h2 {
  color: var(--light-text);
}

.light-theme .dashboard-card p,
.light-theme .dashboard-muted-line {
  color: var(--light-text-muted);
}

/* ——— Dialog card text ——— */
.light-theme .dialog-card-head-text strong {
  color: var(--light-text);
}

.light-theme .dialog-card-head-text > span {
  color: var(--light-text-muted);
}

.light-theme .dialog-card span,
.light-theme .dialog-status-description {
  color: var(--light-text-muted);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.form-row label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-row input {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.form-row select {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row input::placeholder {
  color: rgba(154, 168, 180, 0.55);
}

.form-row input:disabled,
.form-row input.input--disabled {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: not-allowed;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.78rem 1.1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 650;
  font-size: 0.9375rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.08s, filter 0.15s, opacity 0.15s;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn--primary {
  background: var(--accent);
  color: #061210;
}

.btn--primary:not(:disabled):hover {
  filter: brightness(1.06);
}

.btn--primary:not(:disabled):active {
  transform: scale(0.99);
}

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

.btn--danger:hover {
  filter: brightness(0.9);
}

.btn--outline {
  width: auto;
  display: inline-flex;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--outline:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent);
}

.msg {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.msg--error {
  background: rgba(220, 90, 90, 0.15);
  border: 1px solid rgba(220, 90, 90, 0.35);
  color: #f7b4b4;
}

.msg--ok {
  background: rgba(61, 184, 168, 0.12);
  border: 1px solid rgba(61, 184, 168, 0.35);
  color: #b8eae2;
}

.light-theme .msg--error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.light-theme .msg--ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.code-row code {
  font-size: 0.75rem;
  color: var(--warn);
}

/* Flow steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.step {
  display: flex;
  gap: 1rem;
}

.step__num {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: rgba(61, 184, 168, 0.2);
  border: 1px solid rgba(61, 184, 168, 0.45);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--accent);
}

.step__body h3 {
  font-family: var(--font-ui), sans-serif;
  font-size: 1rem;
  font-weight: 650;
  margin: 0 0 0.35rem;
}

.step__body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.925rem;
}

.footer-note {
  display: grid;
  justify-items: center;
  grid-gap: 0.45rem;
  gap: 0.45rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.35rem 1.25rem 2rem;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-note__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 0.75rem;
  font-weight: 650;
}

.footer-note__links a:not(:last-child)::after {
  content: '·';
  margin-left: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

.footer-note__legal,
.footer-note__disclaimer {
  margin: 0;
}

.footer-note__disclaimer {
  max-width: 760px;
}

/* Dashboard */
.dashboard-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}

.dashboard-nav button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
}

.dashboard-nav button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.dashboard-shell {
  max-width: 1180px;
  padding-bottom: 4rem;
}

.dashboard-nav--wide {
  margin-bottom: 1.5rem;
}

.dashboard-brand {
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.02em;
}

.dashboard-brand .brand-logo {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 0.4rem;
  vertical-align: middle;
  border-radius: 4px;
  flex-shrink: 0;
}

.dashboard-brand:hover {
  text-decoration: none;
}

.dashboard-menu {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-link {
  position: relative;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.profile-alert {
  display: inline-grid;
  place-items: center;
  width: 1rem;
  height: 1rem;
  margin-left: 0.3rem;
  border-radius: 999px;
  background: rgba(232, 184, 109, 0.18);
  color: var(--warn);
  font-size: 0.7rem;
  font-weight: 800;
  border: 1px solid rgba(232, 184, 109, 0.35);
}

.dashboard-hero-card,
.dashboard-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  box-shadow: none;
}

.dashboard-hero-card {
  padding: clamp(1.45rem, 4vw, 2.4rem);
  margin-bottom: 1rem;
}

.dashboard-hero-card h1 {
  max-width: 760px;
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3.2rem);
}

.dashboard-hero-card p {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
}

.dashboard-privacy-note {
  margin-top: 0.9rem !important;
  color: var(--text) !important;
}

.dashboard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.dashboard-actions .btn,
.dashboard-card-button {
  width: auto;
}

.dashboard-hero-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.dashboard-hero-summary span,
.dashboard-inline-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.84rem;
}

.dashboard-hero-summary strong,
.dashboard-inline-metrics strong {
  color: var(--text);
  font-weight: 700;
}

.dashboard-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(61, 184, 168, 0.42);
  background: rgba(61, 184, 168, 0.08);
  color: var(--accent);
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0;
}

.dashboard-badge--warn {
  border-color: rgba(232, 184, 109, 0.35);
  background: rgba(232, 184, 109, 0.13);
  color: var(--warn);
}

.dashboard-grid {
  display: grid;
  grid-gap: 1rem;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-grid--stats {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

@media (min-width: 900px) {
  .dashboard-grid--two {
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  }
}

.dashboard-card {
  padding: clamp(1.2rem, 3vw, 1.6rem);
}

.dashboard-card--tight {
  padding: clamp(1rem, 2.4vw, 1.3rem);
}

.dashboard-card--tight > h2 {
  margin-bottom: 0.65rem;
}

.dashboard-card--compact {
  padding: 1rem 1.1rem;
}

.dashboard-card h2 {
  margin: 0 0 1rem;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.dashboard-card p {
  margin: 0;
  color: var(--text-muted);
}

.dashboard-card-title {
  margin: 0 0 0.4rem;
  font-family: var(--font-ui), sans-serif;
  font-size: 1rem;
}

.dashboard-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.dashboard-mini-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

.dashboard-mini-stat {
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.dashboard-mini-stat--accent {
  border-color: rgba(61, 184, 168, 0.28);
  background: rgba(61, 184, 168, 0.06);
}

.dashboard-mini-stat span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.dashboard-mini-stat strong {
  font-size: 1.35rem;
  line-height: 1;
}

.dashboard-muted-line {
  margin-top: 0.75rem !important;
  font-size: 0.9rem;
}

.dashboard-card-button {
  margin-top: 1.15rem;
}

.dashboard-steps {
  display: grid;
  grid-gap: 1rem;
  gap: 1rem;
}

.dashboard-steps--compact {
  gap: 0.65rem;
  padding-left: 1.15rem;
  color: var(--text-muted);
}

.dashboard-steps--compact li {
  line-height: 1.45;
}

.dashboard-step {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 0.85rem;
  gap: 0.85rem;
}

.dashboard-step > span {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(61, 184, 168, 0.16);
  border: 1px solid rgba(61, 184, 168, 0.36);
  color: var(--accent);
  font-weight: 800;
}

.dashboard-step h3 {
  margin: 0 0 0.25rem;
  font-family: var(--font-ui), sans-serif;
  font-size: 1rem;
}

.dashboard-step p,
.dashboard-list {
  color: var(--text-muted);
  margin: 0;
}

.dashboard-list {
  display: grid;
  grid-gap: 0.7rem;
  gap: 0.7rem;
  padding-left: 1.15rem;
}

.dashboard-list--compact {
  gap: 0.5rem;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-gap: 0.65rem;
  gap: 0.65rem;
  margin-top: 1rem;
}

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

.role-card {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
  font-weight: 650;
}

.role-card:hover {
  text-decoration: none;
  border-color: rgba(61, 184, 168, 0.34);
  background: rgba(61, 184, 168, 0.08);
}

.dashboard-count {
  min-width: 1.7rem;
  height: 1.7rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.dashboard-empty {
  border: 1px dashed rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 1.25rem;
  color: var(--text-muted);
}

.dashboard-empty p {
  color: var(--text);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.dialog-list {
  display: grid;
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

.dialog-list--compact {
  gap: 0.6rem;
}

.dialog-card {
  display: grid;
  grid-gap: 0.25rem;
  gap: 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
}

.dialog-card--rich {
  gap: 0.9rem;
  background: rgba(255, 255, 255, 0.025);
}

.dialog-card--priority {
  border-color: rgba(61, 184, 168, 0.45);
}

.dialog-card-head,
.dialog-new-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* Имя и подпись (роль · тема): без явного gap сливаются в одно слово при inline-вёрстке */
.dialog-card-head-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 0.45rem;
  row-gap: 0.2rem;
  min-width: 0;
}

.dialog-card-head-text strong {
  flex-shrink: 0;
}

.dialog-card-head-text > span {
  color: var(--text-muted);
  font-size: 0.92em;
  font-weight: 500;
}

.dialog-progress-grid {
  display: grid;
  grid-gap: 0.65rem;
  gap: 0.65rem;
}

@media (min-width: 760px) {
  .dialog-progress-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.dialog-progress-line {
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.dialog-progress-track {
  height: 0.45rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.dialog-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-dim));
}

.dialog-card-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.dashboard-inline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
  margin-top: 0.1rem;
}

.dialog-card-actions .btn {
  width: auto;
}

.dashboard-stat-card {
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
}

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

.dashboard-stat-card strong {
  font-size: 2rem;
}

.dashboard-stat-card--compact strong {
  font-size: 1.45rem;
}

.form-row--inline {
  display: grid;
  grid-gap: 0.75rem;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-row--inline label {
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
}

/* Dashboard empty section */
.dashboard-empty-section {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

/* Dashboard tab bar */
.dashboard-tab-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 0.9rem;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s;
  margin-bottom: -1px;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn--active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Dialog status description */
.dialog-status-description {
  margin: 0 0 0.75rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* Solo available card */
.dialog-card--solo {
  border-color: var(--warn);
  background: rgba(232, 184, 109, 0.06);
}

/* Archived card */
.dialog-card--archived {
  opacity: 0.7;
  border-style: dashed;
}

/* Danger link button */
.btn--danger-link {
  color: var(--danger);
  border-color: var(--danger);
}

.btn--danger-link:hover {
  border-color: var(--danger);
  opacity: 0.8;
}

/* Trust cards */
.trust-cards {
  margin-bottom: 1.5rem;
}

.trust-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .trust-cards-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.trust-card {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
}

.trust-card h3 {
  font-size: 0.95rem;
  font-weight: 650;
  margin: 0 0 0.4rem;
  color: var(--text);
}

.trust-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Status summary */
.dashboard-status-summary {
  margin-bottom: 1.5rem;
}

.status-summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-summary-item {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
}

.status-summary-item strong {
  font-size: 1.1rem;
  font-weight: 700;
}

.status-summary-item span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.status-summary-item--accent {
  border-color: var(--accent);
  background: rgba(98, 208, 189, 0.06);
}

/* Impact card */
.dashboard-impact-card {
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--bg-card);
}

.impact-card-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.impact-count {
  margin: 0;
  font-size: 0.95rem;
}

.impact-count strong {
  font-weight: 700;
}

.impact-subtitle {
  margin: 0.2rem 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.impact-badge {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(98, 208, 189, 0.12);
  border: 1px solid rgba(98, 208, 189, 0.3);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 650;
}

.impact-cta {
  margin-left: auto;
  width: auto;
}

/* Empty state */
.dashboard-empty-state {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 16px;
  margin-bottom: 1.5rem;
}

.dashboard-empty-state h2 {
  font-size: 1.4rem;
  margin: 0 0 0.75rem;
}

.dashboard-empty-state p {
  max-width: 480px;
  margin: 0 auto 1.25rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.empty-state-starts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.empty-state-start-btn {
  width: auto;
}

/* Safety note */
.dashboard-safety-note {
  margin-top: 2rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--border-soft, var(--border));
  border-radius: 12px;
  background: rgba(255, 213, 128, 0.05);
}

.dashboard-safety-note p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ——— Modals ——— */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(4, 8, 13, 0.65);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
}

.light-theme .modal-backdrop {
  background: rgba(31, 41, 51, 0.5);
}

.modal-card {
  width: min(100%, 520px);
  max-height: min(90vh, 600px);
  overflow: auto;
  border-radius: 20px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.light-theme .modal-card {
  border: 1px solid var(--light-border);
  background: var(--light-card);
  box-shadow: 0 20px 60px rgba(31, 41, 51, 0.12);
}

.modal-card h2 {
  margin: 0 0 0.75rem;
}

.modal-card p {
  color: var(--text-muted);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.modal-card .btn-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.modal-card .btn {
  width: 100%;
}

.modal-card .btn--outline {
  border-color: var(--border);
}

/* Reminder modal */
.reminder-text {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 1rem;
}

.light-theme .reminder-text {
  background: var(--light-page);
  border-color: var(--light-border);
}

/* Success badge */
.dashboard-badge--success {
  border-color: rgba(59, 170, 132, 0.4) !important;
  background: rgba(59, 170, 132, 0.1) !important;
  color: var(--light-success) !important;
}

/* Muted badge */
.dashboard-badge--muted {
  border-color: rgba(156, 163, 175, 0.35) !important;
  background: rgba(156, 163, 175, 0.08) !important;
  color: var(--text-soft) !important;
}

/* legacy modal (replaced by ——— Modals ——— section above) */

@media (max-width: 720px) {
  .form-row--inline {
    grid-template-columns: 1fr;
  }
}

.dialog-person-grid {
  display: grid;
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

@media (min-width: 760px) {
  .dialog-person-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dialog-person-card {
  display: grid;
  grid-gap: 0.3rem;
  gap: 0.3rem;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  font: inherit;
  cursor: pointer;
}

.dialog-person-card:hover:not(:disabled) {
  border-color: rgba(61, 184, 168, 0.45);
}

.dialog-person-card span,
.dialog-person-card small {
  color: var(--text-muted);
}

.episode-status-grid {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dialog-card:hover {
  text-decoration: none;
  border-color: rgba(61, 184, 168, 0.3);
}

.dialog-card span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.profile-form-card h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 2.7rem);
}

.profile-form-card > p {
  margin-bottom: 1.35rem;
}

.profile-form {
  display: grid;
  grid-gap: 0.9rem;
  gap: 0.9rem;
}

.profile-page-stack {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-gap: 1rem;
  gap: 1rem;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  grid-gap: 0.9rem;
  gap: 0.9rem;
  align-items: end;
}

.profile-form-grid--meta {
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  align-items: start;
}

.profile-docs-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  box-shadow: none;
}

.profile-docs-card h2 {
  margin-bottom: 0.4rem;
}

.profile-save-button {
  width: auto;
  justify-self: start;
}

.person-form-card {
  padding: clamp(1.2rem, 3vw, 1.5rem);
}

.person-form-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
  grid-gap: 0.9rem;
  gap: 0.9rem;
}

.choice-grid {
  display: grid;
  grid-gap: 0.65rem;
  gap: 0.65rem;
}

.choice-grid--roles {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 1.35rem;
}

.choice-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.choice-chip,
.radio-chip {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text);
  font-family: inherit;
  font-weight: 650;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.choice-chip {
  min-height: 3rem;
  padding: 0.75rem 0.9rem;
}

.choice-chip--active,
.radio-chip--active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-dim));
  color: #071412;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.radio-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.7rem 1rem;
  text-align: center;
}

.radio-chip input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

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

.smart-role-summary {
  margin: 0.25rem 0 0.5rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.smart-role-summary strong {
  color: var(--text);
}

.legal-check-list {
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
  margin: 0 0 1rem;
}

.legal-check-row {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.legal-check-row input {
  margin-top: 0.15rem;
}

.legal-check-row--signed {
  color: rgba(229, 237, 235, 0.78);
}

.light-theme .legal-check-row {
  color: var(--light-text-muted);
}

.light-theme .legal-check-row--signed {
  color: var(--light-text);
}

.light-theme .legal-check-row a {
  color: var(--light-accent);
}

.legal-document-card {
  display: grid;
  grid-gap: 0.85rem;
  gap: 0.85rem;
}

.legal-document-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.legal-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 750;
  white-space: nowrap;
}

.legal-status--signed {
  border-color: rgba(61, 184, 168, 0.35);
  background: rgba(61, 184, 168, 0.12);
  color: var(--accent);
}

.legal-status--missing {
  border-color: rgba(255, 213, 128, 0.35);
  background: rgba(255, 213, 128, 0.1);
  color: #ffd580;
}

.legal-status-note {
  margin: -0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.legal-consent-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.85rem;
  border: 1px solid rgba(255, 213, 128, 0.25);
  border-radius: var(--radius-sm);
  background: rgba(255, 213, 128, 0.06);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.light-theme .legal-consent-row {
  background: var(--light-warn-bg);
  border-color: rgba(176, 120, 48, 0.22);
  color: var(--light-text);
}

.legal-consent-row input {
  margin-top: 0.2rem;
}

.legal-accept-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.legal-accept-panel .btn {
  width: auto;
}

.legal-check-mark {
  display: inline-grid;
  place-items: center;
  width: 0.78rem;
  height: 0.78rem;
  flex: 0 0 auto;
  margin-top: 0.12rem;
  border-radius: 999px;
  background: rgba(61, 184, 168, 0.16);
  color: var(--accent);
  font-size: 0.54rem;
  font-weight: 800;
}

.light-theme .legal-check-mark {
  background: var(--light-accent-bg);
  color: var(--light-accent);
}

.admin-shell {
  max-width: 1280px;
}

.admin-hero {
  margin-bottom: 1rem;
}

.admin-refresh-button {
  width: auto;
  margin-top: 1rem;
}

.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-stat-card {
  display: grid;
  grid-gap: 0.55rem;
  gap: 0.55rem;
}

.admin-stat-card span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.admin-stat-card strong {
  color: var(--text);
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 520px;
  font-size: 0.8rem;
}

.admin-table-cell--email {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-table th,
.admin-table td {
  padding: 0.75rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  white-space: nowrap;
}

.admin-table th {
  color: var(--text-muted);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.035);
}

.admin-table td {
  color: var(--text);
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.admin-mini-list {
  display: grid;
  grid-gap: 0.85rem;
  gap: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.admin-debug-list {
  display: grid;
  grid-gap: 1rem;
  gap: 1rem;
}

.admin-debug-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.85rem 0.95rem;
}

.admin-debug-card summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  cursor: pointer;
  list-style: none;
}

.admin-debug-card summary::-webkit-details-marker {
  display: none;
}

.admin-debug-card summary strong {
  font-size: 0.98rem;
}

.admin-debug-card summary span {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.admin-debug-block {
  margin-top: 1rem;
}

.admin-debug-block h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-ui), sans-serif;
  font-size: 0.92rem;
}

.admin-debug-grid {
  display: grid;
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

.admin-debug-subcard {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.16);
  padding: 0.75rem 0.85rem;
}

.admin-debug-subcard strong {
  display: block;
  margin-bottom: 0.25rem;
}

.admin-debug-text {
  margin: 0.35rem 0 0;
  color: var(--text);
  white-space: pre-wrap;
}

.admin-console {
  min-height: 100vh;
  padding: 1rem;
  background: var(--bg);
}

.admin-console-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) minmax(320px, 0.38fr);
  grid-gap: 1rem;
  gap: 1rem;
  max-width: 1680px;
  margin: 1rem auto 0;
}

.admin-sidebar,
.admin-main,
.admin-inspector,
.admin-panel,
.admin-metric {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-secondary);
}

.admin-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 1rem;
  align-self: start;
  min-width: 0;
  padding: 0.9rem;
  overflow: hidden;
}

.admin-brand {
  display: grid;
  grid-gap: 0.25rem;
  gap: 0.25rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.admin-brand strong {
  font-size: 1rem;
}

.admin-brand span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.admin-nav {
  display: grid;
  grid-gap: 0.25rem;
  gap: 0.25rem;
  min-width: 0;
  margin-top: 0.9rem;
}

.admin-nav button,
.admin-row-button,
.admin-icon-button {
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  cursor: pointer;
}

.admin-nav button {
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-size: 0.85rem;
}

.admin-nav button:hover,
.admin-nav button.is-active,
.admin-row-button:hover,
.admin-icon-button:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.admin-main {
  min-width: 0;
  padding: 1rem;
}

.admin-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.admin-toolbar h1 {
  margin: 0;
  font-family: var(--font-ui), sans-serif;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.admin-toolbar p {
  max-width: 760px;
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.admin-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-toolbar-actions input {
  width: min(34vw, 360px);
  min-height: 2.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(229, 237, 235, 0.12);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
}

.admin-section-stack {
  display: grid;
  grid-gap: 1rem;
  gap: 1rem;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-gap: 0.75rem;
  gap: 0.75rem;
}

.admin-metric {
  display: grid;
  grid-gap: 0.35rem;
  gap: 0.35rem;
  padding: 0.8rem;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.admin-metric span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.admin-metric strong {
  font-size: 1.65rem;
  letter-spacing: 0;
}

.admin-panels-two {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-gap: 1rem;
  gap: 1rem;
}

.admin-panel {
  min-width: 0;
  padding: 0.9rem;
}

.admin-panel h2 {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui), sans-serif;
  font-size: 1rem;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-panel-head h2 {
  margin: 0;
}

.admin-table-wrap {
  overflow: auto;
  max-height: 68vh;
}

.admin-table {
  min-width: 760px;
  font-size: 0.78rem;
}

.admin-table tbody tr {
  cursor: pointer;
}

.admin-table tbody tr:hover td {
  background: rgba(61, 184, 168, 0.06);
}

.admin-table th {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 1;
}

.admin-table td {
  vertical-align: top;
}

.admin-row-button,
.admin-icon-button {
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  white-space: nowrap;
}

.admin-id-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.admin-id-chip code {
  color: #d8f2ed;
  font-size: 0.78rem;
}

.admin-status {
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  padding: 0.2rem 0.48rem;
  border: 1px solid rgba(229, 237, 235, 0.12);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 760;
}

.admin-status--good {
  border-color: rgba(61, 184, 168, 0.34);
  color: #73e4d4;
}

.admin-status--warn {
  border-color: rgba(255, 213, 128, 0.32);
  color: #ffd580;
}

.admin-status--bad {
  border-color: rgba(255, 111, 111, 0.36);
  color: #ff9b9b;
}

.admin-status--neutral {
  color: var(--text-muted);
}

.admin-link {
  color: #73e4d4;
  text-decoration: none;
}

.admin-link:hover {
  text-decoration: underline;
}

.admin-empty {
  padding: 1rem;
  border: 1px solid rgba(229, 237, 235, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text-muted);
}

.admin-empty--bad {
  border-color: rgba(255, 111, 111, 0.3);
  color: #ffb2b2;
}

.admin-json-inline,
.admin-inspector-json {
  overflow: auto;
  margin: 0;
  border: 1px solid rgba(229, 237, 235, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.24);
  color: #d8f2ed;
  font-size: 0.74rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.admin-json-inline {
  max-height: 70vh;
  padding: 0.9rem;
}

.admin-inspector {
  position: -webkit-sticky;
  position: sticky;
  top: 1rem;
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - 2rem);
  padding: 0.9rem;
}

.admin-inspector-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-inspector-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.admin-inspector-json {
  max-height: calc(100vh - 6.5rem);
  padding: 0.75rem;
}

.admin-llm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 0.65rem;
  gap: 0.65rem;
}

.admin-llm-profile {
  display: grid;
  grid-gap: 0.25rem;
  gap: 0.25rem;
  padding: 0.75rem;
  border: 1px solid rgba(229, 237, 235, 0.1);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.16);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.admin-llm-profile span {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.admin-llm-profile.is-active {
  border-color: rgba(61, 184, 168, 0.5);
  background: rgba(61, 184, 168, 0.12);
}

.admin-llm-models {
  display: grid;
  grid-gap: 0.55rem;
  gap: 0.55rem;
}

.admin-llm-model-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.35fr) minmax(220px, 1fr);
  grid-gap: 0.75rem;
  gap: 0.75rem;
  align-items: center;
}

.admin-llm-model-row span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.admin-llm-model-row select {
  min-height: 2.35rem;
  border: 1px solid rgba(229, 237, 235, 0.12);
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.24);
  color: var(--text);
  padding: 0.55rem 0.65rem;
}

@media (max-width: 1180px) {
  .admin-console-grid {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .admin-inspector {
    grid-column: 1 / -1;
    position: static;
    max-height: none;
  }

  .admin-inspector-json {
    max-height: 420px;
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 0.5rem;
    padding-bottom: 1.25rem;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }

  .hero__content {
    gap: 0.85rem;
  }

  .hero__title {
    max-width: none;
    font-size: clamp(2.05rem, 11vw, 2.75rem);
    line-height: 1.06;
    letter-spacing: -0.03em;
  }

  .hero__lead {
    font-size: 1rem;
    max-width: none;
    margin-bottom: 0.15rem;
  }

  .hero__actions .btn {
    width: 100%;
    min-width: 0;
  }

  .hero__trust {
    max-width: none;
    font-size: 0.85rem;
  }

  .hero__teaser {
    padding: 1rem;
  }

  .hero__teaser h2 {
    font-size: 1rem;
  }

  .admin-console {
    padding: 0.7rem;
  }

  .admin-console-grid,
  .admin-panels-two {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
  }

  .admin-nav {
    display: flex;
    max-width: calc(100vw - 3.2rem);
    overflow-x: auto;
  }

  .admin-nav button {
    white-space: nowrap;
  }

  .admin-toolbar {
    flex-direction: column;
  }

  .admin-toolbar-actions,
  .admin-toolbar-actions input {
    width: 100%;
  }

  .admin-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panel-head,
  .admin-llm-model-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  .l-wrap {
    padding-inline: 0.8rem;
  }

  .dashboard-menu {
    gap: 0.45rem;
  }

  .dashboard-actions .btn,
  .dashboard-card-button {
    width: 100%;
  }

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

  .role-grid--compact {
    grid-template-columns: 1fr;
  }

  .dashboard-inline-metrics,
  .dashboard-hero-summary {
    flex-direction: column;
  }

  .profile-save-button {
    width: 100%;
  }

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

  .profile-form-grid,
  .profile-form-grid--meta {
    grid-template-columns: 1fr;
  }

  .profile-docs-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-document-head {
    flex-direction: column;
  }

  .legal-accept-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-accept-panel .btn {
    width: 100%;
  }

  .choice-grid--roles,
  .choice-grid--compact {
    grid-template-columns: 1fr;
  }

  .admin-table {
    font-size: 0.75rem;
  }

  .admin-table th,
  .admin-table td {
    padding: 0.5rem 0.6rem;
  }

  .admin-table-cell--email {
    max-width: 120px;
    font-size: 0.7rem;
  }

  .admin-table-cell--wide {
    display: none;
  }

  .admin-table-cell--stacked {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .dashboard-grid--two {
    grid-template-columns: 1fr;
  }
}

/* ——— User detail panel ——— */
.admin-user-detail {
  padding: 0.75rem;
  overflow-y: auto;
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.admin-user-detail-section h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--light-text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--light-border);
}

.light-theme .admin-user-detail-section h3 {
  color: var(--light-text);
}

.admin-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-gap: 0.15rem 0.75rem;
  gap: 0.15rem 0.75rem;
  font-size: 0.8rem;
}

.admin-dl dt {
  color: var(--light-text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.light-theme .admin-dl dt {
  color: var(--light-text-muted);
}

.admin-dl dd {
  color: var(--light-text);
  word-break: break-all;
}

.light-theme .admin-dl dd {
  color: var(--light-text);
}

.admin-user-relation-card {
  background: var(--light-bg-secondary);
  border: 1px solid var(--light-border-soft);
  border-radius: 0.375rem;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
}

.light-theme .admin-user-relation-card {
  background: var(--light-card);
  border-color: var(--light-border-soft);
}

.admin-user-relation-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
  font-size: 0.8rem;
}

.admin-user-relation-card-head strong {
  color: var(--light-accent);
  font-weight: 600;
}

.admin-user-relation-card-head span {
  color: var(--light-text-muted);
  font-size: 0.75rem;
}

.admin-user-participant {
  font-size: 0.8rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid var(--light-border-soft);
}

.admin-user-participant:last-child {
  border-bottom: none;
}

.admin-user-participant strong {
  color: var(--light-accent);
  font-weight: 600;
}

.admin-user-participant-num {
  margin-top: 0.25rem;
  padding-left: 0.5rem;
  font-size: 0.75rem;
}

.admin-bad {
  color: var(--light-bad);
  font-style: italic;
}

.light-theme .admin-bad {
  color: var(--light-bad);
}

.admin-text-preview {
  font-size: 0.75rem;
  color: var(--light-text-muted);
  margin: 0.25rem 0 0;
  line-height: 1.4;
}

.light-theme .admin-text-preview {
  color: var(--light-text-muted);
}

.admin-num-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--light-accent);
  display: block;
  margin-bottom: 0.1rem;
}

.light-theme .admin-num-label {
  color: var(--light-accent);
}

.admin-text-full {
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0.35rem 0 0;
  padding: 0.4rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  border-left: 2px solid var(--light-accent);
  white-space: pre-wrap;
  max-height: 300px;
  overflow-y: auto;
}

.light-theme .admin-text-full {
  color: var(--light-text);
  background: rgba(0, 0, 0, 0.04);
}

.admin-user-participant strong {
  color: var(--light-accent);
  font-weight: 600;
}

.light-theme .admin-user-participant strong {
  color: var(--light-accent);
}

.admin-user-participant-num {
  margin-top: 0.35rem;
  padding-left: 0.5rem;
}

.admin-status--good { color: #22c55e; }
.admin-status--bad { color: #ef4444; }
.admin-status--warn { color: #eab308; }
.admin-status--neutral { color: var(--text-muted); }

.light-theme .admin-status--good { color: #16a34a; }
.light-theme .admin-status--bad { color: #dc2626; }
.light-theme .admin-status--warn { color: #ca8a04; }
.light-theme .admin-status--neutral { color: var(--light-text-muted); }

.admin-raw-section {
  margin-top: auto;
}

.admin-raw-section summary {
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--light-text-muted);
  padding: 0.25rem 0;
}

.light-theme .admin-raw-section summary {
  color: var(--light-text-muted);
}

.admin-llm-models--manage {
  gap: 0.35rem;
}

.admin-llm-active-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  border: 1px solid rgba(229, 237, 235, 0.08);
  border-radius: 4px;
  font-size: 0.82rem;
}

.light-theme .admin-llm-active-row {
  border-color: var(--light-border-soft);
}

.admin-llm-active-row span {
  color: var(--text);
}

.light-theme .admin-llm-active-row span {
  color: var(--light-text);
}

.admin-llm-add-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  padding-top: 0.5rem;
}

.admin-llm-add-row select {
  flex: 1 1;
  min-height: 2.35rem;
  border: 1px solid rgba(229, 237, 235, 0.12);
  border-radius: 6px;
  padding: 0 0.5rem;
  font-size: 0.82rem;
}

