/* ============================================================
   Podpisuj.cz - styly
   ============================================================ */

:root {
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-light: rgba(29, 78, 216, 0.08);

    --success: #16a34a;
    --success-bg: rgba(22, 163, 74, 0.08);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.06);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);

    --bg: #f8fafc;
    --card: #fff;
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    --text: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-lg: 0 10px 32px rgba(0,0,0,.14);
    --topbar-h: 56px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    overflow-x: clip;
    background: var(--bg) linear-gradient(180deg, #eaeff5, rgba(248, 250, 252, 0) 360px) no-repeat;
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.55;
}

a { color: var(--primary); }

/* ---------- Topbar ---------- */

.topbar {
    position: sticky; top: 0; z-index: 50;
    height: var(--topbar-h);
    background: var(--card);
    border-bottom: 1px solid var(--border);
}
.topbar-inner {
    max-width: 1280px; margin: 0 auto; height: 100%;
    padding: 0 18px;
    display: flex; align-items: center; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; flex: 0 0 auto; }
.brand-badge {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    overflow: hidden; flex: 0 0 auto;
    box-shadow: 0 2px 6px rgba(29, 78, 216, .35);
}
.brand-badge img { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-title { font-weight: 800; font-size: 15px; }
.brand-sub { font-size: 11px; color: var(--text-muted); font-weight: 600; letter-spacing: .4px; }
.topbar-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-user { font-size: 13px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.topbar-logout, .topbar-link { font-size: 13px; font-weight: 600; text-decoration: none; }

/* ---------- Tlačítka ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    padding: 10px 20px;
    font-family: inherit; font-size: 14.5px; font-weight: 600;
    cursor: pointer; text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: #fff; box-shadow: 0 1px 2px rgba(29, 78, 216, .25); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--primary-hover), #1e3a8a); }
.btn-outline { background: var(--card); color: var(--text); border-color: var(--border); }
.btn-outline:hover:not(:disabled) { border-color: var(--border-hover); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: transparent; padding: 4px 8px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-lg { padding: 13px 28px; font-size: 16px; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Badge / alert / spinner ---------- */

.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: #b45309; }
.badge-muted   { background: rgba(148,163,184,.14); color: var(--text-secondary); }

.alert { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13.5px; }
.alert-danger { background: var(--danger-bg); color: #b91c1c; border: 1px solid rgba(239,68,68,.25); }
.alert-warning { background: var(--warning-bg); color: #92400e; border: 1px solid rgba(245,158,11,.3); }
.alert-info { background: var(--primary-light); color: var(--primary-hover); border: 1px solid rgba(29,78,216,.25); }

.spinner {
    width: 24px; height: 24px;
    border: 3px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin .8s linear infinite;
}
.spinner-sm { width: 14px; height: 14px; border-width: 2px; display: inline-block; vertical-align: -2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Landing ---------- */

.landing { max-width: 720px; margin: 0 auto; padding: 90px 20px 60px; text-align: center; }
.landing h1 { font-size: 38px; line-height: 1.2; margin: 0 0 14px; letter-spacing: -.5px; }
.landing-sub { color: var(--text-secondary); font-size: 17px; margin: 0 auto 30px; max-width: 540px; }
.landing-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing-upload { margin-top: 18px; color: var(--text-secondary); font-size: 14px; }
.landing-note { margin-top: 34px; color: var(--text-muted); font-size: 13px; }

/* ---------- Formuláře ---------- */

label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; }
label input[type="text"], label input[type="email"], label input[type="password"] {
    display: block; width: 100%; margin-top: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14.5px; color: var(--text);
    background: var(--card);
}
label input:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }
.form-grid.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 13px; }
.check input { margin-top: 2px; }

/* ---------- Modal ---------- */

.modal-backdrop {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: center; justify-content: center;
    padding: 16px;
}
/* display:flex by jinak přebil HTML atribut [hidden] (UA display:none)
   a "zavřené" modaly by zůstaly viditelné přes sebe */
.modal-backdrop[hidden] { display: none; }
.modal {
    position: relative;
    background: var(--card); border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%; max-width: 460px;
    max-height: 92vh; overflow: auto;
    padding: 24px;
}
.modal-lg { max-width: 640px; }
.modal-close {
    position: absolute; top: 10px; right: 12px;
    border: none; background: none; font-size: 22px; color: var(--text-muted);
    cursor: pointer; line-height: 1;
}
.modal-title { margin: 0 0 4px; font-size: 18px; }
.modal-sub { margin: 0 0 16px; color: var(--text-secondary); font-size: 13.5px; }
.modal-foot { margin: 14px 0 0; font-size: 12.5px; color: var(--text-muted); }
.modal-tabs { display: flex; gap: 6px; margin-bottom: 18px; }
.modal-tab {
    flex: 1; padding: 9px 10px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg); font-family: inherit; font-size: 13.5px; font-weight: 600;
    color: var(--text-secondary); cursor: pointer;
}
.modal-tab.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-hover); }

/* ---------- Editor (3 sloupce) ---------- */

.editor-layout {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr) 280px;
    gap: 16px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 16px 18px 50px;
    align-items: start;
}
/* Stavy bez úprav (platba / průběh): dokument vlevo, panel vpravo. */
.editor-layout--two { grid-template-columns: minmax(0, 1fr) 320px; max-width: 1120px; }

/* Read-only výpis podepisujících v panelu platby */
.signer-summary { margin: 0 0 14px; }
.signer-summary-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.signer-summary-row:last-child { border-bottom: none; }
.signer-summary-ord { color: var(--text-muted); font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.panel {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 16px;
}
.panel h2 { margin: 0 0 4px; font-size: 15px; overflow-wrap: anywhere; }
.panel .panel-sub { margin: 0 0 14px; font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.editor-side { position: sticky; top: calc(var(--topbar-h) + 14px); max-height: calc(100vh - var(--topbar-h) - 28px); overflow: auto; }

/* osoby */
.signer-card {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 10px 12px; margin-bottom: 10px;
    background: var(--bg);
}
.signer-card .signer-name { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.signer-card .signer-mail { font-size: 12.5px; color: var(--text-muted); word-break: break-all; }
.signer-card .signer-actions { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.signer-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: 0 0 auto; }

.kyc-line { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 12.5px; flex-wrap: wrap; }

.sig-preview {
    margin-top: 10px; background: #fff; border: 1px dashed var(--border);
    border-radius: var(--radius-sm); padding: 6px;
    display: flex; align-items: center; justify-content: center; min-height: 54px;
}
.sig-preview img { max-width: 100%; max-height: 60px; }
.sig-preview.clickable { cursor: pointer; transition: border-color .15s ease; }
.sig-preview.clickable:hover { border-color: var(--primary); }

/* moje karta (vlastník) */
.me-card {
    border-color: rgba(29, 78, 216, .35);
    background: linear-gradient(180deg, rgba(29, 78, 216, .06), var(--card) 55%);
}
.me-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
    flex: 0 0 38px; width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 14px; letter-spacing: .5px;
}
.me-id { min-width: 0; }
.me-id b { display: block; font-size: 14.5px; line-height: 1.25; }
.me-mail { font-size: 12px; color: var(--text-muted); word-break: break-all; }
.kyc-chip { margin-left: auto; flex: 0 0 auto; }
.me-manage {
    display: inline-block; margin-top: 10px;
    font-size: 12.5px; font-weight: 600;
}

/* přehledové dlaždice (/dokumenty/) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 12px;
}
.stat-tile {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--bg);
    padding: 14px;
    display: flex; flex-direction: column; gap: 4px;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.stat-tile:hover { border-color: var(--border-hover); box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-tile.stat-warn { border-color: rgba(245, 158, 11, .45); background: var(--warning-bg); }
.stat-val { font-size: 21px; font-weight: 800; line-height: 1.2; }
.stat-of { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.stat-label { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* galerie podpisů (/podpisy/) */
.sig-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}
.sig-tile {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: #fff;
    padding: 12px;
    display: flex; flex-direction: column; gap: 10px;
}
.sig-tile img { height: 62px; object-fit: contain; max-width: 100%; }
.sig-tile.default { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.sig-tile-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* PDF viewer */
.pdf-stage { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.pdf-page {
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    background: #fff;
}
.pdf-page canvas { display: block; }
.pdf-page-num {
    position: absolute; top: -22px; right: 0;
    font-size: 11px; color: var(--text-muted);
}

/* navigace mezi stránkami (pager) */
.pdf-pager {
    position: sticky; top: calc(var(--topbar-h) + 8px); z-index: 30;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    width: fit-content; margin: 0 auto 12px; padding: 5px 6px;
    background: rgba(255, 255, 255, .92); backdrop-filter: blur(6px);
    border: 1px solid var(--border); border-radius: 999px;
    box-shadow: var(--shadow);
}
.pdf-pager[hidden] { display: none; }
.pager-btn {
    min-width: 30px; height: 30px; padding: 0 9px;
    border: 1px solid transparent; border-radius: 999px;
    background: transparent; color: var(--text);
    font-size: 15px; font-weight: 700; line-height: 1; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.pager-btn:hover:not(:disabled) { background: var(--primary-light); color: var(--primary-hover); }
.pager-btn:disabled { opacity: .35; cursor: default; }
.pager-info {
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    padding: 0 6px; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.pager-hint { text-align: center; font-size: 12px; color: var(--text-muted); margin: 0 0 12px; }

/* podpisová pole */
.sig-box {
    position: absolute;
    border: 2px solid var(--primary);
    background: rgba(29, 78, 216, .10);
    border-radius: 4px;
    cursor: move;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 600; color: var(--primary-hover);
    user-select: none; touch-action: none;
    overflow: visible;
    container-type: inline-size;   /* text uvnitř se škáluje dle velikosti rámečku */
}
.sig-box img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.sig-box .sig-box-label { padding: 2px 6px; text-align: center; pointer-events: none; }

/* vzhled "razítka" el. podpisu (editor placeholder + sign overlay) */
.sig-box.readonly { cursor: default; pointer-events: none; }
.sig-box-mine { border-color: var(--primary); background: rgba(29, 78, 216, .10); }
.sig-box-other { border-color: var(--border-hover); background: rgba(148, 163, 184, .12); }

.sig-stamp {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    width: 100%; height: 100%;
    padding: 2px 4px;
    line-height: 1.15;
    text-align: center;
    pointer-events: none;
    overflow: hidden;
}
.sig-stamp-label {
    font-size: 8px; font-size: clamp(5px, 8cqi, 9px); font-weight: 700;
    letter-spacing: .3px; text-transform: uppercase;
    color: var(--primary-hover);
    white-space: nowrap;
}
.sig-box-other .sig-stamp-label { color: var(--text-secondary); }
.sig-stamp-name {
    font-family: 'Segoe Script', 'Bradley Hand', cursive;
    font-size: 12px; font-size: clamp(6px, 10cqi, 18px);
    color: #1e3a8a;
    white-space: nowrap; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis;
}
.sig-stamp-brand {
    font-size: 7px; font-size: clamp(4px, 6cqi, 8px); font-weight: 600;
    letter-spacing: .3px;
    color: var(--text-muted);
}
.sig-box .sig-resize {
    position: absolute; right: -7px; bottom: -7px;
    width: 14px; height: 14px;
    background: var(--primary); border-radius: 50%;
    cursor: nwse-resize;
}
.sig-box .sig-del {
    position: absolute; top: -34px; left: 50%; transform: translateX(-50%);
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--danger); color: #fff; border: 2px solid #fff;
    font-size: 18px; line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 7px rgba(0, 0, 0, .28);
    z-index: 6;
}
.sig-box .sig-del:hover { background: #dc2626; }

/* pravý sloupec */
.price-rows { font-size: 13px; margin: 10px 0; }
.price-row { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px dashed var(--border); }
.price-row:last-child { border-bottom: none; }
.price-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 15px; padding-top: 8px; }

/* flow modal */
.flow-list { margin: 14px 0 0; }
.flow-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.flow-item:last-child { border-bottom: none; }
.flow-item .flow-meta { font-size: 12px; color: var(--text-muted); overflow-wrap: anywhere; }
.flow-grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* ikony kroků časové osy */
.flow-step-icon {
    flex: 0 0 12px;
    width: 12px; height: 12px;
    border-radius: 50%;
    border: 2px solid var(--border-hover);
    background: var(--card);
}
.flow-step-icon.done { background: var(--success); border-color: var(--success); }
.flow-step-icon.wait { background: var(--warning-bg); border-color: var(--warning); }
.flow-step-icon.idle { background: var(--card); border-color: var(--border-hover); }

/* signature pad */
.sigpad-canvas {
    width: 100%; height: 180px;
    border: 1px dashed var(--border-hover); border-radius: var(--radius-sm);
    background: #fff; touch-action: none; display: block;
}
.sigpad-tools { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.sig-typed-preview {
    height: 90px; display: flex; align-items: center; justify-content: center;
    border: 1px dashed var(--border-hover); border-radius: var(--radius-sm);
    font-family: 'Dancing Script', 'Segoe Script', cursive;
    font-size: 38px; color: #1e3a8a; background: #fff;
    overflow: hidden; white-space: nowrap;
}

/* výběr z uložených podpisů (modal „Vybrat") */
.sig-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 10px; max-height: 280px; overflow-y: auto; }
.sig-pick-tile {
    position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: #fff; padding: 10px; cursor: pointer; min-height: 66px;
    display: flex; align-items: center; justify-content: center;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.sig-pick-tile:hover { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.sig-pick-tile.default { border-color: var(--primary); }
.sig-pick-tile img { max-width: 100%; max-height: 56px; object-fit: contain; pointer-events: none; }
.sig-pick-badge { position: absolute; top: 5px; left: 5px; font-size: 9px; font-weight: 700; background: var(--primary-light); color: var(--primary-hover); border-radius: 999px; padding: 2px 7px; }

/* výběr fontu typovaného podpisu */
.sig-font-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 0; }
.sig-font-chip {
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--card); padding: 2px 14px; cursor: pointer;
    font-size: 22px; line-height: 1.4; color: #1e3a8a;
}
.sig-font-chip:hover { border-color: var(--border-hover); }
.sig-font-chip.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); background: var(--primary-light); }

/* tlačítka vlastního dialogu (ppConfirm/ppAlert) */
.dialog-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Stránky: dokumenty / sign / audit ---------- */

.page-wrap { max-width: 880px; margin: 0 auto; padding: 24px 18px 60px; display: flex; flex-direction: column; gap: 16px; }
.card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 22px;
}
.card h1 { margin: 0 0 6px; font-size: 20px; }
.card .card-sub { margin: 0 0 16px; color: var(--text-secondary); font-size: 14px; }

.doc-item { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--border); }
.doc-item:last-child { border-bottom: none; }
.doc-item .doc-grow { flex: 1 1 60%; min-width: 0; }
.doc-item .doc-title { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.doc-item .doc-meta { font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.doc-item .doc-status { flex: 0 0 124px; display: flex; align-items: center; }
.doc-item .doc-status .badge { white-space: nowrap; }
.doc-item .doc-actions { display: flex; gap: 6px; flex: 0 0 auto; align-items: center; }
/* přetékací menu „…" u akcí dokumentu */
.doc-menu { position: relative; flex: 0 0 auto; }
.doc-menu-pop {
    position: absolute; top: calc(100% + 6px); right: 0; z-index: 30;
    min-width: 186px; padding: 6px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 2px;
}
.doc-menu-pop[hidden] { display: none; }
.doc-menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 11px; border-radius: 7px;
    font-size: 13.5px; font-weight: 500; color: var(--text); background: none; border: none;
    text-align: left; cursor: pointer; text-decoration: none !important;
}
.doc-menu-item:hover { background: var(--bg); }
.doc-menu-item i { font-size: 17px; color: var(--text-muted); flex: 0 0 auto; }
.doc-menu-item--danger { color: var(--danger); }
.doc-menu-item--danger:hover { background: var(--danger-bg); }
.doc-menu-item--danger i { color: var(--danger); }

.detail-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.detail-table th, .detail-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.detail-table th { width: 38%; color: var(--text-muted); font-weight: 600; font-size: 13px; }
.detail-table tr:last-child th, .detail-table tr:last-child td { border-bottom: none; }

.sign-steps { counter-reset: step; }
.sign-step { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 12px; background: var(--card); }
.sign-step.done { border-color: rgba(22,163,74,.4); background: var(--success-bg); }
.sign-step h3 { margin: 0 0 6px; font-size: 14.5px; }
.sign-step p { margin: 0 0 10px; font-size: 13px; color: var(--text-secondary); }

/* příjemce: co s dokumentem může a nemůže */
.sign-rights { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 16px; background: var(--bg); }
.sign-rights-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 9px; }
.sign-rights-head i { font-size: 18px; color: var(--primary); }
.sign-rights-row { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-secondary); padding: 3px 0; }
.sign-rights-row i { font-size: 17px; flex: 0 0 auto; }
.sign-rights-row.ok i { color: var(--success); }
.sign-rights-row.no i { color: var(--text-muted); }
.sign-rights-note { margin: 9px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--text-muted); }
.sign-rights-dl { margin-top: 12px; }

.audit-hero { text-align: center; padding: 30px 20px; }
.audit-hero .audit-ok { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; word-break: break-all; }

/* ---------- Responsive ---------- */

@media (max-width: 1000px) {
    .editor-layout, .editor-layout--two { grid-template-columns: minmax(0, 1fr); }
    .editor-side { position: static; max-height: none; }
    /* mobil: levý panel (1.) → pravý panel (3.) → dokument až poslední */
    .editor-page #rightPanel { order: 2; }
    .editor-page > main { order: 3; }
}

@media (max-width: 560px) {
    .form-grid.two { grid-template-columns: 1fr; }
    .landing-actions .btn { width: 100%; }
    .page-wrap { padding: 14px 12px 44px; }
    .card { padding: 16px; }
    .doc-item { flex-wrap: wrap; }
    .doc-item .doc-grow { flex-basis: 100%; }
    .detail-table th, .detail-table td { display: block; width: auto; border-bottom: none; padding: 2px 0; }
    .detail-table tr { display: block; border-bottom: 1px solid var(--border); padding: 8px 0; }
}

/* ============================================================
   Navigace - sdílená (CTA, účet, mobilní menu)
   ============================================================ */
.topbar-nav { flex: 1; display: flex; align-items: center; gap: 16px; min-width: 0; }
.topbar-nav-main { flex: 1; display: flex; align-items: center; justify-content: center; gap: 18px; min-width: 0; }
.topbar-nav-end { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; min-width: 0; }
.topbar-link { position: relative; color: var(--text-secondary); padding: 6px 2px; transition: color .15s ease; }
.topbar-link:hover { color: var(--primary-hover); }
.topbar-link--active { color: var(--primary-hover); }
.topbar-link--active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px;
    background: var(--primary); border-radius: 2px;
}
.topbar-cta { white-space: nowrap; }
.topbar-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.topbar-avatar {
    width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto;
    background: var(--primary-light); color: var(--primary-hover);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 12px; letter-spacing: .3px;
}
.nav-burger {
    display: none; width: 40px; height: 40px; padding: 0;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--card); cursor: pointer;
    flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.nav-burger span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
body.nav-open .nav-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-burger span:nth-child(2) { opacity: 0; }
body.nav-open .nav-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
    .nav-burger { display: flex; }
    .topbar-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--card);
        border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        padding: 6px 18px 14px;
        display: none;
    }
    body.nav-open .topbar-nav { display: flex; }
    .topbar-nav-main, .topbar-nav-end { flex-direction: column; align-items: stretch; width: 100%; gap: 0; }
    .topbar-link--active::after { display: none; }
    .topbar-nav .topbar-link,
    .topbar-nav .topbar-logout { padding: 12px 2px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
    .topbar-nav .btn { width: 100%; margin: 4px 0 10px; }
    .topbar-cta { order: -1; }
    .topbar-account { padding: 11px 2px; border-bottom: 1px solid var(--border); }
    .topbar-user { max-width: none; overflow: visible; white-space: normal; word-break: break-all; }
}

/* ============================================================
   Landing - sekce, hero, kroky, hodnota, ceník, CTA, patička
   ============================================================ */
.eyebrow {
    display: inline-block; margin: 0 0 14px;
    font-size: 12.5px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--primary);
}
.landing .eyebrow { letter-spacing: 1.4px; }
.landing h1 { font-weight: 800; }
.hero-trust { margin: 26px auto 0; max-width: 560px; color: var(--text-muted); font-size: 13.5px; line-height: 1.7; }
.hero-trust b { color: var(--text-secondary); font-weight: 600; }

.section { max-width: 1040px; margin: 0 auto; padding: 92px 20px; }
.section-head { max-width: 600px; margin: 0 0 44px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section h2 { font-size: 30px; font-weight: 800; letter-spacing: -.5px; margin: 0 0 12px; line-height: 1.2; }
.section-lead { color: var(--text-secondary); font-size: 16px; margin: 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-alt .section { padding-top: 80px; padding-bottom: 80px; }

/* kroky */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.step { position: relative; }
.step-num { font-size: 42px; font-weight: 800; color: var(--primary); opacity: .22; line-height: 1; }
.step h3 { margin: 12px 0 6px; font-size: 16.5px; font-weight: 700; }
.step p { margin: 0; color: var(--text-secondary); font-size: 14px; }

/* hodnota - asymetrický blok */
.value { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.value-points { display: flex; flex-direction: column; gap: 22px; margin-top: 8px; }
.value-point { display: flex; gap: 14px; }
.vp-ic {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px;
    background: var(--primary-light); color: var(--primary-hover);
    display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.value-point h3 { margin: 2px 0 3px; font-size: 15px; font-weight: 700; }
.value-point p { margin: 0; font-size: 13.8px; color: var(--text-secondary); }

/* ukázková karta podepsaného dokumentu */
.doc-mock {
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 24px 48px rgba(15,23,42,.10);
    padding: 22px;
}
.doc-mock-bar { height: 8px; border-radius: 4px; background: var(--border); margin-bottom: 10px; }
.doc-mock-bar.s { width: 60%; }
.doc-mock-stamp {
    margin: 18px 0 16px; padding: 12px 14px;
    border: 1.5px solid var(--primary); border-radius: 8px;
    background: var(--primary-light);
    display: flex; flex-direction: column; gap: 2px; width: 220px; max-width: 100%;
}
.doc-mock-stamp .dm-l { font-size: 8.5px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--primary-hover); }
.doc-mock-stamp .dm-n { font-family: 'Segoe Script', 'Bradley Hand', cursive; font-size: 22px; color: #1e3a8a; }
.doc-mock-stamp .dm-b { font-size: 8px; color: var(--text-muted); }
.doc-mock-audit { display: flex; flex-direction: column; gap: 8px; border-top: 1px dashed var(--border); padding-top: 14px; }
.doc-mock-audit div { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-secondary); }
.doc-mock-audit .dm-ok { width: 16px; height: 16px; border-radius: 50%; background: var(--success-bg); color: var(--success); display: flex; align-items: center; justify-content: center; font-size: 10px; flex: 0 0 auto; }

/* ceník */
.price-wrap { display: flex; gap: 16px; flex-wrap: wrap; }
.price-card {
    flex: 1 1 280px; border: 1px solid var(--border); border-radius: 16px;
    background: var(--card); padding: 30px;
}
.price-card.feature { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), 0 16px 40px rgba(29,78,216,.12); }
.price-card .pc-name { font-size: 14px; font-weight: 700; color: var(--text-secondary); }
.price-num { font-size: 56px; font-weight: 800; line-height: 1.05; margin: 8px 0 2px; letter-spacing: -1px; }
.price-num small { font-size: 17px; font-weight: 600; color: var(--text-muted); }
.price-card .pc-desc { color: var(--text-secondary); font-size: 14px; margin: 6px 0 0; }
.price-note { margin: 22px 0 0; font-size: 13px; color: var(--text-muted); }

/* CTA pruh */
.cta-band {
    max-width: 1040px; margin: 0 auto 80px; border-radius: 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff; padding: 56px 40px; text-align: center;
}
.cta-band h2 { font-size: 28px; font-weight: 800; margin: 0 0 10px; color: #fff; }
.cta-band p { margin: 0 auto 24px; max-width: 480px; color: rgba(255,255,255,.9); font-size: 15.5px; }
.cta-band .btn-primary { background: #fff; color: var(--primary-hover); }
.cta-band .btn-primary:hover:not(:disabled) { background: #f1f5f9; }

/* patička */
.footer { border-top: 1px solid var(--border); background: var(--card); }
.footer-inner { max-width: 1040px; margin: 0 auto; padding: 30px 20px; display: flex; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; align-items: center; }
.footer-brand { font-size: 13.5px; color: var(--text-muted); }
.footer-brand b { color: var(--text-secondary); font-weight: 700; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 13.5px; text-decoration: none; }
.footer-links a:hover { color: var(--primary); }

@media (max-width: 860px) {
    .value { grid-template-columns: 1fr; gap: 30px; }
    .value-visual { order: -1; }
}
@media (max-width: 680px) {
    .section { padding: 60px 18px; }
    .section h2 { font-size: 25px; }
    .section-head { margin-bottom: 30px; }
    .steps { grid-template-columns: 1fr; gap: 24px; }
    .landing { padding: 54px 16px 30px; }
    .landing h1 { font-size: 30px; }
    .landing-sub { font-size: 16px; }
    .cta-band { padding: 40px 22px; margin-bottom: 56px; }
    .cta-band h2 { font-size: 23px; }
    .price-card { padding: 24px; }
}

/* ============================================================
   Dobíjecí stanice kreditu (/kredit/)
   ============================================================ */
.topup-balance {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
    margin-top: 16px; padding: 14px 16px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary-light), var(--card));
}
.topup-balance-label { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.topup-balance-val { font-size: 24px; font-weight: 800; color: var(--primary-hover); }
.topup-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.topup-chip {
    flex: 1 1 90px; padding: 12px 10px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--card); font-family: inherit; font-size: 15px; font-weight: 700;
    color: var(--text); cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.topup-chip:hover { border-color: var(--border-hover); }
.topup-chip.active { border-color: var(--primary); background: var(--primary-light); color: var(--primary-hover); box-shadow: 0 0 0 1px var(--primary); }

/* ============================================================
   Historie transakcí (/transakce/)
   ============================================================ */
.txn-row { display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--border); }
.txn-row:last-child { border-bottom: none; }
.txn-ic {
    flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 800;
}
.txn-ic.in { background: var(--success-bg); color: var(--success); }
.txn-ic.out { background: var(--primary-light); color: var(--primary-hover); }
.txn-grow { flex: 1; min-width: 0; }
.txn-title { font-weight: 600; font-size: 14.5px; overflow-wrap: anywhere; }
.txn-meta { font-size: 12.5px; color: var(--text-muted); overflow-wrap: anywhere; }
.txn-amount { font-weight: 800; font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.txn-amount.in { color: var(--success); }
.txn-amount.out { color: var(--text); }

@media (max-width: 560px) {
    .txn-row { flex-wrap: wrap; }
    .txn-grow { flex-basis: calc(100% - 48px); }
    .txn-amount { margin-left: 48px; }
}

/* ============================================================
   Redesign 2026-06-14: profesionálnější topbar, účtové menu,
   ikonové karty, hero. (pozdější pravidla přebíjejí dřívější)
   ============================================================ */
:root {
    --radius: 14px;
    --radius-sm: 9px;
    --radius-lg: 18px;
    --ink: #0f172a;
    --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
    --shadow-md: 0 8px 22px rgba(15, 23, 42, .08);
    --shadow-lg: 0 18px 44px rgba(15, 23, 42, .16);
    --topbar-h: 60px;
}

/* Topbar: jemně průhledný s rozostřením */
.topbar {
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
}
.brand-title { color: var(--ink); }
.brand-dot { color: var(--primary); }

/* Odkazy v navigaci jako "pill" s ikonou */
.topbar-link {
    display: inline-flex; align-items: center; gap: 7px;
    color: var(--text-secondary); padding: 8px 13px; border-radius: 10px;
    transition: background .15s ease, color .15s ease;
}
.topbar-link i { font-size: 17px; opacity: .92; }
.topbar-link:hover { color: var(--primary-hover); background: var(--primary-light); }
.topbar-link--active { color: var(--primary-hover); background: var(--primary-light); }
.topbar-link--active::after { display: none; }
.topbar-cta i { font-size: 15px; }

/* Účtové menu (avatar + dropdown) */
.account { position: relative; }
.account-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 7px 4px 4px; border: 1px solid var(--border);
    border-radius: 999px; background: var(--card); cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.account-btn:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.account-caret { font-size: 15px; color: var(--text-muted); transition: transform .18s ease; }
.account.open .account-caret { transform: rotate(180deg); }
.account-pop {
    position: absolute; top: calc(100% + 8px); right: 0; width: 232px;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 60;
}
.account-pop[hidden] { display: none; }
.account-head { padding: 6px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.account-head-label { display: block; font-size: 11.5px; color: var(--text-muted); }
.account-head-mail { display: block; font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 9px;
    font-size: 13.5px; font-weight: 500; color: var(--text); text-decoration: none;
}
.account-item i { font-size: 17px; color: var(--primary); }
.account-item:hover { background: var(--bg); }
.account-item--danger { color: var(--danger); }
.account-item--danger i { color: var(--danger); }
.account-sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* Hero hlavička stránky (mimo kartu) */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.page-head .eyebrow { margin: 0 0 6px; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 800; color: var(--ink); letter-spacing: -.4px; }
.page-head .page-sub { margin: 4px 0 0; font-size: 14px; color: var(--text-secondary); }
.card h1 { color: var(--ink); font-size: 22px; font-weight: 800; letter-spacing: -.3px; }

/* Statistické karty s ikonou */
.stat-tile {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: var(--card); padding: 16px; box-shadow: var(--shadow);
}
.stat-tile:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-ic {
    width: 36px; height: 36px; border-radius: 10px; margin-bottom: 10px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 18px;
    background: var(--primary-light); color: var(--primary-hover);
}
.stat-ic.green { background: var(--success-bg); color: var(--success); }
.stat-ic.amber { background: var(--warning-bg); color: #b45309; }
.stat-val { color: var(--ink); }

/* Řádky dokumentů s ikonou */
.doc-ic {
    flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 19px;
    background: var(--bg); color: var(--text-secondary);
}
.doc-ic.green { background: var(--success-bg); color: var(--success); }
.doc-ic.amber { background: var(--warning-bg); color: #b45309; }
.doc-item .doc-title { color: var(--ink); }

/* Účtové menu na mobilu: rozbalené přímo v zabaleném menu */
@media (max-width: 820px) {
    .account { width: 100%; border-top: 1px solid var(--border); margin-top: 4px; padding-top: 4px; }
    .account-btn { display: none; }
    .account-pop, .account-pop[hidden] { display: block; position: static; width: auto; box-shadow: none; border: none; padding: 0; }
    .account-item { padding: 12px 2px; }
    .account-sep { display: none; }
}

/* ---------- Dokumenty: toolbar (hledání + řazení), ikonová tlačítka, poznámky ---------- */
.doc-toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search-box { flex: 1 1 220px; position: relative; display: flex; align-items: center; min-width: 0; }
.search-box i { position: absolute; left: 12px; color: var(--text-muted); font-size: 17px; pointer-events: none; }
.search-box input {
    width: 100%; padding: 10px 12px 10px 38px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px; color: var(--text); background: var(--card);
}
.search-box input:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }
.select {
    padding: 10px 34px 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px; font-weight: 600; color: var(--text); background: var(--card);
    cursor: pointer; appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 11px center;
}
.select:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }

.doc-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.icon-btn {
    width: 34px; height: 34px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border); border-radius: 9px;
    background: var(--card); color: var(--text-secondary);
    cursor: pointer; font-size: 17px; text-decoration: none !important;
    transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.icon-btn:hover { border-color: var(--border-hover); color: var(--ink); background: var(--bg); }
.icon-btn--primary { border-color: rgba(29, 78, 216, .4); color: var(--primary-hover); background: var(--primary-light); }
.icon-btn--primary:hover { color: var(--primary-hover); background: var(--primary-light); border-color: var(--primary); }
.icon-btn--danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-bg); }

.doc-note { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--text-secondary); overflow-wrap: anywhere; }
.doc-note[hidden] { display: none; }
.doc-note i { flex: 0 0 auto; font-size: 15px; color: var(--text-muted); }
.doc-empty { color: var(--text-muted); margin: 6px 0; }

textarea {
    width: 100%; padding: 11px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-family: inherit; font-size: 14px; color: var(--text); background: var(--card);
    resize: vertical; min-height: 84px;
}
textarea:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }

/* Kredit: zůstatek s ikonou + zabezpečená platba */
.topup-balance { display: flex; align-items: center; gap: 14px; justify-content: flex-start; }
.topup-balance-ic {
    width: 44px; height: 44px; flex: 0 0 auto; border-radius: 12px;
    background: var(--primary-light); color: var(--primary-hover);
    display: inline-flex; align-items: center; justify-content: center; font-size: 22px;
}
.topup-balance-meta { display: flex; flex-direction: column; }
.topup-secure { display: flex; align-items: center; gap: 7px; margin: 12px 0 0; font-size: 12.5px; color: var(--text-secondary); }
.topup-secure i { flex: 0 0 auto; font-size: 15px; color: var(--success); }

/* řádek dokumentu na úzkém mobilu: stav vlevo, akce vpravo (dropdown se vejde) */
@media (max-width: 560px) {
    .doc-item .doc-grow { flex-basis: calc(100% - 50px); }
    .doc-item .doc-status { flex: 0 0 auto; margin: 8px 0 0 50px; }
    .doc-item .doc-actions { margin-top: 8px; margin-left: auto; }
}

/* Kredit: vlastní částka jako prominentní pole v duchu rychlých tlačítek */
.topup-custom-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin: 16px 0 8px; }
.topup-custom {
    display: flex; align-items: center;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--card); padding: 0 14px 0 16px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.topup-custom:focus-within,
.topup-custom.is-set { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.topup-custom input {
    flex: 1; min-width: 0; border: none; outline: none; background: transparent;
    padding: 13px 0; margin: 0;
    font-family: inherit; font-size: 18px; font-weight: 700; color: var(--ink);
    -moz-appearance: textfield;
}
.topup-custom input::placeholder { font-weight: 600; color: var(--text-muted); }
.topup-custom input::-webkit-outer-spin-button,
.topup-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.topup-custom-cur { flex: 0 0 auto; font-size: 15px; font-weight: 700; color: var(--text-muted); padding-left: 8px; }

/* ---------- Landing: kontaktní formulář (tickety Wopro) ---------- */
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 40px; align-items: start; max-width: none; margin: 0 auto; }
.contact-intro .eyebrow { margin-bottom: 12px; }
.contact-intro h2 { font-size: 28px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; margin: 0 0 10px; line-height: 1.2; }
.contact-points { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; gap: 14px; }
.contact-points li { display: flex; align-items: center; gap: 11px; font-size: 14px; color: var(--text-secondary); }
.contact-points i { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; background: var(--primary-light); color: var(--primary-hover); display: inline-flex; align-items: center; justify-content: center; font-size: 17px; }
.contact-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 24px; }
.contact-card label { margin-bottom: 12px; }
.contact-card .select { width: 100%; margin-top: 4px; font-weight: 400; }
.contact-card textarea { margin-top: 4px; }
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-note { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; text-align: center; }

.price-card { transition: transform .15s ease, box-shadow .15s ease; }
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; gap: 26px; } }

/* ============================================================
   Landing HERO (dvousloupcový s animovaným vizuálem)
   ============================================================ */
.hero { padding: 64px 20px 56px; overflow: hidden; }
.hero-inner { max-width: 1080px; margin: 0 auto; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero-copy { text-align: left; }
.hero-copy .eyebrow { margin-bottom: 14px; }
.hero-copy h1 { font-size: 44px; line-height: 1.1; font-weight: 800; letter-spacing: -1.2px; margin: 0 0 16px; color: var(--ink); }
.hero-sub { color: var(--text-secondary); font-size: 17px; line-height: 1.6; margin: 0 0 26px; max-width: 470px; }
.hero-copy .landing-actions { justify-content: flex-start; }
.hero-copy .hero-trust { margin: 28px 0 0; text-align: left; }

.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; min-height: 340px; }
.hero-glow { position: absolute; inset: -10%; background: radial-gradient(58% 58% at 60% 42%, rgba(29, 78, 216, .16), transparent 70%); z-index: 0; }
.hero-doc {
    position: relative; z-index: 1; width: 320px; max-width: 100%;
    background: #fff; border: 1px solid var(--border); border-radius: 18px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, .16); padding: 20px;
    transform: rotate(-2deg); animation: heroFloat 6s ease-in-out infinite;
}
@keyframes heroFloat { 0%, 100% { transform: rotate(-2deg) translateY(0); } 50% { transform: rotate(-2deg) translateY(-10px); } }
.hero-doc-top { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.hd-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--border-hover); }
.hd-dot:nth-child(1) { background: #f87171; }
.hd-dot:nth-child(2) { background: #fbbf24; }
.hd-dot:nth-child(3) { background: #34d399; }
.hero-doc-file { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }
.hero-doc-file i { font-size: 14px; }
.hd-line { height: 9px; border-radius: 5px; background: #eef2f7; margin-bottom: 10px; }
.hd-line.s { width: 62%; }
.hero-sign { margin-top: 16px; border: 1.5px solid var(--primary); border-radius: 12px; background: var(--primary-light); padding: 8px 14px 11px; }
.hero-sign-svg { display: block; width: 150px; height: 40px; }
.hero-sign-path { stroke-dasharray: 540; stroke-dashoffset: 540; animation: heroSign 4s ease-in-out .5s infinite; }
@keyframes heroSign { 0% { stroke-dashoffset: 540; } 40%, 78% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
.hero-sign-name { display: block; font-family: 'Segoe Script', 'Bradley Hand', cursive; font-size: 18px; color: #1e3a8a; line-height: 1.1; }
.hero-sign-label { display: block; font-size: 8px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--primary-hover); margin-top: 4px; }
.hero-chip {
    position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 7px;
    background: #fff; border: 1px solid var(--border); border-radius: 999px;
    padding: 8px 13px; font-size: 12.5px; font-weight: 700; color: var(--ink);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .14);
}
.hero-chip i { font-size: 16px; }
.hero-chip-id { top: 26px; right: 0; animation: heroFloat2 5s ease-in-out infinite; }
.hero-chip-id i { color: var(--success); }
.hero-chip-audit { bottom: 34px; left: 4px; animation: heroFloat2 5.6s ease-in-out .9s infinite; }
.hero-chip-audit i { color: var(--primary); }
@keyframes heroFloat2 { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

@media (max-width: 880px) {
    .hero-inner { grid-template-columns: 1fr; gap: 30px; }
    .hero-visual { order: -1; }
    .hero-copy { text-align: center; }
    .hero-copy h1 { letter-spacing: -.8px; }
    .hero-copy .landing-actions { justify-content: center; }
    .hero-copy .hero-sub, .hero-copy .hero-trust { margin-left: auto; margin-right: auto; text-align: center; }
}
@media (max-width: 560px) {
    .hero { padding: 36px 16px 28px; }
    .hero-copy h1 { font-size: 32px; }
    .hero-visual { min-height: 280px; }
    .hero-doc { width: 280px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-doc, .hero-chip-id, .hero-chip-audit, .hero-sign-path { animation: none; }
    .hero-sign-path { stroke-dashoffset: 0; }
}

/* ============================================================
   Landing kroky "Jak to funguje" (karty + zakřivená spojnice)
   ============================================================ */
.steps-flow { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps-curve { position: absolute; top: 28px; left: 6%; width: 88%; height: 72px; z-index: 0; pointer-events: none; }
.step-card {
    position: relative; z-index: 1; text-align: center;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px 18px 22px; box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.step-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--border-hover); }
.step-ic {
    position: relative; width: 66px; height: 66px; margin: 0 auto 16px; border-radius: 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-hover)); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 29px;
    box-shadow: 0 10px 22px rgba(29, 78, 216, .32);
}
.step-no {
    position: absolute; top: -9px; right: -9px; width: 26px; height: 26px; border-radius: 50%;
    background: #fff; color: var(--primary-hover); border: 2px solid var(--primary-light);
    font-size: 12.5px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.step-card h3 { margin: 0 0 7px; font-size: 16.5px; font-weight: 700; color: var(--ink); }
.step-card p { margin: 0; font-size: 14px; color: var(--text-secondary); line-height: 1.55; }
.step-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 5px 11px; border-radius: 999px; background: var(--primary-light); color: var(--primary-hover); font-size: 11.5px; font-weight: 700; line-height: 1.2; }
.step-badge i { font-size: 14px; }
@media (max-width: 920px) {
    .steps-flow { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .steps-curve { display: none; }
}
@media (max-width: 560px) {
    .steps-flow { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
}

/* ============================================================
   Právní dokument (VOP)
   ============================================================ */
.legal-doc .eyebrow { margin-bottom: 10px; }
.legal-doc h1 { font-size: 24px; margin: 0 0 6px; }
.legal-meta { font-size: 13px; color: var(--text-muted); margin: 0 0 16px; }
.legal-provider { font-size: 13.5px; color: var(--text-secondary); line-height: 1.6; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0 0 8px; }
.legal-doc h2 { font-size: 16px; font-weight: 700; color: var(--ink); margin: 26px 0 8px; }
.legal-doc p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin: 0 0 10px; }
.legal-doc ul { margin: 0 0 10px; padding-left: 18px; }
.legal-doc li { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 5px; }
.legal-doc strong { color: var(--text); }
.legal-foot { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }

/* ============================================================
   Ceník - tabulka plánů (FREE / jednorázově / předplatné)
   ============================================================ */
.pricing { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); box-shadow: var(--shadow); }
.pricing-row {
    display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr) 116px;
    align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.pricing-row:last-child { border-bottom: none; }
.pricing-head {
    background: var(--bg); padding-top: 12px; padding-bottom: 12px;
    font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted);
}
.pp-plan strong { display: block; font-size: 15.5px; color: var(--ink); font-weight: 700; }
.pp-plan small { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.pp-tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; color: var(--primary-hover); background: var(--primary-light); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.pp-cell { font-size: 14.5px; color: var(--text-secondary); }
.pp-cell b { color: var(--ink); font-weight: 800; font-size: 16px; }
.pp-price { font-weight: 800; color: var(--ink); font-size: 16px; }
.pp-muted { font-weight: 500; color: var(--text-muted); font-size: 13px; }
.pp-save { display: inline-block; font-size: 10.5px; font-weight: 800; color: var(--success); background: var(--success-bg); border-radius: 999px; padding: 2px 7px; }
.pp-cta { text-align: right; }
.pp-cta .btn { width: 100%; }
.pricing-row--feature { background: linear-gradient(180deg, var(--primary-light), transparent); }
.pricing-row--feature .pp-plan strong { color: var(--primary-hover); }

@media (max-width: 720px) {
    .pricing { border: none; box-shadow: none; background: transparent; display: flex; flex-direction: column; gap: 12px; overflow: visible; }
    .pricing-head { display: none; }
    .pricing-row { grid-template-columns: 1fr; gap: 9px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); padding: 16px 18px; }
    .pricing-row--feature { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
    .pp-cell, .pp-price { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
    .pp-cell::before, .pp-price::before { content: attr(data-label); font-size: 12px; color: var(--text-muted); font-weight: 600; }
    .pp-cta { text-align: left; margin-top: 4px; }
}

/* Nadstandardní funkce (doplňky s přepínačem) */
.addons { margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow); overflow: hidden; }
.addons-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 18px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--ink); }
.addon { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.addon:last-child { border-bottom: none; }
.addon-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.addon-ic { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: var(--primary-light); color: var(--primary-hover); display: inline-flex; align-items: center; justify-content: center; font-size: 19px; }
.addon-info strong { display: block; font-size: 14.5px; color: var(--ink); font-weight: 700; }
.addon-info small { display: block; font-size: 12.5px; color: var(--text-muted); margin-top: 1px; }
.addon-price { flex: 0 0 auto; font-size: 15px; font-weight: 800; color: var(--text-secondary); white-space: nowrap; }
.addon-price small { font-size: 11px; font-weight: 600; color: var(--text-muted); }

/* přepínač (toggle switch) */
.switch { position: relative; display: inline-block; width: 44px; height: 25px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; inset: 0; background: var(--border-hover); border-radius: 999px; cursor: pointer; transition: background .2s ease; }
.switch-slider::before { content: ''; position: absolute; height: 19px; width: 19px; left: 3px; top: 3px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s ease; }
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(19px); }
.switch input:focus-visible + .switch-slider { outline: 2px solid var(--primary-light); outline-offset: 2px; }

@media (max-width: 560px) {
    .addon { flex-wrap: wrap; }
    .addon-info { flex-basis: calc(100% - 58px); }
    .addon-price { margin-left: 50px; }
}

/* ============================================================
   Spodní mobilní navigace (tab bar) + mobilní topbar bez hamburgeru
   ============================================================ */
.bottom-nav { display: none; }
.bn-item {
    flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 7px 2px 6px; text-decoration: none; color: var(--text-muted); font-size: 10.5px; font-weight: 600;
}
.bn-item i { font-size: 22px; }
.bn-item span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bn-item--active { color: var(--primary-hover); }
.bn-fab {
    flex: 0 0 auto; width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    color: #fff; background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border: 3px solid var(--card); box-shadow: 0 6px 16px rgba(29, 78, 216, .4); transform: translateY(-12px);
}
.bn-fab i { font-size: 26px; }

@media (max-width: 820px) {
    .nav-burger { display: none !important; }
    .topbar-nav { position: static; flex: 0 0 auto; margin-left: auto; display: flex; flex-direction: row; align-items: center; gap: 8px; background: none; border: none; box-shadow: none; padding: 0; }
    body.nav-open .topbar-nav { display: flex; }
    .topbar-nav-main, .topbar-cta { display: none; }
    .topbar-nav-end { flex-direction: row; width: auto; gap: 8px; border: none; margin: 0; padding: 0; }
    .account { width: auto; border: none; margin: 0; padding: 0; }
    .account-btn { display: inline-flex; }
    .account-pop { display: block; position: absolute; top: calc(100% + 8px); right: 0; width: 232px; background: var(--card); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; }
    .account-pop[hidden] { display: none; }
    .account-head { display: block; }
    .account-item { padding: 9px 10px; }
    .account-sep { display: block; }

    .bottom-nav {
        display: flex; align-items: center; justify-content: space-around;
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
        padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, .97);
        -webkit-backdrop-filter: saturate(1.5) blur(12px); backdrop-filter: saturate(1.5) blur(12px);
        border-top: 1px solid var(--border);
        box-shadow: 0 -3px 16px rgba(15, 23, 42, .07);
    }
    body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); }

    /* na mobilu vše vycentrovat doprostřed */
    .page-head { flex-direction: column; align-items: center; text-align: center; }
    .page-head .btn { width: 100%; }
    .page-wrap > .card { text-align: left; }
    .stat-tile { align-items: flex-start; }

    /* Úvodní stránka: všechny sekce vycentrovat na střed */
    .section-head { text-align: center; margin-left: auto; margin-right: auto; }
    .value { text-align: center; }
    .value-point { flex-direction: column; align-items: center; text-align: center; gap: 8px; }
    .contact-intro { text-align: center; }
    .contact-points { align-items: center; }
    .contact-points li { justify-content: center; }
    .price-note { text-align: center; }
    .footer-inner { justify-content: center; text-align: center; }
    .footer-links { justify-content: center; }
}
