/* J Services IS
   Tmavý vzhled: pravidla s předponou :root[data-theme="dark"] – atribut nastavuje server podle volby uživatele
   (Podle systému / Světlý / Tmavý; u „podle systému“ podle cookie sysdark, kterou udržuje app.js). Ne @media prefers-color-scheme. */
:root {
    --bg: #f4f6fa;
    --surface: #ffffff;
    --surface-2: #f8f9fc;
    --border: #e3e7ef;
    --text: #1b2333;
    --muted: #6b7486;
    --primary: #1f4fd1;
    --primary-hover: #1941b0;
    --primary-soft: #e8eefc;
    --sidebar: #141b2d;
    --sidebar-text: #aab3c5;
    --sidebar-active: #ffffff;
    --success: #1a7f4b;
    --success-soft: #e3f5eb;
    --warning: #9a6200;
    --warning-soft: #fdf3dc;
    --danger: #c0352b;
    --danger-soft: #fce9e7;
    --info-soft: #e8eefc;
    --orlen: #ff0800;        /* ORLEN – červená z orlen.cz */
    --orlen-ink: #14102d;    /* ORLEN – tmavě modrá */
    --orlen-soft: #fff0ef;
    --mol: #008663;          /* MOL – zelená z molcesko.cz */
    --mol-accent: #e5362d;   /* MOL – červená z loga */
    --mol-soft: #e6f4ef;
    --best: #8a6100;
    --best-soft: #fff3cc;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
    color-scheme: light;
}

:root[data-theme="dark"] { --bg: #0f1420; --surface: #171e2d; --surface-2: #1c2436; --border: #2a3448; --text: #e6e9f0; --muted: #8e98ac; --primary: #5b85f5; --primary-hover: #7598f7; --primary-soft: #1e2a4a; --sidebar: #0b0f19; --success: #4cc68a; --success-soft: #16301f; --warning: #e7b44c; --warning-soft: #33280f; --danger: #f07167; --danger-soft: #3a1a18; --info-soft: #1e2a4a; --orlen: #ff4a3d; --orlen-ink: #ffd9d6; --orlen-soft: #3a1614; --mol: #2fb08a; --mol-soft: #10302a; --best: #f2c84b; --best-soft: #3a2f0e; --shadow: none; color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* atribut hidden musí vyhrát i nad display: flex u tříd */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    margin: 0;
    font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85em; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

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


.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.user:hover { text-decoration: none; }
.avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .8rem;
}

.content { padding: 2rem; max-width: 1600px; width: 100%; }

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.page-head h1 { margin: 0; }
.page-head p { margin: .25rem 0 0; }

.section { margin-bottom: 2rem; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
.section-head h2 { margin: 0; }
.group-title { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin: 1.25rem 0 .5rem; }

/* --- Cards, grid ----------------------------------------------------------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}
.card + .card { margin-top: 1rem; }
.card.empty { color: var(--muted); text-align: center; padding: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.grid-2.grid-top { align-items: start; }
.grid-2 > .card + .card { margin-top: 0; }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.link-card {
    display: flex; flex-direction: column; gap: .2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    color: var(--text);
    box-shadow: var(--shadow);
    transition: border-color .15s, transform .15s;
}
.link-card:hover { border-color: var(--primary); text-decoration: none; transform: translateY(-1px); }
.link-title { font-weight: 600; }
.link-desc { color: var(--muted); font-size: .88rem; }
.link-host { color: var(--primary); font-size: .8rem; margin-top: auto; padding-top: .3rem; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: .5rem 1.25rem; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; }

/* --- Forms ----------------------------------------------------------------- */
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .35rem; }
.field > span { font-weight: 600; font-size: .88rem; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=url], input[type=number], input[type=date], select, textarea {
    width: 100%;
    font: inherit;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .55rem .75rem;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem 1rem; margin: 0; }
.fieldset legend { font-weight: 600; font-size: .88rem; padding: 0 .35rem; }
.check { display: flex; align-items: flex-start; gap: .6rem; padding: .35rem 0; cursor: pointer; }
.check input { margin-top: .3rem; width: 16px; height: 16px; accent-color: var(--primary); }
.check-inline { align-self: end; padding-bottom: .6rem; }
.form-actions { display: flex; align-items: center; gap: 1rem; padding-top: .5rem; }

/* --- Buttons --------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
    font: inherit; font-weight: 600;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: .55rem 1rem;
    cursor: pointer;
    background: var(--surface-2);
    color: var(--text);
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.btn-danger-ghost:hover { background: var(--danger-soft); }
.btn-sm { padding: .3rem .65rem; font-size: .85rem; }
.btn-block { width: 100%; }

/* --- Tables ---------------------------------------------------------------- */
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .75rem 1rem; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table-compact th, .table-compact td { padding: .5rem .75rem; font-size: .88rem; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions form { display: inline; margin: 0; }
.table .actions .icon-btn { display: inline-grid; vertical-align: middle; }
.user-roles { font-size: .84rem; }
.badge-ended { color: #5b6475; background: #eceef2; border-color: transparent; }
.ended-note { display: block; font-size: .74rem; margin-top: .15rem; }
tr.row-muted .avatar { background: #b6bdc9; }
tr.row-muted strong { color: var(--muted); }
.id-avatar.ended { background: #b6bdc9; box-shadow: none; }
.ended-box { display: flex; flex-direction: column; gap: .15rem; width: 100%; padding: .7rem .8rem; font-size: .82rem; color: var(--muted); text-align: center; background: var(--surface-2); border: 1px dashed var(--border); border-radius: 12px; }
.ended-box strong { color: var(--text); }
.o2-side .end-btn { color: var(--danger); }
.o2-side .end-btn:hover { background: var(--danger-soft); }
.table .truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .details { max-width: 420px; word-break: break-word; }
.row-muted td { opacity: .55; }

.badge {
    display: inline-block;
    font-size: .75rem; font-weight: 600;
    padding: .1rem .5rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
}
.badge-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge-warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge-primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }

.pager { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1rem; }

/* --- Alerts ---------------------------------------------------------------- */
.alert { border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; border: 1px solid transparent; }
.alert ul { margin: .35rem 0 0; padding-left: 1.25rem; }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-warning { background: var(--warning-soft); color: var(--warning); }
.alert-info { background: var(--info-soft); color: var(--primary); }

.error-page { text-align: center; max-width: 480px; margin: 2rem auto; }
.error-code { font-size: 3rem; font-weight: 800; color: var(--primary); }

/* --- Guest (login) --------------------------------------------------------- */
body.guest { display: flex; min-height: 100vh; align-items: center; justify-content: center; padding: 1rem; }
.guest-wrap { width: 100%; max-width: 400px; }
.guest-wrap:has(.guest-card-wide) { max-width: 560px; }
.guest-brand { display: flex; flex-direction: column; align-items: center; gap: .6rem; margin-bottom: 1.5rem; }
.guest-logo { width: 88px; height: 88px; border-radius: 20px; box-shadow: 0 8px 24px rgba(10, 79, 158, .25); }
.guest-name { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.guest-card h1 { font-size: 1.25rem; margin-bottom: 1rem; }
.guest-foot { text-align: center; color: var(--muted); font-size: .8rem; margin-top: 1.5rem; }

/* --- Responsive ------------------------------------------------------------ */
@media (max-width: 860px) {
    .app { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: static; display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; overflow-x: auto; }
    .brand { padding: .25rem .5rem .25rem 0; white-space: nowrap; }
    .nav { display: flex; gap: .25rem; }
    .nav a { white-space: nowrap; margin: 0; padding: .4rem .6rem; }
    .nav-heading { display: none; }
    .topbar { padding: .6rem 1rem; }
    .user-name { display: none; }
    .content { padding: 1.25rem 1rem; }
    .grid-2 { grid-template-columns: 1fr; }
}

/* --- Pošta ----------------------------------------------------------------- */
.filters { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filters select, .filters input { width: auto; min-width: 220px; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
.stack form { margin: 0; display: flex; align-items: center; gap: .5rem; }
.field small { font-weight: normal; }
.text-danger { color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.mail-body {
    white-space: pre-wrap;
    word-break: break-word;
    font: .9rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin: 0;
    max-height: 70vh;
    overflow: auto;
}

/* --- Ceny PHM -------------------------------------------------------------- */
.segmented { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.segmented a { padding: .4rem .9rem; color: var(--text); font-weight: 600; font-size: .88rem; }
.segmented a:hover { text-decoration: none; background: var(--surface-2); }
.segmented a.active { background: var(--primary); color: #fff; }
.price-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; margin-bottom: 2rem; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; }
.price-card-title { font-weight: 700; margin-bottom: .5rem; }
.price-card-row { display: flex; justify-content: space-between; align-items: baseline; padding: .15rem .4rem; margin: 0 -.4rem; border-radius: 6px; }
.price-card-row span { color: var(--muted); font-size: .88rem; }
.price-card-row strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.price-card-row.best { background: var(--best-soft); }
.price-card-row.best strong { color: var(--best); }
.price-card-row.best strong::before { content: "▼ "; font-size: .75em; }
.price-card-diff { margin-top: .5rem; font-size: .82rem; color: var(--muted); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.price-table th.group { text-align: center; }
.price-table .group-start { border-left: 1px solid var(--border); }
.table td.cheaper, .legend-cheaper { background: var(--best-soft); color: var(--best); font-weight: 700; }
.table td.cheaper::before, .legend-cheaper::before { content: "▼ "; font-size: .75em; }
.legend-cheaper { padding: 0 .35rem; border-radius: 4px; }
.table td.carried, .legend .carried { color: var(--muted); font-weight: normal; }
.table td.carried.cheaper { color: var(--best); opacity: .7; }

/* Značky dodavatelů */
.brand-badge { display: inline-block; font-weight: 800; font-size: .72rem; letter-spacing: .04em; padding: .1rem .45rem; border-radius: 4px; color: #fff; line-height: 1.4; }
.brand-orlen { background: var(--orlen); }
.brand-mol { background: var(--mol); box-shadow: inset 0 -2px 0 var(--mol-accent); }
.price-card-row .brand-badge, .price-card-diff .brand-badge { color: #fff; font-size: .72rem; }
.table th.sup-orlen { color: var(--orlen); border-top: 3px solid var(--orlen); }
.table th.sup-mol { color: var(--mol); border-top: 3px solid var(--mol); }
.price-card { border-top: 3px solid var(--border); }
.price-card-row + .price-card-row { margin-top: .15rem; }
.legend { font-size: .82rem; margin-top: .75rem; }
.head-actions form { margin: 0; }

/* Vyhlášená cena + cena po slevě */
.price-card-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .25rem .5rem; margin-bottom: .4rem; }
.price-card-head .price-card-title { white-space: nowrap; }
.price-card-cols { margin-left: auto; }
.price-card-head .price-card-title { margin: 0; }
.price-card-cols, .price-card-prices { display: inline-flex; gap: .75rem; }
.price-card-cols span { width: 4.4rem; text-align: right; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.price-card-prices > * { width: 4.4rem; text-align: right; font-variant-numeric: tabular-nums; }
.price-card-prices .p-net { color: var(--muted); font-size: .88rem; }
.price-card-row.best .p-net { color: var(--best); opacity: .8; }
.price-card-row.best strong::before { content: ""; }
.price-card-row.best { box-shadow: inset 3px 0 0 var(--best); }
.price-table .price-cell .p-list, .price-table .price-cell .p-net { display: block; }
.price-table .price-cell .p-list { font-weight: 700; }
.price-table .price-cell .p-net { color: var(--muted); font-size: .8rem; font-weight: normal; }
.table td.cheaper.price-cell .p-net { color: var(--best); opacity: .8; }
.table td.carried .p-list { font-weight: 600; color: var(--muted); }
.table td.carried.cheaper .p-list { color: var(--best); }
.table td.cheaper.price-cell::before { content: none; }
.table td.cheaper.price-cell .p-list::before { content: "▼ "; font-size: .75em; }

/* --- Ceny PHM: rozložení pro různé šířky ----------------------------------- */
.price-card-head { flex-direction: column; align-items: stretch; flex-wrap: nowrap; }
.price-card-cols { align-self: flex-end; margin-left: 0; }
/* Široký monitor: všechny karty v jedné řadě. */
@media (min-width: 1500px) {
    .price-cards { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
/* Menší obrazovka: karty v jedné řadě, posun do strany. */
@media (max-width: 1499px) {
    .price-cards { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: .5rem; }
    .price-card { flex: 0 0 250px; scroll-snap-align: start; }
}
/* Mobil: karty pod sebou. */
@media (max-width: 600px) {
    .price-cards { display: grid; grid-template-columns: 1fr; overflow: visible; }
    .price-card { flex: none; }
    .page-head .segmented { align-self: flex-start; }
}
/* Tabulka: datum zůstává při posunu do strany vidět. */
.price-table th:first-child, .price-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); }
.price-table thead th:first-child { background: var(--surface-2); }
.price-table td:first-child { box-shadow: 1px 0 0 var(--border); }
@media (max-width: 600px) {
    .price-table th:first-child, .price-table td:first-child { padding-left: .6rem; padding-right: .6rem; }
}

/* Smluvní slevy – sbalená sekce pod tabulkou */
.discounts { margin-top: 2rem; font-size: .85rem; }
.discounts summary { cursor: pointer; color: var(--muted); display: inline-block; }
.discounts summary:hover { color: var(--text); }
.discounts[open] summary { margin-bottom: .75rem; }
.discounts-body { max-width: 720px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .75rem 1rem; }
.discounts-body .table th, .discounts-body .table td { padding: .35rem .5rem; }
.discount-form { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .75rem; }
.discount-form input, .discount-form select { width: auto; padding: .3rem .5rem; font-size: .85rem; }
.discount-form input[name=amount] { width: 7rem; }
.discount-form input[name=note] { flex: 1 1 8rem; }
.small { font-size: .78rem; margin: .5rem 0 0; }

/* Příplatek prémiového paliva – popisek nad dvojicí dlaždic */
.price-card-premium { margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--border); }
.premium-label { font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: .4rem; }
.premium-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
.premium-chip { display: flex; align-items: center; justify-content: space-between; gap: .4rem; padding: .3rem .35rem .3rem .3rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.premium-chip strong { font-size: .85rem; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.premium-chip .brand-badge { color: #fff; font-size: .62rem; padding: .08rem .38rem; }

/* --- Aktuální ceny PHM: kompaktní tabulka (partials/fuel_current.php) ------ */
.cur-table { font-variant-numeric: tabular-nums; }
.cur-table th, .cur-table td { padding: .55rem .9rem; vertical-align: middle; }
.cur-table th .brand-badge { color: #fff; }
.cur-sub { font-size: .72rem; font-weight: normal; color: var(--muted); text-transform: none; letter-spacing: 0; }
.cur-table .fuel-name { font-weight: 600; }
.cur-table .price-cell .p-list { font-weight: 700; font-size: 1rem; }
.cur-table .price-cell .p-net { color: var(--muted); font-size: .8rem; margin-left: .35rem; font-weight: normal; }
.show-sm { display: none; }
@media (max-width: 600px) {
    .hide-sm { display: none; }
    .show-sm { display: block; }
    .cur-table th, .cur-table td { padding: .5rem .6rem; }
    .cur-table .price-cell .p-list, .cur-table .price-cell .p-net { display: block; margin-left: 0; }
}
.card + .section-head { margin-top: 2rem; }

/* iOS Safari špatně vykresluje sticky buňky v tabulce s rowspan uvnitř posuvného kontejneru – na mobilu bez připnutí. */
@media (max-width: 600px) {
    .price-table th:first-child, .price-table td:first-child { position: static; box-shadow: none; }
    .section-head { flex-wrap: wrap; gap: .5rem; }
}

/* Aktuální ceny na mobilu: pevné rozdělení šířky, tabulka nesmí přetéct displej. */
@media (max-width: 600px) {
    .cur-table { table-layout: fixed; width: 100%; }
    .cur-table th:nth-child(1), .cur-table td:nth-child(1) { width: 42%; }
    .cur-table th:nth-child(2), .cur-table td:nth-child(2),
    .cur-table th:nth-child(3), .cur-table td:nth-child(3) { width: 29%; }
    .cur-table th, .cur-table td { padding: .45rem .5rem; }
    .cur-table .fuel-name { font-size: .9rem; white-space: normal; word-break: break-word; }
    .cur-table .price-cell .p-list { font-size: .95rem; }
    .cur-table .price-cell { white-space: nowrap; overflow: hidden; }
}
.cur-sub .brand-badge { color: #fff; font-size: .62rem; padding: 0 .3rem; }
@media (max-width: 600px) { .cur-table .fuel-name .cur-sub { margin-top: .1rem; line-height: 1.35; } }

/* --- Varianta 1: podtržená = levnější vyhlášená, zelená = levnější po slevě --- */
.win-list { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.win-net { background: #6af04c; color: #173404 !important; border-radius: 4px; padding: 0 .3rem; font-weight: 700 !important; opacity: 1 !important; }
.price-cell .p-net.win-net { display: inline-block; }
.price-table .price-cell .p-net.win-net { display: inline-block; margin-top: .1rem; }
.cur-valid { margin: 0 0 .5rem; font-weight: 600; }
.cur-upcoming { margin: .5rem 0 0; font-size: .85rem; padding: .5rem .75rem; background: var(--info-soft); border-radius: 8px; }
.row-future td { background: var(--surface-2); }
.future-tag { display: inline-block; margin-left: .4rem; font-size: .7rem; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 999px; padding: 0 .45rem; }
.legend .win-net { font-size: .78rem; }
.legend + .section-head, .cur-upcoming + .section-head { margin-top: 2rem; }

/* --- Nástěnka: přesouvání bloků --------------------------------------------- */
.drag-handle { display: inline-block; cursor: grab; color: var(--muted); margin-right: .45rem; padding: 0 .15rem; border-radius: 4px; touch-action: none; user-select: none; -webkit-user-select: none; font-weight: normal; }
.drag-handle:hover, .drag-handle:focus-visible { color: var(--text); background: var(--surface-2); outline: none; }
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }
.widget { transition: box-shadow .15s, background .15s; border-radius: var(--radius); }
.widget.dragging { background: var(--surface); box-shadow: 0 8px 24px rgba(16, 24, 40, .15); outline: 2px dashed var(--primary); outline-offset: 6px; }
@media (max-width: 600px) { .drag-handle { font-size: 1.2rem; padding: .1rem .35rem; } }

/* --- Rychlé odkazy: spouštěč aplikací (varianta A) -------------------------- */
.app-launcher { padding: 1rem 1.25rem; }
.chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .75rem; }
.chip { font: inherit; font-size: .82rem; padding: .25rem .8rem; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.app-cat { margin: .75rem 0 .25rem; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.app-group:first-of-type .app-cat, .chips + .app-group .app-cat { margin-top: 0; }
.app-sub { display: flex; align-items: center; gap: .5rem; margin: .6rem 0 .2rem; font-size: .75rem; color: var(--muted); }
.app-sub::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: .25rem; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .6rem .25rem; border-radius: 12px; color: var(--text); text-align: center; transition: background .15s, transform .15s; }
.app-tile:hover { background: var(--surface-2); text-decoration: none; transform: translateY(-1px); }
.app-name { font-size: .8rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app-icon { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; letter-spacing: .02em; flex: none; overflow: hidden; }
.app-icon.has-image { background: #fff; border: 1px solid var(--border); }
.app-icon img { width: 88%; height: 88%; object-fit: contain; } /* obrázek odkazu co největší, s malým okrajem */
.app-icon-sm { width: 32px; height: 32px; border-radius: 9px; font-size: .75rem; }
.ic-blue { --ic-bg: #e6f1fb; --ic-fg: #0c447c; background: var(--ic-bg); color: var(--ic-fg); }
.ic-teal { --ic-bg: #e1f5ee; --ic-fg: #085041; background: var(--ic-bg); color: var(--ic-fg); }
.ic-green { --ic-bg: #eaf3de; --ic-fg: #27500a; background: var(--ic-bg); color: var(--ic-fg); }
.ic-amber { --ic-bg: #faeeda; --ic-fg: #633806; background: var(--ic-bg); color: var(--ic-fg); }
.ic-red { --ic-bg: #fcebeb; --ic-fg: #791f1f; background: var(--ic-bg); color: var(--ic-fg); }
.ic-purple { --ic-bg: #eeedfe; --ic-fg: #3c3489; background: var(--ic-bg); color: var(--ic-fg); }
.ic-gray { --ic-bg: #f1efe8; --ic-fg: #444441; background: var(--ic-bg); color: var(--ic-fg); }
@media (max-width: 600px) {
    .app-launcher { padding: .75rem; }
    .app-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .app-icon { width: 44px; height: 44px; border-radius: 12px; }
    .app-name { font-size: .72rem; }
}

/* Správa odkazů, kategorií, skupin */
.link-row-title { display: flex; align-items: center; gap: .6rem; }
.link-row-title > span { display: flex; flex-direction: column; min-width: 0; }
.truncate-inline { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-row td { background: var(--surface-2); font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-top: .35rem; padding-bottom: .35rem; }
.icon-choice { display: flex; gap: 1rem; align-items: flex-start; }
.check-sub { margin-left: 1.6rem; }
.field-label { font-weight: 600; font-size: .88rem; margin: .25rem 0; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.inline-form input[type=text], .inline-form select { width: auto; flex: 1 1 12rem; }
.input-narrow { width: 5rem !important; flex: none !important; }
.inline-form-row { margin: 0; display: inline-flex; flex: 1; }
.inline-delete { display: inline; margin-left: .25rem; }
.cat-sub td { padding-left: 2.25rem; }
.cat-sub td > form:first-child::before { content: "↳"; color: var(--muted); margin-right: .25rem; }
.inline-form .count { font-size: .8rem; white-space: nowrap; }
input[type=file] { font: inherit; font-size: .85rem; }

/* --- Uživatelé a přístupy: záložky ------------------------------------------ */
.tabs { display: inline-flex; flex-wrap: wrap; gap: .25rem; padding: .25rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; margin: -0.75rem 0 1rem; }
.tabs a { padding: .35rem .8rem; border-radius: 7px; color: var(--muted); font-weight: 600; font-size: .88rem; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab-count { font-weight: normal; font-size: .75rem; color: var(--muted); margin-left: .2rem; }
.tab-intro { margin: -0.25rem 0 1rem; font-size: .88rem; }
.user-cell { display: flex; align-items: center; gap: .6rem; }
.user-cell > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }
.pill { display: inline-block; white-space: nowrap; font-size: .75rem; padding: .05rem .5rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); margin: 0 .2rem .15rem 0; }

/* --- Nástěnka: sbalitelné bloky --------------------------------------------- */
.collapse-toggle { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; }
.collapse-toggle:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.collapse-toggle .icon { transform: rotate(180deg); transition: transform .15s; }
.widget.collapsed .collapse-toggle .icon { transform: rotate(0); }
.widget-summary { display: none; font-size: .8rem; color: var(--muted); }
.widget.collapsed .widget-summary { display: inline; }
.widget.collapsed .widget-action { display: none; }
.widget.collapsed { margin-bottom: .75rem; }
.widget.collapsed .section-head { margin-bottom: 0; padding: .5rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.section-head .head-actions { align-items: center; }

.group-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 1.5rem; }
.group-links .app-sub { margin-top: .5rem; }
.check-disabled { opacity: .6; cursor: default; }

/* --- Editor: boční přehled + záložky (detail skupiny) ----------------------- */
.editor { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 1rem; align-items: start; }
.editor-side { position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem; }
.editor-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); display: flex; align-items: center; justify-content: center; }
.editor-icon .icon { width: 22px; height: 22px; }
.editor-stats { display: grid; grid-template-columns: 1fr auto; margin: 0; font-size: .88rem; }
.editor-stats dt, .editor-stats dd { padding: .4rem 0; border-bottom: 1px solid var(--border); margin: 0; }
.editor-stats dt { color: var(--muted); }
.editor-stats dd { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.editor-dirty { display: none; margin: 0; text-align: center; }
.editor.is-dirty .editor-dirty { display: block; color: var(--warning); }
.editor-main { padding: 0; overflow: hidden; }
.editor-tabs { display: flex; gap: .25rem; padding: 0 1rem; border-bottom: 1px solid var(--border); overflow-x: auto; }
.editor-tabs button { font: inherit; font-weight: 600; font-size: .9rem; padding: .8rem .9rem; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--muted); cursor: pointer; white-space: nowrap; }
.editor-tabs button:hover { color: var(--text); }
.editor-tabs button.on { color: var(--text); border-bottom-color: var(--primary); }
.editor-panel { padding: .75rem 1rem 1rem; }
.editor-search { width: 100%; margin-bottom: .5rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .5rem .75rem; }
.switch-row { display: flex; align-items: center; gap: .75rem; padding: .55rem .25rem; border-bottom: 1px solid var(--border); cursor: pointer; }
.switch-row:last-child { border-bottom: 0; }
.switch-row:hover { background: var(--surface-2); }
.switch-row.is-disabled { cursor: default; opacity: .65; }
.switch-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.switch-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editor-cat { margin-top: .5rem; }
.editor-cat-head { display: flex; justify-content: space-between; align-items: center; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .5rem .25rem .25rem; }
.link-btn { font: inherit; font-size: .8rem; text-transform: none; letter-spacing: 0; font-weight: 600; background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; }
/* Přepínač (checkbox) */
input.switch { appearance: none; -webkit-appearance: none; margin-left: auto; flex: none; width: 38px; height: 22px; border-radius: 999px; background: var(--border); position: relative; cursor: pointer; transition: background .15s; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
input.switch:checked { background: var(--primary); }
input.switch:checked::after { transform: translateX(16px); }
input.switch:disabled { cursor: default; }
input.switch:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (max-width: 860px) {
    .editor { grid-template-columns: 1fr; }
    .editor-side { position: static; padding: 1rem; }
    .editor-icon, .editor-stats { display: none; }  /* počty jsou vidět v záložkách */
}
.editor-avatar { font-weight: 700; font-size: 1rem; }
.switch-row-plain { border: 0; padding: .25rem 0; }
.switch-row-plain:hover { background: none; }
.editor-hint { margin: 0 0 .5rem; }
a.switch-row { color: var(--text); }
a.switch-row:hover { text-decoration: none; }
.row-arrow { margin-left: auto; font-size: 1.2rem; }
.editor-panel .grid-2 { margin-bottom: .5rem; }

/* --- Nástěnka: „Upravit nástěnku“ (okno) ------------------------------------ */
.dashboard-bar { display: flex; justify-content: flex-end; margin: -.75rem 0 .75rem; }
.dashboard-bar .icon { width: 15px; height: 15px; }
.sheet-dialog { width: min(440px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); border: 1px solid var(--border); border-radius: 14px; padding: 1.25rem; background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgba(16, 24, 40, .25); }
.sheet-dialog::backdrop { background: rgba(15, 20, 32, .45); }
.sheet-dialog h2 { margin: 0 0 .75rem; }
.sort-list { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sort-list .switch-row { cursor: default; background: var(--surface); }
.sort-list .switch-row:last-child { border-bottom: 0; }
.sort-list .drag-handle { margin-right: 0; }
.sort-list .dragging { box-shadow: 0 8px 24px rgba(16, 24, 40, .15); outline: 2px dashed var(--primary); outline-offset: -2px; }
.sort-label { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0; cursor: pointer; }
.dialog-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
@media (max-width: 600px) {
    /* Na mobilu jako spodní panel. */
    .sheet-dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
    .dialog-actions .btn { flex: 1; }
    .dashboard-bar { margin-top: -.5rem; }
}

/* --- Skupina → Moduly: přístup + „na nástěnce hned“; uživatel → Nástěnka ---- */
.module-row { cursor: default; }
.module-row:hover, .switch-row-static:hover { background: none; }
.module-row .switch-text { flex: 1; }
.mini-switch { display: flex; flex-direction: column; align-items: center; gap: .15rem; cursor: pointer; flex: none; width: 5.5rem; text-align: center; }
.mini-switch small { font-size: .7rem; color: var(--muted); line-height: 1.2; }
.mini-switch input.switch { margin-left: 0; }
.mini-switch:has(input:disabled) { cursor: default; opacity: .5; }
.switch-row-static { cursor: default; flex-wrap: wrap; }
.switch-row-static .switch-text { flex: 1; }
@media (max-width: 600px) {
    /* Název přes celou šířku, přepínače pod ním vpravo. */
    .module-row { flex-wrap: wrap; row-gap: .4rem; }
    .module-row .switch-text { flex: 1 1 calc(100% - 4.5rem); }
    .module-row .mini-switch { flex-direction: row; width: auto; gap: .5rem; }
    .module-row .mini-switch:first-of-type { margin-left: auto; }
}

/* --- Nákupní seznam --------------------------------------------------------- */
.is-dirty .editor-dirty { display: inline; color: var(--warning); }
.app-icon-xs { width: 18px; height: 18px; border-radius: 5px; font-size: .5rem; letter-spacing: 0; }
.app-icon-xs.has-image img, .app-icon-sm.has-image img { width: 80%; height: 80%; }
.shop-all { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }
.shop { max-width: 760px; }

/* výběr obchodu – řada log */
.shop-stores { display: flex; gap: .35rem; overflow-x: auto; margin: 0 0 .75rem; padding: 4px 2px 6px; scrollbar-width: none; }
.shop-stores::-webkit-scrollbar { display: none; }
.shop-store { flex: none; position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 64px; padding: .15rem 0; font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer; }
.shop-store .app-icon { width: 42px; height: 42px; border-radius: 12px; font-size: .78rem; transition: box-shadow .15s; }
.shop-store-name { font-size: .72rem; line-height: 1.2; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-store.on { color: var(--text); font-weight: 700; }
.shop-store.on .app-icon { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--primary); }
.shop-store.foreign .app-icon { opacity: .6; }
.shop-count { position: absolute; top: -3px; right: 6px; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--text); color: var(--surface); font-size: .66rem; font-weight: 700; line-height: 17px; text-align: center; }

/* rychlé přidání */
.shop-add { display: flex; gap: .4rem; margin-bottom: .75rem; }
.shop-add input[type=text] { flex: 1; min-width: 0; }
.shop-more { padding-left: .8rem; padding-right: .8rem; font-weight: 700; }

/* položky */
.shop-items { list-style: none; margin: 0 0 .75rem; padding: 0; overflow: hidden; }
.card.shop-items { padding: 0; }
.shop-item { position: relative; overflow: hidden; border-top: 1px solid var(--border); background: var(--surface); }
.shop-row { position: relative; z-index: 1; display: flex; align-items: center; gap: .6rem; padding: .35rem .75rem .35rem .4rem; background: var(--surface); touch-action: pan-y; }
.shop-item:first-child { border-top: 0; }
.shop-item form { margin: 0; flex: none; }
.shop-cb { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; display: grid; place-items: center; padding: 0; }
.shop-cb::before { content: ""; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); box-sizing: border-box; transition: background .15s, border-color .15s; }
.shop-cb:hover::before { border-color: var(--primary); }
.shop-item.done .shop-cb::before { background: var(--success) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 15px no-repeat; border-color: var(--success); }
.shop-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; padding: .3rem 0; font: inherit; text-align: left; color: var(--text); background: none; border: 0; cursor: pointer; }
span.shop-body { cursor: default; }
.shop-name { font-weight: 500; overflow-wrap: anywhere; }
.shop-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .45rem; font-size: .76rem; color: var(--muted); }
.shop-meta:empty { display: none; }
.shop-where { display: inline-flex; align-items: center; gap: .3rem; }
.shop-tag { font-size: .68rem; font-weight: 600; border-radius: 4px; padding: 0 .35rem; line-height: 1.5; white-space: nowrap; }
.shop-sale { background: var(--warning-soft); color: var(--warning); }
.shop-private { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.shop-note { font-style: italic; }
.shop-qty { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; font-weight: 600; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .1rem .55rem; }
.shop-item.done, .shop-item.done .shop-row { background: var(--surface-2); }
.shop-item.done .shop-name { text-decoration: line-through; color: var(--muted); }
.shop-ttl { flex: none; font-size: .72rem; color: var(--warning); white-space: nowrap; }
.shop-item.done .shop-qty { display: none; }
.shop-empty { list-style: none; padding: 1.25rem; text-align: center; color: var(--muted); }
.shop-elsewhere { margin: -.25rem 0 1rem; padding: .55rem .9rem; font-size: .84rem; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }
.shop-done-head { margin-top: 1.25rem; }
.shop-done-head h2 { font-size: 1rem; }
.shop-done-head form { margin: 0; }

/* okno položky */
.pick-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .75rem; }
.pick-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem .25rem .3rem; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); font: inherit; font-size: .84rem; color: var(--text); cursor: pointer; }
button.pick-chip { padding-left: .6rem; border-style: dashed; }
.pick-chip input { position: absolute; opacity: 0; pointer-events: none; }
.pick-chip:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.pick-chip:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.sheet-dialog .field { margin-bottom: .75rem; }
.sheet-dialog .grid-2 { gap: .75rem; }
.shop-suggest .field-label, .sheet-dialog > form > .field-label { display: block; }
.shop-sale-row { gap: .75rem; }
.shop-sale-row input[type=date] { width: auto; max-width: 10rem; }
.dialog-actions .dialog-delete { margin-right: auto; }

/* seznamy a obchody */
.shop-tabs { margin-bottom: 1rem; }
.shop-lists { padding: .25rem 1rem; margin-bottom: 1rem; }
.shop-list-row { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.shop-list-row:last-child { border-bottom: 0; }
.shop-list-row .switch-text { flex: 1; }
.shop-list-row form { margin: 0; }
.shop-list-form, .shop-store-form { max-width: 640px; }
.shop-list-form .field { margin-bottom: 1rem; }
.shop-start { max-width: 640px; display: flex; flex-direction: column; gap: .75rem; }
.shop-start h2, .shop-start p { margin: 0; }
.shop-start .btn { align-self: flex-start; }
.shop-stores-page h2 { font-size: 1rem; }
.shop-stores-page .switch-row { cursor: default; }
.shop-stores-page .switch-row .switch-text { flex: 1; }
.shop-remove { font-size: 1.1rem; padding: .2rem .6rem; color: var(--muted); }
.shop-stores-page form.switch-row { margin: 0; }

/* blok na nástěnce */
.shop-widget .shop-add { margin-bottom: .5rem; }
.shop-mini { list-style: none; margin: 0 0 .25rem; padding: 0; }
.shop-mini li { display: flex; align-items: baseline; gap: .5rem; padding: .35rem 0; border-top: 1px solid var(--border); font-size: .92rem; }
.shop-mini li:first-child { border-top: 0; }
.shop-mini .shop-name { flex: 1; min-width: 0; }
.shop-mini .shop-where { font-size: .76rem; color: var(--muted); }

@media (max-width: 600px) {
    /* iOS Safari přibližuje stránku u polí s písmem pod 16 px. */
    .shop-add input[type=text], .sheet-dialog input, .sheet-dialog select { font-size: 16px; }
    .shop-item { padding-right: .6rem; }
    .shop-stores-page { grid-template-columns: 1fr; }
    .sheet-dialog { max-height: 92vh; overflow-y: auto; }
}
.sheet-dialog .grid-2 { grid-template-columns: 1fr 1fr; }
.sheet-dialog .grid-2 > input[type=hidden]:only-of-type { display: none; }

/* --- Nákupní seznam v2: našeptávač, volby položky, objednávky, barvy seznamů --- */
.suggest-wrap { position: relative; display: block; flex: 1; min-width: 0; }
.suggest-wrap input { width: 100%; }
.suggest-box { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .14); overflow: hidden; }
.suggest-head { padding: .4rem .75rem .15rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.suggest-row { display: flex; align-items: center; border-top: 1px solid var(--border); }
.suggest-head + .suggest-row { border-top: 0; }
.suggest-pick { flex: 1; min-width: 0; display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .55rem .75rem; font: inherit; font-size: .92rem; text-align: left; color: var(--text); background: none; border: 0; cursor: pointer; }
.suggest-pick:hover { background: var(--surface-2); }
.suggest-pick small { flex: none; font-size: .72rem; color: var(--muted); }
.suggest-del { flex: none; width: 40px; align-self: stretch; font: inherit; font-size: 1.1rem; color: var(--muted); background: none; border: 0; cursor: pointer; }
.suggest-del:hover { color: var(--danger); background: var(--danger-soft); }

.opt-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: -.25rem 0 .75rem; }
.opt-chip { position: relative; display: inline-flex; align-items: center; padding: .35rem .8rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .84rem; color: var(--text); cursor: pointer; user-select: none; -webkit-user-select: none; }
.opt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.opt-chip:has(input:checked) { background: var(--text); border-color: var(--text); color: var(--surface); font-weight: 600; }
.opt-chip.opt-sale:has(input:checked) { background: var(--warning); border-color: var(--warning); color: #fff; }
.opt-chip:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.opt-panel { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: .75rem .75rem .25rem; margin-bottom: .75rem; }
.opt-panel .field { margin-bottom: .6rem; }
.opt-panel p { margin: -.25rem 0 .5rem; }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 2.4rem; }
.input-suffix span { position: absolute; right: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: .88rem; pointer-events: none; }
.order-input { font-variant-numeric: tabular-nums; letter-spacing: .04em; font-weight: 600; }

.shop-order { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.order-big { font-size: 1.6rem; font-weight: 800; letter-spacing: .05em; font-variant-numeric: tabular-nums; text-align: center; padding: .6rem; margin-bottom: .75rem; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-2); user-select: all; -webkit-user-select: all; }
.order-big-sm { font-size: 1.3rem; }
.order-note { margin: 0 0 .5rem; color: var(--muted); white-space: pre-line; }
.order-note:empty { display: none; }
.order-done { background: var(--success); }
.order-done:hover { background: var(--success); filter: brightness(1.08); }

.color-swatches { display: flex; flex-wrap: wrap; gap: .6rem; margin: .25rem 0 1rem; }
.color-swatch { position: relative; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 1px solid rgba(0, 0, 0, .08); }
.color-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.color-swatch:has(input:checked) { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.color-swatch:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 4px; }
.shop-lists .shop-tag { font-size: .85rem; padding: .05rem .5rem; }
tr[data-href] { cursor: pointer; }
.shop-add-form { margin-bottom: .75rem; }
.shop-add-form .shop-add { margin-bottom: 0; }
.list-pill { width: auto; max-width: 100%; font: inherit; font-size: .84rem; font-weight: 600; padding: .25rem 1.7rem .25rem .7rem; border: 0; border-radius: 999px; cursor: pointer; -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23444' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right .55rem center; background-size: 12px; }
@media (max-width: 600px) { .list-pill { font-size: 16px; } }
/* V obchodě: oddíly „Jen zde“ a „Kdekoli“ */
.shop-sec-head { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: .25rem .1rem .4rem; padding: 0; font: inherit; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: none; border: 0; text-align: left; }
.shop-any-toggle { margin-top: .9rem; cursor: pointer; }
.shop-any-state { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--primary); }
.shop-any-toggle[aria-expanded="true"] .shop-any-state::after { content: " ⌃"; }
.shop-any-toggle[aria-expanded="false"] .shop-any-state::after { content: " ⌄"; }
.shop-any-summary { margin-bottom: .75rem; padding: .6rem .9rem; font-size: .86rem; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Nákup: horní řádek (výběr seznamu + ikony) a okno položky přes celou výšku na mobilu */
.shop-bar { display: flex; align-items: center; gap: .4rem; max-width: 760px; margin: -.5rem 0 .6rem; }
.shop-bar-space { flex: 1; }
.btn-icon { width: 38px; height: 38px; padding: 0; }
.btn-icon .icon { width: 18px; height: 18px; }
.sheet-full { padding: 0; }
.sheet-full > form { display: flex; flex-direction: column; max-height: calc(100vh - 2rem); }
.dialog-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem .75rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.dialog-bar h2 { margin: 0; font-size: 1rem; text-align: center; flex: 1; }
.dialog-body { padding: 1rem 1.25rem 1.25rem; overflow-y: auto; }
.dialog-body .dialog-delete { width: 100%; margin-top: .25rem; }
.shop-pick { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.shop-pick::-webkit-scrollbar { display: none; }
.shop-pick .pick-chip { flex: none; }
@media (max-width: 600px) {
    .shop-bar { margin-top: -.25rem; }
    .sheet-dialog.sheet-full { width: 100vw; max-width: 100vw; height: 100%; max-height: 100%; margin: 0; border: 0; border-radius: 0; padding: 0; overflow: hidden; }
    .sheet-full > form { height: 100%; max-height: 100%; }
    .sheet-full .dialog-bar { padding-top: calc(.6rem + env(safe-area-inset-top)); }
    .sheet-full .dialog-body { flex: 1; padding: .85rem 1rem calc(1rem + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
}

/* --- Mobil: záhlaví, spodní lišta, „Více“ (na počítači skryté) ---------------- */
.m-header, .m-tabs { display: none; }
.m-more .m-edit-view { display: none; }
.m-more.editing .m-edit-view { display: block; }
.m-more.editing .m-more-view { display: none; }
.m-more-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.m-more-top .link-btn { font-size: .95rem; }
.m-me { display: flex; align-items: center; gap: .75rem; padding: .25rem .1rem .9rem; margin-bottom: .9rem; border-bottom: 1px solid var(--border); color: var(--text); }
.m-me:hover { text-decoration: none; }
.m-me .avatar { width: 44px; height: 44px; font-size: .95rem; }
.m-me strong, .m-me small { display: block; }
.m-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem .5rem; margin-bottom: 1rem; }
.m-tile { display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; font-size: .76rem; line-height: 1.2; color: var(--text); }
.m-tile:hover { text-decoration: none; }
.m-tile.active { font-weight: 700; }
.m-tile-icon { position: relative; width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.m-tile-icon .icon { width: 24px; height: 24px; }
.m-tile.active .m-tile-icon { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.m-tile-icon-sm { width: 32px; height: 32px; border-radius: 9px; }
.m-tile-icon-sm .icon { width: 18px; height: 18px; }
.m-logout { color: var(--danger); gap: .5rem; }
.m-badge { position: absolute; top: -5px; right: -9px; min-width: 17px; padding: 0 5px; border-radius: 999px; background: #e5484d; color: #fff; font-size: .62rem; font-weight: 700; line-height: 16px; text-align: center; }
.m-edit-label { margin: 0 0 .35rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.m-preview { display: flex; justify-content: space-around; padding: .5rem; margin-bottom: .75rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); min-height: 56px; }
.m-edit-list { border: 0; }
.m-edit-list .switch-row { gap: .6rem; }
.m-divider { display: flex; align-items: center; gap: .5rem; margin: .6rem 0 .1rem; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.m-divider::after { content: ""; flex: 1; border-top: 2px dashed var(--border); }
.m-divider-top { margin-top: 0; }

.m-tab { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem .15rem 0; font: inherit; font-size: .66rem; color: var(--muted); background: none; border: 0; cursor: pointer; }
.m-tab:hover { text-decoration: none; }
.m-tab > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tab .icon { width: 24px; height: 24px; }
.m-tab-icon { position: relative; display: grid; place-items: center; }
.m-tab.active { color: var(--primary); font-weight: 700; }
.m-preview .m-tab { flex: 1; }
.m-preview .m-tab .icon, .m-preview .m-tab svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
    .m-header { display: flex; align-items: flex-end; justify-content: space-between; gap: .75rem; padding: calc(.75rem + env(safe-area-inset-top)) 1rem .25rem; }
    .m-header small { display: block; font-size: .75rem; font-weight: 600; color: var(--muted); }
    .m-header h1 { margin: 0; font-size: 1.6rem; letter-spacing: -.01em; }
    .m-avatar { width: 38px; height: 38px; flex: none; }
    .m-avatar:hover { text-decoration: none; }
    .m-tabs { display: flex; position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; padding: .3rem .25rem calc(.35rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -2px 12px rgba(16, 24, 40, .06); }
    .content { padding-top: .75rem; padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }
    /* Nadpis stránky je v záhlaví – nadpis v obsahu se neopakuje. */
}

/* --- Počítač: světlý boční panel s barevnými ikonami ------------------------ */
.sidebar { width: 252px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: .9rem .75rem .75rem; background: var(--surface); border-right: 1px solid var(--border); transition: width .15s; }
.brand-row { display: flex; align-items: center; gap: .5rem; margin: 0 .25rem 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; min-width: 0; color: var(--text); font-weight: 800; font-size: 1.02rem; }
.brand:hover { text-decoration: none; }
.brand-logo { width: 32px; height: 32px; flex: none; border-radius: 9px; display: block; }
.brand-name { white-space: nowrap; }
.nav-collapse { margin-left: auto; width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.nav-collapse:hover { background: var(--surface-2); color: var(--text); }
.nav { flex: 1; overflow-y: auto; overflow-x: hidden; margin: 0 -.25rem; padding: 0 .25rem; }
.nav-heading { margin: .9rem .5rem .35rem; padding: 0; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.nav > .nav-heading:first-child { margin-top: 0; }
.nav a { display: flex; align-items: center; gap: .65rem; padding: .3rem .45rem; margin-bottom: 2px; border-radius: 10px; color: var(--text); font-size: .92rem; }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.nav-ico { position: relative; width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; }
.nav-ico .icon { width: 17px; height: 17px; }
.nav a.active .nav-ico { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--primary); }
.nav-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-badge { flex: none; min-width: 20px; padding: 0 6px; border-radius: 999px; background: #e5484d; color: #fff; font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center; }
.nav-dot { display: none; position: absolute; top: -5px; right: -7px; min-width: 16px; padding: 0 4px; border-radius: 999px; background: #e5484d; color: #fff; font-size: .58rem; font-weight: 700; line-height: 15px; text-align: center; }
.nav-group { margin-top: .25rem; }
.nav-toggle { width: calc(100% - 1rem); display: flex; align-items: center; justify-content: space-between; background: none; border: 0; font-family: inherit; cursor: pointer; text-align: left; }
.nav-toggle:hover { color: var(--text); }
.nav-toggle .icon { width: 14px; height: 14px; transition: transform .15s; }
.nav-group:not(.open) .nav-toggle .icon { transform: rotate(-90deg); }
.nav-group:not(.open) > a:not(.active), .nav-group:not(.open) > .nav-list > a:not(.active) { display: none; }

.user-card { position: relative; margin-top: .5rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.user-card summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .35rem .4rem; border-radius: 10px; cursor: pointer; }
.user-card summary::-webkit-details-marker { display: none; }
.user-card summary:hover, .user-card[open] summary { background: var(--surface-2); }
.user-card .avatar { width: 34px; height: 34px; flex: none; }
.user-card-text { flex: 1; min-width: 0; line-height: 1.25; }
.user-card-text strong, .user-card-text small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card-text strong { font-size: .88rem; }
.user-card-text small { font-size: .74rem; color: var(--muted); }
.user-card-dots { color: var(--muted); }
.user-card-menu { position: absolute; z-index: 40; left: 0; right: 0; bottom: calc(100% + 6px); min-width: 210px; padding: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 24, 40, .16); }
.user-card-menu a, .user-card-logout { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .9rem; color: var(--text); text-align: left; cursor: pointer; }
.user-card-menu a:hover, .user-card-logout:hover { background: var(--surface-2); text-decoration: none; }
.user-card-menu form { margin: .25rem 0 0; padding-top: .25rem; border-top: 1px solid var(--border); }
.user-card-logout { color: var(--danger); }

/* Sbalený panel – jen ikony (popisky v title / při najetí myší). */
.sidebar.collapsed { width: 72px; padding-left: .6rem; padding-right: .6rem; }
.sidebar.collapsed .brand-row { flex-direction: column; gap: .6rem; margin: 0 0 .9rem; }
.sidebar.collapsed .nav-collapse { margin-left: 0; }
.sidebar.collapsed .brand-name, .sidebar.collapsed .nav-label, .sidebar.collapsed .nav-badge,
.sidebar.collapsed .user-card-text, .sidebar.collapsed .user-card-dots, .sidebar.collapsed .nav-toggle span { display: none; }
.sidebar.collapsed .nav-heading { height: 0; margin: .6rem .5rem; border-top: 1px solid var(--border); overflow: hidden; }
.sidebar.collapsed .nav-toggle { width: auto; justify-content: center; height: auto; border: 0; margin: .5rem auto; }
.sidebar.collapsed .nav-toggle .icon { display: block; }
.sidebar.collapsed .nav a { justify-content: center; padding: .35rem 0; }
.sidebar.collapsed .nav-ico { width: 38px; height: 38px; border-radius: 11px; }
.sidebar.collapsed .nav-dot { display: block; }
.sidebar.collapsed .user-card summary { justify-content: center; padding: .35rem 0; }
.sidebar.collapsed .user-card-menu { right: auto; left: calc(100% + 8px); bottom: 0; }

/* Horní lišta: datum a velký nadpis stránky; nadpis v obsahu se neopakuje. */
.topbar { display: flex; flex-direction: column; justify-content: center; padding: .75rem 2rem .8rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar small { font-size: .75rem; font-weight: 600; color: var(--muted); }
.topbar-title { font-size: 1.35rem; font-weight: 700; line-height: 1.2; color: var(--text); }
.content .page-head h1 { display: none; } /* i vnořený (např. Ceny PHM) */
.content .page-head:has(> h1:only-child) { display: none; }

@media (max-width: 860px) {
    /* Na mobilu místo panelu a horní lišty záhlaví a spodní lišta (viz výše). */
    .sidebar, .topbar { display: none; }
}

/* Nápis „jservices“ vedle loga – křivky z originálního loga (brand/jservices.svg), barva podle motivu. */
.brand-word { display: block; width: 104px; height: 26px; background: var(--text);
    -webkit-mask: url("brand/jservices.svg") no-repeat left center / contain; mask: url("brand/jservices.svg") no-repeat left center / contain; }
/* Rychlé odkazy – přetahování řádků */
.table .drag-cell { width: 34px; padding-right: 0; text-align: center; }
.table .drag-cell .drag-handle { margin-right: 0; }
tr.dragging td { background: var(--primary-soft); }
tr.dragging { outline: 2px dashed var(--primary); outline-offset: -2px; }

/* --- Ceny PHM: záložky Palivo / Elektřina a ceny nabíjení ------------------- */
.fuel-tabs { margin-bottom: 1rem; }
.fuel-tabs a { padding: .45rem 1rem; }
.ev-banner { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; padding: .8rem 1rem; background: var(--warning-soft); border: 1px solid #f0d58a; border-radius: var(--radius); }
.ev-banner ul { margin: .25rem 0 0; padding-left: 1.1rem; font-size: .9rem; }
.ev-banner form { margin: 0 0 0 auto; flex: none; }
.ev-banner-icon { font-size: 1.2rem; line-height: 1.3; }
.ev-card { padding: 1rem 1.25rem; margin-bottom: 1rem; }
.ev-head { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .6rem; margin-bottom: .75rem; }
.ev-head h2 { margin: 0; font-size: 1.05rem; }
.ev-logo { font-size: .66rem; padding: .25rem .45rem; }
.ev-logo-orlen { background: var(--orlen); }
.ev-logo-pre { background: #1d3f8f; }
.ev-logo-ionity { background: #0a2240; }
.ev-pay { font-size: .72rem; font-weight: 700; border-radius: 999px; padding: .1rem .6rem; }
.ev-pay-ico { background: var(--success-soft); color: var(--success); }
.ev-pay-private { background: #eeedfe; color: #3c3489; }
.ev-src { margin-left: auto; font-size: .75rem; color: var(--muted); }
.ev-src-failed { color: var(--danger); font-weight: 600; }
.ev-warning { margin: 0 0 .75rem; padding: .5rem .75rem; font-size: .85rem; color: var(--danger); background: var(--danger-soft); border-radius: 8px; }
.ev-big { font-size: 2rem; font-weight: 800; line-height: 1.1; }
.ev-big small { font-size: .9rem; font-weight: 600; color: var(--muted); }
.ev-note { margin: .5rem 0 0; }
.ev-table th small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; }
.ev-table td strong { font-size: 1rem; }
.ev-sub { display: block; font-size: .74rem; font-weight: 400; }
.ev-sale { color: var(--warning); font-weight: 600; }
.ev-park td { padding-top: 0; border-top: 0; font-size: .72rem; color: var(--muted); white-space: normal; }
.ev-park td:first-child { font-style: italic; }
.ev-chg { display: inline-block; margin-left: .3rem; padding: 0 .35rem; border-radius: 4px; background: var(--danger-soft); color: var(--danger); font-size: .66rem; font-weight: 700; vertical-align: middle; }
.ev-was { display: block; font-size: .7rem; color: var(--muted); }
@media (max-width: 600px) {
    .ev-card { padding: .85rem; }
    .ev-src { margin-left: 0; flex-basis: 100%; }
    .ev-table th, .ev-table td { padding-left: .35rem; padding-right: .35rem; }
    .ev-table th small { display: none; }
    .ev-banner { flex-wrap: wrap; }
    .ev-banner form { margin-left: 0; }
}
.ev-list { display: none; }
.ev-item { padding: .6rem 0; border-top: 1px solid var(--border); }
.ev-item:first-child { border-top: 0; padding-top: 0; }
.ev-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.ev-item-head span { text-align: right; font-size: .88rem; }
.ev-prices { display: flex; gap: .9rem; margin-top: .3rem; font-size: .8rem; color: var(--muted); }
.ev-prices strong { font-size: 1rem; color: var(--text); }
.ev-parklist { margin: .3rem 0 0; padding: 0; list-style: none; font-size: .72rem; color: var(--muted); }
@media (max-width: 600px) {
    .ev-wide { display: none; }
    .ev-list { display: block; }
}
/* Elektřina: přetahování a sbalení karet */
.ev-head .drag-handle { margin-right: 0; }
.ev-head .collapse-toggle { flex: none; }
.ev-card .ev-head { margin-bottom: .75rem; }
.ev-card.collapsed .ev-head { margin-bottom: 0; }
.ev-card .ev-head { cursor: pointer; }
.ev-summary { display: none; font-size: .85rem; font-weight: 700; }
.ev-card.collapsed .ev-summary { display: inline; }
.ev-card.collapsed .collapse-toggle .icon { transform: rotate(0); }
.ev-card .collapse-toggle .icon { transform: rotate(180deg); transition: transform .15s; }
.ev-card.dragging { box-shadow: 0 8px 24px rgba(16, 24, 40, .15); outline: 2px dashed var(--primary); outline-offset: 4px; }
@media (max-width: 600px) {
    .ev-head .collapse-toggle { order: 1; margin-left: auto; }
    .ev-head .ev-pay, .ev-head .ev-src, .ev-head .ev-summary { order: 2; }
    .ev-head .ev-src { flex-basis: auto; margin-left: 0; }
}
.ev-logo-mercedes { background: #111; }
.ev-mine td, .ev-item.ev-mine { background: var(--primary-soft); }
.ev-item.ev-mine { margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; border-radius: 8px; }
.ev-mine-badge { display: inline-block; margin-left: .25rem; padding: 0 .45rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .66rem; font-weight: 700; vertical-align: middle; }
.ev-note-cell { font-size: .8rem; color: var(--muted); white-space: normal; }

/* Nástěnka: záložky v bloku (Ceny PHM – Palivo / Elektřina) */
.segmented button { font: inherit; font-weight: 600; font-size: .88rem; padding: .4rem .9rem; border: 0; background: none; color: var(--text); cursor: pointer; }
.segmented button:hover { background: var(--surface-2); }
.segmented button.active { background: var(--primary); color: #fff; }
.segmented-sm a, .segmented-sm button { padding: .25rem .65rem; font-size: .8rem; }
.widget-more { margin: .5rem 0 0; font-size: .85rem; text-align: right; }
.ev-mini { padding: .4rem 1rem; }
.ev-mini-row { display: flex; align-items: center; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.ev-mini-row:first-child { border-top: 0; }
.ev-mini-text { flex: 1; min-width: 0; line-height: 1.3; }
.ev-mini-text strong { display: block; font-size: .9rem; }
.ev-mini-text small { display: block; color: var(--text); font-size: .82rem; font-variant-numeric: tabular-nums; }
@media (max-width: 600px) {
    .ev-mini-row .ev-pay { display: none; } /* na mobilu jen ceny, platba je v detailu */
}

/* Logo Mercedes-Benz (hvězda) a odkaz na mapu stanic */
.ev-logo-tile { width: 32px; height: 32px; flex: none; border-radius: 8px; border: 1px solid var(--border); object-fit: cover; background: #fff; }
.ev-logo-mb { display: inline-flex; align-items: center; justify-content: center; color: #1b1b1b; }
.ev-logo-mb .mb-star { width: 24px; height: 24px; }
.ev-map { font-size: 1.05rem; line-height: 1; text-decoration: none; }
.ev-map:hover { text-decoration: none; transform: scale(1.12); display: inline-block; }

/* Potažení položky doleva: pod ní „✓ Koupeno“ (v košíku „↩ Vrátit“) */
.shop-item.swiping { background: #7fb99a; }
.shop-item.swiping.swipe-ready { background: var(--success); }
.shop-item.done.swiping { background: #aab3c5; }
.shop-item.done.swiping.swipe-ready { background: #6b7486; }
.shop-item.swiping::after { content: "✓ Koupeno"; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: #fff; font-weight: 700; font-size: .9rem; }
.shop-item.done.swiping::after { content: "↩ Vrátit"; }
.shop-row.swipe-back { transition: transform .2s ease; }

/* Profil → Upozornění */
.notify-card { margin-top: 1rem; }
.notify-device { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem 1rem; padding: .8rem 1rem; margin: .5rem 0 1rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.notify-device-text { flex: 1; min-width: 200px; }
.notify-device-text strong, .notify-device-text small { display: block; }
.notify-device-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.notify-table .notify-col { width: 6.5rem; text-align: center; }
.notify-table .notify-col input.switch { margin: 0 auto; }
.notify-hint { display: block; font-size: .76rem; }
@media (max-width: 600px) {
    .notify-table .notify-col { width: 3.4rem; padding-left: .2rem; padding-right: .2rem; }
    .notify-table .notify-lbl { display: none; }
    .notify-table th.notify-col { font-size: 1rem; }
}

/* Nákup: obchod s výdejem objednávek (Alza) – rychlé přidání číslem objednávky, okno v režimu objednávky */
.order-mode-tag { display: inline-flex; align-items: center; gap: .3rem; margin: 0 0 .4rem .1rem; padding: .05rem .5rem; font-size: .72rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 999px; }
.order-add { gap: .4rem; }
.order-add input.order-add-number { flex: 1; min-width: 0; }
.order-add input.order-add-pin { flex: none; width: 5.2rem; }
.order-add-hint { margin: .3rem 0 0 .15rem; font-size: .74rem; color: var(--muted); }
.shop-name.is-order { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.shop-pin { font-size: .72rem; font-weight: 700; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0 .35rem; }
.req { color: var(--danger); }
.order-only { display: none; }
.order-mode .order-only { display: inline; }
.order-mode .dialog-body { display: flex; flex-direction: column; }
.order-mode .item-name-field, .order-mode .item-qty-field, .order-mode .opt-sale, .order-mode [data-opt-panel="sale"] { display: none !important; }
.order-mode .item-store-label { order: 1; }
.order-mode .shop-pick { order: 2; }
.order-mode [data-opt-panel="order"] { order: 3; background: var(--primary-soft); border-color: transparent; }
.order-mode .item-note-field { order: 4; }
.order-mode .opt-chips { order: 5; margin-top: 0; }
.order-mode .grid-2 { order: 6; }
.order-mode .dialog-delete { order: 7; }
.order-mode .order-chip { pointer-events: none; }
@media (max-width: 600px) {
    .order-add { gap: .3rem; }
    .order-add input.order-add-pin { width: 4.2rem; }
    .order-add input[type=text] { font-size: 16px; }
    .order-add .shop-more { padding-left: .65rem; padding-right: .65rem; }
}
.notify-delay { margin: 0 0 .35rem; }
.notify-delay-hint { margin: 0 0 .35rem; white-space: pre-line; }

/* --- Organizace ---------------------------------------------------------------- */
.org-tag { display: inline-flex; align-items: center; gap: .25rem; margin: 0 .2rem .15rem 0; padding: .05rem .5rem; font-size: .72rem; font-weight: 700; line-height: 1.5; border-radius: 999px; white-space: nowrap; }
[data-org-out] { display: none !important; }
.org-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.org-card { display: flex; flex-direction: column; gap: .6rem; padding: 1rem; color: var(--text); transition: border-color .15s, transform .15s; }
.org-card:hover { text-decoration: none; border-color: var(--primary); transform: translateY(-1px); }
.org-card-head { display: flex; align-items: center; gap: .6rem; }
.org-card-head > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.org-card-head strong { font-size: 1.02rem; }
.org-card-head small, .org-facts dt { color: var(--muted); }
.org-card-head .app-icon { font-size: 1.05rem; }
.org-facts { display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem; margin: 0; font-size: .82rem; }
.org-facts dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.org-mods { display: flex; flex-wrap: wrap; gap: .25rem; }
.org-mods .pill { margin: 0; }
.org-new { align-items: center; justify-content: center; min-height: 120px; border: 2px dashed var(--border); background: transparent; box-shadow: none; color: var(--muted); font-weight: 600; }
.org-icon { font-size: 1.4rem; }
.org-icons { display: flex; flex-wrap: wrap; gap: .3rem; }
.org-icons .pick-chip { padding: .2rem .45rem; font-size: 1rem; }
.org-colors { margin: 0; }
.org-preview { margin: 0; }
.org-filter a.chip:hover { text-decoration: none; }
.form-sec { margin: 1.1rem 0 .5rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.editor-panel > .form-sec:first-child { margin-top: .1rem; }
.grid-city { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; }
.field-note { margin: -.4rem 0 .75rem; }
.ic-state { margin-left: .3rem; font-size: .74rem; font-weight: 600; color: var(--muted); }
.ic-state.ok { color: var(--success); }
.ic-state.err { color: var(--danger); }
.ic-refresh { border: 0; background: none; color: var(--primary); cursor: pointer; font-size: .95rem; line-height: 1; padding: 0 .2rem; margin-left: .15rem; vertical-align: middle; }
.ic-refresh:hover { transform: rotate(90deg); transition: transform .2s; }
.ic-refresh.spin { animation: ic-spin .6s linear infinite; }
@keyframes ic-spin { to { transform: rotate(360deg); } }
.filled { animation: fill-flash 1.2s ease; }
@keyframes fill-flash { from { background: var(--success-soft); } to { background: var(--surface); } }
.changed-field { border-color: var(--warning) !important; box-shadow: 0 0 0 2px var(--warning-soft); }
.dom-list { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .1rem 0 .75rem; }
.dom-chip { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .3rem .25rem .6rem; font-size: .85rem; font-weight: 600; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.dom-chip button { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 .2rem; }
.dom-chip button:hover { color: var(--danger); }
.dom-add { display: inline-flex; gap: .3rem; }
.dom-add input { width: 11rem; padding: .3rem .55rem; font-size: .85rem; }
.contact-card { display: flex; align-items: center; gap: .6rem; margin: -.25rem 0 .75rem; padding: .6rem .75rem; font-size: .88rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.contact-card .switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.contact-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-card a { white-space: nowrap; }
.switch-row-link { color: var(--text); }
.switch-row-link:hover { text-decoration: none; background: var(--surface-2); }
.editor-panel textarea { width: 100%; }
.inline-save { display: flex; gap: .4rem; }
.inline-save input { flex: 1; min-width: 0; }
.profile-phone { margin-top: .75rem; }
@media (max-width: 600px) {
    .grid-city { grid-template-columns: 1fr 1fr; gap: .75rem; }
    .dom-add input { width: 9.5rem; font-size: 16px; }
}

/* Detail uživatele – organizace s rolí, oprávnění s odchylkami */
.org-member-row .switch-text { cursor: pointer; }
.org-role { width: auto; max-width: 11rem; font-size: .85rem; padding: .3rem .5rem; }
.perm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: 0 0 .5rem; font-size: .76rem; }
/* Oprávnění v kartičkách podle oblasti (detail uživatele) */
.perm-top { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: 1rem; }
.perm-roles { font-size: .88rem; font-weight: 600; }
.perm-filter { display: flex; flex-wrap: wrap; gap: .35rem; margin-left: auto; }
.perm-chip { font: inherit; font-size: .76rem; font-weight: 700; padding: .2rem .6rem; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.perm-chip b { font-weight: 700; opacity: .8; }
.perm-chip.add { color: #27500a; background: #eaf3de; border-color: #cfe6b8; }
.perm-chip.del { color: #791f1f; background: #fcebeb; border-color: #f3c9c9; }
.perm-chip.on { outline: 2px solid var(--primary); outline-offset: 1px; }
.perm-grid { columns: 2; column-gap: .75rem; }   /* sloupce bez děr (karty mají různou výšku) */
.perm-grid > .perm-area { display: inline-block; width: 100%; margin-bottom: .75rem; break-inside: avoid; vertical-align: top; }
.perm-area { padding: .7rem .85rem .45rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.perm-area-h { display: flex; align-items: center; gap: .5rem; margin-bottom: .3rem; }
.perm-area-h i { display: grid; place-items: center; flex: none; width: 28px; height: 28px; font-size: .9rem; font-style: normal; background: var(--primary-soft); border-radius: 8px; }
.perm-area-h b { font-size: .92rem; }
.perm-area-h small { margin-left: auto; font-size: .75rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.perm-area .perm-row { display: flex; align-items: center; gap: .6rem; margin: 0 -.5rem; padding: .45rem .5rem; border-left: 3px solid transparent; border-radius: 9px; cursor: pointer; }
.perm-area .perm-row:hover { background: var(--surface-2); }
.perm-row.sub .perm-text { position: relative; padding-left: 1.1rem; }   /* podřízené oprávnění – čára od nadřazeného */
.perm-row.sub .perm-text::before { content: ""; position: absolute; left: .3rem; top: -.55rem; bottom: .6rem; width: .55rem; border-left: 2px solid var(--border); border-bottom: 2px solid var(--border); border-bottom-left-radius: 6px; }
.perm-area .perm-sec { margin: .55rem 0 .1rem; }
.perm-area .perm-area-h + .perm-sec { margin-top: .2rem; }
.perm-text { flex: 1; min-width: 0; font-size: .88rem; line-height: 1.3; }
.perm-text small { display: block; font-size: .74rem; color: var(--muted); }
.perm-text .perm-lock { font-size: .72rem; }
.perm-tag { flex: none; padding: .05rem .4rem; font-size: .66rem; font-style: normal; font-weight: 700; border-radius: 4px; }
.perm-area .perm-row input.switch { margin-left: 0; }
.perm-area .perm-row.add { background: #f3faec; border-left-color: #5aa32c; }
.perm-row.add .perm-tag { color: #27500a; background: #dcefc8; }
.perm-area .perm-row.del { background: #fdf2f2; border-left-color: #d05050; }
.perm-row.del .perm-tag { color: #791f1f; background: #f8d7d7; }
.perm-row.del .perm-text { color: var(--muted); }
.perm-area .perm-row:has(input:disabled) { cursor: default; }
[data-module-editor] .mod-row { display: flex; align-items: center; gap: .6rem; margin: 0 -.5rem; padding: .5rem; border-left: 3px solid transparent; border-radius: 9px; cursor: pointer; }
[data-module-editor] .mod-row.add { background: #f3faec; border-left-color: #5aa32c; }
[data-module-editor] .mod-row.del { background: #fdf2f2; border-left-color: #d05050; }
[data-module-editor] .mod-row input.switch { margin-left: 0; }
[data-module-editor] .mod-row:has(input:disabled) { cursor: default; }
.perm-area .perm-row:has(input:disabled) .perm-text { opacity: .7; }
[data-perm-legend] { margin: .9rem 0 0; color: var(--muted); }
.o2-people { display: grid; gap: .5rem; }
/* Nastavení odkazu (links/form.php) – volby se ukážou podle zvolené dlaždice */
.app-icon.lk-icon { width: 76px; height: 76px; margin-bottom: .5rem; border-radius: 22px; font-size: 1.5rem; box-shadow: 0 10px 24px rgba(16, 24, 40, .14); }
.lk-modes, .lk-vis { margin-bottom: .75rem; }
.lk-vis { grid-template-columns: 1fr 1fr; }
.lk-sub { display: none; align-items: center; gap: .6rem; margin-bottom: .75rem; }
.o2-card:has([name="icon_mode"][value="favicon"]:checked) .lk-sub-favicon,
.o2-card:has([name="icon_mode"][value="upload"]:checked) .lk-sub-upload { display: flex; }
.lk-color select { max-width: 260px; }
.o2-side .ann-del-link { color: var(--danger); }
.cat-card { max-width: 900px; }
.cat-card .table-wrap { margin: 0 -.25rem; }
.lk-who:has([name="visibility"][value="all"]:checked) .lk-pick { display: none; }
.lk-org { margin: .4rem 0 .3rem; font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
/* Můj profil – upozornění: řádek = událost, sloupce 📱 / ✉️ */
.nt { display: grid; grid-template-columns: 1fr 56px 56px; align-items: center; gap: .5rem; padding: .55rem 0; border-top: 1px solid var(--border); }
.nt-h { padding: 0 0 .2rem; border-top: 0; font-size: .95rem; }
.nt-h + .nt { border-top: 0; }
.nt > span:not(:first-child) { display: flex; justify-content: center; }
.nt > span:first-child { font-size: .9rem; line-height: 1.3; }
.nt small { display: block; font-size: .76rem; color: var(--muted); }
.nt .nt-both { grid-column: 2 / -1; }
.nt .nt-hint { font-size: .66rem; line-height: 1.15; text-align: center; }
.nt input.switch { margin: 0; }
.nt-opt { display: inline-flex; align-items: center; gap: .4rem; margin-top: .4rem; font-size: .8rem; cursor: pointer; }
.nt-opt input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.nt:has(input[name=helpdesk_push]:not(:checked)) .nt-opt { opacity: .45; }   /* bez oznámení na telefon nemá text smysl */
.profile .notify-delay { margin-bottom: .25rem; }
.profile-save { margin: 0 0 1rem; }
.profile-pw { max-width: 420px; }
a.o2-person { color: var(--text); }
a.o2-person:hover { text-decoration: none; border-color: #b9c6ea; background: var(--surface-2); }
.role-person a.o2-person-t { color: var(--text); }
.role-person a.o2-person-t:hover { text-decoration: none; }
.role-person a.o2-person-t:hover strong { color: var(--primary); }
.role-person .row-arrow:hover { text-decoration: none; }
[data-perm-legend] span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: .3rem; vertical-align: -1px; border-radius: 3px; }
[data-perm-legend] .lg-role::before { background: #d5dae3; }
[data-perm-legend] .lg-add::before { background: #5aa32c; }
[data-perm-legend] .lg-del::before { background: #d05050; }
[data-perm-legend] .link-btn { margin-left: auto; }
@media (max-width: 700px) {
    .perm-grid { columns: 1; }
    .perm-filter { margin-left: 0; }
}
.perm-sec { display: flex; align-items: center; gap: .5rem; margin: 1rem 0 .25rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.perm-lock { text-transform: none; letter-spacing: 0; font-weight: 600; color: var(--warning); }
.perm-src { flex: none; margin-left: auto; font-size: .7rem; font-weight: 600; white-space: nowrap; border-radius: 4px; padding: 0 .35rem; }
.perm-row .perm-src + input.switch { margin-left: .6rem; }
.src-role { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.src-add { color: #27500a; background: #eaf3de; }
.src-del { color: #791f1f; background: #fcebeb; }
.perm-row.changed { background: linear-gradient(90deg, rgba(234, 179, 8, .08), transparent); }
.perm-row:has(input:disabled) { cursor: default; }
.perm-row:has(input:disabled) .switch-text { opacity: .7; }
@media (max-width: 600px) {
    .org-member-row { flex-wrap: wrap; }
    .org-member-row input.switch { order: 2; }
    .org-member-row .org-role { order: 3; flex: 0 0 calc(100% - 32px - .75rem); max-width: none; margin-left: calc(32px + .75rem); font-size: 16px; }
}
.perm-row .perm-src[hidden] + input.switch { margin-left: auto; }
.perm-legend .perm-src { margin-left: 0; }

/* Detail uživatele – vizitka v bočním panelu */
.user-side { gap: 1rem; }
.id-card { display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center; padding-top: .25rem; }
.id-avatar { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: .5rem; border-radius: 50%; background: linear-gradient(135deg, var(--primary), #4f8ff7); color: #fff; font-size: 1.35rem; font-weight: 700; letter-spacing: .02em; box-shadow: 0 6px 16px rgba(10, 79, 158, .25); }
.id-name { font-size: 1.1rem; line-height: 1.3; overflow-wrap: anywhere; }
.id-mail { font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.id-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem; margin-top: .45rem; }
.id-tags .org-tag { margin: 0; }
.id-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.id-stats span { display: flex; flex-direction: column; align-items: center; padding: .55rem .25rem; font-size: .7rem; color: var(--muted); }
.id-stats span + span { border-left: 1px solid var(--border); }
.id-stats strong { font-size: 1.1rem; color: var(--text); font-variant-numeric: tabular-nums; }
.id-switches { display: flex; flex-direction: column; }
.id-switches .switch-row + .switch-row { border-top: 1px solid var(--border); }
.id-login { margin: -.25rem 0 0; font-size: .74rem; color: var(--muted); text-align: center; }
@media (max-width: 860px) {
    .id-avatar { width: 56px; height: 56px; font-size: 1.2rem; }
}
.id-avatar-org { color: inherit; font-size: 1.8rem; box-shadow: 0 6px 16px rgba(16, 24, 40, .12); }
.id-avatar-org.ic-blue { background: #e6f1fb; }
.id-avatar-org.ic-teal { background: #e1f5ee; }
.id-avatar-org.ic-green { background: #eaf3de; }
.id-avatar-org.ic-amber { background: #faeeda; }
.id-avatar-org.ic-red { background: #fcebeb; }
.id-avatar-org.ic-purple { background: #eeedfe; }
.id-avatar-org.ic-gray { background: #f1efe8; }
.id-delete { align-self: center; margin-top: -.25rem; color: var(--danger); font-size: .82rem; }
.org-look { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.25rem; margin: -.1rem 0 .5rem; }
.id-avatar .icon { width: 28px; height: 28px; }

/* Pozvánky, přesun */
.invite-form { max-width: 560px; }
.inv-roles { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 1rem; }
.invite-form h2 { margin: 0 0 .25rem; font-size: 1.1rem; }
.invite-form .field { margin-bottom: .85rem; }
.inv-email { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.inv-email:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.inv-email input[type=text] { flex: 1; min-width: 0; border: 0; border-radius: 0; box-shadow: none; }
.inv-email select { width: auto; max-width: 55%; border: 0; border-left: 1px solid var(--border); border-radius: 0; background-color: var(--surface-2); font-weight: 600; box-shadow: none; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.invites { padding: .75rem 1rem .5rem; margin-bottom: 1rem; }
.invites .form-sec { margin-top: 0; }
.invite-row { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.invite-row .switch-text { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.invite-row form { margin: 0; }
.invite-avatar { background: var(--primary-soft); color: var(--primary); }
.invite-card h1 { margin-bottom: .25rem; }
.invite-from { margin: 0 0 1rem; font-size: .88rem; }
.invite-from .org-tag { vertical-align: middle; }
.invite-who { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; margin-bottom: 1rem; border-radius: 10px; background: var(--surface-2); }
.invite-who > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.pw-rule { margin: -.6rem 0 0; font-size: .8rem; color: var(--muted); }
.pw-rule.ok { color: var(--success); }
.pw-rule.ok::before { content: "✓ "; }
.move-box { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-top: 1rem; padding: .75rem 1rem; border: 1px dashed var(--border); border-radius: var(--radius); }
.move-box p { flex: 1; min-width: 200px; margin: 0; font-size: .86rem; color: var(--muted); }
.move-list { margin: .25rem 0 1rem; padding-left: 0; list-style: none; font-size: .88rem; }
.move-list li { margin: .3rem 0; }
@media (max-width: 600px) {
    .inv-email input[type=text], .inv-email select { font-size: 16px; }
}
.invite-form > p.muted { margin: 0 0 1rem; }
.id-copy { align-self: center; margin-top: -.25rem; font-size: .82rem; }

/* --- Organizace v2: značka s iniciálami, karty sekcí ------------------------------ */
.org-mark { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; color: #fff; font-weight: 800; font-size: .95rem; letter-spacing: .02em; }
.org-mark-sm { width: 32px; height: 32px; border-radius: 9px; font-size: .75rem; }
.org-mark-lg { width: 76px; height: 76px; border-radius: 22px; font-size: 1.6rem; box-shadow: 0 10px 24px rgba(16, 24, 40, .18); }
.c-blue { background: linear-gradient(135deg, #1f4fd1, #4f8ff7); }
.c-teal { background: linear-gradient(135deg, #0f7f70, #3cbfa9); }
.c-green { background: linear-gradient(135deg, #2f8a3e, #6cc36f); }
.c-amber { background: linear-gradient(135deg, #b8690a, #f0a93b); }
.c-red { background: linear-gradient(135deg, #b52f26, #ef6a5d); }
.c-purple { background: linear-gradient(135deg, #5a3fc4, #9a83f2); }
.c-gray { background: linear-gradient(135deg, #505a6c, #95a0b3); }

.o2 { grid-template-columns: 280px minmax(0, 1fr); gap: 1.25rem; max-width: 1100px; }
.o2-side { align-items: center; text-align: center; gap: .85rem; padding: 1.5rem 1.25rem; }
.o2-side .id-stats { width: 100%; }
.o2-name { font-size: 1.15rem; line-height: 1.25; overflow-wrap: anywhere; }
.o2-sub { margin-top: -.55rem; font-size: .84rem; color: var(--muted); overflow-wrap: anywhere; }
.o2-sub:empty { display: none; }
.o2-kind { padding: .15rem .6rem; font-size: .72rem; font-weight: 700; border-radius: 999px; background: var(--primary-soft); color: var(--primary); }
.o2-main { min-width: 0; }
.o2-tabs { display: inline-flex; gap: .25rem; max-width: 100%; margin-bottom: 1rem; padding: .3rem; overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.o2-tabs button { flex: none; padding: .45rem .95rem; font: inherit; font-weight: 600; font-size: .88rem; color: var(--muted); background: none; border: 0; border-radius: 9px; cursor: pointer; }
.o2-tabs button:hover { color: var(--text); }
.o2-tabs button.on { background: var(--primary); color: #fff; }
.o2-tabs small { margin-left: .15rem; opacity: .75; }
.o2-panel { padding: 0; }
.o2-card { margin-bottom: 1rem; padding: 1.1rem 1.25rem 1.25rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.o2-card > .editor-hint:first-child { margin-top: 0; }
.o2-h { display: flex; align-items: center; gap: .65rem; margin: 0 0 1rem; }
.o2-h i { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.o2-h i svg { width: 17px; height: 17px; }
.o2-h > span { display: flex; flex-direction: column; }
.o2-h b { font-size: 1rem; }
.o2-h small { font-size: .8rem; color: var(--muted); }
.o2-kinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.o2-tile { position: relative; display: flex; flex-direction: column; gap: .4rem; padding: .9rem .95rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: 14px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.o2-tile:hover { border-color: #b9c6ea; }
.o2-tile input { position: absolute; opacity: 0; pointer-events: none; }
.o2-tile svg { width: 22px; height: 22px; color: var(--muted); }
.o2-tile > span { display: flex; flex-direction: column; gap: .1rem; }
.o2-tile b { font-size: .92rem; }
.o2-tile small { font-size: .76rem; line-height: 1.3; color: var(--muted); }
.o2-tile:has(input:checked) { border-color: var(--primary); background: linear-gradient(180deg, #f3f6ff, var(--surface)); box-shadow: 0 0 0 3px var(--primary-soft); }
.o2-tile:has(input:checked) svg { color: var(--primary); }
.o2-tile:has(input:checked)::after { content: "✓"; position: absolute; top: .6rem; right: .7rem; display: grid; place-items: center; width: 20px; height: 20px; font-size: .72rem; font-weight: 800; color: #fff; background: var(--primary); border-radius: 50%; }
.o2-tile:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.o2-kind-hint { display: flex; gap: .5rem; margin: 0 0 1rem; padding: .8rem 1rem; font-size: .86rem; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--border); border-radius: 14px; }
.o2-ic { display: flex; align-items: center; gap: .5rem; padding: .2rem .35rem .2rem .9rem; background: var(--surface); border: 1.5px solid var(--border); border-radius: 12px; }
.o2-ic:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.o2-ic label { font-size: .85rem; font-weight: 700; color: var(--muted); }
.o2-ic input[type=text] { flex: 1; min-width: 0; padding: .55rem .2rem; font-size: 1.15rem; font-weight: 600; letter-spacing: .06em; border: 0; box-shadow: none; }
.o2-pill { display: inline-flex; flex: none; align-items: center; gap: .35rem; padding: .3rem .6rem; font-size: .76rem; font-weight: 700; color: var(--success); background: var(--success-soft); border-radius: 999px; }
.o2-pill.err { color: var(--danger); background: var(--danger-soft); }
.o2-pill.wait { color: var(--muted); background: var(--surface-2); }
.o2-pill button { padding: 0 .1rem; font-size: .95rem; color: inherit; background: none; border: 0; cursor: pointer; }
.o2-pill button:hover { transform: rotate(90deg); transition: transform .2s; }
.o2-ares { display: flex; align-items: flex-start; gap: .9rem; margin-top: .8rem; padding: .9rem 1rem; background: linear-gradient(180deg, #f7f9ff, var(--surface)); border: 1px solid #dfe6fb; border-radius: 14px; }
.o2-ares.o2-flash { animation: fill-flash 1.2s ease; }
.o2-ares-mark { display: grid; place-items: center; flex: none; width: 40px; height: 40px; color: var(--primary); background: var(--surface); border: 1px solid var(--border); border-radius: 11px; }
.o2-ares-mark svg { width: 20px; height: 20px; }
.o2-ares-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.o2-ares-text b { font-size: 1rem; overflow-wrap: anywhere; }
.o2-addr { font-size: .86rem; color: var(--muted); margin-bottom: .3rem; }
.o2-addr:empty { display: none; }
.o2-chip { display: inline-flex; align-items: center; gap: .25rem; margin-right: .3rem; padding: .1rem .5rem; font-size: .74rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; }
.o2-edit { margin-left: auto; white-space: nowrap; font-size: .82rem; }
.o2-firm-fields { margin-top: .9rem; }
.o2-note { margin: .6rem 0 0; font-size: .82rem; color: var(--muted); }
.o2-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1rem; }
.o2-wide { grid-column: 1 / -1; }
.o2-f { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.o2-f > span:first-child { font-size: .8rem; font-weight: 600; color: var(--muted); }
.o2-top { margin-top: .9rem; }
.o2-grow { flex: 1; min-width: 200px; }
.o2-affix { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.o2-affix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.o2-affix em { display: grid; place-items: center; padding: 0 .1rem 0 .75rem; font-style: normal; color: var(--muted); }
.o2-affix em svg { width: 16px; height: 16px; }
.o2-affix input[type=text] { border: 0; box-shadow: none; }
.o2-look { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.25rem; }
.o2-preview { display: flex; align-items: center; gap: .7rem; padding: .55rem .9rem .55rem .55rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; }
.o2-preview > span:last-child { display: flex; flex-direction: column; }
.o2-preview small { font-size: .74rem; color: var(--muted); }
.o2-dots { display: flex; flex-wrap: wrap; gap: .45rem; padding: .35rem 0; }
.o2-dot { position: relative; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.o2-dot input { position: absolute; opacity: 0; pointer-events: none; }
.o2-dot:has(input:checked) { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.o2-dot:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 4px; }
.o2-doms { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; min-height: 40px; }
.o2-dom { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .35rem .3rem .7rem; font-size: .85rem; font-weight: 600; color: var(--primary); background: var(--primary-soft); border-radius: 999px; }
.o2-dom button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; line-height: 1; color: inherit; background: rgba(31, 79, 209, .12); border: 0; border-radius: 50%; cursor: pointer; }
.o2-dom-add { display: inline-flex; gap: .3rem; }
.o2-dom-add input[type=text] { width: 8.5rem; padding: .3rem .8rem; font-size: .85rem; font-weight: 600; border: 1.5px dashed var(--border); border-radius: 999px; }
.o2-dom-add input[type=text]:focus { border-style: solid; }
.o2-person { display: flex; align-items: center; gap: .75rem; padding: .65rem .75rem; border: 1px solid var(--border); border-radius: 14px; }
.o2-person-av { display: grid; place-items: center; flex: none; width: 40px; height: 40px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #1f4fd1, #4f8ff7); border-radius: 50%; }
.o2-person-t { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.o2-person-t small { font-size: .82rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.o2-person select { width: auto; max-width: 45%; }
@media (max-width: 860px) {
    .o2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .o2-kinds { grid-template-columns: 1fr; }
    .o2-tile { flex-direction: row; align-items: center; gap: .75rem; padding: .75rem .9rem; }
    .o2-grid { grid-template-columns: 1fr; }
    .o2-card { padding: 1rem; }
    .o2-ares { flex-wrap: wrap; }
    .o2-edit { margin-left: 0; }
    .o2-person { flex-wrap: wrap; }
    .o2-person select { max-width: none; width: 100%; }
    .o2-card input, .o2-card select { font-size: 16px; }
}
.org-mark .icon { width: 32px; height: 32px; }
.o2-card > .field:last-child, .o2-card > .grid-2:last-child { margin-bottom: 0; }
.o2-card .field { margin-bottom: .85rem; }
.o2-card .grid-2 { gap: 0 1rem; }
.o2-card > .switch-row:first-of-type { border-top: 0; }
.o2 .user-side .id-card { padding-top: 0; }

/* Nákup – sdílení pozvánkou */
.shop-list-page { max-width: 640px; }
.shop-list-form .field { margin-bottom: .85rem; }
.shop-list-form .form-actions { margin-top: .5rem; }
.share-row { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .55rem 0; border-top: 1px solid var(--border); }
.o2-h + .share-row { border-top: 0; padding-top: 0; }
.share-row .switch-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.share-wait { background: var(--warning-soft); color: var(--warning); }
.share-invite { margin-top: .75rem; }
.share-invite .field { margin: 0; }
.share-invite-row { display: flex; gap: .4rem; }
.share-invite-row input { flex: 1; min-width: 0; }
.share-missing { margin-top: .75rem; padding: .75rem .9rem; font-size: .88rem; background: var(--warning-soft); border: 1px solid rgba(154, 98, 0, .25); border-radius: 12px; }
.share-missing p { margin: .25rem 0 .5rem; }
.share-missing form { margin: 0; }
.share-contacts { margin: .75rem 0 0; }
.share-contacts .link-btn { margin-right: .5rem; }
.share-foot { margin: .5rem 0 0; }
.invite-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; max-width: 760px; margin-bottom: .75rem; padding: .75rem 1rem; background: var(--primary-soft); border-radius: var(--radius); }
.invite-banner p { flex: 1; min-width: 200px; margin: 0; font-size: .9rem; }
.invite-banner .shop-tag { vertical-align: middle; }
.invite-banner-acts { display: flex; gap: .4rem; margin: 0; }
@media (max-width: 600px) {
    .share-invite-row input { font-size: 16px; }
}

/* Pozvánka do nákupního seznamu – výrazný pás a vyskakovací okno */
.invite-banner { gap: .6rem .9rem; padding: .8rem 1rem; background: linear-gradient(135deg, #eef3ff, #f7f9ff); border: 1px solid #d6e0fb; box-shadow: 0 4px 14px rgba(31, 79, 209, .08); }
.invite-banner-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; color: #fff; background: linear-gradient(135deg, #1f4fd1, #4f8ff7); border-radius: 11px; }
.invite-banner-ico .icon { width: 18px; height: 18px; }
.invite-modal { width: min(420px, calc(100vw - 2rem)); padding: 1.75rem 1.5rem 1.25rem; text-align: center; border: 0; border-radius: 22px; box-shadow: 0 30px 80px rgba(16, 24, 40, .35); }
.invite-modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); }
.invite-modal[open] { animation: invite-pop .28s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes invite-pop { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: none; } }
.invite-modal-art { position: relative; width: 84px; height: 84px; margin: 0 auto .9rem; }
.invite-modal-cart { display: grid; place-items: center; width: 84px; height: 84px; color: #fff; background: linear-gradient(135deg, #1f4fd1, #4f8ff7); border-radius: 26px; box-shadow: 0 12px 28px rgba(31, 79, 209, .35); }
.invite-modal-cart .icon { width: 40px; height: 40px; }
.invite-modal-from { position: absolute; right: -8px; bottom: -6px; display: grid; place-items: center; width: 36px; height: 36px; font-size: .78rem; font-weight: 800; color: #1f4fd1; background: #fff; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 4px 12px rgba(16, 24, 40, .18); }
.invite-modal-kicker { margin: 0; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); }
.invite-modal h2 { margin: .3rem 0 .6rem; font-size: 1.2rem; line-height: 1.3; }
.invite-modal-list { margin: 0 0 .75rem; }
.invite-modal-list .shop-tag { font-size: .95rem; padding: .2rem .7rem; }
.invite-modal-text { margin: 0 0 1.25rem; font-size: .88rem; color: var(--muted); }
.invite-modal-acts { display: grid; grid-template-columns: 1fr 1.4fr; gap: .5rem; }
.invite-modal-acts .btn { padding: .7rem; font-size: .95rem; }
.invite-modal-later { margin-top: .85rem; font-size: .84rem; color: var(--muted); }
.invite-modal-more { margin: .5rem 0 0; }
@media (max-width: 600px) {
    .invite-modal { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 22px 22px 0 0; padding-bottom: calc(1.25rem + env(safe-area-inset-bottom)); }
}

/* --- Oznámení: zvoneček, panel, důležitá zpráva, správa ------------------------- */
.topbar { flex-direction: row; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar-text { display: flex; flex-direction: column; min-width: 0; }
.m-header-acts { display: flex; align-items: center; gap: .5rem; }
.nb-bell { position: relative; display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.nb-bell:hover, .nb-bell[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.nb-bell .icon { width: 20px; height: 20px; }
.nb-bell b { position: absolute; top: -6px; right: -6px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 5px; font-size: .68rem; color: #fff; background: #e5362d; border: 2px solid var(--surface); border-radius: 999px; }
.nb-panel { position: fixed; top: 4.2rem; right: 1.5rem; z-index: 60; width: 380px; max-height: min(640px, calc(100vh - 6rem)); overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 24px 60px rgba(16, 24, 40, .22); }
.nb-panel > header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .85rem 1rem .6rem; background: var(--surface); }
.nb-panel > header b { font-size: 1rem; }
.nb-panel > header form { margin: 0; }
.nb-panel > header .link-btn { font-size: .8rem; }
.nb-empty { margin: 0; padding: 1.5rem 1rem; text-align: center; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--border); }
.nb-item { position: relative; display: flex; gap: .7rem; padding: .8rem 1rem .8rem 1.2rem; color: var(--text); border-top: 1px solid var(--border); }
.nb-item:hover { text-decoration: none; background: var(--surface-2); }
.nb-item.unread { background: linear-gradient(90deg, #f3f6ff, transparent); }
.nb-item.unread::before { content: ""; position: absolute; left: .45rem; top: 1.3rem; width: 7px; height: 7px; background: var(--primary); border-radius: 50%; }
.nb-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.nb-text strong { font-size: .9rem; line-height: 1.3; }
.nb-snippet { font-size: .82rem; line-height: 1.4; color: var(--muted); }
.nb-text small { font-size: .72rem; color: var(--muted); }
.nb-foot { display: block; padding: .75rem 1rem; text-align: center; font-size: .86rem; border-top: 1px solid var(--border); }
.ann-ico { display: grid; place-items: center; flex: none; width: 36px; height: 36px; color: var(--primary); background: var(--primary-soft); border-radius: 11px; }
.ann-ico .icon { width: 18px; height: 18px; }
.ann-ico.sys { color: #27500a; background: #eaf3de; }
.ann-ico.imp { color: #c0352b; background: #fce9e7; }
.ann-tag { display: inline-block; margin-right: .35rem; padding: 0 .4rem; font-size: .64rem; font-weight: 800; letter-spacing: .03em; border-radius: 4px; vertical-align: 1px; }
.ann-imp { color: #c0352b; background: #fce9e7; }
.ann-sys { color: #27500a; background: #eaf3de; }
.ann-draft { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.ann-plan { color: var(--warning); background: var(--warning-soft); }
.ann-body { font-size: .92rem; line-height: 1.55; }
.ann-body p { margin: 0 0 .6rem; }
.ann-body p:last-child, .ann-body ul:last-child { margin-bottom: 0; }
.ann-body ul { margin: 0 0 .6rem; padding-left: 1.2rem; }
.imp-modal { width: min(460px, calc(100vw - 2rem)); text-align: left; }
.imp-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .6rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #c0352b; background: #fce9e7; border-radius: 999px; }
.imp-modal h2 { margin: .75rem 0 .5rem; font-size: 1.25rem; }
.imp-body { max-height: 50vh; overflow-y: auto; }
.imp-from { margin: 1rem 0; font-size: .82rem; color: var(--muted); }
.imp-modal .btn-block { padding: .75rem; }
.ann-feed { max-width: 760px; }
.ann-item.unread { border-color: #c9d6fb; box-shadow: 0 0 0 3px var(--primary-soft); }
.ann-item-head { display: flex; align-items: flex-start; gap: .7rem; margin-bottom: .75rem; }
.ann-item-head > span:last-child { display: flex; flex-direction: column; }
.ann-item-head small { font-size: .76rem; color: var(--muted); }
.ann-link, .ann-confirm { margin: .75rem 0 0; }
.ann-confirmed { margin: .75rem 0 0; font-size: .8rem; color: var(--success); }
.ann-list { max-width: 900px; padding-top: .4rem; padding-bottom: .4rem; }
.ann-row { display: flex; align-items: center; gap: 1rem; padding: .8rem 0; color: var(--text); border-top: 1px solid var(--border); }
.ann-row:first-child { border-top: 0; }
.ann-row:hover { text-decoration: none; }
.ann-row-main { display: flex; flex: 1; flex-direction: column; gap: .15rem; min-width: 0; }
.ann-row-main small { font-size: .78rem; color: var(--muted); }
.ann-row-stat { display: flex; flex: none; flex-direction: column; gap: .25rem; width: 170px; }
.ann-row-stat small { font-size: .76rem; color: var(--muted); }
progress.ann-bar { width: 100%; height: 8px; -webkit-appearance: none; appearance: none; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
progress.ann-bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress.ann-bar::-webkit-progress-value { background: linear-gradient(90deg, #2f8a3e, #6cc36f); border-radius: 999px; }
progress.ann-bar::-moz-progress-bar { background: linear-gradient(90deg, #2f8a3e, #6cc36f); border-radius: 999px; }
.ann-form { max-width: 780px; }
.ann-aud { grid-template-columns: repeat(4, 1fr); }
.ann-prio { grid-template-columns: 1fr 1fr; }
.ann-target { margin-top: .75rem; }
.ann-target select { max-width: 420px; }
.ann-channels { display: flex; flex-wrap: wrap; gap: .25rem 2rem; margin: 1rem 0 .5rem; }
.ann-channels .switch-row { gap: .75rem; }
.ann-dates { margin-top: .5rem; }
.ann-editor { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; }
.ann-editor:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.ann-toolbar { display: flex; align-items: center; gap: .2rem; padding: .3rem; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.ann-toolbar button { width: 32px; height: 28px; font: inherit; color: var(--text); background: none; border: 0; border-radius: 7px; cursor: pointer; }
.ann-toolbar button:hover { background: var(--surface); }
.ann-toolbar-hint { margin-left: auto; padding-right: .4rem; font-size: .72rem; color: var(--muted); }
.ann-editor textarea { display: block; width: 100%; border: 0; border-radius: 0; box-shadow: none; resize: vertical; }
.ann-editor textarea:focus { box-shadow: none; }
.ann-people { display: flex; flex-wrap: wrap; gap: .35rem; }
.ann-person { display: inline-flex; align-items: center; gap: .3rem; padding: .2rem .55rem .2rem .25rem; font-size: .8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.ann-person i { display: grid; place-items: center; width: 20px; height: 20px; font-size: .7rem; font-style: normal; font-weight: 700; color: #fff; background: #2f8a3e; border-radius: 50%; }
.ann-person.no { color: var(--muted); }
.ann-person.no i { background: #b6bdc9; }
@media (max-width: 860px) {
    .nb-panel { top: auto; right: 0; bottom: 0; left: 0; width: auto; max-height: 80vh; border-radius: 20px 20px 0 0; padding-bottom: env(safe-area-inset-bottom); }
    .m-header .nb-bell { width: 38px; height: 38px; border-radius: 50%; }
}
@media (max-width: 600px) {
    .ann-aud, .ann-prio { grid-template-columns: 1fr 1fr; }
    .ann-row { flex-wrap: wrap; }
    .ann-row-stat { width: 100%; }
    .ann-editor textarea { font-size: 16px; }
}

/* Potvrzovací / informační okno ve stylu IS (místo okna prohlížeče) */
.ui-modal { width: min(400px, calc(100vw - 2rem)); padding: 1.5rem 1.4rem 1.2rem; text-align: center; border: 0; border-radius: 20px; box-shadow: 0 30px 80px rgba(16, 24, 40, .35); }
.ui-modal::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); }
.ui-modal[open] { animation: invite-pop .22s cubic-bezier(.2, .9, .3, 1.2); }
.ui-modal-ico { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto .8rem; font-size: 1.5rem; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-radius: 16px; }
.ui-modal.danger .ui-modal-ico { color: var(--danger); background: var(--danger-soft); }
.ui-modal-title { margin: 0 0 .4rem; font-size: 1.12rem; line-height: 1.35; }
.ui-modal-text { margin: 0; font-size: .9rem; line-height: 1.5; color: var(--muted); }
.ui-modal-acts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 1.25rem; }
.ui-modal-acts .btn { padding: .65rem; font-size: .95rem; }
.ui-modal-acts [hidden] + .btn { grid-column: 1 / -1; }
.btn-danger { color: #fff; background: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #a82c23; border-color: #a82c23; }
@media (max-width: 600px) {
    .ui-modal { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 20px 20px 0 0; padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }
}
.nb-new { align-self: flex-start; margin-top: .25rem; padding: .1rem .55rem; font-size: .72rem; font-weight: 700; color: #fff; background: var(--primary); border-radius: 999px; }
.nb-item:not(.unread) .nb-text strong { font-weight: 600; color: var(--muted); }
.push-ask-status { margin: -.5rem 0 1rem; font-size: .86rem; font-weight: 600; color: var(--primary); }

/* Seznam oznámení – ikony akcí (poslat znovu, smazat) */
.ann-row-wrap { display: flex; align-items: center; gap: .5rem; border-top: 1px solid var(--border); }
.ann-row-wrap:first-child { border-top: 0; }
.ann-row-wrap .ann-row { flex: 1; min-width: 0; border-top: 0; }
.ann-acts { display: flex; flex: none; align-items: center; gap: .25rem; }
.ann-acts form { margin: 0; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: var(--muted); background: none; border: 1px solid transparent; border-radius: 9px; cursor: pointer; }
.icon-btn:hover { color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.icon-btn .icon { width: 17px; height: 17px; }
.icon-btn-danger:hover { color: var(--danger); background: var(--danger-soft); }
.page-head-acts { display: flex; align-items: center; gap: .35rem; margin-left: auto; }
.page-head-acts form { margin: 0; }
.page-head-acts .icon-btn { width: 38px; height: 38px; border-color: var(--border); background: var(--surface); }
.ann-hide { margin: -.2rem -.3rem 0 auto; }
.ann-feed-head .btn .icon { width: 15px; height: 15px; }

/* Oznámení – záložky podle stavu, stav zprávy, přehled příjemců */
.o2-tabs a { flex: none; padding: .45rem .95rem; font-weight: 600; font-size: .88rem; color: var(--muted); border-radius: 9px; }
.o2-tabs a:hover { color: var(--text); text-decoration: none; }
.o2-tabs a.on { background: var(--primary); color: #fff; }
.o2-tabs a small { margin-left: .15rem; opacity: .75; }
.ann-state { font-weight: 700; margin-right: .2rem; }
.st-active { color: var(--success); }
.st-archive { color: #6b7486; }
.st-plan { color: var(--warning); }
.st-draft { color: var(--muted); }
.ann-status { display: flex; align-items: center; gap: .8rem; max-width: 780px; padding: .9rem 1.1rem; }
.ann-status form { margin: 0 0 0 auto; }
.ann-status .btn .icon { width: 14px; height: 14px; }
.ann-status-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.ann-status.is-archive .ann-status-dot { background: #95a0b3; box-shadow: 0 0 0 4px var(--surface-2); }
.ann-status-text { display: flex; flex-direction: column; min-width: 0; }
.ann-status-text small { font-size: .8rem; color: var(--muted); }
.ann-recipients { max-width: 780px; }
.ann-dots { display: flex; flex-wrap: wrap; gap: 4px; margin: -.25rem 0 1rem; }
.ann-dots i { width: 14px; height: 14px; border-radius: 4px; }
.d-done { background: #2f8a3e; }
.d-open { background: #f08c1a; }
.d-hidden { background: #e5a19a; }
.ann-rec-filter .chip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: .3rem; vertical-align: .05em; }
.ann-rec-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: .5rem; }
.ann-rec-filter { margin: 0; }
.ann-rec-filter .chip small { opacity: .7; margin-left: .15rem; }
.ann-rec-search { flex: 1; min-width: 180px; max-width: 260px; margin: 0; }
.ann-rec { display: grid; grid-template-columns: auto 1fr auto 5.5rem; align-items: center; gap: .6rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.ann-rec-name { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; min-width: 0; }
.ann-rec-name .org-tag { margin: 0; }
.ann-rec-name .n-done { color: #2f8a3e; }
.ann-rec-name .n-open { color: #c96a00; }
.ann-rec-name .n-hidden { color: #b0413e; }
.ann-rec-state { font-size: .76rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; white-space: nowrap; }
.ann-rec-state.st-done { color: #27500a; background: #eaf3de; }
.ann-rec-state.st-open { color: #8a4a00; background: #fdf0de; }
.ann-rec-state.st-hidden { color: #791f1f; background: #fcebeb; }
.ann-rec-time { font-size: .76rem; color: var(--muted); text-align: right; }
.ann-rec-none { margin: .75rem 0 0; }

/* Přihlášení Správce IS za uživatele – pruh nahoře */
.imp-bar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem 1rem; padding: .45rem 1rem calc(.45rem + 0px); padding-top: calc(.45rem + env(safe-area-inset-top)); font-size: .86rem; color: #fff; background: #5a3fc4; }
.imp-bar > span { display: inline-flex; align-items: center; gap: .4rem; }
.imp-bar .icon { width: 18px; height: 18px; }
.imp-bar form { margin: 0; }
.imp-bar .btn { color: #5a3fc4; background: #fff; border-color: #fff; }

/* Organizace – moduly: kdo modul vidí (jen u zapnutého) */
.org-module { border-bottom: 1px solid var(--border); }
.org-module:last-child { border-bottom: 0; }
.org-module .switch-row { border-bottom: 0; }
.org-module-scope { margin: 0 0 .6rem calc(32px + .75rem); }
.org-module:not(:has(input[name="modules[]"]:checked)) .org-module-scope { display: none; }

/* Skupiny podle organizací (groups/index.php) */
.grp-block:not(:has(.switch-row:not([data-org-out]))) { display: none; }
.grp-block .perm-sec:first-child { margin-top: .25rem; }
.list-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; max-width: 900px; }
.list-bar select { width: auto; max-width: 100%; }
.list-bar input[type=search] { flex: 1; min-width: 180px; width: auto; margin: 0; }
.list-bar select { margin: 0; }
.og { max-width: 900px; margin-bottom: .6rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.og-h { display: flex; align-items: center; gap: .65rem; padding: .65rem .9rem; cursor: pointer; list-style: none; }
.og-h::-webkit-details-marker { display: none; }
.og-t { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.og-t b { font-size: .95rem; }
.og-t small { font-size: .78rem; color: var(--muted); }
.og-add { font-size: .82rem; font-weight: 600; white-space: nowrap; }
.og-chev { display: grid; place-items: center; color: var(--muted); transition: transform .15s; transform: rotate(-90deg); }
.og[open] .og-chev { transform: rotate(0); }
.og-chev .icon { width: 18px; height: 18px; }
.og-row { display: flex; align-items: center; gap: .75rem; padding: .55rem .9rem .55rem 3.6rem; border-top: 1px solid var(--border); cursor: pointer; }
.og-row:hover { background: var(--surface-2); }
.og-row-t { display: flex; flex: 1; flex-direction: column; min-width: 0; font-size: .9rem; }
.og-row-t small { font-size: .76rem; color: var(--muted); }
.og-row-m { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem; }
.og-row-a { display: flex; align-items: center; gap: .1rem; }
.og-row-a form { margin: 0; }
@media (max-width: 600px) {
    .og-row { padding-left: .9rem; flex-wrap: wrap; }
    .og-row-m { order: 3; width: 100%; justify-content: flex-start; }
    .og-add { font-size: .78rem; }
}

/* GPS (gps/index.php) – mapa vlevo, seznam vpravo; na mobilu mapa nahoře */
.gps { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; height: calc(100vh - 9rem); min-height: 520px; }
.gps-map-wrap { position: relative; min-height: 0; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); border-radius: 16px; }
.gps-map { position: absolute; inset: 0; z-index: 0; }
.gps-nomap { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 1rem; text-align: center; color: var(--muted); }
.gps-live { position: absolute; top: .6rem; right: .6rem; z-index: 500; padding: .25rem .7rem; font-size: .76rem; font-weight: 600; color: #1a7f4b; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); }
.gps-live.stale { color: var(--warning); }
.gps-follow { position: absolute; top: .6rem; left: 50%; z-index: 500; display: flex; align-items: center; gap: .35rem; padding: .25rem .4rem .25rem .75rem; font-size: .8rem; color: #fff; background: var(--primary); border-radius: 999px; box-shadow: var(--shadow); transform: translateX(-50%); white-space: nowrap; }
.gps-follow button { display: grid; place-items: center; width: 22px; height: 22px; padding: 0; font: inherit; font-size: .75rem; color: #fff; background: rgba(255, 255, 255, .2); border: 0; border-radius: 50%; cursor: pointer; }
@media (max-width: 600px) { .gps-follow { top: 3rem; } }
.gps-logo img { display: block; height: 28px; }
.gps-side { display: flex; flex-direction: column; gap: .5rem; min-height: 0; }
.gps-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0; }
.gps-veh-link { margin-left: auto; }
.gps-locate { display: grid !important; place-items: center; font-size: 1rem; text-decoration: none; }
.gps-me { background: none; border: 0; }
.gps-me i { position: absolute; display: block; width: 16px; height: 16px; transform: translate(-50%, -50%); background: #1a73e8; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(26, 115, 232, .4), 0 2px 6px rgba(0, 0, 0, .3); }
.gps-me-acc { fill: #1a73e8; fill-opacity: .12; stroke: #1a73e8; stroke-opacity: .35; stroke-width: 1; }
.gps-list { display: flex; flex-direction: column; gap: .5rem; overflow-y: auto; min-height: 0; padding: 2px; }
.gps-item { display: grid; grid-template-columns: auto 1fr; gap: .1rem .65rem; width: 100%; padding: .65rem .8rem; font: inherit; color: var(--text); text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.gps-item:hover { border-color: #b9c6ea; }
.gps-item.on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.gps-item > i { width: 12px; height: 12px; margin-top: .35rem; border-radius: 50%; }
.gps-item b { display: block; font-size: .92rem; }
.gps-item b small { margin-left: .3rem; font-weight: 600; color: var(--muted); }
.gps-item > span > span { font-size: .8rem; color: var(--muted); }
.gps-st { font-weight: 700; }
.st-go > i, .gps-pin.st-go i { background: #2f8a3e; } .st-go .gps-st { color: #2f8a3e; }
.st-idle > i, .gps-pin.st-idle i { background: #c98a0b; } .st-idle .gps-st { color: #9a6200; }
.st-stop > i, .gps-pin.st-stop i { background: #1f4fd1; } .st-stop .gps-st { color: #1f4fd1; }
.st-old > i, .gps-pin.st-old i, .st-none > i { background: #a3abb9; } .st-old .gps-st, .st-none .gps-st { color: #6b7486; }
.st-private > i { background: #6b4fc4; } .st-private .gps-st { color: #5a3fc4; }
.gps-pin { background: none; border: 0; }
.gps-pin-in { position: absolute; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, calc(-100% + 9px)); white-space: nowrap; }
.gps-pin-in b { padding: .1rem .45rem; font-size: .72rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.gps-pin-in i { width: 18px; height: 18px; margin-top: .2rem; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.gps-pin.on .gps-pin-in b { color: #fff; background: var(--primary); border-color: var(--primary); }
.gps-pin.multi .gps-pin-in i { display: grid; place-items: center; width: 24px; height: 24px; font-size: .72rem; font-style: normal; font-weight: 800; color: #fff; }
.gps-popup .leaflet-popup-content { margin: .55rem .75rem; font-size: .82rem; line-height: 1.5; }
.gps-popup .leaflet-popup-content b { margin-right: .3rem; }
.gps-far .gps-pin:not(.on) .gps-pin-in b { display: none; }
.gps-far .gps-pin:not(.on) .gps-pin-in { transform: translate(-50%, -50%); }
.gps-far .gps-pin:not(.on) .gps-pin-in i { margin-top: 0; }
.gps-pin.st-go i { animation: gps-pulse 1.6s infinite; }
@keyframes gps-pulse { 0% { box-shadow: 0 0 0 0 rgba(47, 138, 62, .5); } 70% { box-shadow: 0 0 0 12px rgba(47, 138, 62, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 138, 62, 0); } }
.gps-veh { max-width: 820px; }
.gps-veh-row { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--border); }
.gps-veh-row.off .gps-veh-t input { color: var(--muted); }
.gps-veh-t { display: flex; flex: 1; flex-direction: column; gap: .25rem; min-width: 0; }
.gps-veh-t input { font-weight: 600; }
.gps-veh-t small { font-size: .76rem; color: var(--muted); }
.gps-veh-t .badge { margin-right: .25rem; }
.gps-veh-sw { display: flex; flex-direction: column; align-items: center; gap: .15rem; cursor: pointer; }
.gps-veh-sw small { font-size: .7rem; color: var(--muted); }
.page-head .btn .icon { width: 15px; height: 15px; }
@media (max-width: 860px) {
    .gps { grid-template-columns: 1fr; height: auto; }
    .gps-map-wrap { height: 55vh; }
    .gps-list { overflow: visible; }
}

/* Ceny na vybraných stojanech (partials/fuel_stations.php) – karty stanic, skládají se podle šířky */
.st-prices { margin-top: 1rem; }
.st-prices-head { display: flex; align-items: center; gap: .3rem .6rem; margin-bottom: .6rem; cursor: pointer; list-style: none; }
.st-prices-head::-webkit-details-marker { display: none; }
.st-prices:not([open]) .st-prices-head { margin-bottom: 0; }
.st-prices-head h2 { flex: 1; margin: 0; font-size: 1rem; }
.st-prices-head h2 small { margin-left: .35rem; font-size: .78rem; font-weight: 500; }
.st-prices-head form { margin: 0; }
.st-prices-head .icon-btn { font-size: 1.2rem; font-weight: 600; }
.st-when { white-space: nowrap; }
.st-chev { display: grid; place-items: center; color: var(--muted); transition: transform .15s; }
.st-chev .icon { width: 18px; height: 18px; }
.st-prices:not([open]) .st-chev { transform: rotate(-90deg); }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; }
.st-card { padding: .6rem .75rem .55rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.st-card-h { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.st-card-h a { display: flex; flex: 1; flex-direction: column; min-width: 0; color: var(--text); }
.st-card-h a:hover { text-decoration: none; }
.st-card-h a:hover b { color: var(--primary); }
.st-card-h b { font-size: .88rem; line-height: 1.2; }
.st-card-h small { font-size: .72rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-card-h form { margin: 0; }
.st-brand { display: grid; place-items: center; flex: none; width: 22px; height: 22px; font-size: .6rem; font-style: normal; font-weight: 800; color: #fff; background: #6b7486; border-radius: 6px; }
.st-b-orlen { background: var(--orlen); }
.st-b-mol { background: var(--mol); }
.st-del { width: 26px; height: 26px; opacity: 0; transition: opacity .15s; }
.st-card:hover .st-del, .st-del:focus-visible { opacity: 1; }
@media (hover: none) { .st-del { opacity: .6; } }
.st-del .icon { width: 14px; height: 14px; }
.st-card dl { display: grid; grid-template-columns: 1fr auto; gap: .1rem .6rem; margin: 0; font-size: .84rem; }
.st-card dt { color: var(--muted); white-space: nowrap; }
.st-card dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-card dd.old { color: #9aa2b1; font-weight: 600; }
.st-card dd.old sup { margin-left: .15rem; font-size: .6rem; font-weight: 500; }
.st-card dd.na { color: #c2c7d0; font-weight: 500; }
.st-s { display: none; }
.st-err { display: block; margin-top: .3rem; font-size: .72rem; color: var(--warning); }
@media (max-width: 600px) {
    .st-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
    .st-card { padding: .5rem .6rem; }
    .st-card dl { font-size: .8rem; }
    .st-l, .st-card dd.old sup, .st-prices-head h2 small { display: none; }
    .st-s { display: inline; }
}

/* Nástěnka: záhlaví bloku sbaluje / rozbaluje */
[data-dashboard] [data-widget] .section-head { cursor: pointer; }

/* Hromadné mazání v seznamech oznámení (Vybrat → zaškrtávátka + lišta) */
.bulk-check { display: none; }
body.bulk-on .bulk-check { display: flex; flex: none; align-items: center; padding: 0 .15rem; cursor: pointer; }
.bulk-check input { width: 20px; height: 20px; margin: 0; accent-color: var(--primary); cursor: pointer; }
body.bulk-on .ann-acts, body.bulk-on .ann-hide { display: none; }
body.bulk-on .ann-row-wrap, body.bulk-on .ann-item { cursor: pointer; }
body.bulk-on .ann-row-wrap:has(.bulk-check input:checked) { background: var(--primary-soft); border-radius: 10px; }
body.bulk-on .ann-item:has(.bulk-check input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.bulk-bar { position: sticky; top: .5rem; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; max-width: 900px; margin: 0 0 1rem; padding: .5rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 6px 20px rgba(16, 24, 40, .12); }
.bulk-all { display: flex; align-items: center; gap: .4rem; font-size: .88rem; font-weight: 600; cursor: pointer; }
.bulk-all input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.bulk-count { flex: 1; font-size: .88rem; color: var(--muted); }
.bulk-bar .btn { display: inline-flex; align-items: center; gap: .3rem; }
.bulk-bar .btn .icon { width: 15px; height: 15px; }
.bulk-bar .btn:disabled { opacity: .45; cursor: default; }

/* Detail odeslaného oznámení (detail.php) */
.ann-badge { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: .5rem; color: #fff; background: linear-gradient(135deg, #1f4fd1, #4f8ff7); border-radius: 18px; box-shadow: 0 6px 16px rgba(31, 79, 209, .25); }
.ann-badge.imp { background: linear-gradient(135deg, #b52f26, #ef6a5d); box-shadow: 0 6px 16px rgba(181, 47, 38, .25); }
.ann-badge .icon { width: 30px; height: 30px; }
.ann-live { display: inline-flex; align-items: center; gap: .4rem; padding: .25rem .7rem; font-size: .8rem; font-weight: 700; color: #1a7f4b; background: #e3f5eb; border-radius: 999px; }
.ann-live::before { content: ""; width: 8px; height: 8px; background: #2f8a3e; border-radius: 50%; }
.ann-live.off { color: var(--muted); background: var(--surface-2); }
.ann-live.off::before { background: #a3abb9; }
.ann-live-sub { margin-top: -.6rem; font-size: .8rem; color: var(--muted); }
.ann-detail .o2-side form { width: 100%; margin: 0; }
.ann-detail .o2-side .btn-block .icon { width: 16px; height: 16px; }
.ann-side-meta { margin: 0; font-size: .8rem; line-height: 1.5; color: var(--muted); }
.ann-side-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 0; width: 100%; padding-top: .6rem; border-top: 1px solid var(--border); }
.ann-detail .ann-side-acts form { width: auto; }
.ann-side-acts .btn { display: inline-flex; align-items: center; gap: .25rem; padding: .3rem .4rem; font-size: .82rem; border-color: transparent; color: var(--muted); }
.ann-side-acts .btn:hover { color: var(--primary); background: var(--primary-soft); text-decoration: none; }
.ann-side-acts .btn .icon { width: 15px; height: 15px; }
.ann-side-acts .ann-del:hover { color: var(--danger); background: var(--danger-soft); }
.ann-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.ann-card-head .link-btn { flex: none; margin-top: .45rem; font-size: .84rem; }
.ann-view-title { margin: 0 0 .5rem; font-size: 1.15rem; }
.ann-meta { margin: 0; }
.ann-meta > div { display: grid; grid-template-columns: 8rem 1fr auto; gap: .75rem; align-items: baseline; padding: .5rem 0; border-top: 1px solid var(--border); }
.ann-meta > div:first-child { border-top: 0; padding-top: 0; }
.ann-meta dt { font-size: .84rem; color: var(--muted); }
.ann-meta dd { margin: 0; font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.ann-meta .link-btn { font-size: .84rem; }
[data-ann-until] .wz-seg { margin-bottom: .25rem; }
[data-ann-until] .wz-date { margin-top: .25rem; }
@media (max-width: 600px) {
    .ann-meta > div { grid-template-columns: 1fr auto; gap: .1rem .75rem; }
    .ann-meta dt { grid-column: 1 / -1; }
}

/* Průvodce novým oznámením (wizard.php) */
.wz-steps { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.wz-steps li { display: flex; align-items: center; gap: .35rem; }
.wz-steps li + li::before { content: ""; width: 22px; height: 2px; background: var(--border); border-radius: 1px; }
.wz-steps button { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .55rem .3rem .3rem; font: inherit; font-size: .88rem; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 999px; cursor: pointer; }
.wz-steps button:hover { background: var(--surface); }
.wz-steps b { display: grid; place-items: center; width: 26px; height: 26px; font-size: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 50%; }
.wz-steps li.on button { color: var(--text); }
.wz-steps li.on b { color: #fff; background: var(--primary); border-color: var(--primary); }
.wz-steps li.done b { color: #fff; background: #2f8a3e; border-color: #2f8a3e; }
.wz-steps li.done + li::before, .wz-steps li.done + li.on::before { background: #2f8a3e; }
.wz-pick { margin-top: .9rem; }
.wz-search { max-width: 360px; }
.wz-pick-list { display: grid; gap: .35rem; max-height: 340px; overflow-y: auto; padding: 2px; }
.wz-opt { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; cursor: pointer; }
.wz-opt:hover { border-color: #b9c6ea; }
.wz-opt input { flex: none; margin: 0; accent-color: var(--primary); }
.wz-opt span { font-weight: 600; font-size: .92rem; }
.wz-opt small { margin-left: auto; font-size: .78rem; color: var(--muted); text-align: right; }
.wz-opt:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); }
.wz-all { margin: .9rem 0 0; font-size: .9rem; }
.wz-org { margin: .5rem 0 .1rem; font-size: .72rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.wz-org:first-child { margin-top: 0; }
.wz-row { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .85rem 0 0; margin-top: .85rem; border-top: 1px solid var(--border); }
.wz-row-label { width: 100%; font-weight: 600; font-size: .88rem; }
.wz-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.wz-seg label { position: relative; cursor: pointer; }
.wz-seg input { position: absolute; opacity: 0; pointer-events: none; }
.wz-seg span { display: block; padding: .38rem .8rem; font-size: .86rem; font-weight: 600; color: var(--muted); border-radius: 8px; }
.wz-seg label:has(input:checked) span { color: var(--text); background: var(--surface); box-shadow: var(--shadow); }
.wz-seg label:has(input:focus-visible) span { outline: 2px solid var(--primary); }
.wz-date { max-width: 240px; }
.wz-sum { margin: 0; }
.wz-sum > div { display: grid; grid-template-columns: 7rem 1fr auto; gap: .75rem; align-items: baseline; padding: .55rem 0; border-top: 1px solid var(--border); }
.wz-sum > div:first-child { border-top: 0; padding-top: 0; }
.wz-sum dt { font-size: .84rem; color: var(--muted); }
.wz-sum dd { margin: 0; font-size: .92rem; font-weight: 600; overflow-wrap: anywhere; }
.wz-preview { margin-top: 1rem; padding: 1rem; background: linear-gradient(160deg, #3b5bd9, #8e5bd0); border-radius: 16px; }
.wz-preview-label { display: block; margin-bottom: .6rem; font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.wz-bubble { display: flex; gap: .65rem; max-width: 380px; padding: .7rem .85rem; color: #1b2333; background: rgba(245, 245, 247, .96); border-radius: 18px; box-shadow: 0 4px 18px rgba(0, 0, 0, .15); }
.wz-bubble img { flex: none; width: 34px; height: 34px; border-radius: 8px; }
.wz-bubble > span { display: flex; flex-direction: column; min-width: 0; font-size: .86rem; }
.wz-bubble small { color: #6b7486; }
.wz-err { margin: 0 0 1rem; padding: .6rem .85rem; font-size: .88rem; font-weight: 600; color: var(--danger); background: var(--danger-soft); border-radius: 10px; }
.wz-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.wz-foot [data-wz-prev] { margin-right: auto; }
.wz-foot .editor-dirty { width: 100%; text-align: right; }
@media (max-width: 600px) {
    .wz-steps { flex-wrap: nowrap; justify-content: space-between; }
    .wz-steps li { flex: 1; }
    .wz-steps li + li::before { flex: 1; width: auto; }
    .wz-steps li:not(.on) span { display: none; }
    .wz-steps button { padding: .2rem; }
    .wz-sum > div { grid-template-columns: 1fr auto; gap: .1rem .75rem; }
    .wz-sum dt { grid-column: 1 / -1; }
    .wz-date { max-width: none; width: 100%; font-size: 16px; }
    .wz-search { max-width: none; font-size: 16px; }
    .ann-wizard input[type=text] { font-size: 16px; }
    .wz-foot .btn { flex: 1; padding-top: .75rem; padding-bottom: .75rem; }
    .wz-foot [data-wz-prev] { flex: 0 0 auto; margin-right: 0; }
    .wz-foot .editor-dirty { text-align: center; }
}
.ann-remind { margin: 1rem 0 0; }
.ann-remind .btn .icon { width: 15px; height: 15px; }
@media (max-width: 600px) {
    .ann-status { flex-wrap: wrap; }
    .ann-status form { margin-left: 0; }
    .ann-rec { grid-template-columns: auto 1fr auto; }
    .ann-rec-time { grid-column: 2 / -1; text-align: left; margin-top: -.3rem; }
    .ann-rec-search { max-width: none; }
}

/* =========================================================================
   Helpdesk – řešitel: pohledy · seznam · otevřený tiket (varianta „Pošta“); zadavatel: seznam a detail
   ========================================================================= */
:root {
    --hd-int-bg: #fff6e0; --hd-int-border: #f1dca2; --hd-int-ink: #7a4600;
    --hd-nt-bg: #fff3b8; --hd-nt-border: #e6c200; --hd-nt-ink: #5a4600; --hd-nt-pop: #fff8cc;   /* moje poznámka – žlutý lísteček */
    --hd-q-bg: #f3efff; --hd-q-border: #b7a5ee; --hd-q-ink: #4b2fa8; --hd-q-chip: #e3dbff; --hd-q-btn: #5b3fd0;   /* tichá zpráva – fialová */
    --hd-cust-bg: #f2f7ff; --hd-cust-border: #d8e5fb;
    --hd-note-bg: #fffbea; --hd-note-border: #f0e2a0;
    --hd-ok-bg: #effaf4; --hd-ok-border: #a9dcc0;
    --hd-ap-wait: #d97706; --hd-ap-wait-bg: #fff4dd; --hd-ap-wait-border: #f5c26b;
    --hd-ap-ok: #15803d; --hd-ap-ok-bg: #e6f6ec; --hd-ap-ok-border: #7fcf9d;
    --hd-ap-no: #dc2626; --hd-ap-no-bg: #fdecec; --hd-ap-no-border: #f2a3a3;
}
:root[data-theme="dark"] { --hd-nt-bg: #3a3010; --hd-nt-border: #8a6f10; --hd-nt-ink: #f0d36a; --hd-nt-pop: #2e2710; --hd-q-bg: #231d3a; --hd-q-border: #5b4a9c; --hd-q-ink: #c5b6f7; --hd-q-chip: #3a2f66; --hd-q-btn: #6f55e0; --hd-int-bg: #33280f; --hd-int-border: #5a4718; --hd-int-ink: #e7b44c; --hd-cust-bg: #18233a; --hd-cust-border: #28395c; --hd-note-bg: #2e2a14; --hd-note-border: #4d4520; --hd-ok-bg: #13291d; --hd-ok-border: #28553b; --hd-ap-wait-bg: #33250e; --hd-ap-wait-border: #7a5516; --hd-ap-ok-bg: #11291a; --hd-ap-ok-border: #2c6b43; --hd-ap-no-bg: #331616; --hd-ap-no-border: #7a2c2c; }
.hd-pill { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; line-height: 1.5; white-space: nowrap; }
.hd-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.hd-pill:empty { padding: 0; width: 10px; height: 10px; }
.hd-pill:empty::before { width: 10px; height: 10px; }
.st-queue { background: #eceef2; color: #4b5466; }
.st-work { background: #e6f1fb; color: #0c5ac4; }
.st-wait { background: #faeeda; color: #8a4b00; }
.st-third { background: #eeedfe; color: #4c3fc0; }
.st-appr { background: #ffedd5; color: #c2410c; }
.st-snooze { background: #f1efe8; color: #5c5a52; }
.st-done { background: #e3f5eb; color: #1a7f4b; }
.st-closed { background: #eceef2; color: #6b7486; }
.hd-prio { display: inline-flex; align-items: center; gap: .3rem; font-size: .76rem; color: var(--muted); white-space: nowrap; }
.hd-prio i, .hd-prio-seg i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.p-low i, i.p-low { background: #b6bdc9; }
.p-mid i, i.p-mid { background: #f0b429; }
.p-high i, i.p-high { background: #f07b29; }
.p-crit i, i.p-crit { background: #e5484d; }
.hd-prio.p-crit { color: var(--danger); font-weight: 700; }
.hd-prio.p-high { color: #b8560f; font-weight: 600; }
.hd-id { font: 600 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); letter-spacing: .02em; white-space: nowrap; }
.hd-crumb, .hd-muted { font-size: .78rem; color: var(--muted); }
.hd-due { font-size: .76rem; white-space: nowrap; color: var(--muted); }
.hd-due.soon { color: var(--warning); font-weight: 700; }
.hd-due.late { color: var(--danger); font-weight: 700; }
.hd-cnt { display: inline-flex; align-items: center; gap: .15rem; font-size: .74rem; color: var(--muted); }
.hd-cnt .icon { width: 12px; height: 12px; }
.hd-av { display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; color: #fff; font-size: .7rem; font-weight: 700; background: linear-gradient(135deg, #1f4fd1, #4f8ff7); }
.hd-av.sm { width: 24px; height: 24px; font-size: .58rem; }
.hd-av-1 { background: linear-gradient(135deg, #7c3aed, #b17cf7); }
.hd-av-2 { background: linear-gradient(135deg, #0f8a6c, #3cc39c); }
.hd-av-3 { background: linear-gradient(135deg, #c2410c, #f59e5b); }
.hd-av-4 { background: linear-gradient(135deg, #be185d, #f472b6); }
.hd-stars-show { color: #f5b301; letter-spacing: -.05em; font-size: .9rem; }
.hd-stars-show span { color: #d3d8e2; }

/* --- Rozložení řešitele ---------------------------------------------------- */
.hd { display: grid; grid-template-columns: 76px 370px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 520px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.hd-rail { display: flex; flex-direction: column; align-items: stretch; gap: .15rem; padding: .6rem .35rem; background: var(--surface-2); border-right: 1px solid var(--border); overflow-y: auto; }
.hd-rail a { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .45rem .1rem; border-radius: 12px; color: var(--muted); font-size: .62rem; font-weight: 700; text-align: center; line-height: 1.15; }
.hd-rail a:hover { background: var(--surface); text-decoration: none; color: var(--text); }
.hd-rail a.on { background: var(--primary-soft); color: var(--primary); }
.hd-rail-ico { position: relative; display: grid; place-items: center; width: 34px; height: 30px; }
.hd-rail-ico .icon { width: 19px; height: 19px; }
.hd-rail-ico b { position: absolute; top: -3px; right: -6px; min-width: 17px; padding: 0 4px; border-radius: 999px; background: var(--muted); color: #fff; font-size: .6rem; line-height: 16px; }
.hd-rail-ico b.hot { background: #e5484d; }
.hd-rail-label small { font-weight: 600; opacity: .8; }
.hd-rail-sp { flex: 1; }
.hd-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border); }
.hd-list-head { padding: .8rem .9rem .65rem; border-bottom: 1px solid var(--border); }
.hd-list-title { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.hd-list-title h2 { margin: 0; font-size: 1.05rem; }
.hd-list-title h2 small { font-size: .78rem; color: var(--muted); font-weight: 600; }
.hd-list-title .btn .icon { width: 15px; height: 15px; }
.hd-search { display: flex; flex-wrap: wrap; gap: .4rem; }
.hd-search-box { flex: 1 1 160px; display: flex; align-items: center; gap: .4rem; min-width: 0; padding: 0 .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); }
.hd-search-box .icon { width: 15px; height: 15px; flex: none; }
.hd-search-box input { flex: 1; min-width: 0; border: 0 !important; padding: .45rem 0 !important; background: none !important; box-shadow: none !important; font-size: .88rem; }
.hd-search select { width: 118px; padding-top: .4rem; padding-bottom: .4rem; font-size: .82rem; }
.hd-items { flex: 1; overflow-y: auto; }
.hd-empty { padding: 2rem 1rem; margin: 0; color: var(--muted); text-align: center; font-size: .9rem; }
.hd-item { position: relative; display: block; padding: .7rem .9rem .7rem 1.05rem; border-bottom: 1px solid var(--border); color: var(--text); }
.hd-item:hover { background: var(--surface-2); text-decoration: none; }
.hd-item.on { background: var(--primary-soft); }
.hd-item.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.hd-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.hd-row + .hd-snip, .hd-snip + .hd-row { margin-top: .25rem; }
.hd-subj { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.hd-item.unread .hd-subj { font-weight: 800; }
.hd-item.unread .hd-subj::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .35rem; border-radius: 50%; background: var(--primary); vertical-align: 1px; }
.hd-time { flex: none; font-size: .72rem; color: var(--muted); }
.hd-snip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; color: var(--muted); }
.hd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .45rem; min-width: 0; }
.hd-meta .org-tag { margin: 0; }
.hd-view { min-width: 0; min-height: 0; overflow-y: auto; background: var(--bg); }
.hd-view-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem; height: 100%; color: var(--muted); }
.hd-view-empty > span .icon { width: 44px; height: 44px; opacity: .35; }
.hd-view-empty p { margin: 0; }

/* --- Tiket ----------------------------------------------------------------- */
.hd-ticket { padding: 1rem 1.25rem 1.5rem; }
.hd-back { display: none; align-items: center; gap: .2rem; margin-bottom: .6rem; font-size: .88rem; font-weight: 600; }
.hd-back .icon { width: 16px; height: 16px; }
.hd-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem 1rem; padding: 1rem 1.15rem; margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); }
.hd-head-t { flex: 1; min-width: 240px; }
.hd-head h2 { margin: .2rem 0 .45rem; font-size: 1.2rem; line-height: 1.3; }
.hd-chips { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; }
.hd-head-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.hd-head-acts form { margin: 0; }
.hd-ib { border-color: var(--border); background: var(--surface); }
.hd-head-acts .btn .icon { width: 15px; height: 15px; }
.hd-st { position: relative; }
.hd-st summary { list-style: none; display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; border: 0; cursor: pointer; }
.hd-st summary::-webkit-details-marker { display: none; }
.hd-st summary .icon { width: 14px; height: 14px; }
.hd-st-btn::before { display: none; }
.hd-st-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 280px; padding: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 34px rgba(16, 24, 40, .18); }
.hd-st-menu form { margin: 0; }
.hd-st-menu button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.hd-st-menu button:hover { background: var(--surface-2); }
.hd-st-menu button small { display: block; color: var(--muted); font-size: .74rem; }
.hd-st-menu hr { border: 0; border-top: 1px solid var(--border); margin: .3rem 0; }
.hd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1rem; align-items: start; }
.hd-closed-note { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: .86rem; }
.hd-card { padding: .85rem .95rem .95rem; margin-bottom: .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.hd-card h4 { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hd-card h4 .icon { width: 14px; height: 14px; }
.hd-card h4 .link-btn { margin-left: auto; display: inline-flex; align-items: center; gap: .2rem; }
.hd-card h4 .link-btn .icon { width: 13px; height: 13px; }
.hd-card h4 small { font-weight: 600; }
.hd-card h5 { margin: .8rem 0 .4rem; font-size: .72rem; color: var(--muted); font-weight: 700; }
.hd-person { display: flex; align-items: flex-start; gap: .6rem; }
.hd-person + .hd-person { margin-top: .6rem; }
.hd-person > span:last-child { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; gap: .1rem; font-size: .84rem; }
.hd-person b { font-size: .9rem; }
.hd-person small { color: var(--muted); font-size: .74rem; }
.hd-person a { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.hd-member { display: flex; align-items: center; gap: .5rem; margin: .45rem 0 0; font-size: .85rem; }
.hd-member small { color: var(--muted); }
.hd-x { margin-left: auto; width: 24px; height: 24px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.hd-x:hover { background: var(--danger-soft); color: var(--danger); }
.hd-kv { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: .4rem .6rem; margin: 0; font-size: .84rem; }
.hd-kv dt { color: var(--muted); }
.hd-kv dd { margin: 0; font-weight: 600; }
.hd-addr { margin: 0; font-size: .88rem; }
.hd-nav-btns { display: flex; gap: .4rem; margin-top: .6rem; }
.hd-nav-btns a { flex: 1; padding: .45rem; border: 1px solid var(--border); border-radius: 9px; font-size: .82rem; font-weight: 700; text-align: center; }
.hd-nav-btns a:hover { background: var(--surface-2); text-decoration: none; }
.hd-nav-btns .waze { color: #0a8fc2; }
.hd-nav-btns .mapy { color: #2e7d32; }
.hd-lock { margin-left: auto; display: inline-flex; align-items: center; gap: .2rem; font-size: .68rem; text-transform: none; letter-spacing: 0; font-weight: 600; }
.hd-lock .icon { width: 11px !important; height: 11px !important; }
.hd-note { width: 100%; min-height: 80px; resize: vertical; background: var(--hd-note-bg) !important; border-color: var(--hd-note-border) !important; font-size: .86rem; }
.hd-note-state { display: block; min-height: 1em; margin-top: .2rem; font-size: .7rem; color: var(--muted); }
.hd-dlg-row { display: flex; align-items: flex-end; gap: .5rem; margin-bottom: .75rem; }
.hd-dlg-row .field { flex: 1; margin: 0 !important; }

/* Psaní zprávy */
.hd-composer { margin-bottom: 1rem; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.hd-cmp-tabs { display: flex; gap: .2rem; padding: .45rem .55rem 0; }
.hd-cmp-tabs label { cursor: pointer; }
.hd-cmp-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.hd-cmp-tabs span { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; border-radius: 9px 9px 0 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.hd-cmp-tabs span .icon { width: 15px; height: 15px; }
.hd-cmp-tabs input:checked + span { background: var(--surface-2); color: var(--text); }
.hd-cmp-tabs .int input:checked + span { background: var(--hd-int-bg); color: var(--hd-int-ink); }
.hd-cmp-tabs input:focus-visible + span { outline: 2px solid var(--primary); }
.hd-cmp-body { padding: .55rem .7rem .7rem; background: var(--surface-2); }
.hd-composer:has(.int input:checked) .hd-cmp-body { background: var(--hd-int-bg); }
.hd-composer:has(.int input:checked) [data-hd-public-only] { visibility: hidden; }
.hd-cmp-foot { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .5rem; margin-top: .55rem; }
.hd-cmp-send { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.hd-then { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; color: var(--muted); cursor: pointer; }

/* Editor */
.rt { display: flex; flex-direction: column; }
.rt-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .1rem; padding: .2rem; margin-bottom: .4rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.rt-bar button { display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 .3rem; border: 0; border-radius: 7px; background: none; color: var(--text); font: 700 .95rem/1 Georgia, "Times New Roman", serif; cursor: pointer; }
.rt-bar button:hover, .rt-bar button.on { background: var(--primary-soft); color: var(--primary); }
.rt-bar button .icon { width: 16px; height: 16px; }
.rt-sep { width: 1px; height: 18px; margin: 0 .2rem; background: var(--border); }
.rt-colors { display: inline-flex; gap: 1px; }
.rt-c { min-width: 24px !important; font-family: inherit !important; text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 3px; }
.rt-bar .rt-c.tc-red { color: #c0352b; } .rt-bar .rt-c.tc-blue { color: #1f4fd1; } .rt-bar .rt-c.tc-green { color: #1a7f4b; } .rt-bar .rt-c.tc-amber { color: #c26a00; } .rt-bar .rt-c.tc-purple { color: #6d4bd8; }
.rt-hl { background: #fdf0a6 !important; color: #1b2333 !important; text-decoration: none; margin-left: 2px; }
.rt-link { display: flex; gap: .35rem; margin-bottom: .4rem; }
.rt-link input { flex: 1; min-width: 0; }
.rt-area { min-height: 92px; max-height: 420px; overflow-y: auto; padding: .6rem .75rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: .92rem; line-height: 1.5; outline: none; }
.rt-tall .rt-area { min-height: 150px; }
.rt-area:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.rt-area:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.rt-area p, .hd-body p { margin: 0 0 .5rem; }
.rt-area > :last-child, .hd-body > :last-child { margin-bottom: 0; }
.rt-area ul, .rt-area ol, .hd-body ul, .hd-body ol { margin: 0 0 .5rem; padding-left: 1.3rem; }
.rt-area blockquote, .hd-body blockquote { margin: 0 0 .5rem; padding: .1rem 0 .1rem .7rem; border-left: 3px solid var(--border); color: var(--muted); }
.tc-red { color: #c0352b; } .tc-blue { color: #1f4fd1; } .tc-green { color: #1a7f4b; } .tc-amber { color: #c26a00; } .tc-purple { color: #6d4bd8; }
.hl-yellow { background: #fdf0a6; color: #1b2333; } .hl-green { background: #d3f3df; color: #1b2333; } .hl-blue { background: #dbe7fd; color: #1b2333; } .hl-red { background: #fbd9d6; color: #1b2333; }
:root[data-theme="dark"] .tc-red { color: #f07167; }
:root[data-theme="dark"] .tc-blue { color: #7598f7; }
:root[data-theme="dark"] .tc-green { color: #4cc68a; }
:root[data-theme="dark"] .tc-amber { color: #e7b44c; }
:root[data-theme="dark"] .tc-purple { color: #b39cf5; }

/* Přílohy ve formuláři */
.hd-attach { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; min-width: 0; }
.hd-attach-btn { position: relative; display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .6rem; border: 1px dashed #b9c3d6; border-radius: 9px; font-size: .8rem; font-weight: 600; color: var(--text); cursor: pointer; }
.hd-attach-btn:hover { border-color: var(--primary); color: var(--primary); }
.hd-attach-btn .icon { width: 15px; height: 15px; }
.hd-attach-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.hd-attach-hint { font-size: .74rem; color: var(--muted); }
.hd-attach-list { display: flex; flex-wrap: wrap; gap: .35rem; width: 100%; }
.hd-attach-list:empty { display: none; }
.hd-chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 240px; padding: .2rem .25rem .2rem .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; font-size: .78rem; }
.hd-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-chip small { color: var(--muted); flex: none; }
.hd-chip.err { border-color: var(--danger); color: var(--danger); }
.hd-chip button { border: 0; background: none; color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer; }
.hd-attach.drag { outline: 2px dashed var(--primary); outline-offset: 4px; border-radius: 10px; }

/* Historie */
.hd-tl-head { display: flex; align-items: center; justify-content: space-between; margin: .2rem 0 .6rem; }
.hd-tl-head h3 { margin: 0; font-size: .95rem; }
.hd-seg { display: inline-flex; gap: .1rem; padding: .18rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.hd-seg button { padding: .2rem .55rem; border: 0; border-radius: 7px; background: none; font: inherit; font-size: .76rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.hd-seg button.on { background: var(--primary-soft); color: var(--primary); }
.hd-msg { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: .6rem; margin-bottom: .75rem; }
.hd-bub { min-width: 0; padding: .7rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 4px 14px 14px 14px; }
/* Řešitel (J Services) jemně modře, zadavatel a kolegové bíle (2. 10., varianta A). */
.hd-msg:not(.cust):not(.int):not(.qt):not(.hd-msg-first) .hd-bub { background: var(--hd-cust-bg); border-color: var(--hd-cust-border); }
.hd-msg.int .hd-bub { background: var(--hd-int-bg); border-color: var(--hd-int-border); }
.hd-msg-h { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .25rem; font-size: .78rem; color: var(--muted); }
.hd-msg-h b { color: var(--text); font-size: .86rem; }
.hd-tag-int { display: inline-flex; align-items: center; gap: .2rem; padding: 0 .4rem; border-radius: 5px; background: var(--hd-int-border); color: var(--hd-int-ink); font-size: .64rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.hd-tag-int .icon { width: 10px; height: 10px; }
.hd-tag-first { padding: 0 .4rem; border-radius: 5px; background: var(--border); font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.hd-body { font-size: .9rem; line-height: 1.55; overflow-wrap: anywhere; }
.hd-ev { display: flex; align-items: flex-start; gap: .45rem; margin: 0 0 .75rem 42px; font-size: .76rem; color: var(--muted); }
.hd-ev .icon { width: 13px; height: 13px; flex: none; margin-top: .15rem; }
.hd-ev b { color: var(--text); font-weight: 600; }
.hd-tl[data-f="msg"] [data-k="ev"], .hd-tl[data-f="ev"] [data-k="msg"] { display: none; }
.hd-files { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.hd-card .hd-files { margin-top: 0; }
.hd-thumb { display: block; width: 96px; height: 72px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.hd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hd-file { display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; padding: .3rem .55rem .3rem .3rem; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font-size: .78rem; }
.hd-file:hover { border-color: var(--primary); text-decoration: none; }
.hd-file i { display: grid; place-items: center; width: 34px; height: 28px; flex: none; border-radius: 6px; background: var(--primary-soft); color: var(--primary); font-style: normal; font-size: .58rem; font-weight: 800; }
.hd-file span { display: flex; flex-direction: column; min-width: 0; }
.hd-file span, .hd-file small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-file small { color: var(--muted); font-size: .7rem; }

/* --- Zadavatel -------------------------------------------------------------- */
.hd-req { max-width: 920px; }
.hd-req-detail { max-width: 1120px; }
.hd-req .page-head .btn .icon { width: 16px; height: 16px; }
.hd-need { display: flex; align-items: center; gap: .75rem; padding: .9rem 1.1rem; margin-bottom: 1rem; border-radius: 16px; background: linear-gradient(135deg, #1a7f4b, #2fa56b); color: #fff; font-size: .88rem; }
.hd-need b { display: block; font-size: 1rem; }
.hd-rq { display: block; padding: .9rem 1.05rem; margin-bottom: .6rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.hd-rq:hover { text-decoration: none; border-color: #b9c6e4; }
.hd-rq.need { border: 1.5px solid var(--hd-ok-border); background: var(--hd-ok-bg); }
.hd-rq-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.hd-rq-subj { display: block; margin: .15rem 0; font-size: 1rem; }
.hd-rq.unread .hd-rq-subj { font-weight: 800; }
.hd-rq-meta { display: block; font-size: .8rem; color: var(--muted); }
.hd-new { color: var(--primary); font-weight: 700; }
.hd-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; margin-top: .7rem; }
.hd-steps span { position: relative; padding-top: .5rem; font-size: .68rem; font-weight: 600; color: var(--muted); }
.hd-steps span::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: 4px; background: var(--border); }
.hd-steps span.done::before { background: var(--primary); }
.hd-steps span.now { color: var(--primary); }
.hd-steps span.now::before { background: linear-gradient(90deg, var(--primary) 55%, var(--border) 55%); }
.hd-steps-lg { margin: -.25rem 0 1rem; padding: .7rem 1rem .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.hd-steps-lg span { font-size: .76rem; }
.hd-ticket-req { padding: 0; }
.hd-confirm { padding: 1rem 1.15rem; margin-bottom: 1rem; border: 1.5px solid var(--hd-ok-border); border-radius: 16px; background: var(--hd-ok-bg); }
.hd-confirm h3 { margin: 0 0 .3rem; color: var(--success); }
.hd-confirm p { margin: 0 0 .8rem; font-size: .9rem; }
.hd-confirm-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; }
.hd-rate { display: inline-flex; align-items: center; gap: .5rem; font-size: .85rem; color: var(--muted); }
.hd-btn-ok { background: var(--success); color: #fff; }
.hd-btn-ok:hover { filter: brightness(.95); }
.hd-btn-ok .icon { width: 16px; height: 16px; }
.hd-stars { display: inline-flex; flex-direction: row-reverse; }
.hd-stars input { position: absolute; opacity: 0; pointer-events: none; }
.hd-stars label { padding: 0 .08rem; font-size: 1.7rem; line-height: 1; color: #d3d8e2; cursor: pointer; transition: color .1s, transform .1s; }
.hd-stars label:hover, .hd-stars label:hover ~ label, .hd-stars input:checked ~ label { color: #f5b301; }
.hd-stars label:hover { transform: scale(1.12); }
.hd-stars input:focus-visible + label { outline: 2px solid var(--primary); border-radius: 4px; }
.hd-reopen { margin-top: .8rem; font-size: .88rem; }
.hd-reopen summary { color: var(--muted); cursor: pointer; font-weight: 600; }
.hd-reopen form { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; margin-top: .5rem; }
.hd-reopen textarea { width: 100%; }
.hd-rate-late { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .7rem 1rem; margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; font-size: .88rem; }
.hd-ask { margin: 0 0 .7rem; padding: .6rem .85rem; border-radius: 12px; background: var(--warning-soft); color: var(--warning); font-size: .86rem; font-weight: 600; }
.hd-invite-row { display: flex; gap: .4rem; margin-top: .7rem; }
.hd-invite-row select { flex: 1; min-width: 0; font-size: .84rem; }

/* --- Nový požadavek ----------------------------------------------------------- */
.hd-wiz { max-width: 900px; }
.hd-wiz-h { display: flex; align-items: center; gap: .55rem; margin: 0 0 .85rem; font-size: 1rem; }
.hd-wiz-h em { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-style: normal; font-size: .75rem; }
.hd-wiz-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.hd-who { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--border); }
.hd-who > b { display: block; margin-bottom: .4rem; font-size: .9rem; }
.hd-who .wz-seg { display: flex; }
.hd-who .wz-seg label { flex: 1; }
.hd-who .wz-seg span { text-align: center; }
.hd-who small { display: block; margin-top: .4rem; font-size: .8rem; }
.hd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.hd-tile { position: relative; display: flex; flex-direction: column; gap: .35rem; padding: .85rem; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; }
.hd-tile:hover { border-color: #b9c6ea; }
.hd-tile input { position: absolute; opacity: 0; pointer-events: none; }
.hd-tile:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); }
.hd-tile:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.hd-tile b { font-size: .92rem; }
.hd-tile small { color: var(--muted); font-size: .76rem; line-height: 1.35; }
.hd-tile-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; }
.hd-tile-ico .icon { width: 20px; height: 20px; }
.hd-cats + .hd-cats { margin-top: .5rem; }
.hd-cats-area { margin: 0 0 .5rem; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hd-wiz.js .hd-cats-area { display: none; }
.hd-wiz .opt-chips { margin: 0; }
.hd-hint { display: flex; gap: .5rem; margin: .8rem 0 0; padding: .6rem .8rem; border-radius: 10px; background: var(--surface-2); font-size: .84rem; color: var(--muted); }
.hd-hint::before { content: "💡"; }
.hd-wiz .field { margin-bottom: .9rem; }
.hd-prio-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.hd-prio-seg label { cursor: pointer; }
.hd-prio-seg input { position: absolute; opacity: 0; pointer-events: none; }
.hd-prio-seg span { display: flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem .4rem; border: 1.5px solid var(--border); border-radius: 10px; font-size: .84rem; font-weight: 600; text-align: center; }
.hd-prio-seg input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.hd-prio-seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.hd-more { padding: .7rem .9rem; margin-bottom: .5rem; border: 1px solid var(--border); border-radius: 12px; font-size: .9rem; }
.hd-more summary { cursor: pointer; font-weight: 600; }
.hd-more summary small { color: var(--muted); font-weight: 400; }
.hd-more .grid-2 { margin-top: .8rem; }
.hd-send-row { justify-content: flex-end; }
.hd-wiz.hd-wiz-2col { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 1rem; align-items: start; max-width: 1240px; }
.hd-wiz-main { min-width: 0; }
.hd-wiz-side { position: sticky; top: 1rem; }
.hd-sum h3 { margin: 0 0 .7rem; font-size: 1rem; }
.hd-sum dl { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: .45rem .6rem; margin: 0 0 .8rem; font-size: .86rem; }
.hd-sum dt { color: var(--muted); }
.hd-sum dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.hd-sum dd.empty { color: var(--muted); font-weight: 400; font-style: italic; }
.hd-sum-send { width: 100%; justify-content: center; padding: .65rem; }
.hd-sum-cancel { width: 100%; justify-content: center; margin-top: .35rem; }
@media (max-width: 960px) { .hd-wiz.hd-wiz-2col { grid-template-columns: minmax(0, 1fr); } .hd-wiz-side { position: static; } }
.hd-wiz.js [data-hd-step]:not(.shown) { display: none; }

/* --- Kategorie -------------------------------------------------------------- */
.hd-cat-intro { max-width: 760px; margin: 0 0 1rem; font-size: .9rem; }
.hd-cat-card.off { opacity: .7; }
.hd-cat-head { display: flex; align-items: center; gap: .75rem; margin-bottom: .8rem; }
.hd-cat-t { display: flex; flex-direction: column; }
.hd-cat-t small { color: var(--muted); font-size: .8rem; }
.hd-cat-row { display: grid; grid-template-columns: auto minmax(140px, 1fr) minmax(160px, 1.6fr) 110px auto auto auto auto; gap: .4rem; align-items: center; padding: .3rem 0; border-top: 1px solid var(--border); }
.hd-cat-row.off input[type=text] { color: var(--muted); }
.hd-cat-row input, .hd-cat-row select { font-size: .86rem; padding-top: .4rem; padding-bottom: .4rem; }
.hd-cat-new { grid-template-columns: 1.45rem minmax(140px, 1fr) minmax(160px, 1.6fr) 110px auto; }
.hd-cat-new input[name=name] { grid-column: 2; }
.hd-cat-on { display: flex; align-items: center; }
.hd-cat-edit { margin-top: .8rem; }
.hd-cat-edit summary { cursor: pointer; font-size: .85rem; font-weight: 600; color: var(--primary); }
.hd-cat-edit form { margin-top: .8rem; }
.hd-orgs { display: flex; flex-wrap: wrap; gap: .3rem .8rem; margin: .2rem 0 .8rem; }
.hd-org-check { display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }

/* --- Menší obrazovky ---------------------------------------------------------- */
@media (max-width: 1400px) {
    .hd-grid { grid-template-columns: minmax(0, 1fr); }
    .hd-side { order: -1; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .6rem; }
    .hd-side .hd-card { margin: 0; }
    .hd .hd-side .hd-card:has(.hd-note) { grid-column: 1 / -1; }
}
@media (max-width: 1150px) {
    .hd { grid-template-columns: 64px 300px minmax(0, 1fr); }
    .hd-rail-label { display: none; }
}
@media (max-width: 860px) {
    .hd { display: block; height: auto; min-height: 0; overflow: visible; background: none; border: 0; box-shadow: none; border-radius: 0; }
    .hd-rail { flex-direction: row; gap: .3rem; padding: 0 0 .6rem; overflow-x: auto; background: none; border: 0; }
    .hd-rail a { flex-direction: row; flex: none; gap: .3rem; padding: .35rem .7rem .35rem .45rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: .8rem; }
    .hd-rail-label { display: inline; }
    .hd-rail-ico { width: 22px; height: 22px; }
    .hd-rail-ico .icon { width: 16px; height: 16px; }
    .hd-rail-sp { display: none; }
    .hd-list { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
    .hd-search select { width: 110px; font-size: 16px; }
    .hd-search-box input { font-size: 16px; }
    .hd-view { display: none; overflow: visible; background: none; }
    .hd.has-ticket .hd-rail, .hd.has-ticket .hd-list { display: none; }
    .hd.has-ticket .hd-view { display: block; }
    .hd-ticket { padding: 0; }
    .hd-back { display: inline-flex; }
    .hd-head { padding: .85rem .9rem; }
    .hd-head h2 { font-size: 1.1rem; }
    .hd-head-acts { width: 100%; }
    .hd-st-menu { right: auto; left: 0; }
    .hd-side { grid-template-columns: minmax(0, 1fr); order: 0; }
    .hd-cmp-foot { flex-direction: column; align-items: stretch; }
    .hd-cmp-send { justify-content: space-between; }
    .hd-attach-hint { display: none; }
    .rt-area { font-size: 16px; }
    .rt-x { display: none !important; }
    .hd-ev { margin-left: 0; }
    .hd-msg { grid-template-columns: 28px minmax(0, 1fr); gap: .45rem; }
    .hd-msg .hd-av { width: 28px; height: 28px; font-size: .62rem; }
    .hd-wiz-grid3 { grid-template-columns: minmax(0, 1fr); }
    .hd-prio-seg { grid-template-columns: repeat(2, 1fr); }
    .hd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hd-wiz input[type=text], .hd-wiz select { font-size: 16px; }
    .hd-send-row .btn { flex: 1; }
    .hd-confirm-row .btn { width: 100%; justify-content: center; }
    .hd-cat-row { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
    .hd-cat-new { grid-template-columns: minmax(0, 1fr) auto; }
    .hd-cat-row .hd-cat-vis { grid-column: 1 / 3; justify-self: start; }
    .hd-cat-row input[name=name] { grid-column: 2 / -1; }
    .hd-cat-new input[name=name] { grid-column: 1 / -1; }
    .hd-cat-row input[name=hint], .hd-cat-row select { grid-column: 1 / -1; }
    .hd-req-detail .hd-grid { display: flex; flex-direction: column; }
}
/* Helpdesk – našeptávač zadavatele (nový tiket za někoho) */
.hd-wiz-grid2 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: .75rem; }
.hd-person-search { position: relative; }
.hd-person-search input { width: 100%; }
.hd-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; max-height: 320px; overflow-y: auto; margin: 0; padding: .3rem; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 14px 34px rgba(16, 24, 40, .16); }
.hd-suggest li { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border-radius: 9px; cursor: pointer; }
.hd-suggest li.on, .hd-suggest li:hover { background: var(--primary-soft); }
.hd-suggest li > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.hd-suggest b { font-size: .9rem; font-weight: 600; }
.hd-suggest small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .76rem; }
.hd-suggest .org-tag { margin: 0; flex: none; }
.hd-suggest mark { background: none; color: var(--primary); font-weight: 800; }
.hd-suggest .hd-suggest-empty { color: var(--muted); font-size: .85rem; cursor: default; }
.hd-person-chosen { display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem; border: 1.5px solid var(--primary); border-radius: 10px; background: var(--primary-soft); }
.hd-person-chosen-t { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .5rem; flex: 1; min-width: 0; }
.hd-person-chosen-t .org-tag { margin: 0; }
@media (max-width: 860px) {
    .hd-wiz-grid2 { grid-template-columns: minmax(0, 1fr); }
    .hd-person-search input { font-size: 16px; }
}
/* Helpdesk – adresa s našeptáváním, tiket na celou šířku */
.hd-addr-wrap { position: relative; }
.hd-addr-wrap .hd-suggest li > span:first-child { flex: none; }
.hd.wide { grid-template-columns: 0 0 minmax(0, 1fr); }
.hd.wide .hd-rail, .hd.wide .hd-list { visibility: hidden; overflow: hidden; border: 0; padding: 0; }
.hd.wide .hd-ticket { max-width: 1280px; margin: 0 auto; }
.hd.wide .hd-wide-btn { color: var(--primary); background: var(--primary-soft); }
.hd-wide-btn .icon { width: 16px; height: 16px; }
@media (max-width: 860px) { .hd-wide-btn { display: none !important; } }
/* Helpdesk – pravidla přiřazování */
.hd-rules { display: flex; flex-direction: column; gap: .45rem; }
.hd-rule { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.hd-rule.off { opacity: .6; }
.hd-rule.dragging { box-shadow: 0 10px 24px rgba(16, 24, 40, .15); }
.hd-rule summary { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; list-style: none; cursor: pointer; }
.hd-rule summary::-webkit-details-marker { display: none; }
.hd-rule[open] summary { border-bottom: 1px solid var(--border); }
.hd-rule form { padding: .8rem .9rem .9rem; }
.hd-rule-n { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: .75rem; font-weight: 800; }
.hd-rule-t { flex: 1; min-width: 0; font-size: .88rem; }
.hd-rule-t small { color: var(--muted); }
.hd-rule-arrow { margin: 0 .25rem; color: var(--muted); }
.hd-rule-who { color: var(--primary); }
.hd-rule-away { display: inline-block; margin-left: .4rem; padding: 0 .45rem; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: .7rem; font-weight: 700; }
.hd-rule-edit { color: var(--muted); }
.hd-rule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem .75rem; margin-bottom: .6rem; }
.hd-away-row input[type=date] { width: auto; margin-left: auto; }
@media (max-width: 860px) {
    .hd-rule-grid { grid-template-columns: minmax(0, 1fr); }
    .hd-rule-grid select { font-size: 16px; }
}
/* Helpdesk – seznam řešitele (varianta B): ikona oblasti, střídavé pozadí, červená tečka = nová odpověď */
.hd-item { display: flex; align-items: flex-start; gap: .65rem; padding-left: .85rem; }
.hd-items .hd-item:nth-child(even) { background: var(--surface-2); }
.hd-items .hd-item:hover { background: var(--primary-soft); }
.hd-items .hd-item.on { background: var(--primary-soft); }
.hd-item.crit { box-shadow: inset 3px 0 0 #e5484d; }
.hd-item-ico { display: grid; place-items: center; width: 32px; height: 32px; flex: none; margin-top: .1rem; border-radius: 9px; }
.hd-item-ico .icon { width: 16px; height: 16px; }
.hd-item-body { flex: 1; min-width: 0; }
.hd-item.unread .hd-subj::before { display: none; }
.hd-item.unread .hd-subj::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: .35rem; border-radius: 50%; background: #e5484d; vertical-align: 1px; }

/* Helpdesk – seznam zadavatele (varianta A): barevný proužek podle stavu, „co teď“, termíny dole */
.hd-rq { --c: #8e98ac; position: relative; border-left: 5px solid var(--c); border-radius: 12px; padding: .85rem 1rem .75rem 1.1rem; }
.hd-rq:hover { box-shadow: 0 4px 14px rgba(16, 24, 40, .1); }
.hd-rq.need { border: 1px solid var(--border); border-left: 5px solid var(--c); background: var(--surface); }
.hd-rq.s-work { --c: #1f4fd1; } .hd-rq.s-wait_req { --c: #e08a00; } .hd-rq.s-wait_third { --c: #6d4bd8; } .hd-rq.s-snoozed { --c: #9a948a; }
.hd-rq.s-approval { --c: #1f4fd1; } .hd-rq.s-resolved { --c: #1a7f4b; } .hd-rq.s-closed, .hd-rq.s-cancelled { --c: #c3c9d4; }
.hd-rq-top { align-items: center; }
.hd-rq-subj { margin: .25rem 0 .1rem; }
.hd-new-badge { display: inline-block; padding: 0 .45rem; border-radius: 999px; background: #e5484d; color: #fff; font-size: .64rem; font-weight: 800; vertical-align: 2px; }
.hd-rq-act { display: inline-block; margin-top: .5rem; padding: .28rem .65rem; border-radius: 8px; background: var(--c); color: #fff; font-size: .8rem; font-weight: 700; }
.hd-rq-foot { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-top: .55rem; padding-top: .45rem; border-top: 1px dashed var(--border); font-size: .76rem; color: var(--muted); }

/* Helpdesk – termíny v detailu */
.hd-term { display: flex; align-items: flex-start; gap: .55rem; padding: .45rem 0; border-top: 1px solid var(--border); }
.hd-card h4 + .hd-term { border-top: 0; padding-top: 0; }
.hd-term-i { width: 22px; flex: none; text-align: center; }
.hd-term > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.hd-term b { font-size: .86rem; font-weight: 600; }
.hd-term small { font-size: .74rem; color: var(--muted); }
.hd-term.soon small { color: var(--warning); font-weight: 700; }
.hd-term.late b, .hd-term.late small { color: var(--danger); font-weight: 700; }
.hd-term.ok b { color: var(--success); }
.hd-term.muted b { color: var(--muted); font-weight: 500; }
/* Helpdesk – úprava vlastních zpráv */
.hd-edit-btn { margin-left: auto; padding: 0 .3rem; border: 0; background: none; color: var(--muted); font: inherit; font-size: .74rem; cursor: pointer; opacity: 0; transition: opacity .15s; }
.hd-msg:hover .hd-edit-btn, .hd-edit-btn:focus-visible { opacity: 1; }
.hd-edit-btn:hover { color: var(--primary); }
@media (hover: none) { .hd-edit-btn { opacity: 1; } }
.hd-edited-tag { font-size: .7rem; font-style: italic; color: var(--muted); }
.hd-edited-btn { padding: 0 .45rem; border: 0; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font: inherit; font-size: .7rem; font-weight: 700; cursor: pointer; }
.hd-edited-btn:hover, .hd-edited-btn[aria-expanded="true"] { background: var(--warning); color: #fff; }
.hd-edited-list { margin-top: .55rem; }
.hd-edited-item { padding: .45rem .6rem; margin-top: .35rem; border-left: 3px solid var(--warning); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.hd-edited-item small { display: block; margin-bottom: .2rem; color: var(--muted); font-size: .72rem; }
.hd-edited-item .hd-body { font-size: .84rem; color: var(--muted); }
.hd-edit-dlg { width: min(640px, calc(100vw - 2rem)); }
.hd-nav-btns a { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.hd-nav-btns svg { width: 20px; height: 20px; flex: none; }

/* Hlášky po akci – bublina v rohu, sama zmizí */
.toasts { position: fixed; z-index: 200; top: 1rem; right: 1rem; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; pointer-events: none; }
.toast { display: flex; align-items: center; gap: .6rem; max-width: 380px; padding: .6rem .6rem .6rem .95rem; border-radius: 12px; background: #1b2333; color: #fff; font-size: .9rem; font-weight: 600; box-shadow: 0 10px 30px rgba(16, 24, 40, .25); pointer-events: auto; animation: toast-in .2s ease-out; transition: opacity .3s, transform .3s; }
.toast::before { content: "✓"; display: grid; place-items: center; width: 20px; height: 20px; flex: none; border-radius: 50%; background: #2fa56b; font-size: .72rem; font-weight: 800; }
.toast-info::before { content: "i"; background: var(--primary); font-style: italic; }
.toast.hide { opacity: 0; transform: translateY(-8px); }
.toast-x { border: 0; background: none; color: #aab3c5; font-size: 1.1rem; line-height: 1; cursor: pointer; }
.toast-x:hover { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }
@media (max-width: 860px) {
    .toasts { top: calc(.6rem + env(safe-area-inset-top)); left: 1rem; right: 1rem; align-items: stretch; }
    .toast { max-width: none; }
}
/* Helpdesk – předdefinované odpovědi */
.hd-cmp-tabs { align-items: flex-end; }
.hd-rep-picker { position: relative; margin-left: auto; align-self: center; }
.hd-rep-btn { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; }
.hd-rep-btn:hover, .hd-rep-btn[aria-expanded="true"] { border-color: var(--primary); color: var(--primary); }
.hd-rep-btn .icon { width: 14px; height: 14px; }
.hd-rep-g { margin: 0 0 .3rem; font-size: 1rem; }
.hd-rep-sub { margin: .8rem 0 .3rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hd-rep { display: flex; align-items: center; gap: .75rem; padding: .5rem 0; border-top: 1px solid var(--border); }
.hd-rep-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hd-rep-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .8rem; }
.hd-rep-who { flex: none; font-size: .76rem; color: var(--muted); }
.hd-composer { overflow: visible; }
.hd-cmp-body { border-radius: 0 0 14px 14px; }
.hd-composer:not(:has(.hd-cmp-tabs)) .hd-cmp-body { border-radius: 14px; }
.hd-composer { position: relative; }
.hd-cmp-tabs span, .hd-rep-btn { white-space: nowrap; }
.hd-vars { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: .5rem 0 .3rem; font-size: .8rem; color: var(--muted); }
.hd-vars button { display: inline-flex; align-items: center; gap: .35rem; padding: .25rem .55rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .78rem; cursor: pointer; }
.hd-vars button:hover { border-color: var(--primary); color: var(--primary); }
.hd-vars code { padding: 0 .3rem; border-radius: 5px; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
/* Helpdesk – odpovědi: zařazení a správa skupin */
.hd-rep-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: .6rem .75rem; margin-bottom: .6rem; }
.hd-grp { padding: .35rem 0 .5rem; border-bottom: 1px solid var(--border); }
.hd-grp-row { display: flex; align-items: center; gap: .45rem; margin: .25rem 0; }
.hd-grp-row input[type=text] { flex: 1; min-width: 0; max-width: 360px; padding-top: .4rem; padding-bottom: .4rem; font-weight: 600; }
.hd-grp-sub { padding-left: 1.2rem; }
.hd-grp-sub input[type=text] { font-weight: 400; }
.hd-grp-arrow { color: var(--muted); }
.hd-grp-new input[type=text] { border-style: dashed; font-weight: 400; }
.hd-grp-row small { flex: none; min-width: 3.5rem; }
@media (max-width: 860px) {
    .hd-rep-form-grid { grid-template-columns: minmax(0, 1fr); }
    .hd-grp-row input[type=text], .hd-rep-form-grid select, .hd-rep-form-grid input { font-size: 16px; }
}
/* Helpdesk – knihovna odpovědí (varianta E): skupiny | odpovědi | náhled; mobil tři kroky */
.hd-cmp-tabs .hd-rep-btn { margin-left: auto; align-self: center; }
.hd-lib { width: min(1000px, calc(100vw - 2rem)); max-height: min(640px, calc(100vh - 2rem)); padding: 0; overflow: hidden; }
.hd-lib[open] { display: flex; flex-direction: column; }
.hd-lib-head { display: flex; align-items: center; gap: .75rem; padding: .75rem .9rem; border-bottom: 1px solid var(--border); }
.hd-lib-head h2 { margin: 0; font-size: 1.05rem; white-space: nowrap; }
.hd-lib-head input[type=search] { flex: 1; min-width: 0; padding: .5rem .75rem; font: inherit; font-size: .9rem; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.hd-lib-head input[type=search]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.hd-lib-x, .hd-lib-back { border: 0; background: none; font: inherit; cursor: pointer; }
.hd-lib-x { font-size: 1.2rem; color: var(--muted); }
.hd-lib-back { color: var(--primary); font-weight: 700; white-space: nowrap; }
.hd-lib-body { display: grid; grid-template-columns: 200px 250px minmax(0, 1fr); flex: 1; min-height: 360px; overflow: hidden; }
.hd-lib-groups { padding: .4rem; overflow-y: auto; background: var(--surface-2); border-right: 1px solid var(--border); }
.hd-lib-groups button { display: flex; align-items: center; justify-content: space-between; gap: .4rem; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; font-size: .88rem; text-align: left; cursor: pointer; }
.hd-lib-groups button.sub { padding-left: 1.3rem; font-size: .84rem; }
.hd-lib-groups button small { color: var(--muted); font-size: .74rem; }
.hd-lib-groups button:hover { background: var(--surface); }
.hd-lib-groups button.on { background: var(--surface); color: var(--primary); font-weight: 700; box-shadow: var(--shadow); }
.hd-lib-groups.dim button.on { background: none; box-shadow: none; color: var(--text); font-weight: 400; }
.hd-lib-groups hr { border: 0; border-top: 1px solid var(--border); margin: .35rem .3rem; }
.hd-lib-list { padding: .4rem; overflow-y: auto; border-right: 1px solid var(--border); }
.hd-lib-list button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: .5rem .6rem; border: 0; border-radius: 9px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.hd-lib-list button:hover { background: var(--surface-2); }
.hd-lib-list button.on { background: var(--primary-soft); color: var(--primary); }
.hd-lib-list button b { font-size: .9rem; font-weight: 600; }
.hd-lib-list button small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; color: var(--muted); }
.hd-lib-empty { padding: 1rem .6rem; color: var(--muted); font-size: .88rem; }
.hd-lib-prev { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.hd-lib-prev-in { flex: 1; overflow-y: auto; padding: .9rem 1.1rem; font-size: .9rem; line-height: 1.55; }
.hd-lib-prev-in .crumb { font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hd-lib-prev-in h3 { margin: .15rem 0 .6rem; font-size: 1.05rem; }
.hd-lib-prev-in mark { padding: 0 .2rem; border-radius: 4px; background: #fdf0a6; color: #1b2333; }
.hd-lib-prev-in p { margin: 0 0 .5rem; }
.hd-lib-foot { display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border-top: 1px solid var(--border); }
.hd-lib-foot .btn { margin-left: auto; }
.hd-lib-step { display: none; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted); }
.hd-lib-step button { border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer; }
.hd-lib-manage { display: inline-flex; align-items: center; gap: .3rem; font-size: .8rem; font-weight: 600; }
.hd-lib-manage .icon { width: 14px; height: 14px; }
@media (max-width: 860px) {
    .hd-lib { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
    .hd-lib-head { flex-wrap: wrap; padding-top: calc(.75rem + env(safe-area-inset-top)); }
    .hd-lib-head h2 { flex: 1; }
    .hd-lib-head input[type=search] { order: 5; flex-basis: 100%; font-size: 16px; }
    .hd-lib-body { grid-template-columns: minmax(0, 1fr); min-height: 0; }
    .hd-lib-groups, .hd-lib-list { border-right: 0; background: none; }
    .hd-lib-groups button, .hd-lib-list button { padding: .8rem .6rem; border-bottom: 1px solid var(--border); border-radius: 0; font-size: .98rem; }
    .hd-lib[data-step="1"] .hd-lib-list, .hd-lib[data-step="1"] .hd-lib-prev,
    .hd-lib[data-step="2"] .hd-lib-groups, .hd-lib[data-step="2"] .hd-lib-prev,
    .hd-lib[data-step="3"] .hd-lib-groups, .hd-lib[data-step="3"] .hd-lib-list { display: none; }
    .hd-lib[data-step="3"] .hd-lib-head input[type=search] { display: none; }
    .hd-lib-prev-in { font-size: .98rem; }
    .hd-lib-foot { flex-wrap: wrap; padding-bottom: calc(.8rem + env(safe-area-inset-bottom)); }
    .hd-lib-step { display: flex; width: 100%; justify-content: space-between; }
    .hd-lib-manage { display: none; }
    .hd-lib-foot .btn { flex: 1; justify-content: center; padding: .8rem; margin-left: 0; }
}
/* Malé štítky s vysvětlením po najetí myší (místo ikony zámku) */
.hd-mini { display: inline-block; padding: 0 .4rem; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: .66rem; font-weight: 700; line-height: 1.5; vertical-align: 1px; cursor: help; white-space: nowrap; }
.hd-mini.int { background: var(--hd-int-bg); border-color: var(--hd-int-border); color: var(--hd-int-ink); }
.hd-mini.shared { background: var(--primary-soft); border-color: transparent; color: var(--primary); }
/* Helpdesk – citace a smazání zprávy */
.hd-msg-acts { display: inline-flex; align-items: center; gap: .1rem; margin-left: auto; }
.hd-msg-acts .hd-edit-btn { margin-left: 0; }
.hd-del-form { display: inline; margin: 0; }
.hd-del-btn:hover { color: var(--danger) !important; }
.hd-msg.del .hd-bub { background: var(--surface-2); border-style: dashed; }
.hd-deleted { color: var(--muted); font-style: italic; font-size: .86rem; }
.hd-msg:hover .hd-msg-acts .hd-edit-btn { opacity: 1; }
/* Helpdesk – detail zadavatele přes celou šířku obsahu */
.hd-req-detail { max-width: none; }
.hd-req-detail .hd-grid { grid-template-columns: minmax(0, 1fr) 340px; }
@media (max-width: 1100px) { .hd-req-detail .hd-grid { grid-template-columns: minmax(0, 1fr) 290px; } }
.hd-req-detail .hd-side { order: 0; display: block; }
.hd-req-detail .hd-side .hd-card { margin-bottom: .75rem; }
/* Helpdesk – seznam zadavatele přes celou šířku, tlačítko Nový vedle záložek */
.hd-req { max-width: none; }
.hd-req-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: 1rem; }
.hd-req-bar .o2-tabs { margin: 0; }
.hd-req-bar .btn .icon { width: 16px; height: 16px; }
@media (max-width: 860px) { .hd-req-bar .btn { flex: 1; justify-content: center; } }
/* Helpdesk – bez otevřeného tiketu seznam přes celou šířku; ✕ Zavřít detail */
.hd:not(.has-ticket) { grid-template-columns: 76px minmax(0, 1fr); }
.hd:not(.has-ticket) .hd-view { display: none; }
.hd:not(.has-ticket) .hd-list { border-right: 0; }
.hd:not(.has-ticket) .hd-list-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.hd:not(.has-ticket) .hd-list-title { margin: 0; flex: 1; min-width: 200px; }
.hd:not(.has-ticket) .hd-search { flex: 2; min-width: 280px; max-width: 860px; }
.hd:not(.has-ticket) .hd-search select { width: 190px; }
.hd:not(.has-ticket) .hd-item { padding-top: .8rem; padding-bottom: .8rem; }
.hd-view { position: relative; }
.hd-view-close { position: sticky; top: 0; z-index: 5; float: right; margin: .6rem .8rem -2.4rem 0; padding: .3rem .7rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .8rem; font-weight: 700; box-shadow: var(--shadow); }
.hd-view-close:hover { color: var(--text); text-decoration: none; }
@media (max-width: 1150px) { .hd:not(.has-ticket) { grid-template-columns: 64px minmax(0, 1fr); } }
@media (max-width: 860px) { .hd-view-close { display: none; } .hd:not(.has-ticket) .hd-search { min-width: 0; } }
.hd-view-close { position: static; float: none; display: table; margin: .6rem 1.25rem -.4rem auto; }

/* =========================================================================
   Helpdesk – čas a náklady, soupisy práce
   ========================================================================= */
.hd-work-sum { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: .5rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.hd-work-sum span { display: flex; flex-direction: column; align-items: center; padding: .45rem .2rem; font-size: .68rem; color: var(--muted); }
.hd-work-sum span + span { border-left: 1px solid var(--border); }
.hd-work-sum strong { font-size: .98rem; color: var(--text); }
.hd-work-row { display: flex; align-items: center; gap: .3rem; padding: .4rem 0; border-top: 1px solid var(--border); }
.hd-work-row.off { opacity: .6; }
.hd-work-row form { margin: 0; }
.hd-work-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .8rem; }
.hd-work-t b { font-weight: 600; }
.hd-work-t small { color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; }
.hd-work-add { display: flex; gap: .4rem; margin-top: .55rem; }
.hd-work-add .btn .icon { width: 14px; height: 14px; }
.hd-work-dlg { width: min(560px, calc(100vw - 2rem)); }
.hd-work-kind { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem; margin-bottom: .75rem; }
.hd-work-kind label { cursor: pointer; }
.hd-work-kind input { position: absolute; opacity: 0; pointer-events: none; }
.hd-work-kind span { display: block; padding: .5rem; border: 1.5px solid var(--border); border-radius: 10px; text-align: center; font-weight: 600; font-size: .9rem; }
.hd-work-kind input:checked + span { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.hd-work-calc { margin: -.3rem 0 .6rem; font-size: .8rem; color: var(--primary); font-weight: 600; min-height: 1em; }
.hd-work-dlg[data-kind="cost"] [data-only="work"], .hd-work-dlg:not([data-kind="cost"]) [data-only="cost"] { display: none !important; }
.hd-fixed input { font-weight: 700; }
.hd-work-date { max-width: 240px; }
.hd-work-main .hd-tm { margin-bottom: .1rem; }
/* Účtování přímo v bloku (práce / částka / doprava) */
.hd-uc { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; margin-top: .6rem; padding-top: .55rem; border-top: 1px dashed var(--border); }
.hd-uc-t { font-size: .82rem; font-weight: 700; }
.hd-uc small { flex-basis: 100%; font-size: .78rem; }

.hd-month { display: inline-flex; align-items: center; gap: .6rem; }
.hd-month b { min-width: 120px; text-align: center; font-size: 1.05rem; }
.hd-month-side { justify-content: center; }
.hd-bill-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1.5rem; margin-bottom: 1rem; }
.hd-bill-stats { display: flex; gap: 1.5rem; }
.hd-bill-stats span { display: flex; flex-direction: column; align-items: flex-end; }
.hd-bill-stats small { font-size: .7rem; font-weight: 600; color: var(--muted); }
.hd-bill-stats b { font-size: 1.15rem; }
.hd-bill-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; }
.hd-bill-tile { display: flex; flex-direction: column; gap: .65rem; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); color: var(--text); }
.hd-bill-tile:hover { text-decoration: none; border-color: #b9c6e4; transform: translateY(-1px); }
.hd-bill-tile.invoiced { opacity: .6; }
.hd-bill-top { display: flex; align-items: center; gap: .7rem; }
.hd-bill-top > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.hd-bill-top b { font-size: .95rem; }
.hd-bill-top small { color: var(--muted); font-size: .76rem; }
.hd-bill-amt { font-size: 1.5rem; font-weight: 800; letter-spacing: -.01em; }
.hd-bill-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.hd-bill-without { margin-top: 1rem; font-size: .86rem; }
.hd-bill-without a { margin-right: .7rem; }
.hd-bill-total { display: flex; flex-direction: column; align-items: center; padding: .6rem; border-radius: 12px; background: var(--success-soft); }
.hd-bill-total small { font-size: .72rem; color: var(--success); font-weight: 700; }
.hd-bill-total b { font-size: 1.4rem; color: var(--success); }
.hd-bill-table { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.hd-bt { width: 100%; border-collapse: collapse; font-size: .84rem; }
.hd-bt th { padding: .5rem .6rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.hd-bt td { padding: .5rem .6rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.hd-bt tr:last-child td { border-bottom: 0; }
.hd-bt .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hd-bt td.when { white-space: nowrap; }
.hd-bt td.when b { display: block; }
.hd-bt td.when span { display: block; font-size: .74rem; color: var(--muted); }
.hd-bt tr.off td { color: var(--muted); }
.hd-bt tr.rec td { background: var(--surface-2); }
.hd-bt td.acts { white-space: nowrap; width: 1%; }
.hd-bt td.acts form { display: inline; margin: 0; }
.hd-bt td.acts .icon-btn { display: inline-grid; width: 28px; height: 28px; }
.hd-bt .hd-id { margin-left: .3rem; }
.hd-amounts { display: flex; flex-direction: column; gap: .4rem; }
.hd-amount-row { display: flex; align-items: center; gap: .75rem; }
.hd-amount-row span { flex: 1; font-weight: 600; font-size: .9rem; }
.hd-amount-row input { width: 160px !important; text-align: right; }
.hd-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: .6rem; align-items: end; }
.hd-recurring { margin-top: 1rem; }
.hd-rec-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; margin-bottom: .4rem; }
.hd-rec-row.off input[type=text] { color: var(--muted); }
.hd-rec-row input[type=text] { padding-top: .4rem; padding-bottom: .4rem; font-size: .86rem; }
.hd-rec-new { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.hd-rec-new input { border-style: dashed !important; }
.hd-rec-del { font-size: .74rem; color: var(--muted); white-space: nowrap; cursor: pointer; }
@media (max-width: 860px) {
    .hd-rates { grid-template-columns: 1fr 1fr; }
    .hd-rec-row { grid-template-columns: minmax(0, 1fr) 110px; }
    .hd-bill-stats { width: 100%; justify-content: space-between; }
    .hd-bill-stats span { align-items: flex-start; }
    .hd-work-dlg input, .hd-work-dlg select, .hd-rec-row input, .hd-rates input { font-size: 16px; }
}

/* Tisková podoba soupisu (A4 na šířku) */
.pr-body { background: #e9edf4; }
.pr-tools { display: flex; align-items: center; gap: .6rem; max-width: 1080px; margin: 1rem auto; padding: 0 1rem; }
.pr-page { max-width: 1080px; margin: 0 auto 2rem; padding: 2rem 2.2rem; background: #fff; color: #1b2333; border-radius: 6px; box-shadow: 0 8px 30px rgba(16, 24, 40, .1); font-size: 12px; }
.pr-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: .8rem; border-bottom: 3px solid #005eb8; }
.pr-logo { display: flex; align-items: center; gap: .5rem; }
.pr-logo img { height: 40px; }
.pr-logo .pr-word { height: 28px; }
.pr-title { text-align: right; }
.pr-title b { display: block; font-size: 20px; }
.pr-title span { color: #6b7486; font-size: 14px; }
.pr-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin: 1rem 0; line-height: 1.55; }
.pr-parties div { display: flex; flex-direction: column; }
.pr-parties small { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #6b7486; }
.pr-parties b { font-size: 13px; }
.pr-rates { padding: .45rem .7rem; background: #f4f6fa; border-radius: 6px; }
.pr-t { width: 100%; margin-top: .9rem; border-collapse: collapse; }
.pr-t th { padding: .4rem .35rem; background: #1b2333; color: #fff; font-size: 10.5px; text-align: left; }
.pr-t td { padding: .38rem .35rem; border-bottom: 1px solid #e3e7ef; vertical-align: top; }
.pr-t .r { text-align: right; white-space: nowrap; }
.pr-t tr.pr-rec td { background: #f8f9fc; }
.pr-t tfoot td { padding: .5rem .35rem; font-weight: 800; border-top: 2px solid #1b2333; border-bottom: 0; }
.pr-total { display: flex; justify-content: space-between; align-items: center; margin-top: .9rem; padding: .7rem .9rem; border-radius: 8px; background: #e3f5eb; font-size: 13px; }
.pr-total b { margin-left: .5rem; font-size: 18px; color: #1a7f4b; }
@media print {
    @page { size: A4 portrait; margin: 12mm 12mm 10mm; }   /* soupis práce (billing_print, A kompakt) */
    .pr-body { background: #fff; }
    .pr-tools { display: none; }
    .pr-page { max-width: none; margin: 0; padding: 0; box-shadow: none; border-radius: 0; }
    .pr-t tr { break-inside: avoid; }
    .pr-total, .pr-rates, .pr-t th, .pr-t tr.pr-rec td { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.hd-draft-note { margin: 0 0 .45rem; padding: .35rem .6rem; border-radius: 8px; background: var(--warning-soft); color: var(--warning); font-size: .8rem; font-weight: 600; }
.hd-item .hd-row > .hd-mini { flex: none; margin-left: .3rem; }
.hd-discard { font-size: 1rem; }
.hd-bill-tile.idle { opacity: .55; box-shadow: none; }
.hd-bill-tile.idle .hd-bill-amt { font-size: 1.1rem; color: var(--muted); }
.muted-s { color: var(--muted); font-size: .78rem; }

/* Okno zápisu práce – jednotná políčka a přepínač od–do / délka */
.hd-work-dlg input[type=date], .hd-work-dlg input[type=time], .hd-work-dlg input[type=text], .hd-work-dlg input[type=number] { width: 100%; height: 42px; padding: .5rem .7rem; font: inherit; font-size: .95rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.hd-work-dlg input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.hd-tm-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.hd-tm-sw { display: inline-flex; gap: .1rem; padding: .12rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); }
.hd-tm-sw button { padding: .1rem .5rem; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer; }
.hd-tm-sw button.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
.hd-tm-range { display: flex; align-items: center; gap: .4rem; }
.hd-tm-dash { color: var(--muted); }
@media (max-width: 860px) { .hd-work-dlg input[type=date], .hd-work-dlg input[type=time], .hd-work-dlg input[type=text], .hd-work-dlg input[type=number] { font-size: 16px; } }

.hd-time-wrap { position: relative; flex: 1; min-width: 0; }
.hd-time-list { max-height: 220px; overflow-y: auto; z-index: 60; }
.hd-time-list li { justify-content: space-between; padding: .35rem .6rem; font-variant-numeric: tabular-nums; }
.hd-time-list li small { color: var(--muted); font-size: .74rem; }
.hd-dur-chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.hd-dur-chips button { padding: .2rem .55rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .76rem; cursor: pointer; }
.hd-dur-chips button:hover { border-color: var(--primary); color: var(--primary); }

/* Okno zápisu práce – blok Doprava / Náklad */
.hd-work-box { margin: .2rem 0 .8rem; padding: .6rem .8rem .5rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.hd-work-box legend { padding: 0 .35rem; font-weight: 700; font-size: .9rem; }
.hd-work-box legend small { font-weight: 400; color: var(--muted); font-size: .76rem; }
.hd-work-trip { display: grid; grid-template-columns: 110px 140px minmax(0, 1fr); gap: .5rem; align-items: end; }
.hd-work-trip .field { margin: 0 !important; }
.hd-suffix { position: relative; display: block; }
.hd-suffix input { padding-right: 2.2rem !important; }
.hd-suffix i { position: absolute; right: .65rem; top: 50%; transform: translateY(-50%); font-style: normal; font-size: .8rem; color: var(--muted); pointer-events: none; }
.hd-work-trip-calc { margin: .4rem 0 0; min-height: 1em; font-size: .8rem; font-weight: 600; color: var(--primary); }
@media (max-width: 520px) { .hd-work-trip { grid-template-columns: 1fr 1fr; } .hd-work-note { grid-column: 1 / -1; } }
.hd-bt .hd-cell-sub { display: block; font-size: .72rem; color: var(--muted); font-weight: 400; }

.hd-work-err { margin: 0 0 .7rem; padding: .5rem .75rem; border-radius: 9px; background: var(--danger-soft); color: var(--danger); font-size: .85rem; font-weight: 600; }
.hd-work-dlg input.hd-invalid { border-color: var(--danger) !important; box-shadow: 0 0 0 3px var(--danger-soft) !important; }
/* Soupis – sazby sbalené do jednoho řádku */
.hd-settings { padding: .7rem 1.1rem; }
.hd-settings summary { display: flex; align-items: center; justify-content: space-between; gap: .75rem; list-style: none; cursor: pointer; }
.hd-settings summary::-webkit-details-marker { display: none; }
.hd-settings-sum { display: flex; align-items: center; gap: .5rem; min-width: 0; font-size: .86rem; color: var(--muted); }
.hd-settings-sum .icon { width: 16px; height: 16px; flex: none; }
.hd-settings-sum b { color: var(--text); font-weight: 600; }
.hd-settings[open] .hd-settings-edit { visibility: hidden; }
.hd-settings-body { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--border); }
.hd-work-row.draft, .hd-bt tr.draft td { background: var(--hd-int-bg); }
.hd-work-row.draft { padding-left: .4rem; padding-right: .4rem; border-radius: 8px; }
.hd-work-t .hd-mini { align-self: flex-start; margin-bottom: .15rem; }
.hd-mini-warn { margin: 0; padding: .45rem .6rem; border-radius: 9px; background: var(--warning-soft); color: var(--warning); font-size: .8rem; font-weight: 600; text-align: center; }
.hd-work-acts { flex-wrap: wrap; }
.hd-work-acts .btn-primary { margin-left: auto; }
.hd-settings.unsaved:not([open]) { background: var(--warning-soft); border-color: transparent; }
.hd-settings.unsaved .hd-settings-sum, .hd-settings.unsaved .hd-settings-sum b { color: var(--warning); }
.pr-t small { color: #6b7486; font-size: 9.5px; }
.pr-logo .pr-full { height: 58px; }

/* Okno zápisu – sleva skrytá za „🏷 Sleva“, v jednom kompaktním řádku */
.hd-calc-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 1.6rem; margin: -.3rem 0 .5rem; }
.hd-calc-row p { margin: 0 !important; }
.hd-work-box .hd-calc-row { margin: .4rem 0 0; }
.hd-disc-toggle { flex: none; margin-left: auto; padding: .15rem .55rem; border: 1px dashed var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: .76rem; font-weight: 600; cursor: pointer; }
.hd-disc-toggle:hover { border-color: var(--primary); color: var(--primary); }
.hd-disc-line { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; padding: .35rem .5rem; border-radius: 10px; background: var(--primary-soft); }
.hd-work-box .hd-disc-line { margin: .45rem 0 0; }
.hd-disc-label { flex: 1; min-width: 0; font-size: .82rem; font-weight: 600; }
.hd-disc-line input[type=text] { width: 80px !important; height: 34px !important; text-align: right; }
.hd-disc-line select { width: 64px; height: 34px; padding: .2rem .4rem; font-size: .85rem; }
.hd-disc-x { border: 0; background: none; color: var(--muted); font-size: .95rem; cursor: pointer; }
.hd-disc-x:hover { color: var(--danger); }
/* PDF – souhrn: cena před slevou, slevy, k fakturaci */
.pr-sum { width: 360px; margin: 1rem 0 0 auto; border: 1px solid #e3e7ef; border-radius: 8px; overflow: hidden; font-size: 12.5px; }
.pr-sum-row { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem .8rem; border-top: 1px solid #e3e7ef; }
.pr-sum-row:first-child { border-top: 0; }
.pr-sum-row b { font-variant-numeric: tabular-nums; }
.pr-disc { color: #c0352b; }
.pr-final { background: #e3f5eb; font-weight: 700; }
.pr-final b { font-size: 17px; color: #1a7f4b; }
@media print { .pr-final, .pr-sum { -webkit-print-color-adjust: exact; print-color-adjust: exact; } .pr-sum { break-inside: avoid; } }
/* Způsob účtování (paušál) */
.hd-mode { grid-column: 1 / -1; }
.hd-mode .opt-chips { margin: 0 0 .6rem; }
.hd-mode .hd-flat-field { max-width: 260px; }
.hd-mode p.hd-flat-field { max-width: none; margin: 0 0 .6rem; }
.hd-mode:not(:has([value="flat"]:checked)) .hd-flat-field { display: none; }

/* Helpdesk – schvalování: karta řešitele jako semafor (oranžová čeká · zelená schváleno · červená zamítnuto) */
.hd-appr { --c: var(--hd-ap-wait); --cb: var(--hd-ap-wait-bg); --cl: var(--hd-ap-wait-border); padding: 0; overflow: hidden; border: 2px solid var(--cl); background: var(--cb); }
.hd-appr.is-ok { --c: var(--hd-ap-ok); --cb: var(--hd-ap-ok-bg); --cl: var(--hd-ap-ok-border); }
.hd-appr.is-no { --c: var(--hd-ap-no); --cb: var(--hd-ap-no-bg); --cl: var(--hd-ap-no-border); }
.hd-appr-head { display: flex; align-items: center; gap: .4rem; padding: .55rem .9rem; background: var(--c); color: #fff; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; list-style: none; cursor: pointer; }
.hd-appr-head::-webkit-details-marker { display: none; }
.hd-appr-head .link-btn { margin-left: auto; color: #fff; }
.hd-appr-sum { margin-left: auto; font-size: .72rem; font-weight: 600; text-transform: none; letter-spacing: 0; opacity: .9; }
.hd-appr-chev { display: grid; place-items: center; transition: transform .15s; }
.hd-appr-chev .icon { width: 16px; height: 16px; }
.hd-appr:not([open]) .hd-appr-chev { transform: rotate(-90deg); }
.hd-appr[open] .hd-appr-sum { display: none; }
.hd-appr[open] .hd-appr-chev { margin-left: auto; }
.hd-appr-dot { width: 9px; height: 9px; flex: none; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .3); }
.hd-appr-st { margin: 0; padding: .55rem .9rem .35rem; font-size: .84rem; font-weight: 700; color: var(--c); }
.hd-appr-q { margin: 0 .9rem .5rem; padding: .45rem .6rem; border-radius: 8px; background: var(--surface); font-size: .84rem; max-height: 9rem; overflow: auto; }
.hd-appr-q > :first-child { margin-top: 0; } .hd-appr-q > :last-child { margin-bottom: 0; }
.hd-appr-row { display: flex; align-items: center; gap: .5rem; margin: 0 .9rem; padding: .4rem 0; border-top: 1px solid rgba(0, 0, 0, .08); }
.hd-appr-nm { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.hd-appr-nm b { font-size: .85rem; }
.hd-appr-nm small { color: var(--muted); font-size: .74rem; overflow-wrap: anywhere; }
.hd-appr-res { font-size: .95rem; }
.hd-appr-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem .6rem; padding: .5rem .9rem .65rem; font-size: .76rem; color: var(--muted); }
.hd-appr-foot form { display: inline; margin: 0; }
.hd-appr-hint { padding: .1rem .55rem; border: 1px dashed var(--hd-ap-wait-border); border-radius: 999px; background: var(--hd-ap-wait-bg); color: var(--hd-ap-wait); font: inherit; font-size: .72rem; font-weight: 700; cursor: pointer; }
.hd-ib.hd-ib-appr { border-color: var(--hd-ap-wait-border); background: var(--hd-ap-wait-bg); color: var(--hd-ap-wait); }
.hd-ib.hd-ib-ok { border-color: var(--hd-ap-ok-border); background: var(--hd-ap-ok-bg); color: var(--hd-ap-ok); }
.hd-ib.hd-ib-no { border-color: var(--hd-ap-no-border); background: var(--hd-ap-no-bg); color: var(--hd-ap-no); }
.hd-ib { position: relative; }
.hd-ib-n { position: absolute; top: -5px; right: -5px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: var(--hd-ap-wait); color: #fff; font-size: .62rem; line-height: 16px; text-align: center; }
.hd-jump-flash { animation: hdJump 1.2s ease; }
@keyframes hdJump { 0%, 40% { box-shadow: 0 0 0 4px var(--hd-ap-wait-border); } 100% { box-shadow: var(--shadow); } }
/* okno „Požádat o schválení“ */
.hd-appr-dlg { width: min(560px, 100%); }
.hd-appr-pick { display: flex; flex-direction: column; gap: .4rem; }
.hd-appr-pick .hd-search-box { width: 100%; }
.hd-appr-list { max-height: 13.5rem; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.hd-appr-opt { display: flex; align-items: center; gap: .55rem; padding: .45rem .65rem; border-top: 1px solid var(--border); cursor: pointer; }
.hd-appr-opt:first-child { border-top: 0; }
.hd-appr-opt:hover { background: var(--surface-2); }
.hd-appr-opt:has(input:checked) { background: var(--primary-soft); }
.hd-appr-opt input { flex: none; margin: 0; }
.hd-appr-opt-t { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.hd-appr-opt-t b { font-size: .88rem; }
.hd-appr-opt-t small { color: var(--muted); font-size: .74rem; }
.hd-appr-list .hd-muted { margin: 0; padding: .6rem; }
/* karta schvalovatele */
.hd-appr-ask { margin-bottom: 1rem; padding: 1.1rem 1.2rem; border: 2px solid var(--hd-ap-wait-border); border-radius: 16px; background: var(--surface); box-shadow: 0 0 0 4px var(--hd-ap-wait-bg); }
.hd-appr-ask.is-ok { border-color: var(--hd-ap-ok-border); box-shadow: 0 0 0 4px var(--hd-ap-ok-bg); }
.hd-appr-ask.is-no { border-color: var(--hd-ap-no-border); box-shadow: 0 0 0 4px var(--hd-ap-no-bg); }
.hd-appr-ask.is-off { border-color: var(--border); box-shadow: var(--shadow); }
.hd-appr-k { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--hd-ap-wait); }
.hd-appr-ask.is-ok .hd-appr-k { color: var(--hd-ap-ok); } .hd-appr-ask.is-no .hd-appr-k { color: var(--hd-ap-no); } .hd-appr-ask.is-off .hd-appr-k { color: var(--muted); }
.hd-appr-k .icon { width: 15px; height: 15px; }
.hd-appr-ask h2 { margin: .3rem 0 .7rem; font-size: 1.2rem; }
.hd-appr-ask-q { margin: .7rem 0 .8rem; padding: .75rem .9rem; border-radius: 10px; background: var(--surface-2); font-size: .95rem; }
.hd-appr-ask-q > :first-child { margin-top: 0; } .hd-appr-ask-q > :last-child { margin-bottom: 0; }
.hd-appr-ask textarea { width: 100%; }
.hd-appr-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin: .7rem 0 .6rem; }
.hd-appr-btns .btn { justify-content: center; padding: .7rem; font-size: 1rem; border-radius: 11px; }
.hd-appr-yes { background: var(--hd-ap-ok); border-color: var(--hd-ap-ok); color: #fff; }
.hd-appr-yes:hover { filter: brightness(.93); }
.hd-appr-noBtn { background: var(--surface); border: 1.5px solid var(--hd-ap-no); color: var(--hd-ap-no); }
.hd-appr-noBtn:hover { background: var(--hd-ap-no-bg); }
.hd-appr-mine { margin: 0 0 .4rem; font-size: .88rem; }
.hd-appr-ask .hd-muted { margin: 0; font-size: .8rem; }
.hd-appr-page { max-width: 760px; }
.hd-cat-appr { display: flex; align-items: center; cursor: pointer; }
.hd-cat-appr input { position: absolute; opacity: 0; pointer-events: none; }
.hd-cat-appr span { padding: .2rem .4rem; border: 1px solid var(--border); border-radius: 8px; filter: grayscale(1); opacity: .45; }
.hd-cat-appr input:checked + span { border-color: var(--hd-ap-wait-border); background: var(--hd-ap-wait-bg); filter: none; opacity: 1; }
.hd-cat-appr input:focus-visible + span { outline: 2px solid var(--primary); }
@media (max-width: 860px) { .hd-appr-ask textarea, .hd-appr-pick input[type=search], .hd-appr-dlg textarea { font-size: 16px; } .hd-appr-ask { padding: .95rem; } }
/* Helpdesk – průběh požadavku u zadavatele: kolečka spojená čarou, hotové ✓, aktuální zvýrazněný; oranžově, když se čeká na zadavatele */
.hd-prog { --pc: var(--primary); --ps: var(--primary-soft); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: -.25rem 0 1rem; padding: 1rem .5rem .9rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.hd-prog.need { --pc: var(--hd-ap-wait); --ps: var(--hd-ap-wait-bg); }
.hd-prog-st { position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 0 .3rem; text-align: center; }
.hd-prog-st::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 4px; background: var(--border); }
.hd-prog-st:first-child::before { display: none; }
.hd-prog-st.done::before, .hd-prog-st.now::before { background: var(--primary); }
.hd-prog-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--border); background: var(--surface); color: var(--muted); font-size: .9rem; font-weight: 800; }
.hd-prog-st.done .hd-prog-dot { border-color: var(--primary); background: var(--primary); color: #fff; }
.hd-prog-st.now .hd-prog-dot { width: 44px; height: 44px; margin-top: -3px; border-color: var(--pc); background: var(--pc); color: #fff; box-shadow: 0 0 0 6px var(--ps); }
.hd-prog-st b { font-size: .9rem; }
.hd-prog-st.now b { color: var(--pc); }
.hd-prog-st.todo b { color: var(--muted); font-weight: 600; }
.hd-prog-st small { color: var(--muted); font-size: .75rem; line-height: 1.3; }
@media (max-width: 600px) {
    .hd-prog { padding: .8rem .2rem .7rem; }
    .hd-prog-st { padding: 0 .15rem; }
    .hd-prog-st::before { top: 14px; }
    .hd-prog-dot { width: 32px; height: 32px; font-size: .8rem; }
    .hd-prog-st.now .hd-prog-dot { width: 36px; height: 36px; margin-top: -2px; box-shadow: 0 0 0 4px var(--ps); }
    .hd-prog-st b { font-size: .76rem; }
    .hd-prog-st small { font-size: .66rem; }
}
/* Helpdesk – sbalovací karta v pravém panelu tiketu (Čas a náklady): záhlaví jako u ostatních karet + šipka, sbalená ukáže souhrn */
.hd-fold > summary { list-style: none; cursor: pointer; }
.hd-fold > summary::-webkit-details-marker { display: none; }
.hd-fold-head { display: flex; align-items: center; gap: .4rem; margin: 0 0 .6rem; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hd-fold:not([open]) .hd-fold-head { margin-bottom: 0; }
.hd-fold-head > .icon { width: 14px; height: 14px; }
.hd-fold-head .hd-lock { margin-left: auto; }
.hd-fold-sum { display: none; margin-left: auto; font-size: .76rem; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--text); white-space: nowrap; }
.hd-fold:not([open]) .hd-fold-sum { display: inline; }
.hd-fold:not([open]) .hd-lock { display: none; }
.hd-fold-chev { display: grid; place-items: center; transition: transform .15s; }
.hd-fold-chev .icon { width: 16px; height: 16px; }
.hd-fold:not([open]) .hd-fold-chev { transform: rotate(-90deg); }
/* Helpdesk – připomínky: karta v pravém panelu, okno nastavení, štítek v seznamu */
.hd-rem-empty { margin: 0; font-size: .8rem; }
.hd-rem-row { display: flex; align-items: flex-start; gap: .5rem; padding: .45rem 0; border-top: 1px solid var(--border); }
.hd-rem-row:first-of-type { border-top: 0; padding-top: 0; }
.hd-rem-ic { font-size: 1rem; line-height: 1.35; }
.hd-rem-t { display: flex; flex: 1; flex-direction: column; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
button.hd-rem-t { cursor: pointer; }
button.hd-rem-t:hover b { color: var(--primary); }
.hd-rem-t b { font-size: .87rem; }
.hd-rem-t small { color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.hd-rem-row.today .hd-rem-t b { color: #c2410c; }
.hd-rem-row.sent { opacity: .55; }
.hd-rem-row form { margin: 0; }
.hd-rem-dlg { width: min(500px, 100%); }
.hd-rem-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.hd-rem-chips button { padding: .38rem .7rem; border: 1.5px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .84rem; font-weight: 600; cursor: pointer; }
.hd-rem-chips button.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.hd-rem-dt { gap: .5rem; }
.hd-rem-when { margin: .45rem 0 0; padding: .45rem .7rem; border-radius: 9px; background: var(--surface-2); font-size: .84rem; }
.hd-rem-when.bad { background: var(--danger-soft); color: var(--danger); }
.hd-rem-who { display: flex; flex-direction: column; max-height: 13rem; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.hd-rem-who label { display: flex; align-items: center; gap: .55rem; padding: .45rem .65rem; border-top: 1px solid var(--border); font-size: .88rem; cursor: pointer; }
.hd-rem-who label:first-child { border-top: 0; }
.hd-rem-who label:has(input:checked) { background: var(--primary-soft); }
.hd-rem-who small { margin-left: auto; color: var(--muted); font-size: .74rem; }
.hd-rem-tag { display: inline-flex; align-items: center; padding: 0 .45rem; border-radius: 6px; background: #ffedd5; color: #c2410c; font-size: .7rem; font-weight: 700; white-space: nowrap; }
@media (max-width: 860px) { .hd-rem-dlg input[type=date], .hd-rem-dlg input[type=time], .hd-rem-dlg input[type=text] { font-size: 16px; } }
.hd-from-msg { margin: 0 0 1rem; padding: .65rem .9rem; border: 1px solid var(--hd-ap-wait-border); border-radius: 12px; background: var(--hd-ap-wait-bg); font-size: .88rem; }
a.hd-edit-btn { text-decoration: none; }
/* Helpdesk – sloučení tiketů */
.hd-merge-dlg { width: min(580px, 100%); }
.hd-merge-sec { margin: .9rem 0 .35rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hd-merge-dlg .hd-search-box { width: 100%; }
.hd-merge-list { display: flex; flex-direction: column; max-height: 14rem; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.hd-merge-list:empty { display: none; }
.hd-merge-dlg .hd-search-box + .hd-merge-list { margin-top: .4rem; }
.hd-merge-opt { display: flex; align-items: flex-start; gap: .55rem; padding: .5rem .7rem; border: 0; border-top: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.hd-merge-opt:first-child { border-top: 0; }
.hd-merge-opt:hover { background: var(--surface-2); }
.hd-merge-opt.on { background: var(--primary-soft); }
.hd-merge-opt span { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.hd-merge-opt b { font-size: .88rem; }
.hd-merge-opt small { color: var(--muted); font-size: .75rem; }
.hd-merge-opt i { padding: 0 .4rem; border-radius: 5px; background: #ffedd5; color: #c2410c; font-size: .68rem; font-style: normal; font-weight: 700; white-space: nowrap; }
.hd-merge-empty { margin: 0; padding: .6rem .7rem; color: var(--muted); font-size: .84rem; }
.hd-merge-dir { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: .5rem; align-items: center; margin-top: 1rem; padding: .7rem; border-radius: 12px; background: var(--surface-2); }
.hd-merge-tk { padding: .5rem .65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: .8rem; overflow-wrap: anywhere; }
.hd-merge-tk.main { border: 2px solid var(--primary); }
.hd-merge-tk small { display: block; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .04em; }
.hd-merge-tk b { display: block; font-size: .86rem; }
.hd-merge-arr { font-size: 1.3rem; color: var(--muted); }
.hd-merge-swap { display: block; margin: .45rem auto 0; }
.hd-merge-what { margin: .8rem 0 0; padding: 0; list-style: none; font-size: .84rem; }
.hd-merge-what li { padding: .12rem 0; }
.hd-merge-warn { margin: .7rem 0 0; padding: .5rem .7rem; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: .84rem; font-weight: 600; }
.hd-merged-banner { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-bottom: 1rem; padding: .75rem .95rem; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .9rem; }
.hd-merged-banner > span:nth-child(2) { flex: 1; min-width: 200px; }
.hd-merged-row { margin: 0 0 .35rem; font-size: .85rem; }
.hd-merged-row small { display: block; color: var(--muted); font-size: .74rem; }
.hd-tag-from { padding: 0 .45rem; border-radius: 6px; background: #eeedfe; color: #4c3fc0; font-size: .68rem; font-weight: 700; }
@media (max-width: 860px) { .hd-merge-dlg input[type=search] { font-size: 16px; } }
/* Helpdesk – nepřevzatý tiket v seznamu řešitele: výrazný červený štítek s dobou čekání a proužek vlevo */
.hd-pill-queue { background: var(--danger); color: #fff; }
.hd-pill-queue::before { background: #fff; animation: hdPulse 1.6s ease-in-out infinite; }
@keyframes hdPulse { 50% { opacity: .35; } }
.hd-item.queue { box-shadow: inset 4px 0 0 var(--danger); }
.hd-item.queue .hd-subj { font-weight: 800; }
@media (prefers-reduced-motion: reduce) { .hd-pill-queue::before { animation: none; } }
/* Helpdesk – formulář napasovaný na požadavek (nový tiket) a jeho údaje v zadání */
.hd-form-box { margin-bottom: .4rem; }
.hd-form-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0 .9rem; }
.hd-form-grid > .field { min-width: 0; }
.hd-form-sec { margin: .4rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border); font-size: .95rem; }
.hd-form-sec small { font-weight: 400; }
.hd-form-grid .opt-chips { margin: 0; }
.hd-req-mark { color: var(--danger); }   /* hvězdička povinného pole ve formuláři (pozor: .hd-req = stránka zadavatele) */
.hd-form-data { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); gap: .3rem .9rem; margin: 0 0 .6rem; padding: .6rem .75rem; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: .88rem; }
.hd-form-data dt { color: var(--muted); }
.hd-form-data dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; white-space: pre-line; }
.hd-form-data .hd-form-name { grid-column: 1 / -1; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
@media (max-width: 600px) { .hd-form-data { grid-template-columns: minmax(0, 1fr); gap: .05rem; } .hd-form-data dd { margin-bottom: .35rem; } }
/* Helpdesk – checklist úkolů v tiketu */
.hd-tasks-n { margin-left: auto; padding: 0 .45rem; border-radius: 6px; background: var(--success-soft); color: var(--success); font-size: .72rem; text-transform: none; letter-spacing: 0; }
.hd-tasks-bar { display: block; width: 100%; height: 6px; margin: -.15rem 0 .5rem; border: 0; border-radius: 6px; background: var(--border); overflow: hidden; -webkit-appearance: none; appearance: none; }
.hd-tasks-bar::-webkit-progress-bar { background: var(--border); border-radius: 6px; }
.hd-tasks-bar::-webkit-progress-value { background: var(--success); border-radius: 6px; }
.hd-tasks-bar::-moz-progress-bar { background: var(--success); border-radius: 6px; }
.hd-tasks-sum { margin: 0; font-size: .84rem; }
.hd-task { display: flex; align-items: flex-start; gap: .5rem; padding: .35rem 0; border-top: 1px solid var(--border); font-size: .86rem; }
.hd-task:first-of-type { border-top: 0; }
.hd-task-chk { margin: 0; padding-top: .1rem; }
.hd-task-chk input { width: 17px; height: 17px; margin: 0; accent-color: var(--success); cursor: pointer; }
.hd-task-t { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hd-task-t small { display: block; color: var(--muted); font-size: .72rem; }
.hd-task.done .hd-task-t { color: var(--muted); opacity: .6; }   /* hotové jen světlejší (bez přeškrtnutí – špatně se čte), zelená fajfka */
.hd-task-menu { position: relative; }
.hd-task-menu summary { list-style: none; padding: 0 .35rem; border-radius: 6px; color: var(--muted); font-weight: 700; cursor: pointer; }
.hd-task-menu summary::-webkit-details-marker { display: none; }
.hd-task-menu summary:hover { background: var(--surface-2); }
.hd-task-menu > div { position: absolute; right: 0; top: 1.6rem; z-index: 20; display: flex; flex-direction: column; gap: .4rem; width: 210px; padding: .55rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.hd-task-menu form { margin: 0; }
.hd-task-menu select { width: 100%; font-size: .84rem; }
.hd-task-add { display: flex; gap: .35rem; margin-top: .5rem; }
.hd-task-add input { flex: 1; min-width: 0; font-size: .84rem; }
.hd-task-tag { display: inline-flex; align-items: center; padding: 0 .45rem; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.hd-task-tag.ok { background: var(--success-soft); border-color: transparent; color: var(--success); }
@media (max-width: 860px) { .hd-task-add input { font-size: 16px; } }
/* Helpdesk → Formuláře */
.hd-forms { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .75rem; }
.hd-form-card { display: flex; flex-direction: column; gap: .3rem; min-width: 0; color: var(--text); }
.hd-form-card:hover { text-decoration: none; border-color: var(--primary); }
.hd-form-card.off { opacity: .65; }
.hd-form-card > small { color: var(--muted); }
.hd-form-cats { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .3rem; font-size: .8rem; }
.hd-form-cats .org-tag { max-width: 100%; margin: 0; border-radius: 10px; white-space: normal; overflow-wrap: anywhere; }
.hd-ff { max-width: 900px; }
.hd-ff textarea { width: 100%; }
.hd-ff-list { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .55rem; margin-bottom: .7rem; }
.hd-ff-row { display: flex; flex-direction: column; gap: .35rem; min-width: 0; padding: .5rem .55rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.hd-ff-row.is-heading { background: var(--primary-soft); border-color: transparent; }
.hd-ff-row.dragging { opacity: .55; outline: 2px dashed var(--primary); }
.hd-ff-top { display: flex; align-items: center; gap: .3rem; }
.hd-ff-top input { flex: 1; min-width: 0; font-weight: 600; }
.hd-ff-drag { padding: 0 .25rem; border: 0; background: none; color: var(--muted); font-size: 1.05rem; cursor: grab; touch-action: none; }
.hd-ff-drag:active { cursor: grabbing; }
.hd-ff-props { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .45rem; }
.hd-ff-props select { width: auto; flex: 1 1 90px; min-width: 0; font-size: .8rem; padding-top: .3rem; padding-bottom: .3rem; }
.hd-ff-row input[type=text] { font-size: .84rem; }
.hd-ff-row.is-heading .hd-ff-req, .hd-ff-row.is-heading [data-ff-width] { display: none; }
.hd-ff-req { display: flex; align-items: center; gap: .3rem; font-size: .78rem; white-space: nowrap; }
:is(.hd-ff-list, .hd-form-grid) > .w-full { grid-column: span 6; } :is(.hd-ff-list, .hd-form-grid) > .w-two { grid-column: span 4; }
:is(.hd-ff-list, .hd-form-grid) > .w-half { grid-column: span 3; } :is(.hd-ff-list, .hd-form-grid) > .w-third { grid-column: span 2; }
.hd-ff-chips { display: inline-flex; flex-wrap: wrap; gap: .3rem; }
.hd-ff-chips button { padding: .1rem .5rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); font: inherit; font-size: .78rem; cursor: pointer; }
.hd-ff-chips button:hover { border-color: var(--primary); color: var(--primary); }
.hd-ff-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem 1.2rem; }
.hd-ff-cat { display: flex; align-items: flex-start; gap: .45rem; padding: .2rem 0; font-size: .88rem; cursor: pointer; }
.hd-ff .form-actions .sp { flex: 1; }
@media (max-width: 700px) { .hd-ff-list, .hd-form-grid { grid-template-columns: minmax(0, 1fr); } .hd-ff-list > *, .hd-form-grid > * { grid-column: auto !important; } }
.hd-ff-acts { display: flex; flex-wrap: wrap; gap: .4rem; }
.hd-ff-prev { width: min(720px, 100%); }
.hd-ff-prev-note { margin: 0 0 .8rem; padding: .5rem .7rem; border-radius: 9px; background: var(--hd-ap-wait-bg); color: var(--hd-ap-wait); font-size: .82rem; font-weight: 600; }
.hd-ff-prev input[readonly] { background: var(--surface-2); }
.hd-task-ro { align-items: center; }
.hd-task-mark { display: grid; place-items: center; width: 18px; height: 18px; flex: none; border: 2px solid var(--border); border-radius: 5px; color: #fff; font-size: .7rem; font-weight: 800; }
.hd-task-ro.done .hd-task-mark { border-color: var(--success); background: var(--success); }
.hd-tasks-sum { margin: .45rem 0 0; font-size: .8rem; }
.hd-ff-prev-after { margin-top: 1rem; background: var(--surface-2); color: var(--muted); }
.hd-ff-prev .hd-tasks { max-width: 360px; }
.hd-ff-vars button { border-style: dashed; }
.hd-ff-legend > summary { list-style: none; cursor: pointer; }
.hd-ff-legend > summary::-webkit-details-marker { display: none; }
.hd-ff-legend:not([open]) .o2-h { margin-bottom: 0; }
.hd-ff-legend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.6rem; }
.hd-ff-legend h4 { margin: .2rem 0 .4rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.hd-ff-legend dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .25rem .8rem; margin: 0 0 .8rem; font-size: .85rem; }
.hd-ff-legend dt { font-weight: 700; }
.hd-ff-legend dd { margin: 0; color: var(--muted); }
.hd-ff-legend code { padding: 0 .3rem; border-radius: 5px; background: var(--surface-2); }
@media (max-width: 700px) { .hd-ff-legend-grid { grid-template-columns: minmax(0, 1fr); } }
button.hd-task-tag { font-family: inherit; line-height: 1.6; cursor: pointer; }
button.hd-task-tag:hover { border-color: var(--success); }
/* Checklist v zadání vedle údajů z formuláře */
.hd-first-grid { display: grid; gap: .6rem; margin-bottom: .6rem; }
.hd-first-grid.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
.hd-first-grid .hd-form-data { margin: 0; }
.hd-first-grid .hd-tasks, .hd-task-new .hd-tasks { margin: 0; box-shadow: none; }
.hd-task-new { margin-top: .5rem; }
.hd-task-new:not([open]) { display: none; }   /* otevírá ikona v liště tiketu */
.hd-task-new > summary { display: inline-block; list-style: none; padding: .15rem .55rem; border: 1px dashed var(--border); border-radius: 8px; font-size: .78rem; font-weight: 600; color: var(--muted); cursor: pointer; }
.hd-task-new > summary::-webkit-details-marker { display: none; }
.hd-task-new[open] > summary { margin-bottom: .5rem; }
.hd-msg-first .hd-bub { container-type: inline-size; }
@container (max-width: 620px) { .hd-first-grid.two { grid-template-columns: minmax(0, 1fr); } }
/* Helpdesk – lišta: ⚙ Nastavení s nabídkou; mobil: přepínač Fronta · Moje · Vše · ⋯ */
.hd-rail-set { position: relative; }
.hd-rail-set > summary { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .45rem .1rem; border-radius: 12px; color: var(--muted); font-size: .62rem; font-weight: 700; text-align: center; line-height: 1.15; list-style: none; cursor: pointer; }
.hd-rail-set > summary::-webkit-details-marker { display: none; }
.hd-rail-set > summary:hover, .hd-rail-set[open] > summary { background: var(--surface); color: var(--text); }
.hd-rail-pop { position: fixed; z-index: 60;   /* pozici dopočítá app.js – lišta i .hd mají overflow: hidden */ display: flex; flex-direction: column; width: 230px; padding: .35rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.hd-rail .hd-rail-pop a { flex-direction: row; align-items: center; gap: .55rem; padding: .5rem .6rem; border-radius: 8px; color: var(--text); font-size: .86rem; font-weight: 600; text-align: left; }
.hd-rail-pop a span { display: flex; flex-direction: column; }
.hd-rail-pop small { color: var(--muted); font-size: .72rem; font-weight: 500; }
.hd-mnav { display: none; }
.hd-set-tabs { margin-bottom: 1rem; }
@media (max-width: 860px) {
    .hd .hd-rail { display: none; }
    .hd-mnav { display: flex; gap: 2px; margin: 0 0 .6rem; padding: 3px; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); }
    .hd-mnav a, .hd-mnav button { display: flex; flex: 1; align-items: center; justify-content: center; gap: .25rem; min-width: 0; padding: .45rem .2rem; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: .84rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
    .hd-mnav a:hover { text-decoration: none; }
    .hd-mnav .on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
    .hd-mnav b { min-width: 17px; padding: 0 4px; border-radius: 99px; background: var(--muted); color: #fff; font-size: .65rem; line-height: 16px; text-align: center; }
    .hd-mnav b.hot { background: #e5484d; }
}
.hd-more-list { display: flex; flex-direction: column; }
.hd-more-list a { display: flex; align-items: center; gap: .65rem; padding: .65rem .4rem; border-bottom: 1px solid var(--border); color: var(--text); font-size: .95rem; }
.hd-more-list a:hover { text-decoration: none; background: var(--surface-2); }
.hd-more-list a.on { color: var(--primary); font-weight: 700; }
.hd-more-list a .icon { width: 18px; height: 18px; }
.hd-more-list .n { margin-left: auto; min-width: 22px; padding: 0 6px; border-radius: 99px; background: var(--surface-2); color: var(--muted); font-size: .75rem; text-align: center; }
.hd-more-list h5 { margin: .9rem .4rem .2rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
/* Helpdesk – štítky tiketů (jen řešitelé) */
.hd-tag { --tc: #0c5ac4; --tb: #e6f1fb; display: inline-flex; align-items: center; gap: .3rem; padding: .05rem .55rem; border-radius: 999px; background: var(--tb); color: var(--tc); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.hd-tag i, .hd-tag-colors i { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--td, var(--tc)); }
.hd-tag.sm { padding: 0 .45rem; font-size: .68rem; }
/* Barvy štítků (HelpdeskTags::COLORS): --td sytá tečka, --tb světlý podklad, --tc text. */
.tg-red { --td: #ef4444; --tb: #fee2e2; --tc: #b91c1c; }
.tg-orange { --td: #f97316; --tb: #ffedd5; --tc: #c2410c; }
.tg-amber { --td: #f59e0b; --tb: #fef3c7; --tc: #a15c07; }
.tg-yellow { --td: #facc15; --tb: #fef9c3; --tc: #854d0e; }
.tg-lime { --td: #84cc16; --tb: #ecfccb; --tc: #4d7c0f; }
.tg-green { --td: #22c55e; --tb: #dcfce7; --tc: #15803d; }
.tg-emerald { --td: #10b981; --tb: #d1fae5; --tc: #047857; }
.tg-teal { --td: #14b8a6; --tb: #ccfbf1; --tc: #0f766e; }
.tg-cyan { --td: #06b6d4; --tb: #cffafe; --tc: #0e7490; }
.tg-sky { --td: #38bdf8; --tb: #e0f2fe; --tc: #0369a1; }
.tg-blue { --td: #3b82f6; --tb: #dbeafe; --tc: #1d4ed8; }
.tg-indigo { --td: #6366f1; --tb: #e0e7ff; --tc: #4338ca; }
.tg-violet { --td: #8b5cf6; --tb: #ede9fe; --tc: #6d28d9; }
.tg-purple { --td: #c026d3; --tb: #fae8ff; --tc: #a21caf; }
.tg-pink { --td: #ec4899; --tb: #fce7f3; --tc: #be185d; }
.tg-rose { --td: #f43f5e; --tb: #ffe4e6; --tc: #be123c; }
.tg-coral { --td: #fb7185; --tb: #fff1f2; --tc: #e11d48; }
.tg-brown { --td: #b45309; --tb: #fdecd8; --tc: #7c2d12; }
.tg-slate { --td: #475569; --tb: #e2e8f0; --tc: #1e293b; }
.tg-gray { --td: #9ca3af; --tb: #f3f4f6; --tc: #4b5563; }
.hd-tags-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .45rem; }
.hd-tag-form { margin: 0; }
.hd-tag-x { margin-left: .1rem; padding: 0; border: 0; background: none; color: inherit; font-size: .9rem; line-height: 1; opacity: .5; cursor: pointer; }
.hd-tag-x:hover { opacity: 1; }
.hd-tag-add { position: relative; }
.hd-tag-add > summary { display: inline-flex; padding: .05rem .55rem; border: 1px dashed var(--border); border-radius: 999px; color: var(--muted); font-size: .74rem; font-weight: 700; list-style: none; cursor: pointer; }
.hd-tag-add > summary::-webkit-details-marker { display: none; }
.hd-tag-add > summary:hover { border-color: var(--primary); color: var(--primary); }
.hd-tag-pop { position: absolute; left: 0; top: calc(100% + .35rem); z-index: 40; width: 290px; margin: 0; padding: .45rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.hd-tag-pop input[type=text] { width: 100%; font-size: .86rem; }
.hd-tag-list { display: flex; flex-direction: column; max-height: 14rem; margin-top: .35rem; overflow: auto; }
.hd-tag-list button { display: flex; align-items: center; gap: .5rem; padding: .4rem .45rem; border: 0; border-radius: 8px; background: none; font: inherit; font-size: .84rem; text-align: left; cursor: pointer; }
.hd-tag-list button:hover, .hd-tag-list button.on { background: var(--surface-2); }
.hd-tag-list small { margin-left: auto; color: var(--muted); font-size: .7rem; }
.hd-tag-create { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; margin-top: .45rem; padding-top: .45rem; border-top: 1px solid var(--border); }
.hd-tag-colors { display: grid; grid-template-columns: repeat(10, 1fr); gap: .3rem; width: 100%; }
.hd-tag-colors label { cursor: pointer; }
.hd-tag-colors input { position: absolute; opacity: 0; pointer-events: none; }
.hd-tag-colors i { display: block; width: 18px; height: 18px; border: 2px solid transparent; }
.hd-tag-colors input:checked + i { border-color: var(--text); }
.hd-tag-scope { display: flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--muted); }
.hd-tag-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.hd-tag-filter .hd-search-box { flex: 1 1 220px; }
.hd-tag-filter select { width: auto; font-size: .86rem; }
.hd-tag-card { padding-top: .6rem; padding-bottom: .6rem; }
.hd-tag-row { display: grid; grid-template-columns: 30px minmax(140px, 1fr) minmax(150px, 200px) 56px 44px 30px; align-items: center; gap: .6rem; margin: 0; padding: .45rem 0; border-top: 1px solid var(--border); }
.hd-tag-row.hd-tag-new { grid-template-columns: 30px minmax(140px, 1fr) minmax(150px, 200px) 30px; padding: .2rem 0 .55rem; border-top: 0; }
.hd-tag-row.off .hd-tag-dot, .hd-tag-row.off .hd-tag-name, .hd-tag-row.off select { opacity: .5; }
.hd-tag-row input[name=name] { width: 100%; min-width: 0; font-size: .88rem; }
.hd-tag-row .hd-tag-name { border-color: transparent; background: transparent; font-weight: 600; }
.hd-tag-row .hd-tag-name:hover, .hd-tag-row .hd-tag-name:focus { border-color: var(--border); background: var(--surface); }
.hd-tag-row select { width: 100%; min-width: 0; font-size: .84rem; }
.hd-tag-cnt { color: var(--muted); font-size: .76rem; text-align: right; white-space: nowrap; }
.hd-tag-dot { position: relative; }
.hd-tag-dot > summary { display: block; width: 22px; height: 22px; margin: 0 auto; border-radius: 50%; background: var(--td); box-shadow: 0 0 0 3px var(--tb); list-style: none; cursor: pointer; }
.hd-tag-dot > summary::-webkit-details-marker { display: none; }
.hd-tag-pal { position: absolute; left: -.3rem; top: calc(100% + .4rem); z-index: 40; display: grid; grid-template-columns: repeat(10, 24px); gap: 7px; padding: .6rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.hd-tag-pal label { cursor: pointer; }
.hd-tag-pal input { position: absolute; opacity: 0; pointer-events: none; }
.hd-tag-pal i { display: block; width: 24px; height: 24px; border-radius: 50%; background: var(--td); }
.hd-tag-pal input:checked + i { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.hd-tag-pal input:focus-visible + i { outline: 2px solid var(--primary); outline-offset: 2px; }
.hd-saved { position: fixed; left: 50%; bottom: 1.25rem; z-index: 90; padding: .4rem .95rem; border-radius: 999px; background: #1b2333; color: #fff; font-size: .84rem; font-weight: 600; transform: translateX(-50%); box-shadow: 0 6px 20px rgba(0, 0, 0, .2); }
.hd-saved.bad { background: var(--danger); }
@media (max-width: 640px) {
    .hd-tag-row { grid-template-columns: 30px minmax(0, 1fr) 44px 30px; grid-template-areas: "d n s x" "d o o c"; row-gap: .35rem; }
    .hd-tag-row .hd-tag-dot { grid-area: d; align-self: start; padding-top: .3rem; }
    .hd-tag-row .hd-tag-name { grid-area: n; }
    .hd-tag-row select { grid-area: o; }
    .hd-tag-row .hd-tag-cnt { grid-area: c; }
    .hd-tag-row .hd-tag-on { grid-area: s; }
    .hd-tag-row [data-tag-del] { grid-area: x; }
    .hd-tag-row.hd-tag-new { grid-template-columns: 30px minmax(0, 1fr) 30px; grid-template-areas: "d n x" "d o o"; }
    .hd-tag-row.hd-tag-new input[name=name] { grid-area: n; }
    .hd-tag-row.hd-tag-new .icon-btn { grid-area: x; }
    .hd-tag-pal { grid-template-columns: repeat(5, 30px); gap: 9px; }
    .hd-tag-pal i { width: 30px; height: 30px; }
    .hd-tag-row input[name=name], .hd-tag-row select, .hd-tag-filter select { font-size: 16px; }
}

/* Seznam tiketů: filtr štítků – rozevírací menu po organizacích */
.hd-tagdd { position: relative; }
.hd-tagdd > summary { display: flex; align-items: center; gap: .35rem; max-width: 220px; height: 100%; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: .82rem; list-style: none; white-space: nowrap; cursor: pointer; }
.hd-tagdd > summary::-webkit-details-marker { display: none; }
.hd-tagdd > summary span { overflow: hidden; text-overflow: ellipsis; }
.hd-tagdd > summary small { color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; }
.hd-tagdd > summary.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.hd-tagdd i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--td); }
.hd-tagdd-menu { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 45; display: flex; flex-direction: column; width: 290px; max-height: 380px; overflow: auto; padding: .4rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.hd-tagdd-menu input[type=search] { width: 100%; margin-bottom: .3rem; font-size: .86rem; }
.hd-tagdd-menu a { display: flex; align-items: center; gap: .5rem; padding: .38rem .45rem; border-radius: 8px; color: inherit; font-size: .86rem; text-decoration: none; }
.hd-tagdd-menu a:hover { background: var(--surface-2); }
.hd-tagdd-menu a.on { background: var(--primary-soft); font-weight: 700; }
.hd-tagdd-menu a.off { opacity: .55; }
.hd-tagdd-menu a small { margin-left: auto; color: var(--muted); font-size: .72rem; }
.hd-tagdd-grp { padding: .55rem .45rem .2rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
@media (max-width: 860px) {
    .hd-tagdd-menu { position: fixed; left: .5rem; right: .5rem; top: auto; bottom: .5rem; width: auto; max-height: 70vh; border-radius: 16px; }
    .hd-tagdd-menu input[type=search] { font-size: 16px; }
}
@media (max-width: 860px) { .hd-tag-filter input[type=search] { font-size: 16px; } }
/* Nástěnka – blok Helpdesk */
.hdw-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .4rem; margin-bottom: .6rem; }
.hdw-tile { display: flex; flex-direction: column; align-items: center; padding: .5rem .2rem; border: 1px solid var(--border); border-radius: 11px; background: var(--surface-2); color: var(--muted); font-size: .7rem; line-height: 1.2; text-align: center; }
.hdw-tile:hover { text-decoration: none; border-color: var(--primary); }
.hdw-tile b { font-size: 1.25rem; color: var(--text); }
.hdw-tile.hot { background: var(--hd-ap-no-bg); border-color: var(--hd-ap-no-border); } .hdw-tile.hot b { color: var(--hd-ap-no); }
.hdw-tile.warn { background: var(--hd-ap-wait-bg); border-color: var(--hd-ap-wait-border); } .hdw-tile.warn b { color: var(--hd-ap-wait); }
.hdw-lab { margin: .6rem 0 .15rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.hdw-row { display: flex; align-items: center; gap: .55rem; padding: .42rem 0; border-top: 1px solid var(--border); color: var(--text); font-size: .86rem; }
.hdw-lab + .hdw-row { border-top: 0; }
.hdw-row:hover { text-decoration: none; }
.hdw-row:hover b { color: var(--primary); }
.hdw-t { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.hdw-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hdw-t small { color: var(--muted); font-size: .74rem; }
.hdw-need { display: flex; align-items: center; gap: .55rem; margin-bottom: .5rem; padding: .55rem .7rem; border: 1.5px solid var(--hd-ok-border); border-radius: 11px; background: var(--hd-ok-bg); color: var(--text); font-size: .86rem; }
.hdw-need:hover { text-decoration: none; }
.hdw-need > span:nth-child(1) { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.hdw-need small { color: var(--muted); }
@media (max-width: 420px) { .hdw-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Nástěnka – bloky v mřížce o 6 sloupcích, šířka podle volby (Celá / 2/3 / 1/2 / 1/3); mobil pod sebou */
.dashboard { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 1.25rem; align-items: start; }
.dashboard > .widget { grid-column: span 6; min-width: 0; }
.dashboard > .widget.w-two { grid-column: span 4; } .dashboard > .widget.w-half { grid-column: span 3; } .dashboard > .widget.w-third { grid-column: span 2; }
.dash-width { width: auto; flex: none; font-size: .8rem; padding-top: .25rem; padding-bottom: .25rem; }
@media (max-width: 860px) { .dashboard { grid-template-columns: minmax(0, 1fr); } .dashboard > .widget { grid-column: auto !important; } }
/* Helpdesk – reakce smajlíky pod zprávou */
.hd-rx { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .45rem; }
.hd-rx-chip, .hd-rx-add { display: inline-flex; align-items: center; gap: .25rem; padding: .05rem .45rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: .82rem; line-height: 1.5; cursor: pointer; }
.hd-rx-chip b { font-size: .74rem; font-weight: 700; }
.hd-rx-chip.me { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.hd-rx-chip:disabled { cursor: default; }
.hd-rx-add { border-style: dashed; color: var(--muted); font-size: .76rem; opacity: .7; }
.hd-rx-add:hover { border-color: var(--primary); color: var(--primary); }
.hd-rx-open { font-size: .9rem; }
.hd-rx:not(:has(.hd-rx-chip)) { min-height: 0; margin-top: .2rem; }
.hd-rx-pop { display: flex; flex-wrap: wrap; gap: .1rem; flex-basis: 100%; max-width: 360px; padding: .25rem .35rem; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: 0 6px 18px rgba(0, 0, 0, .1); }   /* řádek smajlíků přímo pod zprávou (nic nepřekrývá) */
.hd-rx-pop button { padding: .1rem .25rem; border: 0; border-radius: 8px; background: none; font-size: 1.2rem; line-height: 1.3; cursor: pointer; transition: transform .1s; }
.hd-rx-pop button:hover { background: var(--surface-2); transform: scale(1.2); }
.hd-rx-pop button.me { background: var(--primary-soft); }
.hd-rx-preview { display: flex; flex-wrap: wrap; gap: .25rem; margin: 0 0 .8rem; padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 14px; font-size: 1.4rem; min-height: 2.6rem; }
.hd-rx-set input[name=emojis] { font-size: 1.2rem; }
@media (hover: none) { .hd-rx-add { opacity: 1; } }
/* Soupis práce – schválení organizací */
.st-disp { background: var(--hd-ap-no-bg); color: var(--hd-ap-no); }
.hd-st-box { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .7rem; border: 1.5px solid var(--border); border-radius: 11px; text-align: left; font-size: .84rem; }
.hd-st-box small { color: var(--muted); font-size: .76rem; }
.hd-st-box.wait { border-color: var(--hd-ap-wait-border); background: var(--hd-ap-wait-bg); } .hd-st-box.wait b { color: var(--hd-ap-wait); }
.hd-st-box.ok { border-color: var(--hd-ap-ok-border); background: var(--hd-ap-ok-bg); } .hd-st-box.ok b { color: var(--hd-ap-ok); }
.hd-st-box.no { border-color: var(--hd-ap-no-border); background: var(--hd-ap-no-bg); } .hd-st-box.no b { color: var(--hd-ap-no); }
.hd-stmt-page { display: grid; grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "rows card"; gap: 1rem; align-items: start; max-width: 1280px; }
.hd-stmt-side { grid-area: card; position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.hd-stmt-card { margin: 0; }
.hd-stmt-rows { grid-area: rows; margin: 0; }
.hd-stmt-h { margin: 0 0 .6rem; font-size: 1rem; }
.hd-stmt-sum { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)) !important; }
@media (max-width: 960px) { .hd-stmt-page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "card" "rows"; } .hd-stmt-side { position: static; } }
.hd-stmt-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .45rem; margin: .7rem 0; }
.hd-stmt-sum span { display: flex; flex-direction: column; align-items: center; padding: .5rem .3rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font-size: .72rem; color: var(--muted); text-align: center; }
.hd-stmt-sum b { font-size: 1.05rem; color: var(--text); }
.hd-stmt-sum span.tot { background: var(--hd-ap-ok-bg); border-color: var(--hd-ap-ok-border); }
.hd-stmt-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.hd-stmt-table th, .hd-stmt-table td { padding: .42rem .5rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.hd-stmt-table th { color: var(--muted); font-size: .74rem; font-weight: 600; }
.hd-stmt-table .r { text-align: right; white-space: nowrap; }
.hd-stmt-table tfoot td { font-weight: 800; border-bottom: 0; }
@media (max-width: 600px) { .hd-stmt-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hd-stmt-table .hide-m { display: none; } }
.hd-stmt-msg { margin: 0 0 .3rem; padding: .55rem .7rem; border-radius: 10px; background: var(--surface-2); font-size: .9rem; }
/* Soupis – položky seskupené podle tiketů (Soupisy práce i stránka ke schválení) */
.sr { display: flex; flex-direction: column; gap: .55rem; }
.sr-acts { display: flex; gap: .1rem; }
.sr-acts form { margin: 0; }
.hd-stmt-back { margin: 0 0 .7rem; font-size: .88rem; }
.hd-stmt-hist { margin: 0; }
.hd-stmt-hist-row { display: flex; gap: .55rem; padding: .4rem 0; border-top: 1px solid var(--border); font-size: .84rem; }
.hd-stmt-hist h4 + .hd-stmt-hist-row { border-top: 0; }
.hd-stmt-hist-ic { width: 1.3rem; flex: none; text-align: center; }
.hd-stmt-hist-row small { display: block; color: var(--muted); font-size: .72rem; }
.hd-stmt-hist-note { display: block; margin-top: .25rem; padding: .3rem .5rem; border-radius: 8px; background: var(--surface-2); color: var(--text); font-size: .8rem; }
.hd-tab-hot { padding: 0 .4rem; border-radius: 99px; background: var(--hd-ap-wait); color: #fff !important; }
/* Přehled soupisů schvalovatele (/soupis) */
.hd-stmt-list { display: flex; flex-direction: column; gap: .5rem; max-width: 900px; }
.hd-stmt-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .3rem .9rem; align-items: center; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); }
.hd-stmt-item:hover { text-decoration: none; border-color: var(--primary); }
.hd-stmt-item.wait { border: 2px solid var(--hd-ap-wait-border); box-shadow: 0 0 0 3px var(--hd-ap-wait-bg); }
.hd-stmt-item b { display: block; }
.hd-stmt-item small { color: var(--muted); font-size: .76rem; }
.hd-stmt-amt { font-weight: 800; white-space: nowrap; }
@media (max-width: 600px) { .hd-stmt-item { grid-template-columns: auto minmax(0, 1fr) auto; } .hd-stmt-item .hd-pill { grid-column: 2 / -1; justify-self: start; } }
.hd-bill-side { position: sticky; }   /* kotva pro 🗑 v rohu (sticky z .editor-side zůstává) */
@media (max-width: 860px) { .hd-bill-side { position: relative; } }
.hd-stmt-del { position: absolute; top: .55rem; right: .55rem; margin: 0; }
.hd-stmt-del .icon-btn { opacity: .55; }
.hd-stmt-del .icon-btn:hover, .hd-stmt-del .icon-btn:focus-visible { opacity: 1; }
.hd-st-detail { margin-top: -.35rem; color: var(--muted); font-size: .76rem; }

/* Soupis ke schválení – komu (Schvaluje soupisy) + další příjemce */
.hd-stmt-to { display: flex; align-items: center; gap: .6rem; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.hd-stmt-to b { display: block; font-size: .9rem; }
.hd-stmt-to small { display: block; color: var(--muted); font-size: .76rem; }
.hd-stmt-av { display: grid; flex: none; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: .78rem; font-weight: 700; }
.hd-stmt-extra { margin: -.35rem 0 .6rem; }
.hd-stmt-extra > summary { display: inline-block; padding: .25rem 0; color: var(--primary); font-size: .86rem; font-weight: 600; list-style: none; cursor: pointer; }
.hd-stmt-extra > summary::-webkit-details-marker { display: none; }
.hd-stmt-extra[open] > summary { display: none; }
.hd-stmt-extra select { width: 100%; }
@media (max-width: 860px) { .hd-stmt-extra select { font-size: 16px; } }
.hd-ib.off { opacity: .35; cursor: default; }

/* Soupis práce – tisk „A kompakt“ (billing_print.php): A4 na výšku, jeden zápis = jeden řádek, bloky podle tiketů. */
.pc-tools { max-width: 794px; }
.pc-page { width: 794px; max-width: 100%; margin: 0 auto 2rem; padding: 30px 36px; background: #fff; color: #1b2333; border-radius: 4px; box-shadow: 0 8px 30px rgba(16, 24, 40, .1); font-size: 10.5px; line-height: 1.35; }
.pc-top { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 8px; border-bottom: 2.5px solid #005eb8; }
.pc-top img { height: 38px; }
.pc-title { text-align: right; }
.pc-title b { display: block; font-size: 17px; }
.pc-title span { color: #6b7486; font-size: 11px; }
.pc-parties { display: grid; grid-template-columns: 1fr 1fr 230px; gap: 16px; margin: 10px 0 8px; line-height: 1.4; }
.pc-parties > div { display: flex; flex-direction: column; }
.pc-parties small { color: #6b7486; font-size: 8.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pc-parties b { font-size: 11px; }
.pc-parties > .pc-kpi { display: grid; grid-template-columns: 1fr auto; row-gap: 1px; align-self: start; padding: 5px 8px; border: 1px solid #e3e7ef; border-radius: 6px; }
.pc-kpi span { color: #6b7486; }
.pc-kpi b { font-size: 10.5px; text-align: right; font-variant-numeric: tabular-nums; }
.pc-kpi .t { margin-top: 2px; padding-top: 3px; border-top: 1px solid #e3e7ef; color: #1b2333; font-weight: 700; }
.pc-kpi b.t { color: #1a7f4b; font-size: 12.5px; }
.pc-rates { margin: 0 0 8px; color: #6b7486; font-size: 9.5px; }
.pc-t { width: 100%; border-collapse: collapse; }
.pc-t th { padding: 3px 5px; border-bottom: 1.5px solid #1b2333; color: #6b7486; font-size: 8.5px; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.pc-t td { padding: 3px 5px; border-bottom: 1px solid #eef1f6; vertical-align: baseline; }
.pc-t .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pc-t .d { width: 86px; white-space: nowrap; }
.pc-t .d small { color: #6b7486; }
.pc-t tr.g td { padding-top: 7px; border-bottom: 1px solid #cfd6e2; font-size: 11px; font-weight: 700; }
.pc-num { margin-right: 6px; color: #1f4fd1; font: 700 9.5px ui-monospace, Menlo, monospace; }
.pc-chips { margin-left: 6px; color: #6b7486; font-size: 9.5px; }
.pc-chips .disc { color: #c0352b; }
.pc-t .old { display: inline; margin-right: 5px; color: #9aa3b2; font-size: 8.5px; font-weight: 400; text-decoration: line-through; }
.pc-empty { margin: 10px 0; color: #6b7486; }
.pc-end { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-top: 10px; break-inside: avoid; }
.pc-sign { padding: 5px 8px; border-radius: 6px; background: #e3f5eb; color: #1a7f4b; font-weight: 600; }
.pc-sum { width: 270px; flex: none; overflow: hidden; border: 1px solid #e3e7ef; border-radius: 6px; }
.pc-sum div { display: flex; justify-content: space-between; padding: 3px 9px; border-top: 1px solid #e3e7ef; }
.pc-sum div:first-child { border-top: 0; }
.pc-sum b { font-variant-numeric: tabular-nums; }
.pc-sum .disc { color: #c0352b; }
.pc-sum .fin { padding: 5px 9px; background: #e3f5eb; font-weight: 700; }
.pc-sum .fin b { color: #1a7f4b; font-size: 14px; }
.pc-foot { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 5px; border-top: 1px solid #e3e7ef; color: #9aa3b2; font-size: 8.5px; }
@media (max-width: 820px) {
    .pc-page { padding: 18px 14px; }
    .pc-parties { grid-template-columns: 1fr 1fr; }
    .pc-parties > .pc-kpi { grid-column: 1 / -1; }
    .pc-t .d { width: auto; white-space: normal; }
}
@media print {
    .pc-page { width: auto; margin: 0; padding: 0; box-shadow: none; border-radius: 0; }
    .pc-parties { grid-template-columns: 1fr 1fr 230px; }
    .pc-parties > .pc-kpi { grid-column: auto; }
    .pc-t thead { display: table-header-group; }   /* záhlaví sloupců i na další straně */
    .pc-t tr { break-inside: avoid; }
    .pc-t tr.g { break-after: avoid; }
    .pc-sign, .pc-sum .fin { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Helpdesk „Vyrážím k vám“ – okno řešitele, pruh „Na cestě“, karta zadavatele s mapou */
.hd-trip-dest { padding: .5rem .65rem; border-radius: 10px; background: var(--surface-2); font-size: .88rem; }
.hd-trip-cars { display: flex; flex-direction: column; gap: .4rem; }
.hd-trip-car { display: flex; align-items: center; gap: .6rem; padding: .55rem .65rem; border: 1.5px solid var(--border); border-radius: 10px; cursor: pointer; }
.hd-trip-car:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.hd-trip-car input { margin: 0; accent-color: var(--primary); }
.hd-trip-car b { display: block; font-size: .9rem; }
.hd-trip-car small { display: block; color: var(--muted); font-size: .76rem; }
.hd-trip-car-eta { margin-left: auto; font-size: .85rem; font-weight: 700; text-align: right; white-space: nowrap; }
.hd-trip-car-eta small { font-weight: 400; }
[data-trip-cars-wrap].single .hd-trip-car input { display: none; }
.hd-trip-chk { display: flex; align-items: center; gap: .45rem; margin: .2rem 0 .4rem; font-size: .86rem; }
.hd-trip-go { background: #1a7f4b; border-color: #1a7f4b; }
.hd-trip-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: 0 0 .8rem; padding: .6rem .8rem; border: 1.5px solid #bfe3cc; border-radius: 12px; background: #f2fbf5; }
.hd-trip-ico { font-size: 1.35rem; }
.hd-trip-txt { flex: 1 1 220px; min-width: 0; }
.hd-trip-txt b { display: block; color: #14532d; }
.hd-trip-txt small { color: #3f6b50; font-size: .8rem; }
.hd-trip-acts { display: flex; gap: .4rem; }
.hd-trip-acts form { margin: 0; }
.hd-trip-ok { background: #1a7f4b; border-color: #1a7f4b; color: #fff; }
.hd-trip-card { margin: 0 0 .9rem; overflow: hidden; border: 1.5px solid #bfe3cc; border-radius: 16px; background: var(--surface); box-shadow: 0 4px 14px rgba(26, 127, 75, .12); }
.hd-trip-top { display: flex; align-items: center; gap: .65rem; padding: .75rem .9rem; background: #e3f5eb; }
.hd-trip-av { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #1a7f4b; color: #fff; font-weight: 700; }
.hd-trip-who { min-width: 0; }
.hd-trip-who b { display: block; color: #14532d; }
.hd-trip-who small { color: #1a7f4b; font-size: .8rem; }
.hd-trip-eta { margin-left: auto; text-align: right; }
.hd-trip-eta b { display: block; color: #14532d; font-size: 1.4rem; line-height: 1.1; }
.hd-trip-eta small { color: #1a7f4b; font-size: .74rem; white-space: nowrap; }
.hd-trip-map { height: 260px; background: #eef2ea; }
.hd-trip-info { display: flex; justify-content: space-between; gap: .5rem; padding: .55rem .9rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .82rem; }
.hd-trip-steps { display: flex; gap: .35rem; padding: .55rem .9rem .7rem; border-top: 1px solid var(--border); font-size: .74rem; color: var(--muted); }
.hd-trip-steps span { flex: 1; padding: .25rem; border-radius: 6px; background: var(--surface-2); text-align: center; }
.hd-trip-steps .done { background: #e3f5eb; color: #1a7f4b; }
.hd-trip-steps .on { background: #1a7f4b; color: #fff; font-weight: 700; }
.hd-trip-card.done .hd-trip-steps { border-top: 0; }
.hd-trip-pin { font-size: 26px; line-height: 1; }
.hd-trip-carpin { display: flex !important; align-items: center; gap: 4px; }
.hd-trip-carpin span { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border: 3px solid #fff; border-radius: 50%; background: #1a7f4b; box-shadow: 0 0 0 6px rgba(26, 127, 75, .2); font-size: 14px; }
.hd-trip-carpin b { padding: 1px 6px; border-radius: 6px; background: #fff; color: #14532d; font-size: 11px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.hd-trip-logo { height: 18px; opacity: .85; }
@media (max-width: 860px) { .hd-trip-map { height: 230px; } .hd-trip-acts { width: 100%; } .hd-trip-acts form { flex: 1; } .hd-trip-acts .btn { width: 100%; } }
.hd-trip-mapwrap { position: relative; }
.hd-trip-zoom { position: absolute; top: .5rem; right: .5rem; z-index: 500; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 9px; background: #fff; color: #1b2333; font-size: 1.05rem; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); cursor: pointer; }
.hd-trip-card.full { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; margin: 0; border: 0; border-radius: 0; }
.hd-trip-card.full .hd-trip-mapwrap { flex: 1; min-height: 0; }
.hd-trip-card.full .hd-trip-map { height: 100%; }
.hd-trip-card.full .hd-trip-top { padding-top: max(.75rem, env(safe-area-inset-top)); }
.hd-trip-card.full .hd-trip-info { padding-bottom: max(.55rem, env(safe-area-inset-bottom)); }
body.hd-trip-noscroll { overflow: hidden; }
/* Seznam řešitele: moje aktivní cesta nad seznamem + štítek u tiketu */
.hd-trip-now { display: flex; flex: none; align-items: center; gap: .6rem; margin: .5rem .6rem; padding: .55rem .75rem; border: 1.5px solid #bfe3cc; border-radius: 12px; background: #e3f5eb; color: #14532d; text-decoration: none; }
.hd-trip-now:hover { background: #d6f0e0; }
.hd-trip-now-ico { font-size: 1.3rem; animation: hd-trip-pulse 2s ease-in-out infinite; }
.hd-trip-now b { display: block; font-size: .88rem; }
.hd-trip-now small { display: block; color: #1a7f4b; font-size: .78rem; }
.hd-trip-now-go { margin-left: auto; font-size: 1.3rem; }
.hd-trip-tag { padding: 0 .45rem; border-radius: 999px; background: #e3f5eb; color: #1a7f4b; font-size: .7rem; font-weight: 700; white-space: nowrap; }
@keyframes hd-trip-pulse { 50% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .hd-trip-now-ico { animation: none; } }
/* Seznam tiketů – mobil: hledání + Filtr (spodní panel) + ＋, aktivní filtry jako čipy (varianta A, 2. 10.) */
.hd-flt-btn, .hd-new-btn, .hd-flt-chips { display: none; }
.hd-flt-dlg h2 { display: flex; align-items: baseline; justify-content: space-between; }
.hd-flt-reset { font-size: .85rem; font-weight: 600; }
.hd-flt-dlg .field { margin-bottom: .75rem; }
.hd-flt-dlg select { width: 100%; }
@media (max-width: 860px) {
    .hd-list-title { display: none; }
    .hd-list-head { padding: .55rem .6rem; }
    .hd-search { flex: 1 1 100%; flex-wrap: nowrap; }
    .hd-flt-chips { width: 100%; }
    .hd-search > select, .hd-search > .hd-tagdd { display: none; }
    .hd-search .hd-search-box { min-width: 0; }
    .hd-flt-btn, .hd-new-btn { position: relative; display: grid; flex: none; place-items: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
    .hd-new-btn { border-color: var(--primary); background: var(--primary); color: #fff; }
    .hd-new-btn .icon { width: 20px; height: 20px; }
    .hd-flt-btn b { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: #fff; font-size: .66rem; line-height: 17px; text-align: center; }
    .hd-flt-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
    .hd-flt-chips a { display: inline-flex; align-items: center; gap: .3rem; height: 30px; padding: 0 .7rem; border: 1px solid var(--primary); border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .8rem; font-weight: 600; }
    .hd-flt-chips a:hover { text-decoration: none; }
    .hd-flt-chips span { font-size: 1rem; line-height: 1; }
    .hd-flt-dlg select { font-size: 16px; }
}

/* Konverzace: celé jméno, role a logo J Services u řešitele (varianta A) */
.hd-msg .hd-av-js, .hd-av-js { width: 40px; height: 40px; margin-left: -4px; background: #fff !important; border: 1.5px solid #c9d6f5; box-shadow: 0 1px 3px rgba(0, 94, 184, .18); overflow: hidden; }
.hd-av-js img { width: 36px; height: auto; transform: translateY(1px); }
@media (max-width: 860px) { .hd-msg .hd-av-js { width: 36px; height: 36px; margin-left: -4px; } .hd-av-js img { width: 32px; } }
.hd-vy { color: var(--muted); font-weight: 400; }
.hd-role { padding: 0 .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .68rem; font-weight: 700; white-space: nowrap; }
.hd-role.sol { background: var(--primary-soft); color: var(--primary); }
.hd-role-org { color: var(--muted); font-size: .72rem; }

/* Ochrana přihlášení podle IP */
.ip-card { margin-bottom: 1rem; }
.ip-toggle { display: flex; align-items: center; gap: 1rem; margin: 0; }
.ip-toggle-t { flex: 1; }
.ip-toggle-t b { display: block; }
.ip-toggle-t small { color: var(--muted); font-size: .8rem; }
.ip-switch { position: relative; flex: none; width: 46px; height: 26px; border: 0; border-radius: 999px; background: #cfd5e1; cursor: pointer; }
.ip-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.ip-switch.on { background: var(--success); }
.ip-switch.on::after { left: 23px; }
.ip-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .6rem 0; border-top: 1px solid var(--border); }
.ip-row:first-of-type { border-top: 0; }
.ip-row.off { opacity: .5; }
.ip-addr { min-width: 140px; font: 600 .88rem ui-monospace, Menlo, monospace; }
.ip-who { padding: 0 .5rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.ip-who.org { background: var(--primary-soft); color: var(--primary); }
.ip-who.usr { background: #ede9fe; color: #6d28d9; }
.ip-who.usr:hover { text-decoration: none; background: #e0d8fd; }
.ip-note { flex: 1 1 220px; min-width: 0; font-size: .86rem; }
.ip-note small { display: block; color: var(--muted); font-size: .74rem; }
.ip-acts { display: flex; gap: .2rem; }
.ip-acts form, .ip-inline { display: inline; margin: 0; }
.ip-add { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .7rem 0 0; padding-top: .7rem; border-top: 1px dashed var(--border); }
.ip-add select, .ip-add input { width: auto; font-size: .86rem; }
.ip-input { width: 190px !important; font-family: ui-monospace, Menlo, monospace; }
.ip-note-in { flex: 1 1 180px; }
.ip-mine { font-size: .8rem; }
.ip-any { display: flex; flex-wrap: wrap; gap: .4rem; }
.ip-any-chip { display: inline-flex; align-items: center; gap: .35rem; margin: 0; padding: .2rem .35rem .2rem .7rem; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: .82rem; font-weight: 600; }
.ip-any-chip a { color: inherit; }
.ip-any-chip button { border: 0; background: none; color: inherit; font-size: 1rem; cursor: pointer; }
.ip-user-any { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.ip-user-until { display: inline-flex; align-items: center; gap: .35rem; }
.ip-user-until input { width: auto; }
.ip-req { margin-bottom: .8rem; }
.ip-req.pending { border-color: var(--hd-ap-wait-border); }
.ip-req-h { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.ip-req-h small { display: block; color: var(--muted); font-size: .76rem; }
.ip-req-want { margin: .4rem 0; font-size: .9rem; }
.ip-req-hint { margin: .4rem 0; padding: .5rem .7rem; border-radius: 10px; background: var(--warning-soft); font-size: .84rem; }
.ip-decide-row, .ip-decide-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
.ip-decide select, .ip-decide input[type=date] { width: auto; font-size: .86rem; }
.ip-decide-acts input[type=text] { flex: 1 1 180px; font-size: .86rem; }
.o2-tab-link { display: inline-flex; flex: none; align-items: center; gap: .3rem; padding: .45rem .95rem; border-radius: 9px; color: var(--muted); font-size: .88rem; font-weight: 600; }
.o2-tab-link:hover { color: var(--text); text-decoration: none; background: var(--surface-2); }
.o2-tab-link small { color: var(--success); font-size: .72rem; }
.ipb { max-width: 460px; padding: 0 !important; overflow: hidden; }
.ipb-top { padding: 1.4rem 1.3rem 1.2rem; background: linear-gradient(180deg, #fff4e5, #fffaf3); border-bottom: 1px solid #f6dcb4; text-align: center; }
.ipb-ic { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: #f59e0b; color: #fff; box-shadow: 0 0 0 7px rgba(245, 158, 11, .18); }
.ipb-ic .icon { width: 26px; height: 26px; }
.ipb-top h1 { margin: .9rem 0 .35rem; font-size: 1.25rem; }
.ipb-top p { margin: 0 0 .7rem; color: #6b5a3a; font-size: .9rem; }
.ipb-addr { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border: 1px solid #f6dcb4; border-radius: 999px; background: #fff; color: #6b5a3a; font-size: .82rem; }
.ipb-addr b { color: #1b2333; font-family: ui-monospace, Menlo, monospace; font-size: .88rem; }
.ipb-form { padding: 1.2rem 1.3rem 1.3rem; }
.ipb-form h2 { margin: 0 0 .75rem; font-size: 1rem; }
.ipb-opts { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .9rem; }
.ipb-opt { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; }
.ipb-opt:has(input[type=radio]:checked) { border-color: var(--primary); background: var(--primary-soft); }
.ipb-opt input[type=radio] { margin: 0; accent-color: var(--primary); }
.ipb-opt span { flex: 1; }
.ipb-opt b { display: block; font-size: .92rem; }
.ipb-opt small { color: var(--muted); font-size: .78rem; }
.ipb-opt input[type=date] { display: none; width: 100%; margin-left: 1.7rem; font-size: .9rem; }
.ipb-opt:has(input[type=radio]:checked) input[type=date] { display: block; }
.ipb-seg { display: flex; }
.ipb-seg label { flex: 1; text-align: center; }
.ipb-wait { display: flex; gap: .7rem; margin: 1.2rem 1.3rem 1.3rem; padding: .8rem .9rem; border-radius: 12px; background: var(--primary-soft); }
.ipb-wait-ic { font-size: 1.3rem; }
.ipb-wait b { display: block; }
.ipb-wait small { color: var(--muted); font-size: .82rem; }
@media (max-width: 860px) { .ip-add select, .ip-add input, .ip-decide select, .ip-decide input, .ipb-opt input[type=date] { font-size: 16px; } .ip-input { width: 100% !important; } }
.ipb-form .field { display: block; margin-bottom: .85rem; } .ipb-form .field > span { display: block; margin-bottom: .3rem; } .ipb-form .btn-block { margin-top: .2rem; }
.tab-count.hot { padding: 0 .4rem; border-radius: 999px; background: var(--hd-ap-wait, #c2410c); color: #fff; font-weight: 700; }

/* Lístečky na nástěnce */
.nt-add { background: #fef3c7; border-color: #fde68a; color: #92400e; font-weight: 700; }
.nt-new { margin: 0; }
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; padding: 4px 2px 8px; }
.nt-note { --nb: #fef08a; --nf: #3b3220; position: relative; display: flex; flex-direction: column; min-height: 150px; padding: .75rem .8rem .45rem; border-radius: 4px 4px 14px 4px; background: var(--nb); color: var(--nf); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 6px 14px rgba(0, 0, 0, .06); font-size: .9rem; line-height: 1.45; }
.nt-note:nth-child(3n+2) { transform: rotate(-.5deg); }
.nt-note:nth-child(3n) { transform: rotate(.4deg); }
.nt-note.editing, .nt-note:hover { transform: none; }
.nt-note.dragging { opacity: .5; }
.nt-note[draggable=true] { cursor: grab; }
.nt-yellow { --nb: #fef08a; } .nt-pink { --nb: #fbcfe8; } .nt-green { --nb: #bbf7d0; } .nt-blue { --nb: #bfdbfe; } .nt-violet { --nb: #ddd6fe; } .nt-orange { --nb: #fed7aa; }
.nt-dot.nt-yellow, .nt-dot.nt-pink, .nt-dot.nt-green, .nt-dot.nt-blue, .nt-dot.nt-violet, .nt-dot.nt-orange { background: var(--nb); }
.nt-pin { position: absolute; top: -9px; left: 50%; transform: translateX(-50%); font-size: 1rem; }
.nt-view { flex: 1; min-height: 3em; cursor: text; overflow-wrap: anywhere; outline: none; }
.nt-view > * { display: block; }
.nt-title { margin-bottom: .2rem; font-size: .95rem; }
.nt-gap { height: .5em; }
.nt-ph { color: rgba(0, 0, 0, .35); }
.nt-view a { color: #1d4ed8; }
.nt-task { display: flex !important; align-items: flex-start; gap: .3rem; }
.nt-task.done > span { opacity: .55; text-decoration: line-through; }
.nt-chk { flex: none; padding: 0; border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1.3; cursor: pointer; }
.nt-text { flex: 1; width: 100%; min-height: 6em; padding: 0; border: 0 !important; outline: none; background: transparent !important; box-shadow: none !important; color: inherit; font: inherit; line-height: 1.45; resize: none; }
.nt-foot { display: flex; align-items: center; gap: .3rem; margin-top: .4rem; min-height: 26px; }
.nt-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; min-width: 0; font-size: .7rem; color: rgba(0, 0, 0, .55); }
.nt-chip { display: inline-flex; align-items: center; gap: .2rem; padding: 0 .4rem; border-radius: 999px; background: rgba(255, 255, 255, .55); font-weight: 700; white-space: nowrap; }
.nt-chip .icon { width: 11px; height: 11px; }
.nt-remind { color: #9a3412; }
.nt-saved { color: #15803d; font-weight: 700; }
.nt-acts { display: flex; align-items: center; gap: 1px; margin-left: auto; opacity: .35; transition: opacity .15s; }
.nt-note:hover .nt-acts, .nt-note.editing .nt-acts, .nt-note:focus-within .nt-acts { opacity: 1; }
.nt-acts form { margin: 0; }
.nt-ib { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: none; color: inherit; font-size: .85rem; list-style: none; cursor: pointer; }
.nt-ib::-webkit-details-marker { display: none; }
.nt-ib:hover { background: rgba(0, 0, 0, .07); }
.nt-ib.on { background: rgba(0, 0, 0, .1); }
.nt-ib .icon { width: 14px; height: 14px; }
.nt-pop { position: relative; }
.nt-pop-box { position: absolute; right: -6px; bottom: calc(100% + 6px); z-index: 30; padding: .55rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.nt-colors { display: flex; gap: 6px; }
.nt-dot { width: 24px; height: 24px; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); cursor: pointer; }
.nt-dot.on { box-shadow: 0 0 0 2px var(--text); }
.nt-remind-box { display: flex; flex-direction: column; gap: .45rem; width: 240px; font-size: .85rem; }
.nt-quick { display: flex; flex-wrap: wrap; gap: .3rem; }
.nt-quick button { padding: .2rem .5rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); color: var(--text); font: inherit; font-size: .78rem; cursor: pointer; }
.nt-quick button:hover { border-color: var(--primary); color: var(--primary); }
.nt-remind-acts { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.nt-share-list { display: flex; flex-direction: column; max-height: 50vh; overflow: auto; margin: .5rem 0; }
.nt-share-list h5 { margin: .6rem 0 .2rem; color: var(--muted); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; }
.nt-share-list label { display: flex; align-items: center; gap: .5rem; padding: .4rem .2rem; border-bottom: 1px solid var(--border); cursor: pointer; }
.nt-share-q { width: 100%; }
.nt-empty p { margin: 0; }
.nt-archive .nt-note { min-height: 120px; }
body.nt-noscroll { overflow: hidden; }
@media (max-width: 860px) {
    .nt-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .nt-note { min-height: 120px; font-size: .84rem; }
    .nt-note[draggable=true] { cursor: default; }
    .nt-acts { opacity: 1; }
    .nt-note.nt-full { position: fixed; inset: 0; z-index: 1000; min-height: 0; padding: max(1rem, env(safe-area-inset-top)) 1rem max(.8rem, env(safe-area-inset-bottom)); border-radius: 0; transform: none; font-size: 1rem; }
    .nt-note.nt-full .nt-text { font-size: 16px; }
    .nt-remind-box input, .nt-share-q { font-size: 16px; }
    .nt-pop-box { right: -40px; }
}
.nt-foot { flex-wrap: wrap; }
.nt-done { display: none; }
@media (max-width: 860px) { .nt-note.nt-full .nt-done { display: inline-flex; align-self: flex-end; margin: .5rem 0; } }
/* Lístečky – bublina s celým jménem (najetí myší i klepnutí) */
button.nt-chip { border: 0; font: inherit; font-size: .7rem; color: inherit; cursor: pointer; }
.nt-tip { position: relative; }
.nt-tip:hover::after, .nt-tip:focus::after { content: attr(data-tip); position: absolute; left: 0; bottom: calc(100% + 6px); z-index: 40; padding: .3rem .55rem; border-radius: 8px; background: #1b2333; color: #fff; font-size: .74rem; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); pointer-events: none; }
/* Lístečky – velikost */
.nt-s-wide, .nt-s-big { grid-column: span 2; }
.nt-s-big { min-height: 320px; }
.nt-style { display: flex; flex-direction: column; gap: .55rem; }
.nt-sizes { display: flex; padding: 2px; border-radius: 9px; background: var(--surface-2); }
.nt-sizes button { flex: 1; padding: .3rem .5rem; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.nt-sizes button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
@media (max-width: 860px) { .nt-s-big { min-height: 240px; } }
.nt-grid { container-type: inline-size; }
@container (max-width: 420px) { .nt-s-wide, .nt-s-big { grid-column: 1 / -1; } }
/* Lístečky – menu barvy / velikosti / připomínky na mobilu jako spodní panel (nevyjede mimo obrazovku) */
@media (max-width: 860px) {
    .nt-pop-box { position: fixed; left: .5rem; right: .5rem; top: auto; bottom: max(.5rem, env(safe-area-inset-bottom)); z-index: 1100; width: auto; padding: .9rem; border-radius: 16px; box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); }
    .nt-remind-box { width: auto; }
    .nt-colors { justify-content: space-between; }
    .nt-dot { width: 36px; height: 36px; }
    .nt-sizes button { padding: .55rem .5rem; font-size: .9rem; }
}
/* Na mobilu bez natočení a bez container query – obojí by spodní panel (position: fixed) uzavřelo do lístečku / mřížky. */
@media (max-width: 860px) { .nt-grid { container-type: normal; } .nt-note, .nt-note:nth-child(3n+2), .nt-note:nth-child(3n) { transform: none; } }
.hd-del-ticket { display: inline; margin: 0; }
/* Převzít ▾ Přiřadit řešiteli (split tlačítko u tiketu ve frontě) */
.hd-split { display: inline-flex; align-items: stretch; }
.hd-split form { margin: 0; display: flex; }
.hd-split > form .btn { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.hd-split > form:only-child .btn { border-radius: 8px; }
.hd-split-more { position: relative; display: flex; }
.hd-split-more > summary { height: 100%; padding-left: .45rem; padding-right: .45rem; border-left: 1px solid rgba(255, 255, 255, .35); border-top-left-radius: 0; border-bottom-left-radius: 0; list-style: none; }
.hd-split-more > summary::-webkit-details-marker { display: none; }
.hd-split-more > summary .icon { width: 14px; height: 14px; }
.hd-split-menu { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 50; min-width: 250px; padding: .3rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.hd-split-menu button { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; width: 100%; padding: .55rem .6rem; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: .88rem; font-weight: 600; text-align: left; cursor: pointer; }
.hd-split-menu button:hover { background: var(--surface-2); }
.hd-split-menu small { flex-basis: 100%; padding-left: 1.6rem; color: var(--muted); font-size: .74rem; font-weight: 400; }
/* Údaje tiketu po oddílech (✎ u karty) */
dialog[data-only="zadavatel"] [data-sec]:not([data-sec="zadavatel"]),
dialog[data-only="udaje"] [data-sec]:not([data-sec="udaje"]),
dialog[data-only="termin"] [data-sec]:not([data-sec="termin"]),
dialog[data-only="adresa"] [data-sec]:not([data-sec="adresa"]) { display: none; }

/* Na později */
.lt-filter { display: inline-flex; }
.lt-filter a { padding: .35rem .8rem; color: var(--muted); font-size: .85rem; font-weight: 600; text-decoration: none; }
.lt-filter a.on { background: var(--surface); color: var(--text); border-radius: 8px; box-shadow: var(--shadow); }
.lt-filter b { margin-left: .2rem; padding: 0 .4rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .7rem; }
.lt-card { padding: 0; overflow: hidden; }
.lt-add { display: flex; gap: .5rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.lt-add input { flex: 1; min-width: 0; }
.lt-empty { padding: 1rem; margin: 0; }
.lt-item { display: flex; align-items: flex-start; gap: .7rem; padding: .7rem 1rem; border-top: 1px solid var(--border); }
.lt-item:first-of-type { border-top: 0; }
.lt-fav { display: grid; flex: none; place-items: center; width: 36px; height: 36px; overflow: hidden; border-radius: 9px; background: var(--surface-2); font-size: 1rem; }
.lt-fav img { width: 22px; height: 22px; object-fit: contain; }
.lt-fav.sm { width: 28px; height: 28px; border-radius: 7px; }
.lt-fav.sm img { width: 18px; height: 18px; }
.lt-body { flex: 1; min-width: 0; }
.lt-title { display: block; overflow: hidden; color: var(--text); font-size: .93rem; font-weight: 700; text-overflow: ellipsis; overflow-wrap: anywhere; }
.lt-item.unread .lt-title::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: .4rem; border-radius: 50%; background: var(--primary); vertical-align: middle; }
.lt-item.read .lt-title { color: var(--muted); font-weight: 600; }
.lt-body small { display: block; color: var(--muted); font-size: .76rem; }
.lt-body small .nt-chip { background: var(--surface-2); }
.lt-note { display: inline-block; margin-top: .3rem; padding: .1rem .5rem; border-radius: 6px; background: var(--warning-soft); color: var(--warning); font-size: .78rem; }
.lt-note-form { display: flex; gap: .4rem; margin: .45rem 0 0; }
.lt-note-form input { flex: 1; min-width: 0; font-size: .86rem; }
.lt-acts { display: flex; flex: none; align-items: center; gap: 1px; }
.lt-acts form { margin: 0; }
.lt-setup { margin-top: 1rem; }
.lt-setup > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; cursor: pointer; list-style: none; }
.lt-setup > summary::-webkit-details-marker { display: none; }
.lt-setup-body { margin-top: .8rem; font-size: .9rem; line-height: 1.55; }
.lt-setup-body h3 { margin: 1rem 0 .3rem; font-size: .95rem; }
.lt-setup-body code { padding: .05rem .35rem; border-radius: 5px; background: var(--surface-2); font-size: .82rem; overflow-wrap: anywhere; }
.lt-token { display: inline-block; margin-top: .3rem; padding: .3rem .5rem !important; font-size: .9rem !important; cursor: copy; user-select: all; }
.lt-token[data-copied]::after { content: " ✓ zkopírováno"; color: var(--success); font-family: inherit; }
.lt-token-form { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin: .3rem 0 .6rem; }
.lt-dash { padding: .3rem 0; }
.lt-dash-item { display: flex; align-items: center; gap: .6rem; padding: .5rem .9rem; color: var(--text); text-decoration: none; }
.lt-dash-item:hover { background: var(--surface-2); text-decoration: none; }
.lt-dash-item b { display: block; overflow: hidden; font-size: .88rem; text-overflow: ellipsis; white-space: nowrap; }
.lt-dash-item > span:last-child { min-width: 0; }
.lt-dash-item small { color: var(--muted); font-size: .74rem; }
.lt-dash-more { display: block; padding: .4rem .9rem .5rem; font-size: .84rem; }
@media (max-width: 860px) { .lt-add input, .lt-note-form input { font-size: 16px; } .lt-item { padding: .65rem .8rem; } }
/* Na později – nastavení ukládání nenápadně (nastaví se jednou) */
.lt-setup { margin-top: .8rem; padding: 0 .2rem; }
.lt-setup > summary { display: inline-block; color: var(--muted); font-size: .8rem; font-weight: 600; }
.lt-setup > summary:hover { color: var(--primary); }
.lt-setup[open] { padding: .9rem 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.lt-setup[open] > summary { margin-bottom: .2rem; }
.lt-setup-body { font-size: .85rem; }
/* Levé menu – osobní pořadí (✎ u nadpisu Moduly) */
.nav-heading-row { display: flex; align-items: center; justify-content: space-between; }
.nav-edit { width: 22px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: .8rem; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.nav:hover .nav-edit, .nav-edit:focus-visible, .nav-editing .nav-edit { opacity: 1; }
.nav-edit:hover { background: var(--surface-2); color: var(--primary); }
.nav-editing .nav-edit { background: var(--primary); color: #fff; opacity: 1; }
.nav-editing [data-nav-list] > a { position: relative; cursor: grab; outline: 1px dashed var(--border); outline-offset: -1px; }
.nav-editing [data-nav-list] > a::after { content: "⠿"; margin-left: auto; color: var(--muted); }
.nav-editing [data-nav-list] > a .nav-badge { display: none; }
.nav-dragging { opacity: .4; }
.sidebar.collapsed .nav-edit { display: none; }

/* Helpdesk → Převod starého tiketu (helpdesk/import.php) */
.hd-imp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; }
.hd-imp-wide { grid-column: 1 / -1; }
.hd-imp textarea { width: 100%; font: inherit; font-size: .88rem; line-height: 1.45; }
.hd-imp-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem 1.2rem; font-size: .88rem; }
.hd-imp-sum b { flex-basis: 100%; font-size: 1rem; }
.hd-imp-msg { padding-top: .7rem; padding-bottom: .7rem; }
.hd-imp-msg-h { display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) 13rem auto; align-items: end; gap: .6rem; margin-bottom: .5rem; }
.hd-imp-n { align-self: center; font-size: .8rem; color: var(--muted); }
.hd-imp-skip { display: inline-flex; align-items: center; gap: .35rem; padding-bottom: .5rem; font-size: .82rem; white-space: nowrap; cursor: pointer; }
.hd-imp-msg:has(.hd-imp-skip input:checked) textarea, .hd-imp-msg.off textarea { opacity: .4; }
@media (max-width: 700px) {
    .hd-imp-grid { grid-template-columns: minmax(0, 1fr); }
    .hd-imp-msg-h { grid-template-columns: minmax(0, 1fr) auto; }
    .hd-imp-msg-h .field { grid-column: 1 / -1; }
}
.hd-pending { display: inline-block; width: fit-content; padding: 0 .45rem; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: .7rem; font-weight: 700; }
.hd-imp input[type=datetime-local] { width: 100%; padding: .55rem .75rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
@media (max-width: 860px) { .hd-imp input, .hd-imp select, .hd-imp textarea { font-size: 16px; } }   /* iPhone nezvětšuje stránku */
.org-invite { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; margin: 0 0 .6rem; }
.hd-reopen-closed { margin: 0 0 1rem; padding: .7rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; font-size: .88rem; }
.hd-reopen-late { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; color: var(--muted); }

/* Helpdesk – Vzdálená pomoc (AnyDesk): tlačítko v seznamu, řádek v tiketu, okno */
.hd-req-acts { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 860px) { .hd-req-acts { width: 100%; } }
.hd-remote-row { display: flex; align-items: center; gap: .6rem; width: 100%; margin: 0 0 .75rem; padding: .6rem .8rem; font: inherit; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; cursor: pointer; }
.hd-remote-row:hover { border-color: var(--primary); }
.hd-remote-row > span:nth-child(2) { flex: 1; min-width: 0; font-size: .9rem; }
.hd-remote-row small { display: block; font-size: .76rem; color: var(--muted); }
.hd-remote-ico { display: grid; place-items: center; flex: none; width: 32px; height: 32px; color: var(--primary); background: var(--primary-soft); border-radius: 9px; }
.hd-remote-ico .icon { width: 17px; height: 17px; }
.hd-remote h2 { display: flex; align-items: center; gap: .5rem; }
.hd-remote h2 .icon { width: 20px; height: 20px; color: var(--primary); }
.hd-remote-steps { margin: 0 0 1rem; padding: 0; list-style: none; counter-reset: rh; font-size: .9rem; }
.hd-remote-steps li { display: flex; align-items: flex-start; gap: .6rem; margin: .4rem 0; counter-increment: rh; }
.hd-remote-steps li::before { content: counter(rh); display: grid; place-items: center; flex: none; width: 22px; height: 22px; font-size: .75rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 50%; }
.hd-remote-dl { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .6rem; }
.hd-remote-dl .btn { justify-content: center; text-align: center; }
.hd-remote-mobile { display: none; }
/* Poznaný systém: jeho tlačítko hlavní, druhé jen jako odkaz; na telefonu vysvětlení a oba odkazy malé. */
.hd-remote[data-os=win] [data-os-for=mac], .hd-remote[data-os=mac] [data-os-for=win],
.hd-remote[data-os=mobile] .hd-remote-dl .btn { order: 2; padding: .1rem; font-size: .85rem; font-weight: 600; color: var(--primary); background: none; border: 0; box-shadow: none; }
.hd-remote[data-os=mobile] .hd-remote-pc { display: none; }
.hd-remote[data-os=mobile] .hd-remote-mobile { display: block; }
.hd-ib { font-size: 1.05rem; line-height: 1; }   /* barevné ikony (emoji) v liště tiketu */
/* Checklist jako samostatný blok nad Historií */
.hd-tasks-block { margin: 0 0 1rem; }
.hd-tasks-block .hd-tasks { margin: 0; box-shadow: var(--shadow); }
.hd-tasks-block.hd-task-new > summary { display: none; }

/* Helpdesk – úkoly checklistu pro zadavatele */
.hd-task-who { padding: 0 .4rem; border-radius: 999px; background: var(--warning-soft); color: var(--warning); font-size: .68rem; font-style: normal; font-weight: 700; white-space: nowrap; }
.hd-task-forreq { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; color: var(--muted); white-space: nowrap; cursor: pointer; }
.hd-task-forreq input { width: 15px; height: 15px; margin: 0; accent-color: var(--primary); }
.hd-task-add { flex-wrap: wrap; align-items: center; }

/* Helpdesk – karta Vzdálená pomoc v tiketu */
.hd-rc { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: .9rem; margin: 0 0 1rem; padding: 1rem 1.1rem; border: 1.5px solid color-mix(in srgb, var(--primary) 30%, var(--border)); border-radius: 16px; background: var(--primary-soft); }
.hd-rc.ok { border-color: var(--hd-ok-border); background: var(--hd-ok-bg); }
.hd-rc.wait { border-style: dashed; }
.hd-rc-ico { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: var(--primary); color: #fff; font-size: 1.5rem; }
.hd-rc.ok .hd-rc-ico { background: var(--success); }
.hd-rc h3 { margin: 0 0 .15rem; font-size: 1.02rem; }
.hd-rc p { margin: 0 0 .7rem; font-size: .88rem; color: var(--muted); }
.hd-rc-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: .7rem; }
.hd-rc-step { margin: 0; padding: .6rem .7rem; font-size: .84rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.hd-rc-step > b { display: flex; align-items: center; gap: .4rem; margin-bottom: .4rem; font-size: .86rem; }
.hd-rc-step > b i { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .7rem; font-style: normal; }
.hd-rc-dl { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.hd-rc[data-os=win] [data-os-for=mac], .hd-rc[data-os=mac] [data-os-for=win],
.hd-rc[data-os=mobile] .hd-rc-dl .btn { order: 2; padding: 0; font-size: .76rem; font-weight: 600; color: var(--primary); background: none; border: 0; box-shadow: none; }
.hd-rc[data-os=mobile] .hd-remote-pc { display: none; }
.hd-rc[data-os=mobile] .hd-remote-mobile { display: block; }
.hd-rc-num { display: flex; gap: .4rem; }
.hd-rc-num input { width: 100%; min-width: 0; padding: .35rem .4rem; font-size: 1.05rem; font-weight: 700; letter-spacing: .06em; text-align: center; }
.hd-rc-foot { font-size: .76rem; color: var(--muted); }
.hd-rc-big { font-size: 1.6rem; font-weight: 800; letter-spacing: .1em; }
.hd-rc-acts { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .5rem; }
[data-copy][data-copied]::after { content: " ✓"; }
@media (max-width: 760px) {
    .hd-rc { grid-template-columns: minmax(0, 1fr); }
    .hd-rc-ico { display: none; }
    .hd-rc-steps { grid-template-columns: minmax(0, 1fr); }
    .hd-rc-num input { font-size: 16px; }
}
.hd-anydesk { font-size: .8rem; font-weight: 400; white-space: nowrap; }
.guest-forgot { margin: .9rem 0 0; text-align: center; font-size: .88rem; }
/* Seznam uživatelů – role na řádku, organizace pod ní */
.user-role { display: block; line-height: 1.3; }
.user-role + .user-role { margin-top: .35rem; }
.user-role b { font-weight: 600; white-space: nowrap; }
.user-role small { display: block; font-size: .78rem; color: var(--muted); }
.user-role-more { font-weight: 600; cursor: help; }
/* Karta organizace: klik kamkoli otevře detail, odkaz na web je zvlášť */
.org-card { position: relative; }
.org-card-link { color: inherit; }
.org-card-link:hover { text-decoration: none; }
.org-card-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.org-web { position: relative; z-index: 1; }
.org-facts dd .org-web { display: block; width: fit-content; }

/* Soupis práce – DPH */
.pc-sum .vat-sum { font-weight: 700; }
.pc-vat-note { margin: 6px 0 0; font-size: 8.5pt; color: #6b7486; }
/* Sazby organizace – přepočet ceny s DPH (pole se neodesílá) */
.hd-vat { display: flex; align-items: center; gap: .4rem; margin-top: .3rem; font-size: .8rem; color: var(--muted); }
.hd-vat small { white-space: nowrap; }
.hd-vat input { width: 7.5rem; padding: .25rem .5rem; font-size: .84rem; }

/* Soupisy – pravidelné položky: tabulka (položka · jak často · příště · částka) a okno úpravy */
.hd-rec-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .4rem; }
.hd-rec-head .field-label { margin: 0; }
.hd-rec-head .btn .icon { width: 14px; height: 14px; }
.hd-rec-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.hd-rec-table th { padding: 0 .5rem .35rem; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-align: left; text-transform: uppercase; color: var(--muted); }
.hd-rec-table td { padding: .45rem .5rem; border-top: 1px solid var(--border); vertical-align: middle; }
.hd-rec-table .r { text-align: right; }
.hd-rec-table .n { font-weight: 600; }
.hd-rec-table .a { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hd-rec-table .x { white-space: nowrap; }
.hd-rec-table td small { color: var(--muted); font-size: .76rem; }
.hd-rec-table .acts { white-space: nowrap; }
.hd-rec-table .acts form { display: inline-block; margin: 0; }
.hd-rec-table .acts .icon-btn { display: inline-grid; width: 30px; height: 30px; font-size: .9rem; }
.hd-rec-table tr.off td { color: var(--muted); }
.hd-rec-table tr.off .hd-rec-pd { opacity: .55; }
.hd-rec-pd { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; background: #f1f3f7; color: #4b5563; }
.hd-rec-pd.p3 { background: #e8eefc; color: #1f4fd1; }
.hd-rec-pd.p6 { background: #ede9fe; color: #6d28d9; }
.hd-rec-pd.p12 { background: #e3f5eb; color: #1a7f4b; }
.hd-rec-g2 { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: .7rem; margin-bottom: .7rem; }
.hd-rec-g2.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hd-rec-g2 .opt-chips { margin: 0; }
.hd-rec-dlg input[type=month] { width: 100%; padding: .5rem .7rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.hd-rec-hint { margin: 0 0 .7rem; padding: .5rem .7rem; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: .84rem; font-weight: 600; }
@media (max-width: 700px) {
    .hd-rec-table thead { display: none; }
    .hd-rec-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem .6rem; padding: .5rem 0; border-top: 1px solid var(--border); }
    .hd-rec-table td { padding: 0; border: 0; }
    .hd-rec-table .n { grid-column: 1; }
    .hd-rec-table .a { grid-column: 2; grid-row: 1; }
    .hd-rec-table .x { font-size: .8rem; color: var(--muted); }
    .hd-rec-table .acts { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
    .hd-rec-g2, .hd-rec-g2.even { grid-template-columns: minmax(0, 1fr); }
    .hd-rec-dlg input { font-size: 16px; }
}
.hd-rec-vars { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin: -.3rem 0 .6rem; font-size: .78rem; color: var(--muted); }
.hd-rec-vars button { padding: .1rem .5rem; font: inherit; font-size: .76rem; color: var(--primary); background: var(--primary-soft); border: 0; border-radius: 999px; cursor: pointer; }
.hd-rec-preview { margin: 0 0 .7rem; font-size: .82rem; color: var(--muted); }
/* Pravidelná položka jako součást paušálu */
.hd-rec-flat { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); }
.hd-rec-table .a.flat { font-weight: 600; color: var(--muted); }

/* Soupisy – sazby organizace: dlaždice způsobu účtování, tabulka cen (bez DPH / s DPH), zvýrazněný řádek podle způsobu */
.hd-rt-sum { display: flex; flex-wrap: wrap; gap: .3rem .4rem; }
.hd-rt-sum > span { padding: .1rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .8rem; white-space: nowrap; }
.hd-rt-sec { margin: 0 0 .5rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hd-rt-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.hd-rt-mode { position: relative; display: block; padding: .6rem .7rem; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; }
.hd-rt-mode input { position: absolute; opacity: 0; pointer-events: none; }
.hd-rt-mode b { display: block; font-size: .9rem; }
.hd-rt-mode small { display: block; margin-top: .1rem; font-size: .76rem; line-height: 1.3; color: var(--muted); }
.hd-rt-mode:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); }
.hd-rt-mode:has(input:checked) b { color: var(--primary); }
.hd-rt-mode:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: 2px; }
.hd-rt-head, .hd-rt-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 150px; gap: .7rem; align-items: center; }
.hd-rt-head { padding: 0 .7rem .3rem; }
.hd-rt-head span { font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-align: right; text-transform: uppercase; color: var(--muted); }
.hd-rt-row { margin-top: .25rem; padding: .55rem .7rem; border: 1.5px solid transparent; border-radius: 12px; cursor: default; }
.hd-rt-row .n b { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .92rem; }
.hd-rt-row .n small { display: block; font-size: .76rem; color: var(--muted); }
.hd-rt-tag { display: none; padding: .05rem .45rem; border-radius: 999px; background: var(--primary); color: #fff; font-size: .64rem; font-style: normal; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.hd-rt-tag.off { background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
.hd-rt-inp { display: flex; align-items: center; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); }
.hd-rt-inp input { width: 100%; min-width: 0; padding: .45rem .3rem .45rem .6rem; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: .95rem; font-weight: 700; text-align: right; }
.hd-rt-inp input:focus { box-shadow: none; }
.hd-rt-inp:focus-within { border-color: var(--primary); }
.hd-rt-inp i { padding: 0 .6rem 0 .2rem; font-size: .8rem; font-style: normal; white-space: nowrap; color: var(--muted); }
.hd-rt-inp.vat { background: var(--surface-2); }
.hd-rt-inp.vat input { font-weight: 500; }
/* Podle zvoleného způsobu: řádek paušálu jen u paušálu; hlavní řádek modře se štítkem „účtuje se“, ostatní u paušálu tlumené */
.hd-rt:not(:has(input[name=billing_mode][value=flat]:checked)) [data-row=flat] { display: none; }
.hd-rt-row small[data-for] { display: none; }
.hd-rt:has(input[value=first_hour]:checked) small[data-for=first_hour],
.hd-rt:has(input[value=quarter]:checked) small[data-for=quarter],
.hd-rt:has(input[value=flat]:checked) small[data-for=flat] { display: block; }
.hd-rt:has(input[value=flat]:checked) [data-row=flat],
.hd-rt:not(:has(input[value=flat]:checked)) [data-row=hourly] { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 30%, var(--border)); }
.hd-rt:has(input[value=flat]:checked) [data-row=flat] .n b,
.hd-rt:not(:has(input[value=flat]:checked)) [data-row=hourly] .n b { color: var(--primary); }
.hd-rt:has(input[value=flat]:checked) [data-row=flat] .hd-rt-tag:not(.off),
.hd-rt:not(:has(input[value=flat]:checked)) [data-row=hourly] .hd-rt-tag:not(.off) { display: inline-block; }
.hd-rt:has(input[value=flat]:checked) :is([data-row=hourly], [data-row=km]) .hd-rt-tag.off { display: inline-block; }
.hd-rt:has(input[value=flat]:checked) :is([data-row=hourly], [data-row=km]) .n b { font-weight: 600; color: var(--muted); }
.hd-rt:has(input[value=flat]:checked) :is([data-row=hourly], [data-row=km]) .hd-rt-inp input { font-weight: 500; color: var(--muted); }
.hd-rt-foot { display: grid; grid-template-columns: 150px 200px; gap: .7rem; align-items: end; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.hd-rt-save { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: 1rem 0 0; }
.hd-rt-save small { font-size: .78rem; }
@media (max-width: 640px) {
    .hd-rt-modes { grid-template-columns: minmax(0, 1fr); }
    .hd-rt-head, .hd-rt-row { grid-template-columns: minmax(0, 1fr) 104px 104px; gap: .4rem; }
    .hd-rt-row { padding: .5rem .4rem; }
    .hd-rt-inp input { font-size: 16px; padding-left: .3rem; }
    .hd-rt-inp i { padding-right: .35rem; font-size: .7rem; }
    .hd-rt-foot { grid-template-columns: 1fr 1fr; }
}
.hd-rt .hd-rt-inp.vat input { font-weight: 500; }
.hd-rec-until { display: block; }
.hd-rec-until-f { margin-bottom: .7rem; }
.hd-rec-until-f input[type=date] { max-width: 240px; }
/* Pravidelná položka – rozpis ceny: cena za jednotku · množství · jednotka · celkem */
.hd-rec-name { margin-bottom: .7rem; }
.hd-rec-price { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) minmax(0, 1fr) minmax(0, 1.2fr); gap: .6rem; margin-bottom: .7rem; }
.hd-rec-price input { width: 100%; }
.hd-rec-price .hd-rt-inp input { font-weight: 600; }
@media (max-width: 700px) { .hd-rec-price { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .hd-rec-price input { font-size: 16px; } }
.o2-inv-mail { margin-top: .4rem; }
.hd-bill-inv { margin: .5rem 0; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.hd-bill-inv b { color: var(--text); font-weight: 600; }

/* Organizace → Kontakt → Lidé: tři role ve stejném řádku (role · kolečko · jméno a kontakt · výběr) */
.o2-sec { margin-bottom: .4rem; font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.o2-ppl { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; }
.o2-pr { display: grid; grid-template-columns: 150px 40px minmax(0, 1fr) auto; gap: .3rem .75rem; align-items: center; padding: .6rem .8rem; border-top: 1px solid var(--border); }
.o2-pr:first-child { border-top: 0; }
.o2-pr-role b { display: block; font-size: .88rem; }
.o2-pr-role small { display: block; font-size: .74rem; line-height: 1.25; color: var(--muted); }
.o2-pr .o2-person-t b { font-size: .92rem; }
.o2-pr select { width: auto; max-width: 190px; padding: .3rem .5rem; font-size: .82rem; }
.o2-pr.same .o2-person-av { color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); }
.o2-pr.same .o2-person-t b { font-weight: 500; color: var(--muted); }
.o2-pr-mails { grid-column: 3 / -1; min-height: 0; }
.o2-pr-mails .o2-dom-add input[type=text] { width: 15rem; max-width: 100%; }
@media (max-width: 640px) {
    .o2-pr { grid-template-columns: 40px minmax(0, 1fr); }
    .o2-pr-role, .o2-pr select, .o2-pr-mails { grid-column: 1 / -1; }
    .o2-pr select { max-width: none; width: 100%; font-size: 16px; }
    .o2-pr-mails .o2-dom-add input[type=text] { font-size: 16px; }
}
/* Přepínač měsíce soupisů: roletka místo popisku + „Dnes“ */
.hd-month { flex-wrap: wrap; }
.hd-month-pick { width: auto; min-width: 150px; padding: .3rem 1.6rem .3rem .7rem; font-size: 1.02rem; font-weight: 700; text-align: center; text-align-last: center; border-color: transparent; background-color: transparent; cursor: pointer; }
.hd-month-pick:hover, .hd-month-pick:focus { border-color: var(--border); background-color: var(--surface); }
.hd-month-today { padding: .2rem .7rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .8rem; font-weight: 700; }
.hd-month-today:hover { text-decoration: none; filter: brightness(.97); }

/* GPS – auta jako autíčko v bílém kroužku (obvod = stav), moje poloha modrá tečka s popiskem „Vy“ – ať se nepletou */
.gps-pin-in { transform: translate(-50%, calc(-100% + 15px)); }
.gps-pin .gps-pin-in i, .gps-pin.multi .gps-pin-in i { position: relative; display: grid; place-items: center; width: 30px; height: 30px; font-size: 16px; font-style: normal; line-height: 1; background: #fff; border: 3px solid #a3abb9; }
.gps-pin.st-go .gps-pin-in i { border-color: #2f8a3e; }
.gps-pin.st-idle .gps-pin-in i { border-color: #c98a0b; }
.gps-pin.st-stop .gps-pin-in i { border-color: #1f4fd1; }
.gps-pin.st-old .gps-pin-in i, .gps-pin.st-none .gps-pin-in i { border-color: #a3abb9; filter: grayscale(.6); }
.gps-pin-in i em { position: absolute; top: -8px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; font-size: .64rem; font-style: normal; font-weight: 800; line-height: 17px; text-align: center; color: #fff; background: #1b2333; border: 1.5px solid #fff; border-radius: 9px; }
.gps-me b { position: absolute; top: 12px; left: 0; padding: 0 .4rem; transform: translateX(-50%); font-size: .66rem; font-weight: 800; line-height: 1.5; color: #fff; background: #1a73e8; border: 1.5px solid #fff; border-radius: 999px; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
/* Helpdesk – seznam řešitele: přepínač „Vyřešené“ (zobrazit / skrýt tikety čekající na potvrzení) */
.hd-res-toggle { display: inline-flex; align-items: center; gap: .35rem; margin-right: auto; padding: .15rem .6rem .15rem .3rem; border: 1px solid var(--border); border-radius: 999px; font-size: .78rem; font-weight: 600; color: var(--muted); white-space: nowrap; }
.hd-res-toggle:hover { text-decoration: none; border-color: var(--primary); }
.hd-res-toggle i { position: relative; width: 26px; height: 15px; border-radius: 999px; background: #cbd2de; transition: background .15s; }
.hd-res-toggle i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: left .15s; }
.hd-res-toggle.on { color: var(--text); }
.hd-res-toggle.on i { background: var(--success); }
.hd-res-toggle.on i::after { left: 13px; }

/* Helpdesk – uzavřený požadavek u zadavatele: žlutý pruh „Něco nefunguje?“ (do 72 h) / šedý po lhůtě */
.hd-reback { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0 0 1rem; padding: .9rem 1.1rem; border: 1.5px solid #f1d48a; border-radius: 16px; background: var(--warning-soft); }
.hd-reback-ico { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: #f6e3ad; font-size: 1.3rem; }
.hd-reback-t { flex: 1; min-width: 220px; }
.hd-reback-t b { display: block; font-size: 1rem; }
.hd-reback-t em { display: inline-block; margin-left: .3rem; padding: 0 .5rem; border-radius: 999px; background: #f6e3ad; color: #7a5600; font-size: .74rem; font-style: normal; font-weight: 800; vertical-align: 1px; }
.hd-reback-t small { font-size: .84rem; color: var(--warning); }
.hd-reback-btn { background: #9a6200; color: #fff; font-weight: 700; }
.hd-reback-btn:hover { filter: brightness(.95); }
.hd-reback.late { border-color: var(--border); background: var(--surface); }
.hd-reback.late .hd-reback-ico { background: var(--surface-2); }
.hd-reback.late .hd-reback-t small { color: var(--muted); }
@media (max-width: 640px) { .hd-reback .btn { width: 100%; justify-content: center; } }

/* ---- Kdo je online (Presence): tečka u avataru, pruh podpory u zadavatele, přehled u řešitele ---- */
.onl-av { position: relative; display: inline-grid; flex: none; }
.onl-av::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 11px; height: 11px; box-sizing: border-box; border: 2px solid var(--surface); border-radius: 50%; background: #b6bdc9; }
.onl-av.on::after { background: #1fb760; }
.onl-av.away::after { background: #f0a020; }
.onl-av.none::after { display: none; }
.onl-dot { display: inline-block; flex: none; width: 8px; height: 8px; margin-right: .3rem; border-radius: 50%; background: #1fb760; vertical-align: 1px; }
.onl-dot.off { background: #b6bdc9; }
.onl-st { color: #11703a !important; font-weight: 700; white-space: nowrap; }
.onl-st.off { color: var(--muted) !important; font-weight: 600; }
.onl-tag { display: inline-flex; align-items: center; font-size: .74rem; font-weight: 700; color: #11703a; }
.onl-tag .onl-dot { margin-right: .2rem; }
.onl-sup { display: flex; align-items: center; gap: .7rem; padding: .55rem .9rem; margin-bottom: .8rem; border: 1px solid #bfe8cf; border-radius: 14px; background: #f1fbf5; }
.onl-sup.off { border-color: var(--border); background: var(--surface); }
.onl-sup-t { flex: 1; min-width: 0; font-size: .84rem; line-height: 1.3; }
.onl-sup-t b { display: block; font-size: .92rem; }
.onl-sup-t small { color: var(--muted); font-size: .82rem; }
.onl-avs { display: flex; flex: none; }
.onl-avs .onl-av + .onl-av { margin-left: -6px; }
.onl-avs .hd-av { box-sizing: content-box; border: 2px solid #fff; }
.onl-pill { position: relative; flex: none; }
.onl-pill > summary { display: flex; align-items: center; gap: .25rem; height: 100%; padding: .4rem .65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: .82rem; list-style: none; white-space: nowrap; cursor: pointer; }
.onl-pill > summary::-webkit-details-marker { display: none; }
.onl-pill > summary .onl-dot { margin-right: .1rem; }
.onl-pill > summary span { color: var(--muted); }
.onl-menu { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 45; width: 360px; max-width: calc(100vw - 2rem); max-height: min(70vh, 560px); overflow: auto; overscroll-behavior: contain; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.onl-menu h3 { margin: 0 0 .2rem; font-size: .98rem; }
.onl-menu h5 { display: flex; justify-content: space-between; margin: .7rem 0 .3rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.onl-row { display: flex; align-items: center; gap: .55rem; padding: .3rem 0; font-size: .86rem; }
.onl-row-t { display: flex; flex: 1; flex-direction: column; min-width: 0; line-height: 1.25; }
.onl-row-n { overflow-wrap: anywhere; }   /* jméno vždy celé, organizace v závorce za ním (dlouhá se zalomí) */
.onl-row b { font-weight: 600; }
.onl-row-org { color: var(--muted); font-size: .8rem; }
.onl-row small { color: var(--muted); font-size: .74rem; }
.onl-row.off b { color: var(--text); font-weight: 500; }
.onl-none { margin: 0; color: var(--muted); font-size: .8rem; }
.onl-recent { margin-top: .5rem; }
.onl-recent > summary { color: var(--primary); font-size: .8rem; font-weight: 600; cursor: pointer; }
@media (max-width: 860px) {
    .onl-pill > summary { height: 40px; padding: 0 .6rem; }
    .onl-pill > summary span { display: none; }
    .onl-menu { position: fixed; left: .5rem; right: .5rem; top: auto; bottom: max(.5rem, env(safe-area-inset-bottom)); z-index: 1100; width: auto; max-height: 70vh; border-radius: 16px; box-shadow: 0 -8px 30px rgba(0, 0, 0, .25); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
}

/* ---- Helpdesk → Kategorie: kdo požadavek uvidí (pilulka na řádku + okno hd-cat-vis) ---- */
.hd-cat-vis { display: inline-flex; align-items: center; gap: .3rem; max-width: 190px; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font: inherit; font-size: .78rem; font-weight: 600; white-space: nowrap; cursor: pointer; }
.hd-cat-vis span { overflow: hidden; text-overflow: ellipsis; }
.hd-cat-vis.on { border-color: transparent; background: var(--primary-soft); color: var(--primary); }
.hd-cv-dlg { width: 460px; }
.hd-cv-dlg h2 { margin: 0 0 .2rem; font-size: 1.05rem; }
.hd-cv-dlg .opt-chips { margin: .7rem 0; }
.hd-cv-box { max-height: 46vh; overflow: auto; margin-bottom: .8rem; padding-right: .2rem; }
.hd-cv-grp { margin: .7rem 0 .25rem; color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.hd-cv-grp:first-child { margin-top: 0; }
.hd-cv-ck { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; font-size: .88rem; cursor: pointer; }
.hd-cv-ck small { margin-left: auto; color: var(--muted); font-size: .76rem; white-space: nowrap; }
.hd-cv-box input[type=search] { width: 100%; margin-top: .3rem; padding: .45rem .65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; font-size: .88rem; }
@media (max-width: 860px) { .hd-cv-box input[type=search] { font-size: 16px; } }
.hd-cat-row .drag-handle, .hd-cat-head .drag-handle { margin-right: 0; font-size: 1.05rem; }
.hd-cat-row.dragging, .hd-cat-card.dragging { opacity: .55; }

/* Svátek v záhlaví vedle data */
.nd-name { color: var(--text); }

/* Formuláře helpdesku: typ pole „Mezera“ – prázdné místo (celá šířka = volný řádek) */
.hd-form-gap { min-height: 1.6rem; }
.hd-ff-row.is-space { border-style: dashed; background: none; }
.hd-ff-row.is-space .hd-ff-req, .hd-ff-row.is-space [data-n=hint], .hd-ff-row.is-space [data-n=options] { display: none; }
.hd-ff-row.is-space .hd-ff-top input { color: var(--muted); font-weight: 500; }

/* ---- Formuláře helpdesku: zaškrtávací seznam (editor, nový požadavek, zadání) ---- */
.hd-ff-checks { margin-top: .1rem; }
.hd-ff-opt { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr) 1.6rem; gap: .3rem; align-items: center; margin-top: .3rem; }
.hd-ff-opt-head { margin-top: .2rem; color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hd-ff-checks .link-btn { margin-top: .4rem; font-size: .8rem; font-weight: 600; }
.hd-ff-row.is-checks .hd-ff-req { display: none; }
.hd-form-checks { display: flex; flex-direction: column; gap: .35rem; }
.hd-form-check { display: flex; align-items: center; gap: .55rem; padding: .45rem .65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-weight: 500; cursor: pointer; }
.hd-form-check:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); font-weight: 600; }
.hd-form-check input { flex: none; width: 18px; height: 18px; margin: 0; }
.hd-fd-yes { color: var(--success); }
.hd-fd-no { color: var(--muted); font-weight: 500; }

/* ---- Checklist: štítek volby, otázka Ano / Ne zadavateli ---- */
.hd-task-tag2, .hd-task-ans { padding: 0 .4rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .68rem; font-style: normal; font-weight: 700; white-space: nowrap; }
.hd-task-ans.wait { background: var(--warning-soft); color: var(--warning); }
.hd-task-ans.yes { background: var(--success-soft, #dff5e6); color: var(--success); }
.hd-task.no .hd-task-title { color: var(--muted); text-decoration: line-through; }
.hd-task-ro.no .hd-task-mark { border-color: var(--border); background: var(--surface-2); color: var(--muted); }
.hd-task-q { display: flex; flex-direction: column; gap: .15rem; margin: .45rem 0; padding: .7rem .8rem; border: 1.5px solid #f1d48a; border-radius: 14px; background: #fff8e6; color: #1b2333; }
.hd-task-q small { color: #7a5600; font-size: .78rem; }
.hd-task-q b { font-size: .95rem; }
.hd-task-q input[type=text] { width: 100%; margin: .45rem 0; }
.hd-task-q-btns { display: flex; gap: .4rem; }
.hd-task-q-btns .btn { flex: 1; justify-content: center; }
.hd-task-q-btns .btn-ghost { border: 1.5px solid #c9d1de; background: #fff; color: #1b2333; }
.hd-task-menu form + form { margin-top: 0; }
@media (max-width: 860px) { .hd-task-q input[type=text] { font-size: 16px; } }

/* Nový požadavek: předmět zamčený vzorem formuláře */
input.hd-subj-locked { background: var(--surface-2); color: var(--muted); cursor: default; }

/* Reakce na telefonu: kdo smajlík dal */
.hd-rx-chip[data-ro] { cursor: default; }
.hd-rx-who { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; flex-basis: 100%; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); font-size: .8rem; }
.hd-rx-who .link-btn { font-size: .78rem; font-weight: 600; }

/* Helpdesk – živé obnovení: tlačítko „Je tu novinka“ */
.hd-live-bar { position: fixed; top: calc(.6rem + env(safe-area-inset-top)); left: 50%; z-index: 95; padding: .45rem 1rem; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font: inherit; font-size: .86rem; font-weight: 700; box-shadow: 0 8px 24px rgba(16, 24, 40, .25); transform: translateX(-50%); cursor: pointer; }

/* ---- Soupis: převod nevyfakturovaného měsíce do dalšího (oddíly po měsících) ---- */
.hd-st-carry { margin: -.2rem 0 .2rem; color: var(--primary); font-size: .8rem; font-weight: 600; }
.pc-sec td { padding-top: .5rem; border-bottom: 2px solid #1b2333; font-weight: 700; }

/* Helpdesk – „právě píše“ nad polem na psaní: modrý pruh s avatarem, interní komentář oranžově */
.hd-typing { margin: 0 0 .5rem; }
.hd-typing-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; border: 1px solid #c6d7fb; border-radius: 12px; background: #eaf1ff; color: #1f4fd1; font-size: .9rem; font-weight: 600; }
.hd-typing-row + .hd-typing-row { margin-top: .35rem; }
.hd-typing-row b { font-weight: 800; }
.hd-typing-row.int { border-color: #f1d48a; background: #fff4dc; color: #8a5a00; }
.hd-typing-avs { display: flex; flex: none; }
.hd-typing-avs .hd-av + .hd-av { margin-left: -6px; }
.hd-typing-dots { display: inline-flex; flex: none; gap: 4px; }
.hd-typing-dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .3; animation: hd-typing-dot 1.2s infinite; }
.hd-typing-dots i:nth-child(2) { animation-delay: .2s; }
.hd-typing-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes hd-typing-dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.hd-typing-pill { position: fixed; left: 50%; bottom: 1.2rem; z-index: 94; max-width: calc(100vw - 2rem); padding: .5rem 1rem; overflow: hidden; border: 0; border-radius: 999px; background: #1f4fd1; color: #fff; font: inherit; font-size: .86rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 8px 24px rgba(16, 24, 40, .25); transform: translateX(-50%); cursor: pointer; }
.hd-typing-tag { display: inline-flex; align-items: center; gap: .35rem; padding: .12rem .6rem; border-radius: 999px; background: #1f4fd1; color: #fff; font-size: .76rem; font-weight: 800; white-space: nowrap; }
.hd-typing-tag .hd-typing-dots i { width: 5px; height: 5px; }
.hd-item.typing { background: #eaf1ff !important; box-shadow: inset 4px 0 0 #1f4fd1; animation: hd-typing-row 1.6s ease-in-out infinite; }
@keyframes hd-typing-row { 0%, 100% { background-color: #eaf1ff; } 50% { background-color: #d6e4ff; } }
@media (max-width: 860px) { .hd-typing-pill { bottom: calc(5rem + env(safe-area-inset-bottom)); } }
:root[data-theme="dark"] .hd-typing-row { border-color: #2c4a8f; background: #1b2a4d; color: #9db9ff; }
:root[data-theme="dark"] .hd-item.typing { background: #1b2a4d !important; animation: none; }
:root[data-theme="dark"] .hd-typing-row.int { border-color: #6b5320; background: #3a2e12; color: #f1c96a; }

/* Dlouhý název organizace ve štítku se v kartách tiketu zalomí místo přetečení */
.hd-card .org-tag, .hd-item .org-tag, .hd-person-chosen .org-tag { max-width: 100%; border-radius: 10px; white-space: normal; overflow-wrap: anywhere; }
.hd-person > span:last-child { flex: 1; }

/* Pozvaný k tiketu, který ještě nepřijal pozvánku do IS */
.hd-av-pend { background: var(--surface-2); color: var(--muted); border: 1px dashed var(--border); }

/* Výběr člověka s našeptáváním (okno Přizvat k tiketu) */
.hd-pick { min-width: 0; }
.hd-pick input[type=search] { width: 100%; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font: inherit; font-size: .9rem; }
.hd-pick-list { display: flex; flex-direction: column; max-height: 230px; margin-top: .3rem; overflow: auto; overscroll-behavior: contain; }
.hd-pick-it { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 9px; font-size: .88rem; cursor: pointer; }
.hd-pick-it:hover { background: var(--surface-2); }
.hd-pick-it:has(input:checked) { background: var(--primary-soft); font-weight: 600; }
.hd-pick-it input { flex: none; margin: 0; }
.hd-pick-it span { min-width: 0; overflow-wrap: anywhere; }
.hd-pick-it small { margin-left: auto; padding-left: .5rem; color: var(--muted); font-size: .76rem; text-align: right; }
.hd-pick-none { margin: .3rem .5rem; }
@media (max-width: 860px) { .hd-pick input[type=search] { font-size: 16px; } }

/* Helpdesk zadavatele s „Vedením organizace“: přepínač Moje / Celá organizace, cizí požadavek jen ke čtení */
.hd-scope { display: inline-flex; gap: .2rem; margin-bottom: .7rem; padding: .2rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.hd-scope a { padding: .25rem .9rem; border-radius: 999px; color: var(--muted); font-size: .84rem; font-weight: 700; text-decoration: none; }
.hd-scope a.on { background: var(--primary); color: #fff; }
.hd-viewonly { display: flex; align-items: center; gap: .65rem; margin: 0 0 .7rem; padding: .6rem .8rem; border: 1px solid #c6d7fb; border-radius: 12px; background: #eaf1ff; color: #1f4fd1; font-size: .9rem; }
.hd-viewonly-ico { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #1f4fd1; font-size: .95rem; }
.hd-viewonly b { display: block; font-weight: 800; }
.hd-viewonly small { display: block; font-size: .82rem; font-weight: 600; opacity: .85; }
:root[data-theme="dark"] .hd-viewonly { border-color: #2c4a8f; background: #1b2a4d; color: #9db9ff; }

/* ---- Seznam tiketů řešitele: kompaktní zobrazení ve sloupcích (jen počítač bez otevřeného tiketu) ---- */
.hd-cmp, .hd-cmp-legend, .hd-viewseg { display: none; }
@media (min-width: 861px) {
    .hd:not(.has-ticket) .hd-list-title { flex: 0 0 auto; min-width: max-content; }   /* nadpis, přepínače a Nový se nesmí mačkat */
    .hd:not(.has-ticket) .hd-viewseg { display: inline-flex; flex: none; white-space: nowrap; overflow: hidden; border: 1px solid var(--border); border-radius: 9px; font-size: .78rem; font-weight: 700; }
    .hd-viewseg a { padding: .28rem .65rem; color: var(--muted); text-decoration: none; }
    .hd-viewseg a.on { background: var(--primary); color: #fff; }
    .hd:not(.has-ticket) .hd-items.compact .hd-item { display: block; padding: 0; }
    .hd:not(.has-ticket) .hd-items.compact .hd-item > .hd-item-ico, .hd:not(.has-ticket) .hd-items.compact .hd-item > .hd-item-body { display: none; }
    .hd:not(.has-ticket) .hd-items.compact .hd-cmp { display: grid; grid-template-columns: 14px var(--cmp-num, 88px) minmax(0, 1fr) 28px var(--cmp-who, 170px) var(--cmp-time, 92px); gap: .75rem; align-items: center; padding: .42rem .9rem; font-size: .88rem; }
    .hd:not(.has-ticket) .hd-items.compact .hd-cmp-head { position: sticky; top: 0; z-index: 3; padding-top: .35rem; padding-bottom: .35rem; border-bottom: 1px solid var(--border); background: var(--surface-2); color: var(--muted); font-size: .66rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
    .hd:not(.has-ticket) .hd-items.compact .hd-cmp-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; padding: .5rem .9rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .76rem; }
}
.hd-cmp-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.hd-cmp-dot { display: inline-block; flex: none; width: 11px; height: 11px; border-radius: 50%; background: var(--primary); }
.hd-cmp-dot.d-q { background: var(--danger); }
.hd-cmp-dot.d-wait { background: #f0a020; }
.hd-cmp-dot.d-snz, .hd-cmp-dot.d-off { background: #b6bdc9; }
.hd-cmp-dot.d-done { background: #1fb760; }
.hd-cmp-subj { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.hd-cmp-subj b { min-width: 0; overflow: hidden; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.hd-item.unread .hd-cmp-subj b, .hd-item.queue .hd-cmp-subj b { font-weight: 800; }
.hd-cmp-tags { display: flex; flex: none; align-items: center; gap: .3rem; max-width: 55%; overflow: hidden; }
.hd-cmp-tags > * { flex: none; }
.hd-cmp-org { width: 26px; height: 26px; border-radius: 8px; font-size: .6rem; cursor: pointer; }
.hd-cmp-who { overflow: hidden; color: var(--text); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.hd-cmp-who small { color: var(--muted); }
.hd-cmp-time { color: var(--muted); font-size: .78rem; text-align: right; white-space: nowrap; }
.hd-cmp [data-tip] { position: relative; cursor: pointer; }
.hd-items.compact .hd-item:has([data-tip]:hover), .hd-items.compact .hd-item:has(.tip-on) { z-index: 6; }   /* popisek nad dalšími řádky */
.hd-cmp [data-tip]:hover::after, .hd-cmp [data-tip].tip-on::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 6px); z-index: 30; padding: .3rem .55rem; border-radius: 8px; background: #1b2333; color: #fff; font: 600 .76rem/1.3 system-ui, sans-serif; letter-spacing: 0; text-transform: none; white-space: nowrap; box-shadow: 0 6px 18px rgba(0, 0, 0, .2); transform: translateX(-50%); }
.hd-cmp .hd-cmp-dot[data-tip]:hover::after, .hd-cmp .hd-cmp-dot[data-tip].tip-on::after { left: 0; transform: none; }

/* Kompaktní seznam na telefonu (volba v nabídce ⋯): dva řádky – puntík · předmět · značka organizace · čas / zadavatel · štítky; číslo až v tiketu */
@media (max-width: 860px) {
    .hd-items.compact-m .hd-item { display: block; padding: 0; }
    .hd-items.compact-m .hd-item > .hd-item-ico, .hd-items.compact-m .hd-item > .hd-item-body { display: none; }
    .hd-items.compact-m .hd-cmp { display: grid; grid-template-columns: 12px auto minmax(0, 1fr) 26px auto; gap: .2rem .5rem; align-items: center; padding: .55rem .75rem; font-size: .9rem; }
    .hd-items.compact-m .hd-cmp-head, .hd-items.compact-m .hd-cmp .hd-id, .hd-items.compact-m .hd-cmp-noorg { display: none; }
    .hd-items.compact-m .hd-cmp-dot { grid-area: 1 / 1; }
    .hd-items.compact-m .hd-cmp-subj { display: contents; }
    .hd-items.compact-m .hd-cmp-subj b { grid-area: 1 / 2 / 2 / 4; }
    .hd-items.compact-m .hd-cmp-org { grid-area: 1 / 4; width: 24px; height: 24px; }
    .hd-items.compact-m .hd-cmp-time { grid-area: 1 / 5; min-width: 40px; font-size: .74rem; }
    .hd-items.compact-m .hd-cmp-who { grid-area: 2 / 2; max-width: 45vw; color: var(--muted); font-size: .78rem; }
    .hd-items.compact-m .hd-cmp-tags { grid-area: 2 / 3 / 3 / 6; max-width: none; }
    .hd-items.compact-m .hd-cmp-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; padding: .5rem .75rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .72rem; }
    .hd-items.compact-m .hd-cmp [data-tip]:hover::after, .hd-items.compact-m .hd-cmp [data-tip].tip-on::after { left: auto; right: 0; width: max-content; max-width: 72vw; white-space: normal; transform: none; }
    .hd-items.compact-m .hd-cmp .hd-cmp-dot[data-tip].tip-on::after, .hd-items.compact-m .hd-cmp .hd-cmp-dot[data-tip]:hover::after { left: 0; right: auto; }
    .hd-items.compact-m .hd-item:has(.tip-on) { z-index: 6; }
}
/* Priorita v kompaktním seznamu (počítač i telefon): Kritická = celý řádek červeně, Vysoká = oranžový pruh vlevo */
@media (min-width: 861px) {
    .hd:not(.has-ticket) .hd-items.compact .hd-item.crit { background: #fdecec; box-shadow: inset 4px 0 0 #e5484d; }
    .hd:not(.has-ticket) .hd-items.compact .hd-item.high { box-shadow: inset 4px 0 0 #f0a020; }
}
@media (max-width: 860px) {
    .hd-items.compact-m .hd-item.crit { background: #fdecec; box-shadow: inset 4px 0 0 #e5484d; }
    .hd-items.compact-m .hd-item.high { box-shadow: inset 4px 0 0 #f0a020; }
}
@media (min-width: 861px) { :root[data-theme="dark"] .hd:not(.has-ticket) .hd-items.compact .hd-item.crit { background: #3a1c1e; } }
@media (max-width: 860px) { :root[data-theme="dark"] .hd-items.compact-m .hd-item.crit { background: #3a1c1e; } }

/* Kompaktní seznam: úchyty pro změnu šířky sloupců v záhlaví */
.hd-cmp-th { position: relative; }
.hd-cmp-grip { position: absolute; top: -.35rem; bottom: -.35rem; width: 11px; cursor: col-resize; touch-action: none; }
.hd-cmp-grip.r { right: -.55rem; }
.hd-cmp-grip.l { left: -.55rem; }
.hd-cmp-grip::after { content: ""; position: absolute; top: 20%; bottom: 20%; left: 5px; width: 2px; border-radius: 2px; background: var(--border); }
.hd-cmp-grip:hover::after, body.hd-cmp-resizing .hd-cmp-grip::after { background: var(--primary); }
body.hd-cmp-resizing { cursor: col-resize; user-select: none; -webkit-user-select: none; }

/* Tiket z e-mailu: původní zpráva 1 : 1 v rámu (vždy světlé pozadí jako v poště) */
.hd-mail { display: block; width: 100%; height: 240px; margin-top: .3rem; border: 1px solid var(--border); border-radius: 10px; background: #fff; color-scheme: light; }

/* Barvy organizací – doplněno na 20 (značka c-*, štítek ic-*) */
.c-coral { background: linear-gradient(135deg, #c8492f, #f58a6b); }
.c-orange { background: linear-gradient(135deg, #c4520a, #f58a3c); }
.c-yellow { background: linear-gradient(135deg, #a88700, #e4c63a); }
.c-lime { background: linear-gradient(135deg, #5f8a12, #a3cf45); }
.c-emerald { background: linear-gradient(135deg, #0b8a5a, #3fca92); }
.c-cyan { background: linear-gradient(135deg, #0a84a0, #40c4dc); }
.c-sky { background: linear-gradient(135deg, #1a7fc4, #5cb8f2); }
.c-indigo { background: linear-gradient(135deg, #3a3fb8, #7b82ee); }
.c-violet { background: linear-gradient(135deg, #7a3ad0, #b184f5); }
.c-pink { background: linear-gradient(135deg, #c2338f, #ef7cc4); }
.c-rose { background: linear-gradient(135deg, #c2284f, #f06f8e); }
.c-brown { background: linear-gradient(135deg, #7a5230, #b88c62); }
.c-slate { background: linear-gradient(135deg, #3f4d63, #7f8da6); }
.ic-coral { --ic-bg: #fdeee9; --ic-fg: #7a2613; background: var(--ic-bg); color: var(--ic-fg); }
.ic-orange { --ic-bg: #fdeede; --ic-fg: #70300a; background: var(--ic-bg); color: var(--ic-fg); }
.ic-yellow { --ic-bg: #fbf5d2; --ic-fg: #5c4a00; background: var(--ic-bg); color: var(--ic-fg); }
.ic-lime { --ic-bg: #eff7d9; --ic-fg: #34500a; background: var(--ic-bg); color: var(--ic-fg); }
.ic-emerald { --ic-bg: #def6ea; --ic-fg: #075238; background: var(--ic-bg); color: var(--ic-fg); }
.ic-cyan { --ic-bg: #def4f8; --ic-fg: #06505f; background: var(--ic-bg); color: var(--ic-fg); }
.ic-sky { --ic-bg: #e2f1fc; --ic-fg: #0c4a75; background: var(--ic-bg); color: var(--ic-fg); }
.ic-indigo { --ic-bg: #e8e9fc; --ic-fg: #262a80; background: var(--ic-bg); color: var(--ic-fg); }
.ic-violet { --ic-bg: #f0e8fd; --ic-fg: #4a1f8a; background: var(--ic-bg); color: var(--ic-fg); }
.ic-pink { --ic-bg: #fce8f4; --ic-fg: #7a1c58; background: var(--ic-bg); color: var(--ic-fg); }
.ic-rose { --ic-bg: #fde8ed; --ic-fg: #7a152f; background: var(--ic-bg); color: var(--ic-fg); }
.ic-brown { --ic-bg: #f4ebe1; --ic-fg: #4d3119; background: var(--ic-bg); color: var(--ic-fg); }
.ic-slate { --ic-bg: #e9edf3; --ic-fg: #2a3445; background: var(--ic-bg); color: var(--ic-fg); }

/* Tiket řešitele: upomínky zadavateli (kdy odešly) */
.hd-nudge-state { margin: 0 0 .4rem; font-size: .84rem; }
.hd-nudge { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; padding: .25rem 0; border-top: 1px solid var(--border); font-size: .86rem; }
.hd-nudge small { color: var(--muted); font-size: .76rem; }
.hd-nudge-next { margin: .4rem 0 0; font-size: .78rem; }

/* ---- Úpravy 8. 10. ---- */
/* Vedení organizace – seznam: moje × kolegů */
.hd-rq-sec { display: flex; align-items: center; gap: .5rem; margin: 1.1rem 0 .5rem; font-size: .95rem; }
.hd-rq-sec small { padding: 0 .5rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .76rem; font-weight: 700; }
/* Požadavky kolegů: výrazný předěl (velká mezera + tmavý pruh přes celou šířku) a jiný podklad karet */
.hd-rq-sec.others { margin: 2.6rem 0 .8rem; padding: .6rem .9rem; border-radius: 12px; background: #2b3650; color: #fff; font-size: 1rem; }
.hd-rq-sec.others small { background: rgba(255, 255, 255, .2); color: #fff; }
.hd-rq.colleague { border-left: 5px solid #2b3650; background: var(--surface-2); }
.hd-rq-who { display: inline-flex; align-items: center; gap: .4rem; margin-bottom: .2rem; color: var(--muted); font-size: .8rem; font-weight: 700; }
/* Zprávy: obrázek z přílohy je vidět rovnou ve zprávě (klepnutím se zvětší) */
.hd-bub .hd-thumb { width: auto; height: auto; max-width: min(100%, 460px); }
.hd-bub .hd-thumb img { display: block; width: auto; height: auto; max-width: 100%; max-height: 340px; object-fit: contain; }
/* Okno s obrázkem přes obrazovku */
.hd-lightbox { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: rgba(12, 16, 26, .94); color: #fff; }
.hd-lightbox::backdrop { background: rgba(12, 16, 26, .94); }
.hd-lightbox-bar { display: flex; align-items: center; gap: .5rem; padding: calc(.6rem + env(safe-area-inset-top)) .8rem .6rem; }
.hd-lightbox-bar span { flex: 1; min-width: 0; overflow: hidden; font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.hd-lightbox-img { display: grid; place-items: center; height: calc(100dvh - 4rem - env(safe-area-inset-top)); padding: 0 .5rem calc(.5rem + env(safe-area-inset-bottom)); overflow: auto; }
.hd-lightbox-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
/* Odpověď: volby po odeslání vedle sebe */
.hd-cmp-send .hd-then + .hd-then { margin-left: .2rem; }
/* Lístečky: psaní ve dvou polích – Nadpis (tučně, oddělený linkou) a Text */
.nt-edit { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.nt-title-in { width: 100%; margin: 0 0 .35rem; padding: 0 0 .3rem !important; border: 0 !important; border-bottom: 1.5px solid rgba(0, 0, 0, .22) !important; border-radius: 0 !important; outline: none; background: transparent !important; box-shadow: none !important; color: inherit; font: inherit; font-size: .98rem; font-weight: 800 !important; }
.nt-title-in::placeholder { color: rgba(0, 0, 0, .4); font-weight: 800; }
.nt-edit .nt-text::placeholder { color: rgba(0, 0, 0, .4); }
.nt-title-in:focus { border-bottom-color: rgba(0, 0, 0, .55) !important; }
@media (max-width: 860px) { .nt-note.nt-full .nt-title-in { font-size: 18px; } }
.hd-lightbox .btn-ghost { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .12); color: #fff; }

/* Obrázky přímo v textu zprávy (editor i hotová zpráva) */
.rt-area img, .hd-body img, .hd-bub .hd-text img { display: block; max-width: 100%; height: auto; margin: .45rem 0; border: 1px solid var(--border); border-radius: 8px; }
.hd-body img, .hd-bub img { cursor: zoom-in; }
.rt-area img:not([width]) { max-height: 320px; width: auto; }   /* s atributem width (tažení za roh) platí nastavená šířka */
/* Odpověď: roletka stavu po odeslání */
.hd-then-box { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.hd-then-box select, .hd-then-box input { width: auto; max-width: 230px; padding-top: .35rem; padding-bottom: .35rem; font-size: .84rem; }
.rt-link input[data-rt-link-text] { flex: 1 1 160px; }
@media (max-width: 860px) { .hd-then-box select, .hd-then-box input { font-size: 16px; } }

.rt-link { flex-wrap: wrap; }

/* Odkazy v textu zpráv podtržené – ať je vidět, že jde o odkaz */
.hd-body a, .rt-area a { text-decoration: underline; text-underline-offset: 2px; }
/* Soubor vložený do textu (📎 název): v editoru značka, ve zprávě klikací štítek */
.rt-file, .hd-body a.hd-inline-file, .rt-area a.hd-inline-file { display: inline-flex; align-items: center; gap: .25rem; max-width: 100%; margin: .1rem .1rem; padding: .15rem .6rem; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-2); color: var(--text); font-size: .86rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.hd-body a.hd-inline-file:hover { border-color: var(--primary); color: var(--primary); }
/* Změna velikosti obrázku v editoru tažením za roh */
.rt { position: relative; }
.rt-area img.rt-img-on { outline: 2px solid var(--primary); outline-offset: 1px; }
.rt-img-grip { position: absolute; z-index: 5; width: 20px; height: 20px; border: 2px solid #fff; border-radius: 50%; background: var(--primary); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); cursor: nwse-resize; touch-action: none; }
.rt-img-grip-ne, .rt-img-grip-sw { cursor: nesw-resize; }
.rt-img-drag { user-select: none; -webkit-user-select: none; }
.rt-area img { cursor: pointer; }
.rt-area img.rt-al-c, .hd-body img.rt-al-c, .hd-bub .hd-text img.rt-al-c { margin-left: auto; margin-right: auto; }
.rt-area img.rt-al-r, .hd-body img.rt-al-r, .hd-bub .hd-text img.rt-al-r { margin-left: auto; margin-right: 0; }
.rt-img-bar { position: absolute; z-index: 6; display: flex; align-items: center; gap: 2px; padding: 3px; background: #1b2333; border-radius: 9px; box-shadow: 0 4px 14px rgba(0, 0, 0, .3); white-space: nowrap; }
.rt-img-bar button { min-width: 30px; height: 28px; padding: 0 .45rem; color: #fff; font: inherit; font-size: .78rem; font-weight: 600; background: none; border: 0; border-radius: 6px; cursor: pointer; }
.rt-img-bar button:hover { background: rgba(255, 255, 255, .16); }
.rt-img-bar button.on { background: var(--primary); }
.rt-img-size { padding: 0 .4rem; color: #c9d1de; font-size: .74rem; font-variant-numeric: tabular-nums; }
@media (max-width: 480px) { .rt-img-bar button[data-img-act="orig"] { display: none; } }

/* Věrnostní karty v nákupu (předpona shc-): 💳 na konci řádku obchodů, kód přes celou obrazovku, formulář karty. */
.shc-row { display: flex; align-items: flex-start; gap: .3rem; }
.shc-row .shop-stores { flex: 1; min-width: 0; }
.shc-btn { flex: none; display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 60px; margin: 4px 0 0; padding: .15rem 0 0 .3rem; font: inherit; color: var(--primary); background: none; border: 0; border-left: 1px solid var(--border); cursor: pointer; }
.shc-btn-ic { display: grid; place-items: center; width: 42px; height: 42px; font-size: 1.3rem; background: var(--primary-soft); border: 1px solid var(--primary); border-radius: 12px; }
.shc-btn-label { font-size: .7rem; font-weight: 600; white-space: nowrap; }
.shc-btn.none { color: var(--muted); }
.shc-btn.none .shc-btn-ic { background: var(--surface); border: 1px dashed var(--border); filter: grayscale(1); opacity: .7; }
dialog.shc-show { width: 100vw; max-width: 100vw; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; color: #111; background: #fff; border: 0; }
.shc-show-in { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; min-height: 100%; padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(1.2rem + env(safe-area-inset-bottom)); text-align: center; }
.shc-show h2 { margin: 0; font-size: 1.35rem; }
.shc-sub { margin: 0; color: #6b7486; font-size: .9rem; }
.shc-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: .35rem; margin-bottom: .8rem; }
.shc-tabs button { padding: .3rem .8rem; font: inherit; font-size: .84rem; font-weight: 600; color: #374151; background: #eef1f6; border: 0; border-radius: 999px; cursor: pointer; }
.shc-tabs button.on { color: #fff; background: var(--primary); }
.shc-code { display: grid; place-items: center; width: 100%; margin: 1.1rem 0 .4rem; }
canvas.shc-bar { width: min(100%, 560px); height: 150px; image-rendering: pixelated; }
canvas.shc-qr { width: min(80vw, 52vh, 380px); height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.shc-code img { max-width: 100%; max-height: 62vh; object-fit: contain; }
.shc-num { margin: 0; min-height: 1.6rem; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.3rem; font-weight: 700; letter-spacing: .08em; word-break: break-all; }
.shc-bad { margin: .5rem 0; color: var(--danger); font-size: .88rem; }
.shc-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: 1.4rem; }
.shc-form h2 small { font-size: .85rem; font-weight: 500; }
.shc-kinds { display: flex; gap: .35rem; margin: 0 0 .75rem; }
.shc-kinds label { flex: 1; cursor: pointer; }
.shc-kinds input { position: absolute; opacity: 0; pointer-events: none; }
.shc-kinds span { display: block; padding: .5rem .2rem; font-size: .86rem; font-weight: 600; text-align: center; border: 1.5px solid var(--border); border-radius: 10px; }
.shc-kinds input:checked + span { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); }
.shc-kinds input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.shc-prev { display: grid; place-items: center; margin: 0 0 .75rem; padding: .6rem; background: #fff; border: 1px dashed var(--border); border-radius: 12px; }
.shc-prev canvas.shc-bar { height: 64px; }
.shc-prev canvas.shc-qr { width: 130px; }
.shc-prev img { max-width: 100%; max-height: 180px; object-fit: contain; }
.shc-del { margin: .9rem 0 0; text-align: center; }
.shc-del-btn { color: var(--danger); font-size: .86rem; }
.shc-rowbtn { flex: none; padding: .2rem .5rem; white-space: nowrap; color: var(--muted); }
.shc-rowbtn.has { color: var(--primary); background: var(--primary-soft); border-color: var(--primary); }
/* Přepínač ve vizitce (vystředěný sloupec): řádek přes celou šířku, text vlevo a zalomený. */
.o2-side .switch-row-plain { width: 100%; text-align: left; }
.o2-side .switch-row-plain .switch-text { flex: 1; }
.o2-side .switch-row-plain .switch-text small { white-space: normal; }

/* Chat (předpona cht-): vlevo konverzace, vpravo vlákno; na telefonu jedno nebo druhé. */
.cht { display: grid; grid-template-columns: 330px minmax(0, 1fr); height: calc(100vh - 150px); height: calc(100dvh - 150px); min-height: 460px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.cht-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border); }
.cht-side-head { display: flex; gap: .4rem; padding: .7rem; border-bottom: 1px solid var(--border); }
.cht-side-head input { flex: 1; min-width: 0; }
.cht-new-btn { flex: none; width: 40px; padding: 0; font-size: 1.2rem; }
.cht-list { flex: 1; overflow-y: auto; }
.cht-empty-list { margin: 2rem 1rem; color: var(--muted); font-size: .9rem; text-align: center; }
.cht-item { display: flex; align-items: center; gap: .65rem; padding: .6rem .75rem; color: var(--text); border-bottom: 1px solid var(--border); }
.cht-item:hover { text-decoration: none; background: var(--surface-2); }
.cht-item-wrap { position: relative; }
.cht-hide { position: absolute; top: 50%; right: .5rem; display: none; place-items: center; width: 28px; height: 28px; margin-top: -14px; padding: 0; font: inherit; font-size: 1.1rem; line-height: 1; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 50%; box-shadow: var(--shadow); cursor: pointer; }
.cht-hide:hover { color: var(--danger); border-color: var(--danger); }
@media (hover: hover) { .cht-item-wrap:hover .cht-hide, .cht-hide:focus-visible { display: grid; } }
.cht-menu-box .cht-menu-hide { margin-top: .25rem; padding-top: .55rem; color: var(--danger); border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; }
.cht-item.on { background: var(--primary-soft); }
.cht-item.pending { background: #fff7e6; }
.cht-item-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cht-item-text strong { font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cht-item-text small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cht-item.unread .cht-item-text strong { font-weight: 800; }
.cht-item.unread .cht-item-text small { color: var(--text); font-weight: 600; }
.cht-item-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; }
.cht-item-side small { color: var(--muted); font-size: .72rem; }
.cht-count { min-width: 20px; padding: 0 .35rem; font-size: .72rem; font-weight: 800; line-height: 20px; color: #fff; text-align: center; background: var(--primary); border-radius: 999px; }
.cht-tag { padding: 0 .45rem; font-size: .68rem; font-weight: 800; line-height: 18px; color: #b45309; background: #fdecc8; border-radius: 999px; }
.cht-tk { display: inline-block; padding: 0 .4rem; font-size: .72rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); border-radius: 999px; vertical-align: middle; }
a.cht-tk { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cht-muted { font-size: .75rem; }
.cht-av { display: grid; place-items: center; flex: none; width: 38px; height: 38px; font-size: .78rem; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-radius: 50%; }
.cht-av.grp { font-size: 1rem; background: #e6f6ec; }
.cht-av-sm { width: 28px; height: 28px; font-size: .64rem; align-self: flex-end; }
.cht-av.ghost { visibility: hidden; }
.cht-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.cht-blank { margin: auto; padding: 2rem; color: var(--muted); text-align: center; }
.cht-blank-ico { font-size: 2.6rem; }
.cht-head { display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; border-bottom: 1px solid var(--border); }
.cht-back { display: none; padding: 0 .5rem 0 .1rem; font-size: 1.7rem; line-height: 1; color: var(--text); }
.cht-back:hover { text-decoration: none; }
.cht-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cht-head-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cht-head-text small { min-width: 0; color: var(--muted); font-size: .8rem; }
.cht-head-acts { flex: none; display: flex; align-items: center; gap: .25rem; }
.cht-head-acts form { margin: 0; }
.cht-end { color: var(--danger); }
.cht-menu { position: relative; }
.cht-menu > summary { list-style: none; }
.cht-menu > summary::-webkit-details-marker { display: none; }
.cht-menu-box { position: absolute; z-index: 20; top: 100%; right: 0; display: flex; flex-direction: column; min-width: 190px; margin: .2rem 0 0; padding: .35rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 24, 40, .18); }
.cht-menu-cap { padding: .25rem .6rem; color: var(--muted); font-size: .76rem; font-weight: 700; }
.cht-menu-box button { padding: .45rem .6rem; font: inherit; font-size: .88rem; color: var(--text); text-align: left; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.cht-menu-box button:hover { background: var(--surface-2); }
.cht-thread { flex: 1; min-height: 0; overflow-y: auto; padding: .8rem .9rem 1rem; background: var(--surface-2); overscroll-behavior: contain; }
.cht-older { margin: 0 0 .6rem; font-size: .82rem; text-align: center; }
.cht-day { margin: .7rem 0 .5rem; text-align: center; }
.cht-day span { padding: .1rem .7rem; font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.cht-event { margin: .5rem 0; color: var(--muted); font-size: .78rem; text-align: center; }
.cht-msg { display: flex; align-items: flex-start; gap: .45rem; margin-top: .55rem; }
.cht-msg.cont { margin-top: .15rem; }
.cht-msg.me { justify-content: flex-end; }
.cht-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: min(78%, 620px); }
.cht-msg.me .cht-col { align-items: flex-end; }
.cht-name { margin: 0 .6rem .15rem; color: var(--text); font-size: .76rem; font-weight: 700; }
.cht-role { margin-left: .2rem; padding: 0 .4rem; font-size: .66rem; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.cht-role.js { color: var(--primary); background: var(--primary-soft); border-color: transparent; }
.cht-av.js { color: #fff; background: var(--primary); }
.cht-msg:not(.me) .cht-av-sm { align-self: flex-start; margin-top: 1.25rem; }
.cht-msg.cont:not(.me) .cht-av-sm { margin-top: 0; }
.cht-line { display: flex; align-items: center; gap: .25rem; max-width: 100%; }
.cht-msg.me .cht-line { flex-direction: row-reverse; }
.cht-bub { min-width: 0; padding: .4rem .7rem .3rem; font-size: .92rem; line-height: 1.4; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; border-top-left-radius: 6px; overflow-wrap: anywhere; }
.cht-msg.me .cht-bub { color: #fff; background: var(--primary); border-color: var(--primary); border-radius: 16px; border-top-right-radius: 6px; }
.cht-msg.me .cht-bub a { color: #fff; text-decoration: underline; }
.cht-text { display: block; }
.cht-time { display: block; margin-top: .1rem; font-size: .66rem; text-align: right; opacity: .65; }
.cht-deleted { font-size: .86rem; opacity: .7; }
.cht-quote { display: block; margin: .1rem 0 .3rem; padding: .2rem .5rem; font-size: .8rem; background: rgba(0, 0, 0, .06); border-left: 3px solid var(--primary); border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cht-msg.me .cht-quote { background: rgba(255, 255, 255, .18); border-left-color: #fff; }
.cht-quote b { display: block; font-size: .72rem; }
.cht-img { display: block; margin: .15rem 0 .25rem; }
.cht-img img { display: block; max-width: min(100%, 280px); max-height: 260px; border-radius: 10px; cursor: zoom-in; }
.cht-file { display: flex; align-items: baseline; gap: .5rem; margin: .15rem 0 .25rem; padding: .35rem .55rem; font-size: .86rem; font-weight: 600; color: inherit; background: rgba(0, 0, 0, .06); border-radius: 9px; }
.cht-file small { font-weight: 400; opacity: .7; white-space: nowrap; }
.cht-rx { display: flex; flex-wrap: wrap; gap: .2rem; margin: -.3rem .5rem 0; }
.cht-rx span { padding: 0 .4rem; font-size: .8rem; line-height: 1.5; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; }
.cht-rx span.on { background: var(--primary-soft); border-color: var(--primary); }
.cht-read { margin: .1rem .3rem 0; color: var(--muted); font-size: .7rem; }
.cht-read.on { color: var(--primary); font-weight: 600; }
.cht-acts { position: relative; flex: none; }
.cht-acts > summary { display: grid; place-items: center; width: 26px; height: 26px; color: var(--muted); list-style: none; border-radius: 50%; cursor: pointer; opacity: 0; }
.cht-acts > summary::-webkit-details-marker { display: none; }
.cht-msg:hover .cht-acts > summary, .cht-acts[open] > summary, .cht-acts > summary:focus-visible { opacity: 1; }
.cht-acts > summary:hover, .cht-acts[open] > summary { background: var(--border); }
.cht-acts-box { position: absolute; z-index: 15; bottom: 100%; left: 0; display: flex; flex-direction: column; min-width: 170px; padding: .3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 30px rgba(16, 24, 40, .2); }
.cht-msg.me .cht-acts-box { right: 0; left: auto; }
.cht-acts-rx { display: flex; gap: .1rem; padding-bottom: .25rem; margin-bottom: .25rem; border-bottom: 1px solid var(--border); }
.cht-acts-box button { padding: .4rem .55rem; font: inherit; font-size: .86rem; color: var(--text); text-align: left; background: none; border: 0; border-radius: 8px; cursor: pointer; }
.cht-acts-rx button { padding: .2rem .35rem; font-size: 1.15rem; }
.cht-acts-box button:hover, .cht-acts-rx button.on { background: var(--surface-2); }
.cht-acts-box button.danger { color: var(--danger); }
.cht-state { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin: 1rem auto 0; padding: .7rem .9rem; max-width: 560px; font-size: .9rem; border-radius: 12px; }
.cht-state form { margin: 0; }
.cht-state.wait { color: var(--primary); font-weight: 600; background: var(--primary-soft); border: 1px dashed var(--primary); }
.cht-state.ask { background: #fff7e6; border: 1px solid #f3cf8e; }
.cht-state.done { color: var(--muted); background: var(--surface); border: 1px solid var(--border); }
.cht-state-acts { display: flex; gap: .4rem; margin-left: auto; }
.cht-ok { background: #1a7f4b; border-color: #1a7f4b; }
.cht-no { color: var(--danger); }
.cht-typing { padding: .15rem 1rem; color: var(--primary); font-size: .8rem; font-weight: 600; background: var(--surface-2); }
.cht-composer { margin: 0; padding: .55rem .7rem calc(.55rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.cht-row { display: flex; align-items: flex-end; gap: .4rem; }
.cht-row textarea { flex: 1; min-width: 0; min-height: 40px; max-height: 160px; padding: .5rem .7rem; font: inherit; font-size: .94rem; line-height: 1.35; resize: none; border-radius: 14px; }
.cht-clip { display: grid; place-items: center; flex: none; width: 40px; height: 40px; font-size: 1.15rem; border-radius: 50%; cursor: pointer; }
.cht-clip:hover { background: var(--surface-2); }
.cht-clip input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.cht-send { flex: none; width: 44px; height: 40px; padding: 0; border-radius: 14px; }
.cht-ctx { display: flex; align-items: center; gap: .5rem; margin: 0 0 .4rem; padding: .3rem .6rem; font-size: .82rem; background: var(--primary-soft); border-left: 3px solid var(--primary); border-radius: 8px; }
.cht-ctx span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cht-ctx button { font: inherit; color: var(--muted); background: none; border: 0; cursor: pointer; }
.cht-files { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 .4rem; }
.cht-files span { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; padding: .15rem .5rem; font-size: .8rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.cht-files button { padding: 0; font: inherit; color: var(--muted); background: none; border: 0; cursor: pointer; }
.cht-dlg { width: min(460px, calc(100vw - 2rem)); }
.cht-pick-wrap { margin: 0 0 .75rem; }
.cht-pick-wrap > input { width: 100%; margin: 0 0 .4rem; }
.cht-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; }
.cht-pick-static { max-height: 170px; margin: 0 0 .75rem; }
.cht-pick-it { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-bottom: 1px solid var(--border); }
label.cht-pick-it { cursor: pointer; }
.cht-pick-it:last-child { border-bottom: 0; }
.cht-pick-it input { position: absolute; opacity: 0; pointer-events: none; }
.cht-pick-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cht-pick-text strong { font-size: .9rem; font-weight: 600; }
.cht-pick-text small { color: var(--muted); font-size: .76rem; }
.cht-pick-check { display: grid; place-items: center; width: 22px; height: 22px; font-size: .8rem; color: transparent; border: 1.5px solid var(--border); border-radius: 50%; }
.cht-pick-it:has(input:checked) { background: var(--primary-soft); }
.cht-pick-it:has(input:checked) .cht-pick-check { color: #fff; background: var(--primary); border-color: var(--primary); }
.cht-pick-it:has(input:focus-visible) { outline: 2px solid var(--primary); outline-offset: -2px; }
.cht-leave { margin: .9rem 0 0; text-align: center; }
.cht-leave .link-btn { color: var(--danger); font-size: .86rem; }
/* Zadavatel: tlačítko chatu v záhlaví požadavku pod „Ukončit požadavek“ – světlé, ať nepůsobí jako hlavní akce. */
.hd-acts-col { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
.hd-acts-row { display: flex; align-items: center; justify-content: flex-end; gap: .35rem; }
.hd-chat-form { margin: 0; display: flex; }
.hd-chat-btn { flex: 1; justify-content: center; text-align: center; font-weight: 600; color: var(--primary); background: #f0f4fe; border-color: transparent; }
.hd-chat-btn:hover { text-decoration: none; background: #f0f4fe; border-color: var(--primary); }
.hd-chat-btn.live { color: #1a7f4b; background: #eef9f2; }
.hd-chat-btn.live:hover { border-color: #1a7f4b; }
.hd-chat-btn.wait { color: #b45309; background: #fff8e8; }
.hd-chat-btn.wait:hover { border-color: #e0b25a; }
.hd-chat-btn.is-static { cursor: default; }
@media (max-width: 860px) { .hd-acts-row { justify-content: flex-start; } }
/* Pruh chatu v požadavku helpdesku. */
.cht-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; margin: 0 0 .8rem; padding: .55rem .8rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.cht-bar form { margin: 0; }
.cht-bar-text { flex: 1; min-width: 180px; display: flex; flex-direction: column; line-height: 1.3; font-size: .9rem; }
.cht-bar-text small { color: var(--muted); font-size: .78rem; }
.cht-bar.ask { background: #fff7e6; border-color: #f3cf8e; }
.cht-bar.wait, .cht-bar.live { background: var(--primary-soft); border-color: var(--primary); }
@media (max-width: 860px) {
    .cht { display: block; height: auto; min-height: 0; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
    .cht-side { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
    .cht-side-head input, .cht-row textarea, .cht-dlg input { font-size: 16px; }
    .cht.has-room .cht-side { display: none; }
    .cht:not(.has-room) .cht-main { display: none; }
    .cht.has-room .cht-main { position: fixed; z-index: 60; inset: 0; background: var(--surface); padding-top: env(safe-area-inset-top); }
    .cht-back { display: block; }
    .cht-acts > summary { opacity: 1; }
    .cht-col { max-width: 84%; }
}
.org-users-cap { margin: 1rem 0 .2rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border); }

/* Chat: × pro odebrání konverzace na dotykovém zařízení vždy vidět (na počítači po najetí myší). */
@media (hover: none) {
    .cht-item-wrap { display: flex; align-items: center; border-bottom: 1px solid var(--border); }
    .cht-item-wrap .cht-item { flex: 1; min-width: 0; border-bottom: 0; }
    .cht-hide { position: static; display: grid; flex: none; margin: 0 .5rem 0 0; background: none; border-color: transparent; box-shadow: none; }
}
.cht-found-cap { margin: 0; padding: .5rem .75rem .3rem; color: var(--muted); font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.cht-found-none { margin: .8rem .75rem; color: var(--muted); font-size: .86rem; }
.cht-found { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .75rem; color: var(--text); border-bottom: 1px solid var(--border); }
.cht-found:hover { text-decoration: none; background: var(--surface-2); }
.cht-found strong { font-size: .86rem; }
.cht-found strong small { margin-left: .3rem; color: var(--muted); font-weight: 400; }
.cht-found span { color: var(--muted); font-size: .82rem; overflow-wrap: anywhere; }
.cht-msg.cht-hit .cht-bub { box-shadow: 0 0 0 3px #f6c453; }
.cht-dash { padding: 0; overflow: hidden; }
.cht-dash .cht-item-wrap:last-child .cht-item { border-bottom: 0; }
.cht-dash .cht-hide { display: none !important; }
.cht-dash-empty { margin: 0; padding: .9rem 1rem; }
.section-head h2 .cht-count { display: inline-block; margin-left: .3rem; vertical-align: middle; }
.onl-chat { flex: none; display: grid; place-items: center; width: 30px; height: 30px; font-size: 1rem; border-radius: 50%; }
.onl-chat:hover { text-decoration: none; background: var(--primary-soft); }

.cht-support { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .55rem .75rem; font: inherit; color: var(--text); text-align: left; background: var(--surface-2); border: 0; border-bottom: 1px solid var(--border); cursor: pointer; }
.cht-support:hover { background: var(--primary-soft); }
.cht-acts-box a { padding: .4rem .55rem; font-size: .86rem; color: var(--text); border-radius: 8px; }
.cht-acts-box a:hover { text-decoration: none; background: var(--surface-2); }
/* Přepis chatu v požadavku helpdesku – sbalený (skládá app.js ze zprávy „💬 Chat …“ + citace). */
details.cht-tr { margin: .2rem 0; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
details.cht-tr > summary { padding: .45rem .7rem; font-size: .9rem; cursor: pointer; }
details.cht-tr > blockquote { margin: 0; padding: .2rem .8rem .6rem; border: 0; border-top: 1px solid var(--border); font-size: .88rem; }
details.cht-tr > blockquote p { margin: .3rem 0; }
.cht-av-logo, .cht-av-sm.cht-av-logo { width: 36px; height: 36px; background: #fff; border: 1.5px solid #c9d6f5; box-shadow: 0 1px 3px rgba(0, 94, 184, .18); overflow: hidden; }
.cht-av-logo img { width: 32px; height: auto; transform: translateY(1px); }
details.cht-tr > blockquote p.cht-tr-js, details.cht-tr > blockquote p.cht-tr-c { margin: .25rem 0; padding: .25rem .55rem; border-left: 3px solid #c9d1de; border-radius: 6px; background: var(--surface-2); color: var(--text); }
details.cht-tr > blockquote p.cht-tr-js { border-left-color: var(--primary); background: var(--primary-soft); }
details.cht-tr > blockquote p.cht-tr-js b { color: var(--primary); }
details.cht-tr > blockquote img.cht-tr-logo { display: inline-block; width: 30px; height: auto; margin: 0 .4rem 0 0; padding: 1px 3px; vertical-align: middle; background: #fff; border: 1px solid #c9d6f5; border-radius: 999px; cursor: default; pointer-events: none; }
details.cht-tr > blockquote img:not(.cht-tr-logo) { max-width: min(100%, 260px); max-height: 220px; margin: .35rem 0 .1rem; }
.cht-keep { margin: 0 0 .5rem; color: var(--muted); font-size: .74rem; text-align: center; }

/* Plovoucí okénko chatu (předpona chtw-) – jen počítač. */
.chtw { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; pointer-events: none; }
.chtw > * { pointer-events: auto; }
.chtw-btn { position: relative; display: inline-flex; align-items: center; gap: .4rem; padding: .55rem 1rem; font: inherit; font-size: .92rem; font-weight: 700; color: #fff; background: var(--primary); border: 0; border-radius: 999px; box-shadow: 0 8px 22px rgba(31, 79, 209, .35); cursor: pointer; }
.chtw-btn b { min-width: 20px; padding: 0 .35rem; font-size: .72rem; line-height: 20px; color: var(--primary); text-align: center; background: #fff; border-radius: 999px; }
.chtw-panel, .chtw-win { width: 350px; max-width: calc(100vw - 40px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 18px 48px rgba(16, 24, 40, .28); overflow: hidden; }
.chtw-panel { display: flex; flex-direction: column; max-height: min(480px, calc(100vh - 110px)); }
.chtw-panel[hidden], .chtw-win[hidden] { display: none; }
.chtw-panel-head { display: flex; align-items: center; gap: .3rem; padding: .55rem .6rem .55rem .9rem; border-bottom: 1px solid var(--border); }
.chtw-panel-head strong { flex: 1; }
.chtw-panel-head a, .chtw-panel-head button, .chtw-ctl a, .chtw-ctl button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; font: inherit; font-size: .95rem; color: var(--muted); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.chtw-panel-head a:hover, .chtw-panel-head button:hover, .chtw-ctl a:hover, .chtw-ctl button:hover { text-decoration: none; color: var(--text); background: var(--surface-2); }
.chtw-panel-list { overflow-y: auto; }
.chtw-panel-list .cht-hide { display: none !important; }
.chtw-win { position: relative; display: flex; flex-direction: column; height: min(500px, calc(100vh - 110px)); }
.chtw-ctl { position: absolute; z-index: 3; top: .55rem; right: .45rem; display: flex; gap: .1rem; }
.chtw-win .cht-head { padding-right: 6.2rem; }
.chtw-win .cht-head-acts, .chtw-win .cht-back { display: none; }
.chtw-win .cht-thread { padding: .6rem .6rem .8rem; }
.chtw-win .cht-col { max-width: 86%; }
.chtw-win .cht-av-sm { display: none; }
.chtw-win .cht-composer { padding: .45rem .5rem; }
.chtw-win .cht-img img { max-width: min(100%, 200px); max-height: 180px; }
.chtw-bar { display: inline-flex; align-items: center; gap: .5rem; max-width: 260px; padding: .4rem .5rem .4rem .9rem; font: inherit; font-size: .86rem; font-weight: 600; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: 0 6px 18px rgba(16, 24, 40, .18); cursor: pointer; }
.chtw-bar[hidden] { display: none; }
.chtw-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chtw-bar i { display: grid; place-items: center; flex: none; width: 22px; height: 22px; font-style: normal; font-size: .8rem; color: var(--muted); border-radius: 50%; }
.chtw-bar i:hover { background: var(--surface-2); color: var(--text); }
@media (max-width: 860px) { .chtw { display: none; } }
@media print { .chtw { display: none; } }

.chtw-new { font-size: 1.15rem !important; color: var(--primary) !important; }
.chtw-ctl .chtw-end { width: auto; padding: 0 .5rem; font-size: .74rem; font-weight: 700; color: var(--danger); border: 1px solid var(--border); background: var(--surface); }
.chtw-ctl .chtw-end:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
.chtw-win.has-end .cht-head { padding-right: 10.4rem; }
.chtw-people > input { display: block; width: calc(100% - 1.2rem); margin: .6rem; }
.chtw-people .cht-pick-it { color: var(--text); }
.chtw-people .cht-pick-it:hover { text-decoration: none; background: var(--surface-2); }
.chtw-people-note { margin: 0; padding: .55rem .9rem; color: var(--muted); font-size: .78rem; border-top: 1px solid var(--border); }

/* ===== Vzhled: přepínač a tmavé úpravy ===== */
.theme-sw { display: flex; gap: 2px; margin: .35rem .5rem; padding: 2px; background: rgba(127, 127, 127, .16); border-radius: 9px; }
.theme-sw button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .05rem; padding: .3rem .2rem; font: inherit; font-size: .66rem; font-weight: 600; line-height: 1.2; color: inherit; background: none; border: 0; border-radius: 7px; cursor: pointer; opacity: .75; }
.theme-sw button span { font-size: .95rem; }
.theme-sw button.on { color: var(--text); background: var(--surface); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); opacity: 1; }
.m-more .theme-sw { margin: .6rem 0; }
.m-more .theme-sw button { flex-direction: row; justify-content: center; gap: .35rem; padding: .5rem .2rem; font-size: .8rem; }
/* Barevné dlaždice ikon: v tmavém vzhledu tmavý podklad v barvě dlaždice a světlá ikona. */
:root[data-theme="dark"] .ic-blue, :root[data-theme="dark"] .ic-teal, :root[data-theme="dark"] .ic-green, :root[data-theme="dark"] .ic-amber, :root[data-theme="dark"] .ic-red, :root[data-theme="dark"] .ic-purple, :root[data-theme="dark"] .ic-gray, :root[data-theme="dark"] .ic-coral, :root[data-theme="dark"] .ic-orange, :root[data-theme="dark"] .ic-yellow, :root[data-theme="dark"] .ic-lime, :root[data-theme="dark"] .ic-emerald, :root[data-theme="dark"] .ic-cyan, :root[data-theme="dark"] .ic-sky, :root[data-theme="dark"] .ic-indigo, :root[data-theme="dark"] .ic-violet, :root[data-theme="dark"] .ic-pink, :root[data-theme="dark"] .ic-rose, :root[data-theme="dark"] .ic-brown, :root[data-theme="dark"] .ic-slate { background: color-mix(in srgb, var(--ic-fg) 55%, #0f1420); color: var(--ic-bg); }
/* Chat, věrnostní karty a další prvky s pevnými světlými barvami. */
:root[data-theme="dark"] .cht-item.pending, :root[data-theme="dark"] .cht-state.ask, :root[data-theme="dark"] .cht-bar.ask { background: #33280f; border-color: #5a4718; }
:root[data-theme="dark"] .cht-tag { color: #f1c96a; background: #4a3a14; }
:root[data-theme="dark"] .cht-quote, :root[data-theme="dark"] .cht-file { background: rgba(255, 255, 255, .08); }
:root[data-theme="dark"] .cht-av.grp { background: #17352a; }
:root[data-theme="dark"] .cht-acts > summary:hover, :root[data-theme="dark"] .cht-acts[open] > summary { background: var(--surface); }
:root[data-theme="dark"] .cht-msg.cht-hit .cht-bub { box-shadow: 0 0 0 3px #b98a1d; }
:root[data-theme="dark"] .hd-chat-btn { background: #1e2a4a; }
:root[data-theme="dark"] .hd-chat-btn.live { color: #4cc68a; background: #16301f; }
:root[data-theme="dark"] .hd-chat-btn.wait { color: #e7b44c; background: #33280f; }
:root[data-theme="dark"] .chtw-btn b { color: #1f4fd1; }
:root[data-theme="dark"] .shc-prev { background: #fff; }
:root[data-theme="dark"] details.cht-tr > blockquote img.cht-tr-logo, :root[data-theme="dark"] .cht-av-logo { background: #fff; }
:root[data-theme="dark"] .rt-img-bar { background: #0b0f19; border: 1px solid var(--border); }

/* Svátek kolegů v záhlaví: zvýrazněné jméno, klepnutím seznam lidí z IS (NameDays::html). */
.nd-pop { position: relative; display: inline-block; }
.nd-pop > summary { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .5rem; color: #8a5a00; font-weight: 800; background: #fff1c9; border: 1px solid #f0d27a; border-radius: 999px; list-style: none; cursor: pointer; }
.nd-pop > summary::-webkit-details-marker { display: none; }
.nd-pop > summary i { font-style: normal; font-size: .9em; opacity: .8; }
.nd-pop > summary i::after { content: " ▾"; }
.nd-pop.soft > summary { font-weight: 700; background: #fff8e4; border-color: #f3e2ae; }
.nd-box { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; display: flex; flex-direction: column; width: 280px; max-width: calc(100vw - 2rem); padding: .4rem; font-size: .88rem; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 14px 34px rgba(16, 24, 40, .2); }
.nd-cap { padding: .25rem .5rem .2rem; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.nd-row { display: flex; align-items: center; gap: .55rem; padding: .35rem .5rem; border-radius: 9px; }
.nd-av { display: grid; place-items: center; flex: none; width: 30px; height: 30px; font-size: .68rem; font-weight: 800; color: var(--primary); background: var(--primary-soft); border-radius: 50%; }
.nd-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.nd-row-t b { font-weight: 600; }
.nd-row-t small { color: var(--muted); font-size: .76rem; font-weight: 400; }
.nd-chat { flex: none; display: grid; place-items: center; width: 30px; height: 30px; font-size: 1rem; border-radius: 50%; }
.nd-chat:hover { text-decoration: none; background: var(--primary-soft); }
:root[data-theme="dark"] .nd-pop > summary { color: #f1c96a; background: #3a2e12; border-color: #6b5320; }
:root[data-theme="dark"] .nd-pop.soft > summary { background: #2b2412; border-color: #4d4520; }

/* Tmavý vzhled – stavy požadavků a odznaky. */
:root[data-theme="dark"] .st-queue, :root[data-theme="dark"] .st-closed, :root[data-theme="dark"] .badge-ended { background: #262e40; color: #aab3c5; }
:root[data-theme="dark"] .st-work { background: #18233a; color: #7fa8f7; }
:root[data-theme="dark"] .st-wait { background: #33280f; color: #e7b44c; }
:root[data-theme="dark"] .st-third { background: #262447; color: #b0a6f5; }
:root[data-theme="dark"] .st-appr { background: #3a2210; color: #f59e5b; }
:root[data-theme="dark"] .st-snooze { background: #2a2a26; color: #b8b5a8; }
:root[data-theme="dark"] .st-done { background: #16301f; color: #4cc68a; }
:root[data-theme="dark"] .hd-tag { background: color-mix(in srgb, var(--td, #5b85f5) 24%, var(--surface)); color: color-mix(in srgb, var(--td, #5b85f5) 50%, #fff); }

/* ===== Tmavý vzhled – protějšky pevně zapsaných barev (vygenerováno docs/tmavy-vzhled-generator.py 8. 10. 2026, schváleno uživatelem;
   při ladění upravovat ručně tady – generátor znovu nepouštět přes hotové úpravy) ===== */
:root[data-theme="dark"] .badge-ended { color: #c6cad2; background: var(--surface-2); }
:root[data-theme="dark"] tr.row-muted .avatar { background: #363b45; }
:root[data-theme="dark"] .id-avatar.ended { background: #363b45; }
:root[data-theme="dark"] .win-net { color: #bbe3a0 !important; }
:root[data-theme="dark"] .ev-banner { border: 1px solid #675932; }
:root[data-theme="dark"] .ev-pay-private { background: #1d1b3c; color: #aba6dd; }
:root[data-theme="dark"] .perm-chip.add { color: #bce3a0; background: #2e3c1b; border-color: #4d6633; }
:root[data-theme="dark"] .perm-chip.del { color: #e3a0a0; background: #3c1b1b; border-color: #673232; }
:root[data-theme="dark"] .perm-area .perm-row.add { background: #2b3c1b; }
:root[data-theme="dark"] .perm-row.add .perm-tag { color: #bce3a0; background: #2c3c1b; }
:root[data-theme="dark"] .perm-area .perm-row.del { background: #3c1b1b; }
:root[data-theme="dark"] .perm-row.del .perm-tag { color: #e3a0a0; background: #3c1b1b; }
:root[data-theme="dark"] [data-module-editor] .mod-row.add { background: #2b3c1b; }
:root[data-theme="dark"] [data-module-editor] .mod-row.del { background: #3c1b1b; }
:root[data-theme="dark"] a.o2-person:hover { border-color: #324067; }
:root[data-theme="dark"] [data-perm-legend] .lg-role::before { background: #242933; }
:root[data-theme="dark"] .src-add { color: #bce3a0; background: #2e3c1b; }
:root[data-theme="dark"] .src-del { color: #e3a0a0; background: #3c1b1b; }
:root[data-theme="dark"] .o2-tile:hover { border-color: #324067; }
:root[data-theme="dark"] .o2-ares { border: 1px solid #323f67; }
:root[data-theme="dark"] .invite-banner { border: 1px solid #324067; }
:root[data-theme="dark"] .invite-modal-from { color: #889fdd; background: var(--surface); border: 3px solid var(--border); }
:root[data-theme="dark"] .ann-ico.sys { color: #bce3a0; background: #2e3c1b; }
:root[data-theme="dark"] .ann-ico.imp { color: #dd8e88; background: #3c1e1b; }
:root[data-theme="dark"] .ann-imp { color: #dd8e88; background: #3c1e1b; }
:root[data-theme="dark"] .ann-sys { color: #bce3a0; background: #2e3c1b; }
:root[data-theme="dark"] .imp-badge { color: #dd8e88; background: #3c1e1b; }
:root[data-theme="dark"] .ann-item.unread { border-color: #324067; }
:root[data-theme="dark"] .ann-person.no i { background: #363b45; }
:root[data-theme="dark"] .st-archive { color: var(--muted); }
:root[data-theme="dark"] .d-hidden { background: #532b27; }
:root[data-theme="dark"] .ann-rec-name .n-done { color: #a4e0ae; }
:root[data-theme="dark"] .ann-rec-name .n-open { color: #e3c4a0; }
:root[data-theme="dark"] .ann-rec-name .n-hidden { color: #d7908e; }
:root[data-theme="dark"] .ann-rec-state.st-open { color: #e3c4a0; background: #3c2e1b; }
:root[data-theme="dark"] .ann-rec-state.st-hidden { color: #e3a0a0; background: #3c1b1b; }
:root[data-theme="dark"] .gps-live { color: #a0e3c1; }
:root[data-theme="dark"] .gps-me i { border: 3px solid var(--border); }
:root[data-theme="dark"] .gps-item:hover { border-color: #324067; }
:root[data-theme="dark"] .st-go .gps-st { color: #a4e0ae; }
:root[data-theme="dark"] .st-idle .gps-st { color: #e3cba0; }
:root[data-theme="dark"] .st-stop .gps-st { color: #889fdd; }
:root[data-theme="dark"] .st-old .gps-st, :root[data-theme="dark"] .st-none .gps-st { color: var(--muted); }
:root[data-theme="dark"] .gps-pin-in i { border: 3px solid var(--border); }
:root[data-theme="dark"] .ann-live { color: #a0e3c1; background: #1b3c2a; }
:root[data-theme="dark"] .wz-opt:hover { border-color: #324067; }
:root[data-theme="dark"] .wz-bubble { color: var(--text); }
:root[data-theme="dark"] .wz-bubble small { color: var(--muted); }
:root[data-theme="dark"] .p-low i, :root[data-theme="dark"] i.p-low { background: #363b45; }
:root[data-theme="dark"] .hd-prio.p-high { color: #e3bca0; }
:root[data-theme="dark"] .hd-stars-show { color: #ddc688; }
:root[data-theme="dark"] .hd-nav-btns .waze { color: #a0d1e3; }
:root[data-theme="dark"] .hd-nav-btns .mapy { color: #a6dea8; }
:root[data-theme="dark"] .rt-hl { background: #534d27 !important; color: var(--text) !important; }
:root[data-theme="dark"] .hd-attach-btn { border: 1px dashed #3f485a; }
:root[data-theme="dark"] .hd-rq:hover { border-color: #354364; }
:root[data-theme="dark"] .hd-stars label:hover, :root[data-theme="dark"] .hd-stars label:hover ~ label, :root[data-theme="dark"] .hd-stars input:checked ~ label { color: #ddc688; }
:root[data-theme="dark"] .hd-tile:hover { border-color: #324067; }
:root[data-theme="dark"] .hd-lib-prev-in mark { background: #534d27; color: var(--text); }
:root[data-theme="dark"] .hd-bill-tile:hover { border-color: #354364; }
:root[data-theme="dark"] .hd-appr-dot { background: var(--surface); }
:root[data-theme="dark"] .hd-rem-row.today .hd-rem-t b { color: #e3b4a0; }
:root[data-theme="dark"] .hd-rem-tag { background: #3c2e1b; color: #e3b4a0; }
:root[data-theme="dark"] .hd-merge-opt i { background: #3c2e1b; color: #e3b4a0; }
:root[data-theme="dark"] .hd-pill-queue::before { background: var(--surface); }
:root[data-theme="dark"] .hd-trip-bar { border: 1.5px solid #386147; background: #1b3c26; }
:root[data-theme="dark"] .hd-trip-txt b { color: #a0e3bb; }
:root[data-theme="dark"] .hd-trip-txt small { color: #b2d2be; }
:root[data-theme="dark"] .hd-trip-card { border: 1.5px solid #386147; }
:root[data-theme="dark"] .hd-trip-top { background: #1b3c2a; }
:root[data-theme="dark"] .hd-trip-who b { color: #a0e3bb; }
:root[data-theme="dark"] .hd-trip-who small { color: #a0e3c1; }
:root[data-theme="dark"] .hd-trip-eta b { color: #a0e3bb; }
:root[data-theme="dark"] .hd-trip-eta small { color: #a0e3c1; }
:root[data-theme="dark"] .hd-trip-map { background: var(--surface-2); }
:root[data-theme="dark"] .hd-trip-steps .done { background: #1b3c2a; color: #a0e3c1; }
:root[data-theme="dark"] .hd-trip-carpin span { border: 3px solid var(--border); }
:root[data-theme="dark"] .hd-trip-carpin b { background: var(--surface); color: #a0e3bb; }
:root[data-theme="dark"] .hd-trip-zoom { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .hd-trip-now { border: 1.5px solid #386147; background: #1b3c2a; color: #a0e3bb; }
:root[data-theme="dark"] .hd-trip-now:hover { background: #1b3c28; }
:root[data-theme="dark"] .hd-trip-now small { color: #a0e3c1; }
:root[data-theme="dark"] .hd-trip-tag { background: #1b3c2a; color: #a0e3c1; }
:root[data-theme="dark"] .ip-switch { background: #323948; }
:root[data-theme="dark"] .ip-switch::after { background: var(--surface); }
:root[data-theme="dark"] .ip-who.usr { background: #211b3c; }
:root[data-theme="dark"] .ip-who.usr:hover { background: #221b3c; }
:root[data-theme="dark"] .ipb-top { border-bottom: 1px solid #675232; }
:root[data-theme="dark"] .ipb-top p { color: #d4c7b0; }
:root[data-theme="dark"] .ipb-addr { border: 1px solid #675232; background: var(--surface); color: #d4c7b0; }
:root[data-theme="dark"] .ipb-addr b { color: var(--text); }
:root[data-theme="dark"] .nt-add { background: #3c351b; border-color: #675d32; color: #e3baa0; }
:root[data-theme="dark"] .nt-view a { color: #889edd; }
:root[data-theme="dark"] .nt-remind { color: #e3b1a0; }
:root[data-theme="dark"] .nt-saved { color: #a0e3b9; }
:root[data-theme="dark"] .nt-dot { border: 2px solid var(--border); }
:root[data-theme="dark"] .hd-rec-pd { background: #212836; color: #c5cbd3; }
:root[data-theme="dark"] .hd-rec-pd.p3 { background: #1b253c; color: #889fdd; }
:root[data-theme="dark"] .hd-rec-pd.p6 { background: #211b3c; }
:root[data-theme="dark"] .hd-rec-pd.p12 { background: #1b3c2a; color: #a0e3c1; }
:root[data-theme="dark"] .gps-pin .gps-pin-in i, :root[data-theme="dark"] .gps-pin.multi .gps-pin-in i { background: var(--surface); }
:root[data-theme="dark"] .gps-pin-in i em { border: 1.5px solid var(--border); }
:root[data-theme="dark"] .gps-me b { border: 1.5px solid var(--border); }
:root[data-theme="dark"] .hd-res-toggle i { background: #323a48; }
:root[data-theme="dark"] .hd-res-toggle i::after { background: var(--surface); }
:root[data-theme="dark"] .hd-reback { border: 1.5px solid #675832; }
:root[data-theme="dark"] .hd-reback-ico { background: #534827; }
:root[data-theme="dark"] .hd-reback-t em { background: #534827; color: #e3d0a0; }
:root[data-theme="dark"] .hd-task-ans.yes { background: var(--success-soft, #1b3c25); }
:root[data-theme="dark"] .hd-task-q { border: 1.5px solid #675832; background: #3c331b; color: var(--text); }
:root[data-theme="dark"] .hd-task-q small { color: #e3d0a0; }
:root[data-theme="dark"] .hd-task-q-btns .btn-ghost { border: 1.5px solid #404959; background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .hd-typing-row { border: 1px solid #324367; background: #1b263c; color: #889fdd; }
:root[data-theme="dark"] .hd-typing-row.int { border-color: #675832; background: #3c311b; color: #e3cca0; }
:root[data-theme="dark"] .hd-item.typing { background: #1b263c !important; }
:root[data-theme="dark"] .hd-viewonly { border: 1px solid #324367; background: #1b263c; color: #889fdd; }
:root[data-theme="dark"] .hd-cmp-dot.d-snz, :root[data-theme="dark"] .hd-cmp-dot.d-off { background: #363b45; }
@media (min-width: 861px) {
:root[data-theme="dark"] .hd:not(.has-ticket) .hd-items.compact .hd-item.crit { background: #3c1b1b; }
}
@media (max-width: 860px) {
:root[data-theme="dark"] .hd-items.compact-m .hd-item.crit { background: #3c1b1b; }
}
:root[data-theme="dark"] .shc-sub { color: var(--muted); }
:root[data-theme="dark"] .shc-tabs button { color: #c2cad6; background: #1f2837; }
:root[data-theme="dark"] .cht-item.pending { background: #3c311b; }
:root[data-theme="dark"] .cht-tag { color: #e3bda0; background: #3c311b; }
:root[data-theme="dark"] .cht-av.grp { background: #1b3c27; }
:root[data-theme="dark"] .cht-state.ask { background: #3c311b; border: 1px solid #675432; }
:root[data-theme="dark"] .hd-chat-btn { background: #1b243c; }
:root[data-theme="dark"] .hd-chat-btn:hover { background: #1b243c; }
:root[data-theme="dark"] .hd-chat-btn.live { color: #a0e3c1; background: #1b3c27; }
:root[data-theme="dark"] .hd-chat-btn.wait { color: #e3bda0; background: #3c321b; }
:root[data-theme="dark"] .cht-bar.ask { background: #3c311b; border-color: #675432; }
:root[data-theme="dark"] details.cht-tr > blockquote p.cht-tr-js, :root[data-theme="dark"] details.cht-tr > blockquote p.cht-tr-c { border-left: 3px solid #404959; }
.theme-box { width: 100%; text-align: left; }
.theme-box .theme-sw { margin: .2rem 0 0; }
.theme-box .theme-sw button { flex-direction: row; justify-content: center; gap: .3rem; padding: .45rem .2rem; font-size: .76rem; }
/* Boční panel nad obsahem stránky – jinak se nabídka u jména (hlavně u sbaleného panelu) schová pod karty stránky. */
.sidebar { z-index: 50; }

/* Přihlášení přes Microsoft: tlačítko, oddělovač „nebo“, řádek propojeného účtu. */
.ms-logo { display: inline-grid; grid-template-columns: 8px 8px; gap: 2px; flex: none; }
.ms-logo i { width: 8px; height: 8px; }
.ms-logo i:nth-child(1) { background: #f25022; } .ms-logo i:nth-child(2) { background: #7fba00; }
.ms-logo i:nth-child(3) { background: #00a4ef; } .ms-logo i:nth-child(4) { background: #ffb900; }
.ms-btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; }
.ms-btn.btn-block { display: flex; }
.ms-or { display: flex; align-items: center; gap: .7rem; margin: 1rem 0 .7rem; color: var(--muted); font-size: .78rem; }
.ms-or::before, .ms-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.ms-row { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 12px; }
.ms-row form { margin: 0; }
.ms-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; overflow-wrap: anywhere; }
.ms-row-t small { color: var(--muted); font-size: .78rem; }
.ms-unlink { color: var(--danger); font-size: .86rem; }

/* Uživatelé a přístupy → Žádosti o přístup: odkaz pro správce Microsoft 365 (sbalená karta). */
.ms-consent > summary { display: flex; align-items: center; gap: .7rem; list-style: none; cursor: pointer; }
.ms-consent > summary::-webkit-details-marker { display: none; }
.ms-consent > summary > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.ms-consent > summary small { color: var(--muted); font-size: .8rem; }
.ms-consent-chev { color: var(--muted); transition: transform .15s; }
.ms-consent[open] .ms-consent-chev { transform: rotate(180deg); }
.ms-consent[open] > summary { margin-bottom: .8rem; }
.ms-consent-link { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .5rem .7rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.ms-consent-link span { flex: 1; min-width: 200px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; overflow-wrap: anywhere; }
.ms-consent-lab { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: .9rem 0 .3rem; font-size: .82rem; font-weight: 700; color: var(--muted); }
.ms-consent-text { padding: .7rem .85rem; font-size: .88rem; line-height: 1.5; border: 1px solid var(--border); border-radius: 10px; }
[data-copy][data-copied]::after { content: " ✓"; color: var(--success); }
.ms-consent-row { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; border-top: 1px solid var(--border); }
.ms-consent-row > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.ms-consent-row small { color: var(--muted); font-size: .78rem; }
.ms-consent-row > span:nth-child(2) { flex: 1; }
.ms-consent-row form { margin: 0; }

/* Helpdesk zadavatel – kompaktní seznam (řádky podle skupin, čipy, hledání) */
.hq-bar { margin-bottom: .6rem; }
.hq-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; }
.hq-nav .hd-scope, .hq-nav .o2-tabs { margin: 0; }
.hq-bar .onl-sup { margin: 0; padding: .3rem .75rem .3rem .4rem; border-radius: 999px; white-space: nowrap; }
.hq-bar .onl-sup.off { padding-left: .75rem; }
.hq-bar .onl-sup-t b { display: inline; font-size: .8rem; }
.hq-bar .hd-req-acts { align-items: center; }
@media (max-width: 860px) { .hq-bar .onl-sup { display: none; } }
.hq-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .8rem; margin-bottom: .7rem; }
.hq-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.hq-chip { padding: .28rem .75rem; font: inherit; font-size: .82rem; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; cursor: pointer; }
.hq-chip small { margin-left: .15rem; opacity: .75; }
.hq-chip:hover { color: var(--text); }
.hq-chip.hot { color: var(--success); border-color: var(--hd-ok-border); }
.hq-chip.on { color: #fff; background: var(--primary); border-color: var(--primary); }
.hq-search { flex: 1; min-width: 150px; max-width: 280px; margin-left: auto; padding: .38rem .7rem; font: inherit; font-size: .86rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 9px; }
.hq-grp { margin-bottom: .8rem; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }
.hq-sec { display: flex; align-items: center; gap: .5rem; padding: .45rem .85rem; font-size: .76rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); cursor: pointer; user-select: none; }
.hq-sec.need { color: var(--success); background: var(--hd-ok-bg); }
.hq-sec small { font-weight: 700; opacity: .8; }
.hq-car { margin-left: auto; transition: transform .15s; }
.hq-grp.closed .hq-car { transform: rotate(-90deg); }
.hq-grp.closed .hq-sec { border-bottom: 0; }
.hq-grp.closed .hq-body { display: none; }
[data-hq].hq-filtering .hq-grp.closed .hq-body { display: block; }
.hq-row { --c: #8e98ac; display: grid; grid-template-columns: 84px minmax(0, 1fr) 150px 140px 76px; align-items: center; gap: .2rem .75rem; padding: .5rem .85rem .5rem .75rem; color: var(--text); border-bottom: 1px solid var(--border); border-left: 4px solid var(--c); font-size: .88rem; }
.hq-row:last-child { border-bottom: 0; }
.hq-row:hover { text-decoration: none; background: var(--surface-2); }
.hq-row.s-queue, .hq-row.s-work, .hq-row.s-approval { --c: #1f4fd1; } .hq-row.s-wait_req { --c: #e08a00; } .hq-row.s-wait_third { --c: #6d4bd8; } .hq-row.s-snoozed { --c: #9a948a; }
.hq-row.s-resolved { --c: #1a7f4b; } .hq-row.s-closed, .hq-row.s-cancelled, .hq-row.s-merged { --c: #c3c9d4; }
.hq-id { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .74rem; color: var(--muted); }
.hq-idm { display: none; }
.hq-main { min-width: 0; }
.hq-subj { display: inline; font-weight: 600; }
.hq-row.unread .hq-subj { font-weight: 800; }
.hq-sub { display: block; overflow: hidden; font-size: .76rem; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.hq-sub .hd-task-tag, .hq-sub .hd-rem-tag, .hq-sub .hd-stars-show { margin-left: .4rem; }
.hq-who { display: flex; align-items: center; gap: .4rem; min-width: 0; overflow: hidden; font-size: .8rem; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.hq-row.colleague .hq-who { font-weight: 600; color: var(--text); }
.hq-act { display: inline-block; padding: .12rem .6rem; border-radius: 7px; background: var(--c); color: #fff; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.hq-date { font-size: .78rem; color: var(--muted); text-align: right; white-space: nowrap; }
.hq-none { margin-top: .5rem; }
@media (max-width: 760px) {
    .hq-search { max-width: none; margin-left: 0; }
    .hq-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "main date" "st who"; padding: .55rem .7rem .55rem .65rem; }
    .hq-id { display: none; }
    .hq-idm { display: inline; }
    .hq-main { grid-area: main; } .hq-date { grid-area: date; } .hq-st { grid-area: st; } .hq-who { grid-area: who; justify-content: flex-end; }
}

/* Nákupní seznam: úchyt pro ruční pořadí (přetahování) */
.shop-drag { flex: none; margin-right: 0; padding: .35rem .3rem; font-size: 1.15rem; line-height: 1; opacity: .55; }
.shop-drag:hover, .shop-drag:focus-visible { opacity: 1; }
.shop-item.dragging { background: var(--surface); box-shadow: 0 8px 24px rgba(16, 24, 40, .15); outline: 2px dashed var(--primary); outline-offset: -2px; }

/* Helpdesk – tichá zpráva (jen řešitelé a jedna druhá strana) */
.hd-msg.qt .hd-bub { background: var(--hd-q-bg); border: 1.5px dashed var(--hd-q-border); }
.hd-msg.qt .hd-msg-h b { color: var(--hd-q-ink); }
.hd-tag-q { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .5rem; border-radius: 999px; background: var(--hd-q-chip); color: var(--hd-q-ink); font-size: .7rem; font-weight: 700; white-space: nowrap; }
.hd-edit-btn.hd-quiet-reply { color: var(--hd-q-ink); }
.hd-cmp-tabs .qt input:checked + span { background: var(--hd-q-bg); color: var(--hd-q-ink); }
.hd-composer:has(.qt input:checked) .hd-cmp-body { background: var(--hd-q-bg); }
.hd-composer:has(.qt input:checked) [data-hd-public-only] { visibility: hidden; }
.hd-composer:has(.qt input:checked) [data-hd-send] { background: var(--hd-q-btn); border-color: var(--hd-q-btn); color: #fff; }
.hd-quiet-to { display: none; align-items: center; flex-wrap: wrap; gap: .3rem .7rem; margin-bottom: .5rem; font-size: .84rem; }
.hd-quiet-to small { color: var(--muted); }
.hd-quiet-to select { margin-left: .3rem; padding: .25rem .5rem; font: inherit; font-size: .84rem; border: 1px solid var(--hd-q-border); border-radius: 8px; background: var(--surface); color: var(--text); }
.hd-composer:has(.qt input:checked) .hd-quiet-to { display: flex; }

/* Helpdesk – Moje poznámka v liště tiketu: ikona (žlutá, když něco obsahuje), štítek s úryvkem a lísteček */
.hd-notewrap { position: relative; display: inline-flex; }
.hd-ib-note { position: relative; }
.hd-note-dot { display: none; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border: 2px solid var(--surface); border-radius: 50%; background: #e5484d; }
.hd-ib-note.has { background: var(--hd-nt-bg); border-color: var(--hd-nt-border); animation: hd-note-pulse 2.2s ease-out 3; }
.hd-ib-note.has .hd-note-dot { display: block; }
@keyframes hd-note-pulse { 0% { box-shadow: 0 0 0 0 rgba(230, 194, 0, .6); } 70% { box-shadow: 0 0 0 9px rgba(230, 194, 0, 0); } 100% { box-shadow: 0 0 0 0 rgba(230, 194, 0, 0); } }
@media (prefers-reduced-motion: reduce) { .hd-ib-note.has { animation: none; } }
.hd-note-chip { display: inline-flex; max-width: 100%; align-items: center; padding: .12rem .6rem; font: inherit; font-size: .78rem; font-weight: 700; color: var(--hd-nt-ink); background: var(--hd-nt-bg); border: 1px solid var(--hd-nt-border); border-radius: 999px; cursor: pointer; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.hd-note-chip:hover { filter: brightness(.96); }
.hd-notepop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: 320px; padding: .7rem .8rem; color: var(--hd-nt-ink); background: var(--hd-nt-pop); border: 1px solid var(--hd-nt-border); border-radius: 12px; box-shadow: 0 10px 28px rgba(16, 24, 40, .2); }
.hd-notepop h4 { display: flex; align-items: center; gap: .3rem; margin: 0 0 .4rem; font-size: .88rem; }
.hd-notepop .hd-lock { color: inherit; opacity: .75; }
@media (max-width: 860px) { .hd-notepop { position: fixed; left: 12px; right: 12px; top: 22vh; width: auto; } }

/* Soupis práce – u paušálu zvlášť účtování dopravy a ostatních nákladů */

/* Helpdesk – hodnocení zadavatele v seznamu řešitele: zlaté hvězdy = hodnocení, nízké (1–2) červeně */
.hd-rate { display: inline-flex; align-items: center; padding: 0 .45rem; border: 1px solid #f0d36a; border-radius: 999px; background: #fff6d6; font-size: .72rem; line-height: 1.5; letter-spacing: -.05em; white-space: nowrap; }
.hd-rate b { color: #f5b301; font-weight: 400; }
.hd-rate i { color: #d9cfa8; font-style: normal; }
.hd-rate.low { border-color: #f0a8a2; background: #fde7e5; }
.hd-rate.low b { color: #e5484d; }
.hd-rate.low i { color: #e8bcb8; }
:root[data-theme="dark"] .hd-rate { border-color: #6b5518; background: #3a3010; }
:root[data-theme="dark"] .hd-rate i { color: #6b5f3a; }
:root[data-theme="dark"] .hd-rate.low { border-color: #7a2c2c; background: #331616; }
:root[data-theme="dark"] .hd-rate.low i { color: #6d3a3a; }

/* Hodnocení: změna zadavatelem (do 72 h) a oprava Správcem IS */
.hd-rate-mine { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem; margin: .6rem 0; font-size: .88rem; color: var(--muted); }
.hd-rate-change summary, .hd-rate-fix summary { cursor: pointer; list-style: none; color: var(--muted); font-size: .8rem; font-weight: 600; }
.hd-rate-change summary:hover, .hd-rate-fix summary:hover { color: var(--text); }
.hd-rate-change form { display: flex; align-items: center; gap: .6rem; margin-top: .4rem; }
.hd-rate-fix { position: relative; display: inline-block; }
.hd-rate-fix form { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; display: flex; gap: .4rem; padding: .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(16, 24, 40, .15); white-space: nowrap; }
.hd-rate-fix select { flex: none; width: auto; min-width: 9rem; padding: .35rem .6rem; font: inherit; font-size: .9rem; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }

/* Psaní zprávy: čtyři prvky v záložkách (Odpověď, Interní, Tichá, Odpovědi) se na úzké obrazovce zalomí místo přetečení */
.hd-cmp-tabs { flex-wrap: wrap; row-gap: .25rem; }
@media (max-width: 860px) {
    .hd-cmp-tabs span { padding: .45rem .6rem; }
    .hd-cmp-tabs .hd-rep-btn { margin-left: 0; }
}

/* Domov – zatížení budovy (záložka v bloku Ceny PHM): tři sloupce vedle sebe, na úzkém bloku pod sebou */
.en-card { padding: .8rem 1rem; }
.en-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); gap: 1rem 1.6rem; align-items: start; }
.en-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.en-big { font-size: 1rem; font-weight: 700; }
.en-big b { font-size: 2rem; line-height: 1; font-weight: 800; }
.en-big small { display: block; margin-top: .1rem; font-size: .74rem; font-weight: 600; color: var(--muted); }
.en-side { display: grid; gap: .05rem; font-size: .78rem; text-align: right; }
.en-side div { display: flex; justify-content: space-between; gap: .6rem; }
.en-side span { color: var(--muted); }
progress.en-bar { display: block; width: 100%; height: 8px; margin-top: .5rem; -webkit-appearance: none; appearance: none; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
progress.en-bar::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress.en-bar::-webkit-progress-value { background: var(--success); border-radius: 999px; transition: width .4s; }
progress.en-bar::-moz-progress-bar { background: var(--success); border-radius: 999px; }
.en-warn progress.en-bar::-webkit-progress-value { background: #e08a00; } .en-warn progress.en-bar::-moz-progress-bar { background: #e08a00; }
.en-hot progress.en-bar::-webkit-progress-value { background: var(--danger); } .en-hot progress.en-bar::-moz-progress-bar { background: var(--danger); }
.en-off progress.en-bar::-webkit-progress-value { background: #9a948a; } .en-off progress.en-bar::-moz-progress-bar { background: #9a948a; }
.en-off .en-big b { color: var(--muted); }
.en-badge { padding: 0 .45rem; border-radius: 999px; background: var(--danger-soft); color: var(--danger); font-size: .68rem; font-weight: 700; }
.en-chart { position: relative; height: 130px; margin-top: .45rem; }
.en-chart canvas { max-width: 100%; }
.en-line { stroke: var(--success); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.en-warn .en-line { stroke: #e08a00; } .en-hot .en-line { stroke: var(--danger); } .en-off .en-line { stroke: #9a948a; }
.en-limit { stroke: var(--danger); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.en-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .2rem; font-size: .72rem; color: var(--muted); }
.en-live { padding: .05rem .5rem; font: inherit; font-size: .72rem; font-weight: 700; color: var(--primary); background: var(--primary-soft); border: 0; border-radius: 999px; cursor: pointer; }
.en-live.on { color: #fff; background: var(--primary); }
.en-card h4 { margin: 0 0 .35rem; font-size: .74rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); }
.en-pill { margin-left: .4rem; padding: .05rem .5rem; border-radius: 999px; background: var(--success-soft); color: var(--success); font-size: .7rem; letter-spacing: 0; text-transform: none; }
.en-kv { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; font-size: .84rem; }
.en-kv span { color: var(--muted); }
.en-kv b { text-align: right; }
.en-kv b span { color: inherit; }
.en-bars { display: block; width: 100%; height: 34px; margin-top: .5rem; }
.en-rect { fill: var(--primary); } .en-rect.zero { fill: var(--border); }
.en-ax { display: flex; justify-content: space-between; gap: .5rem; margin-top: .1rem; font-size: .68rem; color: var(--muted); }
.en-more { margin-top: .7rem; padding-top: .5rem; border-top: 1px solid var(--border); }
.en-more summary { cursor: pointer; font-size: .8rem; font-weight: 700; color: var(--muted); }
.en-kv-more { margin-top: .5rem; }
.en-page { max-width: 1100px; }
.en-ranges { display: inline-flex; gap: .15rem; }
.en-ranges button { padding: .05rem .45rem; font: inherit; font-size: .72rem; font-weight: 600; color: var(--muted); background: none; border: 0; border-radius: 999px; cursor: pointer; }
.en-ranges button:hover { color: var(--text); }
.en-ranges button.on { color: var(--text); background: var(--surface-2); font-weight: 700; }

/* Helpdesk – filtr organizací zaškrtávátky (při částečném výběru žlutě, aby se na skryté organizace nezapomnělo) */
.hd-orgdd { position: relative; }
.hd-orgdd > summary { display: flex; align-items: center; gap: .35rem; height: 100%; padding: .4rem .65rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: .82rem; list-style: none; white-space: nowrap; cursor: pointer; }
.hd-orgdd > summary::-webkit-details-marker { display: none; }
.hd-orgdd > summary.warn { border-color: var(--hd-nt-border); background: var(--hd-nt-bg); color: var(--hd-nt-ink); font-weight: 600; }
.hd-orgdd-menu { position: fixed; z-index: 45; display: flex; flex-direction: column; width: 300px; max-width: calc(100vw - 16px); max-height: min(420px, calc(100vh - 80px)); overflow: auto; padding: .4rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: 0 10px 28px rgba(16, 24, 40, .18); }
.hd-orgdd-row { display: flex; align-items: center; gap: .3rem; border-radius: 8px; }
.hd-orgdd-row:hover { background: var(--surface-2); }
.hd-orgdd-row label { display: flex; flex: 1; align-items: center; gap: .5rem; min-width: 0; padding: .38rem .45rem; font-size: .86rem; cursor: pointer; }
.hd-orgdd-row.all { padding: .38rem .45rem; margin-bottom: .25rem; border-bottom: 1px solid var(--border); border-radius: 8px 8px 0 0; cursor: pointer; }
.hd-orgdd-row small { margin-left: auto; color: var(--muted); font-size: .72rem; }
.hd-orgdd-only { padding: 0 .5rem; font-size: .72rem; font-weight: 700; color: var(--primary); opacity: 0; text-decoration: none; }
.hd-orgdd-row:hover .hd-orgdd-only, .hd-orgdd-only:focus { opacity: 1; }
@media (hover: none) { .hd-orgdd-only { opacity: 1; } }
.hd-orgdd-hint { margin: .4rem .45rem .1rem; font-size: .72rem; color: var(--muted); }
.hd-orgchk { display: flex; flex-direction: column; gap: .15rem; }
.hd-orgchk-row { display: flex; align-items: center; gap: .55rem; padding: .35rem 0; }
.hd-orgchk-row small { margin-left: auto; color: var(--muted); }
.hd-flt-chips a.warn { border-color: var(--hd-nt-border); background: var(--hd-nt-bg); color: var(--hd-nt-ink); font-weight: 700; }
/* Filtr organizací: dlouhý název se zkrátí na „…“, počet a „jen“ mají vlastní pevné místo (nic se nepřekrývá) */
.hd-orgdd-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.hd-orgdd-row label { min-width: 0; }
.hd-orgdd-row label input { flex: none; }
.hd-orgdd-row label .org-tag, .hd-orgchk-row .org-tag { flex: 0 1 auto; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hd-orgdd-row label small, .hd-orgchk-row small { flex: none; min-width: 1.4rem; text-align: right; }
.hd-orgdd-only { flex: none; }
.hd-orgdd-row.all { display: flex; }
.hd-orgchk-row { min-width: 0; }
.hd-orgchk-row input { flex: none; }

/* Blok Helpdesk (řešitel): grafy za týden a hodnocení */
.hdw-charts { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .8rem 1.4rem; margin: .8rem 0 .2rem; align-items: start; }
.hdw-chart { min-width: 0; }
.hdw-chart .hdw-lab { margin-bottom: .2rem; }
.hdw-cv { position: relative; height: 130px; }
.hdw-cv-sm { height: 70px; }
.hdw-avg { display: flex; align-items: baseline; gap: .35rem; }
.hdw-avg b { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.hdw-avg small { margin-left: auto; color: var(--muted); font-size: .72rem; }
@media (max-width: 700px) { .hdw-charts { grid-template-columns: minmax(0, 1fr); } }
.hdw-cv canvas { max-width: 100%; }

/* Věrnostní karty: karusel (Swiper) při víc kartách obchodu */
.shc-sw { width: 100%; max-width: 560px; --swiper-theme-color: #1f4fd1; --swiper-pagination-bullet-size: 9px; padding-bottom: 1.6rem; }
.shc-slide { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.shc-sw .swiper-pagination { bottom: 0; }
.shc-static { display: flex; flex-direction: column; align-items: center; gap: .3rem; width: 100%; }

/* Hláška o úspěchu: animované zaškrtnutí (Lottie) nahradí statické ✓ */
.toast-ok { display: none; flex: none; width: 26px; height: 26px; }
.toast-ok.on { display: block; }
.toast-success:has(.toast-ok.on)::before { display: none; }
.en-grid > * { min-width: 0; }

/* Vzít si – seznamy věcí na cestu */
.vz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .8rem; }
.vz-card { display: block; padding: .85rem .95rem; color: inherit; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.vz-card:hover { text-decoration: none; border-color: #b9c6e4; }
.vz-t { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; }
.vz-t b { font-size: 1rem; }
.vz-d { font-size: .78rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.vz-d.past { color: var(--muted); font-weight: 600; }
progress.vz-p { display: block; width: 100%; height: 7px; margin: .55rem 0 .25rem; -webkit-appearance: none; appearance: none; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
progress.vz-p::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
progress.vz-p::-webkit-progress-value { background: var(--success); border-radius: 999px; transition: width .3s; }
progress.vz-p::-moz-progress-bar { background: var(--success); border-radius: 999px; }
.vz-m { display: flex; justify-content: space-between; gap: .5rem; font-size: .76rem; color: var(--muted); }
.vz-sh { display: inline-flex; padding: 0 .45rem; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: .7rem; font-weight: 700; }
.vz-del { margin-top: 1.4rem; }
.vz-del summary { cursor: pointer; font-weight: 700; font-size: .9rem; }
.vz-del .card { margin-top: .5rem; }
.vz-del-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .35rem 0; }
.vz-del-row form { margin: 0; }
.vz-top { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; min-width: 0; }
.vz-back { flex: none; font-size: .86rem; font-weight: 700; }
.vz-chips { display: flex; gap: .35rem; min-width: 0; overflow-x: auto; }
.vz-chips a { flex: none; padding: .25rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--muted); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.vz-chips a:hover { text-decoration: none; color: var(--text); }
.vz-chips a.on { color: #fff; background: var(--primary); border-color: var(--primary); }
.vz-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin-bottom: .4rem; }
.vz-name, .vz-name-ro { flex: 1 1 200px; min-width: 0; margin: 0; padding: .1rem .3rem; font: inherit; font-size: 1.35rem; font-weight: 800; color: var(--text); background: none; border: 0; border-radius: 8px; }
.vz-name:hover, .vz-name:focus { background: var(--surface-2); outline: none; }
.vz-date { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .6rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); font-size: .85rem; }
.vz-date input { border: 0; background: none; font: inherit; color: inherit; padding: 0; }
.vz-date.ro { border: 0; background: none; padding: 0; color: var(--muted); }
.vz-dx { border: 0; background: none; color: var(--muted); cursor: pointer; }
.vz-sum { display: flex; align-items: center; gap: .7rem; margin: .2rem 0 .6rem; font-size: .86rem; }
progress.vz-p-in { flex: 1; max-width: 220px; margin: 0; }
.vz-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: .7rem; }
.vz-bar form { margin: 0; }
.vz-grow { flex: 1; }
.vz-danger { color: var(--danger); }
.vz-pop { position: relative; }
.vz-pop > summary { list-style: none; cursor: pointer; }
.vz-pop > summary::-webkit-details-marker { display: none; }
.vz-pop > summary.on { color: var(--hd-nt-ink); background: var(--hd-nt-bg); border-color: var(--hd-nt-border); }
.vz-pop-box { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 40; display: flex; flex-direction: column; gap: .5rem; width: 280px; padding: .8rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 28px rgba(16, 24, 40, .18); }
.vz-quick { display: flex; flex-wrap: wrap; gap: .3rem; }
.vz-quick button { padding: .2rem .6rem; font: inherit; font-size: .78rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); cursor: pointer; }
.vz-pop-acts { display: flex; align-items: center; justify-content: space-between; }
.vz-add { display: flex; gap: .4rem; margin-bottom: .7rem; }
.vz-add textarea { flex: 1; min-width: 0; min-height: 2.6rem; max-height: 150px; padding: .6rem .8rem; font: inherit; line-height: 1.3; resize: none; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); }
.vz-items { margin-bottom: .6rem; }
.vz-h { flex: none; margin-right: 0; opacity: .5; }
.vz-name-i { cursor: text; overflow-wrap: anywhere; }
.vz-items .shop-item.done .shop-name { color: var(--muted); text-decoration: line-through; }
.vz-items.hide-packed .shop-item.done { display: none; }
.vz-x { flex: none; border: 0; background: none; color: var(--muted); font-size: .9rem; cursor: pointer; opacity: 0; padding: .3rem .4rem; }
.shop-row:hover .vz-x, .vz-x:focus { opacity: 1; }
@media (hover: none) { .vz-x { opacity: .5; } }
.vz-edit { flex: 1; min-width: 0; padding: .35rem .5rem; font: inherit; border: 1px solid var(--primary); border-radius: 8px; background: var(--surface); color: var(--text); }
.vz-share-list { display: flex; flex-direction: column; max-height: 50vh; overflow: auto; margin: .6rem 0; }
.vz-share-row { display: flex; align-items: center; gap: .6rem; padding: .45rem .2rem; border-bottom: 1px solid var(--border); }
.vzw-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(60px, 1fr) auto; align-items: center; gap: .7rem; padding: .45rem 0; color: inherit; border-top: 1px solid var(--border); }
.vzw-row:first-child { border-top: 0; }
.vzw-row:hover { text-decoration: none; }
.vzw-t { display: flex; flex-direction: column; min-width: 0; }
.vzw-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vzw-t small { color: var(--muted); font-size: .72rem; }
.vzw-row progress.vz-p { margin: 0; }
.vzw-n { font-size: .8rem; font-weight: 700; color: var(--muted); min-width: 2.2rem; text-align: right; }
.vz-priv-opt { display: inline-flex; flex: none; align-items: center; gap: .3rem; padding: 0 .3rem; font-size: .8rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.vz-priv { margin-left: .5rem; padding: 0 .45rem; border-radius: 999px; background: var(--hd-nt-bg); color: var(--hd-nt-ink); font-size: .68rem; font-weight: 700; white-space: nowrap; }
.vz-items .shop-item.swiping::after { content: "✓ Sbaleno"; }
.vz-items .shop-item.done.swiping::after { content: "↩ Zpět"; }
.vz-lock { flex: none; font-size: 1.1rem; }
.vz-done { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; margin-bottom: .6rem; padding: .55rem .8rem; border-radius: 12px; background: var(--success-soft); color: var(--success); font-weight: 700; font-size: .9rem; }
.vz-done form { margin: 0; }
.vz-bar .btn.on { color: var(--hd-nt-ink); background: var(--hd-nt-bg); border-color: var(--hd-nt-border); }
.vz-lk { flex: none; border: 0; background: none; font-size: .85rem; line-height: 1; cursor: pointer; opacity: 0; padding: .3rem .35rem; filter: grayscale(1); }
.vz-lk.on { opacity: .9; filter: none; }
.shop-row:hover .vz-lk, .vz-lk:focus { opacity: 1; }
@media (hover: none) { .vz-lk { opacity: .45; } .vz-lk.on { opacity: .9; } }

/* Vzít si – nástěnka seznamů: karty vedle sebe */
.vb-board { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .8rem; align-items: start; }
.vb-c { min-width: 0; padding: .55rem .7rem .65rem; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.vb-w-q { grid-column: span 3; } .vb-w-t { grid-column: span 4; } .vb-w-h { grid-column: span 6; } .vb-w-tt { grid-column: span 8; } .vb-w-f { grid-column: span 12; }
@media (max-width: 1100px) { .vb-w-q, .vb-w-t, .vb-w-h { grid-column: span 6; } .vb-w-tt, .vb-w-f { grid-column: span 12; } }
@media (max-width: 700px) { .vb-board > .vb-c { grid-column: span 12; } }
.vb-board > .dragging { background: var(--surface); box-shadow: 0 8px 24px rgba(16, 24, 40, .15); outline: 2px dashed var(--primary); outline-offset: 4px; }
.vb-h { display: flex; align-items: center; gap: .35rem; cursor: pointer; }
.vb-dh { flex: none; margin: 0 !important; opacity: .5; cursor: grab; }
.vb-caret { flex: none; width: .9rem; color: var(--muted); font-size: .8rem; transition: transform .15s; }
.vb-c.open .vb-caret { transform: rotate(90deg); }
.vb-t { flex: 1; min-width: 0; display: flex; flex-direction: column; color: inherit; }
.vb-t:hover { text-decoration: none; }
.vb-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .98rem; }
.vb-t small { color: var(--primary); font-weight: 700; font-size: .72rem; }
.vb-t small.past { color: var(--muted); font-weight: 600; }
.vb-n { flex: none; font-size: .76rem; font-weight: 700; color: var(--muted); }
.vb-more { position: relative; flex: none; }
.vb-more > summary { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-weight: 800; list-style: none; cursor: pointer; }
.vb-more > summary::-webkit-details-marker { display: none; }
.vb-more > summary:hover, .vb-more[open] > summary { background: var(--surface-2); }
.vb-menu { position: absolute; right: 0; top: 32px; z-index: 45; display: flex; flex-direction: column; gap: .1rem; width: 230px; padding: .5rem; font-size: .84rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 10px 28px rgba(16, 24, 40, .18); }
.vb-menu hr { margin: .3rem 0; border: 0; border-top: 1px solid var(--border); }
.vb-menu a, .vb-menu button { display: block; width: 100%; padding: .35rem .5rem; font: inherit; text-align: left; color: var(--text); background: none; border: 0; border-radius: 8px; cursor: pointer; }
.vb-menu a:hover, .vb-menu button:hover { background: var(--surface-2); text-decoration: none; }
.vb-menu button:disabled { opacity: .45; cursor: not-allowed; }
.vb-menu form { margin: 0; }
.vb-menu .dng { color: var(--danger); }
.vb-w { display: flex; gap: .2rem; margin: .25rem 0; }
.vb-menu .vb-w button { flex: 1; width: auto; padding: .25rem 0; text-align: center; font-weight: 700; border: 1px solid var(--border); background: var(--surface); }
.vb-menu .vb-w button.on { color: #fff; background: var(--primary); border-color: var(--primary); }
.vb-c > progress.vz-p { margin: .45rem 0 .1rem; }
.vb-body { margin-top: .5rem; }
.vb-body .vz-add { margin-bottom: .4rem; }
.vb-body .vz-add textarea { min-height: 2.2rem; padding: .4rem .6rem; font-size: .88rem; }
.vb-ul { margin: .1rem 0 0 !important; box-shadow: none; border: 0; }
.vb-ul .shop-row { padding: .1rem .2rem .1rem .1rem; }
.vb-ul .shop-cb { width: 34px; height: 34px; }
.vb-ul .shop-name { font-size: .9rem; }
/* Soukromá položka: jen tenký žlutý proužek vlevo a zvýrazněný zámek (žádný velký štítek) */
.shop-item.priv .shop-row { box-shadow: inset 3px 0 0 var(--hd-nt-border); }
/* Pole pro novou položku: výraznější okraj a světle modré pozadí, ať je vidět, kam psát */
.vz-add textarea { border: 1.5px solid color-mix(in srgb, var(--primary) 40%, var(--border)); background: color-mix(in srgb, var(--primary-soft) 65%, var(--surface)); }
.vz-add textarea::placeholder { color: color-mix(in srgb, var(--primary) 70%, var(--muted)); opacity: .85; font-weight: 600; }
.vz-add textarea:focus { outline: none; border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--primary-soft); }

/* Soupis práce na obrazovce – tabulka jako v PDF (Datum · Popis · Hod. · Km · Částka) */
.srt-wrap { overflow-x: auto; }
.srt { width: 100%; border-collapse: collapse; font-size: .92rem; }
.srt th { padding: .4rem .5rem; text-align: left; font-size: .7rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--border); }
.srt th.r, .srt td.r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.srt td { padding: .5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.srt tr.g td { background: var(--surface-2); font-weight: 700; }
.srt tr.sec td { padding: .4rem .5rem; background: var(--surface); font-weight: 700; color: var(--muted); }
.srt tr.sec.car td { background: var(--primary-soft); color: var(--primary); }
.srt tr.off td { opacity: .6; }
.srt tr.draft td { background: var(--hd-int-bg); }
.srt tr.disc td { color: var(--hd-ap-ok); }
.srt-num { margin-right: .5rem; font: 700 .8rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--primary); white-space: nowrap; }
.srt td.d { white-space: nowrap; font-weight: 600; }
.srt td.d small { display: block; font-size: .74rem; font-weight: 400; color: var(--muted); }
.srt-desc { overflow-wrap: anywhere; }
.srt-c { display: block; margin-top: .1rem; font-size: .78rem; color: var(--muted); }
.srt-p { display: inline-block; padding: 0 .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-weight: 600; }
.srt-p.flat { background: var(--primary-soft); color: var(--primary); }
.srt .z { color: var(--muted); }
.srt-old { margin-right: .4rem; font-weight: 400; color: var(--muted); text-decoration: line-through; }
.srt td.a { width: 1%; white-space: nowrap; text-align: right; }
.srt td.a .sr-acts { justify-content: flex-end; opacity: .4; transition: opacity .15s; }
.srt tr:hover td.a .sr-acts, .srt td.a .sr-acts:focus-within { opacity: 1; }
.srt-sum { max-width: 360px; margin: .9rem 0 0 auto; font-size: .92rem; }
.srt-sum > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: .22rem 0; color: var(--muted); }
.srt-sum b { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--text); }
.srt-sum .fin { margin-bottom: .3rem; padding: .55rem .8rem; border-radius: 10px; background: var(--hd-ap-ok-bg); color: var(--hd-ap-ok); font-size: 1.05rem; font-weight: 800; }
.srt-sum .fin b { color: var(--hd-ap-ok); font-weight: 800; }
.srt-sum .fin small { margin-left: .4rem; font-size: .76rem; font-weight: 600; color: var(--muted); }
.srt-sum .vat { color: var(--text); font-weight: 700; }
@media (max-width: 640px) {
    .srt-hm { display: none; }
    .srt td, .srt th { padding-left: .35rem; padding-right: .35rem; }
}

/* Souhrn nad soupisem – jeden řádek místo dlaždic */
.srt-kpi { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.4rem; margin: 0 0 .7rem; padding: 0 .1rem .8rem; border-bottom: 1px solid var(--border); font-size: .86rem; color: var(--muted); }
.srt-kpi b { margin-left: .3rem; font-size: .98rem; color: var(--text); }
.srt-kpi .tot { margin-left: auto; }
.srt-kpi .tot b { font-size: 1.25rem; color: var(--success); }

/* Soupis – řádek záznamu a podřádek „doprava a parkovné“ */
.srt tr.srt-mn.has-sub td { border-bottom: 0; }
.srt tr.srt-sb td { padding-top: .15rem; padding-bottom: .4rem; font-size: .86rem; color: var(--muted); }
.srt tr.srt-sb td:nth-child(2)::before { content: "↳ "; }
.srt tr.srt-sb td:nth-child(2) { padding-left: 1.2rem; }
.srt-st { display: inline-block; margin-left: .35rem; padding: 0 .45rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .72rem; font-weight: 600; }
.srt-st.flat { background: var(--primary-soft); color: var(--primary); }
.srt-st.extra { background: #fff3b8; color: #5a4600; }
:root[data-theme="dark"] .srt-st.extra { background: #3a3010; color: #f0d36a; }
.srt-st.disc { background: var(--hd-ap-ok-bg); color: var(--hd-ap-ok); }
.srt-st.off { border: 1px dashed var(--border); background: none; }
.srt-c.srt-m { display: none; }
@media (max-width: 640px) { .srt-c.srt-m { display: block; } }
.pc-t tr.has-sub td { border-bottom: 0; }
.pc-t tr.sb td { padding-top: 0; color: #4b5466; font-size: 10.5px; }
.pc-t tr.sb .sb-t { padding-left: 14px; }
