/* =====================================================
   Penvera — design systém
   Barvy, typografie a rádiusy převzaté z dodaného návrhu (uvernik_v3.html):
   modrá #2a4fd0 jako hlavní, chladná šedomodrá plocha, Manrope + JetBrains Mono.
   Fonty jsou hostované lokálně (CSP blokuje externí zdroje).
   ===================================================== */

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

:root {
    --bg: #eceff4;
    --surface: #ffffff;
    --border: #dfe4ec;
    --border-soft: #e4e9f1;
    --border-card: #dfe4ec;
    --border-input: #d7dde7;

    --ink: #1f2c40;
    --ink-2: #2c3a4f;
    --ink-3: #44526a;
    --muted: #5f6b7a;
    --muted-2: #6c7887;
    --gray: #98a2b0;

    /* Značkové barvy Penvera — přímo z loga: tmavá #1f2c40, modrá #3782e7. */
    --primary: #3782e7;
    --primary-dark: #2668c2;
    --primary-bg: #eaf2fd;
    --primary-bg-2: #d8e7fb;
    --primary-bd: #b9d3f6;

    --blue: #3782e7;
    --blue-bg: #eaf2fd;
    --green: #0f6c42;
    --green-bg: #e6f4eb;
    --red: #a3341f;
    --red-bg: #fdeae6;
    --red-bg-strong: #f5b3a3;   /* řádek obchodu ve vymáhání / nezaplatil — musí praštit do očí */
    --red-bd: #f4d2ca;
    --amber: #8a5c10;
    --amber-bg: #fdf1dc;
    --amber-strong: #b8760f;
    --mute-bg: #eef1f6;

    /* Neutrály odvozené od chladné plochy návrhu. Dřív tu byly zelenkavé
       odstíny z předchozího projektu, které v modrém designu působily špinavě. */
    --row-hover: #f4f7fc;      /* řádek tabulky pod myší */
    --head-bg:   #f7f9fd;      /* hlavička tabulky */
    --line:      #edf0f5;      /* jemná linka uvnitř karty */
    --surface-2: #f7f9fd;

    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(16, 23, 32, .04);
    --shadow-md: 0 4px 14px rgba(16, 23, 32, .07);
    --shadow-lg: 0 12px 34px rgba(16, 23, 32, .13);
    --ring: 0 0 0 3px rgba(42, 79, 208, .22);   /* obtah při ovládání z klávesnice */
    --sidebar-w: 268px;
}

* { box-sizing: border-box; }
/* PAST: atribut `hidden` má v prohlížeči nejnižší prioritu — `.form-group { display:flex }`
   ho přebije a skrytý prvek zůstane vidět. Proto natvrdo. */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--ink);
    font-family: Manrope, system-ui, -apple-system, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.02em; }
input, select, button, textarea { font-family: inherit; font-size: inherit; }
.icon { flex: 0 0 auto; }
.num { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: #e3e7ee; }
::-webkit-scrollbar-thumb { background: #b9c2d1; border-radius: 8px; }

@keyframes riseIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============ Layout ============ */
.app { display: flex; align-items: stretch; min-height: 100vh; }

.sidebar {
    /* Tmavý sidebar podle vzoru — vlastní sada proměnných přepíše jen to, co je
       uvnitř .sidebar. Zbytek aplikace (--ink, --muted, …) zůstává beze změny,
       protože CSS proměnné dědí jen potomci tohoto prvku, ne sourozenci. */
    --ink: #f4f6fb;
    --ink-2: rgba(244, 246, 251, .82);
    --ink-3: rgba(244, 246, 251, .65);
    --muted: rgba(244, 246, 251, .55);
    --muted-2: rgba(244, 246, 251, .42);
    --surface: #2a3852;
    --mute-bg: rgba(255, 255, 255, .08);
    --border-soft: rgba(255, 255, 255, .12);
    --border: rgba(255, 255, 255, .16);
    --primary-bg: rgba(55, 130, 231, .22);
    --primary-bg-2: rgba(55, 130, 231, .34);
    --primary-dark: #9cc6fb;
    --red: #ff9686;

    width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
    background: #1f2c40; border-right: none;
    padding: 18px 15px; display: flex; flex-direction: column; gap: 17px;   /* kompaktní menu (17. 11. 2026, střední varianta) */
    position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto;
}
.content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.page { padding: 24px 30px 48px; animation: riseIn 260ms ease both; }

/* ---- Sidebar ---- */
.sb-brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
/* Značka je obrázek z loga — bílý podklad drží kontrast na světlé i tmavé ploše. */
.sb-logo {
    width: 32px; height: 32px; border-radius: 9px; flex: 0 0 auto;
    object-fit: contain; padding: 3px; background: #fff;
    border: 1px solid var(--border-soft);
}
/* Portál se hlásí jménem firmy, ne značkou systému — tam zůstává iniciála. */
.sb-logo-text {
    background: var(--primary); border-color: var(--primary); color: #fff; padding: 0;
    display: grid; place-items: center; font-weight: 800; font-size: 14px;
}
.sb-brand-name { font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.sb-brand:hover { text-decoration: none; }

.sb-firm { display: flex; flex-direction: column; gap: 6px; }
.sb-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--muted); padding: 0 6px; }
.sb-firm-box {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: var(--mute-bg); border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
    padding: 10px 12px; font-size: 13px; font-weight: 700; color: var(--ink);
}
/* Přepínač firem — vypadá jako sb-firm-box, ale je to <select>. */
.sb-firm-switch select {
    width: 100%; background: var(--mute-bg); border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm); padding: 10px 30px 10px 12px;
    font: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23c7d0de' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 9px center;
}
.sb-firm-switch select:hover { border-color: var(--border); }
.sb-firm-switch select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }

.sb-nav { display: flex; flex-direction: column; gap: 14px; }
.sb-group { display: flex; flex-direction: column; gap: 2px; }
.sb-group .sb-label { margin-bottom: 2px; }
.sb-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7.5px 12px; border-radius: var(--radius-sm);
    font-size: 13.5px; font-weight: 600; color: var(--ink-2);
    border-left: 3px solid transparent; transition: background 140ms ease, color 140ms ease;
}
.sb-item:hover { background: var(--mute-bg); color: var(--ink); text-decoration: none; }
.sb-item.is-active { background: var(--primary-bg); color: var(--primary-dark); border-left-color: var(--primary); }
.sb-item .icon { color: currentColor; opacity: .8; }
.sb-item-text { flex: 1; min-width: 0; }
.sb-count {
    font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px;
    background: var(--mute-bg); color: var(--muted-2);
}
.sb-item.is-active .sb-count { background: var(--primary-bg-2); color: var(--primary-dark); }
.sb-count.is-alert { background: var(--red-bg-strong); color: #7f2418; }

.sb-deadline {
    margin-top: auto; border: 1px solid var(--border-soft); border-radius: var(--radius);
    padding: 13px 14px; display: flex; flex-direction: column; gap: 5px; background: var(--surface);
}
.sb-deadline-label { font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.sb-deadline-rel { font-size: 15px; font-weight: 800; }
.sb-deadline-title { font-size: 12px; color: var(--ink-3); line-height: 1.4; }

.sb-user { display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.avatar {
    width: 34px; height: 34px; border-radius: 999px; flex: 0 0 auto;
    background: var(--primary-bg); color: var(--primary-dark);
    display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.sb-user-meta { flex: 1; min-width: 0; }
.sb-user-name { font-size: 13px; font-weight: 700; color: var(--ink); display: block; }
.sb-user-role { font-size: 11.5px; color: var(--muted); }
.sb-logout { color: var(--muted); display: grid; place-items: center; padding: 6px; border-radius: 8px; }
.sb-logout:hover { background: var(--mute-bg); color: var(--red); text-decoration: none; }

/* ---- Topbar ---- */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 16px;
    padding: 14px 30px; background: rgba(236, 239, 244, .92);
    backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.tb-crumb { font-size: 13px; color: var(--muted); white-space: nowrap; }
.tb-crumb b { color: var(--ink); font-weight: 700; }
.tb-search { flex: 1; max-width: 420px; position: relative; display: flex; align-items: center; }
.tb-search .icon { position: absolute; left: 12px; color: var(--muted); }
.tb-search input {
    width: 100%; padding: 9px 12px 9px 36px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-input); background: var(--surface); color: var(--ink);
}
.tb-search input:focus { outline: none; border-color: var(--primary-bd); box-shadow: 0 0 0 3px var(--primary-bg); }
.tb-meta { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.tb-toggle { display: none; background: none; border: 1px solid var(--border-input); border-radius: 9px; padding: 7px; color: var(--ink-2); cursor: pointer; }

/* ============ Stránka ============ */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
    flex-wrap: wrap; margin-bottom: 20px;
}
.page-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin: 0 0 6px; }
.page-title { font-size: 26px; }
.page-sub { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ============ Karty ============ */
.card {
    background: var(--surface); border: 1px solid var(--border-card);
    border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
}
/* Rozestup bloků přímo na stránce (14. 11. 2026): karty a mřížky pod sebou se nesmí slepit — platí pro všechny
   stránky (dřív to řešila každá stránka zvlášť a kde zapomněla, karty na sebe nalepily). Oddíly formulářů,
   záložky, filtry a hlášky mají vlastní spodní okraj, za nimi se nic nepřidává. */
.page > :is(.card:not(.form-section), .grid, .grid-2, .stack, .board) + :is(.card, .grid, .grid-2, .stack, .tabs, .filterbar, .alert, .board, form) { margin-top: 18px; }
.card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 15px 20px; border-bottom: 1px solid var(--border-soft);
}
.card-title { font-size: 15px; font-weight: 800; }
.card-note { font-size: 12px; color: var(--muted); font-weight: 500; }
.card-body { padding: 18px 20px; }
.card-body.is-flush { padding: 0; }
.card.is-danger { border-color: var(--red-bd); }

/* Klikatelná karta (dlaždice nemovitosti apod.) */
.card-link { display: block; color: inherit; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.card-link:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 22px rgba(16, 23, 32, .09); border-color: var(--primary-bd); }

/* ---- Statistické dlaždice ---- */
.stat {
    background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--radius);
    padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow);
}
.stat-label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.stat-value { font-size: 28px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat-value small { font-size: 15px; font-weight: 700; color: var(--muted); margin-left: 3px; }
.stat-sub { font-size: 12px; color: var(--muted); }
.stat.is-red .stat-value { color: var(--red); }
.stat.is-green .stat-value { color: var(--green); }
.stat.is-amber .stat-value { color: var(--amber-strong); }

/* Dlaždice s ikonou — jen tam, kde se k číslu hodí piktogram (zatím Statistika). */
.stat.has-icon { flex-direction: row; align-items: flex-start; gap: 14px; }
.stat-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat-icon {
    width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto;
    display: grid; place-items: center; background: var(--blue-bg); color: var(--blue);
}
.stat-icon.is-red   { background: var(--red-bg);   color: var(--red); }
.stat-icon.is-green { background: var(--green-bg); color: var(--green); }
.stat-icon.is-amber { background: var(--amber-bg); color: var(--amber-strong); }

/* Banner portfolia */
.hero {
    background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--radius);
    padding: 20px 22px; box-shadow: var(--shadow);
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.hero-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
.hero-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 4px 0 2px; }
.hero-sub { font-size: 13px; color: var(--muted); }

/* ---- Pilulky ---- */
.chip {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; white-space: nowrap; line-height: 1.35;
}
.chip-green { background: var(--green-bg); color: var(--green); }
.chip-red   { background: var(--red-bg);   color: var(--red); }
.chip-amber { background: var(--amber-bg); color: var(--amber); }
.chip-orange { background: #ffe7d1; color: #9a4a0b; }   /* stav Vymáhání AK (klient 7. 10. 2026) */
.chip-blue  { background: var(--primary-bg); color: var(--primary); }
.chip-mute  { background: var(--mute-bg);  color: var(--muted); }
.chip-gray  { background: var(--mute-bg);  color: var(--gray); }

/* ---- Nápověda u jednotlivých polí ----
   Ikonka je ve výchozím stavu sotva znatelná, aby formulář nerušila.
   Zvýrazní se, až když uživatel s daným polem pracuje. */
.fhelp {
    display: inline-grid; place-items: center; vertical-align: baseline;
    width: 14px; height: 14px; margin-left: 5px; border-radius: 999px;
    border: 1px solid #cfd6e2; background: transparent; color: #a6afbd;
    font-size: 9.5px; font-weight: 700; line-height: 1; cursor: help;
    position: relative; user-select: none; flex: 0 0 auto;
    transition: color 130ms ease, border-color 130ms ease, background 130ms ease;
}
.form-group:hover > .form-label > .fhelp,
.form-group:focus-within > .form-label > .fhelp,
th:hover > .fhelp, .stat:hover .fhelp, label:hover > .fhelp {
    color: var(--primary); border-color: var(--primary-bd);
}
.fhelp:hover, .fhelp:focus-visible {
    background: var(--primary); border-color: var(--primary); color: #fff; outline: none;
}

/* Bublina je vykreslená mimo tok stránky, aby ji neořízla karta ani rolovatelná
   tabulka. Souřadnice dopočítává skript v templates/footer.php. */
.fhelp-pop {
    position: fixed; top: 0; left: 0; z-index: 200;
    width: max-content; max-width: 330px;
    background: var(--ink); color: #e9edf4; border-radius: 10px;
    box-shadow: 0 12px 30px rgba(16, 23, 32, .28);
    padding: 10px 13px; font-size: 12.5px; font-weight: 500; line-height: 1.55;
    text-align: left; white-space: normal; text-transform: none; letter-spacing: 0;
    opacity: 0; visibility: hidden; transform: translateY(-3px); pointer-events: none;
    transition: opacity 130ms ease, transform 130ms ease;
}
.fhelp-pop.is-open { opacity: 1; visibility: visible; transform: none; }
.fhelp-extra {
    display: block; margin-top: 6px; padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, .14);
    font-size: 11.5px; color: #a9b4c6;
}
/* ---- Tlačítka ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 11px 17px; border-radius: var(--radius-sm); border: 1px solid var(--border-input);
    background: var(--surface); color: var(--ink-2);
    font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: all 160ms ease; text-decoration: none;
}
.btn:hover { border-color: var(--primary-bd); background: var(--primary-bg); color: var(--primary-dark); text-decoration: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; border-color: #000; color: #fff; }
.btn-danger { color: var(--red); border-color: var(--red-bd); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--mute-bg); color: var(--ink); border-color: transparent; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { padding: 6px; }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 20px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Přepínač fáze v hlavičce karty úvěru — vypadá jako tlačítko, barvou odpovídá fázi. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.phase-switch { display: inline-flex; margin: 0; }
.phase-switch select {
    appearance: none; -webkit-appearance: none;
    padding: 11px 36px 11px 15px; border-radius: var(--radius-sm); border: 1px solid var(--border-input);
    font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; max-width: 280px;
    background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6b7a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center;
    color: var(--ink-2); transition: border-color 160ms ease, box-shadow 160ms ease;
}
.phase-switch select:hover { border-color: var(--primary-bd); }
.phase-switch select:focus-visible { outline: none; border-color: var(--primary-bd); box-shadow: 0 0 0 3px var(--primary-bg); }
.phase-switch.tone-red   select { background-color: var(--red-bg);   border-color: var(--red-bd); color: var(--red); }
.phase-switch.tone-amber select { background-color: var(--amber-bg); border-color: #e8d2a0;       color: var(--amber); }
.phase-switch.tone-green select { background-color: var(--green-bg); color: var(--green); }
.phase-switch.tone-blue  select { background-color: var(--primary-bg); color: var(--primary); }
.phase-switch.tone-orange select { background-color: #ffe7d1; border-color: #f5c196; color: #9a4a0b; }   /* stav Vymáhání AK */
.phase-switch.tone-gray  select { background-color: var(--mute-bg); color: var(--gray); }
.phase-switch select option { background: var(--surface); color: var(--ink); }

/* ---- Filtry ---- */
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-chip {
    padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-input);
    background: var(--surface); color: var(--ink-3); font-size: 13px; font-weight: 600; cursor: pointer;
}
.filter-chip:hover { border-color: var(--primary-bd); text-decoration: none; color: var(--primary-dark); }
.filter-chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ============ Tabulky ============ */
.table { width: 100%; border-collapse: collapse; }
.table th {
    text-align: left; padding: 11px 20px; font-size: 10.5px; font-weight: 700;
    letter-spacing: .1em; color: var(--muted); text-transform: uppercase;
    border-bottom: 1px solid var(--border-soft); background: var(--head-bg); white-space: nowrap;
}
.table td { padding: 13px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--row-hover); }
.table .t-right { text-align: right; }
/* Částky se nesmí lámat po číslicích („6 / 852 / 303 Kč") — raději ať se tabulka posune. */
.table td.num { white-space: nowrap; }
/* Široké přehledy (seznam úvěrů) — užší okraje, ať se vejdou i Fáze a Stav. */
.table.is-compact th, .table.is-compact td { padding-left: 12px; padding-right: 12px; }
.table td.num .t-sub { white-space: nowrap; }
.table .t-strong { font-weight: 700; color: var(--ink); }
.table .t-sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.table-wrap { overflow-x: auto; }
.row-actions { display: flex; gap: 5px; justify-content: flex-end; }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); font-size: 13.5px; }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 5px; }

/* ---- Klíč–hodnota ---- */
.kv { display: flex; flex-direction: column; }
.kv-row { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.kv-row:last-child { border-bottom: none; }
.kv-row dt { flex: 0 0 42%; color: var(--muted); margin: 0; }
.kv-row dd { flex: 1; margin: 0; font-weight: 600; color: var(--ink); word-break: break-word; }

/* ---- Ukazatel podílu ---- */
.bar { height: 7px; border-radius: 999px; background: var(--mute-bg); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; }
.bucket { display: flex; flex-direction: column; gap: 7px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.bucket:last-child { border-bottom: none; }
.bucket-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 13px; }
.bucket-label { color: var(--ink-3); font-weight: 600; }

/* ---- Lhůty ---- */
.dl-row {
    display: flex; align-items: center; gap: 14px; padding: 13px 20px;
    border-bottom: 1px solid var(--line); color: inherit;
}
.dl-row:last-child { border-bottom: none; }
.dl-row:hover { background: var(--row-hover); text-decoration: none; }
.dl-when { flex: 0 0 96px; }
.dl-rel { font-size: 12.5px; font-weight: 700; }
.dl-date { font-size: 11.5px; color: var(--muted); }
.dl-main { flex: 1; min-width: 0; }
.dl-title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.dl-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.dl-amount { font-size: 13.5px; font-weight: 700; white-space: nowrap; }

/* ---- Časová osa ---- */
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 14px; padding-bottom: 18px; position: relative; }
.tl-item:not(:last-child)::before {
    content: ''; position: absolute; left: 7px; top: 20px; bottom: 0; width: 2px; background: var(--border-soft);
}
.tl-dot { width: 16px; height: 16px; border-radius: 999px; flex: 0 0 auto; margin-top: 2px; border: 4px solid var(--mute-bg); background: var(--gray); }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 13.5px; font-weight: 700; }
.tl-date { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.tl-note { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }

/* ---- Nástěnka úkolů ---- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.board-col { background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--radius); box-shadow: var(--shadow); }
.board-head { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; border-bottom: 1px solid var(--border-soft); }
.board-title { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.board-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.board-card {
    display: block; border: 1px solid var(--border-soft); border-radius: 12px;
    padding: 12px 14px; color: inherit; background: var(--surface);
}
.board-card:hover { text-decoration: none; border-color: var(--primary-bd); background: var(--row-hover); }
.board-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.board-card-title { font-size: 13px; font-weight: 700; line-height: 1.35; }
.board-card-sub { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* ---- Přílohy ---- */
.file-row {
    display: flex; align-items: center; gap: 11px; padding: 10px 12px;
    border: 1px solid var(--border-soft); border-radius: var(--radius-sm); background: var(--surface);
}
.file-row + .file-row { margin-top: 7px; }
.file-name { flex: 1; font-weight: 600; font-size: 13px; min-width: 0; word-break: break-word; }
.file-meta { font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ============ Formuláře ============ */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.is-wide { grid-column: 1 / -1; }
.form-label { font-size: 12.5px; font-weight: 700; color: var(--ink-2); }
.form-label .req { color: var(--red); }
.form-control {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-input); background: var(--surface); color: var(--ink);
}
.form-control:focus { outline: none; border-color: var(--primary-bd); box-shadow: 0 0 0 3px var(--primary-bg); }
.form-control[readonly], .form-control:disabled { background: var(--mute-bg); color: var(--muted); }
textarea.form-control { min-height: 92px; resize: vertical; }
.form-hint { font-size: 11.5px; color: var(--muted); }
.form-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; }
.form-check input { margin-top: 3px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.fieldset-title {
    grid-column: 1 / -1; font-size: 11px; font-weight: 700; letter-spacing: .12em;
    color: var(--muted); padding-top: 8px; border-top: 1px solid var(--border-soft);
}
.fieldset-title:first-child { border-top: none; padding-top: 0; }

/* ---- Přepínač ---- */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13.5px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 40px; height: 22px; border-radius: 999px; background: #ccd3de; position: relative; transition: background 160ms ease; flex: 0 0 auto; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; transition: transform 160ms ease; }
.switch input:checked + .switch-track { background: var(--green); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }

/* ---- Editor šablon ---- */
.editor-bar {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    padding: 6px 8px; background: var(--mute-bg);
    border: 1px solid var(--border-input); border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.editor-btn {
    min-width: 28px; height: 26px; padding: 0 7px; border-radius: 6px;
    border: 1px solid transparent; background: transparent; color: var(--ink-2);
    font-size: 12.5px; cursor: pointer; line-height: 1;
}
.editor-btn:hover { background: var(--surface); border-color: var(--border-input); }
.editor-btn.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }
.editor-btn-right { margin-left: auto; }
.editor-sep { width: 1px; height: 18px; background: var(--border-input); margin: 0 4px; }

/* Vizuální editor — píše se rovnou do obsahu, ne do HTML kódu */
.editor-wysiwyg {
    min-height: 340px; max-height: 60vh; overflow-y: auto;
    padding: 14px 16px; background: var(--surface);
    border: 1px solid var(--border-input); border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-size: 14px; line-height: 1.65; color: var(--ink);
}
.editor-wysiwyg:focus { outline: none; border-color: var(--primary-bd); box-shadow: 0 0 0 3px var(--primary-bg); }
.editor-wysiwyg p { margin: 0 0 12px; }
.editor-wysiwyg p:last-child { margin-bottom: 0; }
.editor-wysiwyg ul, .editor-wysiwyg ol { margin: 0 0 12px; padding-left: 22px; }
.editor-wysiwyg a { color: var(--primary); text-decoration: underline; }
.editor-source { min-height: 340px; font-size: 12.5px; border-top-left-radius: 0; border-top-right-radius: 0; }

.var-list { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chip {
    font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; font-weight: 600;
    padding: 4px 9px; border-radius: 999px; cursor: pointer;
    background: var(--primary-bg); color: var(--primary-dark); border: 1px solid transparent;
}
.var-chip:hover { border-color: var(--primary-bd); background: var(--primary-bg-2); }

.tpl-preview {
    width: 100%; height: 620px; border: 0; display: block; background: #eef0f3;
    border-radius: 0 0 var(--radius) var(--radius);
}

/* ---- Rozbalovací detail (log) ---- */
.row-more { cursor: pointer; }
.row-more > summary {
    list-style: none; cursor: pointer; color: var(--muted); font-size: 11.5px; font-weight: 600;
}
.row-more > summary::-webkit-details-marker { display: none; }
.row-more > summary::before { content: '▸ '; }
.row-more[open] > summary::before { content: '▾ '; }
.row-more > summary:hover { color: var(--primary); }
.row-detail {
    margin-top: 7px; padding: 9px 11px; background: var(--mute-bg); border-radius: 8px;
    font-size: 11.5px; color: var(--ink-3); display: grid; gap: 3px;
}
.row-detail b { color: var(--muted); font-weight: 700; margin-right: 5px; }

.pager { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 14px; flex-wrap: wrap; }
.pager .btn { min-width: 38px; }
.pager-info { font-size: 12.5px; color: var(--muted); margin-right: 8px; }

/* ---- Záložky ---- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.tab {
    padding: 10px 15px; font-size: 13.5px; font-weight: 600; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.is-active { color: var(--primary-dark); border-bottom-color: var(--primary); }

/* ---- Hlášky ---- */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm); font-size: 13.5px;
    margin-bottom: 16px; border: 1px solid transparent;
}
.alert-success { background: var(--green-bg); border-color: #c6e2d1; color: #14532d; }
.alert-error   { background: var(--red-bg);   border-color: var(--red-bd); color: #7f2418; }
.alert-info    { background: var(--primary-bg); border-color: var(--primary-bd); color: var(--primary-dark); }
.alert-warning { background: var(--amber-bg); border-color: #e8d2a0; color: var(--amber); }

/* Výrazné varování (riziko) */
.warn-card {
    background: var(--red-bg); border: 1px solid var(--red-bd); border-radius: var(--radius); padding: 18px 20px;
    display: flex; flex-direction: column; gap: 8px;
}
.warn-label { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; color: var(--red); }
.warn-text { font-size: 13px; color: #7f2418; line-height: 1.5; }

.text-muted { color: var(--muted); }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.text-amber { color: var(--amber-strong); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }

/* ============ Přihlášení ============ */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); min-height: 100vh; }
.auth-brand {
    position: relative; overflow: hidden;
    background: var(--primary); color: #fff; padding: 44px 48px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
}
/* Jemné prosvětlení, aby plocha nebyla plochá jednobarevná */
.auth-brand::before {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(120% 90% at 78% 18%, rgba(255, 255, 255, .10), transparent 62%);
    pointer-events: none;
}
.auth-logo, .auth-foot { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 12px; }
.auth-logo-mark {
    width: 40px; height: 40px; border-radius: 12px; background: #fff;
    display: grid; place-items: center;
}
.auth-logo-mark img { display: block; width: 26px; height: 26px; object-fit: contain; }
.auth-logo-text b { display: block; font-size: 17px; font-weight: 800; }
.auth-logo-text small { font-size: 12.5px; opacity: .78; }

/* Vlny výnosové křivky — dekorace u spodní hrany, záměrně bez kontrastu */
.auth-art {
    position: absolute; inset: 0;
    pointer-events: none; z-index: 0;
}
.auth-art svg { width: 100%; height: 100%; display: block; }

.auth-foot { font-size: 12px; opacity: .72; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 32px; background: var(--bg); min-width: 0; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card .eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin: 0 0 8px; }
.auth-card h2 { font-size: 25px; margin-bottom: 8px; }
.auth-card .sub { font-size: 13.5px; color: var(--muted); margin: 0 0 22px; }
.auth-card .form-group { margin-bottom: 15px; }
.auth-links { margin-top: 18px; font-size: 12.5px; text-align: center; color: var(--muted); }

/* ============ Responzivita ============ */
.sidebar-backdrop { display: none; }

@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-side { grid-template-columns: minmax(0, 1fr); }
    .board { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 860px) {
    /* Na mobilu se z brandového panelu stane úzký pruh — jen logo. */
    .auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .auth-brand { padding: 20px 24px; gap: 0; justify-content: flex-start; }
    .auth-art, .auth-foot { display: none; }
    .auth-form-side { padding: 32px 20px; }
}

@media (max-width: 780px) {
    .sidebar {
        position: fixed; inset: 0 auto 0 0; z-index: 60; transform: translateX(-100%);
        transition: transform 220ms ease; box-shadow: var(--shadow-lg);
    }
    .sidebar.is-open { transform: none; }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(16, 23, 32, .4); z-index: 55; opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
    .sidebar-backdrop.is-shown { opacity: 1; pointer-events: auto; }
    .tb-toggle { display: inline-flex; }
    .topbar { padding: 12px 16px; }
    .tb-crumb, .tb-meta { display: none; }
    .page { padding: 18px 16px 40px; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .page-head { align-items: flex-start; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .page-actions .phase-switch, .page-actions .phase-switch select { flex: 1 1 100%; width: 100%; max-width: none; }

    /* Tabulky se mění na karty */
    .rtable thead { display: none; }
    .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
    .rtable tr {
        border: 1px solid var(--border-soft); border-radius: 12px;
        margin: 0 12px 10px; padding: 4px 0; background: var(--surface);
    }
    .rtable tr:hover { background: var(--surface); }
    .rtable td { border: none; padding: 7px 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: right; }
    .rtable td::before {
        content: attr(data-label); font-size: 11px; font-weight: 700; letter-spacing: .06em;
        text-transform: uppercase; color: var(--muted); text-align: left; flex: 0 0 auto;
    }
    .rtable td.rt-block { flex-direction: column; align-items: flex-start; text-align: left; gap: 3px; }
    .rtable td.rt-actions { justify-content: flex-end; }
    .rtable td.rt-actions::before { display: none; }
    .rtable .t-right { text-align: right; }
    .dl-row { flex-wrap: wrap; }
    .dl-when { flex-basis: 100%; display: flex; gap: 8px; align-items: baseline; }
}

@media print {
    .sidebar, .topbar, .page-actions, .toolbar, .row-actions { display: none !important; }
    .page { padding: 0; }
    .card { break-inside: avoid; box-shadow: none; }
}

/* =====================================================
   Penvera — doplňky nad převzatý design systém
   ===================================================== */

/* Řada statistických dlaždic nad obsahem stránky */
.stat-row {
    display: grid; gap: 14px; margin-bottom: 18px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.stat-note { font-size: 12px; color: var(--muted); }
.stat.is-alert { border-color: var(--red-bd); }
.stat.is-alert .stat-value { color: var(--red); }

/* Dvousloupcové rozvržení karty: hlavní obsah + postranní sloupec */
.grid-2 { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); align-items: start; }
.col-main, .col-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.card-sub { font-size: 12px; color: var(--muted); font-weight: 500; }

/* Oddíly dlouhého formuláře (nový úvěr) — barevný pruh, číslo a podbarvená hlavička,
   ať je na první pohled vidět, kde jeden oddíl končí a druhý začíná. */
.form-section { --fs: var(--primary); --fs-bg: var(--primary-bg); border-left: 4px solid var(--fs); margin-bottom: 18px; }
.form-section.tone-green { --fs: var(--green); --fs-bg: var(--green-bg); }
.form-section.tone-amber { --fs: var(--amber-strong); --fs-bg: var(--amber-bg); }
.form-section > .card-head { background: var(--fs-bg); justify-content: flex-start; }
.form-section > .card-head .card-title { font-size: 16px; }
.form-section > .card-head .card-sub { margin-left: auto; text-align: right; }
/* Tlačítko v hlavičce oddílu (např. „Vše doplnit ručně" u úvěru) — za podtitulkem vpravo. */
.form-section > .card-head .fs-actions { display: inline-flex; align-items: center; gap: 6px; margin-left: 12px; }
.fs-num {
    width: 26px; height: 26px; border-radius: 999px; flex: 0 0 auto;
    display: grid; place-items: center; background: var(--fs); color: #fff;
    font-size: 13px; font-weight: 800;
}
.card-body.is-flush { padding: 0; }

/* Prázdný stav a drobný text mimo tabulku */
.t-empty { color: var(--muted); font-size: 13px; margin: 0; }
.t-sub   { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.t-strong{ font-weight: 700; color: var(--ink); }

/* Filtrační lišta nad seznamem */
.filterbar {
    display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 16px;
}
.filterbar .form-control { max-width: 260px; }
/* Zaškrtávátka stavů pod filtrem úvěrů (16. 10. 2026) — vlastní řádek pod lištou */
.status-checks { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding-top: 2px; }
.status-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.status-check input { margin: 0; width: 15px; height: 15px; accent-color: var(--primary); }
.status-checks-all { color: var(--muted); font-size: 13px; }
/* NZ ANO / NZ NE (20. 10. 2026) — se stavy nesouvisí, proto odsazené úplně doprava */
.nz-checks { margin-left: auto; display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
/* Formulář úvěru v oknech (20. 10. 2026) — záložky jsou tlačítka, ne odkazy */
.form-tabs { margin-bottom: 14px; }
.form-tabs .tab { background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; font-family: inherit; }
.form-tabs .tab:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Formulář na jednom řádku (rychlé přidání položky pod tabulkou) */
.inline-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.inline-form .form-control { max-width: 260px; }
.inline-form form { display: inline; }

/* Řádky tabulky se zvláštním významem */
.table tr.is-late td { background: var(--red-bg-strong); }
.table tr.is-payoff td { background: var(--amber-bg); }   /* fáze Odeslané vyčíslení */
.table tr.is-highlight td { background: var(--primary-bg); font-weight: 600; }

/* Definiční seznam v postranní kartě */
.deflist { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 7px 14px; margin: 0; }
.deflist dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.deflist dd { margin: 0; font-size: 13px; color: var(--ink); text-align: right; }

/* Seznam příloh */
.filelist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.filelist li {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
    padding-bottom: 9px; border-bottom: 1px solid var(--border-soft);
}
.filelist li:last-child { border-bottom: none; padding-bottom: 0; }
.filelist li > a { display: flex; align-items: center; gap: 7px; font-size: 13px; min-width: 0; }
.filelist li .t-sub { grid-column: 1; }
.filelist li form { grid-row: 1 / span 2; grid-column: 2; }

/* Poznámkový blok */
.note-box {
    margin: 14px 0 0; padding: 11px 14px; background: var(--mute-bg);
    border-radius: var(--radius-sm); font-size: 13px; color: var(--ink-2);
}

/* Zaškrtávací mřížka (přiřazení uživatelů k firmě) */
.check-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; cursor: pointer; }
.check input { margin-top: 3px; }

/* Pruhový graf (výhled cashflow po týdnech) */
.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(150px, 210px) minmax(0, 1fr) minmax(110px, auto); gap: 12px; align-items: center; }
.bar-label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.bar-track { background: var(--mute-bg); border-radius: 999px; height: 12px; overflow: hidden; }
.bar-fill  { display: block; height: 100%; background: var(--primary); border-radius: 999px; min-width: 2px; }
.bar-value { font-size: 13px; font-weight: 700; text-align: right; }

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .bar-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .bar-value { text-align: left; }
    .deflist dd { text-align: left; }
}

/* Odkaz na návod v horní liště — po ruce z každé stránky */
.tb-help {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 11px; border-radius: 999px;
    background: var(--primary-bg); border: 1px solid var(--primary-bd);
    color: var(--primary-dark); font-size: 12.5px; font-weight: 700;
    white-space: nowrap;
}
.tb-help:hover { background: var(--primary-bg-2); text-decoration: none; }
@media (max-width: 720px) { .tb-help span { display: none; } }

/* ---- Nastavení: rozlišení systémové vs firemní roviny ---- */
.tabs-grouped { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: flex-end; }
.tabs-group { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; position: relative; }
.tabs-label {
    display: block; width: 100%; margin-bottom: 2px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--muted);
}
/* Firemní skupina je barevně odlišená, ať je poznat, co se týká jen jedné firmy. */
.tabs-group.is-company .tabs-label { color: var(--primary); }
.tabs-group.is-company .tab.is-active { border-bottom-color: var(--primary); }
.tabs-group.is-company::before {
    content: ''; position: absolute; left: -13px; top: 18px; bottom: 6px;
    border-left: 1px solid var(--border);
}

/* Výběr firmy v hlavičce nastavení */
.scope-pick { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.scope-pick .form-label { margin: 0; white-space: nowrap; font-size: 12px; color: var(--muted); }
.scope-pick select { min-width: 210px; }

@media (max-width: 720px) {
    .tabs-group.is-company::before { display: none; }
}

/* Náhled e-mailu v nastavení — izolovaný iframe, aby styly zprávy nezasáhly aplikaci */
.mail-preview {
    width: 100%; height: 420px; border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm); background: #eef0f3;
}

/* =====================================================
   Časová osa obchodu
   -----------------------------------------------------
   Na široké obrazovce se události střídají vlevo a vpravo kolem svislé linky
   (tak si to klient přál). Na úzké se srovnají pod sebe — střídání by na mobilu
   jen ubíralo místo a hůř se v něm hledá.
   ===================================================== */
.tl2 { position: relative; margin: 0; padding: 4px 0 0; list-style: none; }
.tl2::before {
    content: ''; position: absolute; left: 50%; top: 8px; bottom: 8px;
    width: 2px; margin-left: -1px; background: var(--border-soft);
}
.tl2-item { position: relative; width: 50%; padding: 0 26px 16px 0; }
.tl2-item:nth-child(odd)  { text-align: right; }
.tl2-item:nth-child(even) { margin-left: 50%; padding: 0 0 16px 26px; text-align: left; }
.tl2-dot {
    position: absolute; top: 3px; width: 11px; height: 11px; border-radius: 999px;
    background: var(--gray); border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border);
}
.tl2-item:nth-child(odd)  .tl2-dot { right: -6px; }
.tl2-item:nth-child(even) .tl2-dot { left: -6px; }
.tl2-dot.is-green { background: var(--green); }
.tl2-dot.is-red   { background: var(--red); }
.tl2-dot.is-amber { background: var(--amber-strong); }
.tl2-dot.is-blue  { background: var(--primary); }
.tl2-date   { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--muted); }
.tl2-title  { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.tl2-detail { font-size: 12.5px; color: var(--ink-3); margin-top: 1px; }

@media (max-width: 720px) {
    .tl2::before { left: 5px; margin-left: 0; }
    .tl2-item,
    .tl2-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 16px 24px; text-align: left; }
    .tl2-item:nth-child(odd)  { text-align: left; }
    .tl2-item:nth-child(odd) .tl2-dot,
    .tl2-item:nth-child(even) .tl2-dot { left: 0; right: auto; }
}

/* ---- Přehled událostí ---- */
.digest-head { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.digest-when { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11.5px;
               color: var(--muted); white-space: nowrap; flex: 0 0 92px; }

/* ---- Knihovna dokumentů ---- */
.doc-note { font-size: 12px; color: var(--amber); }
.doc-paper {
    background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--radius-sm);
    padding: 26px 30px; font-size: 14px; line-height: 1.7; color: var(--ink);
}
.doc-paper p { margin: 0 0 12px; max-width: none; }
@media print {
    .doc-paper { border: none; padding: 0; }
}

/* ---- Výplata provize: obchodník a tipař pod sebou ---- */
.payout-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--line);
}
.payout-row:last-child { border-bottom: none; }
.payout-who .t-sub { margin-top: 1px; }

/* ---- Splátkový kalendář: řádek, kde končí snížení splátky ---- */
.table tr.is-break td { border-top: 2px solid var(--primary-bd); }

/* ---- Pohled obchodníka: ukončený obchod ---- */
.agent-closed { display: flex; align-items: center; gap: 14px; padding: 26px 22px; color: var(--green); }
.agent-closed strong { color: var(--ink); font-size: 15px; }

/* =====================================================
   Portál subjektu
   -----------------------------------------------------
   Vlastní, užší rozvržení bez levého panelu: klient sem chodí párkrát za rok
   podívat se na jedno číslo, ne pracovat.
   ===================================================== */
.portal-shell { max-width: 1000px; margin: 0 auto; min-height: 100vh; }
.portal-top { gap: 20px; flex-wrap: wrap; padding: 14px 24px; }
.portal-nav { display: flex; gap: 4px; align-items: center; border: none; }
.portal-nav .tab { padding: 8px 13px; border-bottom-width: 2px; }
.portal-user { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.portal-user .avatar { width: 30px; height: 30px; font-size: 11px; }
.portal-user-name { font-size: 13px; font-weight: 700; color: var(--ink); }

.portal-foot {
    padding: 28px 24px 40px; text-align: center;
    font-size: 12.5px; color: var(--muted); line-height: 1.7;
    border-top: 1px solid var(--border-soft);
}
.portal-foot p { margin: 0; }
.portal-foot-name { font-weight: 700; color: var(--ink-2); font-size: 13px; }
.portal-foot-copy { margin-top: 8px; font-size: 11.5px; color: var(--gray); }

@media (max-width: 620px) {
    .portal-top { gap: 10px; }
    .portal-nav { order: 3; width: 100%; }
    .portal-user-name { display: none; }
}

/* =====================================================
   Odezva na myš a klávesnici
   -----------------------------------------------------
   Aplikace je z devadesáti procent seznam řádků. Když řádek ani dlaždice
   nereagují na najetí myší, člověk ztrácí, kde v tabulce je — proto jsou
   přechody krátké (120–180 ms) a jemné: nikde nic neposkakuje.
   ===================================================== */

/* ---- Řádky tabulky ---- */
.table tbody tr { transition: background 120ms ease; }

/* PAST: `.is-late td` má vyšší specifičnost než `tr:hover`, takže by u řádku
   po splatnosti hover nebyl vidět vůbec. Proto vlastní pravidlo na td. */
.table tbody tr.is-late:hover td      { background: #f0a08c; }
.table tbody tr.is-payoff:hover td    { background: #f9e7c4; }
.table tbody tr.is-highlight:hover td { background: var(--primary-bg-2); }

/* Akce na konci řádku jsou nenápadné, dokud nad řádkem není myš.
   Klávesnicová cesta se tím nezhoršuje — při zaostření jsou plně vidět. */
.table tbody td.rt-actions .btn-ghost,
.table tbody td .row-actions .btn-ghost { opacity: .55; transition: opacity 140ms ease, background 140ms ease, color 140ms ease; }
.table tbody tr:hover td.rt-actions .btn-ghost,
.table tbody tr:hover td .row-actions .btn-ghost,
.table tbody td.rt-actions .btn-ghost:focus-visible,
.table tbody td .row-actions .btn-ghost:focus-visible { opacity: 1; }

/* ---- Dlaždice a karty ---- */
.stat { transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.stat:hover { border-color: var(--primary-bd); box-shadow: var(--shadow-md); }
.stat.is-alert:hover { border-color: var(--red); }

.board-card { transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.board-card:hover { box-shadow: var(--shadow-md); }

/* Přílohy a soubory — celý řádek je cíl, tak ať to je vidět */
.file-row { transition: border-color 140ms ease, background 140ms ease; }
.file-row:hover { border-color: var(--primary-bd); background: var(--row-hover); }
.filelist li { transition: background 140ms ease; border-radius: 8px; }
.filelist li:hover { background: var(--row-hover); }

/* ---- Drobnosti ---- */
.tab { transition: color 140ms ease, border-color 140ms ease, background 140ms ease; border-radius: 8px 8px 0 0; }
.tab:hover { background: var(--row-hover); }
.filter-chip { transition: all 150ms ease; }
.tb-help { transition: background 150ms ease, border-color 150ms ease; }
.chip { transition: background 140ms ease; }
.dl-row { transition: background 140ms ease; }
.var-chip { transition: background 140ms ease, border-color 140ms ease; }
.editor-btn { transition: background 130ms ease, border-color 130ms ease, color 130ms ease; }
.sb-logout, .avatar { transition: background 140ms ease, color 140ms ease; }

/* Tlačítko se při stisku nepatrně zamáčkne — potvrzení, že klik prošel */
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-danger { transition: all 160ms ease; }

/* ---- Ovládání z klávesnice ----
   Jeden obtah na všechno, co jde zaostřit. Bez něj se v aplikaci plné
   formulářů nedá tabulátorem orientovat. */
.btn:focus-visible,
.filter-chip:focus-visible,
.tab:focus-visible,
.tb-help:focus-visible,
.sb-item:focus-visible,
.card-link:focus-visible,
.board-card:focus-visible,
.dl-row:focus-visible,
.var-chip:focus-visible,
.editor-btn:focus-visible,
.switch:focus-within .switch-track,
a:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius-sm);
}
.form-control:focus-visible { outline: none; box-shadow: var(--ring); }

/* Kdo má v systému vypnuté animace, dostane statické rozhraní. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important; animation-iteration-count: 1 !important;
        transition-duration: .001ms !important; scroll-behavior: auto !important;
    }
    .btn:active:not(:disabled) { transform: none; }
}

/* ---- Našeptávač adres RÚIAN (assets/js/ruian.js) ---- */
.ruian-wrap { position: relative; }
.ruian-list {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
    margin: 0; padding: 4px; list-style: none; max-height: 320px; overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}
.ruian-opt { padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: 13.5px; line-height: 1.35; }
.ruian-opt:hover, .ruian-opt.is-active { background: var(--primary-bg); color: var(--primary-dark); }
.ruian-sub { display: block; font-size: 11.5px; color: var(--muted); }


/* ---- QR platba v portálu (modules/portal/detail.php) ---- */
.pay-qr { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border-soft); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.qr-box { background: #fff; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); line-height: 0; }
.qr-box img, .qr-box canvas { display: block; }
.stat-pay { align-self: flex-start; margin-top: 6px; }
.pay-dialog { border: none; border-radius: var(--radius); padding: 24px; width: min(380px, calc(100% - 32px)); box-shadow: var(--shadow-lg); }
.pay-dialog::backdrop { background: rgba(16, 23, 32, .45); }
.pay-dialog h2 { font-size: 18px; margin-bottom: 14px; }
.pay-dialog .qr-box { margin: 0 auto 16px; width: max-content; }
.pay-dialog form { margin-top: 14px; text-align: right; }
.pay-dialog .fieldset-title { margin: 16px 0 8px; }
/* Tlačítko, které vypadá jako odkaz (firma u případu tipaře otevírá okno s fakturací). */
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.link-btn:hover { color: var(--primary-dark); }
/* Zelená fajfka „fakturace" pod firmou u podepsaného případu tipaře (klient 7. 10. 2026). */
.tip-invoice { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--green); }


/* ---- Úkoly: rozevírací dlaždice podbarvené podle stavu (modules/tasks/list.php) ---- */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; align-items: start; }
/* Dlaždice úkolu — stejný „plastický" jazyk jako karty v celém systému (viz vrstva
   „Plastický vzhled" na konci souboru): světlý přechod, stín --shadow, levý pruh stavu.
   Termín je jen barevný text (červeně po termínu, oranžově brzy) — sjednoceno 25. 9. 2026. */
.task-tile {
    --tt: var(--gray); --tt-bg: var(--surface-2);
    background: linear-gradient(180deg, #ffffff 0%, var(--tt-bg) 100%);
    border: 1px solid var(--border-card); border-left: 5px solid var(--tt);
    border-radius: var(--radius); box-shadow: var(--shadow);
    transition: box-shadow 160ms ease, transform 160ms ease;
}
.task-tile.tone-blue  { --tt: var(--primary); --tt-bg: var(--blue-bg); }
.task-tile.tone-red   { --tt: var(--red);     --tt-bg: var(--red-bg); }
.task-tile.tone-green { --tt: var(--green);   --tt-bg: var(--green-bg); }
.task-tile.tone-mute  { --tt: var(--gray);    --tt-bg: var(--surface-2); }
.task-tile:hover, .task-tile[open] { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.task-tile > summary {
    list-style: none; cursor: pointer; padding: 13px 38px 13px 15px; position: relative;
    display: flex; flex-direction: column; gap: 7px;
}
.task-tile > summary::-webkit-details-marker { display: none; }
.task-tile > summary::after {
    content: ''; position: absolute; right: 16px; top: 18px; width: 8px; height: 8px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform 160ms ease;
}
.task-tile[open] > summary::after { transform: rotate(-135deg); top: 22px; }
.task-tile > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: var(--radius); }
.task-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.task-due { font-size: 12px; color: var(--muted); text-align: right; }
.task-due-rel { display: block; font-size: 11px; font-family: Manrope, system-ui, sans-serif; }
.task-tile.is-late .task-due { color: var(--red); font-weight: 700; }
.task-tile.is-soon .task-due { color: var(--amber-strong); font-weight: 700; }
.task-title { font-size: 14.5px; font-weight: 800; line-height: 1.35; color: var(--ink); }
/* Důležitý úkol (tasks.important): červený vykřičník + červený rámeček; levý pruh dál ukazuje stav */
.task-flag {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 18px; height: 18px; margin-right: 6px; border-radius: 50%; vertical-align: -3px;
    background: linear-gradient(180deg, #c8492e 0%, var(--red) 100%);
    color: #fff; font-size: 12.5px; font-weight: 800; line-height: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 1px 3px rgba(163, 52, 31, .35);
}
.task-tile.is-important { border-top-color: var(--red); border-right-color: var(--red); border-bottom-color: var(--red); }
/* Životně důležitý úkol (priorita 2, 1. 10. 2026): dva vykřičníky, silnější rámeček a podbarvení. */
.task-flag.is-critical { width: auto; min-width: 22px; padding: 0 6px; border-radius: 9px; letter-spacing: 1px; font-size: 11.5px; background: linear-gradient(180deg, #a3341f 0%, #7d2414 100%); }
.task-tile.is-critical { border-width: 2px 2px 2px 5px; border-color: var(--red); background: var(--red-bg-strong, var(--red-bg)); }
.task-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.task-meta .icon { vertical-align: -2px; }
.task-tile:not(.tone-mute) .chip { background: var(--surface); }
.task-body { padding: 0 15px 14px; border-top: 1px dashed var(--border); margin-top: 2px; padding-top: 12px; }
.task-note { margin: 0 0 10px; font-size: 13px; white-space: normal; }
.task-actions { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
.task-actions form { flex: 1; }
.task-actions select { padding: 6px 8px; font-size: 12.5px; }

/* Sloupce nástěnky úkolů podle naléhavosti termínu — zapuštěná plocha, hlavička jako karta
   s barevnou linkou nahoře (bez plných barevných pruhů). */
.task-board { display: grid; gap: 16px; align-items: start; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.task-board.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.task-col {
    background: #e4e8ef; border: 1px solid var(--border-card); border-radius: var(--radius); padding: 10px;
    box-shadow: inset 0 1px 3px rgba(16, 23, 32, .07);
}
.task-col-head {
    --ch: var(--gray);
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 9px 12px;
    border-radius: var(--radius-sm); border-top: 3px solid var(--ch);
    background: linear-gradient(180deg, #ffffff 0%, var(--surface-2) 100%); box-shadow: var(--shadow);
    font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.task-col-head.tone-red   { --ch: var(--red);          color: var(--red); }
.task-col-head.tone-amber { --ch: var(--amber-strong); color: var(--amber-strong); }
.task-col-head.tone-green { --ch: var(--green);        color: var(--green); }
.task-col-list { display: flex; flex-direction: column; gap: 10px; }
.task-col-empty { margin: 4px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 1100px) { .task-board, .task-board.cols-4 { grid-template-columns: 1fr; } }

/* Legenda barev stavů úkolů vedle filtrů */
.task-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; list-style: none; margin: 0 0 0 auto; padding: 0; font-size: 12.5px; color: var(--muted); }
.task-legend li { display: inline-flex; align-items: center; gap: 6px; }
.task-swatch { width: 22px; height: 15px; border-radius: 4px; border: 1px solid var(--border-card); border-left: 4px solid var(--tt);
    background: linear-gradient(180deg, #fff 0%, var(--tt-bg) 100%); box-shadow: var(--shadow);
    --tt: var(--gray); --tt-bg: var(--surface-2); }
.task-swatch.tone-blue  { --tt: var(--primary); --tt-bg: var(--blue-bg); }
.task-swatch.tone-red   { --tt: var(--red);     --tt-bg: var(--red-bg); }
.task-swatch.tone-green { --tt: var(--green);   --tt-bg: var(--green-bg); }
.task-legend-due { padding-left: 10px; border-left: 1px solid var(--border); }
.task-legend-due .text-red { font-weight: 700; }

/* Přehled investora — rozpad podle firem */
.inv-firm + .inv-firm { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-soft); }
.inv-firm-name { margin: 0 0 8px; font-weight: 800; font-size: 13.5px; }

/* Portál / přehled investora: dlaždice jsou úzké — ikona nad textem, částka na jeden řádek */
.portal .stat.has-icon { flex-direction: column; gap: 10px; }
.portal .stat.has-icon .stat-value { font-size: 24px; white-space: nowrap; }

/* ---- Mobilní opravy (25. 9. 2026) ---- */
@media (max-width: 900px) {
    /* Částky v souhrnech zůstávají vpravo — pod sebou se čtou líp než nalepené na popisek */
    .deflist dd.num { text-align: right; }
}
@media (max-width: 780px) {
    /* PAST: karta tabulky měla width:100 % A ZÁROVEŇ okraje 12 px → o 24 px širší než
       obrazovka a vpravo useknutá (týkalo se všech tabulek v aplikaci). */
    .rtable tr { width: auto; }
    .stats-filter { display: flex; width: 100%; }
    .stats-filter select:first-child { flex: 0 0 96px; }
    .stats-filter select + select { flex: 1 1 auto; min-width: 0; }
    /* Portál a přehledy tipaře/investora: na telefonu je dlaždice široká — ikona zase vedle textu */
    .portal .stat.has-icon { flex-direction: row; }
}
@media (max-width: 780px) {
    /* Na kartě tabulky se částka nezalamuje, ale dovětek (např. „dluží … · N dnů") jde na další řádek */
    .rtable td.num { flex-wrap: wrap; white-space: normal; }
    .rtable td.num .t-sub { flex-basis: 100%; text-align: right; white-space: normal; margin-top: 0; }
}
@media (max-width: 780px) {
    .toolbar .form-control { flex: 1 1 100%; max-width: none !important; }
    .task-legend { margin-left: 0; }
    .task-legend-due { padding-left: 0; border-left: none; }
}

/* Žádost o vyčíslení v portálu */
.balance-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.balance-form .btn { align-self: flex-start; }

/* Rozdělení zisku akce (karta obchodu) a pravidla na stránce Společníci */
.split-box { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line, #e3e7ee); }
.split-title { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.split-box dt .t-sub { display: inline; }
.t-warn { color: var(--amber); }
.rules-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.period-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.period-bar .form-control { max-width: 170px; }

/* Buňka tabulky, která je celou plochou odkazem (seznam úvěrů a rizikových obchodů:
   sloupce Typ a Obchod → detail). Odkaz se přes ::after roztáhne na celou buňku. */
.table td.is-link { position: relative; cursor: pointer; }
.table td.is-link .cell-link { text-decoration: none; }
.table td.is-link .cell-link::after { content: ''; position: absolute; inset: 0; }
/* Nádech přes stín, ne přes pozadí — červený řádek (vymáhání) si tak barvu ponechá */
.table tbody tr:hover td.is-link { box-shadow: inset 0 0 0 999px rgba(55, 130, 231, .08); }
.table tbody tr:hover td.is-link .t-strong { text-decoration: underline; }

/* =====================================================================
   PLASTICKÝ VZHLED CELÉHO SYSTÉMU (25. 9. 2026, přání klienta: „výraznější
   a plastičtější, ale decentně a jednotně").
   Jedna vrstva pro všechny stránky (správa, portál, tipař, investor):
   - plochy (karty, dlaždice, hlavičky) mají jemný přechod shora ze světlé
     a vrstvený stín s bílým odleskem nahoře → působí vystouple;
   - ovládací prvky (tlačítka, filtry) jsou „knoflíky" s přechodem a stínem,
     při stisku se zamáčknou; vstupní pole jsou naopak lehce zapuštěná;
   - barvy stavů zůstávají pastelové, jen s tenkým vnitřním obrysem.
   Barvy a stíny se berou z proměnných, takže je jde doladit na jednom místě.
   ===================================================================== */
:root {
    --bg: #e7ebf1;                 /* o chlup tmavší podklad → plochy víc vystoupí */
    --border-card: #d9dfe8;
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .9),
              0 1px 2px rgba(16, 23, 32, .07),
              0 3px 10px -3px rgba(16, 23, 32, .10);
    --shadow-md: inset 0 1px 0 rgba(255, 255, 255, .9),
                 0 2px 4px rgba(16, 23, 32, .07),
                 0 10px 24px -8px rgba(16, 23, 32, .20);
    --surface-grad: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%);
    --head-grad: linear-gradient(180deg, #fbfcfe 0%, #f2f5f9 100%);
    --btn-grad: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    --btn-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(16, 23, 32, .10), 0 2px 5px -2px rgba(16, 23, 32, .12);
    --press-shadow: inset 0 2px 3px rgba(16, 23, 32, .12);
}

/* Plochy */
.card, .stat, .board-card { background: var(--surface-grad); box-shadow: var(--shadow); }
.card-head { background: var(--head-grad); border-bottom-color: #e3e8f0; }
.stat:hover { box-shadow: var(--shadow-md); }
.stat-icon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 2px 5px -2px rgba(16, 23, 32, .18); }
.alert { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 1px 3px rgba(16, 23, 32, .06); }
.topbar { box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 2px 8px -4px rgba(16, 23, 32, .12); }

/* Tabulky: hlavička jako lišta, řádek pod myší zvýrazněný */
.table th { background: var(--head-grad); border-bottom-color: #dfe5ee; }

/* Tlačítka = knoflíky */
.btn { background: var(--btn-grad); box-shadow: var(--btn-shadow); border-color: #d2d9e4; }
.btn:hover { background: linear-gradient(180deg, #ffffff 0%, var(--primary-bg) 100%); border-color: var(--primary-bd); }
.btn:active:not(:disabled) { box-shadow: var(--press-shadow); }
.btn-primary {
    background: linear-gradient(180deg, #4b93ee 0%, #2f74d6 100%); border-color: #2a6bc8; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(16, 23, 32, .12), 0 3px 8px -3px rgba(47, 116, 214, .55);
}
.btn-primary:hover { background: linear-gradient(180deg, #3f88e6 0%, #2466c4 100%); border-color: #2260b8; color: #fff; }
.btn-dark { background: linear-gradient(180deg, #334259 0%, #1f2c40 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 2px 6px -2px rgba(16, 23, 32, .45); }
.btn-danger { background: linear-gradient(180deg, #ffffff 0%, #fdf1ee 100%); border-color: var(--red-bd); }
.btn-danger:hover { background: linear-gradient(180deg, #fff7f5 0%, var(--red-bg) 100%); }
.btn-ghost, .btn-ghost:hover { background: transparent; box-shadow: none; border-color: transparent; }
.btn-ghost:hover { background: var(--mute-bg); }
.filter-chip { background: var(--btn-grad); box-shadow: var(--btn-shadow); }
.filter-chip.is-active { background: linear-gradient(180deg, #4b93ee 0%, #2f74d6 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 2px 6px -2px rgba(47, 116, 214, .5); }

/* Vstupní pole = lehce zapuštěná */
.form-control, .tb-search input, .phase-switch select { box-shadow: inset 0 1px 2px rgba(16, 23, 32, .06); }
.form-control:focus, .tb-search input:focus { box-shadow: inset 0 1px 2px rgba(16, 23, 32, .06), 0 0 0 3px var(--primary-bg); }
.switch-track { box-shadow: inset 0 1px 3px rgba(16, 23, 32, .18); }
.switch-track::after { box-shadow: 0 1px 3px rgba(16, 23, 32, .30); }

/* Štítky: pastelové, s tenkým obrysem v barvě textu — čitelné, ale ne křiklavé */
.chip { box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent); }

/* Tmavé menu: aktivní položka jako vystouplý knoflík */
.sb-item.is-active {
    background: linear-gradient(180deg, rgba(75, 147, 238, .34) 0%, rgba(55, 130, 231, .20) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10), 0 2px 6px -2px rgba(0, 0, 0, .45);
}
.sb-firm-switch select, .sb-firm-box { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 3px rgba(0, 0, 0, .25); }
.sb-deadline { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 2px 8px -3px rgba(0, 0, 0, .45); }

/* ---- Automatické úlohy (27. 9. 2026, převzato z Finance) ---- */
.kn-status { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 16px;
    border: 1px solid; border-left-width: 6px; border-radius: var(--radius-sm, 10px); background: #fff; }
.kn-status .kn-ico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; color: #fff; }
.kn-status .kn-main { flex: 1; min-width: 0; }
.kn-status .kn-eyebrow { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.kn-status .kn-title { font-size: 16px; font-weight: 700; margin-top: 2px; }
.kn-status .kn-text { font-size: 13px; margin-top: 3px; }
.kn-status .kn-meta { font-size: 11.5px; margin-top: 6px; opacity: .8; }
.kn-status.is-alarm { border-color: var(--red-bd, #e5d2cd); border-left-color: var(--red); background: var(--red-bg); color: #6b2a20; }
.kn-status.is-alarm .kn-ico { background: var(--red); }
.kn-status.is-alarm .kn-title { color: var(--red); }
tr.kn-row-alarm td { background: var(--red-bg); }
tr.kn-row-alarm td:first-child { box-shadow: inset 5px 0 0 var(--red); }
tr.kn-row-wait td:first-child { box-shadow: inset 5px 0 0 var(--amber-strong, #9c7c3a); }
tr.kn-row-ok td:first-child { box-shadow: inset 5px 0 0 var(--green); }
.cron-out { margin: 8px 0 0; padding: 10px 12px; max-height: 320px; overflow: auto; background: var(--surface-2, #f6f8fc); border: 1px solid var(--border-soft, #e7ecf4);
    border-radius: 10px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.cron-tab { font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.6; white-space: pre; }
.cron-hist-row td { padding-top: 0 !important; background: transparent !important; }
.cron-hist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cron-hist summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; }

/* ---- Datová schránka (modules/datovka, 27. 9. 2026) ---- */
.nav-badge { display: inline-block; min-width: 20px; padding: 1px 7px; margin-left: 4px; border-radius: 999px;
    font-size: 11px; font-weight: 700; line-height: 1.5; text-align: center; background: var(--mute-bg); color: var(--muted-2); }
.nav-badge.is-alert { background: var(--red-bg-strong); color: #7f2418; }
.table tbody tr.is-unread td { background: var(--primary-bg); }
.table tbody tr.is-unread td:first-child { box-shadow: inset 4px 0 0 var(--primary); }
.ds-results { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--ink-3); }
.ds-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; cursor: pointer;
    padding: 8px 10px; border: 1px solid var(--border-card); border-radius: var(--radius-sm); background: var(--btn-grad, #fff); box-shadow: var(--btn-shadow, none);
    font: inherit; color: var(--ink); }
.ds-hit:hover { border-color: var(--primary-bd); }
.ds-hit span { font-size: 11.5px; color: var(--muted); }

/* =====================================================================
   REVIZE GRAFIKY (27. 9. 2026): sytější barvy, plastická značka, výběr firmy
   v hlavičce a pohyb stránky. Navazuje na vrstvu „Plastický vzhled" výš —
   jen dolaďuje; tokeny barev a stínů zůstávají na jednom místě.
   Pohyb vypne systémové nastavení „omezit animace" (prefers-reduced-motion).
   ===================================================================== */
:root {
    --bg: #e4e9f1;
    --primary-bg: #e3eefd;
    --primary-bg-2: #cfe2fb;
    --green-bg: #dcf2e5;
    --red-bg: #fde2dc;
    --amber-bg: #fdeccd;
    --mute-bg: #e9edf3;
    --accent-grad: linear-gradient(90deg, #3782e7 0%, #5fa4f5 60%, #8ac0ff 100%);
}
/* Jemný barevný nádech podkladu — plocha nepůsobí šedivě ploše. */
body {
    background:
        radial-gradient(1100px 520px at 100% -8%, rgba(55, 130, 231, .13), transparent 62%),
        radial-gradient(900px 480px at 18% 108%, rgba(31, 44, 64, .07), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}
/* Štítky sytější a s přechodem */
.chip-green { background: linear-gradient(180deg, #e8f7ee, #d3eedd); color: #0b6139; }
.chip-red   { background: linear-gradient(180deg, #feebe6, #fbd6cc); color: #962b17; }
.chip-amber { background: linear-gradient(180deg, #fef3dd, #fce3b6); color: #7d520b; }
.chip-orange { background: linear-gradient(180deg, #ffeedd, #fdd3ab); color: #94420a; }
.chip-blue  { background: linear-gradient(180deg, #ebf3fe, #d3e5fc); color: #1f5fbf; }

/* ---- Tmavé menu ---- */
.sidebar { background: linear-gradient(180deg, #243349 0%, #1f2c40 42%, #172233 100%); }
.sb-item { transition: background 160ms ease, color 160ms ease, transform 160ms ease; }
.sb-item:hover { transform: translateX(2px); }
.sb-item.is-active {
    background: linear-gradient(180deg, rgba(90, 160, 245, .42) 0%, rgba(55, 130, 231, .26) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 3px 10px -3px rgba(55, 130, 231, .55), 0 2px 6px -2px rgba(0, 0, 0, .45);
    color: #fff;
}
.sb-item.is-active .icon { opacity: 1; }
.sb-count { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }

/* ---- Plastická značka ---- */
.sb-brand { gap: 12px; padding: 2px 4px; }
.sb-logo-tile {
    width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px; display: grid; place-items: center;
    background: linear-gradient(180deg, #ffffff 0%, #e6edf7 55%, #cfdaea 100%);
    box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(31, 44, 64, .12),
                0 1px 1px rgba(0, 0, 0, .25), 0 6px 14px -4px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .08);
    transition: transform 220ms ease, box-shadow 220ms ease;
}
.sb-logo-img { width: 30px; height: 30px; display: block; }
.sb-brand:hover .sb-logo-tile {
    transform: translateY(-1px) rotate(-3deg);
    box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(31, 44, 64, .12), 0 2px 2px rgba(0, 0, 0, .25), 0 10px 20px -6px rgba(55, 130, 231, .6);
}
.sb-brand-text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.sidebar .sb-brand-name {
    font-size: 20px; font-weight: 800; letter-spacing: -.03em;
    background: linear-gradient(180deg, #ffffff 0%, #c9dcf5 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sb-brand-sub { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.portal-top .sb-logo-tile { width: 38px; height: 38px; border-radius: 12px; box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(31, 44, 64, .12), 0 1px 2px rgba(16, 23, 32, .18), 0 5px 12px -5px rgba(16, 23, 32, .35); }
.portal-top .sb-logo-img { width: 27px; height: 27px; }

/* ---- Výběr firmy v hlavičce ---- */
.tb-firm {
    display: inline-flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; margin: 0;
    padding: 4px 6px 4px 5px; border-radius: 12px; border: 1px solid #cfd8e5;
    background: var(--btn-grad, #fff); box-shadow: var(--btn-shadow, none);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.tb-firm:hover, .tb-firm:focus-within { border-color: var(--primary-bd); box-shadow: var(--btn-shadow, none), 0 0 0 3px var(--primary-bg); }
.tb-firm-icon {
    width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; color: #fff;
    background: linear-gradient(180deg, #5fa4f5 0%, #2f74d6 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 2px 5px -1px rgba(47, 116, 214, .55);
}
.tb-firm select {
    appearance: none; -webkit-appearance: none; border: 0; background-color: transparent; cursor: pointer; min-width: 0;
    font: inherit; font-size: 14px; font-weight: 800; color: var(--ink); padding: 4px 24px 4px 2px; max-width: 230px; text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235f6b7a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 4px center;
}
.tb-firm select:focus-visible { outline: none; }
.tb-firm.is-single { padding-right: 12px; }
.tb-firm-name { font-size: 14px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 230px; }
.topbar { transition: box-shadow 200ms ease, background 200ms ease; }
.topbar.is-scrolled { background: rgba(236, 240, 246, .95); box-shadow: 0 1px 0 rgba(255, 255, 255, .7) inset, 0 8px 22px -12px rgba(16, 23, 32, .35); }
@media (max-width: 900px) {
    /* Na mobilu: menu + firma v prvním řádku, hledání pod nimi přes celou šířku. */
    .topbar { flex-wrap: wrap; row-gap: 10px; }
    .tb-firm { flex: 1 1 auto; }
    .tb-firm select, .tb-firm-name { max-width: none; width: 100%; }
    .tb-search { order: 5; flex: 1 1 100%; max-width: none; }
}
/* Dlaždice s ikonou (Statistika) jsou užší — menší číslo, ať se „Kč" nezalamuje. */
.stat.has-icon .stat-value { font-size: clamp(20px, 1.9vw, 26px); white-space: nowrap; }

/* ---- Dlaždice s čísly: barevná linka nahoře ---- */
.stat { position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--accent-grad); opacity: .85; }
.stat.is-alert::before, .stat.is-red::before { background: linear-gradient(90deg, #c0391f, #ef7a5e); }
.stat.is-green::before { background: linear-gradient(90deg, #0f6c42, #3fbf7f); }
.stat.is-amber::before { background: linear-gradient(90deg, #b8760f, #f0b64a); }
.stat-label { color: #4d5b70; }
.stat:hover { transform: translateY(-2px); }

/* ---- Hlavní tlačítko: při najetí přejede lesk ---- */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-18deg);
}
.btn-primary:hover::after { animation: pvSheen 700ms ease; }
@keyframes pvSheen { from { left: -60%; } to { left: 130%; } }

/* ---- Karty ---- */
.card { transition: box-shadow 200ms ease; }
.card:hover { box-shadow: var(--shadow-md); }

/* ---- Rozpohybování stránky: obsah postupně nabíhá ---- */
.page { animation: none; }
@keyframes pvRise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.page > * { animation: pvRise 460ms cubic-bezier(.2, .7, .2, 1) both; }
.page > *:nth-child(2) { animation-delay: 50ms; }
.page > *:nth-child(3) { animation-delay: 100ms; }
.page > *:nth-child(4) { animation-delay: 150ms; }
.page > *:nth-child(5) { animation-delay: 200ms; }
.page > *:nth-child(n+6) { animation-delay: 250ms; }
.stat-row > .stat { animation: pvRise 520ms cubic-bezier(.2, .7, .2, 1) both; }
.stat-row > .stat:nth-child(2) { animation-delay: 70ms; }
.stat-row > .stat:nth-child(3) { animation-delay: 140ms; }
.stat-row > .stat:nth-child(4) { animation-delay: 210ms; }
.stat-row > .stat:nth-child(n+5) { animation-delay: 280ms; }
.sb-group { animation: pvRise 420ms ease both; }
.sb-group:nth-child(2) { animation-delay: 40ms; }
.sb-group:nth-child(3) { animation-delay: 80ms; }
.sb-group:nth-child(4) { animation-delay: 120ms; }
.sb-group:nth-child(n+5) { animation-delay: 160ms; }
@media (prefers-reduced-motion: reduce) {
    .page > *, .stat-row > .stat, .sb-group { animation: none !important; }
    .stat:hover, .sb-item:hover, .sb-brand:hover .sb-logo-tile { transform: none; }
}

/* =====================================================================
   PŘIHLAŠOVACÍ OBRAZOVKA — revize 27. 9. 2026 (templates/auth_brand.php)
   Tmavý přechod značky, plující světelné skvrny, tečková mřížka, vykreslující
   se křivka výnosu, velká plastická značka a formulář na vystouplé kartě.
   ===================================================================== */
.auth-brand {
    background:
        radial-gradient(120% 80% at 100% 0%, rgba(95, 164, 245, .35), transparent 55%),
        linear-gradient(155deg, #1b2a42 0%, #1f3b66 45%, #2a66c4 100%);
    isolation: isolate;
}
.auth-brand::before { background: radial-gradient(90% 60% at 20% 110%, rgba(138, 192, 255, .22), transparent 65%); z-index: 0; }

/* Plující světelné skvrny */
.auth-glow { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.auth-glow span { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.auth-glow span:nth-child(1) { width: 380px; height: 380px; left: -90px; top: 18%; background: #3f8cf0; animation: authFloatA 18s ease-in-out infinite alternate; }
.auth-glow span:nth-child(2) { width: 300px; height: 300px; right: -60px; top: -40px; background: #8ac0ff; opacity: .35; animation: authFloatB 22s ease-in-out infinite alternate; }
.auth-glow span:nth-child(3) { width: 260px; height: 260px; left: 45%; bottom: -80px; background: #5b8fe0; opacity: .4; animation: authFloatA 26s ease-in-out infinite alternate-reverse; }
@keyframes authFloatA { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, -40px) scale(1.15); } }
@keyframes authFloatB { from { transform: translate(0, 0) scale(1); } to { transform: translate(-50px, 60px) scale(.9); } }

/* Tečková mřížka, směrem dolů mizí */
.auth-dots {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .5) 45%, transparent 80%);
            mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .5) 45%, transparent 80%);
}

/* Malá značka nahoře */
.auth-logo-mark {
    width: 42px; height: 42px; border-radius: 13px;
    background: linear-gradient(180deg, #ffffff 0%, #e6edf7 55%, #cfdaea 100%);
    box-shadow: inset 0 1px 0 #fff, inset 0 -2px 3px rgba(31, 44, 64, .12), 0 6px 14px -4px rgba(0, 0, 0, .5);
}
.auth-logo-mark img { width: 29px; height: 29px; }
.auth-logo-text b { font-size: 19px; letter-spacing: -.02em; }

/* Hlavní plocha: velká plastická značka a titulek */
.auth-hero { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; max-width: 470px; }
.auth-emblem { position: relative; width: 150px; height: 170px; }
.auth-emblem-tile {
    position: absolute; left: 0; top: 0; width: 150px; height: 150px; border-radius: 40px; display: grid; place-items: center;
    background:
        radial-gradient(120% 70% at 30% 0%, rgba(255, 255, 255, .95), transparent 60%),
        linear-gradient(180deg, #ffffff 0%, #e9eff8 45%, #c9d6e8 100%);
    box-shadow:
        inset 0 2px 0 #fff, inset 0 -6px 10px rgba(31, 44, 64, .16), inset 0 0 0 1px rgba(255, 255, 255, .6),
        0 2px 3px rgba(0, 0, 0, .25), 0 22px 40px -12px rgba(5, 12, 26, .65), 0 0 0 6px rgba(255, 255, 255, .08);
    animation: authBob 6s ease-in-out infinite;
}
.auth-emblem-tile::after {
    /* lesklý odlesk přes horní polovinu */
    content: ''; position: absolute; inset: 6px 6px 50% 6px; border-radius: 34px 34px 60% 60% / 34px 34px 30% 30%;
    background: linear-gradient(180deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0)); pointer-events: none;
}
.auth-emblem-tile img { width: 96px; height: 96px; position: relative; z-index: 1; filter: drop-shadow(0 3px 3px rgba(12, 22, 40, .28)); }
.auth-emblem-shadow {
    position: absolute; left: 20px; right: 20px; bottom: 0; height: 16px; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(3, 9, 20, .45), transparent); animation: authShadow 6s ease-in-out infinite;
}
@keyframes authBob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-10px) rotate(1deg); } }
@keyframes authShadow { 0%, 100% { transform: scaleX(1); opacity: 1; } 50% { transform: scaleX(.82); opacity: .65; } }
.auth-title { margin: 0; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; font-weight: 800; letter-spacing: -.03em; color: #fff; text-wrap: balance;
    text-shadow: 0 2px 12px rgba(5, 12, 26, .35); }
.auth-points { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.auth-points li {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: #eaf2ff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* Křivka výnosu se vykreslí */
.auth-curve, .auth-curve-glow { stroke-dasharray: 760; stroke-dashoffset: 760; animation: authDraw 2.2s cubic-bezier(.4, .1, .2, 1) .3s forwards; }
.auth-curve-dot { opacity: 0; animation: authDot .5s ease 2.3s forwards; }
@keyframes authDraw { to { stroke-dashoffset: 0; } }
@keyframes authDot { to { opacity: 1; } }

/* Formulář na vystouplé kartě */
.auth-form-side {
    background:
        radial-gradient(700px 400px at 100% 0%, rgba(55, 130, 231, .10), transparent 60%),
        var(--bg);
}
.auth-card {
    max-width: 400px; padding: 34px 32px; border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfd 100%); border: 1px solid #dde4ee;
    box-shadow: inset 0 1px 0 #fff, 0 2px 4px rgba(16, 23, 32, .05), 0 24px 50px -24px rgba(16, 23, 32, .35);
    animation: pvRise 520ms cubic-bezier(.2, .7, .2, 1) both;
}
.auth-card h2 { font-size: 27px; }
.auth-card .eyebrow { color: var(--primary); }

@media (max-width: 860px) {
    .auth-hero, .auth-glow span:nth-child(3) { display: none; }
    .auth-card { padding: 26px 20px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-glow span, .auth-emblem-tile, .auth-emblem-shadow, .auth-card { animation: none !important; }
    .auth-curve, .auth-curve-glow { animation: none; stroke-dashoffset: 0; }
    .auth-curve-dot { animation: none; opacity: 1; }
}

/* Logout is a small POST form (CSRF) since 27 Sep 2026 - buttons look like the former links */
.logout-form { display: inline-flex; margin: 0; }
button.sb-logout { background: none; border: 0; cursor: pointer; font: inherit; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; }
.link-button:hover { text-decoration: underline; }
form.auth-links { display: block; }

/* ---- Instalační pruh PWA na mobilu (assets/js/pwa-install.js) — 28. 9. 2026 ----
   Styly chyběly úplně, takže se ikona vykreslila v plné velikosti 192 px. */
.pwa-install-banner {
    position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 300;
    display: flex; align-items: center; gap: 12px;
    padding: 10px 10px 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--surface, #fff); border: 1px solid var(--border, #dfe4ec); border-radius: 16px;
    box-shadow: 0 12px 34px rgba(15, 19, 25, .22);
    transform: translateY(160%); transition: transform .28s ease;
}
.pwa-install-banner.show { transform: none; }
.pwa-install-banner .pwa-install-icon { width: 40px; height: 40px; max-width: 40px; border-radius: 10px; flex: none; object-fit: contain; }
.pwa-install-text { flex: 1; min-width: 0; line-height: 1.3; }
.pwa-install-text strong { display: block; font-size: 14px; color: var(--ink, #1f2c40); }
.pwa-install-text span { display: block; font-size: 12.5px; color: var(--muted, #5f6b7a); }
.pwa-install-btn {
    flex: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 13px;
    background: var(--primary, #3782e7); color: #fff; padding: 8px 14px; border-radius: 10px;
}
.pwa-install-x {
    flex: none; border: 0; background: none; cursor: pointer; font: inherit;
    color: var(--muted, #5f6b7a); font-size: 22px; line-height: 1; padding: 4px 6px;
}
@media (min-width: 821px) { .pwa-install-banner { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .pwa-install-banner { transition: none; } }

/* =====================================================================
   PORTÁL — NOČNÍ VZHLED (1. 10. 2026)
   Klient: prostředí klientů a investorů má být živější, v portálu „bílá na bílé".
   Podle jeho předlohy: tmavý podklad v barvě loga (#1f2c40), tmavé karty, modrá
   hlavní karta. Platí pro vše pod <body class="portal pt-dark"> (klient, tipař, investor);
   17. 11. 2026: jen když je zvolen tmavý vzhled (přepínač v záhlaví, výchozí tmavý; pt-light = světlý);
   interní část systému zůstává světlá. Většinu dělají přepsané proměnné, níže jen
   místa, kde jsou ve vrstvách výš barvy natvrdo.
   ===================================================================== */
body.portal.pt-dark {
    --bg: #161b26;
    --surface: #222a3a;
    --surface-2: #1d2433;
    --border: #2f3a4e;
    --border-soft: #2a3446;
    --border-card: #313c51;
    --border-input: #3a465c;
    --ink: #eef2f8;
    --ink-2: #d5dce8;
    --ink-3: #b7c1d1;
    --muted: #96a2b6;
    --muted-2: #8a97ab;
    --gray: #7c889c;
    --primary: #5b9af0;
    --primary-dark: #3f84e6;
    --primary-bg: rgba(91, 154, 240, .16);
    --primary-bg-2: rgba(91, 154, 240, .26);
    --primary-bd: rgba(91, 154, 240, .45);
    --blue: #7fb0f5;  --blue-bg: rgba(91, 154, 240, .16);
    --green: #6fd39b; --green-bg: rgba(111, 211, 155, .14);
    --red: #ff8a73;   --red-bg: rgba(255, 138, 115, .14); --red-bd: rgba(255, 138, 115, .4);
    --red-bg-strong: rgba(255, 138, 115, .20);
    --amber: #f1c46b; --amber-bg: rgba(241, 196, 107, .14); --amber-strong: #f1c46b;
    --mute-bg: #2a3346;
    --row-hover: #283146;
    --head-bg: #1f2738;
    --line: #2c3649;
    --surface-grad: linear-gradient(180deg, #252e40 0%, #212939 100%);
    --head-grad: linear-gradient(180deg, #262f42 0%, #222a3b 100%);
    --btn-grad: linear-gradient(180deg, #2c364b 0%, #252e41 100%);
    --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 1px 2px rgba(0, 0, 0, .35);
    --shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px -8px rgba(0, 0, 0, .45);
    --shadow-md: inset 0 1px 0 rgba(255, 255, 255, .05), 0 2px 4px rgba(0, 0, 0, .3), 0 12px 28px -10px rgba(0, 0, 0, .55);
    --shadow-lg: 0 20px 50px -12px rgba(0, 0, 0, .65);
    color-scheme: dark;
    color: var(--ink);
    background:
        radial-gradient(1000px 520px at 92% -10%, rgba(55, 130, 231, .16), transparent 62%),
        radial-gradient(900px 520px at 0% 110%, rgba(55, 130, 231, .08), transparent 60%),
        var(--bg);
    background-attachment: fixed;
}
body.portal.pt-dark .portal-top { background: rgba(31, 39, 56, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); box-shadow: 0 6px 20px -12px rgba(0, 0, 0, .6); }
body.portal.pt-dark .sb-brand-name, body.portal.pt-dark .page-title, body.portal.pt-dark h1, body.portal.pt-dark h2, body.portal.pt-dark h3 { color: var(--ink); }
body.portal.pt-dark .card-head, body.portal.pt-dark .table th { border-bottom-color: var(--border); }
body.portal.pt-dark .table td { border-bottom-color: var(--line); }
body.portal.pt-dark .btn { border-color: var(--border-input); color: var(--ink-2); }
body.portal.pt-dark .btn:hover { background: linear-gradient(180deg, #33405a 0%, #2b364d 100%); border-color: var(--primary-bd); color: var(--ink); }
body.portal.pt-dark .btn-primary, body.portal.pt-dark .btn-primary:hover { color: #fff; }
body.portal.pt-dark .btn-ghost, body.portal.pt-dark .btn-ghost:hover { background: transparent; border-color: transparent; }
body.portal.pt-dark .form-control { background: #1b2232; color: var(--ink); }
body.portal.pt-dark .alert { box-shadow: none; }
body.portal.pt-dark .chip { background: var(--mute-bg); color: var(--ink-2); }
body.portal.pt-dark .chip-green { background: var(--green-bg); color: var(--green); }
body.portal.pt-dark .chip-red   { background: var(--red-bg);   color: var(--red); }
body.portal.pt-dark .chip-amber { background: var(--amber-bg); color: var(--amber); }
body.portal.pt-dark .chip-orange { background: rgba(255, 153, 72, .16); color: #ffab66; }
body.portal.pt-dark .tip-invoice { color: var(--green); }
body.portal.pt-dark .chip-blue  { background: var(--blue-bg);  color: var(--blue); }
body.portal.pt-dark .pay-dialog { background: #222a3a; color: var(--ink); }
body.portal.pt-dark .qr-box { background: #fff; padding: 10px; border-radius: 12px; }   /* QR kód musí zůstat černý na bílé */
body.portal.pt-dark .portal-foot-name { color: var(--ink-2); }
body.portal.pt-dark .stat-label { color: var(--ink-3); }

/* ---- Přehled investora podle předlohy (body.portal-investor) ---- */
.inv-head { align-items: center; flex-wrap: nowrap; }
.inv-sum-note { color: var(--muted); font-weight: 500; }
.inv-head .page-title { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; }
.inv-eye { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--btn-grad); border: 1px solid var(--border-input); color: var(--ink-2); cursor: pointer; flex: none; }
.inv-eye:hover { color: var(--ink); border-color: var(--primary-bd); }
.inv-eye[aria-pressed="true"] { background: var(--primary-bg-2); color: var(--ink); }

.inv-top { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 18px; margin-bottom: 26px; }
.inv-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 30px 30px 26px; color: #fff;
    background: linear-gradient(135deg, #2d4ea6 0%, #3456b3 55%, #2f4fa8 100%);
    box-shadow: 0 18px 40px -18px rgba(45, 78, 166, .8), inset 0 1px 0 rgba(255, 255, 255, .12); }
.inv-hero::after { content: ""; position: absolute; width: 420px; height: 420px; right: -120px; top: -150px; border-radius: 50%;
    border: 70px solid rgba(255, 255, 255, .06); pointer-events: none; }
.inv-hero-label { margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .16em; color: rgba(255, 255, 255, .82); }
.inv-hero-value { margin: 14px 0 6px; font-size: clamp(38px, 6vw, 62px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.inv-hero-value small, .inv-earned-value small { font-size: .5em; font-weight: 600; letter-spacing: 0; }
.inv-hero-sub { margin: 0; color: rgba(255, 255, 255, .85); font-size: 15px; }
.inv-hero-foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 24px; padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .18); position: relative; z-index: 1; }
.inv-hero-foot .is-right { text-align: right; }
.inv-hero-k { display: block; font-size: 14px; color: rgba(255, 255, 255, .85); }
.inv-hero-v { display: block; margin-top: 4px; font-size: 22px; font-weight: 700; }
.inv-hero .fhelp { color: #fff; background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .3); }

.inv-card { background: var(--surface-grad); border: 1px solid var(--border-card); border-radius: 22px; padding: 24px; box-shadow: var(--shadow); }
.inv-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--primary-bg-2); color: var(--blue); }
.inv-earned-label { margin: 16px 0 0; font-size: 16px; color: var(--ink-3); }
.inv-earned-value { margin: 6px 0 4px; font-size: clamp(32px, 4.5vw, 46px); font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.inv-muted { display: block; color: var(--muted); font-size: 13.5px; margin: 0; }
.inv-ok { display: flex; align-items: center; gap: 8px; margin: 16px 0 0; color: var(--green); font-size: 14px; }

.inv-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.inv-section-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 14px; }
.inv-section-head h2, .inv-next h2, .inv-help h2 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; }
.inv-pill { padding: 5px 14px; border-radius: 999px; background: var(--mute-bg); color: var(--ink-3); font-size: 13px; }
.inv-item { margin-bottom: 16px; }
.inv-item.is-closed { opacity: .7; }
.inv-item-head { display: flex; align-items: center; gap: 14px; }
.inv-item-chip { margin-left: auto; }
.inv-tile { width: 48px; height: 48px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; flex: none;
    background: var(--primary-bg-2); color: var(--blue); font-size: 22px; font-weight: 800; }
.inv-item-name { display: block; font-size: 17px; font-weight: 700; color: var(--ink); }
.inv-item-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 16px; }
.inv-k { display: block; font-size: 13.5px; color: var(--muted); }
.inv-v { display: block; margin-top: 6px; font-size: 22px; font-weight: 700; color: var(--ink); }
.inv-more { border-top: 1px solid var(--line); padding-top: 14px; }
.inv-more summary, .inv-history summary { cursor: pointer; color: var(--blue); font-weight: 600; list-style-position: inside; }
.inv-more .deflist { margin-top: 14px; }

.inv-next-row { display: flex; gap: 16px; align-items: center; margin: 18px 0 14px; }
.inv-date { width: 64px; height: 66px; border-radius: 14px; flex: none; display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--primary-bg-2); color: var(--blue); }
.inv-date b { font-size: 26px; line-height: 1; }
.inv-date small { margin-top: 4px; font-size: 11px; letter-spacing: .14em; font-weight: 700; }
.inv-next-amount { display: block; margin-top: 4px; font-weight: 700; color: var(--ink-2); }
.inv-warn { margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: rgba(241, 196, 107, .12); border: 1px solid rgba(241, 196, 107, .22); }
.inv-warn p { margin: 6px 0 0; color: var(--ink-3); font-size: 14px; }
.inv-warn .inv-warn-title { margin: 0; color: var(--ink); font-weight: 700; }
.inv-help { padding: 24px 6px; }
.inv-help h2 { margin-bottom: 10px; }

.inv-history { margin-top: 18px; padding: 18px 2px; border-top: 1px solid var(--border); }
.inv-history summary { color: var(--ink); font-size: 17px; }
.inv-history-body { margin-top: 16px; display: grid; gap: 18px; }
.inv-history .bar-fill { background: linear-gradient(90deg, #3782e7, #6fd39b); }

/* Očičko: částky rozmazané, rozměr zůstane — přehled neposkočí. */
.hide-amounts .money { filter: blur(9px); user-select: none; }

/* Zisk společníka (klient 13. 10. 2026) a odkaz na záložku Mé investice */
.inv-profit { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: -8px 0 26px; }
.inv-link { display: flex; align-items: center; gap: 16px; color: inherit; text-decoration: none; }
.inv-link:hover { border-color: var(--primary-bd); }
.inv-link-arrow { margin-left: auto; font-size: 30px; line-height: 1; color: var(--blue); }
.inv-grid.is-list { grid-template-columns: 1fr; }
.inv-grid.is-list > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; align-items: start; }
.inv-grid.is-list .inv-item { margin-bottom: 0; }
.inv-files { border-top: 1px solid var(--line); padding: 14px 0 12px; }
.inv-files .filelist { margin-top: 8px; }

@media (max-width: 900px) {
    .inv-top, .inv-grid, .inv-profit { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
    .inv-grid.is-list > div { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
    .inv-hero { padding: 22px 20px; border-radius: 18px; }
    .inv-card { padding: 18px; border-radius: 18px; }
    .inv-item-nums { grid-template-columns: 1fr; }
    .inv-hero-foot .is-right { text-align: left; }
}

/* Přepínač s jednou volbou (Statistika: Aktivní / Doplacené / Všechny, 11. 10. 2026) */
.seg { display: inline-flex; border: 1px solid var(--border-input); border-radius: var(--radius-sm); overflow: hidden; background: var(--btn-grad, #fff); }
.seg-item { display: inline-flex; align-items: center; padding: 0 12px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg-item + .seg-item { border-left: 1px solid var(--border-input); }
.seg-item input { position: absolute; opacity: 0; pointer-events: none; }
.seg-item.is-active { background: var(--primary-bg); color: var(--primary); }
.seg-item:focus-within { box-shadow: var(--ring); }
.seg { flex: none; }
.stats-filter { flex-wrap: wrap; }
.stats-filter .form-control { width: auto; }

/* ---- Callcentrum (3. 11. 2026) ---- */
/* Pole, které smlouvy potřebují a chybí (nebo má chybný tvar) — vyznačené po „Vygenerovat PDF“. */
.form-group.is-missing .form-control { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.form-group.is-missing > .form-label { color: var(--red); }
.cc-miss { color: var(--red); font-weight: 600; }
.cc-debts { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.cc-debt-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.cc-proof { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
.cc-proof-docs { display: inline-flex; flex-wrap: wrap; gap: 8px 16px; padding-left: 14px; border-left: 1px solid var(--border); }
.cc-img { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.cc-img img { max-width: 100%; max-height: 220px; object-fit: contain; align-self: flex-start; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.cc-docs { max-width: 760px; }
.cc-doc-list { list-style: none; margin: 0; padding: 6px; }
.cc-doc-list li { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-radius: var(--radius-sm); }
.cc-doc-list li a:first-child { flex: 1; display: flex; gap: 8px; align-items: center; padding: 9px 10px; color: var(--ink); }
.cc-doc-list li.is-active { background: var(--primary-bg); }
.cc-doc-list li.is-active a:first-child { color: var(--primary-dark); font-weight: 600; }
.cc-transfer { padding: 12px 16px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; }
.cc-transfer select { flex: 1 1 220px; width: auto; min-width: 0; }
.cc-transfer .btn { flex: 0 0 auto; white-space: nowrap; }
/* Editor vzoru smlouvy — stejné třídy jako výstup převodu z Wordu (DocxHtml), ať text vypadá jako v PDF. */
.cc-tpl { font-family: "Times New Roman", "Liberation Serif", serif; font-size: 12pt; line-height: 1.15; max-height: 70vh; overflow: auto; }
.cc-tpl p { margin: 0; }
.cc-tpl .tab { display: inline-block; width: 24pt; }
.cc-tpl .num { display: inline-block; min-width: 24pt; padding-right: 4pt; }
/* Číslo odstavce z nového převodu (12. 11. 2026) — absolutně na předsazení, stejně jako HtmlPdf. */
.cc-tpl p.cislo { position: relative; }
.cc-tpl p.cislo .num { position: absolute; top: 0; min-width: 0; padding: 0; text-indent: 0; white-space: nowrap; }

/* Formulář Callcentra jako Word žádost (J. Grmolec 12. 11. 2026): bloky pod sebou, v bloku řádky
   „popisek | hodnota“ oddělené linkou. Lišta nahoře = odkazy na bloky (nelepí se — lepí se už .topbar). */
.cc-nav {
    display: flex; flex-wrap: wrap; gap: 6px;
    margin: 0 0 14px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.cc-nav a {
    display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
    color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none;
}
.cc-nav a:hover, .cc-nav a:focus-visible { background: var(--primary-bg); color: var(--primary-dark); }
.cc-nav-num {
    width: 20px; height: 20px; border-radius: 999px; display: grid; place-items: center;
    background: var(--primary); color: #fff; font-size: 11px; font-weight: 800;
}
/* Import z Excelu v hlavičce seznamu (12. 11. 2026) — formulář se chová jako tlačítko. */
.cc-import { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.cc-import label.btn { cursor: pointer; }
.cc-import label.btn.is-loading { opacity: .6; pointer-events: none; }
.cc-blok, .cc-row { scroll-margin-top: 90px; }   /* pod lepivou hlavičkou .topbar */
.cc-blok > .card-head h2.card-title { margin: 0; }
.cc-rows .cc-row {
    display: grid; grid-template-columns: minmax(180px, 32%) minmax(0, 1fr); gap: 6px 18px; align-items: start;
    padding: 11px 18px; border-top: 1px solid var(--line);
}
.cc-rows .cc-row:first-child { border-top: 0; }
.cc-rows .cc-row > .form-label { padding-top: 9px; margin: 0; }
.cc-val { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cc-rows .cc-row.is-missing { background: var(--red-bg); }
@media (max-width: 700px) {
    .cc-rows .cc-row { grid-template-columns: minmax(0, 1fr); padding: 10px 14px; }
    .cc-rows .cc-row > .form-label { padding-top: 0; }
}
.cc-tpl table.tbl { border-collapse: collapse; width: 100%; }
.cc-tpl table.bd td { border: 1px solid #000; padding: 2pt 4pt; }

/* ---- Konverzace u příležitosti tipař ↔ správce (J. Grmolec 12. 11. 2026) ---- */
.opp-chat { scroll-margin-top: 90px; }
.opp-msgs { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.opp-msg { max-width: 82%; align-self: flex-start; padding: 9px 13px; border-radius: 14px 14px 14px 4px; background: var(--surface); border: 1px solid var(--border); }
.opp-msg.is-mine { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--primary-bg); border-color: transparent; }
.opp-msg-head { display: flex; gap: 10px; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.opp-msg-who { font-weight: 700; color: var(--ink); }
.opp-msg-body { font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.opp-msg-file { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 13px; }
.opp-empty { margin: 6px 0; }
.opp-closed { margin: 0; padding: 10px 18px; font-size: 13px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.opp-form { padding: 12px 18px 16px; display: flex; flex-direction: column; gap: 8px; margin: 0; }
.opp-form-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.opp-file { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; color: var(--muted); max-width: 70%; }
.opp-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opp-file input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.opp-file:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
/* Nepřečtené zprávy v seznamech — plná červená jako u SMS (klient). */
.nav-badge.opp-unread { background: var(--red); color: #fff; margin-left: 6px; vertical-align: middle; text-decoration: none; }
@media (max-width: 700px) { .opp-msg { max-width: 94%; } .opp-msgs { padding: 12px; max-height: 60vh; } }
/* Hlášky v tmavém portálu (tipař, investor, operátor) — dřív tmavý text na tmavém podkladu (12. 11. 2026). */
body.portal.pt-dark .alert-success { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .4); color: #86efac; }
body.portal.pt-dark .alert-error   { background: rgba(255, 138, 115, .12); border-color: rgba(255, 138, 115, .45); color: #ffb4a3; }
body.portal.pt-dark .alert-warning { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .45); color: #fcd34d; }

/* ===== Tři systémy Penvery (13. 11. 2026; grafika rozcestníku 12. 11. 2026) =====
   Rozcestník a Tržiště: tmavý pás ve stylu levého menu (plastické logo, modrá záře), pod ním
   plastické karty z vrstvy „Plastický vzhled“ — světlý přechod, vrstvený stín, barevná linka nahoře. */
.tb-search.is-empty { visibility: hidden; }

/* Podkres světlé plochy pod kartami (12. 11. 2026): tři slabé záře v barvách systémů, tečková mřížka
   (pod pásem se objevuje a dolů sílí) a tenké vlnovky u spodní hrany — ozvěna výnosové křivky z pásu. */
body.hub { position: relative; min-height: 100vh; display: flex; flex-direction: column;
    background:
        radial-gradient(760px 420px at 8% 100%, rgba(55, 130, 231, .14), transparent 66%),
        radial-gradient(700px 380px at 52% 108%, rgba(15, 108, 66, .09), transparent 66%),
        radial-gradient(760px 420px at 94% 100%, rgba(184, 118, 15, .11), transparent 66%),
        var(--bg); }
body.hub::before {
    content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background-image: radial-gradient(rgba(31, 44, 64, .16) 1px, transparent 1.5px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(180deg, transparent 0, transparent 380px, rgba(0, 0, 0, .55) 560px, #000 100%);
            mask-image: linear-gradient(180deg, transparent 0, transparent 380px, rgba(0, 0, 0, .55) 560px, #000 100%);
}
body.hub::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 240px; z-index: 0; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 240' preserveAspectRatio='none'%3E%3Cpath d='M0 150C160 118 270 170 430 142S680 78 840 96 1050 52 1200 34' fill='none' stroke='%233782e7' stroke-opacity='.22' stroke-width='2'/%3E%3Cpath d='M0 184C170 160 280 202 440 178S690 122 850 136 1060 98 1200 82' fill='none' stroke='%230f6c42' stroke-opacity='.14' stroke-width='1.6'/%3E%3Cpath d='M0 214C170 196 290 228 450 210S700 166 860 176 1065 140 1200 128' fill='none' stroke='%23b8760f' stroke-opacity='.16' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat center bottom / 100% 100%;
}
.hub-band { z-index: 1; }
.hub-band {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(900px 420px at 88% -20%, rgba(90, 160, 245, .42), transparent 62%),
        radial-gradient(700px 360px at 6% 120%, rgba(63, 191, 127, .16), transparent 60%),
        linear-gradient(180deg, #243349 0%, #1f2c40 46%, #172233 100%);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06);
}
/* Pozadí pásu = pohyblivý graf z přihlašovací obrazovky (templates/_brand_art.php): skvrny, tečky a křivka.
   Křivka v pásu nahoře pod textem, plochy pod ní vybledlé — karty ji dole překryjí. */
.hub-band .auth-art { top: auto; height: 300px; opacity: .9; }
.hub-band .auth-glow span:nth-child(1) { top: -10%; }
.hub-band .auth-dots { -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .45) 60%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .45) 60%, transparent 100%); }
.hub-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 18px; max-width: 1240px; margin: 0 auto; padding: 16px 28px; }
.hub-brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.hub-brand:hover { text-decoration: none; }
.hub-brand:hover .sb-logo-tile { transform: translateY(-1px); }
.hub-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.hub-brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.hub-brand-sub { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255, 255, 255, .6); margin-top: 3px; }
.hub-user { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.hub-link, .hub-me { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 10px; border: 0; background: transparent;
    color: rgba(255, 255, 255, .78); font: inherit; font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.hub-link:hover, .hub-me:hover { background: rgba(255, 255, 255, .09); color: #fff; text-decoration: none; }
.hub-me .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .18); }
.hub-hero { position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 18px 28px 96px; }
.hub-eyebrow { margin: 0 0 8px; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; color: #8ac0ff; }
.hub-title { margin: 0; font-size: clamp(28px, 3.4vw, 40px); font-weight: 800; letter-spacing: -.03em; color: #fff; }
.hub-lead { margin: 8px 0 0; font-size: 15px; color: rgba(255, 255, 255, .72); }
.hub-fire { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; padding: 8px 14px; border-radius: 999px; font-size: 13.5px;
    background: rgba(239, 122, 94, .16); border: 1px solid rgba(239, 122, 94, .45); color: #ffd0c4; }
.hub-fire strong { color: #fff; }
.hub-fire.is-ok { background: rgba(63, 191, 127, .14); border-color: rgba(63, 191, 127, .45); color: #b9efd3; }

.hub-main { position: relative; z-index: 2; width: 100%; max-width: 1240px; margin: -64px auto 0; padding: 0 28px 48px; flex: 1; }
.hub-home .hub-main { margin-top: -72px; }
.hub-foot { position: relative; z-index: 1; text-align: center; padding: 18px; font-size: 12px; color: var(--muted); }

.hub-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.hub-card { --hc: #3782e7; --hc2: #8ac0ff; --hc-bg: var(--primary-bg);
    position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 26px 24px 20px;
    background: var(--surface-grad); border: 1px solid var(--border-card, var(--border)); border-radius: 18px; box-shadow: var(--shadow-md);
    color: var(--ink); text-decoration: none; transition: transform 200ms ease, box-shadow 200ms ease;
    animation: pvRise 420ms ease both; animation-delay: calc(var(--i, 0) * 90ms); }
.hub-card::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--hc), var(--hc2)); }
.hub-card::after {   /* jemná barevná záře v rohu karty */
    content: ''; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, color-mix(in srgb, var(--hc) 16%, transparent), transparent 70%); }
.hub-card:hover { transform: translateY(-4px); text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 8px rgba(16, 23, 32, .06), 0 22px 40px -16px rgba(16, 23, 32, .35); }
.hub-card.tone-green { --hc: #0f6c42; --hc2: #3fbf7f; --hc-bg: var(--green-bg); }
.hub-card.tone-amber { --hc: #b8760f; --hc2: #f0b64a; --hc-bg: var(--amber-bg); }
.hub-card-head { display: flex; align-items: center; gap: 14px; }
.hub-card-icon { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 17px; display: grid; place-items: center; color: #fff;
    background: linear-gradient(160deg, var(--hc2) 0%, var(--hc) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), inset 0 -2px 4px rgba(0, 0, 0, .15), 0 8px 18px -8px var(--hc); }
.hub-card-kicker { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hub-card-name { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.hub-card-desc { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.hub-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hub-kpi { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2);
    border: 1px solid var(--line); box-shadow: inset 0 1px 0 #fff; }
.hub-kpi-num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--ink); }
.hub-kpi-label { font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; }
.hub-kpi-label small { font-size: 11.5px; margin-top: 1px; opacity: .85; }
.hub-kpi.is-alert { background: linear-gradient(180deg, #fff6f3, var(--red-bg)); border-color: var(--red-bd, #f5b3a3); }
.hub-kpi.is-alert .hub-kpi-num { color: var(--red); }
.hub-kpi.is-warn { background: linear-gradient(180deg, #fffaf0, var(--amber-bg)); border-color: #f2d49a; }
.hub-kpi.is-warn .hub-kpi-num { color: var(--amber-strong); }
.hub-kpi.is-ok .hub-kpi-num { color: var(--green); }
.hub-kpi.is-soon .hub-kpi-num { color: #b3bccb; }
.hub-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.hub-firms { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.hub-go { position: relative; overflow: hidden; display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 11px;
    font-size: 14px; font-weight: 700; color: #fff; background: linear-gradient(180deg, var(--hc2) -40%, var(--hc) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 3px 8px -3px var(--hc); }
.hub-go::after { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; pointer-events: none;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-18deg); }
.hub-card:hover .hub-go::after { animation: pvSheen 700ms ease; }

/* Barva Tržiště = jantarová (Úvěry modrá, Nemovitosti zelená — uživatel 14. 11. 2026). --trz-ink na text (kontrast na bílé). */
body.hub-trziste { --trz: #e3a52c; --trz-strong: #c2840f; --trz-ink: #8a5a06; --trz-bg: #fdf3dc; }
body.hub-trziste .hub-eyebrow { color: #f6c45c; }
body.hub-trziste .hub-band { background: radial-gradient(900px 420px at 88% -20%, rgba(242, 178, 60, .30), transparent 62%), radial-gradient(700px 360px at 6% 120%, rgba(63, 191, 127, .12), transparent 60%), linear-gradient(180deg, #243349 0%, #1f2c40 46%, #172233 100%); }
body.hub-trziste .hub-band::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, transparent, #e3a52c 25%, #f4c35a 50%, #e3a52c 75%, transparent); opacity: .9; }
body.hub-trziste .btn-primary { background: linear-gradient(180deg, #f4bd4f 0%, #e09a1f 100%); border-color: #c98a14; color: #3d2a05; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 6px 16px -8px rgba(194, 132, 15, .8); }
body.hub-trziste .btn-primary:hover { background: linear-gradient(180deg, #f7c860 0%, #e6a32a 100%); color: #3d2a05; }
body.hub-trziste .trz-back:hover { background: rgba(244, 189, 79, .18); }
/* Tržiště — nabídka a detail (14. 11. 2026). Nabídka (uživatel 14. 11.): nízká hlavička, pod ní lišta filtrů přes celou
   šířku, MAPA (výchozí) vyplní zbytek okna bez posuvníku stránky; Nabídka = karty s vrstvenými stíny a náběhem. */
.trz-index .hub-band { flex: 0 0 auto; }
.trz-index .hub-top { padding-top: 12px; padding-bottom: 8px; }
.trz-index .hub-hero { padding: 4px 28px 22px; }
.trz-index .hub-eyebrow { margin-bottom: 4px; }
.trz-index .hub-title { font-size: clamp(22px, 2.4vw, 30px); }
.trz-index .hub-lead { margin-top: 4px; font-size: 14px; }
.trz-index .hub-main { max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; min-height: 0; }
.trz-index .hub-main > .alert { max-width: 1240px; margin: 14px auto 0; width: calc(100% - 56px); }
body.trz-mapmode { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
body.trz-mapmode::after, body.trz-mapmode .hub-foot { display: none; }

.trz-bar { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
    padding: 10px max(28px, calc(50% - 620px)); background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border); box-shadow: 0 6px 18px -12px rgba(16, 23, 32, .35); }
.trz-count { margin-right: 4px; font-size: 13.5px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.trz-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.trz-kind { position: relative; cursor: pointer; }
.trz-kind input { position: absolute; opacity: 0; pointer-events: none; }
.trz-kind span { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
    color: var(--ink-2); background: var(--mute-bg); transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.trz-kind span b { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.trz-kind:hover span { background: var(--trz-bg); }
.trz-kind input:checked + span { background: linear-gradient(180deg, #f4bd4f 0%, #e09a1f 100%); color: #3d2a05; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 4px 12px -4px rgba(194, 132, 15, .7); }
.trz-kind input:checked + span b { color: rgba(61, 42, 5, .6); }
.trz-kind input:focus-visible + span { outline: 2px solid var(--trz); outline-offset: 2px; }
.trz-fields { display: flex; flex-wrap: nowrap; gap: 8px; flex: 1; min-width: 0; }
@media (max-width: 1100px) { .trz-fields { flex-wrap: wrap; flex-basis: 100%; } }
.trz-field { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 12px; height: 38px; border: 1px solid var(--border-input, var(--border));
    border-radius: 12px; background: var(--surface); color: var(--muted); transition: border-color 140ms ease, box-shadow 140ms ease; }
.trz-field:focus-within { border-color: var(--trz); box-shadow: 0 0 0 3px var(--trz-bg); }
.trz-field input, .trz-field select { border: 0; outline: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ink); height: 100%; min-width: 0; }
.trz-view { position: relative; display: inline-flex; padding: 4px; margin-left: auto; border-radius: 14px; background: var(--mute-bg); }
.trz-view-glider { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--surface);
    box-shadow: 0 1px 2px rgba(16, 23, 32, .08), 0 4px 10px -4px rgba(16, 23, 32, .18); transition: transform 260ms cubic-bezier(.3, .7, .2, 1); }
.trz-view.is-map .trz-view-glider { transform: translateX(100%); }
.trz-view-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 108px; padding: 7px 14px;
    border: 0; background: transparent; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 700; color: var(--muted); cursor: pointer; transition: color 160ms ease; }
.trz-view-btn.is-active { color: var(--ink); }
.trz-view-btn.is-active .icon { color: var(--trz-strong); }
.trz-view-btn:focus-visible { outline: 2px solid var(--trz); outline-offset: 2px; }

/* mapa: zbytek okna, bez posuvníku stránky */
.trz-map-wrap { position: relative; }
.trz-map-wrap[hidden] { display: none; }
.trz-map { height: calc(100vh - 250px); min-height: 320px; background: #e8ecef; z-index: 0; }   /* přesnou výšku do konce okna nastaví trziste.js (sizeMap) */
.trz-map-note { position: absolute; z-index: 500; left: 12px; bottom: 26px; margin: 0; padding: 6px 12px; border-radius: 10px;
    background: rgba(255, 255, 255, .92); box-shadow: 0 4px 12px -6px rgba(16, 23, 32, .4); font-size: 12.5px; }

/* nabídka: karty */
.trz-grid { width: 100%; max-width: 1240px; margin: 0 auto; padding: 26px 28px 40px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.trz-grid[hidden] { display: none; }
.trz-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; overflow: hidden; color: inherit; text-decoration: none;
    box-shadow: 0 0 0 1px rgba(16, 23, 32, .05), 0 1px 2px rgba(16, 23, 32, .04), 0 8px 24px -12px rgba(16, 23, 32, .18);
    transition: transform 320ms cubic-bezier(.2, .8, .2, 1), box-shadow 320ms cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.trz-card:hover { text-decoration: none; transform: translateY(-6px);
    box-shadow: 0 0 0 1px rgba(227, 165, 44, .25), 0 2px 4px rgba(16, 23, 32, .04), 0 24px 48px -18px rgba(16, 23, 32, .38), 0 10px 22px -14px rgba(227, 165, 44, .45); }
.trz-card:focus-visible { outline: 3px solid var(--trz); outline-offset: 3px; }
.trz-card[hidden] { display: none; }
.trz-grid.is-in .trz-card { animation: trzCardIn 560ms cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(min(var(--i, 0), 12) * 55ms); }
@keyframes trzCardIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
.trz-card-img { position: relative; display: block; aspect-ratio: 16 / 11; background: var(--mute-bg); overflow: hidden; }
.trz-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.001); transition: transform 900ms cubic-bezier(.2, .8, .2, 1), filter 600ms ease; }
.trz-card:hover .trz-card-img img { transform: scale(1.07); filter: saturate(1.08); }
.trz-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 23, 32, 0) 45%, rgba(16, 23, 32, .55) 100%); pointer-events: none; transition: opacity 320ms ease; }
.trz-card:hover .trz-shade { opacity: .85; }
.trz-noimg { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; color: #9aa6b6;
    background: radial-gradient(120% 90% at 30% 20%, #f4f7fb 0%, #e4eaf2 60%, #d9e1ec 100%); font-size: 13px; }
.trz-tag, .trz-photos, .trz-new { position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px;
    font-size: 12px; font-weight: 700; backdrop-filter: blur(8px); }
.trz-tag { top: 14px; left: 14px; background: rgba(255, 255, 255, .86); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(16, 23, 32, .25); }
.trz-new { top: 14px; right: 14px; background: linear-gradient(180deg, #1fa266, #0f7a49); color: #fff; box-shadow: 0 4px 12px -4px rgba(15, 122, 73, .7); }
.trz-photos { bottom: 14px; right: 14px; background: rgba(16, 23, 32, .45); color: #fff; }
.trz-price { position: absolute; z-index: 1; left: 14px; bottom: 12px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; color: #fff;
    font-variant-numeric: tabular-nums; text-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.trz-card-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 0; flex: 1; }
.trz-card-title { font-size: 17px; font-weight: 800; letter-spacing: -.015em; color: var(--ink); transition: color 200ms ease; }
.trz-card:hover .trz-card-title { color: var(--trz-ink); }
.trz-addr { display: flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); }
.trz-specs { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 10px 0 0; padding: 14px 0 0; border-top: 1px solid var(--border-soft, var(--line)); }
.trz-spec { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trz-spec-ico { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: var(--trz-ink);
    background: linear-gradient(160deg, #fff8e8 0%, #fbe7bd 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8); transition: transform 300ms cubic-bezier(.2, .8, .2, 1); }
.trz-card:hover .trz-spec-ico { transform: translateY(-2px); }
.trz-spec > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.trz-spec b { font-size: 13.5px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.trz-spec small { font-size: 11.5px; color: var(--muted); }
.trz-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 16px -20px 0; padding: 12px 20px;
    background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%); border-top: 1px solid var(--border-soft, var(--line)); margin-top: auto; }
.trz-addr { margin-bottom: 2px; }
.trz-go { font-size: 13.5px; font-weight: 700; color: var(--trz-ink); }
.trz-go span { display: inline-block; transition: transform 280ms cubic-bezier(.2, .8, .2, 1); }
.trz-card:hover .trz-go span { transform: translateX(5px); }
.trz-since { font-size: 12px; color: var(--muted); }
.trz-card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity 320ms ease;
    background: radial-gradient(600px 220px at 50% -40px, rgba(227, 165, 44, .14), transparent 70%); }
.trz-card:hover::after { opacity: 1; }
.trz-empty { max-width: 640px; margin: 40px auto; padding: 48px 24px; text-align: center; background: var(--surface); border-radius: 22px; color: var(--muted);
    box-shadow: 0 0 0 1px rgba(16, 23, 32, .05), 0 8px 24px -12px rgba(16, 23, 32, .18); }
.trz-empty[hidden] { display: none; }
.trz-empty h2 { margin: 10px 0 6px; color: var(--ink); font-size: 20px; }
.trz-empty p { margin: 0 auto; max-width: 460px; }
.trz-empty-ico { display: inline-grid; place-items: center; width: 72px; height: 72px; border-radius: 20px; background: var(--trz-bg); color: var(--trz); }

/* značky na mapě */
.trz-pin-wrap { background: none; border: 0; }
.trz-pin { position: relative; display: inline-block; transform: translate(-50%, calc(-100% - 8px)); white-space: nowrap; padding: 6px 11px; border-radius: 999px;
    background: #1f2c40; color: #fff; font-size: 13px; font-weight: 800; letter-spacing: -.01em; box-shadow: 0 0 0 2px #fff, 0 6px 14px -4px rgba(16, 23, 32, .5); cursor: pointer;
    transition: background 160ms ease, transform 160ms ease; }
.trz-pin::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: #1f2c40; transition: border-color 160ms ease; }
.leaflet-marker-icon:hover .trz-pin { background: var(--trz); transform: translate(-50%, calc(-100% - 10px)) scale(1.06); }
.leaflet-marker-icon:hover .trz-pin::after { border-top-color: var(--trz); }
.trz-pin.is-cluster { background: linear-gradient(180deg, #f4bd4f, #e09a1f); color: #3d2a05; }
.trz-pin.is-cluster::after { border-top-color: var(--trz); }
.trz-pin-dot { width: 22px; height: 22px; padding: 0; background: var(--trz); }
.trz-pin-dot::after { border-top-color: var(--trz); }
.trz-pop { display: flex; flex-direction: column; color: inherit; text-decoration: none; margin: -14px -20px -14px -24px; }
.trz-pop:hover { text-decoration: none; }
.trz-pop img { width: 100%; height: 140px; object-fit: cover; border-radius: 12px 12px 0 0; display: block; }
.trz-pop-body { display: flex; flex-direction: column; gap: 3px; padding: 12px 16px 14px; font-size: 13px; color: var(--ink-2); }
.trz-pop-body b { font-size: 17px; color: var(--ink); }
.trz-pop-addr { color: var(--muted); }
.trz-pop-go { margin-top: 6px; font-weight: 700; color: var(--trz-ink); }

/* detail */
.trz-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; padding: 6px 12px 6px 8px; border-radius: 10px; color: rgba(255, 255, 255, .8); font-size: 13.5px; font-weight: 600; background: rgba(255, 255, 255, .08); }
.trz-back:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .14); }
.hub-lead .icon { vertical-align: -2px; }
.trz-detail { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.trz-detail-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.trz-detail-side { position: sticky; top: 16px; }
.trz-gallery { display: flex; flex-direction: column; gap: 10px; }
.trz-gallery-main { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 18px; overflow: hidden; background: var(--mute-bg); box-shadow: var(--shadow-md); }
.trz-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trz-gallery-main.trz-noimg { position: relative; }
.trz-thumbs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.trz-thumb { flex: 0 0 96px; height: 68px; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--mute-bg); opacity: .75; transition: opacity 140ms ease; }
.trz-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trz-thumb:hover, .trz-thumb.is-active { opacity: 1; }
.trz-thumb.is-active { border-color: var(--trz); }
.trz-desc { font-size: 15px; line-height: 1.65; color: var(--ink-2); }
.trz-facts-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 24px; margin: 0; }
.trz-facts-dl div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.trz-facts-dl dt { color: var(--muted); font-size: 13.5px; }
.trz-facts-dl dd { margin: 0; font-weight: 600; text-align: right; }
.trz-mini { height: 300px; z-index: 0; }
.trz-offer .card-body { display: flex; flex-direction: column; gap: 14px; }
.trz-offer .alert { margin: 0; }
.trz-offer-label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.trz-offer-price { margin: -10px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); }
.trz-offer-facts { list-style: none; margin: 0; padding: 0; }
.trz-offer-facts li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.trz-offer-facts span { color: var(--muted); }
.trz-inquiry { display: flex; flex-direction: column; gap: 10px; }
.trz-inquiry .form-label { margin: 4px 0 -4px; }
.trz-cta { justify-content: center; padding: 12px 18px; font-size: 15px; }
.trz-inquiry .t-sub { margin: 0; }
@media (max-width: 900px) {
    .trz-detail { grid-template-columns: 1fr; }
    .trz-detail-side { position: static; }
}
@media (max-width: 700px) {
    .trz-bar { padding: 10px 14px; }
    .trz-view { margin-left: 0; width: 100%; }
    .trz-view-btn { flex: 1; min-width: 0; }
    .trz-grid { grid-template-columns: 1fr; gap: 16px; padding: 16px 14px 28px; }
}
@media (prefers-reduced-motion: reduce) { .trz-card, .trz-card-img img, .trz-view-glider, .trz-go span, .trz-spec-ico { transition: none; } .trz-grid.is-in .trz-card { animation: none; } .trz-card:hover { transform: none; } }

/* Nemovitosti — kostra */
.nem-soon { display: flex; gap: 18px; align-items: flex-start; }
.nem-soon h2 { margin: 0 0 6px; }
.nem-soon-icon { width: 60px; height: 60px; flex: 0 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--green-bg); color: var(--green); }

/* Uživatel — přístupy do systémů */
.sys-access { padding: 12px 0; border-bottom: 1px solid var(--line); }
.sys-access:last-of-type { border-bottom: 0; }
.sys-access-title { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 14px; }

@media (max-width: 700px) {
    .hub-top { padding: 12px 14px; gap: 8px; }
    .hub-link span, .hub-me-name { display: none; }
    .hub-hero { padding: 8px 16px 84px; }
    .hub-main { padding: 0 14px 36px; }
    .hub-kpi-num { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) { .hub-card { animation: none; } .hub-card:hover { transform: none; } }

/* ===== Penvera nemovitosti — Investoři a financování (12. 11. 2026) ===== */
.t-red { color: var(--red); font-weight: 600; }
/* Alokace podle nemovitostí: seznam s pruhy (čitelnější než koláč) — název, pruh, částka a podíl */
.ninv-alloc { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ninv-alloc li { display: grid; grid-template-columns: minmax(120px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.ninv-alloc-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ninv-alloc-name .icon { color: var(--green); flex: 0 0 auto; }
.ninv-alloc-bar { height: 10px; border-radius: 999px; background: var(--mute-bg); overflow: hidden; box-shadow: inset 0 1px 2px rgba(16, 23, 32, .08); }
.ninv-alloc-bar span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.ninv-alloc li.is-none .ninv-alloc-bar span { background: #9aa6b8; }
.ninv-alloc li.is-none .ninv-alloc-name { color: var(--muted); font-weight: 500; }
.ninv-alloc-val { font-size: 13.5px; font-weight: 700; white-space: nowrap; text-align: right; }
.ninv-alloc-val small { display: inline-block; min-width: 38px; font-weight: 600; color: var(--muted); }
.ninv-alloc-total { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); text-align: right; }
.ninv-alloc-total strong { color: var(--ink); font-size: 15px; }
/* Končící smlouvy */
.ninv-ending { list-style: none; margin: 0; padding: 0; }
.ninv-ending li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ninv-ending li:last-child { border-bottom: 0; }
.ninv-ending li .t-sub { flex: 1; margin: 0; }
/* Filtry a tabulka */
.ninv-chips { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.ninv-table tr.is-ending td { background: var(--red-bg); }
.ninv-table tr.is-ending td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.ninv-bell { display: inline-flex; vertical-align: -2px; margin-left: 4px; color: var(--red); }
.ninv-pledge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
    background: var(--green-bg); color: var(--green); }
.ninv-quick { display: inline-block; margin: 4px 0 0 4px; }
.ninv-table tfoot td { font-weight: 800; background: var(--head-grad); border-top: 2px solid var(--border); }
/* Detail: formulář výplaty v řádku */
.ninv-payform { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 12px; align-items: end; border-bottom: 1px solid var(--line); }
.ninv-paybtn { align-self: end; }
/* Přehled Nemovitostí: karta Investoři */
@media (max-width: 700px) {
    .ninv-alloc li { grid-template-columns: minmax(0, 1fr) auto; }
    .ninv-alloc-bar { grid-column: 1 / -1; grid-row: 2; }
    .ninv-chips { margin-left: 0; }
}
.ninv-table td:first-child { min-width: 190px; }
.ninv-table td.num, .ninv-table td[data-label="Smlouva"] > span:first-child { white-space: nowrap; }
.ninv-table td[data-label="Zástavní právo"] { min-width: 170px; }
.ninv-table .ninv-pledge { white-space: nowrap; }

/* Levé menu Penvera nemovitosti (12. 11. 2026): decentně zelenější tmavý přechod, aby bylo na první pohled
   poznat, že nejsem v Úvěrech. Jen pozadí — zvýraznění položek a počty zůstávají jako v Úvěrech (uživatel 12. 11.). */
.sidebar.is-nem { background: linear-gradient(180deg, #213f3b 0%, #1b3431 42%, #142824 100%); }

/* Nainstalovaná aplikace (13. 11. 2026): šipka zpět vlevo nahoře a náhled PDF s tlačítkem Zpět. */
.tb-back { display: inline-flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--border-input); border-radius: 9px; padding: 7px; color: var(--ink-2); cursor: pointer; }
.tb-back[hidden] { display: none; }
.pdf-view { display: flex; flex-direction: column; gap: 12px; }
.pdf-view-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pdf-view-name { flex: 1; min-width: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdf-view-frame { width: 100%; height: calc(100vh - 220px); min-height: 420px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.cc-im-table .form-control { min-width: 120px; }
.cc-im-table td:nth-child(2) .form-control { min-width: 220px; }
.cc-im-table td:nth-child(4) .form-control { min-width: 290px; }
/* Podpisy do smluv (18. 11. 2026): náhled na bílém podkladu, aby byl vidět i v tmavém vzhledu */
.cc-sign-nahled { display: block; max-height: 52px; max-width: 220px; margin-bottom: 6px; padding: 4px 8px; background: #fff; border-radius: 6px; border: 1px solid var(--border-soft); }
.cc-sign-cell input[type=file] { min-width: 210px; }
.cc-im-table td:first-child { text-align: center; }

/* Penvera nemovitosti — Evidence nemovitostí (13. 11. 2026, obrázky J. Grmolce). */


.th-sort { color: inherit; text-decoration: none; white-space: nowrap; }
.th-sort:hover, .th-sort.is-active { color: var(--primary); text-decoration: none; }

.np-stat-phase { font-size: 18px !important; line-height: 1.25; white-space: normal; overflow-wrap: anywhere; }
.np-axis-card .card-head { flex-wrap: wrap; }
.np-axis-actions { margin-left: auto; display: inline-flex; gap: 8px; }
.np-axis { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 6px; padding: 0 18px 18px; }
/* Stavová osa (14. 11. 2026): kroky jako zaoblené bloky v barvách Penvery — bez šipek z obrázků. */
.np-axis-step { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--mute-bg); color: var(--muted); }
.np-axis-step.is-done { background: var(--green-bg); color: var(--ink-2); }
.np-axis-step.is-done .np-axis-icon { color: var(--green); }
.np-axis-step.is-current { background: var(--primary-bg); color: var(--primary-dark); box-shadow: inset 0 0 0 2px var(--primary); }
.np-axis-step.is-current .np-axis-icon { color: var(--primary); }
.np-axis-icon { flex: 0 0 auto; display: inline-flex; }
.np-axis-text { display: flex; flex-direction: column; min-width: 0; }
.np-axis-name { font-weight: 700; font-size: 13px; line-height: 1.25; }
.np-axis-date { font-size: 12px; opacity: .85; }
.np-axis-form { border-top: 1px solid var(--line); }
.np-axis-form[hidden] { display: none; }

.np-note { margin: 0; line-height: 1.55; }
.np-delete { margin-top: 6px; text-align: right; }

@media (max-width: 900px) {
    .np-axis { grid-template-columns: minmax(0, 1fr); }
    .np-axis-actions { margin-left: 0; width: 100%; }
}

/* Detail nemovitosti — bod 3 (13. 11. 2026): galerie, dokumenty, úkoly, zástavy, fotky, prohlížeč. */
.np-gallery { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 8px; padding: 8px; min-height: 300px; }
.np-gallery-main { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--mute-bg); min-height: 280px; }
.np-gallery-main img, .np-gallery-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.np-gallery-tag, .np-gallery-count { position: absolute; bottom: 12px; background: rgba(16, 23, 32, .72); color: #fff; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.np-gallery-tag { left: 12px; } .np-gallery-count { right: 12px; }
.np-gallery-side { display: grid; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 8px; }
.np-gallery-side a { position: relative; display: block; border-radius: 10px; overflow: hidden; background: var(--mute-bg); min-height: 60px; }
.np-gallery-side a.np-gallery-more { display: flex; align-items: center; justify-content: center; gap: 6px; background: #2b3a52; color: #fff; font-weight: 700; font-size: 13px; text-decoration: none; }
.np-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0 0; }
.np-mini-form { display: flex; flex-direction: column; gap: 10px; }
.np-mini-form .form-group { margin: 0; }
.np-mini-form .form-actions { margin: 0; }

.np-docs, .np-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.np-docs li, .np-tasks li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.np-docs li:last-child, .np-tasks li:last-child { border-bottom: 0; }
.np-doc-ico { flex: 0 0 34px; height: 38px; border-radius: 6px; display: grid; place-items: center; font-size: 9.5px; font-weight: 800; color: #fff; background: #d64545; }
.np-doc-ico.is-xls { background: #1f8a4c; } .np-doc-ico.is-doc { background: #2f6fd6; } .np-doc-ico.is-img { background: #d98a1c; }
.np-doc-body, .np-task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.np-doc-body a, .np-task-body .t-strong { overflow-wrap: anywhere; font-size: 13.5px; }
.np-doc-status { margin: 0; }
.np-status-select { border: 0; border-radius: 999px; padding: 4px 8px; font-size: 12px; font-weight: 700; cursor: pointer; background: var(--mute-bg); color: var(--muted); max-width: 120px; }
.np-status-select.tone-green { background: var(--green-bg); color: var(--green); }
.np-status-select.tone-blue  { background: var(--blue-bg); color: var(--primary); }
.np-status-select.tone-amber { background: var(--amber-bg); color: var(--amber-strong); }
.np-status-select.tone-red   { background: var(--red-bg); color: var(--red); }
.np-docs form, .np-tasks form { margin: 0; display: inline; }
.np-check { width: 22px; height: 22px; flex: 0 0 22px; border-radius: 6px; border: 2px solid var(--border-input, #c9d1dd); background: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff; }
.np-check.is-on { background: var(--green); border-color: var(--green); }
.np-tasks li.is-done .np-task-body .t-strong { text-decoration: line-through; color: var(--muted); }
.np-task-acts { display: inline-flex; gap: 0; }
.table tr.is-muted td { color: var(--muted); opacity: .75; }
.np-note-form { margin-top: 12px; }
.ninv-linked { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; }

.np-name-cell { display: flex; align-items: center; gap: 12px; }
.np-thumb { flex: 0 0 auto; width: 58px; height: 44px; border-radius: 8px; overflow: hidden; background: var(--mute-bg); color: var(--muted); display: grid; place-items: center; }
.np-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.np-upload .form-grid { align-items: end; }
.np-upload-btn { display: flex; align-items: flex-end; }
.np-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.np-photo { position: relative; display: flex; flex-direction: column; gap: 8px; }
.np-photo.is-cover .np-photo-img { outline: 3px solid var(--primary); outline-offset: 2px; }
.np-photo-img { display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--mute-bg); }
.np-photo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-photo-badge { position: absolute; top: 8px; left: 8px; background: var(--primary); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 6px; }
.np-photo-form { display: flex; flex-direction: column; gap: 6px; }
.np-photo-form .form-control { font-size: 13px; padding: 6px 9px; }
.np-photo-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.np-photo-del { position: absolute; top: 6px; right: 6px; margin: 0; }
.np-photo-del .btn { background: rgba(255, 255, 255, .92); }
.np-photo-cap { margin: 0; font-size: 13px; color: var(--muted); }

.np-lb { position: fixed; inset: 0; z-index: 2000; background: rgba(10, 14, 22, .92); display: flex; align-items: center; justify-content: center; }
.np-lb[hidden] { display: none; }
.np-lb-fig { margin: 0; max-width: calc(100vw - 120px); max-height: calc(100vh - 60px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.np-lb-fig img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; }
.np-lb-fig figcaption { color: #e8edf5; font-size: 14px; }
.np-lb-close, .np-lb-nav { position: absolute; background: rgba(255, 255, 255, .12); color: #fff; border: 0; border-radius: 50%; width: 46px; height: 46px; font-size: 30px; line-height: 1; cursor: pointer; }
.np-lb-close { top: 16px; right: 16px; }
.np-lb-nav.is-prev { left: 16px; } .np-lb-nav.is-next { right: 16px; }
.np-lb-close:hover, .np-lb-nav:hover { background: rgba(255, 255, 255, .25); }

@media (max-width: 900px) {
    .np-gallery { grid-template-columns: minmax(0, 1fr); }
    .np-gallery-side { grid-template-rows: none; grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .np-gallery-side a { aspect-ratio: 1; min-height: 0; }
    .np-lb-fig { max-width: 100vw; }
    .np-lb-nav { top: auto; bottom: 16px; }
}

/* Rekonstrukce — bod 4 (13. 11. 2026, obrázek J. Grmolce). */
.t-amber { color: var(--amber-strong); font-weight: 600; }
.np-inline-edit { background: none; border: 0; padding: 0 0 0 4px; color: var(--muted); cursor: pointer; vertical-align: middle; }
.np-inline-edit:hover { color: var(--primary); }
.np-inline-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; margin-bottom: 18px; }
.np-inline-form[hidden] { display: none; }
.np-inline-form .form-group { margin: 0; }
.np-inline-form .form-actions { margin: 0; }
.rn-budget td { vertical-align: middle; white-space: nowrap; }
.rn-budget td:first-child { white-space: normal; min-width: 150px; }
.rn-works li { flex-wrap: wrap; }
.rn-works .np-task-body { flex: 1 1 170px; }
.rn-works .rn-work-state { flex-direction: row; align-items: center; gap: 8px; }
.rn-budget .t-strong { display: flex; align-items: center; gap: 6px; }
.rn-cat-ico { flex: 0 0 auto; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--blue-bg); color: var(--primary); margin-right: 4px; vertical-align: middle; }
.rn-bar { display: inline-block; vertical-align: middle; width: 72px; height: 8px; border-radius: 999px; background: var(--mute-bg); overflow: hidden; box-shadow: inset 0 1px 2px rgba(16, 23, 32, .08); }
.rn-bar span { display: block; height: 100%; border-radius: 999px; background: var(--primary); }
.rn-bar.is-over span { background: var(--red); }
.rn-bar-pct { font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin-left: 6px; }
.table tr.rn-total td { font-weight: 800; background: var(--blue-bg); }
.rn-budget-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rn-budget-form .form-group { margin: 0; }
.rn-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rn-2col[hidden] { display: none; }
.rn-2col .form-group { margin: 0; }
.rn-work-state { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex: 0 0 auto; text-align: right; }
.rn-work-state .t-sub { white-space: nowrap; }
.rn-alerts, .rn-sups { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rn-alerts li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.rn-alerts li > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.rn-alert-ico { flex: 0 0 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--blue-bg); color: var(--primary); }
.rn-alerts li.tone-red .rn-alert-ico { background: var(--red-bg); color: var(--red); }
.rn-alerts li.tone-amber .rn-alert-ico { background: var(--amber-bg); color: var(--amber-strong); }
.rn-sups li { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: 13.5px; }
.rn-sup-body { display: flex; flex-direction: column; min-width: 0; }
.rn-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.rn-strip a { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--mute-bg); }
.rn-strip a[hidden] { display: none; }
.rn-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rn-strip a span { position: absolute; left: 6px; bottom: 6px; background: rgba(16, 23, 32, .72); color: #fff; font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; max-width: calc(100% - 12px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rn-strip a.rn-strip-more { display: flex; flex-direction: column; align-items: center; justify-content: center; background: #2b3a52; color: #fff; font-size: 22px; font-weight: 800; text-decoration: none; }
.rn-strip-more small { font-size: 11px; font-weight: 600; }
.rn-prep-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 0 18px 18px; }
.rn-prep-step { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--mute-bg); }
.rn-prep-step.is-done { background: var(--green-bg); }
.rn-prep-step form { margin: 0; }
.rn-prep-step > span { display: flex; flex-direction: column; font-size: 13.5px; }
@media (max-width: 900px) {
    .rn-prep-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rn-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .rn-2col { grid-template-columns: minmax(0, 1fr); }
}

/* Nájmy a zpětný leasing — bod 5 (13. 11. 2026). */
.table tr.is-current td { background: var(--blue-bg); }
.ls-end { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.ls-end summary { cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600; }
.ls-end[open] summary { margin-bottom: 10px; }

/* Akvizice — bod 6 (13. 11. 2026). */
.aq-note-form { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
.aq-note-form .form-control { flex: 1; }
.aq-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.aq-notes li { padding-left: 12px; border-left: 3px solid var(--blue-bg); }
.aq-notes p { margin: 2px 0 0; font-size: 14px; line-height: 1.5; }
@media (max-width: 900px) { .aq-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); } .aq-note-form { flex-direction: column; align-items: stretch; } }

/* ---------- Penvera nemovitosti: role (bod 7) a mapa (bod 8), 13. 11. 2026 ---------- */
.np-assign { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.np-assign li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.np-assign-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.np-assign-form select { max-width: 340px; }
.np-docs-simple { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rz-work-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rz-work-form select { width: auto; min-width: 130px; }
.rz-work-form input[type=number] { width: 78px; }
/* Mapa přes celou plochu: od menu po pravý okraj, pod horní lištou až dolů (uživatel 14. 11. 2026). */
.page.page-full { padding: 0; display: flex; flex-direction: column; flex: 1; min-height: 0; animation: none; }
.page-full > .alert { margin: 12px 16px 0; }
.nm-stage { position: relative; flex: 1; display: flex; flex-direction: column; min-height: 520px; }
.nm-map { flex: 1; min-height: 520px; background: var(--mute-bg); z-index: 0; }
.nm-stage .leaflet-top.leaflet-right { margin: 6px 6px 0 0; }
.nm-stage .leaflet-bar a { width: 38px; height: 38px; line-height: 38px; font-size: 20px; color: var(--ink); }

/* Lišta nad mapou: název, počet, legenda, barvy, tlačítko Filtry; filtry se rozbalí vodorovně přes horní okraj mapy
   (uživatel 14. 11. 2026: „rozbalovací horizontální panel, aby byla vidět celá ČR“). */
.nm-top { position: relative; z-index: 600; flex: none; background: var(--surface); border-bottom: 1px solid var(--border); }
.nm-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; padding: 10px 20px; }
.nm-bar-title { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.nm-count { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.nm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
.nm-leg { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nm-leg i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 1px rgba(16, 23, 32, .12); }
.nm-seg-label, .nm-group legend { font-size: 11.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); padding: 0; }
.nm-group legend, .nm-group > .nm-seg-label, .nm-firm .nm-seg-label { display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.nm-seg { display: flex; align-items: center; gap: 4px; }
.nm-seg .nm-seg-label { margin-right: 6px; }
.nm-seg label { position: relative; cursor: pointer; }
.nm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.nm-seg label span { display: block; padding: 5px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
    color: var(--ink-2); background: var(--mute-bg); border: 1px solid transparent; }
.nm-seg input:checked + span { background: var(--primary-bg); color: var(--primary); border-color: color-mix(in srgb, var(--primary) 35%, transparent); }
.nm-seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.nm-toggle.is-open { background: var(--primary-bg); color: var(--primary); }
.nm-active { padding: 1px 7px; font-size: 11.5px; margin-left: 2px; }

.nm-drop { position: absolute; top: 100%; left: 0; right: 0; display: flex; flex-wrap: wrap; gap: 18px 40px; padding: 16px 20px 18px;
    background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-md); }
.nm-drop[hidden] { display: none; }
.nm-group { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
.nm-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; margin: 0 -8px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.nm-row:hover { background: var(--mute-bg); }
.nm-row input { margin: 0; flex: 0 0 auto; }
.nm-row-label { flex: 1; min-width: 0; }
.nm-row-num { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; margin-left: 12px; }
.nm-row:has(input:not(:checked)) .nm-row-label { color: var(--muted); }
.nm-firm { display: block; margin-bottom: 12px; }
.nm-firm select { width: 100%; min-width: 220px; }
.nm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.nm-missing { max-width: 360px; font-size: 13.5px; }
.nm-missing .nm-seg-label { color: var(--amber); }
.nm-missing ul { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 150px; overflow-y: auto; }
.nm-missing li a { font-weight: 600; }
.nm-missing li .t-sub { display: block; }
.nm-missing .btn { align-self: flex-start; }
@media (max-width: 700px) {
    .nm-bar { padding: 10px 14px; gap: 8px 14px; }
    .nm-legend { order: 5; flex-basis: 100%; }
    .nm-drop { padding: 14px; gap: 16px; max-height: 70vh; overflow-y: auto; }
    .nm-group { min-width: 0; flex: 1 1 100%; }
    .nm-stage { min-height: calc(100dvh - 120px); }
}

/* Značky a shluky — větší, ať jdou dobře trefit */
.nm-pin-wrap { background: none; border: 0; }
.nm-pin { position: relative; display: block; width: 30px; height: 30px; margin: 3px 3px 0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c); border: 3px solid #fff; box-shadow: 0 3px 8px rgba(16, 23, 32, .35); }
.nm-pin::after { content: ""; position: absolute; left: 8px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.nm-pin.is-final { opacity: .85; }
.nm-cluster-wrap { background: none; border: 0; }
.nm-cluster { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%;
    background: #1f2c40; color: #fff; font-weight: 700; font-size: 15px; border: 3px solid #fff;
    box-shadow: 0 0 0 5px color-mix(in srgb, #1f2c40 22%, transparent), 0 3px 10px rgba(16, 23, 32, .35); }
.nm-pop { display: flex; flex-direction: column; gap: 8px; font-family: inherit; }
.nm-pop-img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; display: block; }
.nm-pop-body { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.nm-pop-body strong { font-size: 14.5px; color: var(--ink); }
.nm-pop-sub { color: var(--muted); }
.nm-pop-row { display: flex; justify-content: space-between; gap: 10px; }
.nm-pop-row b { font-variant-numeric: tabular-nums; }
.nm-pop-kn { font-size: 12.5px; font-weight: 700; }
.nm-pop-kn.is-alarm { color: var(--red); } .nm-pop-kn.is-wait { color: var(--amber-strong); } .nm-pop-kn.is-ok { color: var(--green); } .nm-pop-kn.is-off { color: var(--muted); }
.np-kn-chip { display: inline-block; margin-top: 4px; text-decoration: none; }
.nm-pop-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.nm-pop-acts .btn-primary { color: #fff !important; }
.leaflet-popup-content { margin: 12px; }
.nm-mini { height: 220px; border-radius: 10px; margin-top: 12px; background: var(--mute-bg); overflow: hidden; z-index: 0; position: relative; }

/* Hlídač katastru a odhad ceny (Valuo) na detailu nemovitosti (14. 11. 2026). Barvy stavu katastru jako v Reditasu:
   červená = řešit hned, oranžová = naše řízení / kontrola neproběhla, zelená = bez plomby, šedá = nehlídá se. */
.page > .kn-status { margin-bottom: 18px; }
.np-kn .kn-status { margin: 0; border-left-width: 4px; }
.kn-status .kn-text { overflow-wrap: anywhere; }
.kn-status .kn-actions { flex: 0 0 auto; display: flex; gap: 8px; flex-wrap: wrap; }
.kn-status .kn-actions form { margin: 0; }
.kn-status.is-wait  { border-color: #e8d2a0; border-left-color: var(--amber-strong); background: var(--amber-bg); color: #5c4716; }
.kn-status.is-wait .kn-ico { background: var(--amber-strong); }
.kn-status.is-ok    { border-color: color-mix(in srgb, var(--green) 25%, transparent); border-left-color: var(--green); background: var(--green-bg); color: #234c3b; }
.kn-status.is-ok .kn-ico { background: var(--green); }
.kn-status.is-off   { border-color: var(--border); border-left-color: var(--gray); background: var(--surface-2); color: var(--ink-3); }
.kn-status.is-off .kn-ico { background: var(--gray); }
.kn-status.is-compact { padding: 10px 12px; gap: 10px; }
.kn-status.is-compact .kn-title { font-size: 14px; }
.kn-status.is-compact .kn-ico { width: 26px; height: 26px; }
.np-kn { display: flex; flex-direction: column; gap: 14px; }
.np-kn .alert { margin: 0; }
.np-kn-list { list-style: none; margin: 0; padding: 0; }
.np-kn-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.np-kn-list li:last-child { border-bottom: 0; }
.np-kn-list form { margin: 0; }
.np-kn-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.np-kn-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.np-kn-actions form { margin: 0; }
.np-kn-offer, .np-kn-proc { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.np-kn-offer .nm-seg-label, .np-kn-proc .nm-seg-label { margin: 0; display: flex; align-items: center; gap: 5px; }
.np-kn-proc .form-group { margin: 0; }
.np-kn-proc .form-actions { margin: 0; }
.np-kn-proc .t-sub { display: block; margin-top: 4px; }
.np-kn-check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.np-kn .np-axis-form { border-top: 0; padding: 0; }
.np-val-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.np-val-actions form { margin: 0; }
#odhady .alert { margin: 0 0 12px; }

/* ---------- Penvera nemovitosti: úvodní přehled (bod 9), 13. 11. 2026 ---------- */
a.stat.is-link { text-decoration: none; color: inherit; }
a.stat.is-link:hover { border-color: var(--primary-bd); }
.nd-exports { display: flex; flex-direction: column; gap: 8px; }
.nd-exports .btn { justify-content: flex-start; }
.nd-alerts { border-bottom: 1px solid var(--border-soft); padding: 4px 0 8px; }
.nd-alerts:last-child { border-bottom: 0; }
.nd-alerts summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; font-size: 14px; padding: 8px 0; list-style: none; }
.nd-alerts summary::-webkit-details-marker { display: none; }
.nd-alerts summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.nd-alerts:not([open]) summary::after { content: "▸"; }
.nd-alerts ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nd-alerts li a { display: block; padding: 7px 10px 7px 12px; border-left: 3px solid var(--border); border-radius: 0 8px 8px 0; background: var(--mute-bg); text-decoration: none; color: var(--ink); font-size: 13.5px; }
.nd-alerts li a:hover { background: var(--primary-bg); }
.nd-alerts li a span { color: var(--ink-2); }
.nd-alerts li.tone-red a { border-left-color: var(--red); }
.nd-alerts li.tone-amber a { border-left-color: var(--amber-strong); }
.nd-alerts li.tone-blue a { border-left-color: var(--primary); }


/* Sjednocení s Penverou (14. 11. 2026): záložky jako tlačítka (fotky v rekonstrukci), součet v deflistu. */
button.tab { background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; font-family: inherit; }
.deflist .dl-total { padding-top: 9px; border-top: 1px solid var(--line); font-weight: 800; color: var(--ink); font-size: 13px; }
.np-gallery { padding: 8px; }

/* Tipař — Nový tip: výběr Úvěr / Nemovitost (16. 11. 2026) */
.tip-choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; max-width: 820px; }
.tip-choice-card { --tc: var(--primary); --tc-bg: var(--blue-bg); display: flex; flex-direction: column; gap: 8px; padding: 22px;
    background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--radius); box-shadow: var(--shadow);
    color: var(--ink); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tip-choice-card.tone-green { --tc: var(--green); --tc-bg: var(--green-bg); }
.tip-choice-card:hover, .tip-choice-card:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--tc); }
.tip-choice-icon { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 14px;
    background: var(--tc-bg); color: var(--tc); margin-bottom: 4px; }
.tip-choice-name { font-size: 1.25rem; font-weight: 700; }
.tip-choice-desc { color: var(--muted); line-height: 1.5; flex: 1; }
.tip-choice-go { color: var(--tc); font-weight: 600; margin-top: 6px; }
.tip-choice-card:hover .tip-choice-go span { margin-left: 4px; }
@media (prefers-reduced-motion: reduce) { .tip-choice-card { transition: none; } .tip-choice-card:hover { transform: none; } }

/* Roletky na detailu úvěru (klient 17. 11. 2026): karta = <details>, hlavička = <summary> */
details.card-fold > summary.card-head { cursor: pointer; list-style: none; justify-content: flex-start; user-select: none; }
details.card-fold > summary.card-head::-webkit-details-marker { display: none; }
details.card-fold > summary .card-note { margin-left: auto; }
details.card-fold:not([open]) > summary.card-head { border-bottom-color: transparent; }
details.card-fold > summary:hover .card-title { color: var(--primary); }
details.card-fold > summary:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.card-fold-ico { flex: none; width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center;
    background: var(--blue-bg); transition: transform .2s ease; }
.card-fold-ico::before { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary);
    transform: translateY(-2px) rotate(45deg); }
details.card-fold[open] > summary .card-fold-ico { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .card-fold-ico { transition: none; } }

/* Finální schválená nabídka u příležitosti (16. 11. 2026) */
.card-offer { border-color: var(--primary-bd); border-top: 3px solid var(--primary); }
.card-offer .deflist dd { font-weight: 600; }
.offer-edit { margin-top: 14px; }
.offer-edit > summary { list-style: none; display: inline-flex; }
.offer-edit > summary::-webkit-details-marker { display: none; }
.offer-edit[open] > summary { margin-bottom: 12px; }

/* Vzhled portálu — přepínač Tmavý / Světlý / Podle zařízení (17. 11. 2026) */
.theme-menu { position: relative; }
.theme-menu > summary { list-style: none; padding-left: 8px; padding-right: 8px; }
.theme-menu > summary::-webkit-details-marker { display: none; }
.theme-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 60; min-width: 190px; padding: 8px;
    background: var(--surface); border: 1px solid var(--border-card); border-radius: var(--radius, 10px); box-shadow: var(--shadow-lg, 0 12px 30px -10px rgba(0, 0, 0, .35)); }
.theme-pop-title { margin: 2px 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.theme-pop-note { margin: 6px 8px 2px; font-size: 11.5px; color: var(--muted); }
.theme-opt { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 7px;
    background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; text-align: left; cursor: pointer; }
.theme-opt:hover { background: var(--row-hover, var(--mute-bg)); color: var(--ink); }
.theme-opt.is-active { background: var(--primary-bg); color: var(--primary-dark); font-weight: 700; }
body.portal.pt-dark .theme-opt.is-active { color: var(--blue); }
/* Světlý portál: základní světlé barvy aplikace + jemný modrý nádech podkladu, ať není „bílá na bílé“. */
body.portal.pt-light { color-scheme: light;
    background: radial-gradient(1000px 520px at 92% -10%, rgba(55, 130, 231, .10), transparent 62%),
                radial-gradient(900px 520px at 0% 110%, rgba(55, 130, 231, .06), transparent 60%), var(--bg);
    background-attachment: fixed; }

/* Dokumenty obchodu po záložkách přes celou šířku (J. Grmolec 17. 11. 2026) — templates/_loan_docs.php, assets/js/loan-docs.js */
.docs-card { scroll-margin-top: 80px; }
.docs-head { gap: 10px; }
.docs-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.docs-tabs { display: flex; flex-wrap: wrap; gap: 0 2px; padding: 4px 12px 0; border-bottom: 1px solid var(--border); }
.docs-tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent;
    background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--primary); cursor: pointer; border-radius: 8px 8px 0 0; }
.docs-tab:hover { background: var(--primary-bg); }
.docs-tab.is-active { color: var(--ink); border-bottom-color: var(--primary); }
.docs-count { min-width: 20px; padding: 1px 6px; border-radius: 6px; background: var(--mute-bg); color: var(--muted); font-size: 11px; font-weight: 700; text-align: center; }
.docs-count.has { background: var(--primary); color: #fff; }
.docs-body { padding: 16px; min-height: 150px; border-radius: 0 0 var(--radius) var(--radius); transition: background .15s; }
.docs-body.is-drop { outline: 2px dashed var(--primary); outline-offset: -8px; background: var(--primary-bg); }
.docs-card.is-uploading .docs-body { opacity: .5; pointer-events: none; }
.docs-empty { display: flex; align-items: center; gap: 8px; margin: 6px 0; color: var(--muted); }
.docs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.doc-tile { position: relative; border: 1px solid var(--border-card); border-radius: var(--radius-sm); background: var(--surface); transition: border-color .15s, box-shadow .15s; }
.doc-tile:hover { border-color: var(--primary-bd); }
.doc-tile.is-selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-bg-2); }
.doc-check { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 2; display: flex; padding: 4px; cursor: pointer; }
.doc-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.doc-open { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 14px 10px 40px; border: 0; background: none;
    font: inherit; color: inherit; text-align: left; cursor: pointer; }
.doc-thumb { flex: 0 0 132px; height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; overflow: hidden;
    border: 1px solid var(--border-soft); border-radius: 6px; background: #fff; color: #8a97ab; }
.doc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.doc-thumb.has-canvas { justify-content: flex-start; }
.doc-thumb canvas { display: block; }
.doc-ext { font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.doc-meta { min-width: 0; }
.doc-name { display: block; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.doc-time { display: flex; align-items: center; gap: 5px; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.docs-bulk { position: sticky; bottom: 12px; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 16px 16px; padding: 10px 12px;
    border: 1px solid var(--primary-bd); border-radius: var(--radius-sm); background: var(--surface); box-shadow: var(--shadow-md); }
.docs-bulk[hidden] { display: none; }
.docs-bulk-n { margin-right: 6px; font-size: 13px; }
.docs-bulk select { width: auto; min-width: 170px; height: 32px; padding: 4px 8px; font-size: 13px; }
.doc-viewer { width: min(1100px, 96vw); max-width: 96vw; height: 92vh; max-height: 92vh; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.doc-viewer[open] { display: flex; flex-direction: column; }
.doc-viewer::backdrop { background: rgba(10, 15, 25, .62); }
.doc-viewer-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.doc-viewer-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; color: var(--ink); }
.doc-viewer-sp { flex: 1; }
.doc-viewer-body { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 12px; overflow: auto; background: #525659; }
.doc-viewer-page { max-width: 1000px; background: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, .45); }
.doc-viewer-img { max-width: 100%; max-height: 100%; margin: auto; object-fit: contain; }
.doc-viewer-frame { flex: 1; width: 100%; border: 0; background: #fff; }
.doc-viewer-msg { margin: auto; color: #fff; text-align: center; }
@media (max-width: 640px) {
    .docs-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .docs-tab { white-space: nowrap; }
    .docs-grid { grid-template-columns: 1fr; }
    .doc-thumb { flex-basis: 88px; height: 88px; }
    .doc-viewer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .doc-viewer .hide-sm { display: none; }
}

/* Chybí naskenované smlouvy (17. 11. 2026): červený vykřičník v přehledu a detailu úvěru */
.scan-warn { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: 4px; border-radius: 50%;
    background: var(--red, #d93a2b); color: #fff; font-size: 12px; font-weight: 800; line-height: 1; vertical-align: middle; cursor: help;
    box-shadow: 0 0 0 3px var(--red-bg, rgba(217, 58, 43, .15)); position: relative; z-index: 1; }
.page-title .scan-warn { width: 24px; height: 24px; font-size: 15px; margin-left: 8px; vertical-align: 4px; }
.scan-warn-link, .scan-warn-link:hover { text-decoration: none; }
.alert-scan { display: flex; align-items: flex-start; gap: 10px; }
.alert-scan .scan-warn { flex: 0 0 auto; margin: 1px 0 0; }

/* Nastavení → Nemovitosti: volba etapy (17. 11. 2026) */
.nem-stage-opt { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.nem-stage-opt:last-of-type { border-bottom: 0; }
.nem-stage-opt input { margin-top: 3px; }
.nem-stage-opt .t-sub { display: block; margin-top: 2px; }

/* Rozcestník: Tržiště do 3. etapy jako ohlášení „bude dopracováno“ (17. 11. 2026) */
.hub-card.is-disabled { cursor: default; }
.hub-card.is-disabled:hover { transform: none; }
.hub-card.is-disabled .hub-card-icon, .hub-card.is-disabled .hub-card-name, .hub-card.is-disabled .hub-card-desc { opacity: .7; }
.hub-card.is-disabled .hub-go { opacity: .8; }
.hub-soon { display: flex; align-items: center; gap: 8px; margin: 14px 0 4px; padding: 10px 12px; border-radius: 10px;
    background: var(--amber-bg, #fdf3dc); color: var(--amber-strong, #8a5a00); font-size: 13.5px; font-weight: 600; }

/* Údaje pro smlouvy — sbalitelná kompaktní karta na detailu úvěru a klienta (17. 11. 2026) */
.cd-card > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cd-card > summary::-webkit-details-marker { display: none; }
.cd-card > summary::before { content: '▸'; color: var(--muted); font-size: 13px; }
.cd-card[open] > summary::before { content: '▾'; }
.cd-sum { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-left: auto; min-width: 0; }
.cd-miss-list { display: inline; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cd-card .card-body { padding-top: 6px; }
.cd-note { font-size: 13px; color: var(--ink-2); margin: 0 0 10px; }
.cd-group + .cd-group { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.cd-group-title { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.cd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px 12px; }
.cd-grid .form-group { gap: 3px; min-width: 0; }
.cd-grid .form-label { font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cd-grid .form-control { padding: 6px 9px; font-size: 13.5px; }
.cd-grid textarea.form-control { min-height: 34px; resize: vertical; }
.cd-grid .cd-wide { grid-column: span 2; }
.cd-auto { font-size: 11.5px; color: var(--muted); }
.cd-inline { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 13px; padding-top: 4px; }
.cd-debts { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 4px 6px; }
.cd-card .form-actions { margin-top: 10px; }
@media (max-width: 640px) { .cd-grid .cd-wide { grid-column: 1 / -1; } .cd-miss-list { display: none; } }
