:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --muted2: #94a3b8;
  --line: #e2e8f0;
  --accent: #4f46e5;
  --accent2: #7c3aed;
  --accent-ink: #ffffff;
  --brand-grad: linear-gradient(135deg, #6366f1, #7c3aed);
  --ok: #16a34a;
  --warn: #d97706;
  --err: #dc2626;
  --radius: 10px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); line-height: 1.55; -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { display: block; border-radius: 8px; }
.brand-mark { font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -0.01em; }
.brand-dot { color: var(--accent); }
.brand-sub { font-size: 12px; color: var(--muted2); }
.topnav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.topnav a { color: var(--muted); }
.topnav a:hover { color: var(--ink); }

/* Hamburger — skrytý na desktopu, viditelný na mobilu */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; flex: 0 0 auto; }
.nav-toggle-bar { display: block; width: 20px; height: 2px; margin: 0 auto; border-radius: 2px;
  background: var(--ink); transition: transform .2s ease, opacity .2s ease; }

@media (max-width: 640px){
  .topbar { flex-wrap: wrap; padding: 12px 16px; }
  .nav-toggle { display: flex; }
  .topnav { display: none; flex-direction: column; align-items: stretch; width: 100%;
    gap: 0; margin-top: 10px; border-top: 1px solid var(--line); }
  .topbar.nav-open .topnav { display: flex; }
  .topnav a, .topnav .linklike { display: block; width: 100%; text-align: left;
    padding: 13px 4px; font-size: 16px; border-bottom: 1px solid var(--line); color: var(--ink); }
  .topnav .inline { display: block; width: 100%; }
  /* hamburger → křížek při otevřeném menu */
  .topbar.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topbar.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .topbar.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}
.inline { display: inline; margin: 0; }
.linklike { background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; padding: 0; }
.linklike:hover { color: var(--err); }

.wrap { max-width: 880px; margin: 28px auto; padding: 0 24px; }
.foot { text-align: center; color: var(--muted2); font-size: 12px; padding: 32px 20px; line-height: 1.6; }
.foot p { margin: 0 0 4px; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin: 8px 0; }
.foot-links a { white-space: nowrap; }
.foot-credit { margin-top: 8px; }
@media (max-width: 640px){ .foot { padding: 28px 16px; } }

.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; margin-bottom: 20px;
}
h1 { font-size: 24px; margin: 0 0 6px; }
h2 { font-size: 18px; margin: 24px 0 10px; }
.lead { color: var(--muted); margin: 0 0 20px; }
.hint { color: var(--muted); font-size: 13px; }

.btn {
  display: inline-block; font: inherit; font-weight: 600; font-size: 14px;
  padding: 11px 20px; border-radius: 8px; border: 1px solid transparent;
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn-ghost { background: var(--panel); color: var(--ink); border-color: var(--line); }
.btn-ok { background: var(--ok); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

label { display: block; font-size: 13px; font-weight: 600; margin: 14px 0 4px; }
input[type=text], input[type=email], input[type=date], input[type=number], select, .field {
  width: 100%; font: inherit; font-size: 14px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus { outline: 2px solid var(--accent); border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px){ .grid2 { grid-template-columns: 1fr; } }
.errlist { color: var(--err); font-size: 13px; margin: 4px 0 0; }

.messages { margin-bottom: 18px; }
.msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 8px; font-size: 14px; }
.msg-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.msg-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.msg-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

.auth-wrap { min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; }

table.emp { width: 100%; border-collapse: collapse; }
table.emp th, table.emp td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; }
table.emp th { color: var(--muted); font-weight: 600; }

/* Mobil: tabulka zaměstnanců jako stacked karty, aby se všechny sloupce
   (vč. „V evidenci" a akcí) vešly na šířku a nezůstaly za okrajem obrazovky. */
@media (max-width: 640px){
  table.emp thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  table.emp, table.emp tbody, table.emp tr, table.emp td { display: block; width: 100%; }
  table.emp tr { border: 1px solid var(--line); border-radius: 10px; padding: 6px 4px; margin-bottom: 14px; background: #fff; }
  table.emp tr:last-child { margin-bottom: 0; }
  table.emp td { border-bottom: 1px solid var(--line); padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
  table.emp tr td:last-child { border-bottom: 0; }
  table.emp td::before { content: attr(data-label); font-size: 12px; font-weight: 600; color: var(--muted); flex: 0 0 auto; }
  table.emp td.row-actions { justify-content: flex-end; }
  table.emp .active-select { min-width: 0; }
}

.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-koncept { background: #f1f5f9; color: var(--muted); }
.badge-overeno { background: #eff6ff; color: #1e40af; }
.badge-xml { background: #fef9c3; color: #854d0e; }
.badge-odeslano { background: #ecfdf5; color: #065f46; }

.status-ok { color: var(--ok); }
.status-bad { color: var(--err); }
.callout { background: #fffbeb; border: 1px solid #fde68a; color: #854d0e; padding: 14px 16px; border-radius: 8px; font-size: 13px; }

/* Navigační notice u pole VS: navede zaměstnavatele na registraci u ČSSZ */
.reg-notice { grid-column: 1 / -1; margin: 14px 0 4px; padding: 18px 20px; border: 1px solid #ddd6fe; border-left: 4px solid var(--accent); border-radius: 10px; background: linear-gradient(135deg, #f5f3ff, #eef2ff); }
.reg-notice--compact { padding: 16px 18px; background: #fafaff; }
.reg-notice--compact h3 { font-size: 15px; }
.reg-notice-badge { display: inline-block; margin-bottom: 8px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: .01em; background: var(--accent); color: var(--accent-ink); }
.reg-notice h3 { margin: 0 0 8px; font-size: 16px; color: var(--ink); line-height: 1.35; border: 0; padding: 0; }
.reg-notice p { margin: 0 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.reg-notice .btn { text-decoration: none; }
.reg-notice-after { display: block; margin-top: 10px; font-size: 12px; color: var(--muted2); line-height: 1.5; }
.steps { padding-left: 20px; }
.steps li { margin: 8px 0; }
.ds-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; background:#f1f5f9; padding:2px 8px; border-radius:6px; }
#validate-result .errlist { background:#fef2f2; border:1px solid #fecaca; border-radius:8px; padding:10px 14px; }
.save-flag { font-size: 12px; color: var(--muted2); margin-left: 10px; }

.check-line { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; cursor: pointer; margin: 6px 0 0; }
.check-line input[type=checkbox] { width: auto; margin: 0; }
.fld { margin-bottom: 4px; }
.req { color: var(--err); font-weight: 700; }
h2 { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
details.adv { margin-top: 18px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 14px; background: #fafbfc; }
details.adv > summary { cursor: pointer; font-weight: 600; padding: 10px 0; color: var(--muted); }
details.adv[open] > summary { color: var(--ink); margin-bottom: 8px; }
select.field, select { width: 100%; font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); }
.fld .hint { margin-bottom: 2px; }

.fld.ac { position: relative; }
.ac-list { display: none; position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 28px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; }
.ac-item { padding: 9px 12px; font-size: 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.ac-item:last-child { border-bottom: 0; }
.ac-item:hover { background: #eff6ff; }

/* handoff — krokový layout */
.krok { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-top: 1px solid var(--line); }
.krok:first-of-type { border-top: 0; }
.krok-num { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.krok-body { flex: 1; min-width: 0; }
.krok-body h2 { margin: 4px 0 10px; border: 0; padding: 0; font-size: 17px; }
.cesty { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
@media (max-width: 640px){ .cesty { grid-template-columns: 1fr; } }
.cesta { border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; background: #fff; display: flex; flex-direction: column; }
.cesta.doporuceno { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: #f5f9ff; }
.cesta h3 { margin: 6px 0 6px; font-size: 16px; }
.cesta p { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.cesta .btn { margin-top: auto; text-align: center; }
.cesta-tag { display: inline-block; align-self: flex-start; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.cesta-tip { margin: 10px 0 0 !important; font-size: 12.5px; color: var(--muted2) !important; }
.cesta-tip strong { color: var(--ink); }

.row-actions { display: flex; gap: 14px; align-items: center; white-space: nowrap; }
.linklike.danger { color: var(--err); }
.linklike.danger:hover { text-decoration: underline; }
.manage-row { display: flex; gap: 20px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }

/* platby */
.status-ok-box, .status-bad-box { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 10px; margin-bottom: 18px; font-size: 14px; }
.status-ok-box { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.status-bad-box { background: #fffbeb; border: 1px solid #fde68a; color: #854d0e; }
.status-dot { flex: 0 0 auto; width: 12px; height: 12px; border-radius: 50%; }
.status-dot.ok { background: var(--ok); }
.status-dot.bad { background: var(--warn); }
.pay-toggle { display: flex; gap: 12px; margin: 8px 0 20px; }
.pay-opt { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 2px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; font: inherit; text-align: left; }
.pay-opt.active { border-color: var(--accent); background: #f5f9ff; }
.pay-opt .pay-amt { font-size: 22px; font-weight: 800; color: var(--ink); }
.pay-opt .pay-note { font-size: 12px; color: var(--muted); }
.pay-grid { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
@media (max-width: 600px){ .pay-grid { grid-template-columns: 1fr; } }
.pay-qr svg { width: 190px; height: 190px; }
.pay-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pay-row span { color: var(--muted); }
.pay-row .vs { font-family: ui-monospace, monospace; font-size: 16px; }
.pay-detail .btn { margin-top: 14px; }
.pay-tip { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 4px; padding: 13px 15px; background: #f5f9ff; border: 1px solid #bfdbfe; border-radius: 10px; font-size: 13.5px; color: #1e3a8a; }
.pay-tip-ic { flex: 0 0 auto; font-size: 18px; line-height: 1.3; }
.pay-tip strong { color: var(--ink); }
.pay-tip .vs-inline { font-family: ui-monospace, monospace; background: #fff; border: 1px solid #bfdbfe; padding: 0 6px; border-radius: 5px; }

/* zaměstnanec — sbalitelné sekce + živá kontrola povinných polí */
.success-box { display: flex; gap: 12px; align-items: flex-start; padding: 15px 17px; margin-bottom: 16px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 10px; color: #065f46; font-size: 14px; }
.success-box .success-ic { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.success-box a { color: #047857; font-weight: 700; }

.fill-status { padding: 11px 15px; border-radius: 9px; font-size: 14px; margin-bottom: 18px; }
.fill-status.todo { background: #fffbeb; border: 1px solid #fde68a; color: #854d0e; }
.fill-status.done { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.hl-red { color: var(--err); font-weight: 700; }

details.sec { border: 1px solid var(--line); border-radius: 10px; margin: 12px 0; background: #fff; overflow: visible; }
details.sec > summary { cursor: pointer; font-size: 17px; font-weight: 700; padding: 14px 18px; display: flex; align-items: center; gap: 10px; list-style: none; }
details.sec > summary::-webkit-details-marker { display: none; }
details.sec > summary::before { content: "▸"; color: var(--muted2); font-size: 13px; transition: transform .15s; }
details.sec[open] > summary::before { transform: rotate(90deg); }
details.sec[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 6px; }
details.sec > .grid2, details.sec > p, details.sec > .hint { padding: 0 18px; }
details.sec[open] { padding-bottom: 14px; }
details.sec.sec-done > summary { color: var(--muted); }
.sec-chip { margin-left: auto; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.sec-chip.chip-done { background: #ecfdf5; color: #065f46; }
.sec-chip.chip-todo { background: #fffbeb; color: #b45309; }
details.sec.sec-jmhz { border-color: #bfdbfe; }
details.sec.sec-jmhz[open] { box-shadow: 0 0 0 2px #bfdbfe; }
details.sec.sec-jmhz > summary { color: #1e40af; }

.fld.fld-missing input, .fld.fld-missing select { border-color: var(--err); background: #fff7f7; }
.fld.fld-missing input:focus, .fld.fld-missing select:focus { outline-color: var(--err); }
.fld.fld-missing > label { color: var(--err); }

/* modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal { background: var(--panel); border-radius: 12px; padding: 24px 26px; max-width: 440px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h3 { margin: 0 0 8px; font-size: 18px; }
.modal p { margin: 0; color: var(--muted); font-size: 14px; }

/* aktivní/neaktivní select v seznamu */
.active-select { width: auto; min-width: 150px; padding: 7px 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
tr.row-inactive td:nth-child(-n+3) { opacity: .55; }

/* ===== Branding / tlačítka ===== */
.btn-lg { padding: 14px 26px; font-size: 15px; border-radius: 10px; }

/* ===== Veřejná landing ===== */
main.landing { width: 100%; margin: 0; padding: 0; overflow-x: hidden; }
.lp-inner { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
.lp-h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; text-align: center; margin: 0 0 8px; border: 0; padding: 0; }
.lp-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 26px; font-size: 16px; }
.lp-sub.small { font-size: 13.5px; margin-top: 22px; }

/* hero */
.lp-hero { position: relative; overflow: hidden; padding: 64px 0 48px;
  background:
    radial-gradient(60% 60% at 15% 0%, #eef2ff 0%, rgba(238,242,255,0) 60%),
    radial-gradient(50% 60% at 100% 10%, #f3e8ff 0%, rgba(243,232,255,0) 55%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%); }
.lp-hero-inner { text-align: center; }
.lp-badge { display: inline-block; max-width: 100%; white-space: normal; font-size: 12.5px; font-weight: 700;
  color: var(--accent); background: #fff; border: 1px solid #e0e7ff;
  padding: 7px 16px; border-radius: 999px; margin-bottom: 24px; box-shadow: 0 2px 10px rgba(79,70,229,.08); }
.lp-title { font-size: 50px; line-height: 1.06; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 18px; overflow-wrap: break-word; }
.lp-title .grad { background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-lead { max-width: 600px; margin: 0 auto 30px; font-size: 18px; color: var(--muted); line-height: 1.6; }
.lp-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.lp-note { margin-top: 18px; font-size: 13px; color: var(--muted2); }
@media (max-width: 640px){ .lp-title { font-size: 32px; } .lp-lead { font-size: 16px; } .lp-hero { padding: 44px 0 36px; } }
@media (max-width: 410px){ .lp-title { font-size: 27px; } }

/* hero preview card */
.lp-preview { max-width: 520px; margin: 44px auto 0; background: #fff; border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 30px 60px -28px rgba(30,27,75,.35); overflow: hidden; text-align: left; }
.lp-prev-head { display: flex; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafbff; }
.lp-dot { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; }
.lp-prev-body { padding: 10px 16px 16px; }
.lp-prev-row { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 2px; border-bottom: 1px solid var(--line); font-size: 14.5px; font-weight: 600; }
.lp-prev-row:last-child { border-bottom: 0; }
.lp-prev-row.muted { color: var(--muted); font-weight: 500; }
.lp-prev-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-prev-row .lp-pill-ok, .lp-prev-row .lp-pill-soft { flex: 0 0 auto; }
.lp-pill-ok { font-size: 12px; font-weight: 700; color: #065f46; background: #ecfdf5; border-radius: 999px; padding: 3px 11px; }
.lp-pill-soft { font-size: 12px; font-weight: 700; color: var(--accent); background: #eef2ff; border-radius: 999px; padding: 3px 11px; }

/* free band */
.lp-free { margin: 48px 0; }
.lp-free-inner { display: flex; gap: 20px; align-items: center;
  background: linear-gradient(135deg, #ecfdf5, #eef2ff); border: 1px solid #c7f0dd;
  border-radius: 20px; padding: 28px 32px; }
.lp-free-emoji { font-size: 40px; flex: 0 0 auto; }
.lp-free h2 { font-size: 23px; font-weight: 800; margin: 0 0 6px; border: 0; padding: 0; letter-spacing: -0.01em; }
.lp-free p { margin: 0; color: #334155; font-size: 15px; }
@media (max-width: 560px){ .lp-free-inner { flex-direction: column; text-align: center; } }

/* features */
.lp-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 18px; margin: 0 auto 56px; }
.feat { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px; transition: box-shadow .15s, transform .15s; }
.feat:hover { box-shadow: 0 18px 40px -24px rgba(30,27,75,.3); transform: translateY(-2px); }
.feat-ic { font-size: 26px; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center;
  background: #eef2ff; border-radius: 14px; margin-bottom: 16px; }
.feat h3 { margin: 0 0 8px; font-size: 17px; }
.feat p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }

/* how */
.lp-how { margin: 0 auto 56px; }
.steps-big { list-style: none; padding: 0; margin: 18px auto 0; max-width: 760px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 22px 32px; }
.steps-big li { display: flex; gap: 16px; align-items: flex-start; }
.step-n { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; background: var(--brand-grad);
  color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.steps-big strong { font-size: 15.5px; } .steps-big div { font-size: 14px; color: var(--muted); }
.steps-big strong { color: var(--ink); }

/* pricing */
.lp-pricing { margin: 0 auto 56px; }
.lp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; max-width: 820px; margin: 8px auto 0; }
.lp-plan { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px 26px; display: flex; flex-direction: column; }
.lp-plan-hi { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 24px 50px -30px rgba(79,70,229,.5); }
.lp-plan-tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); background: #f1f5f9; padding: 4px 12px; border-radius: 999px; margin-bottom: 16px; }
.lp-plan-tag.hi { color: #fff; background: var(--brand-grad); }
.lp-price { font-size: 38px; font-weight: 800; letter-spacing: -0.02em; }
.lp-price span { font-size: 15px; font-weight: 600; color: var(--muted2); margin-left: 6px; }
.lp-plan-desc { color: var(--muted); font-size: 14.5px; margin: 6px 0 16px; }
.lp-check { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 10px; }
.lp-check li { position: relative; padding-left: 28px; font-size: 14.5px; }
.lp-check li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 19px; height: 19px;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800;
  color: #fff; background: var(--ok); border-radius: 50%; }
.lp-plan-cta { margin-top: auto; text-align: center; }

/* faq */
.lp-faq { margin: 0 auto 56px; max-width: 760px; }
.lp-q { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin: 10px 0; padding: 2px 18px; }
.lp-q > summary { cursor: pointer; font-weight: 700; padding: 16px 0; font-size: 15.5px; list-style: none; }
.lp-q > summary::-webkit-details-marker { display: none; }
.lp-q > summary::after { content: "+"; float: right; color: var(--accent); font-weight: 800; font-size: 20px; line-height: 1; }
.lp-q[open] > summary::after { content: "−"; }
.lp-q p { margin: 0 0 16px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }

/* závěrečné CTA */
.lp-cta-band { background: var(--brand-grad); color: #fff; text-align: center; padding: 56px 24px; margin-bottom: 0; }
.lp-cta-band h2 { font-size: 30px; font-weight: 800; margin: 0 0 10px; border: 0; padding: 0; color: #fff; letter-spacing: -0.02em; }
.lp-cta-band p { margin: 0 0 24px; font-size: 16px; opacity: .92; }
.lp-cta-btn { background: #fff; color: var(--accent); }
.lp-cta-btn:hover { filter: none; background: #f5f3ff; }

.trust { text-align: center; color: var(--muted); font-size: 14px; padding: 28px 24px 40px; }

/* ===== Impersonace (admin „přihlášen jako zákazník") ===== */
.imp-banner { position: sticky; top: 0; z-index: 1200; display: flex; align-items: center;
  justify-content: center; flex-wrap: wrap; gap: 10px 18px; padding: 10px 20px;
  background: var(--warn); color: #fff; font-size: 14px; line-height: 1.35;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18); }
.imp-banner-txt { font-weight: 500; }
.imp-banner-admin { opacity: .85; font-size: 13px; }
.imp-banner-btn { background: #fff; color: var(--warn); border: 0; border-radius: 8px;
  padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer; }
.imp-banner-btn:hover { background: #fff7ed; }

/* ===== Admin CRM ===== */
body.admin { background: #f6f7fb; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: var(--panel); border-bottom: 1px solid var(--line); }
.admin-tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: #fff; background: var(--brand-grad); padding: 2px 8px; border-radius: 6px; margin-left: 8px; vertical-align: middle; }
.admin-nav { display: flex; align-items: center; gap: 18px; font-size: 14px; }
.admin-nav a { color: var(--muted); }
.admin-nav a:hover { color: var(--ink); }
.admin-who { color: var(--muted2); font-size: 13px; }
.admin-wrap { max-width: 1280px; margin: 26px auto; padding: 0 28px; }
.admin-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.admin-head h1 { margin: 0; }
.admin-head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }

.kpi-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 760px){ .kpi-band { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.kpi-n { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.kpi-l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.admin-filter { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-filter input[type=search] { flex: 1; min-width: 220px; }
.admin-filter select { width: auto; }

.admin-table-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table thead th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); background: #fafbff; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #fafbff; }
.admin-table .num { text-align: right; }
/* Dlouhé hodnoty (název firmy, e-mail) smí zalomit → řádek nenutí horizontální scroll. */
.admin-table td.wrap { white-space: normal; overflow-wrap: anywhere; }
.admin-table .empty { text-align: center; color: var(--muted2); padding: 28px; }
.firma-link { font-weight: 600; }
.invoice-number { display: inline-flex; align-items: center; gap: 8px; }
.invoice-paid-dot { flex: 0 0 auto; width: 10px; height: 10px; border-radius: 50%; }
.invoice-paid-dot.ok { background: var(--ok); }
.invoice-paid-dot.bad { background: var(--warn); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.small { font-size: 12.5px; color: var(--muted); }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.pill-ok { background: #ecfdf5; color: #065f46; }
.pill-bad { background: #fef2f2; color: #991b1b; }
.pill-warn { background: #fffbeb; color: #92400e; }
.pill-muted { background: #f1f5f9; color: var(--muted); }
.pill-sub { font-size: 12px; color: var(--muted2); margin-left: 6px; }

.admin-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 760px){ .admin-cards { grid-template-columns: 1fr; } }
.admin-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin-bottom: 16px; }
.admin-card h3 { margin: 0 0 12px; font-size: 15px; }
.admin-card .admin-table { margin: 0 -6px; }
dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

/* --- „Nahlásit chybu" modal + drobnosti --------------------------------- */
.handoff-help { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.hint-inline { color: var(--muted2); font-weight: 400; font-size: 12px; }
.br-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.br-modal[hidden] { display: none; }
.br-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.55); }
.br-dialog { position: relative; background: var(--panel); border-radius: var(--radius); border: 1px solid var(--line);
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; padding: 24px; box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25); }
.br-dialog h2 { margin: 0 0 6px; font-size: 19px; }
.br-lead { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.br-x { position: absolute; top: 10px; right: 12px; background: none; border: 0; font-size: 24px; line-height: 1; color: var(--muted2); cursor: pointer; }
.br-x:hover { color: var(--ink); }
.br-l { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 4px; }
.br-opt { color: var(--muted2); font-weight: 400; font-size: 12px; }
.br-i { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; }
textarea.br-i { resize: vertical; }
.br-msg { font-size: 13px; margin: 12px 0 0; min-height: 18px; }
.br-msg.br-ok { color: var(--ok); }
.br-msg.br-err { color: var(--err); }
.br-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* --- Formulář zaměstnance: kopírování, presety, vylepšený našeptávač (regzec-ux) --- */
.copy-from { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
  background: #f5f3ff; border: 1px solid #ddd6fe; border-radius: 10px; padding: 12px 16px; margin: 0 0 18px; }
.copy-from label { font-weight: 700; font-size: 14px; color: #5b21b6; }
.copy-from select { min-width: 220px; }
.copy-from .hint { flex-basis: 100%; margin: 0; }
.copy-from.copied { border-color: var(--ok); background: #ecfdf5; transition: background .3s; }

.fld-wide { grid-column: 1 / -1; }
.hint-inline { font-weight: 400; color: var(--muted); font-size: 12px; }
.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 999px;
  padding: 5px 12px; font-size: 13px; cursor: pointer; transition: all .12s; }
.chip:hover { border-color: var(--accent); background: #eff6ff; }
.chip.chip-on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* našeptávač — dropdown kotvený TĚSNĚ pod input (přes .ac-anchor), ne pod celé pole
   (dřív .ac-list top:100% počítal od .fld vč. hintu → velká mezera pod inputem) */
.ac-anchor { position: relative; display: block; }
/* našeptávač — dvousloupcový řádek, klávesnice, zvýraznění, stavy */
.ac-list.open { display: block; }
.ac-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ac-item .ac-name { flex: 1; min-width: 0; }
.ac-item .ac-name mark { background: #fde68a; color: inherit; padding: 0 1px; border-radius: 2px; }
.ac-item .ac-code { color: var(--muted2); font-size: 12px; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ac-item.active, .ac-item.active:hover { background: var(--accent); color: #fff; }
.ac-item.active .ac-code { color: #e0e7ff; }
.ac-load, .ac-none { padding: 9px 12px; font-size: 13px; color: var(--muted); }

/* --- Hromadné přednahlášení (dashboard výběr + handoff) --- */
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 16px;
  padding: 12px 14px; background: #f0f9ff; border: 1px solid #bae6fd; border-radius: 10px; }
.bulk-bar[hidden] { display: none; }  /* explicitní display přebíjí UA hidden → guard */
.bulk-count { font-weight: 700; color: #075985; }
.bulk-hint { font-size: 12px; color: var(--muted); flex: 1 1 220px; }
table.emp th.col-check, table.emp td.col-check { width: 34px; text-align: center; }
table.emp .emp-check, #check-all { width: 18px; height: 18px; cursor: pointer; accent-color: var(--accent); }
.callout-warn { background: #fff7ed; border-color: #fed7aa; color: #9a3412; }
.bulk-people { list-style: none; padding: 0; margin: 8px 0 4px; display: flex; flex-wrap: wrap; gap: 8px 14px; }
.bulk-people li { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.bulk-skipped { margin: 8px 0 0; padding-left: 18px; }
.bulk-skipped li { margin: 4px 0; }
@media (max-width: 640px){
  .bulk-bar { position: sticky; top: 8px; z-index: 5; }
  table.emp td.col-check { justify-content: flex-start; }
}

/* --- Pozvánka pro zaměstnance (self-prefill) --- */
.copy-row { display: flex; gap: 8px; align-items: stretch; margin: 8px 0 4px; }
.copy-row input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.copy-row .btn { white-space: nowrap; }
.callout-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 12px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
.pill-wait { background: #fef3c7; color: #92400e; }
.pill-ok { background: #d1fae5; color: #065f46; }
@media (max-width: 640px){ .copy-row { flex-direction: column; } }

/* --- OCR předvyplnění z fotky občanky --- */
.ocr-panel { margin: 0 0 18px; padding: 14px 16px; border: 1px solid #ddd6fe; border-left: 4px solid var(--accent);
  border-radius: 10px; background: linear-gradient(135deg, #f5f3ff, #eef2ff); }
.ocr-head { font-weight: 700; margin-bottom: 10px; }
.ocr-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.ocr-status { margin-top: 10px; font-size: 14px; color: #4338ca; font-weight: 600; }
.ocr-qr { margin-top: 12px; text-align: center; }
.ocr-qr img { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 6px; }
@media (max-width: 640px){ .ocr-actions .btn { flex: 1 1 100%; text-align: center; } }

/* --- Online manuály ------------------------------------------------------- */
.manual-wrap { max-width: 1180px; margin: 28px auto; padding: 0 24px; }
.manual-home-head,
.manual-detail-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  margin-bottom: 20px;
}
.manual-home-head h1,
.manual-detail-head h1 { max-width: 780px; font-size: 30px; line-height: 1.18; margin-bottom: 10px; }
.manual-eyebrow { margin: 0 0 8px; color: #0369a1; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.manual-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 0 0 20px; }
.manual-flow-step {
  display: grid; grid-template-columns: 38px 1fr; gap: 3px 12px; align-items: center;
  min-height: 86px; padding: 14px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; color: var(--ink);
}
.manual-flow-step:hover { text-decoration: none; border-color: #93c5fd; background: #f8fbff; }
.manual-flow-step span {
  grid-row: 1 / span 2; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #e0f2fe; color: #075985; font-weight: 800;
}
.manual-flow-step strong { font-size: 14px; }
.manual-flow-step small { color: var(--muted); font-size: 12px; }
.manual-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.manual-card-link { color: inherit; }
.manual-card-link:hover { text-decoration: none; }
.manual-card {
  height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 18px; display: flex; flex-direction: column; gap: 10px;
}
.manual-card:hover { border-color: #38bdf8; box-shadow: 0 14px 34px rgba(15, 23, 42, .08); }
.manual-card h2 { margin: 0; padding: 0; border: 0; font-size: 17px; line-height: 1.3; }
.manual-card p { margin: 0; color: var(--muted); font-size: 14px; }
.manual-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.manual-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 999px; background: #ecfdf5; color: #047857; font-size: 12px; font-weight: 800; }
.manual-time { color: var(--muted2); font-size: 12px; font-weight: 700; }
.manual-more { margin-top: auto; color: var(--accent); font-weight: 700; font-size: 13px; }
.manual-bottom-band {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 18px; padding: 18px 20px; border: 1px solid #fed7aa; border-radius: 8px;
  background: #fff7ed;
}
.manual-bottom-band h2 { margin: 0 0 4px; padding: 0; border: 0; font-size: 17px; }
.manual-bottom-band p { margin: 0; color: #7c2d12; font-size: 14px; }
.manual-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.manual-tabs a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 7px 12px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: #fff;
  font-size: 13px; font-weight: 700;
}
.manual-tabs a[aria-current="page"] { color: #075985; border-color: #7dd3fc; background: #e0f2fe; }
.manual-tabs a:hover { text-decoration: none; color: var(--ink); }
.manual-alert {
  flex: 0 0 360px; padding: 16px 18px; border-radius: 8px; border: 1px solid #fde68a;
  background: #fffbeb; color: #78350f;
}
.manual-alert strong { display: block; margin-bottom: 4px; color: #92400e; }
.manual-alert p { margin: 0; font-size: 14px; }
.manual-copy-panel {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px; padding: 13px 14px;
  border: 1px solid #bae6fd; border-radius: 8px; background: #f0f9ff;
}
.manual-copy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.manual-copy-grid .manual-copy-panel { margin-bottom: 0; }
.manual-copy-panel span { color: #075985; font-size: 13px; font-weight: 800; }
.manual-copy-panel code { padding: 4px 8px; border-radius: 6px; background: #fff; border: 1px solid #bae6fd; color: var(--ink); font-size: 16px; font-weight: 800; }
.manual-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.manual-main, .manual-side { display: grid; gap: 16px; }
.manual-section {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px;
}
.manual-section h2 { margin: 0 0 14px; padding: 0 0 9px; font-size: 18px; }
.manual-section h3 { margin: 0 0 9px; font-size: 15px; }
.manual-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.manual-fact { padding: 14px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; }
.manual-fact strong { display: block; color: #1e3a8a; margin-bottom: 5px; }
.manual-fact p { margin: 0; color: #334155; font-size: 14px; line-height: 1.5; }
.manual-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; counter-reset: manual-step; }
.manual-steps li { margin: 0; }
.manual-step-check {
  display: grid; grid-template-columns: 22px 36px 1fr; gap: 12px; align-items: flex-start;
  margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff;
  cursor: pointer;
}
.manual-step-check input { width: 18px; height: 18px; margin: 8px 0 0; accent-color: var(--ok); }
.manual-step-num {
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-weight: 800;
}
.manual-step-check strong { display: block; color: var(--ink); font-size: 15px; }
.manual-step-check em { display: block; margin-top: 3px; color: var(--muted); font-style: normal; font-size: 14px; }
.manual-step-check a { display: inline-block; margin-top: 7px; font-size: 13px; font-weight: 700; }
.manual-check-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.manual-check-group { border: 1px solid var(--line); border-radius: 8px; padding: 14px; background: #fff; }
.manual-check-item { display: flex; gap: 9px; align-items: flex-start; margin: 8px 0; color: var(--muted); font-size: 14px; line-height: 1.45; cursor: pointer; }
.manual-check-item input { flex: 0 0 auto; margin-top: 2px; accent-color: var(--ok); }
.manual-mistakes { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.manual-mistakes li { position: relative; padding-left: 22px; color: #7f1d1d; font-size: 14px; }
.manual-mistakes li::before { content: "!"; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; border-radius: 50%; background: #fee2e2; color: #b91c1c; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; }
.manual-screens { display: grid; gap: 12px; }
.manual-screen {
  margin: 0; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; background: #fff;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .08);
}
.manual-screen-bar {
  display: flex; align-items: center; gap: 5px; padding: 8px 10px; background: #f1f5f9; border-bottom: 1px solid var(--line);
}
.manual-screen-bar span { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.manual-screen-bar strong { margin-left: 5px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; }
.manual-screen figcaption { padding: 13px 14px 0; font-weight: 800; }
.manual-screen-img { display: block; width: calc(100% - 28px); margin: 12px 14px 0; border: 1px solid var(--line); border-radius: 7px; background: #fff; object-fit: cover; }
.manual-screen-body { display: grid; gap: 8px; padding: 12px 14px; }
.manual-screen-row { padding: 10px 12px; border: 1px solid #dbeafe; border-radius: 7px; background: #eff6ff; color: #1e3a8a; font-size: 13px; font-weight: 700; }
.manual-screen p { margin: 0; padding: 0 14px 14px; color: var(--muted); font-size: 12px; }
.manual-screen-danger { border-color: #fecaca; }
.manual-screen-danger .manual-screen-row { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.manual-sources ul { margin: 0; padding-left: 18px; }
.manual-sources li { margin: 7px 0; font-size: 13px; overflow-wrap: anywhere; }

/* --- AI chat -------------------------------------------------------------- */
.ai-chat { position: fixed; right: 22px; bottom: 22px; z-index: 900; font-family: var(--font); }
.ai-chat-bubble {
  display: flex; align-items: center; gap: 9px; min-height: 48px; padding: 8px 14px 8px 8px;
  border: 1px solid #1d4ed8; border-radius: 999px; background: #1d4ed8; color: #fff;
  font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 14px 32px rgba(30, 64, 175, .28);
}
.ai-chat-mark {
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #fff; color: #1d4ed8; font-size: 12px; font-weight: 900;
}
.ai-chat-panel {
  position: absolute; right: 0; bottom: 60px; width: min(380px, calc(100vw - 32px));
  height: min(640px, calc(100dvh - 110px)); max-height: min(640px, calc(100vh - 110px));
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 8px;
  background: #fff; box-shadow: 0 22px 70px rgba(15, 23, 42, .24);
}
.ai-chat-panel[hidden] { display: none; }
.ai-chat-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 13px 14px; background: #0f172a; color: #fff;
}
.ai-chat-head strong { display: block; font-size: 14px; }
.ai-chat-head span { display: block; color: #cbd5e1; font-size: 12px; }
.ai-chat-close { border: 0; background: transparent; color: #fff; font: inherit; font-size: 24px; line-height: 1; cursor: pointer; }
.ai-chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; background: #f8fafc; display: flex; flex-direction: column; gap: 10px; }
.ai-msg { max-width: 88%; padding: 10px 12px; border-radius: 8px; white-space: pre-wrap; font-size: 13px; line-height: 1.45; }
.ai-msg-bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); color: var(--ink); }
.ai-msg-user { align-self: flex-end; background: #dbeafe; color: #1e3a8a; }
.ai-chat-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.ai-chat-form textarea {
  resize: none; min-height: 46px; max-height: 110px; padding: 10px 11px; border: 1px solid var(--line);
  border-radius: 8px; font: inherit; font-size: 13px; line-height: 1.35;
}
.ai-chat-send { border: 0; border-radius: 8px; background: var(--ok); color: #fff; padding: 0 13px; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.ai-chat-form.is-loading .ai-chat-send { opacity: .65; pointer-events: none; }

@media (max-width: 900px) {
  .manual-home-head, .manual-detail-head { flex-direction: column; }
  .manual-alert { flex-basis: auto; width: 100%; }
  .manual-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .manual-wrap { margin: 20px auto; padding: 0 16px; }
  .manual-home-head h1, .manual-detail-head h1 { font-size: 25px; }
  .manual-flow, .manual-grid, .manual-check-groups { grid-template-columns: 1fr; }
  .manual-bottom-band, .manual-copy-panel { flex-direction: column; align-items: stretch; }
  .manual-copy-grid, .manual-facts { grid-template-columns: 1fr; }
  .manual-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .manual-tabs a { flex: 0 0 auto; }
  .manual-step-check { grid-template-columns: 20px 32px 1fr; padding: 12px; gap: 9px; }
  .manual-step-num { width: 30px; height: 30px; }
  .ai-chat { right: 14px; bottom: 14px; }
  .ai-chat-label { display: none; }
  .ai-chat-panel { right: 0; bottom: 56px; width: calc(100vw - 28px); height: min(560px, calc(100dvh - 86px)); }
}
@media print {
  .topbar, .foot, .manual-tabs, .btn, .ai-chat { display: none !important; }
  .manual-wrap { max-width: none; margin: 0; padding: 0; }
  .manual-detail-grid { display: block; }
  .manual-section, .manual-alert, .manual-copy-panel { break-inside: avoid; box-shadow: none; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 11px; color: #64748b; }
}
