/* Domovnik portal: local, CSP-safe design system. */
:root {
  color-scheme: light;
  --canvas: #f7f7f5;
  --canvas-glow: #f7f7f5;
  --surface: #ffffff;
  --surface-raised: #fcfcfb;
  --surface-muted: #f1f1ee;
  --border: #e3e3df;
  --border-strong: #cfcfca;
  --text: #20211f;
  --muted: #6f716c;
  --faint: #989994;
  --accent: #d95735;
  --accent-strong: #bd4528;
  --accent-soft: #fbe8e2;
  --ok: #177b57;
  --ok-soft: #e7f4ed;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --err: #c13f38;
  --err-soft: #fae8e6;
  --shadow: 0 1px 2px rgba(24, 25, 23, .04);
  --shadow-pop: 0 22px 56px rgba(23, 31, 55, .18);
  --radius: 16px;
  --radius-sm: 10px;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #171816;
  --canvas-glow: #171816;
  --surface: #20211f;
  --surface-raised: #262724;
  --surface-muted: #2b2c29;
  --border: #383a35;
  --border-strong: #50514d;
  --text: #f0f0eb;
  --muted: #b2b3ac;
  --faint: #85867f;
  --accent: #f18a68;
  --accent-strong: #f7a386;
  --accent-soft: #4a2b23;
  --ok: #74d6ad;
  --ok-soft: #183d30;
  --warn: #f0c767;
  --warn-soft: #493a18;
  --err: #ffaaa1;
  --err-soft: #4a2926;
  --shadow: 0 1px 2px rgba(0, 0, 0, .28);
  --shadow-pop: 0 22px 56px rgba(0, 0, 0, .46);
}

@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    color-scheme: dark;
    --canvas: #171816;
    --canvas-glow: #171816;
    --surface: #20211f;
    --surface-raised: #262724;
    --surface-muted: #2b2c29;
    --border: #383a35;
    --border-strong: #50514d;
    --text: #f0f0eb;
    --muted: #b2b3ac;
    --faint: #85867f;
    --accent: #f18a68;
    --accent-strong: #f7a386;
    --accent-soft: #4a2b23;
    --ok: #74d6ad;
    --ok-soft: #183d30;
    --warn: #f0c767;
    --warn-soft: #493a18;
    --err: #ffaaa1;
    --err-soft: #4a2926;
    --shadow: 0 1px 2px rgba(0, 0, 0, .28);
    --shadow-pop: 0 22px 56px rgba(0, 0, 0, .46);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  font: 15px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  background: radial-gradient(850px 470px at 50% -130px, var(--canvas-glow), transparent 72%), var(--canvas);
}
button, input, select { font: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 5px; font-size: clamp(24px, 3vw, 30px); line-height: 1.2; letter-spacing: -.035em; }
h2 { margin-bottom: 0; font-size: 16px; line-height: 1.3; letter-spacing: -.01em; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }

/* App shell and navigation */
.topbar { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid color-mix(in srgb, var(--border) 82%, transparent); background: color-mix(in srgb, var(--canvas) 88%, transparent); backdrop-filter: blur(16px); }
.topbar-inner { display: flex; align-items: center; gap: 24px; width: min(1180px, calc(100% - 40px)); min-height: 68px; margin: 0 auto; }
.brand { flex: 0 0 auto; color: var(--text); font-size: 16px; font-weight: 760; letter-spacing: -.04em; }
.brand:hover { color: var(--text); }
.brand-mark { display: inline-grid; width: 21px; height: 21px; margin-right: 7px; place-items: center; border-radius: 7px; color: #fff; font-size: 13px; font-weight: 800; background: linear-gradient(135deg, var(--accent), #7c76ff); vertical-align: -1px; }
.brand .dot { color: var(--accent); }
.nav { display: flex; flex: 1; gap: 3px; align-items: center; min-width: 0; }
.nav a { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 650; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-muted); }
.nav a.on { color: var(--accent); background: var(--accent-soft); }
.nav-user { display: flex; gap: 10px; align-items: center; flex: 0 0 auto; }
.nav-email { max-width: 210px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.logout-form, .inline-form { margin: 0; }
.inline-form { display: inline-flex; }
.theme-toggle { width: 34px; height: 34px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--muted); box-shadow: none; font-size: 16px; }
.theme-toggle:hover { background: var(--surface-muted); color: var(--text); }

/* Přepínač jazyka. Vedle přepínače motivu a stejně velký — jsou to dvě
   rovnocenné volby zobrazení, ne akce a její popisek. */
.topbar-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.lang-switch { display: inline-grid; min-width: 34px; height: 34px; padding: 0 9px; place-items: center;
               border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
               color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
.lang-switch:hover { background: var(--surface-muted); color: var(--text); }

/* Authenticated portal: an application frame rather than a marketing-style page. */
.app-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 28px 16px 18px; color: #d9def0; background: #171b2b; }
.sidebar-brand { padding: 0 10px; color: #fff; font-size: 19px; }
.sidebar-brand:hover { color: #fff; }
.sidebar .brand-mark { background: linear-gradient(135deg, #736bff, #9b96ff); }
.sidebar-caption { margin: 9px 10px 30px; color: #8e98b6; font-size: 10px; font-weight: 760; letter-spacing: .14em; text-transform: uppercase; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav a { display: flex; gap: 11px; align-items: center; min-height: 42px; padding: 0 11px; border: 1px solid transparent; border-radius: 10px; color: #b8c0d8; font-size: 14px; font-weight: 650; }
.sidebar-nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.sidebar-nav a.on { border-color: rgba(164, 158, 255, .18); color: #fff; background: linear-gradient(90deg, rgba(127, 117, 255, .34), rgba(127, 117, 255, .12)); box-shadow: inset 3px 0 #938cff; }
.nav-glyph { display: inline-grid; width: 19px; place-items: center; color: #9f9adf; font-size: 16px; }
.sidebar-nav a.on .nav-glyph { color: #fff; }
.sidebar-footer { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1); }
.user-chip { display: flex; gap: 9px; align-items: center; min-width: 0; padding: 0 8px; }
.user-avatar { display: grid; flex: 0 0 auto; width: 29px; height: 29px; place-items: center; border-radius: 9px; color: #dcd9ff; background: #343a57; font-size: 12px; font-weight: 780; }
.user-email { overflow: hidden; color: #c7cde0; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; padding: 0 8px; }
.sidebar .theme-toggle { width: 32px; height: 32px; border-color: rgba(255, 255, 255, .14); color: #cbd1e5; background: rgba(255, 255, 255, .06); }
.sidebar .theme-toggle:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.sidebar .btn.ghost { border-color: rgba(255, 255, 255, .14); color: #d8ddef; }
.sidebar .btn.ghost:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.app-content { min-width: 0; display: flex; flex-direction: column; background: radial-gradient(760px 440px at 94% -60px, color-mix(in srgb, var(--accent-soft) 78%, transparent), transparent 75%), var(--canvas); }
.app-content .wrap { width: min(1240px, calc(100% - 96px)); margin: 0 auto; padding: 56px 0 80px; }
.app-content .wrap > h1 { margin-bottom: 5px; }
.mobile-brandbar, .mobile-nav { display: none; }

.eyebrow { display: inline-block; margin-bottom: 10px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.overview-hero { position: relative; display: flex; gap: 26px; align-items: end; justify-content: space-between; overflow: hidden; min-height: 196px; margin-bottom: 20px; padding: 31px 34px; border: 1px solid color-mix(in srgb, var(--accent) 23%, var(--border)); border-radius: 22px; color: #fff; background: radial-gradient(circle at 80% 12%, rgba(152, 145, 255, .43), transparent 31%), linear-gradient(135deg, #302d68, #242a53 56%, #1f2545); box-shadow: 0 22px 44px rgba(48, 45, 104, .2); }
.overview-hero::after { position: absolute; right: -44px; bottom: -78px; width: 250px; height: 250px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 50%; content: ""; }
.overview-hero h1 { position: relative; z-index: 1; margin-bottom: 8px; color: #fff; font-size: clamp(29px, 4vw, 40px); }
.overview-hero .page-sub { position: relative; z-index: 1; max-width: 560px; margin: 0; color: #cbd0f5; }
.overview-hero .eyebrow { position: relative; z-index: 1; color: #bdb8ff; }
/* Řádek s názvem účtu pod jménem přihlášeného. Barvy MUSÍ jít z tokenů motivu:
   `.overview-hero` je v aplikační části přebitý na světlé pozadí, takže natvrdo zapsaná
   světlá barva je bílé písmo na béžové (hlášeno 1. 8. 2026). */
.hero-person { position: relative; z-index: 1; margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.hero-person strong { color: var(--text); font-weight: 650; }
.hero-person-sub { color: var(--muted); }
/* Ikona úpravy vedle názvu účtu — otevírá modal, sama nic needituje. */
.icon-btn { padding: 2px 6px; border: 1px solid transparent; border-radius: 7px; color: var(--muted); background: none; font-size: 13px; line-height: 1; cursor: pointer; }
.icon-btn:hover { border-color: var(--border); color: var(--text); background: var(--surface); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.modal-form { display: flex; flex-direction: column; gap: 10px; }
.modal-title { margin: 0; font-size: 17px; }
.modal-form input[type="text"] { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: var(--canvas); }
.hero-meta { position: relative; z-index: 1; min-width: 165px; padding: 15px 17px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 14px; background: rgba(9, 12, 33, .22); backdrop-filter: blur(10px); }
.hero-meta .k { color: #c5c9eb; font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.hero-meta .v { margin-top: 4px; color: #fff; font-size: 20px; font-weight: 760; }
.member-hero { min-height: 165px; }
.member-hero .btn { position: relative; z-index: 1; flex: 0 0 auto; color: #2e2a65; background: #fff; }
.member-hero .btn:hover { color: #211e54; background: #f0efff; }

.app-content .grid3 { gap: 18px; margin-bottom: 36px; }
.app-content .stat { min-height: 144px; padding: 24px; border-radius: 18px; }
.app-content .stat::after { left: 24px; width: 46px; height: 4px; }
.app-content .stat .v { font-size: 34px; }
.app-content .section { margin-top: 42px; }
.app-content .section-head { margin-bottom: 16px; }
.app-content .section-head h2 { font-size: 19px; }
.app-content .tbl-wrap { border-radius: 16px; }
.app-content .card { border-radius: 18px; }

/* Individual workspaces: heading, data canvas, then a clearly separated action area. */
.page-heading { display: flex; gap: 24px; align-items: end; justify-content: space-between; margin-bottom: 30px; }
.page-heading h1 { margin-bottom: 7px; font-size: clamp(29px, 3vw, 36px); }
.page-heading .page-sub { max-width: 720px; margin: 0; }
.heading-note { display: flex; gap: 8px; align-items: center; padding: 8px 11px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 12px; font-weight: 700; white-space: nowrap; }
.heading-note::before { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); content: ""; }
.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 24px; align-items: start; }
.data-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.data-panel .tbl-wrap { border: 0; border-radius: 0; box-shadow: none; }
.data-panel .tbl th { padding-top: 13px; padding-bottom: 13px; }
.data-panel .tbl td { padding-top: 16px; padding-bottom: 16px; }
.data-panel-label { display: flex; gap: 10px; align-items: center; justify-content: space-between; min-height: 61px; padding: 0 19px; border-bottom: 1px solid var(--border); }
.data-panel-label h2 { font-size: 15px; }
.form-panel { padding: 22px; }
.form-panel > .card-intro { margin-bottom: 14px; }
.record-count { display: inline-flex; min-height: 24px; padding: 3px 8px; align-items: center; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 800; }
.empty-panel { display: grid; min-height: 215px; padding: 26px; place-items: center; color: var(--muted); text-align: center; }
.empty-panel p { max-width: 310px; margin: 0; }
.action-card { position: sticky; top: 28px; padding: 24px; border: 1px solid var(--border); border-radius: 18px; background: linear-gradient(145deg, var(--surface), var(--surface-raised)); box-shadow: var(--shadow); }
.action-card::before { display: block; width: 32px; height: 4px; margin-bottom: 17px; border-radius: 999px; background: var(--accent); content: ""; }
.action-card .card-title { margin-bottom: 5px; font-size: 18px; }
.action-card .card-intro { margin-bottom: 16px; line-height: 1.5; }
.action-card .form-submit.compact { width: 100%; margin-top: 21px; }
.wide-workspace { max-width: 100%; }
.workspace-grid.wide-workspace { grid-template-columns: minmax(0, 1fr); }

.resource-heading { display: flex; gap: 22px; align-items: end; justify-content: space-between; margin-bottom: 29px; padding: 0 2px; }
.resource-heading .title-row { margin: 0 0 7px; }
.resource-heading h1 { font-size: clamp(28px, 3vw, 36px); }
.resource-heading .page-sub { margin: 0; }
.resource-heading .eyebrow { margin-bottom: 8px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 370px); gap: 24px; align-items: start; }
.detail-card { padding: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.detail-card .tbl-wrap { border: 0; border-radius: 0; box-shadow: none; }
.detail-card .tbl { min-width: 0; }
.detail-card .tbl th { width: 38%; text-transform: none; letter-spacing: 0; }
.detail-aside { display: grid; gap: 16px; }
.detail-aside .alert { margin: 0; }
.action-stack { padding: 23px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.action-stack h2 { margin-bottom: 8px; font-size: 16px; }
.action-stack .form-actions { display: grid; margin-top: 18px; }
.action-stack .inline-form, .action-stack .inline-form button { width: 100%; }
.action-stack .small { margin-bottom: 0; }
.info-strip { margin: 0 0 20px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 12px; color: var(--muted); background: var(--surface-muted); font-size: 13px; }
.dns-list { padding: 22px; }
.dns-list > h2 { margin: 0 0 16px; font-size: 17px; }
.dns-list .dnsrec:last-child { margin-bottom: 0; }

/* Contextual, centrally maintained help (templates/_page_help.html). */
.page-help { width: min(1240px, calc(100% - 96px)); margin: 0 auto 70px; }
.page-help details { overflow: hidden; border: 1px solid var(--border); border-radius: 16px; background: color-mix(in srgb, var(--surface) 92%, var(--accent-soft)); }
.page-help summary { display: flex; gap: 13px; align-items: center; min-height: 68px; padding: 12px 20px; cursor: pointer; list-style: none; }
.page-help summary::-webkit-details-marker { display: none; }
.page-help summary strong { display: block; color: var(--text); font-size: 14px; }
.page-help summary small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }
.help-mark { display: grid; flex: 0 0 auto; width: 27px; height: 27px; place-items: center; border-radius: 9px; color: var(--accent); background: var(--accent-soft); font-size: 15px; font-weight: 800; }
.help-chevron { margin-left: auto; color: var(--muted); font-size: 18px; transition: transform .18s ease; }
.page-help details[open] .help-chevron { transform: rotate(180deg); }
.help-body { display: grid; grid-template-columns: minmax(200px, .85fr) minmax(280px, 1.15fr); gap: 16px 34px; padding: 4px 20px 20px 60px; border-top: 1px solid var(--border); }
.help-kicker { display: block; margin-bottom: 5px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.help-body h2 { margin: 0 0 6px; font-size: 16px; }
.help-body p { margin: 0; color: var(--muted); font-size: 13px; }
.help-body ul { display: grid; gap: 7px; margin: 0; padding-left: 18px; color: var(--text); font-size: 13px; }
.help-body li::marker { color: var(--accent); }
.help-maintenance { grid-column: 1 / -1; padding-top: 12px; border-top: 1px dashed var(--border-strong); color: var(--faint) !important; font-size: 11px !important; }
.signup-mailbox-name { gap: 0; }
.signup-local-input { border-right: 0; border-radius: 8px 0 0 8px; }
.signup-domain-suffix { padding: 0 12px; color: var(--muted); white-space: nowrap; }
.signup-done-card { max-width: 480px; }
.signup-security-note {
  display: grid;
  gap: 3px;
  margin: 18px 0 20px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
}
.signup-security-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

/* Volba „naše doména vs. vlastní" v registraci. */
.volba-domeny { margin: 18px 0 12px; padding: 0; border: 0; display: grid; gap: 8px; }
.volba-domeny legend { padding: 0; margin-bottom: 6px; font-size: 13px; color: var(--muted); }
.volba-domeny .volba {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  line-height: 1.5;
}
.volba-domeny .volba:has(input:checked) { border-color: var(--accent); background: var(--surface-2); }
.volba-domeny .volba span { font-size: 13px; color: var(--muted); }
.volba-domeny .volba strong { color: var(--text); }
/* Bez JS zůstanou vidět oba bloky — skrývá je až skript přes `hidden`. */
.volba-blok[hidden] { display: none; }

/* Verdikt živé kontroly jména schránky. Barvu drží stav, ne jen text: uživatel
   musí poznat rozdíl mezi „volné" a „obsazené" jedním pohledem. */
.dostupnost-vysledek { margin: 6px 0 0; font-size: 12px; line-height: 1.5; min-height: 1.2em; }
.dostupnost-vysledek.je-volno { color: var(--ok, #2e7d32); }
.dostupnost-vysledek.je-obsazeno { color: var(--err, #c62828); }
.dostupnost-vysledek.je-cekam { color: var(--faint); }
.signup-security-choice {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  padding: 20px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 65%),
    var(--surface-2);
}
.signup-security-choice h2 { margin: 4px 0 8px; font-size: 20px; }
.signup-security-choice p { margin: 0; line-height: 1.55; }
.signup-2fa-btn { justify-self: start; }
.signup-login-btn { margin-top: 18px; }
.scope-hint { margin-top: 8px; }

@media (max-width: 980px) {
  .page-help { width: min(100% - 48px, 1240px); }
}

@media (max-width: 620px) {
  .page-help { width: min(100% - 28px, 1240px); margin-bottom: 42px; }
  .page-help summary { padding: 12px 14px; }
  .help-body { grid-template-columns: 1fr; padding: 14px; }
}

@media (max-width: 980px) {
  .workspace-grid, .detail-grid { grid-template-columns: 1fr; }
  .action-card { position: static; }
  .page-heading { align-items: start; flex-direction: column; }
}

@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .mobile-brandbar { display: flex; min-height: 64px; padding: 0 22px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--canvas) 88%, transparent); }
  .mobile-actions { display: flex; gap: 8px; align-items: center; }
  .mobile-nav { display: flex; gap: 4px; padding: 8px 22px; overflow-x: auto; border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--canvas) 88%, transparent); }
  .mobile-nav a { padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
  .mobile-nav a.on { color: var(--accent); background: var(--accent-soft); }
  .app-content .wrap { width: min(100% - 48px, 1240px); padding-top: 40px; }
}

/* Page primitives */
main { min-height: calc(100vh - 69px); }
.wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 76px; }
.page-header { display: flex; gap: 20px; align-items: end; justify-content: space-between; margin-bottom: 28px; }
.page-header h1 { margin-bottom: 5px; }
.page-sub { margin: 2px 0 24px; color: var(--muted); }
.sub { margin-bottom: 20px; color: var(--muted); }
.center { display: grid; min-height: calc(100vh - 69px); padding: 28px 20px; place-items: center; }
.center .card { max-width: 440px; }
.stack { display: grid; gap: 18px; }
.section { margin-top: 34px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.section-head h2 { font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.success-text { color: var(--ok); }
.back { display: inline-flex; margin-bottom: 17px; color: var(--muted); font-size: 13px; font-weight: 650; }
.back:hover { color: var(--text); }
.title-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 7px; }
.title-row h1 { margin: 0; }

/* Cards, forms and buttons */
.card, .panel { width: 100%; padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-compact { max-width: 460px; margin-top: 24px; }
.card-medium { max-width: 520px; }
.card-wide { max-width: 640px; }
.card h1 { font-size: 24px; }
.card-title { margin-bottom: 4px; font-size: 16px; }
.card-intro { margin-bottom: 12px; color: var(--muted); font-size: 13px; }
label { display: block; margin: 17px 0 7px; color: var(--text); font-size: 13px; font-weight: 670; }
input[type="text"], input[type="email"], input[type="password"], input:not([type]), select { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); outline: none; color: var(--text); background: var(--surface-raised); transition: border-color .15s, box-shadow .15s, background .15s; }
input::placeholder { color: var(--faint); }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.checkbox-label { display: flex; gap: 9px; align-items: center; margin-top: 16px; cursor: pointer; }
.checkbox-label input { width: auto; accent-color: var(--accent); }
.login-field-help { margin: 7px 0 0; }
.trusted-device-note { display: grid; gap: 2px; margin-top: 18px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--ok) 28%, var(--border)); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); font-size: 13px; }
.trusted-device-note strong { color: var(--text); }
.trusted-device-note span { color: var(--muted); }
.login-2fa-options { margin-top: 14px; }
.login-2fa-options summary { cursor: pointer; color: var(--muted); font-size: 13px; font-weight: 650; }
.login-2fa-options summary:hover { color: var(--text); }
button, .btn { display: inline-flex; gap: 7px; align-items: center; justify-content: center; min-height: 40px; padding: 9px 14px; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; color: #fff; background: var(--accent); font-size: 14px; font-weight: 700; line-height: 1.2; transition: transform .15s, background .15s, border-color .15s, box-shadow .15s; }
button:hover, .btn:hover { transform: translateY(-1px); color: #fff; background: var(--accent-strong); box-shadow: 0 5px 12px color-mix(in srgb, var(--accent) 28%, transparent); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.btn.secondary { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn.secondary:hover { color: var(--text); background: var(--surface-muted); box-shadow: none; }
.btn.ghost { border-color: var(--border); color: var(--muted); background: transparent; }
.btn.ghost:hover { color: var(--text); background: var(--surface-muted); box-shadow: none; }
.btn.danger { background: var(--err); }
.btn.danger:hover { background: color-mix(in srgb, var(--err) 82%, #000); }
.btn.sm { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.form-submit { width: 100%; margin-top: 20px; }
.form-submit.compact { width: auto; margin-top: 14px; }
.card form > button[type="submit"] { width: 100%; margin-top: 20px; }
.card .form-submit.compact { width: auto; margin-top: 14px; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.form-actions .btn, .form-actions button { margin: 0; }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 16px 0; }
.form-row > .muted { font-size: 13px; }

/* Feedback and data */
.alert { margin: 0 0 17px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); background: var(--surface-muted); font-size: 14px; }
.alert.err { border-color: color-mix(in srgb, var(--err) 44%, var(--border)); color: var(--err); background: var(--err-soft); }
.alert.ok { border-color: color-mix(in srgb, var(--ok) 44%, var(--border)); color: var(--ok); background: var(--ok-soft); }
.alert.warn { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); color: var(--warn); background: var(--warn-soft); }
.alert-list { margin: 8px 0 0; padding-left: 18px; }
.foot { margin-top: 20px; color: var(--faint); font-size: 12px; line-height: 1.6; text-align: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.stat { position: relative; overflow: hidden; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.stat::after { position: absolute; top: 0; left: 20px; width: 38px; height: 3px; border-radius: 0 0 4px 4px; background: var(--accent); content: ""; }
.stat .k { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.stat .v { margin: 8px 0 2px; font-size: 30px; font-weight: 780; letter-spacing: -.04em; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.tbl { width: 100%; min-width: 520px; border-collapse: collapse; }
.tbl th { padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--muted); background: var(--surface-muted); font-size: 11px; font-weight: 750; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.tbl td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 38%, transparent); }
.tbl .right, td.right { text-align: right; }
.tbl code { color: var(--accent); }
.actions-cell { white-space: nowrap; }
.detail-table { max-width: 560px; }
.detail-table th { width: 40%; text-transform: none; letter-spacing: 0; }
.badge { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 999px; color: var(--muted); background: var(--surface-raised); font-size: 11px; font-weight: 720; letter-spacing: .01em; white-space: nowrap; }
.badge.active { border-color: color-mix(in srgb, var(--ok) 42%, var(--border)); color: var(--ok); background: var(--ok-soft); }
.badge.pending_dns, .badge.pending_verify { border-color: color-mix(in srgb, var(--warn) 45%, var(--border)); color: var(--warn); background: var(--warn-soft); }
.badge.stale_dns, .badge.disabled { border-color: color-mix(in srgb, var(--err) 42%, var(--border)); color: var(--err); background: var(--err-soft); }

/* Secrets, DNS and QR */
.qr { width: 186px; margin: 10px auto; padding: 12px; border-radius: 12px; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 17px 0 22px; }
.codes code { padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-muted); text-align: center; letter-spacing: 1px; }
.copyrow { display: flex; gap: 8px; align-items: center; padding: 8px 9px 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-muted); }
.copyrow code { flex: 1; overflow-wrap: anywhere; color: var(--accent); }
.copybtn, button.copybtn { flex: 0 0 auto; min-height: 30px; padding: 5px 9px; border-color: var(--border); border-radius: 7px; color: var(--text); background: var(--surface); box-shadow: none; font-size: 12px; font-weight: 700; white-space: nowrap; }
.copybtn:hover { background: var(--surface-raised); box-shadow: none; }
.clipboard-helper { position: fixed; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dnsrec { margin: 11px 0; }
.dnsrec-head { margin-bottom: 6px; font-size: 13px; }
.tag { display: inline-flex; padding: 2px 7px; border-radius: 5px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 780; letter-spacing: .05em; }
.rule-heading { margin: 20px 0 8px; padding-top: 15px; border-top: 1px solid var(--border); }

/* Dialog built by app.js */
.modal-overlay { position: fixed; z-index: 60; inset: 0; display: flex; padding: 20px; align-items: center; justify-content: center; background: rgba(12, 16, 28, .55); backdrop-filter: blur(4px); }
.modal-overlay[hidden] { display: none; }
.modal-box { width: min(440px, 100%); padding: 24px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-pop); }
.modal-msg { margin: 0 0 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

@media (max-width: 780px) {
  .topbar-inner { gap: 12px; width: min(100% - 24px, 1180px); }
  .nav { gap: 0; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px; }
  .nav-email { display: none; }
  .wrap { width: min(100% - 28px, 1180px); padding-top: 30px; }
  .page-header { align-items: start; flex-direction: column; margin-bottom: 22px; }
  .grid3 { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .topbar-inner { min-height: 61px; gap: 8px; }
  .brand { font-size: 14px; }
  .brand-mark { width: 19px; height: 19px; margin-right: 4px; }
  .nav a { padding: 7px; font-size: 12px; }
  .btn.ghost { padding: 6px 8px; }
  .logout-label { display: none; }
  .wrap { width: min(100% - 24px, 1180px); padding-bottom: 52px; }
  .card, .panel { padding: 20px; }
  .tbl-wrap { margin-right: -2px; }
  .tbl { min-width: 480px; }
  .form-row { align-items: stretch; }
  .form-row > form, .form-row > .btn { width: 100%; }
  .form-row button { width: 100%; }
  .codes { grid-template-columns: 1fr; }
}

/* Landing (apex namailu.cz) */
.landing { max-width: 720px; text-align: center; padding: 8px 20px 40px; }
.landing-mark { width: 64px; height: 64px; margin: 0 auto 18px; display: grid; place-items: center;
  border-radius: 18px; font-size: 30px; color: #fff;
  background: linear-gradient(135deg, var(--accent), #7c76ff); box-shadow: var(--shadow-pop); }
.landing-title { font-size: clamp(30px, 6vw, 46px); letter-spacing: -.04em; margin-bottom: 12px; }
.landing-tagline { max-width: 520px; margin: 0 auto 26px; color: var(--muted); font-size: 16px; line-height: 1.6; }
.landing-actions { margin-bottom: 40px; }
.landing-actions .btn { padding: 12px 22px; font-size: 15px; }
.landing-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
@media (max-width: 680px) { .landing-cards { grid-template-columns: 1fr; } }
.landing-card { padding: 18px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow); }
.landing-card-h { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.landing-card code { color: var(--accent); }

/* DNS detail: sbalené volitelné záznamy */
.dns-optional { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.dns-optional > summary { cursor: pointer; color: var(--muted); font-size: 13px; padding: 6px 0; list-style: revert; }
.dns-optional > summary:hover { color: var(--text); }
.dns-optional[open] > summary { margin-bottom: 10px; }
.dnsrec-head .badge { margin-left: 8px; }

/* DNS tabulka záznamů */
.dns-tbl { table-layout: fixed; }
.dns-tbl .dns-col-host { width: 18%; }
.dns-tbl .dns-col-type { width: 62px; }
.dns-tbl .dns-col-priority { width: 52px; }
.dns-tbl .dns-col-status { width: 68px; }
.dns-tbl td { vertical-align: top; }
.dns-tbl .dns-data { display: flex; gap: 6px; align-items: flex-start; min-width: 0; }
.dns-tbl .dns-data code { flex: 1; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.dns-tbl .dns-data .copybtn { flex: 0 0 auto; }
.dns-tbl .badge { white-space: nowrap; }
.badge.recommendation { color: #92611d; background: #fff3d8; border-color: #efcf91; }
html[data-theme="dark"] .badge.recommendation { color: #f1c577; background: #342b1c; border-color: #725a30; }

/* DNS detail keeps long records wide and puts the operational controls in the heading. */
.domain-heading { align-items: center; }
.domain-check { display: flex; flex: 0 0 auto; gap: 14px; align-items: center; padding: 10px 11px 10px 13px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.domain-check strong, .domain-check small { display: block; }
.domain-check strong { font-size: 12px; }
.domain-check small { margin-top: 1px; color: var(--muted); font-size: 11px; }
.domain-check form { margin: 0; }
.domain-detail-grid { grid-template-columns: minmax(0, 1fr); }
.domain-danger-zone { display: flex; gap: 18px; align-items: center; justify-content: space-between; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--border); }
.domain-danger-zone strong { font-size: 13px; }
.domain-danger-zone p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.domain-danger-zone form { margin: 0; }
.dns-host { display: flex; gap: 6px; align-items: center; }
.copybtn.icon-copy { position: relative; width: 18px; min-width: 18px; height: 18px; min-height: 18px; padding: 0; font-size: 0; }
.copybtn.icon-copy::before, .copybtn.icon-copy::after { position: absolute; width: 6px; height: 6px; border: 1px solid currentColor; border-radius: 1px; content: ""; }
.copybtn.icon-copy::before { top: 4px; left: 4px; }
.copybtn.icon-copy::after { top: 7px; left: 7px; background: var(--surface); }
.copybtn.icon-copy.copied::before { display: none; }
.copybtn.icon-copy.copied::after { top: 1px; left: 4px; width: auto; height: auto; border: 0; border-radius: 0; background: transparent; color: var(--ok); content: "✓"; font-size: 12px; font-weight: 800; }

/* Calm product UI: information leads; decoration stays out of the way. */
body { background: var(--canvas); }
.app-shell { grid-template-columns: 232px minmax(0, 1fr); }
.sidebar { padding: 26px 14px 16px; background: #20211f; }
.sidebar-brand { font-size: 18px; }
.sidebar .brand-mark { border-radius: 6px; background: var(--accent); }
.sidebar-caption { margin-bottom: 24px; color: #979894; }
.sidebar-nav { gap: 2px; }
.sidebar-nav a { min-height: 39px; border-radius: 7px; color: #c0c1bc; font-size: 13px; }
.sidebar-nav a:hover { background: #2b2c29; }
.sidebar-nav a.on { border-color: transparent; color: #20211f; background: #f2f2ed; box-shadow: none; }
.sidebar-nav a.on .nav-glyph { color: var(--accent); }
.nav-glyph { color: #aaa; font-size: 15px; }
.sidebar-footer { border-color: #353632; }
.user-avatar { border-radius: 7px; color: #fff0eb; background: #42433f; }
/* Sidebar je tmavý bez ohledu na motiv, takže přepínač jazyka potřebuje vlastní
   kontrast — stejný jako sousední přepínač motivu, ať tvoří jednu dvojici. */
.sidebar .lang-switch { min-width: 32px; height: 32px; border-color: rgba(255, 255, 255, .14);
                        color: #c0c1bc; background: rgba(255, 255, 255, .06); }
.sidebar .lang-switch:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.app-content { background: var(--canvas); }
.app-content .wrap { width: min(1160px, calc(100% - 88px)); padding: 52px 0 48px; }
.eyebrow { margin-bottom: 7px; font-size: 10px; letter-spacing: .1em; }
.overview-hero { min-height: 0; margin-bottom: 28px; padding: 0 0 25px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; color: var(--text); background: transparent; box-shadow: none; }
.overview-hero::after { display: none; }
.overview-hero h1 { color: var(--text); font-size: clamp(29px, 3.3vw, 38px); }
.overview-hero .page-sub { color: var(--muted); }
.overview-hero .eyebrow { color: var(--accent); }
.hero-meta { min-width: 142px; padding: 11px 13px; border-color: var(--border); border-radius: 8px; background: var(--surface); backdrop-filter: none; }
.hero-meta .k { color: var(--muted); }
.hero-meta .v { color: var(--text); font-size: 18px; }
.member-hero { min-height: 0; }
.member-hero .btn { color: #fff; background: var(--accent); }
.member-hero .btn:hover { color: #fff; background: var(--accent-strong); }
.app-content .grid3 { gap: 12px; margin-bottom: 30px; }
.app-content .stat { min-height: 120px; padding: 18px; border-radius: 9px; box-shadow: none; }
.app-content .stat::after { display: none; }
.app-content .stat .v { font-size: 30px; }
.app-content .section { margin-top: 34px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1, .resource-heading h1 { font-size: clamp(28px, 3vw, 34px); }
.heading-note { padding: 6px 9px; border-color: transparent; border-radius: 6px; background: var(--surface-muted); }
.heading-note::before { display: none; }
.workspace-grid { grid-template-columns: minmax(0, 1fr) 326px; gap: 18px; }
.data-panel, .detail-card { border-radius: 9px; box-shadow: none; }
.data-panel-label { min-height: 52px; padding: 0 16px; }
.data-panel .tbl td { padding-top: 13px; padding-bottom: 13px; }
.record-count { min-height: 22px; border-radius: 5px; }
.action-card, .action-stack { padding: 20px; border-radius: 9px; background: var(--surface); box-shadow: none; }
.action-card::before { display: none; }
.action-card .card-title { font-size: 16px; }
.detail-grid { gap: 18px; }
.detail-aside { gap: 12px; }
.resource-heading { margin-bottom: 23px; }
.info-strip { border-radius: 8px; }
.tbl-wrap, .app-content .tbl-wrap { border-radius: 9px; box-shadow: none; }
.tbl th { background: transparent; }
.tbl tbody tr:hover { background: var(--surface-muted); }
.card, .panel { border-radius: 9px; box-shadow: none; }
button, .btn { border-radius: 7px; }
button:hover, .btn:hover { transform: none; box-shadow: none; }

/* Help remains available without taking space away from the work surface. */
.page-help { width: min(1160px, calc(100% - 88px)); margin: 0 auto 34px; }
.page-help details { overflow: visible; border: 0; border-radius: 0; background: transparent; }
.page-help summary { justify-content: flex-end; min-height: auto; padding: 0; }
.page-help summary strong { display: inline; color: var(--muted); font-size: 12px; font-weight: 650; }
.help-mark { width: 22px; height: 22px; border: 1px solid var(--border); border-radius: 50%; color: var(--muted); background: transparent; font-size: 12px; }
.help-chevron { margin-left: 0; font-size: 14px; }
.help-body { grid-template-columns: minmax(190px, .8fr) minmax(260px, 1.2fr); margin-top: 12px; padding: 17px 18px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.help-maintenance { display: none; }

@media (max-width: 980px) {
  .app-content .wrap, .page-help { width: min(100% - 48px, 1160px); }
}

@media (max-width: 620px) {
  .app-content .wrap, .page-help { width: min(100% - 28px, 1160px); }
  .overview-hero { align-items: start; flex-direction: column; }
  .hero-meta { width: 100%; }
  .page-help summary { justify-content: flex-start; }
}

/* Znacka namailu.cz (SVG) - nahrazuje textovy @ / emoji. Vektor kvuli ostrosti ve vsech
   velikostech (favicona 16px az landing 88px); barvy jsou primo v SVG, ne pres CSS promenne,
   protoze <img> si vlastni stylopis netahne. */
.brand-logo { width: 26px; height: 26px; margin-right: 8px; vertical-align: -6px; }
.landing-logo { display: block; width: 88px; height: 88px; margin: 0 auto 18px; }

/* Agent API manual: long-form documentation without borrowing the density of data screens. */
.heading-actions { display: flex; gap: 10px; align-items: center; }
.api-manual { max-width: 980px; }
.api-manual-heading { align-items: end; }
.manual-index { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 28px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.manual-index a { padding: 6px 9px; border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.manual-index a:hover { color: var(--text); background: var(--surface-muted); }
.manual-callout, .manual-warning { margin: 0 0 30px; padding: 15px 17px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 1.6; }
.manual-warning { border-left-color: #c06a3f; }
.manual-callout strong, .manual-warning strong { color: var(--text); }
.manual-section { padding: 31px 0; border-bottom: 1px solid var(--border); scroll-margin-top: 24px; }
.manual-section:last-child { border-bottom: 0; }
.manual-section-title { display: flex; gap: 15px; align-items: flex-start; margin-bottom: 22px; }
.manual-section-title > span { display: grid; flex: 0 0 31px; width: 31px; height: 31px; place-items: center; border: 1px solid var(--border); border-radius: 7px; color: var(--accent); background: var(--surface-muted); font-size: 11px; font-weight: 800; }
.manual-section h2 { margin: 0 0 4px; font-size: 21px; }
.manual-section h3 { margin: 0 0 8px; font-size: 14px; }
.manual-section-title p, .manual-section p { color: var(--muted); line-height: 1.65; }
.manual-section-title p { margin: 0; }
.manual-section p { margin: 0 0 12px; font-size: 14px; }
.manual-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(360px, 1.05fr); gap: 28px; align-items: start; margin: 0 0 25px; }
.manual-grid:last-child { margin-bottom: 0; }
.manual-grid pre { overflow: auto; margin: 0; padding: 16px; border: 1px solid var(--border); border-radius: 8px; background: #20211f; color: #e8e9e3; font-size: 12px; line-height: 1.55; }
.manual-grid pre code { color: inherit; font-size: inherit; }
.manual-errors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--border); }
.manual-errors div { display: grid; gap: 5px; padding: 14px; background: var(--surface); }
.manual-errors code { color: var(--accent); font-size: 12px; }
.manual-errors span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.manual-checklist { display: grid; gap: 8px; margin: 24px 0 0; padding: 0; list-style: none; }
.manual-checklist li { padding-left: 22px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.manual-checklist li::before { margin-left: -22px; margin-right: 9px; color: var(--ok); content: "✓"; font-weight: 800; }
@media (max-width: 760px) {
  .api-manual-heading { align-items: start; }
  .manual-grid { grid-template-columns: 1fr; gap: 14px; }
  .manual-errors { grid-template-columns: 1fr; }
}

/* API manual v2: a focused product document, not a repurposed data table. */
.api-manual { max-width: 1040px; }
.manual-hero { display: flex; gap: 30px; align-items: end; justify-content: space-between; margin: 0 0 30px; padding: 4px 0 31px; border-bottom: 1px solid var(--border); }
.manual-hero-copy { max-width: 660px; }
.manual-hero h1 { max-width: 620px; margin: 0 0 11px; font-size: clamp(34px, 4.3vw, 51px); line-height: 1.04; letter-spacing: -.045em; }
.manual-hero p { max-width: 590px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.manual-hero-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.manual-endpoint { display: grid; flex: 0 0 250px; gap: 7px; padding: 15px 16px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.manual-endpoint > span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.manual-endpoint code { overflow-wrap: anywhere; color: var(--accent); font-size: 14px; font-weight: 700; }
.manual-endpoint small { color: var(--muted); font-size: 12px; }
.manual-index { position: sticky; top: 0; z-index: 2; gap: 2px; margin-bottom: 25px; padding: 9px 0 12px; background: var(--canvas); }
.manual-index a { border: 1px solid transparent; border-radius: 6px; font-weight: 650; }
.manual-index a:hover { border-color: var(--border); background: var(--surface); }
.manual-capabilities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 36px; }
.manual-capabilities article { display: flex; gap: 11px; align-items: flex-start; min-height: 96px; padding: 15px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.manual-capabilities h2 { margin: 0 0 4px; font-size: 13px; }
.manual-capabilities p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.manual-status { display: grid; flex: 0 0 24px; width: 24px; height: 24px; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 800; }
.manual-status.ready { color: var(--ok); background: var(--ok-soft); }
.manual-status.limited { color: #a55d24; background: #fff1df; }
.manual-section { padding: 37px 0; }
.manual-section-title { max-width: 720px; margin-bottom: 25px; }
.manual-section h2 { font-size: 24px; letter-spacing: -.02em; }
.manual-section h3 { margin-bottom: 9px; color: var(--text); font-size: 15px; }
.manual-section p { font-size: 14px; }
.manual-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 20px; padding: 0; list-style: none; counter-reset: manual-step; }
.manual-steps li { min-height: 88px; padding: 15px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 13px; line-height: 1.5; counter-increment: manual-step; }
.manual-steps li::before { display: block; margin-bottom: 7px; color: var(--accent); content: "0" counter(manual-step); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.manual-steps strong { color: var(--text); }
.manual-code-card { overflow: hidden; margin: 0 0 18px; border: 1px solid #30312e; border-radius: 9px; background: #20211f; }
.manual-code-card.compact { margin: 0; }
.manual-code-head { display: flex; align-items: center; justify-content: space-between; min-height: 39px; padding: 0 11px 0 14px; border-bottom: 1px solid #353632; color: #a9aaa4; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.manual-copy { min-height: 26px; padding: 3px 8px; border: 1px solid #53544e; border-radius: 5px; color: #dedfd8; background: transparent; font-size: 11px; font-weight: 700; }
.manual-copy:hover { border-color: #8c8d85; background: #30312e; }
.manual-code-card pre, .manual-grid .manual-code-card pre { overflow: auto; margin: 0; padding: 16px; border: 0; border-radius: 0; background: transparent; color: #e8e9e3; font-size: 12px; line-height: 1.58; }
.manual-code-card pre code { color: inherit; font-size: inherit; }
.manual-note, .manual-warning { margin: 0; padding: 14px 16px; border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 7px; background: var(--surface-muted); color: var(--muted); font-size: 13px; line-height: 1.6; }
.manual-note strong, .manual-warning strong { color: var(--text); }
.manual-two-col { display: grid; grid-template-columns: minmax(0, .86fr) minmax(430px, 1.14fr); gap: 34px; align-items: start; margin: 0 0 29px; }
.manual-two-col > div > :last-child { margin-bottom: 0; }
.manual-warning { margin-top: 2px; border-left-color: #b76a35; background: #fff8f1; }
.manual-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; overflow: hidden; margin-top: 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--border); }
.manual-flow div { display: grid; gap: 8px; min-height: 92px; padding: 14px; background: var(--surface); }
.manual-flow b { color: var(--accent); font-size: 12px; }
.manual-flow span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.manual-fineprint { margin: 13px 0 0 !important; color: var(--muted); font-size: 12px !important; }
.manual-client-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.manual-client { padding: 17px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.manual-client > header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 11px; }
.manual-client > header span { font-size: 16px; font-weight: 750; }
.manual-client > header small { color: var(--muted); font-size: 11px; }
.manual-client p { min-height: 62px; margin-bottom: 15px; font-size: 13px; }
.manual-client .manual-code-card { margin-bottom: 0; }
.manual-reality { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.manual-reality > div { padding: 17px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.manual-reality .reality-good { border-top: 3px solid var(--accent); }
.manual-reality h3 { margin-bottom: 9px; }
.manual-reality p { margin: 0 0 10px; font-size: 13px; }
.manual-reality p:last-child { margin-bottom: 0; }
html[data-theme="dark"] .manual-warning { border-color: #714a2d; border-left-color: #d18a50; background: #30251d; }
@media (max-width: 900px) {
  .manual-hero { align-items: start; flex-direction: column; }
  .manual-endpoint { width: 100%; max-width: 420px; }
  .manual-two-col { grid-template-columns: 1fr; gap: 16px; }
  .manual-flow { grid-template-columns: repeat(2, 1fr); }
  .manual-reality { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .manual-hero { gap: 20px; padding-bottom: 24px; }
  .manual-hero h1 { font-size: 34px; }
  .manual-index { position: static; overflow-x: auto; flex-wrap: nowrap; }
  .manual-index a { white-space: nowrap; }
  .manual-capabilities, .manual-steps, .manual-client-grid { grid-template-columns: 1fr; }
  .manual-capabilities article { min-height: 0; }
  .manual-flow { grid-template-columns: 1fr; }
}

/* Documentation page: editorial hierarchy first, components only where they help scanning. */
.docs-page { max-width: 1160px; }
.docs-intro { max-width: 760px; padding: 7px 0 42px; border-bottom: 1px solid var(--border); }
.docs-kicker, .docs-label { margin: 0 0 11px; color: var(--accent); font-size: 11px; font-weight: 780; letter-spacing: .09em; text-transform: uppercase; }
.docs-intro h1 { margin: 0 0 13px; font-size: clamp(36px, 4.2vw, 52px); letter-spacing: -.05em; line-height: 1.04; }
.docs-lede { max-width: 650px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.62; }
.docs-connection { display: flex; gap: 28px; align-items: center; margin-top: 25px; padding: 13px 0 0; border-top: 1px solid var(--border); }
.docs-connection div { display: grid; gap: 3px; }
.docs-connection span { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.docs-connection code { color: var(--text); font-size: 14px; font-weight: 720; }
.docs-connection p { margin: 0; color: var(--muted); font-size: 12px; }
.docs-shell { display: grid; grid-template-columns: 178px minmax(0, 740px); gap: 62px; align-items: start; padding-top: 31px; }
.docs-toc { position: sticky; top: 30px; display: grid; gap: 3px; padding-top: 5px; }
.docs-toc > span { margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 780; letter-spacing: .07em; text-transform: uppercase; }
.docs-toc a { padding: 5px 0; color: var(--muted); font-size: 13px; line-height: 1.35; text-decoration: none; }
.docs-toc a:hover { color: var(--text); }
.docs-toc-action { display: flex; justify-content: space-between; margin-top: 17px; padding-top: 14px !important; border-top: 1px solid var(--border); color: var(--text) !important; font-weight: 700; }
.docs-toc-action b { color: var(--accent); }
.docs-article { min-width: 0; }
.docs-section { padding: 0 0 48px; margin: 0 0 46px; border-bottom: 1px solid var(--border); scroll-margin-top: 24px; }
.docs-section:last-child { margin-bottom: 0; border-bottom: 0; }
.docs-section h2 { max-width: 660px; margin: 0 0 14px; font-size: 27px; letter-spacing: -.025em; line-height: 1.2; }
.docs-section h3 { margin: 0; font-size: 16px; }
.docs-subheading { margin: 31px 0 8px !important; padding-top: 27px; border-top: 1px solid var(--border); font-size: 20px !important; letter-spacing: -.015em; }
.docs-section > p { max-width: 690px; margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 1.72; }
.docs-section a { color: var(--accent-strong); font-weight: 680; }
.docs-first-request { display: grid; grid-template-columns: minmax(0, .9fr) minmax(340px, 1.1fr); gap: 26px; align-items: center; margin: 25px 0 21px; padding: 18px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.docs-first-request > div > span { display: block; margin-bottom: 7px; color: var(--accent); font-size: 10px; font-weight: 780; letter-spacing: .08em; text-transform: uppercase; }
.docs-first-request h3 { margin-bottom: 6px; }
.docs-first-request p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.docs-first-request .docs-code { margin: 0; }
.docs-note, .docs-warning { max-width: 700px; margin: 21px 0; padding: 13px 15px; border-left: 2px solid var(--accent); color: var(--muted); background: var(--surface-muted); font-size: 13px; line-height: 1.6; }
.docs-note strong, .docs-warning strong { color: var(--text); }
.account-password-form { display: grid; grid-template-columns: minmax(170px, 240px) minmax(260px, 440px); align-items: center; gap: 12px 20px; max-width: 720px; margin-top: 20px; }
.account-password-form .form-submit { grid-column: 2; justify-self: start; }
.status-message { max-width: 700px; margin: 16px 0; padding: 11px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.status-message.is-success { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 38%, var(--border)); background: color-mix(in srgb, var(--ok) 8%, var(--surface)); }
.status-message.is-error { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 38%, var(--border)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
@media (max-width: 700px) {
  .account-password-form { grid-template-columns: 1fr; }
  .account-password-form .form-submit { grid-column: 1; }
}
.docs-warning { border-left-color: #b76a35; background: #fff8f1; }
.docs-reference { margin: 25px 0 21px; border-top: 1px solid var(--border); }
.docs-reference-row { display: grid; grid-template-columns: 48px minmax(250px, 1.2fr) minmax(0, 1.65fr) 135px; gap: 13px; align-items: center; min-height: 59px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.docs-method { display: inline-grid; min-height: 21px; place-items: center; border: 1px solid var(--border); border-radius: 4px; font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.docs-method.get { color: var(--ok); background: var(--ok-soft); }
.docs-method.post { color: var(--accent-strong); background: var(--surface-muted); }
.docs-method.put { color: #8f609b; background: #f4ecf6; }
.docs-method.delete { color: #b24b47; background: #fbeeed; }
.docs-reference-row > code { overflow-wrap: anywhere; color: var(--text); font-size: 12px; font-weight: 680; }
.docs-reference-row > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.docs-reference-row > small { color: var(--muted); font-size: 10px; font-weight: 700; line-height: 1.35; text-align: right; }
.docs-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 24px 0; padding: 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); list-style: none; }
.docs-steps li { display: flex; gap: 10px; min-height: 90px; padding: 16px 14px 15px 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.docs-steps li + li { padding-left: 14px; border-left: 1px solid var(--border); }
.docs-steps b { color: var(--accent); font-size: 12px; }
.docs-steps strong, .docs-steps span { display: block; }
.docs-steps strong { margin-bottom: 4px; color: var(--text); font-size: 13px; }
.docs-code { overflow: hidden; margin: 22px 0; border: 1px solid #383a36; border-radius: 7px; background: #20211f; }
.docs-code > div { display: flex; align-items: center; justify-content: space-between; height: 38px; padding: 0 10px 0 14px; border-bottom: 1px solid #343632; color: #a6a8a1; font-size: 11px; font-weight: 700; letter-spacing: .04em; }
.docs-code button { min-height: 25px; padding: 2px 7px; border: 1px solid #53554f; border-radius: 4px; color: #e7e8e2; background: transparent; font-size: 11px; font-weight: 700; }
.docs-code button:hover { border-color: #858780; background: #2b2d29; }
.docs-code pre { overflow: auto; margin: 0; padding: 16px; color: #e9ebe4; font-size: 12px; line-height: 1.58; }
.docs-code code { color: inherit; font-size: inherit; }
.docs-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin: 23px 0 0; padding: 0; list-style: none; }
.docs-flow li { border-top: 1px solid var(--border); padding-top: 11px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.docs-flow b, .docs-flow span { display: block; }
.docs-flow b { margin-bottom: 8px; color: var(--accent); font-size: 11px; letter-spacing: .08em; }
.docs-caption { margin: 15px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.docs-clients { display: grid; grid-template-columns: 1fr; gap: 30px; margin-top: 24px; }
.docs-clients > div + div { padding-top: 30px; border-top: 1px solid var(--border); }
.docs-clients header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 9px; }
.docs-clients header span { color: var(--muted); font-size: 11px; }
.docs-clients p { min-height: 59px; margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.docs-clients .docs-code { margin: 0; }
.docs-client-heading { margin: 39px 0 7px !important; padding-top: 31px; border-top: 1px solid var(--border); font-size: 20px !important; letter-spacing: -.015em; }
.docs-client-intro { max-width: 630px; margin: 0 !important; color: var(--muted); font-size: 13px !important; line-height: 1.58 !important; }
.docs-status dl { display: grid; gap: 0; margin: 23px 0 0; border-top: 1px solid var(--border); }
.docs-status dl > div { display: grid; grid-template-columns: 175px minmax(0, 1fr); gap: 20px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.docs-status dt { color: var(--text); font-size: 13px; font-weight: 720; }
.docs-status dd { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.58; }
.docs-status dd strong { color: var(--text); }
html[data-theme="dark"] .docs-warning { border-left-color: #d18a50; background: #30251d; }
html[data-theme="dark"] .docs-method.put { color: #d7b3df; background: #312536; }
html[data-theme="dark"] .docs-method.delete { color: #f1aaa4; background: #3b2525; }
@media (max-width: 900px) {
  .docs-shell { grid-template-columns: 1fr; gap: 27px; }
  .docs-toc { position: static; display: flex; gap: 14px; flex-wrap: wrap; padding: 0 0 15px; border-bottom: 1px solid var(--border); }
  .docs-toc > span { flex-basis: 100%; margin: 0; }
  .docs-toc-action { margin: 0; padding: 5px 0 !important; border: 0; }
  .docs-first-request { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 650px) {
  .docs-intro { padding-bottom: 29px; }
  .docs-intro h1 { font-size: 36px; }
  .docs-lede { font-size: 15px; }
  .docs-connection { align-items: start; flex-direction: column; gap: 8px; }
  .docs-steps, .docs-flow { grid-template-columns: 1fr; }
  .docs-steps li { min-height: 0; padding: 13px 0; }
  .docs-steps li + li { padding-left: 0; border-top: 1px solid var(--border); border-left: 0; }
  .docs-clients { gap: 27px; }
  .docs-clients > div + div { padding-top: 27px; }
  .docs-status dl > div { grid-template-columns: 1fr; gap: 6px; }
  .docs-reference-row { grid-template-columns: 44px minmax(0, 1fr); gap: 8px 11px; padding: 13px 0; }
  .docs-reference-row > p { grid-column: 2; }
  .docs-reference-row > small { grid-column: 2; text-align: left; }
}

/* MCP manual: product status and authorization flow on top of the shared docs layout. */
.mcp-manual-page .docs-intro { max-width: 820px; }
.mcp-doc-state { display: inline-flex; flex: 0 0 auto; gap: 6px; align-items: center;
                 margin-left: auto; padding: 5px 9px; border: 1px solid var(--border);
                 border-radius: 999px; font-size: 10px; font-weight: 780;
                 letter-spacing: .04em; text-transform: uppercase; }
.mcp-doc-state::before { width: 6px; height: 6px; border-radius: 50%; content: ""; }
.mcp-doc-state.is-ready { color: var(--ok); background: var(--ok-soft); }
.mcp-doc-state.is-ready::before { background: var(--ok); }
.mcp-doc-state.is-pilot { color: #9a5d20; background: #fff4e5; }
.mcp-doc-state.is-pilot::before { background: #c27a2c; }

.mcp-release-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
                    gap: 10px; margin: 24px 0 16px; }
.mcp-release-grid article { display: flex; gap: 11px; min-height: 124px; padding: 15px;
                            border: 1px solid var(--border); border-radius: 8px;
                            background: var(--surface); }
.mcp-release-grid h3 { margin: 1px 0 5px; font-size: 13px; }
.mcp-release-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.48; }
.mcp-release-mark { display: grid; flex: 0 0 23px; width: 23px; height: 23px;
                    place-items: center; border-radius: 50%; font-size: 11px; font-weight: 850; }
.mcp-release-mark.ready { color: var(--ok); background: var(--ok-soft); }
.mcp-release-mark.pending { color: #9a5d20; background: #fff1df; }

.mcp-client-guides > div { min-width: 0; }
.mcp-client-guides header h3 { margin: 0; }
.mcp-client-guides p { min-height: 0; }
.mcp-mini-steps { display: grid; gap: 8px; margin: 16px 0 13px; padding: 0;
                  list-style: none; counter-reset: mcp-client-step; }
.mcp-mini-steps li { position: relative; padding-left: 25px; color: var(--muted);
                     font-size: 12px; line-height: 1.5; counter-increment: mcp-client-step; }
.mcp-mini-steps li::before { position: absolute; top: 1px; left: 0; display: grid;
                            width: 17px; height: 17px; place-items: center;
                            border: 1px solid var(--border); border-radius: 50%;
                            color: var(--accent); content: counter(mcp-client-step);
                            font-size: 9px; font-weight: 800; }

.mcp-tool-list .docs-reference-row { grid-template-columns: 58px minmax(190px, 1.15fr)
                                                          minmax(0, 1.75fr) 88px; }
.mcp-tool-state { display: inline-grid; min-height: 21px; place-items: center;
                  border: 1px solid var(--border); border-radius: 4px;
                  font-size: 9px; font-weight: 800; letter-spacing: .03em; }
.mcp-tool-state.ready { color: var(--ok); background: var(--ok-soft); }
.mcp-tool-state.planned { color: var(--muted); background: var(--surface-muted); }

.mcp-protocol-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
                      margin: 23px 0; border-top: 1px solid var(--border); }
.mcp-protocol-facts > div { display: grid; grid-template-columns: 145px minmax(0, 1fr);
                           gap: 12px; min-width: 0; padding: 13px 0;
                           border-bottom: 1px solid var(--border); }
.mcp-protocol-facts > div:nth-child(odd) { padding-right: 18px; }
.mcp-protocol-facts > div:nth-child(even) { padding-left: 18px; border-left: 1px solid var(--border); }
.mcp-protocol-facts span { color: var(--muted); font-size: 11px; font-weight: 700; }
.mcp-protocol-facts code { overflow-wrap: anywhere; color: var(--text); font-size: 11px; font-weight: 680; }

.mcp-safety-list { display: grid; gap: 0; margin: 23px 0 0; padding: 0;
                   border-top: 1px solid var(--border); list-style: none; }
.mcp-safety-list li { position: relative; padding: 14px 0 14px 23px;
                      border-bottom: 1px solid var(--border); color: var(--muted);
                      font-size: 13px; line-height: 1.55; }
.mcp-safety-list li::before { position: absolute; top: 18px; left: 2px; width: 7px;
                             height: 7px; border: 2px solid var(--accent);
                             border-radius: 50%; content: ""; }
.mcp-safety-list strong { color: var(--text); }
.mcp-external-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

html[data-theme="dark"] .mcp-doc-state.is-pilot { color: #e2ac6f; background: #35281c; }
html[data-theme="dark"] .mcp-release-mark.pending { color: #e2ac6f; background: #35281c; }

@media (max-width: 800px) {
  .mcp-release-grid { grid-template-columns: 1fr; }
  .mcp-release-grid article { min-height: 0; }
  .mcp-tool-list .docs-reference-row { grid-template-columns: 58px minmax(0, 1fr); }
  .mcp-tool-list .docs-reference-row > p,
  .mcp-tool-list .docs-reference-row > small { grid-column: 2; text-align: left; }
}
@media (max-width: 620px) {
  .mcp-doc-state { margin-left: 0; }
  .mcp-protocol-facts { grid-template-columns: 1fr; }
  .mcp-protocol-facts > div { grid-template-columns: 120px minmax(0, 1fr); }
  .mcp-protocol-facts > div:nth-child(odd),
  .mcp-protocol-facts > div:nth-child(even) { padding-inline: 0; border-left: 0; }
}

/* Čerpání plánu na dashboardu (MONETIZATION.md, bod 6) */
.plan-panel { margin-bottom: 22px; }
.plan-panel .quota-grid { display: grid; gap: 24px 30px;
                          grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
                          padding: 22px 19px 6px; }
.plan-panel .hint { margin: 0; padding: 0 19px 20px; }
/* Datum obnovení není počet — `.record-count` (červený badge) je na to příliš křiklavý. */
.plan-panel .data-panel-label .record-count { color: var(--muted); background: var(--surface-muted);
                                              font-weight: 650; letter-spacing: .01em; }
.quota { display: grid; gap: 8px; align-content: start; }
.quota-k { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
/* Velká čísla proporcionálně: tabular-nums dává každé číslici šířku nuly, takže "121"
   při této velikosti vypadá rozvolněně. Tabulární patří do sloupců, ne sem. */
.quota-v { font-size: 1.9rem; line-height: 1; font-weight: 600; color: var(--text); }
.quota-of { font-size: .9rem; font-weight: 400; color: var(--muted); margin-left: 6px; }

/* Meter: výplň nese závažnost, nevyplněná dráha je SVĚTLEJŠÍ ODSTÍN TÉŽE barvy —
   stav je tak čitelný z celého pruhu, ne jen z vyplněné části. */
progress.quota-bar { appearance: none; -webkit-appearance: none; display: block;
                     width: 100%; height: 6px; border: 0; border-radius: 999px;
                     background: var(--accent-soft); color: var(--accent); }
progress.quota-bar::-webkit-progress-bar { background: var(--accent-soft); border-radius: 999px; }
progress.quota-bar::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress.quota-bar::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.quota-bar--none { height: 6px; border-radius: 999px;
                   background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); }

.quota.is-warn progress.quota-bar { background: var(--warn-soft); }
.quota.is-warn progress.quota-bar::-webkit-progress-bar { background: var(--warn-soft); }
.quota.is-warn progress.quota-bar::-webkit-progress-value { background: var(--warn); }
.quota.is-warn progress.quota-bar::-moz-progress-bar { background: var(--warn); }
.quota.is-full progress.quota-bar { background: var(--err-soft); }
.quota.is-full progress.quota-bar::-webkit-progress-bar { background: var(--err-soft); }
.quota.is-full progress.quota-bar::-webkit-progress-value { background: var(--err); }
.quota.is-full progress.quota-bar::-moz-progress-bar { background: var(--err); }

.quota-note { font-size: .78rem; color: var(--muted); display: flex; gap: 6px; align-items: baseline;
              flex-wrap: wrap; min-height: 1.1em; }
/* Stav i SLOVEM: žlutá a červená jsou pro barvoslepé prakticky nerozlišitelné
   (ověřeno validátorem palety, ΔE 2.7 deutan), takže barva sama nestačí. */
.quota-flag { font-weight: 600; font-size: .72rem; letter-spacing: .03em; text-transform: uppercase; }
.quota.is-warn .quota-flag { color: var(--warn); }
.quota.is-full .quota-flag { color: var(--err); }

/* Allowlist agenta (portál). Pozor: .detail-card má padding 0 — odsazení si řeší obsah. */
.allowlist-card { margin-bottom: 22px; }
.allowlist-body { display: grid; gap: 14px; padding: 20px 19px 22px; }
.allowlist-body > .muted.small { margin: 0; }
.allowlist-state { display: flex; gap: 14px; align-items: center; justify-content: space-between;
                   flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border);
                   border-radius: 12px; background: var(--surface-muted); }
.allowlist-state.is-locked { border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
                             background: var(--accent-soft); }
.allowlist-state strong { display: block; }
.allowlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.allowlist li { display: flex; align-items: center; justify-content: space-between; gap: 14px;
                padding: 9px 12px; border: 1px solid var(--border); border-radius: 12px;
                background: var(--surface-raised); }
.al-entry { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.al-entry code { overflow-wrap: anywhere; }
.al-tag { padding: 2px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn);
          font-size: 10px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; }
.allowlist-add { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.allowlist-add input[type="text"] { flex: 1 1 260px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Stránka s právě vydaným tajemstvím (API klíč / aktivační kód).
   Užší sloupec: čtení dlouhého náhodného řetězce přes celou šířku monitoru je nepohodlné. */
.wrap-narrow { width: min(760px, calc(100% - 40px)); }
.wrap-narrow .detail-card { margin-bottom: 18px; }
.secret-body { display: grid; gap: 10px; padding: 18px 19px 20px; }
.secret-body .copyrow { padding: 12px 12px 12px 14px; background: var(--surface-muted);
                        border-color: var(--border-strong); }
/* Klíč je hlavní obsah stránky — ať je čitelný a nezalomí se doprostřed znaku. */
.secret-body .copyrow code { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.5;
                             overflow-wrap: anywhere; color: var(--text); }
.secret-body .copybtn { flex: 0 0 auto; }
.secret-body p { margin: 0; }
.secret-card .record-count { color: var(--muted); background: var(--surface-muted); font-weight: 650;
                             letter-spacing: .01em; text-transform: none; }
.allowlist li.is-paused { background: var(--surface-muted); opacity: .72; }
.allowlist li.is-paused code { text-decoration: line-through; }
.al-actions { display: flex; gap: 6px; flex-shrink: 0; }
.al-tag--paused { background: var(--surface-muted); color: var(--muted); }
.allowlist-import { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px;
                    background: var(--surface-raised); }
.allowlist-import summary { cursor: pointer; font-weight: 650; font-size: .88rem; }
.allowlist-import form { display: grid; gap: 8px; margin-top: 12px; }
.allowlist-import textarea { width: 100%; min-height: 110px; padding: 10px 12px;
                             border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
                             background: var(--surface); color: var(--text); font-family: inherit; }
.allowlist-import .btn { justify-self: start; }
.hero-meta-note { margin-top: 4px; color: var(--muted); font-size: 12px; }
.limit-banner { display: flex; gap: 14px; align-items: center; justify-content: space-between;
                flex-wrap: wrap; margin-bottom: 22px; line-height: 1.55; }
.limit-actions { flex-shrink: 0; }
.al-tag--out { background: var(--ok-soft); color: var(--ok); }
.journal-subject { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.journal-failed { color: var(--err); font-weight: 650; cursor: help; }
.nowrap { white-space: nowrap; }

/* Doménový koš (catch-all) */
.catchall-card { margin-bottom: 22px; }
.catchall-body { display: grid; gap: 12px; padding: 18px 19px 20px; }
.catchall-body > p { margin: 0; }
.catchall-body .alert { margin: 0; }
.catchall-form { display: grid; gap: 8px; }
.catchall-form select { max-width: 420px; }
.catchall-form .btn { justify-self: start; }

/* Aliasy a přesměrování */
.fwd-form { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.fwd-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fwd-row input[type="email"] { flex: 1 1 260px; }
.fwd-copy { display: flex; gap: 7px; align-items: center; }
.fwd-copy input { width: auto; min-height: 0; }

/* ---- veřejné právní a obchodní stránky (podmínky, ceník) ---- */
/* `.center` centruje obsah svisle i vodorovně a `.center .card` ho stahuje na 440 px —
   pro dlouhý text je obojí špatně. Proto vlastní obal `.page`, který se v `.center`
   zarovná nahoru a dostane šířku podle typu obsahu. Selektory jsou dost specifické,
   aby přebily `.center .card`. */
.center:has(> .page) { place-items: start center; }
.center .page { width: 100%; max-width: 780px; margin: 8px 0 40px; text-align: left; }
.center .page.page-wide { max-width: 960px; }

.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(26px, 4.2vw, 34px); letter-spacing: -.03em; margin-bottom: 6px; }
.page-head .lead { max-width: 62ch; color: var(--muted); font-size: 15px; line-height: 1.65; }
.page-meta { color: var(--faint); font-size: 12.5px; }

.legal-body { display: grid; gap: 4px; }
.legal-body h2 { margin: 30px 0 8px; padding-top: 14px; border-top: 1px solid var(--border);
                 font-size: 17px; letter-spacing: -.01em; }
.legal-body h2:first-of-type { margin-top: 6px; border-top: 0; padding-top: 0; }
.legal-body p { max-width: 68ch; margin: 0 0 10px; line-height: 1.7; }
.legal-body ul { max-width: 68ch; margin: 0 0 12px; padding-left: 20px; }
.legal-body li { margin: 6px 0; line-height: 1.65; }
.legal-body code { padding: 1px 5px; border-radius: 5px; background: var(--surface-muted); font-size: .92em; }

/* Ceník ------------------------------------------------------------------ */
.pricing-scroll { overflow-x: auto; margin: 18px 0 8px; border: 1px solid var(--border);
                  border-radius: var(--radius); background: var(--surface); }
table.pricing { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14px; }
table.pricing th, table.pricing td { padding: 12px 14px; border-bottom: 1px solid var(--border);
                                     vertical-align: top; }
table.pricing thead th { position: sticky; top: 0; background: var(--surface-muted);
                         color: var(--muted); font-size: 12px; font-weight: 700;
                         text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
table.pricing tbody tr:last-child td { border-bottom: 0; }
table.pricing tbody tr:hover { background: color-mix(in srgb, var(--accent) 5%, var(--surface)); }
table.pricing .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plan-name { font-weight: 680; }
.plan-note { margin-top: 2px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.plan-price { font-weight: 700; font-size: 15px; white-space: nowrap; }
.plan-price.free { color: var(--ok); }
.plan-soft { color: var(--muted); }

/* Doporučený plán se zvýrazní levým proužkem — bez druhé barvy pozadí, ať tabulka
   nezačne vypadat jako pruhovaná omylem. */
table.pricing tr.plan-featured td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.plan-badge { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
              background: var(--accent-soft); color: var(--accent-strong);
              font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: 2px; }

.page-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 6px; }

/* Patička veřejných stránek --------------------------------------------- */
.sitefoot { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: center;
            padding: 18px 20px 26px; color: var(--faint); font-size: 12.5px; }
/* Uvnitř přihlášeného portálu je patička v pravém sloupci (app.html) a tlačí se
   dolů, aby končila tam, kde sticky levý panel. Vně (veřejné stránky) zůstává pod <main>. */
.app-content > .sitefoot { margin-top: auto; }
.sitefoot a { color: var(--muted); }
.sitefoot a:hover { color: var(--text); }

@media (max-width: 640px) {
  .center .page { margin-top: 0; }
  .legal-body h2 { margin-top: 24px; }
}

/* Strop odeslané pošty agenta */
.limits-form .limits-row { display: flex; flex-wrap: wrap; gap: 14px; }
.limits-form label { flex: 1 1 160px; }
.limits-form input[type="number"] { max-width: 200px; }

/* Sdílení schránek ---------------------------------------------------------
   Adresy jsou hlavní informace, proto stránka nepoužívá tabulku: každá vazba
   má vlastní plnohodnotný řádek a akce zůstávají čitelné i na menším displeji. */
.sharing-page { --share-radius: 14px; }
.sharing-heading { align-items: center; margin-bottom: 25px; }
.sharing-heading .page-sub { max-width: 680px; }
.sharing-assurance { display: inline-flex; gap: 9px; align-items: center; max-width: 310px;
                     padding: 9px 12px; border: 1px solid color-mix(in srgb, var(--ok) 25%, var(--border));
                     border-radius: 9px; color: var(--muted); background: color-mix(in srgb, var(--ok-soft) 42%, var(--surface));
                     font-size: 12px; font-weight: 650; line-height: 1.35; }
.sharing-assurance > span { display: grid; flex: 0 0 22px; width: 22px; height: 22px;
                            place-items: center; border-radius: 50%; color: var(--ok);
                            background: var(--ok-soft); font-size: 12px; font-weight: 850; }
.sharing-alert { margin-bottom: 17px; }

.share-composer { position: relative; overflow: hidden; padding: 25px;
                  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border));
                  border-radius: var(--share-radius); background: linear-gradient(135deg,
                  color-mix(in srgb, var(--accent-soft) 28%, var(--surface)) 0%, var(--surface) 52%);
                  box-shadow: 0 12px 35px color-mix(in srgb, var(--accent) 7%, transparent); }
.share-composer::after { position: absolute; z-index: 0; right: -68px; top: -92px;
                         width: 220px; height: 220px; border: 36px solid
                         color-mix(in srgb, var(--accent) 5%, transparent); border-radius: 50%; content: ""; }
.share-composer > * { position: relative; z-index: 1; }
.share-composer-copy { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 21px; }
.share-composer-icon { display: grid; flex: 0 0 40px; width: 40px; height: 40px;
                       place-items: center; border-radius: 11px; color: var(--accent-strong);
                       background: var(--accent-soft); font-size: 20px; font-weight: 750; }
.share-step, .share-section-kicker { display: block; margin-bottom: 3px; color: var(--muted);
                                    font-size: 10px; font-weight: 800; letter-spacing: .1em;
                                    line-height: 1.3; text-transform: uppercase; }
.share-composer-copy h2 { margin: 0 0 4px; font-size: 19px; letter-spacing: -.02em; }
.share-composer-copy p { margin: 0; color: var(--muted); font-size: 13px; }
.share-composer-copy p strong { color: var(--text); font-weight: 720; }
.share-compose-form { display: grid; grid-template-columns: minmax(260px, 1.45fr) minmax(210px, .75fr) auto;
                      gap: 12px; align-items: end; }
.share-field { min-width: 0; }
.share-field label { margin-bottom: 6px; color: var(--text); font-size: 12px; font-weight: 720; }
.share-field input, .share-field select { width: 100%; min-height: 42px; background: var(--surface); }
.share-submit { min-height: 42px; padding-inline: 19px; white-space: nowrap; }
.share-composer-foot { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 17px;
                       padding-top: 15px; border-top: 1px solid var(--border); color: var(--muted);
                       font-size: 11px; }
.share-composer-foot span { display: inline-flex; gap: 4px; align-items: center; }
.share-composer-foot span::before { width: 4px; height: 4px; border-radius: 50%;
                                   background: var(--accent); content: ""; }
.share-composer-foot strong { color: var(--text); font-weight: 760; }
.share-unavailable { padding: 15px 17px; border: 1px dashed var(--border-strong);
                     border-radius: 10px; color: var(--muted); background: var(--surface-muted); }

.share-section { margin-top: 34px; }
.share-section + .share-section { margin-top: 30px; }
.share-section-head { display: flex; gap: 15px; align-items: center; justify-content: space-between;
                      margin-bottom: 11px; padding: 0 2px; }
.share-section-head h2 { font-size: 18px; letter-spacing: -.02em; }
.share-count { display: grid; min-width: 27px; height: 25px; padding: 0 8px; place-items: center;
               border: 1px solid var(--border); border-radius: 7px; color: var(--muted);
               background: var(--surface); font-size: 11px; font-weight: 780; }
.share-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--share-radius);
              background: var(--surface); box-shadow: var(--shadow); }
.share-item { display: grid; grid-template-columns: minmax(285px, 1.5fr) minmax(170px, .8fr) 145px auto;
              gap: 18px; align-items: center; min-height: 88px; padding: 16px 18px;
              border-bottom: 1px solid var(--border); }
.share-item:last-child { border-bottom: 0; }
.share-item:hover { background: color-mix(in srgb, var(--accent) 2.8%, var(--surface)); }
.share-item.is-closed { background: color-mix(in srgb, var(--surface-muted) 45%, var(--surface)); }
.share-item.is-closed .share-identity, .share-item.is-closed .share-item-detail { opacity: .67; }
.share-identity { display: flex; gap: 12px; align-items: center; min-width: 0; }
.share-avatar { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center;
                border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--border));
                border-radius: 11px; color: var(--accent-strong); background: var(--accent-soft);
                font-size: 15px; font-weight: 800; }
.share-avatar.is-outgoing { color: var(--text); border-color: var(--border); background: var(--surface-muted); }
.share-addresses { min-width: 0; }
.share-addresses strong { display: block; overflow: hidden; color: var(--text); font-size: 14px;
                          font-weight: 720; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.share-caption { display: block; overflow: hidden; margin-bottom: 2px; color: var(--muted);
                 font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.share-item-detail { display: grid; gap: 4px; justify-items: start; }
.share-access { display: inline-flex; gap: 7px; align-items: center; color: var(--text);
                font-size: 12px; font-weight: 680; white-space: nowrap; }
.share-access-icon { display: grid; width: 18px; height: 18px; place-items: center;
                     border-radius: 5px; color: var(--accent); background: var(--accent-soft);
                     font-size: 9px; }
.share-expiry { color: var(--faint); font-size: 10px; white-space: nowrap; }
.share-item-state { justify-self: start; }
.share-status { display: inline-flex; gap: 7px; align-items: center; min-height: 27px;
                padding: 4px 9px; border: 1px solid var(--border); border-radius: 7px;
                color: var(--muted); background: var(--surface-muted); font-size: 10px;
                font-weight: 750; white-space: nowrap; }
.share-status .status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.share-status.is-active { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 28%, var(--border));
                          background: color-mix(in srgb, var(--ok-soft) 72%, var(--surface)); }
.share-status.is-pending { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 28%, var(--border));
                           background: color-mix(in srgb, var(--warn-soft) 70%, var(--surface)); }
.share-status.is-closed { color: var(--muted); }
.share-item-actions { display: flex; gap: 7px; justify-content: flex-end; min-width: 118px; }
.share-item-actions.has-no-action { min-width: 0; }
.share-revoke { color: var(--err) !important; }
.share-revoke:hover { color: var(--err) !important; background: var(--err-soft) !important; }

.share-empty { display: flex; gap: 14px; align-items: center; min-height: 90px; padding: 18px;
               border: 1px dashed var(--border-strong); border-radius: var(--share-radius);
               color: var(--muted); background: color-mix(in srgb, var(--surface-muted) 38%, var(--surface)); }
.share-empty-icon { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center;
                    border-radius: 11px; color: var(--faint); background: var(--surface-muted);
                    font-size: 17px; }
.share-empty strong { display: block; margin-bottom: 2px; color: var(--text); font-size: 13px; }
.share-empty p { margin: 0; font-size: 12px; line-height: 1.45; }

@media (max-width: 1050px) {
  .share-item { grid-template-columns: minmax(250px, 1.4fr) minmax(155px, .75fr) auto; }
  .share-item-state { justify-self: end; }
  .share-item-actions { grid-column: 2 / 4; justify-content: flex-end; margin-top: -8px; }
}

@media (max-width: 760px) {
  .sharing-heading { align-items: flex-start; }
  .sharing-assurance { max-width: none; }
  .share-composer { padding: 20px; }
  .share-compose-form { grid-template-columns: 1fr; }
  .share-submit { width: 100%; }
  .share-composer-foot { gap: 10px 16px; }
  .share-item { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 15px; }
  .share-identity { grid-column: 1 / 3; }
  .share-addresses strong, .share-caption { white-space: normal; overflow-wrap: anywhere; }
  .share-item-detail { grid-column: 1; }
  .share-item-state { grid-column: 2; }
  .share-item-actions { grid-column: 1 / 3; justify-content: flex-start; margin-top: 0;
                        padding-top: 11px; border-top: 1px solid var(--border); }
  .share-item-actions.has-no-action { display: none; }
}

@media (max-width: 480px) {
  .share-composer-copy { gap: 10px; }
  .share-composer-icon { flex-basis: 36px; width: 36px; height: 36px; }
  .share-composer-foot { display: grid; gap: 6px; }
  .share-item-detail, .share-item-state { grid-column: 1 / 3; justify-self: start; }
}

/* Security, API keys and mailbox detail: calmer reading widths and real inner spacing. */
.app-content .wrap.security-page { width: min(980px, calc(100% - 112px)); }
.app-content .wrap.keys-page { width: min(920px, calc(100% - 112px)); }
.app-content .wrap.mailbox-detail-page { width: min(1040px, calc(100% - 112px)); }

.security-page .page-heading { max-width: 760px; }
.security-page .section { margin-top: 20px; }
.security-page .panel-body { padding: 21px 23px 24px; }
.security-page .panel-body > p:first-child { margin-top: 0; }
.security-page .panel-body > :last-child { margin-bottom: 0; }
.security-page .docs-note { max-width: none; margin: 15px 0; border-radius: 7px; }
.security-page .account-password-form { max-width: 680px; }
.security-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; margin-top: 20px; }
.security-grid .action-card { top: 24px; }
.security-devices .tbl td:first-child { min-width: 220px; }
.security-integrations .mcp-grants-table { min-width: 760px; }
.security-integrations .mcp-grants-table th:nth-child(1) { width: 24%; }
.security-integrations .mcp-grants-table th:nth-child(2) { width: 32%; }
.integration-state { display: inline-block; width: 8px; height: 8px; margin-right: 7px;
                     border-radius: 50%; vertical-align: 1px; background: var(--muted); }
.integration-state.is-active { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-soft); }
.integration-state.is-paused { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-soft); }
.mcp-send-stat span { display: block; white-space: nowrap; }
.mcp-grants-table td:last-child { white-space: nowrap; }
.mcp-grant-archive { margin: 4px 18px 18px; }
.security-integrations .compact-panel-note { padding-block: 14px; }
.security-integrations .compact-panel-note p { margin: 0; color: var(--muted); font-size: 12px; }
.compact-token { display: inline-flex; margin: 2px 4px 2px 0; padding: 3px 7px;
                 border: 1px solid var(--border); border-radius: 6px;
                 color: var(--text); background: var(--surface-muted); font-size: 11px; }
.status-badge { display: inline-flex; min-height: 22px; padding: 3px 8px; align-items: center;
                border: 1px solid color-mix(in srgb, var(--ok) 36%, var(--border));
                border-radius: 999px; color: var(--ok); background: var(--ok-soft);
                font-size: 11px; font-weight: 750; white-space: nowrap; }
.copybtn.danger { border-color: color-mix(in srgb, var(--err) 35%, var(--border)); color: var(--err); }
.copybtn.danger:hover { background: var(--err-soft); }
.security-footnote { margin: 18px 0 0 !important; }

/* IdP MCP consent: jedna soustředěná bezpečnostní volba, žádný portálový chrome. */
.mcp-consent-shell { min-height: 100vh; padding-block: 38px; }
.mcp-consent-card { max-width: 620px; padding: 30px; }
.mcp-consent-card h1 { margin: 5px 0 8px; font-size: 27px; }
.mcp-client-verified { display: inline-flex; gap: 7px; margin: 0 0 13px; align-items: center;
                       color: var(--ok); font-size: 12px; font-weight: 750; }
.mcp-client-verified span { display: grid; width: 18px; height: 18px; place-items: center;
                            border-radius: 50%; color: var(--surface); background: var(--ok);
                            font-size: 11px; }
.mcp-consent-card .auth-lead { margin: 0 0 20px; color: var(--muted); line-height: 1.58; }
.mcp-consent-form { display: grid; gap: 18px; }
.mcp-consent-permission { display: flex; gap: 18px; align-items: flex-start;
                          justify-content: space-between; padding: 15px 16px;
                          border: 1px solid color-mix(in srgb, var(--ok) 28%, var(--border));
                          border-radius: 9px; background: color-mix(in srgb, var(--ok) 7%, var(--surface)); }
.mcp-consent-permission strong { font-size: 14px; }
.mcp-consent-permission p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.mcp-mailbox-picker { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.mcp-mailbox-picker legend { margin-bottom: 8px; font-size: 12px; font-weight: 800;
                             letter-spacing: .07em; text-transform: uppercase; }
.mcp-mailbox-option { display: flex; gap: 11px; margin: 0; padding: 12px 13px;
                      align-items: center; border: 1px solid var(--border);
                      border-radius: 8px; cursor: pointer; background: var(--surface-raised); }
.mcp-mailbox-option:hover { border-color: var(--border-strong); background: var(--surface-muted); }
.mcp-mailbox-option input { flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--accent); }
.mcp-mailbox-option span { display: grid; gap: 1px; min-width: 0; }
.mcp-mailbox-option strong { overflow-wrap: anywhere; font-size: 13px; }
.mcp-mailbox-option small { color: var(--muted); font-size: 11px; font-weight: 500; }
.mcp-consent-stepup { padding-top: 2px; border-top: 1px solid var(--border); }
.mcp-consent-stepup label { margin-top: 16px; }
.mcp-consent-stepup input { max-width: 210px; }
.mcp-consent-stepup p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.mcp-consent-actions { display: flex; gap: 10px; justify-content: flex-end; }
.mcp-consent-actions .form-submit { width: auto; margin: 0; }
.mcp-consent-actions button { margin: 0; }
.mcp-client-technical { margin-top: 18px; border-top: 1px solid var(--border); color: var(--muted); }
.mcp-client-technical summary { width: fit-content; margin: 13px auto 0; cursor: pointer;
                                font-size: 11px; }
.mcp-client-technical > div { display: grid; gap: 5px; margin-top: 11px; padding: 12px 13px;
                              border: 1px solid var(--border); border-radius: 8px;
                              background: var(--surface-muted); }
.mcp-client-technical span { font-size: 10px; font-weight: 800; letter-spacing: .06em;
                             text-transform: uppercase; }
.mcp-client-technical code { overflow-wrap: anywhere; color: var(--text); font-size: 11px; }
.mcp-client-technical p { margin: 2px 0 0; font-size: 11px; line-height: 1.5; }

.key-create-panel { display: grid; gap: 20px; padding: 22px 23px 24px;
                    border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
                    border-radius: 10px; background: color-mix(in srgb, var(--accent-soft) 24%, var(--surface)); }
.key-create-copy { display: flex; gap: 13px; align-items: flex-start; }
.key-create-mark { display: grid; flex: 0 0 36px; width: 36px; height: 36px; place-items: center;
                   border-radius: 9px; color: var(--accent); background: var(--accent-soft);
                   font-size: 19px; font-weight: 700; }
.key-create-kicker { display: block; margin-bottom: 2px; color: var(--accent); font-size: 10px;
                     font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.key-create-copy h2 { margin: 0 0 4px; font-size: 18px; }
.key-create-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.key-create-form { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(120px, .55fr)
                   minmax(230px, 1.2fr) auto; gap: 12px; align-items: end; }
.key-create-form label { margin: 0; }
.key-create-form label > input, .key-create-form label > select { margin-top: 7px; }
.key-create-form .form-submit { margin: 0; white-space: nowrap; }
.key-list-panel { margin-top: 21px; }
.key-list { display: grid; }
.key-item { display: grid; grid-template-columns: minmax(170px, .9fr) minmax(365px, 1.7fr) auto;
            gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--border); }
.key-item:last-child { border-bottom: 0; }
.key-item.is-paused { background: color-mix(in srgb, var(--warn-soft) 28%, var(--surface)); }
.key-identity { position: relative; min-width: 0; padding-right: 21px; }
.key-name-row, .key-token-row { display: flex; gap: 5px; align-items: center; min-width: 0; }
.key-name-row { margin-bottom: 2px; line-height: 1.2; }
.key-label { overflow: hidden; color: var(--text); font-size: 12px; font-weight: 750;
             text-overflow: ellipsis; white-space: nowrap; }
.key-token-row { flex-wrap: nowrap; }
.key-token-row code { color: var(--muted); font-size: 10px; line-height: 1.2; letter-spacing: .015em; }
.key-status-dot { display: inline-block; flex: 0 0 7px; width: 7px; height: 7px;
                  border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 2px var(--surface); }
.key-status-dot.is-live { background: var(--ok); }
.key-status-dot.is-test, .key-status-dot.is-pending { background: #d3a21b; }
.key-status-dot.is-paused { background: #df8627; }
.key-status-dot.is-revoked { background: var(--err); }
.key-meta { display: grid; grid-template-columns: minmax(105px, 1.1fr) minmax(65px, .55fr)
             minmax(125px, 1fr) minmax(72px, .65fr); gap: 8px 11px; margin: 0; }
.key-meta div { min-width: 0; }
.key-meta dt, .key-archive-meta dt { margin-bottom: 2px; color: var(--faint); font-size: 8px;
               font-weight: 800; line-height: 1.2;
               letter-spacing: .08em; text-transform: uppercase; }
.key-meta dd, .key-archive-meta dd { overflow-wrap: anywhere; margin: 0; color: var(--text);
                                    font-size: 11px; line-height: 1.2; }
.key-meta dd strong, .key-archive-meta dd strong { font-size: 13px; }
.key-meta-sent { text-align: right; font-variant-numeric: tabular-nums; }
.key-actions { display: flex; gap: 5px; align-items: center; justify-content: flex-end; }
.key-icon-button { display: grid; width: 28px; height: 28px; padding: 0; place-items: center;
                   border: 1px solid var(--border); border-radius: 7px; color: var(--muted);
                   background: var(--surface); cursor: pointer; }
.key-icon-button svg { width: 14px; height: 14px; fill: none; stroke: currentColor;
                       stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.key-icon-button:hover { border-color: var(--border-strong); color: var(--text); background: var(--surface-muted); }
.key-icon-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.key-icon-button.is-subtle { width: 25px; height: 25px; border-color: transparent; background: transparent; }
.key-icon-button.is-subtle svg { width: 13px; height: 13px; }
.key-name-row .key-icon-button.is-subtle { position: absolute; top: -2px; right: 0; width: 19px; height: 19px; }
.key-name-row .key-icon-button.is-subtle svg { width: 11px; height: 11px; }
.key-icon-button.is-danger { color: var(--err); }
.key-icon-button.is-danger:hover { border-color: color-mix(in srgb, var(--err) 28%, var(--border));
                                   color: var(--err); background: var(--err-soft); }
.key-icon-button.is-pause { color: #b76b19; }
.key-icon-button.is-resume { color: var(--ok); }

.key-archive { margin-top: 16px; border: 1px solid var(--border); border-radius: 10px;
               color: var(--muted); background: color-mix(in srgb, var(--surface-muted) 45%, var(--surface)); }
.key-archive > summary { display: flex; gap: 18px; align-items: center; justify-content: space-between;
                        padding: 13px 16px; cursor: pointer; list-style-position: inside; }
.key-archive > summary::marker { color: var(--faint); }
.key-archive > summary strong { color: var(--text); font-size: 12px; }
.key-archive > summary small { display: block; margin: 2px 0 0 19px; color: var(--faint); font-size: 10px; }
.key-archive-list { border-top: 1px solid var(--border); }
.key-archive-item { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(230px, .8fr) 28px;
                    gap: 12px; align-items: center; padding: 11px 15px; border-bottom: 1px solid var(--border); }
.key-archive-item:last-child { border-bottom: 0; }
.key-archive-identity > strong, .key-archive-identity code { display: block; }
.key-archive-identity > strong { margin-bottom: 3px; color: var(--muted); font-size: 11px; }
.key-archive-identity code { color: var(--faint); font-size: 10px; }
.key-archive-meta { display: grid; grid-template-columns: minmax(65px, .45fr) minmax(140px, 1fr);
                    gap: 11px; margin: 0; }

.mailbox-detail-page .resource-heading { margin-bottom: 20px; }
.mailbox-detail-page .resource-heading h1 { max-width: 820px; overflow-wrap: anywhere; }
.mailbox-detail-page > .detail-card { margin-bottom: 18px; }
.mailbox-detail-page > .detail-card > .muted.small { margin: 0; padding: 19px 21px 0; line-height: 1.6; }
.mailbox-detail-page > .detail-card > .limits-form { display: grid; gap: 14px; padding: 17px 21px 22px; }
.mailbox-detail-page > .detail-card > .limits-form label { margin-top: 0; }
.mailbox-detail-page > .detail-card > .hint { display: block; margin: 0; padding: 13px 19px 17px; }
.mailbox-detail-page .allowlist-card { margin-bottom: 18px; }
.mailbox-detail-page .allowlist-body { padding: 19px 21px 22px; }
.mailbox-detail-page .detail-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; margin-top: 2px; }
.mailbox-detail-page .detail-grid .tbl th { padding-left: 19px; }
.mailbox-detail-page .detail-grid .tbl td { padding-right: 19px; overflow-wrap: anywhere; }
.mailbox-detail-page .info-strip { margin-bottom: 0; }

@media (max-width: 980px) {
  .app-content .wrap.security-page,
  .app-content .wrap.keys-page,
  .app-content .wrap.mailbox-detail-page { width: min(980px, calc(100% - 48px)); }
  .security-grid, .mailbox-detail-page .detail-grid { grid-template-columns: 1fr; }
  .key-create-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-create-form .key-scope-field { grid-column: 1 / 2; }
  .key-create-form .form-submit { justify-self: start; }
  .key-item { grid-template-columns: minmax(185px, 1fr) auto; }
  .key-meta { grid-column: 1 / 3; grid-row: 2; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .key-actions { grid-column: 2; grid-row: 1; }
}

@media (max-width: 620px) {
  .app-content .wrap.security-page,
  .app-content .wrap.keys-page,
  .app-content .wrap.mailbox-detail-page { width: min(980px, calc(100% - 28px)); }
  .security-page .panel-body { padding: 18px 16px 20px; }
  .security-page .data-panel-label, .mailbox-detail-page .data-panel-label { padding-inline: 15px; }
  .key-create-panel { padding: 18px 16px 20px; }
  .key-create-form { grid-template-columns: 1fr; }
  .key-create-form .key-scope-field { grid-column: auto; }
  .key-create-form .form-submit { width: 100%; }
  .key-item { grid-template-columns: 1fr; gap: 13px; padding: 15px; }
  .key-meta { grid-column: 1; grid-row: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-actions { grid-column: 1; grid-row: auto; justify-content: flex-start; padding-top: 11px;
                 border-top: 1px solid var(--border); }
  .key-archive-item { grid-template-columns: 1fr 34px; gap: 10px; }
  .key-archive-meta { grid-column: 1; grid-row: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .key-archive-item > form { grid-column: 2; grid-row: 1 / 3; }
  .mailbox-detail-page > .detail-card > .muted.small { padding: 17px 16px 0; }
  .mailbox-detail-page > .detail-card > .limits-form { padding: 15px 16px 19px; }
  .mailbox-detail-page .allowlist-body { padding: 17px 16px 19px; }
}

/* Workspace refresh: mailboxes, sharing, keys, security and users share one
   restrained application language. All colors come from theme tokens. */
.app-content .wrap.mailboxes-page,
.app-content .wrap.sharing-page,
.app-content .wrap.users-page { width: min(1120px, calc(100% - 96px)); }

.workspace-tabs { display: inline-flex; gap: 4px; margin-bottom: 26px; padding: 4px;
                  border: 1px solid var(--border); border-radius: 12px;
                  background: color-mix(in srgb, var(--surface-muted) 68%, var(--surface)); }
.workspace-tabs a { display: flex; gap: 9px; min-height: 34px; padding: 7px 11px;
                    align-items: center; border-radius: 8px; color: var(--muted);
                    font-size: 12px; font-weight: 760; }
.workspace-tabs a:hover { color: var(--text); background: color-mix(in srgb, var(--surface) 70%, transparent); }
.workspace-tabs a.is-active { color: var(--text); background: var(--surface);
                              box-shadow: 0 1px 3px color-mix(in srgb, var(--text) 9%, transparent); }
.workspace-tabs small { color: var(--faint); font-size: 9px; font-weight: 750;
                        letter-spacing: .045em; text-transform: uppercase; }
.workspace-tabs a.is-active small { color: var(--accent); }

.workspace-titlebar { display: flex; gap: 30px; margin-bottom: 22px; align-items: end;
                      justify-content: space-between; }
.workspace-titlebar h1 { margin-bottom: 7px; font-size: clamp(30px, 3vw, 38px); }
.workspace-titlebar .page-sub { max-width: 680px; margin: 0; line-height: 1.55; }
.workspace-titlebar .eyebrow { margin-bottom: 8px; }
.workspace-primary-action { flex: 0 0 auto; min-height: 38px; white-space: nowrap; }

.workspace-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
                     overflow: hidden; margin-bottom: 24px; border: 1px solid var(--border);
                     border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.workspace-metric { display: flex; gap: 11px; min-width: 0; padding: 15px 17px;
                    align-items: center; border-right: 1px solid var(--border); }
.workspace-metric:last-child { border-right: 0; }
.workspace-metric > div { display: grid; min-width: 0; }
.workspace-metric strong { overflow: hidden; color: var(--text); font-size: 15px;
                           font-weight: 790; line-height: 1.2; text-overflow: ellipsis;
                           white-space: nowrap; }
.workspace-metric > div > span { overflow: hidden; margin-top: 2px; color: var(--muted);
                                 font-size: 10px; font-weight: 650; text-overflow: ellipsis;
                                 white-space: nowrap; }
.metric-icon { display: grid; flex: 0 0 30px; width: 30px; height: 30px; place-items: center;
               border-radius: 9px; color: var(--muted); background: var(--surface-muted);
               font-size: 12px; font-weight: 820; }
.metric-icon.is-human { color: #416f9b; background: color-mix(in srgb, #5e94c7 14%, var(--surface)); }
.metric-icon.is-agent { color: var(--accent); background: var(--accent-soft); }
.metric-icon.is-success { color: var(--ok); background: var(--ok-soft); }
.metric-icon.is-warning { color: var(--warn); background: var(--warn-soft); }
.metric-icon.is-admin { color: #6f62bb; background: color-mix(in srgb, #8175cf 15%, var(--surface)); }

.data-panel-label > div { min-width: 0; }
.data-panel-label > div h2 { margin: 0; }
.panel-kicker { display: block; margin-bottom: 2px; color: var(--faint); font-size: 8px;
                font-weight: 820; letter-spacing: .1em; line-height: 1.2; text-transform: uppercase; }
.resource-panel .data-panel-label { min-height: 64px; padding-inline: 20px; }
.resource-list { display: grid; }
.resource-row { display: grid; grid-template-columns: 38px minmax(180px, 1fr) minmax(185px, auto) 24px;
                gap: 13px; min-height: 73px; padding: 13px 17px; align-items: center;
                border-bottom: 1px solid var(--border); color: var(--text); }
.resource-row:last-child { border-bottom: 0; }
.resource-row:hover { color: var(--text); background: color-mix(in srgb, var(--accent-soft) 30%, var(--surface)); }
.resource-avatar { display: grid; width: 36px; height: 36px; place-items: center;
                   border: 1px solid var(--border); border-radius: 11px;
                   color: var(--muted); background: var(--surface-muted); font-size: 11px; font-weight: 840; }
.resource-avatar.is-human { color: #416f9b; border-color: color-mix(in srgb, #5e94c7 25%, var(--border));
                            background: color-mix(in srgb, #5e94c7 10%, var(--surface)); }
.resource-avatar.is-agent { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 24%, var(--border));
                            background: color-mix(in srgb, var(--accent-soft) 75%, var(--surface)); }
.resource-avatar.is-user { border-radius: 50%; color: #6f62bb;
                           border-color: color-mix(in srgb, #8175cf 25%, var(--border));
                           background: color-mix(in srgb, #8175cf 11%, var(--surface)); }
.resource-identity { display: grid; min-width: 0; }
.resource-identity strong { overflow: hidden; font-size: 13px; font-weight: 760;
                            text-overflow: ellipsis; white-space: nowrap; }
.resource-identity strong em { display: inline-flex; margin-left: 6px; padding: 2px 6px;
                               border-radius: 999px; color: var(--accent); background: var(--accent-soft);
                               font-size: 8px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.resource-identity small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 10px;
                           text-overflow: ellipsis; white-space: nowrap; }
.resource-attributes { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
.resource-type, .role-pill { display: inline-flex; min-height: 24px; padding: 3px 8px; align-items: center;
                             border: 1px solid var(--border); border-radius: 999px;
                             color: var(--muted); background: var(--surface-raised); font-size: 9px; font-weight: 760; }
.role-pill.is-owner { color: #6f62bb; border-color: color-mix(in srgb, #8175cf 27%, var(--border));
                      background: color-mix(in srgb, #8175cf 10%, var(--surface)); }
.role-pill.is-admin { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 26%, var(--border));
                      background: color-mix(in srgb, var(--accent-soft) 60%, var(--surface)); }
.resource-status { display: inline-flex; gap: 6px; min-height: 24px; padding: 3px 8px;
                   align-items: center; border-radius: 999px; color: var(--muted);
                   background: var(--surface-muted); font-size: 9px; font-weight: 760; }
.resource-status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.resource-status.is-active { color: var(--ok); background: var(--ok-soft); }
.resource-status.is-invited, .resource-status.is-pending, .resource-status.is-creating {
  color: var(--warn); background: var(--warn-soft);
}
.resource-status.is-disabled, .resource-status.is-suspended { color: var(--err); background: var(--err-soft); }
.resource-arrow { color: var(--faint); font-size: 17px; transition: transform .15s, color .15s; }
.resource-row:hover .resource-arrow { color: var(--accent); transform: translateX(2px); }

.friendly-empty { display: flex; gap: 15px; min-height: 190px; align-items: center; justify-content: center; }
.friendly-empty .empty-symbol { display: grid; flex: 0 0 42px; width: 42px; height: 42px;
                                place-items: center; border-radius: 13px; color: var(--accent);
                                background: var(--accent-soft); font-weight: 820; }
.friendly-empty strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 13px; }
.friendly-empty p { font-size: 11px; text-align: left; }

.guided-card { scroll-margin-top: 22px; }
.guided-card::before { display: none; }
.guided-card > .panel-kicker { color: var(--accent); }
.guided-card .card-title { margin-top: 4px; font-size: 19px; }
.guided-card label:not(.permission-choice) { display: flex; gap: 8px; align-items: center; }
.field-number { display: inline-grid; width: 19px; height: 19px; place-items: center;
                border-radius: 6px; color: var(--accent); background: var(--accent-soft);
                font-size: 9px; font-weight: 820; }
.field-help { display: block; margin-top: 5px; color: var(--faint); font-size: 10px; }
.form-assurance { display: flex; gap: 10px; margin-top: 16px; padding: 11px 12px;
                  align-items: flex-start; border: 1px solid var(--border); border-radius: 9px;
                  color: var(--muted); background: var(--surface-muted); }
.form-assurance > span { display: grid; flex: 0 0 19px; width: 19px; height: 19px;
                         place-items: center; border-radius: 50%; color: var(--accent);
                         background: var(--accent-soft); font-size: 10px; font-weight: 850; }
.form-assurance p { margin: 0; font-size: 10px; line-height: 1.5; }
.form-assurance strong { color: var(--text); }
.permission-choice { display: flex; gap: 11px; margin-top: 16px; padding: 11px 12px;
                     align-items: flex-start; border: 1px solid var(--border); border-radius: 9px;
                     cursor: pointer; background: var(--surface-raised); }
.permission-choice:hover { border-color: var(--border-strong); background: var(--surface-muted); }
.permission-choice input { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 2px; accent-color: var(--accent); }
.permission-choice span { display: grid; }
.permission-choice strong { font-size: 11px; }
.permission-choice small { margin-top: 1px; color: var(--muted); font-size: 9px; font-weight: 500; }

.sharing-page .sharing-heading { margin-bottom: 22px; }
.sharing-page .share-composer { scroll-margin-top: 22px; margin-top: 0; }
.sharing-page .share-section { margin-top: 28px; }

.key-legend { display: flex; gap: 13px; min-height: 39px; padding: 9px 14px;
              align-items: center; border-bottom: 1px solid var(--border);
              color: var(--muted); background: color-mix(in srgb, var(--surface-muted) 45%, var(--surface)); }
.key-legend span { display: inline-flex; gap: 6px; align-items: center; font-size: 9px; font-weight: 700; }
.key-legend small { margin-left: auto; color: var(--faint); font-size: 9px; }
.key-legend .key-status-dot { box-shadow: none; }

.security-overview .workspace-metric strong { font-size: 13px; }
.security-primary { margin-top: 0 !important; }
.security-page .section { scroll-margin-top: 20px; }
.security-page .data-panel { border-radius: 14px; box-shadow: var(--shadow); }
.security-page .account-password-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
                                        gap: 14px; max-width: 720px; align-items: end; }
.security-page .account-password-form .security-form-field { display: grid; gap: 6px; }
.security-page .account-password-form .security-form-field.is-current { grid-column: 1 / -1; }
.security-page .account-password-form .form-submit,
.security-page .account-password-form .copybtn { justify-self: start; width: auto; }
.security-page .security-grid .account-password-form { display: block; }

@media (max-width: 1080px) {
  .workspace-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-metric:nth-child(2) { border-right: 0; }
  .workspace-metric:nth-child(-n + 2) { border-bottom: 1px solid var(--border); }
  .resource-row { grid-template-columns: 38px minmax(160px, 1fr) minmax(155px, auto) 22px; }
}

@media (max-width: 760px) {
  .app-content .wrap.mailboxes-page,
  .app-content .wrap.sharing-page,
  .app-content .wrap.users-page { width: min(100% - 32px, 1120px); }
  .workspace-tabs { margin-bottom: 20px; }
  .workspace-titlebar { gap: 18px; align-items: flex-start; flex-direction: column; }
  .workspace-primary-action { width: 100%; }
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-grid .action-card { position: static; }
  .resource-row { grid-template-columns: 36px minmax(0, 1fr) 20px; gap: 11px; }
  .resource-attributes { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .resource-arrow { grid-column: 3; grid-row: 1 / 3; }
  .resource-identity strong, .resource-identity small { white-space: normal; overflow-wrap: anywhere; }
  .key-legend { align-items: flex-start; flex-wrap: wrap; }
  .key-legend small { width: 100%; margin-left: 0; }
  .security-page .account-password-form { display: block; }
  .security-page .account-password-form .security-form-field { margin-bottom: 13px; }
}

@media (max-width: 480px) {
  .workspace-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .workspace-tabs a { justify-content: center; }
  .workspace-metrics { grid-template-columns: 1fr 1fr; }
  .workspace-metric { padding: 12px; }
  .metric-icon { width: 27px; height: 27px; flex-basis: 27px; }
  .workspace-metric strong { font-size: 13px; }
  .workspace-metric > div > span { font-size: 9px; }
  .resource-row { padding-inline: 13px; }
  .resource-type { display: none; }
}

/* Unified account workspaces -------------------------------------------------
   Mailboxes, sharing, keys, security and users deliberately use the same
   page width, type scale, panel rhythm and modal forms. New actions no longer
   compete with the data in narrow side cards. */
.app-content .wrap.mailboxes-page,
.app-content .wrap.sharing-page,
.app-content .wrap.keys-page,
.app-content .wrap.security-page,
.app-content .wrap.users-page { width: min(1120px, calc(100% - 96px)); }

.portal-workspace .workspace-tabs { margin-bottom: 24px; }
.portal-workspace .workspace-titlebar { min-height: 86px; margin-bottom: 22px; align-items: flex-end; }
.portal-workspace .workspace-titlebar h1 { margin: 0 0 7px; font-size: clamp(30px, 3vw, 36px); line-height: 1.15; }
.portal-workspace .workspace-titlebar .page-sub { max-width: 720px; font-size: 14px; line-height: 1.55; }
.portal-workspace .workspace-titlebar .eyebrow { margin-bottom: 7px; font-size: 10px; }
.workspace-title-actions { display: flex; flex: 0 0 auto; gap: 9px; align-items: center; }
.workspace-title-actions .btn, .workspace-primary-action { min-height: 40px; font-size: 13px; }

.portal-workspace .workspace-metrics { margin-bottom: 20px; border-radius: 14px; }
.portal-workspace .workspace-metric { min-height: 65px; padding: 13px 16px; }
.portal-workspace .workspace-metric strong { font-size: 14px; }
.portal-workspace .workspace-metric > div > span { margin-top: 3px; font-size: 11px; }
.portal-workspace .metric-icon { width: 30px; height: 30px; flex-basis: 30px; }

.portal-workspace .data-panel { border-radius: 14px; box-shadow: var(--shadow); }
.portal-workspace .data-panel-label { min-height: 62px; padding: 0 19px; }
.portal-workspace .data-panel-label h2 { font-size: 16px; line-height: 1.25; }
.portal-workspace .panel-kicker { margin-bottom: 3px; font-size: 9px; }
.portal-workspace .record-count { min-height: 24px; font-size: 10px; }
.workspace-main-panel, .keys-page .key-list-panel { margin-top: 0; }

.portal-workspace .resource-row { min-height: 75px; }
.portal-workspace .resource-identity strong { font-size: 14px; }
.portal-workspace .resource-identity small { margin-top: 3px; font-size: 11px; }
.portal-workspace .resource-type,
.portal-workspace .role-pill,
.portal-workspace .resource-status { min-height: 25px; font-size: 10px; }

/* Sharing uses the same framed panels as every other list. */
.sharing-page .share-section,
.sharing-page .share-section + .share-section { margin-top: 18px; }
.sharing-page .share-section-head { margin: 0; padding: 0 19px; }
.sharing-page .share-list { overflow: visible; border: 0; border-radius: 0; box-shadow: none; }
.sharing-page .share-item { min-height: 78px; padding: 14px 18px; }
.sharing-page .share-addresses strong { font-size: 13px; }
.sharing-page .share-caption { font-size: 11px; }
.sharing-page .share-empty { min-height: 104px; border: 0; border-radius: 0; background: transparent; }

/* Keep the compact key list, but bring its text into the shared scale. */
.keys-page .key-legend { min-height: 40px; padding-inline: 15px; }
.keys-page .key-legend span, .keys-page .key-legend small { font-size: 10px; }
.keys-page .key-item { min-height: 66px; padding: 12px 15px; }
.keys-page .key-label { font-size: 13px; }
.keys-page .key-token-row code { font-size: 11px; }
.keys-page .key-meta dt, .keys-page .key-archive-meta dt { font-size: 9px; }
.keys-page .key-meta dd, .keys-page .key-archive-meta dd { font-size: 11px; line-height: 1.3; }

/* Security is no longer a sequence of different card widths. */
.security-page .security-twofactor,
.security-page .security-policy,
.security-page .security-devices,
.security-page .security-integrations { margin-top: 18px; }
.security-page .panel-body { padding: 20px 22px 22px; }
.security-page .panel-body > p { max-width: 820px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.security-page .account-password-form { max-width: 760px; gap: 14px; }
.security-page .account-password-form .security-form-field { gap: 6px; }
.security-page .account-password-form .security-form-field label { margin: 0; font-size: 12px; }
.security-page .account-password-form > button,
.security-page .account-password-form > .btn { grid-column: 1 / -1; justify-self: start; width: auto; margin: 2px 0 0; }
.security-page .tbl { font-size: 12px; }
.security-policy-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; }
.security-policy-body > div > p { margin: 0 0 4px; color: var(--text); font-size: 13px; }
.security-policy-body > div > small { color: var(--muted); font-size: 11px; }
.security-policy-form { display: flex; gap: 14px; align-items: center; }
.workspace-switch { display: flex; gap: 10px; min-width: 225px; margin: 0; padding: 9px 11px; align-items: center;
                    border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); cursor: pointer; }
.workspace-switch input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: var(--accent); }
.workspace-switch span { display: grid; }
.workspace-switch strong { font-size: 12px; }
.workspace-switch small { color: var(--muted); font-size: 10px; font-weight: 500; }

/* One modal and one form language for every create/invite action. */
.workspace-modal-box { width: min(620px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; padding: 0;
                       border-radius: 15px; background: var(--surface); }
.workspace-modal-form { display: block; }
.workspace-modal-head { display: flex; gap: 24px; padding: 23px 24px 19px; align-items: flex-start;
                        justify-content: space-between; border-bottom: 1px solid var(--border); }
.workspace-modal-head > div { min-width: 0; }
.workspace-modal-head h2 { margin: 0 0 5px; font-size: 20px; letter-spacing: -.02em; }
.workspace-modal-head p { max-width: 500px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.workspace-modal-head p strong { color: var(--text); }
.modal-close { display: grid; flex: 0 0 30px; width: 30px; height: 30px; min-height: 30px; padding: 0; place-items: center;
               border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--surface); font-size: 19px; font-weight: 400; }
.modal-close:hover { color: var(--text); background: var(--surface-muted); box-shadow: none; }
.workspace-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 21px 24px 19px; }
.workspace-form-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
.workspace-form-field.is-wide { grid-column: 1 / -1; }
.workspace-form-field label { margin: 0; font-size: 12px; font-weight: 720; }
.workspace-form-field input,
.workspace-form-field select { min-height: 43px; padding: 9px 11px; border-radius: 9px; background: var(--surface-raised); font-size: 13px; }
.workspace-form-field small { color: var(--faint); font-size: 10px; line-height: 1.4; }
.workspace-field-placeholder { display: flex; min-height: 43px; padding: 9px 11px; align-items: center;
                               border: 1px solid var(--border); border-radius: 9px; color: var(--muted);
                               background: var(--surface-muted); font-size: 12px; }
.workspace-form-note { margin: 0 24px 19px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
                       color: var(--muted); background: var(--surface-muted); font-size: 11px; line-height: 1.5; }
.workspace-form-note strong { color: var(--text); }
.workspace-checkbox { display: flex; gap: 10px; margin: 0 24px 19px; padding: 11px 12px; align-items: flex-start;
                      border: 1px solid var(--border); border-radius: 9px; background: var(--surface-raised); cursor: pointer; }
.workspace-checkbox input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--accent); }
.workspace-checkbox span { display: grid; }
.workspace-checkbox strong { font-size: 12px; }
.workspace-checkbox small { margin-top: 1px; color: var(--muted); font-size: 10px; font-weight: 500; }
.workspace-form-facts { display: flex; gap: 8px 20px; flex-wrap: wrap; margin: 0 24px 19px; color: var(--muted); font-size: 11px; }
.workspace-form-facts span { display: inline-flex; gap: 4px; align-items: center; }
.workspace-form-facts span::before { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); content: ""; }
.workspace-form-facts strong { color: var(--text); }
.workspace-modal-actions { display: flex; gap: 9px; padding: 15px 24px; justify-content: flex-end;
                           border-top: 1px solid var(--border); background: color-mix(in srgb, var(--surface-muted) 42%, var(--surface)); }
.workspace-modal-actions .btn { min-width: 100px; min-height: 39px; margin: 0; font-size: 13px; }

@media (max-width: 980px) {
  .app-content .wrap.mailboxes-page,
  .app-content .wrap.sharing-page,
  .app-content .wrap.keys-page,
  .app-content .wrap.security-page,
  .app-content .wrap.users-page { width: min(100% - 48px, 1120px); }
  .security-policy-body { grid-template-columns: 1fr; gap: 16px; }
  .security-policy-form { justify-content: space-between; }
}

@media (max-width: 760px) {
  .portal-workspace .workspace-titlebar { min-height: 0; }
  .workspace-title-actions { width: 100%; }
  .workspace-title-actions .btn { flex: 1; }
  .portal-workspace .workspace-primary-action { width: 100%; }
  .security-policy-form { align-items: stretch; flex-direction: column; }
  .security-policy-form .btn { width: 100%; }
}

@media (max-width: 620px) {
  .app-content .wrap.mailboxes-page,
  .app-content .wrap.sharing-page,
  .app-content .wrap.keys-page,
  .app-content .wrap.security-page,
  .app-content .wrap.users-page { width: min(100% - 28px, 1120px); }
  .modal-overlay { padding: 10px; align-items: flex-end; }
  .workspace-modal-box { width: 100%; max-height: calc(100vh - 20px); border-radius: 15px 15px 10px 10px; }
  .workspace-modal-head { padding: 20px 18px 17px; }
  .workspace-form-grid { grid-template-columns: 1fr; padding: 18px; }
  .workspace-form-field.is-wide { grid-column: auto; }
  .workspace-form-note, .workspace-checkbox, .workspace-form-facts { margin-inline: 18px; }
  .workspace-modal-actions { padding: 14px 18px; }
  .workspace-modal-actions .btn { flex: 1; min-width: 0; }
}

/* ---- Přehled přístupů (/users/access) ---------------------------------------
   Lidé u schránky se ZALAMUJÍ. `.resource-identity small` je nowrap + ellipsis,
   takže seznam nacpaný do popisku by se u čtyř delegátů uřízl třemi tečkami —
   a stránka, která má ukázat celý dosah ke schránce, si nesmí dovolit část
   zamlčet zrovna proto, že se nevešla. */
.access-list { display: grid; }
.access-row { display: grid; gap: 10px; padding: 15px 18px;
              border-bottom: 1px solid var(--border); }
.access-row:last-child { border-bottom: 0; }
.access-mailbox { display: grid; grid-template-columns: 38px minmax(0, 1fr);
                  gap: 12px; align-items: center; }
.access-people { display: flex; flex-wrap: wrap; gap: 8px;
                 margin: 0; padding: 0 18px 15px; list-style: none; }
.access-row .access-people { padding: 0 0 0 50px; }
.access-chip { display: grid; gap: 1px; padding: 6px 10px; border: 1px solid var(--border);
               border-radius: 10px; background: var(--surface-muted); }
.access-chip b { color: var(--text); font-size: 12px; font-weight: 700; }
.access-chip a { color: inherit; text-decoration: none; }
.access-chip a:hover b { color: var(--accent); }
.access-chip span { color: var(--muted); font-size: 10px; }
/* Externí delegát je z cizí organizace — nesmí splynout s vlastním týmem. */
.access-chip.is-external { border-color: var(--accent-strong); background: var(--accent-soft); }
.access-chip.is-empty { border-style: dashed; background: transparent; }
.access-chip.is-empty b { color: var(--muted); font-weight: 600; }
@media (max-width: 640px) {
  .access-row .access-people { padding-left: 0; }
}

/* ---- Chybová stránka -------------------------------------------------------- */
.chyba-stranka { max-width: 620px; margin: 64px auto; }
.chyba-obsah { padding: 40px 34px; text-align: center; }
.chyba-kod { display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: 8px;
             background: var(--surface-muted); color: var(--muted);
             font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.chyba-obsah h1 { margin: 0 0 10px; font-size: 24px; }
.chyba-obsah p { margin: 0 auto 18px; max-width: 44ch; color: var(--muted); font-size: 13px; }
.chyba-znacka { padding-top: 14px; border-top: 1px solid var(--border); }
.chyba-znacka code { padding: 2px 6px; border-radius: 6px;
                     background: var(--surface-muted); color: var(--text); font-size: 12px; }
.chyba-akce { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ---- Předplatné (/billing) ---------------------------------------------------
   Vlastní třídy schválně: `.resource-row` je mřížka 38px | 1fr | auto | 24px
   s nowrap a ellipsis. Bez avataru v prvním sloupci se text uřízne na „Pla…",
   což se přesně stalo. Tady se text ZALAMUJE. */
.ucet-stav { padding: 16px 18px 18px; }
.ucet-hlavni { margin: 0 0 14px; color: var(--text); font-size: 13px; line-height: 1.55; }
.ucet-cisla { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ucet-cisla li { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px;
                 background: var(--surface-muted); }
.ucet-cisla b { display: block; color: var(--text); font-size: 15px; font-weight: 760; }
.ucet-cisla span { color: var(--muted); font-size: 11px; }
.ucet-nabidka { display: grid; }
.ucet-plan { display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
             justify-content: space-between; padding: 14px 18px;
             border-bottom: 1px solid var(--border); }
.ucet-plan:last-child { border-bottom: 0; }
.ucet-plan b { display: block; color: var(--text); font-size: 14px; font-weight: 760; }
.ucet-plan span { color: var(--muted); font-size: 11px; }
.ucet-plan.je-tvuj { background: var(--surface-muted); }
.ucet-znacka { padding: 4px 10px; border-radius: 8px; background: var(--accent-soft);
               color: var(--accent-strong); font-size: 11px; font-weight: 700; }

/* Plán a Tier v JEDNOM rámečku: patří k sobě (co sis koupil × jak rychle smíš
   odesílat). Dva samostatné se četly jako nesouvisející údaje. */
.hero-meta-ucet { display: grid; grid-template-columns: auto auto auto;
                  gap: 0 14px; align-items: start; }
.hero-meta-ucet > .hero-meta-note { grid-column: 1 / -1; margin-top: 6px; }
.hero-meta-del { width: 1px; align-self: stretch; background: var(--border); }

/* ---- Ceník: přepínač měn a doplňky ---- */
.mena-prepinac { display: flex; gap: 8px; align-items: center; margin: 0 0 12px;
                 color: var(--muted); font-size: 12px; }
.mena-prepinac a { padding: 3px 10px; border: 1px solid var(--border); border-radius: 8px;
                   color: var(--muted); text-decoration: none; }
.mena-prepinac a.je-vybrana { border-color: var(--accent-strong); color: var(--accent-strong);
                              background: var(--accent-soft); font-weight: 700; }
/* `.cenik-doplnky` se pravidly řídí níž, u zbytku ceníku. Tady stával druhý, starší
   předpis pro seznam `ul > li`; ten se přestal používat, když se doplňky sloučily
   do jedné sekce, a jeho `b`/`span` selektory přebíjely nové karty. */

/* Výběr plánu jako karty vedle sebe. Seznam po jednom řádku neumožňoval porovnat,
   co který plán dává — a při jediném plánu vypadal jako chyba. */
.plany-karty { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
               gap: 12px; padding: 16px 18px 18px; }
.plan-karta { display: flex; flex-direction: column; gap: 8px; padding: 15px;
              border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.plan-karta.je-muj { border-color: var(--accent-strong); background: var(--accent-soft); }
.plan-hlava { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
              justify-content: space-between; }
.plan-hlava b { color: var(--text); font-size: 15px; font-weight: 780; }
.plan-cena { color: var(--text); font-size: 14px; font-weight: 700; }
.plan-cena i { color: var(--muted); font-size: 11px; font-style: normal; font-weight: 400; }
.plan-popis { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.plan-limity { margin: 0; padding: 0 0 4px; list-style: none; }
.plan-limity li { padding: 3px 0; border-bottom: 1px solid var(--border);
                  color: var(--text); font-size: 12px; }
.plan-limity li:last-child { border-bottom: 0; }
.plan-karta form { margin-top: auto; }
.plan-karta .btn { width: 100%; }
.plan-akce { margin-top: auto; padding: 7px 0; color: var(--muted); font-size: 11px;
             text-align: center; }
.plan-akce.je-muj { color: var(--accent-strong); font-weight: 700; }

/* Tabulka ceníku má osm sloupců a při užším okně se poslední („Pošta u nás")
   ořízl na „neomez…". Vodorovné posouvání teď dává vědět stínem u okraje, aby
   bylo poznat, že tam ještě něco je. */
.pricing-scroll { position: relative;
  background: linear-gradient(to right, var(--surface) 30%, rgba(255,255,255,0)) left / 24px 100% no-repeat,
              linear-gradient(to left, var(--surface) 30%, rgba(255,255,255,0)) right / 24px 100% no-repeat,
              radial-gradient(farthest-side at 0 50%, rgba(0,0,0,.10), transparent) left / 12px 100% no-repeat,
              radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,.10), transparent) right / 12px 100% no-repeat;
  background-attachment: local, local, scroll, scroll; }

/* Souhrn předplatného. Predtím věta + tři šedé krabičky, ve kterých nebylo poznat,
   co je důležité. Teď velký název plánu, stav a ukazatele čerpání. */
.ucet-hlavicka { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start;
                 justify-content: space-between; padding: 16px 18px 4px; }
.ucet-kicker { display: block; color: var(--muted); font-size: 11px; font-weight: 700;
               letter-spacing: .07em; text-transform: uppercase; }
.ucet-hlavicka h2 { margin: 2px 0 6px; font-size: 26px; }
.ucet-stavovy { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0;
                color: var(--muted); font-size: 12px; }
.ucet-znak { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); }
.ucet-znak.je-aktivni { background: #16a34a; }
.ucet-znak.je-konci { background: #d97706; }
.ucet-zrusit { display: grid; gap: 4px; justify-items: end; }
.ucet-zrusit span { color: var(--muted); font-size: 11px; }
.ucet-metry { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
              gap: 14px; padding: 12px 18px 18px; }
.ucet-metr-k { color: var(--muted); font-size: 11px; }
.ucet-metr-v { color: var(--text); font-size: 20px; font-weight: 780; line-height: 1.2; }
.ucet-metr-v span { color: var(--muted); font-size: 12px; font-weight: 400; }
progress.ucet-metr-pruh { display: block; width: 100%; height: 4px; margin-top: 6px;
                          border: 0; border-radius: 3px; background: var(--surface-muted);
                          appearance: none; }
progress.ucet-metr-pruh::-webkit-progress-bar { background: var(--surface-muted); border-radius: 3px; }
progress.ucet-metr-pruh::-webkit-progress-value { background: var(--accent); border-radius: 3px; }
progress.ucet-metr-pruh::-moz-progress-bar { background: var(--accent); border-radius: 3px; }
.ucet-metr-pruh.je-bez-limitu { height: 4px; margin-top: 6px; border-radius: 3px;
                                background: var(--surface-muted); }

/* ---- Ceník jako karty ---------------------------------------------------------
   Osmisloupcová tabulka ořezávala poslední sloupec („Pošta u nás" → „neomez…")
   a na mobilu se nedala číst vůbec. */
.cenik-head { display: flex; flex-wrap: wrap; gap: 18px 24px;
              align-items: flex-start; justify-content: space-between; }
.cenik-head-text { flex: 1 1 420px; }
.cenik-head .mena-prepinac { flex: 0 0 auto; margin: 4px 0 0; }

/* Šířka je natvrdo tři sloupce, ne `auto-fit`. Plánů je šest, takže vyjdou přesně dvě
   řady; `auto-fit` je při 960 px lámal 4+2 a vedle poslední dvojice zůstala prázdná
   půlka stránky. Pod 900 px dva sloupce, na mobilu jeden. */
.cenik-karty { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
               gap: 16px; margin: 22px 0 10px; align-items: stretch; }
@media (max-width: 900px) { .cenik-karty { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cenik-karty { grid-template-columns: 1fr; } }

.cenik-karta { position: relative; display: flex; flex-direction: column; padding: 20px;
               border: 1px solid var(--border); border-radius: 14px;
               background: var(--surface); }
.cenik-karta.je-doporuceny { border-color: var(--accent-strong); box-shadow: var(--shadow); }
.cenik-stitek { position: absolute; top: -10px; left: 18px; padding: 3px 9px;
                border-radius: 7px; background: var(--accent-strong); color: #fff;
                font-size: 10px; font-weight: 700; }
.cenik-karta h2 { margin: 0 0 6px; font-size: 18px; letter-spacing: -.01em; }

/* Cena a jednotka na účaří vedle sebe: „390 Kč" nese informaci, „/ měsíc" jen
   upřesňuje, takže nesmí mít stejnou váhu ani vlastní řádek. */
.cenik-cena { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline;
              margin: 0 0 8px; }
.cenik-cena b { color: var(--text); font-size: 27px; font-weight: 820; letter-spacing: -.02em;
                line-height: 1.1; }
.cenik-cena b.je-slovo { font-size: 18px; font-weight: 760; }
.cenik-cena span { color: var(--muted); font-size: 12px; font-weight: 400; }
.cenik-bez-ceny { margin: 0 0 10px; color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.cenik-bez-ceny a { color: var(--accent-strong); }
.cenik-popis { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* `margin-top: auto` drží parametry i tlačítko dole, takže karty s různě dlouhým
   popisem mají tlačítka na jedné lince napříč řadou. */
.cenik-parametry { margin: auto 0 0; }
.cenik-parametry > div { display: flex; gap: 10px; justify-content: space-between;
                         padding: 7px 0; border-top: 1px solid var(--border); }
.cenik-parametry dt { color: var(--muted); font-size: 12px; }
.cenik-parametry dd { margin: 0; color: var(--text); font-size: 12px; font-weight: 650;
                      text-align: right; }
/* `margin-bottom: auto` (ne `top`) — text patří hned pod popis a volné místo má
   zůstat pod ním, ať se dole srovná s tlačítky sousedních karet. Opačně to udělalo
   uprostřed karty prázdnou díru přes třetinu její výšky. */
.cenik-domluva { margin: 0 0 auto; padding-top: 12px; border-top: 1px solid var(--border);
                 color: var(--muted); font-size: 12px; line-height: 1.55; }
.cenik-akce { margin-top: 16px; justify-content: center; text-align: center; }

/* ---- Doplňky: jedna sekce, ne dvě poloviny na opačných koncích stránky ---- */
.cenik-doplnky { margin-top: 26px; }
.cenik-doplnky h2 { margin: 0 0 10px; font-size: 16px; }
.cenik-doplnek { display: flex; flex-wrap: wrap; gap: 18px 24px; align-items: stretch;
                 justify-content: space-between; padding: 18px;
                 border: 1px solid var(--border); border-radius: 12px;
                 background: var(--surface); }
.cenik-doplnek-text { flex: 1 1 340px; }
.cenik-doplnek-hlava { display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
                       margin-bottom: 5px; }
.cenik-doplnek-text b { color: var(--text); font-size: 15px; }
.cenik-doplnek-text span { color: var(--muted); font-size: 12px; line-height: 1.55; }
.cenik-doplnek-stitek { padding: 2px 8px; border-radius: 999px; background: var(--accent-soft);
                        color: var(--accent-strong); font-size: 11px; font-weight: 650; }

/* Rozpis po plánech místo jednoho souvětí: „ve Free 1 …, ve Startu …, od Teamu výš …"
   se muselo číst dvakrát, aby si člověk našel svůj řádek. */
.cenik-doplnek-plany { margin: 10px 0 0; }
.cenik-doplnek-plany > div { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 5px 0;
                             border-top: 1px solid var(--border); }
.cenik-doplnek-plany dt { flex: 0 0 96px; color: var(--text); font-size: 12px; font-weight: 680; }
.cenik-doplnek-plany dd { flex: 1 1 200px; margin: 0; color: var(--muted); font-size: 12px;
                          line-height: 1.5; }

/* Cena vpravo jako samostatný panel — v řádku s textem splývala s popisem. */
.cenik-doplnek-cena { display: flex; flex: 0 0 auto; flex-direction: column;
                      justify-content: center; gap: 2px; min-width: 190px; margin: 0;
                      padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px;
                      background: var(--surface-muted); text-align: right; }
.cenik-doplnek-cena b { color: var(--text); font-size: 22px; font-weight: 820; line-height: 1.15; }
.cenik-doplnek-cena span { color: var(--muted); font-size: 11px; }
.cenik-doplnek-pozn { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border);
                      color: var(--muted); font-size: 11px; line-height: 1.6; }
@media (max-width: 620px) {
  .cenik-doplnek-cena { flex: 1 1 100%; text-align: left; }
}
.cenik-cta { margin: 26px 0 24px; }

/* ---- Doplněk: jeden řádek, ne karta plánu roztažená přes celou šířku ---- */
.doplnek-radek { display: flex; flex-wrap: wrap; gap: 14px; align-items: center;
                 justify-content: space-between; padding: 16px 18px; }
.doplnek-popis { flex: 1 1 260px; }
.doplnek-popis b { display: block; color: var(--text); font-size: 14px; }
.doplnek-cena { color: var(--accent-strong); font-size: 13px; font-weight: 700; }
.doplnek-popis span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.doplnek-stav { display: flex; flex-wrap: wrap; gap: 8px; }
.doplnek-cip { padding: 6px 10px; border: 1px solid var(--border); border-radius: 9px;
               background: var(--surface-muted); color: var(--muted); font-size: 11px; }
.doplnek-cip b { color: var(--text); font-size: 14px; font-weight: 780; }
.doplnek-cip.je-darovany { border-style: dashed; }

/* Panely na sobě lepily. Mezera se dává jen MEZI sourozenci (`+`), takže se nikde
   nezdvojí s existujícím odsazením a stránka s jedním panelem se nezmění. */
.portal-workspace .data-panel + .data-panel,
.portal-workspace section.data-panel + section.data-panel,
.portal-workspace .data-panel + section.data-panel,
.portal-workspace section.data-panel + .data-panel { margin-top: 16px; }

/* Detail agenta: API a MCP jsou dvě cesty k jednomu zdroji, proto sdílejí jeden
   panel a stejný rytmus řádků. Nouzový STOP je viditelný, ale nepřebíjí běžnou
   správu klíčů. */
.mailbox-detail-page .agent-access-card { overflow: visible; }
.agent-access-head { display: flex; gap: 24px; min-height: 90px; padding: 19px 21px;
                     align-items: center; justify-content: space-between;
                     border-bottom: 1px solid var(--border); }
.agent-access-head > div { max-width: 720px; }
.agent-access-head h2 { margin: 2px 0 5px; font-size: 19px; letter-spacing: -.015em; }
.agent-access-head p { margin: 0; line-height: 1.52; }
.agent-access-head form { flex: 0 0 auto; }
.agent-stop-banner { display: flex; gap: 12px; margin: 15px 18px 0; padding: 12px 14px;
                     border: 1px solid color-mix(in srgb, var(--err) 32%, var(--border));
                     border-radius: 11px; background: color-mix(in srgb, var(--err) 7%, var(--surface)); }
.agent-stop-symbol { display: grid; flex: 0 0 28px; width: 28px; height: 28px; place-items: center;
                     border-radius: 8px; color: var(--err); background: color-mix(in srgb, var(--err) 12%, var(--surface));
                     font-size: 11px; font-weight: 800; }
.agent-stop-banner strong { color: var(--text); font-size: 12px; }
.agent-stop-banner p { margin: 2px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.agent-access-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.agent-channel { min-width: 0; padding: 17px 18px 19px; }
.agent-channel + .agent-channel { border-left: 1px solid var(--border); }
.agent-channel-title { display: flex; gap: 16px; min-height: 38px; margin-bottom: 13px;
                       align-items: center; justify-content: space-between; }
.agent-channel-title > div { display: flex; gap: 10px; min-width: 0; align-items: center; }
.agent-channel-title h3 { margin: 0 0 2px; font-size: 13px; }
.agent-channel-title p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.35; }
.agent-channel-mark { display: grid; flex: 0 0 34px; width: 34px; height: 30px; place-items: center;
                      border: 1px solid color-mix(in srgb, var(--accent) 27%, var(--border));
                      border-radius: 8px; color: var(--accent-strong); background: var(--accent-soft);
                      font-size: 9px; font-weight: 800; letter-spacing: .04em; }
.agent-channel-mark.is-mcp { color: #7253a6; border-color: color-mix(in srgb, #7253a6 27%, var(--border));
                             background: color-mix(in srgb, #7253a6 9%, var(--surface)); }
.agent-key-list, .agent-mcp-list { overflow: hidden; border: 1px solid var(--border); border-radius: 11px; }
.agent-key-row { display: grid; grid-template-columns: minmax(125px, .9fr) minmax(185px, 1.25fr) auto;
                 gap: 12px; min-height: 67px; padding: 11px 12px; align-items: center;
                 border-bottom: 1px solid var(--border); background: var(--surface); }
.agent-key-row:last-child { border-bottom: 0; }
.agent-key-row.is-paused { background: color-mix(in srgb, var(--warn-soft) 30%, var(--surface)); }
.agent-key-identity { position: relative; min-width: 0; padding-right: 19px; }
.agent-key-identity strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
                             font-size: 11px; }
.agent-key-identity .key-name-row .key-icon-button { right: 0; }
.agent-key-stats { display: grid; grid-template-columns: 62px minmax(86px, 1fr) 58px;
                   gap: 8px; margin: 0; }
.agent-key-stats div { min-width: 0; }
.agent-key-stats dt { color: var(--faint); font-size: 8px; font-weight: 750;
                      letter-spacing: .045em; text-transform: uppercase; }
.agent-key-stats dd { overflow: hidden; margin: 2px 0 0; color: var(--text); font-size: 10px;
                      line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.agent-channel-empty { display: grid; gap: 3px; min-height: 67px; padding: 13px 14px; align-content: center;
                       border: 1px dashed var(--border-strong); border-radius: 11px;
                       background: var(--surface-muted); }
.agent-channel-empty strong { font-size: 11px; }
.agent-channel-empty span { color: var(--muted); font-size: 10px; line-height: 1.45; }
.agent-key-archive { margin-top: 10px; border-top: 1px solid var(--border); }
.agent-key-archive > summary { padding: 9px 2px 2px; color: var(--muted); cursor: pointer;
                              font-size: 10px; font-weight: 700; }
.agent-archive-row { display: flex; gap: 10px; min-height: 44px; padding: 8px 2px;
                     align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.agent-archive-row > span { display: grid; grid-template-columns: 8px auto; gap: 2px 6px; min-width: 0; align-items: center; }
.agent-archive-row code { color: var(--muted); font-size: 10px; }
.agent-archive-row small { grid-column: 2; color: var(--faint); font-size: 9px; }
.agent-mcp-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(100px, .75fr) auto;
                 gap: 10px; min-height: 67px; padding: 11px 12px; align-items: center;
                 border-bottom: 1px solid var(--border); }
.agent-mcp-row:last-child { border-bottom: 0; }
.agent-mcp-row > div:first-child { min-width: 0; }
.agent-mcp-row strong { font-size: 11px; }
.agent-mcp-row small { display: block; overflow: hidden; margin: 2px 0 0; color: var(--faint);
                       font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.agent-mcp-scopes span { display: inline-block; margin: 0 3px 3px 0; padding: 2px 5px;
                         border-radius: 5px; color: var(--muted); background: var(--surface-muted);
                         font-size: 8px; font-weight: 700; }
.agent-mcp-scopes small { white-space: normal; }

@media (max-width: 980px) {
  .agent-access-grid { grid-template-columns: 1fr; }
  .agent-channel + .agent-channel { border-top: 1px solid var(--border); border-left: 0; }
}
@media (max-width: 680px) {
  .agent-access-head { align-items: stretch; flex-direction: column; }
  .agent-access-head form, .agent-access-head .btn { width: 100%; }
  .agent-key-row, .agent-mcp-row { grid-template-columns: 1fr auto; }
  .agent-key-stats, .agent-mcp-scopes { grid-column: 1 / -1; grid-row: 2; }
  .agent-key-row > .key-actions, .agent-mcp-row > .key-actions { grid-column: 2; grid-row: 1; }
}

/* Poznámka pod tlačítkem přechodu — vysvětluje, ze se meni bezici predplatne. */
.plan-pozn { display: block; margin-top: 6px; color: var(--muted); font-size: 11px;
             line-height: 1.45; }

/* Hlášky nad stránkou předplatného. Dřív to byl `.workspace-form-note` zabalený do
   `.data-panel`: note má postranní odsazení 24 px pro formulářový panel, takže vznikl
   box v boxu s pruhem kolem dokola a text vypadal uříznutý. Tohle je jeden box. */
.portal-workspace .ucet-hlaska { margin: 0 0 16px; padding: 13px 16px;
                                 border: 1px solid var(--border); border-radius: 12px;
                                 background: var(--surface); color: var(--muted);
                                 font-size: 12.5px; line-height: 1.6; }
.portal-workspace .ucet-hlaska.je-dobra { border-color: var(--accent-strong);
                                          background: var(--accent-soft);
                                          color: var(--text); }

.portal-workspace .ucet-poznamka { margin: 6px 0 0; max-width: 62ch; color: var(--muted);
                                   font-size: 12px; line-height: 1.55; }
