:root {
    --bg: #f3f5fa;
    --surface: #ffffff;
    --surface-2: #f1f4f9;
    --surface-3: #e8ecf4;
    --border: #e2e7f0;
    --text: #172033;
    --muted: #66728a;
    --primary: #4f46e5;
    --primary-strong: #4338ca;
    --primary-text: #ffffff;
    --primary-soft: #eceafd;
    --danger: #c0352b;
    --danger-soft: #fdecea;
    --success: #197a45;
    --success-soft: #e2f5ea;
    --warning: #8a5a00;
    --warning-soft: #fff3d1;
    --info: #0b6aa8;
    --info-soft: #e1f1fb;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgba(23, 32, 51, .05), 0 6px 20px rgba(23, 32, 51, .06);
    --sidebar: 264px;
    color-scheme: light;
}

/* Tmavý režim: podle systému, nebo ručně přepínačem (atribut data-theme na <html>). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f131b;
        --surface: #171d28;
        --surface-2: #1f2634;
        --surface-3: #283143;
        --border: #2b3445;
        --text: #e9edf5;
        --muted: #97a3b8;
        --primary: #8b85ff;
        --primary-strong: #a5a0ff;
        --primary-text: #10121f;
        --primary-soft: #26264a;
        --danger: #ff8f85;
        --danger-soft: #45201d;
        --success: #79d9a2;
        --success-soft: #173826;
        --warning: #f2cf72;
        --warning-soft: #40341a;
        --info: #7cc4f0;
        --info-soft: #173247;
        --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
        color-scheme: dark;
    }
}
:root[data-theme="dark"] {
    --bg: #0f131b;
    --surface: #171d28;
    --surface-2: #1f2634;
    --surface-3: #283143;
    --border: #2b3445;
    --text: #e9edf5;
    --muted: #97a3b8;
    --primary: #8b85ff;
    --primary-strong: #a5a0ff;
    --primary-text: #10121f;
    --primary-soft: #26264a;
    --danger: #ff8f85;
    --danger-soft: #45201d;
    --success: #79d9a2;
    --success-soft: #173826;
    --warning: #f2cf72;
    --warning-soft: #40341a;
    --info: #7cc4f0;
    --info-soft: #173247;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .3);
    color-scheme: dark;
}
:root[data-theme="light"] { color-scheme: light; }

* { box-sizing: border-box; }
html, body, #app { height: 100%; }

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

h1 { font-size: 1.6rem; margin: 0; line-height: 1.2; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0 0 .4rem; }
p { margin: 0 0 .75rem; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
svg { display: block; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.spacer { flex: 1; }
[hidden] { display: none !important; }

/* ---------- Rozvržení ---------- */

.layout { display: flex; min-height: 100%; }

.sidebar {
    width: var(--sidebar);
    flex: none;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; }
.brand-mark {
    width: 40px; height: 40px; border-radius: 12px; flex: none;
    display: grid; place-items: center; color: #fff; font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #8b5cf6 55%, #ec4899);
}
.brand strong { display: block; line-height: 1.2; }
.brand span { font-size: .78rem; color: var(--muted); }

.nav { display: flex; flex-direction: column; padding: 4px 12px 12px; overflow-y: auto; flex: 1; }
.nav-section { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }

.nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 8px 10px; border-radius: 10px; color: var(--text); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary-strong); font-weight: 650; }
.nav .ic, .bottom-nav .ic {
    width: 30px; height: 30px; border-radius: 9px; flex: none;
    display: grid; place-items: center; background: var(--surface-2); color: var(--muted);
}
.nav a.active .ic { background: var(--primary); color: var(--primary-text); }
.nav .count { margin-left: auto; }

.sidebar-foot { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; color: var(--text); }
.sidebar-foot:hover { background: var(--surface-2); text-decoration: none; }
.tiles + .cols, .tiles + div { margin-top: 18px; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
    background: var(--primary-soft); color: var(--primary-strong); font-weight: 700; font-size: .85rem;
}
.sidebar-foot .who { min-width: 0; }
.sidebar-foot .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

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

.topbar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 28px; background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5;
}

.content { padding: 8px 28px 40px; max-width: none; width: 100%; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 20px; }
.page-head .sub { color: var(--muted); margin-top: 2px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; font-size: .9rem; font-weight: 550; }

/* ---------- Karty, dlaždice ---------- */

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px;
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.card.flush .card-head { padding: 16px 20px 0; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid .card { margin-bottom: 0; }
.grid + .card, .grid + .grid, .card + .grid, .tiles + .grid, .tiles + .card { margin-top: 18px; }
.cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.cols .card { margin-bottom: 18px; }

.hero {
    border-radius: 18px; padding: 24px 26px; margin-bottom: 20px; color: #fff;
    background: linear-gradient(120deg, #4f46e5, #7c3aed 55%, #db2777);
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.hero h1 { color: #fff; }
.hero p { margin: 4px 0 0; opacity: .9; }
.hero .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.hero .chip { background: rgba(255, 255, 255, .18); border-radius: 999px; padding: 5px 12px; font-size: .85rem; font-weight: 600; }

.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.tile {
    display: flex; flex-direction: column; gap: 10px; padding: 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); color: var(--text); font-weight: 650;
    transition: transform .12s ease, box-shadow .12s ease;
}
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 2px 4px rgba(23, 32, 51, .06), 0 12px 28px rgba(23, 32, 51, .1); }
.tile .ic { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; color: #fff; }
.tile small { font-weight: 500; color: var(--muted); }

.c-indigo { background: #6366f1; } .c-blue { background: #3b82f6; } .c-teal { background: #14b8a6; }
.c-green { background: #22c55e; } .c-amber { background: #f59e0b; } .c-orange { background: #f97316; }
.c-rose { background: #f43f5e; } .c-violet { background: #8b5cf6; } .c-slate { background: #64748b; }
.c-cyan { background: #06b6d4; }

.stat { font-size: 1.9rem; font-weight: 700; line-height: 1.1; letter-spacing: -.02em; }
.stat-row { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.stat-box { background: var(--surface-2); border-radius: var(--radius-sm); padding: 12px 14px; }
.stat-box .stat { font-size: 1.5rem; }
.stat-box span { font-size: .8rem; color: var(--muted); }

/* ---------- Ovládací prvky ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    min-height: 38px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: .85rem; border-radius: 8px; }
.btn.link { border: 0; background: none; color: var(--primary); padding: 0; min-height: 0; }
.btn.icon { padding: 0; width: 38px; }
.btn.small.icon { width: 30px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar input[type=search], .toolbar select, .toolbar input[type=date] { max-width: 260px; }

.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface-3); border-radius: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.tabs button {
    border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted);
    padding: 6px 14px; border-radius: 9px; cursor: pointer; min-height: 34px;
}
.tabs button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(23, 32, 51, .12); }

input, select, textarea {
    width: 100%; min-height: 38px; padding: 7px 11px; border: 1px solid var(--border); border-radius: 10px;
    background: var(--surface); color: var(--text); font: inherit;
}
input[type=checkbox] { width: 18px; min-height: 18px; height: 18px; padding: 0; accent-color: var(--primary); }
input[type=color] { padding: 3px; width: 56px; }
textarea { min-height: 84px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible, button:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px;
}

.field { margin-bottom: 12px; }
.field label { display: block; font-size: .84rem; font-weight: 650; margin-bottom: 4px; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: 3px; }
.field .error { font-size: .8rem; color: var(--danger); margin-top: 3px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field.check { display: flex; align-items: center; gap: 8px; }
.field.check label { margin: 0; font-weight: 500; font-size: .95rem; }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; flex-wrap: wrap; }
.checks { display: grid; gap: 4px 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.inline { display: flex; gap: 8px; align-items: flex-end; }
.inline .field { flex: 1; margin-bottom: 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; white-space: nowrap; background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr.clickable { cursor: pointer; }
tbody tr.clickable:hover { background: var(--surface-2); }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn { margin-left: 6px; }
.empty { padding: 30px 18px; text-align: center; color: var(--muted); }
.more { padding: 12px; text-align: center; border-top: 1px solid var(--border); }

.badge {
    display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 650;
    background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.pri { background: var(--primary-soft); color: var(--primary-strong); }

.dl { display: grid; grid-template-columns: minmax(120px, 190px) 1fr; gap: 7px 14px; margin: 0; }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; overflow-wrap: anywhere; }

.notice { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; background: var(--warning-soft); color: var(--warning); }
.notice.error { background: var(--danger-soft); color: var(--danger); }
.notice.info { background: var(--info-soft); color: var(--info); }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); color: var(--text); }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--surface-2); text-decoration: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .title { font-weight: 600; }
.time-chip { font-variant-numeric: tabular-nums; font-weight: 650; color: var(--muted); width: 48px; flex: none; }
.dot { width: 10px; height: 38px; border-radius: 6px; flex: none; background: var(--primary); }

pre.diff { margin: 0; font: 12px/1.45 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Rozvrh ---------- */

.tt { display: grid; gap: 6px; min-width: 640px; }
.tt-head { font-size: .78rem; color: var(--muted); text-align: center; font-weight: 650; padding: 2px 0 6px; }
.tt-head small { display: block; font-weight: 500; }
.tt-day { display: flex; flex-direction: column; justify-content: center; font-weight: 700; padding: 0 8px; }
.tt-day small { font-weight: 500; color: var(--muted); }
.tt-day.today { color: var(--primary-strong); }
.tt-cell {
    min-height: 62px; border-radius: 10px; background: var(--surface-2); border: 1px dashed transparent;
    padding: 6px 8px; font-size: .8rem; position: relative; overflow: hidden; text-align: left;
    color: var(--text); font-family: inherit; width: 100%;
}
button.tt-cell { cursor: pointer; }
button.tt-cell.free:hover { border-color: var(--primary); }
.tt-cell.lesson { border: 0; border-left: 4px solid var(--subject, var(--primary)); background: color-mix(in srgb, var(--subject, var(--primary)) 14%, var(--surface)); }
.tt-cell b { display: block; font-size: .95rem; line-height: 1.15; }
.tt-cell span { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-cell.cancelled { opacity: .55; }
.tt-cell.cancelled b { text-decoration: line-through; }
.tt-cell.changed { outline: 2px solid var(--warning); outline-offset: -2px; }
.tt-cell .flag { position: absolute; top: 4px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* ---------- Docházka ---------- */

.roster { display: flex; flex-direction: column; }
.roster-row { display: flex; align-items: center; gap: 12px; padding: 9px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.roster-row:last-child { border-bottom: 0; }
.roster-row .name { flex: 1; min-width: 150px; font-weight: 550; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); color: var(--muted); font: inherit; font-weight: 600; padding: 6px 12px; cursor: pointer; min-height: 36px; }
.seg button + button { border-left: 1px solid var(--border); }
.seg button.on.ok { background: var(--success-soft); color: var(--success); }
.seg button.on.bad { background: var(--danger-soft); color: var(--danger); }
.seg button.on.warn { background: var(--warning-soft); color: var(--warning); }
.roster-row input[type=time], .roster-row input[type=number] { width: 110px; }

/* ---------- Jídelna ---------- */

.menu-day { margin-bottom: 14px; }
.menu-day h3 { display: flex; align-items: center; gap: 8px; }
.meal { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; background: var(--surface); }
.meal.ordered { border-color: var(--success); background: var(--success-soft); }
.meal .no { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); display: grid; place-items: center; font-weight: 700; flex: none; }
.meal .grow { flex: 1; min-width: 0; }
.meal .al { font-size: .78rem; color: var(--muted); }

.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.temp-password { display: inline-block; font: 600 1.4rem/1.2 ui-monospace, Consolas, monospace; letter-spacing: .08em; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); user-select: all; }

/* ---------- Schránka a diskuze ---------- */

.msg-item.unread .title { font-weight: 750; }
.msg-item.unread { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }
.msg-snippet { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.msg-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.nav .count { margin-left: auto; }

.thread { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; }
.bubble { max-width: min(640px, 92%); padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); align-self: flex-start; }
.bubble.mine { align-self: flex-end; background: var(--primary-soft); border-color: transparent; }
.bubble.deleted { opacity: .6; font-style: italic; }
.bubble-head { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.bubble-body { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0; }
.reply { position: sticky; bottom: 70px; }
details.card summary { cursor: pointer; font-weight: 600; }

/* ---------- Postup učiva ---------- */

.progress { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin: 8px 0 14px; }
.progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #6366f1, #22c55e); }

/* ---------- Známky ---------- */

.chips-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.grade-chip {
    min-width: 32px; height: 32px; padding: 0 8px; border-radius: 9px; display: inline-grid; place-items: center;
    font: inherit; font-weight: 700; color: #fff; border: 0; background: var(--grade, var(--primary)); cursor: default;
}
button.grade-chip { cursor: pointer; }
button.grade-chip:hover { filter: brightness(1.12); }
.grade-chip.heavy { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--grade, var(--primary)); margin: 0 3px; }

/* ---------- Organigram ---------- */

.org-wrap { overflow-x: auto; }
.org, .org ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; }
.org { width: max-content; min-width: 100%; }
.org ul { padding-top: 22px; position: relative; }
.org li { position: relative; padding: 22px 8px 0; display: flex; flex-direction: column; align-items: center; }
.org > li { padding-top: 0; }
/* vodorovná a svislá spojnice k nadřízenému */
.org ul li::before, .org ul li::after { content: ""; position: absolute; top: 0; width: 50%; height: 22px; border-top: 2px solid var(--border); }
.org ul li::before { right: 50%; }
.org ul li::after { left: 50%; border-left: 2px solid var(--border); }
.org ul li:first-child::before, .org ul li:last-child::after { border-top-color: transparent; }
.org ul li:last-child::before { border-right: 2px solid var(--border); border-top-right-radius: 8px; }
.org ul li:last-child::after { border-left: 0; }
.org ul li:first-child::after { border-top-left-radius: 8px; }
.org ul li:only-child::before { border-radius: 0; }
.org ul::before { content: ""; position: absolute; top: 0; left: 50%; height: 22px; border-left: 2px solid var(--border); margin-left: -1px; }

.org-cell { position: relative; }
.org-node {
    display: flex; align-items: center; gap: 10px; min-width: 150px; max-width: 230px; text-align: left;
    padding: 10px 12px 10px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
    box-shadow: var(--shadow); color: var(--text); font: inherit; position: relative; overflow: hidden;
}
button.org-node { cursor: pointer; }
button.org-node:hover { border-color: var(--primary); }
.org-node.unit { background: var(--surface-2); box-shadow: none; }
.org-bar { position: absolute; inset: 0 auto 0 0; width: 5px; }
.org-text { min-width: 0; }
.org-text strong { display: block; line-height: 1.25; }
.org-text small { display: block; color: var(--muted); }
.org-add {
    position: absolute; right: -9px; bottom: -9px; width: 22px; height: 22px; border-radius: 50%; padding: 0;
    display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; z-index: 1;
}
.org-add:hover { background: var(--primary); color: var(--primary-text); border-color: var(--primary); }

/* ---------- Dialog, hlášky ---------- */

dialog {
    border: 1px solid var(--border); border-radius: 16px; padding: 0; width: min(660px, calc(100vw - 24px));
    background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}
dialog::backdrop { background: rgba(10, 14, 25, .55); backdrop-filter: blur(2px); }
.dialog-head { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.dialog-head h2 { margin: 0; flex: 1; }
.dialog-body { padding: 20px; max-height: calc(100vh - 170px); overflow-y: auto; }

.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { padding: 11px 15px; border-radius: 11px; background: #172033; color: #fff; box-shadow: var(--shadow); max-width: 380px; font-weight: 550; }
.toast.error { background: #b3261e; }

/* ---------- Přihlášení ---------- */

.auth { min-height: 100%; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 10% -10%, rgba(99, 102, 241, .18), transparent), radial-gradient(900px 500px at 100% 110%, rgba(236, 72, 153, .14), transparent); }
.auth .card { width: min(410px, 100%); padding: 30px; margin: 0; }
.auth h1 { margin-bottom: 4px; }
.auth .btn { width: 100%; min-height: 46px; }
.auth .brand-mark { margin-bottom: 14px; }

/* ---------- Mobil ---------- */

.menu-btn { display: none; }
.bottom-nav { display: none; }

@media (max-width: 899px) {
    .sidebar {
        position: fixed; inset: 0 auto 0 0; z-index: 30; transform: translateX(-100%);
        transition: transform .18s ease; box-shadow: var(--shadow); width: min(290px, 86vw);
    }
    .layout.menu-open .sidebar { transform: none; }
    .layout.menu-open::after { content: ""; position: fixed; inset: 0; background: rgba(10, 14, 25, .5); z-index: 20; }
    .menu-btn { display: inline-flex; }
    .topbar { padding: 10px 14px; }
    .content { padding: 6px 14px 96px; }
    .hide-sm { display: none !important; }
    th, td { padding: 10px; }
    .btn { min-height: 44px; }
    .btn.small { min-height: 36px; }
    .dl { grid-template-columns: 1fr; gap: 0; }
    .dl dt { margin-top: 8px; }
    .cols { grid-template-columns: 1fr; }
    .hero { padding: 18px; }
    .hero .chips { margin-left: 0; }
    .tiles { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
    .tile { padding: 12px; font-size: .9rem; }
    .toasts { left: 12px; right: 12px; bottom: 84px; }
    .roster-row, .list-item { padding-left: 14px; padding-right: 14px; }

    .bottom-nav {
        position: fixed; inset: auto 0 0 0; z-index: 10; display: flex;
        background: var(--surface); border-top: 1px solid var(--border);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .bottom-nav a, .bottom-nav button {
        flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
        padding: 7px 2px 8px; font: inherit; font-size: .7rem; color: var(--muted); border: 0; background: none; min-width: 0;
    }
    .bottom-nav .ic { background: none; width: 26px; height: 26px; }
    .bottom-nav a.active { color: var(--primary-strong); font-weight: 650; }
    .bottom-nav a.active .ic { color: var(--primary-strong); }
    .bottom-nav a:hover { text-decoration: none; }
}

/* ---------- Zvoneček ---------- */

.bell { position: relative; }
.bell-count {
    position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
    background: var(--danger); color: #fff; font-size: .7rem; font-weight: 700; display: grid; place-items: center;
}
.list-item.unread { background: color-mix(in srgb, var(--primary-soft) 55%, transparent); }

/* ---------- Vysvědčení (vždy světlé, kvůli tisku) ---------- */

.report {
    background: #fff; color: #111; border: 1px solid #ccd; border-radius: 6px; padding: 28px 34px; margin: 0 auto 24px;
    max-width: 780px; font: 14px/1.45 Georgia, "Times New Roman", serif; position: relative;
}
.report h1 { font-size: 1.9rem; text-align: center; margin: 14px 0 2px; color: #111; letter-spacing: .02em; }
.report header { text-align: center; }
.report-school { font-size: 1.1rem; font-weight: 700; }
.report-sub { color: #555; font-size: .85rem; text-align: center; }
.report-meta { display: grid; grid-template-columns: 110px 1fr; gap: 3px 12px; margin: 18px 0; }
.report-meta dt { color: #555; }
.report-meta dd { margin: 0; font-weight: 700; }
.report-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.report-table th, .report-table td { border: 1px solid #999; padding: 6px 10px; background: #fff; color: #111; letter-spacing: 0; font-size: 14px; }
.report-table th { background: #eee; text-align: left; font-size: 12px; text-transform: uppercase; }
.report-grade { text-align: center; font-weight: 700; width: 110px; }
.report-verbal { font-size: 12.5px; }
.report-empty { text-align: center; color: #777; }
.report-sum { margin: 6px 0; }
.report footer { display: flex; gap: 24px; margin: 46px 0 14px; }
.report footer > div { flex: 1; text-align: center; font-size: 12px; }
.report-line { border-top: 1px solid #111; margin-bottom: 4px; }
.report-draft { position: absolute; top: 10px; right: 14px; color: #b3261e; border: 2px solid #b3261e; padding: 2px 10px; font: 700 12px system-ui, sans-serif; border-radius: 4px; transform: rotate(3deg); }

@media print {
    body { background: #fff; }
    .sidebar, .topbar, .bottom-nav, .no-print, .tabs, .page-head, .back, .toasts { display: none !important; }
    .layout, .main { display: block; }
    .content { padding: 0; max-width: none; }
    .report { border: 0; border-radius: 0; margin: 0; padding: 0; max-width: none; page-break-after: always; break-after: page; }
    .report:last-child { page-break-after: auto; break-after: auto; }
}

/* ---------- QR platba ---------- */

.pay-grid { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.pay-grid .dl { flex: 1; min-width: 260px; }
.qr-box { text-align: center; }
.qr-box svg { border-radius: 10px; border: 1px solid var(--border); }

.stat-big { font-size: 34px; font-weight: 700; line-height: 1.1; }

/* Rozbalovací oddíly nabídky */
button.nav-section { display: flex; align-items: center; justify-content: space-between; width: 100%; background: none; border: 0; cursor: pointer; font-family: inherit; text-align: left; }
button.nav-section:hover { color: var(--text); }
button.nav-section svg { transition: transform .15s; }
button.nav-section[aria-expanded="true"] svg { transform: rotate(90deg); }
.nav-group { display: flex; flex-direction: column; }
.nav-group[hidden] { display: none; }

/* Přihlášený uživatel vlevo v horní liště */
.topbar-user { display: flex; align-items: center; gap: 10px; color: var(--text); min-width: 0; border-radius: 12px; padding: 2px 8px 2px 2px; }
.topbar-user:hover { background: var(--surface-2); text-decoration: none; }
.topbar-user .who { min-width: 0; line-height: 1.25; }
.topbar-user .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user .who-name { font-weight: 600; }
@media (max-width: 640px) { .topbar-user .who { display: none; } .topbar { gap: 8px; } }

/* Nabídka uživatele */
.user-menu-wrap { position: relative; }
button.topbar-user { background: none; border: 0; cursor: pointer; font: inherit; text-align: left; }
button.topbar-user svg { color: var(--muted); transform: rotate(90deg); }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; z-index: 40; display: flex; flex-direction: column; }
.user-menu[hidden] { display: none; }
.user-menu a, .user-menu button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.user-menu a:hover, .user-menu button:hover { background: var(--surface-2); text-decoration: none; }

/* Kalendář školy */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.cal-head { background: var(--surface-2); padding: 6px 8px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.cal-cell { background: var(--surface); min-height: 92px; padding: 4px 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell.other { opacity: .45; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-cell.off { background: color-mix(in srgb, var(--surface) 88%, #f59e0b); }
.cal-day { font-size: .8rem; font-weight: 600; color: var(--muted); }
.cal-item { display: block; font-size: .72rem; line-height: 1.25; padding: 2px 5px; border-radius: 6px; background: var(--surface-2); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-item.ok { background: color-mix(in srgb, var(--surface) 80%, #22c55e); }
.cal-item.warn { background: color-mix(in srgb, var(--surface) 78%, #f59e0b); }
.cal-item.bad { background: color-mix(in srgb, var(--surface) 80%, #ef4444); }
.cal-item.info { background: color-mix(in srgb, var(--surface) 80%, #38bdf8); }
@media (max-width: 640px) { .cal-cell { min-height: 64px; padding: 3px; } .cal-item { font-size: .62rem; padding: 1px 3px; } }

/* Tabulky: hranaté rohy, posouvání a pevná hlavička */
.card.flush, .table-wrap, .table-wrap table { border-radius: 0; }
.table-wrap { overflow: auto; max-height: 72vh; -webkit-overflow-scrolling: touch; }
.table-wrap thead th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); }
.cal-grid, .roster { border-radius: 0; }

/* Úprava rozložení stránky (přetahování sekcí) */
.layout-unit { position: relative; outline: 2px dashed color-mix(in srgb, var(--primary) 60%, transparent); outline-offset: 3px; cursor: grab; }
.layout-unit.dragging { opacity: .45; }
.layout-handle { position: absolute; top: 6px; right: 8px; z-index: 6; display: inline-flex; gap: 2px; padding: 2px; border-radius: 6px; background: var(--primary); }
.layout-handle button { background: none; border: 0; color: var(--primary-text); cursor: pointer; font-size: .7rem; padding: 2px 6px; }
.layout-unit .layout-handle ~ * { pointer-events: auto; }
.tiles .layout-unit { cursor: grab; }

.cal-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tt-parity{position:absolute;top:2px;right:4px;font-size:.7rem;font-weight:700;font-style:normal;opacity:.7}
.tt-cell.lesson{position:relative}
.review-q{margin:.75rem 0}.review-q ul{margin:.25rem 0 0 1.25rem}.review-q li.ok{color:var(--ok,#1b7a3a);font-weight:600}
.result-row{display:grid;grid-template-columns:minmax(8rem,1fr) 2fr auto;gap:.5rem;align-items:center;margin:.25rem 0}
.bar-track{background:rgba(127,127,127,.2);height:.7rem}.bar-fill{background:var(--accent,#2456c4);height:100%}
.choice-list{display:grid;gap:.35rem}

.report-criteria{margin:.25rem 0 0 1rem;padding:0;font-size:.85em}

.test-banner{background:#b45309;color:#fff;text-align:center;font-weight:700;font-size:.85rem;padding:.3rem .75rem;letter-spacing:.03em}
.platform-note{margin:0 0 .75rem}

.supervisor-banner{background:#1d4ed8}

/* Hranaté rohy: tabulky, karty s tabulkami a všechna vyskakovací okna (včetně polí a tlačítek v nich). */
table, .table, .table-wrap, .table-wrap table, .card, .card.flush, .list, .cal-grid, .roster, .tt-grid,
dialog, dialog .dialog-head, dialog .dialog-body, dialog .btn, dialog input, dialog select, dialog textarea,
dialog .notice, dialog .form-actions button, dialog .tabs, dialog .tab, dialog .list-item, dialog .stat-box { border-radius: 0 !important; }

/* Bílé pozadí stránek a šedě orámované tabulky. */
@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .main, :root:not([data-theme="dark"]) .content { background: #ffffff; }
}
:root[data-theme="light"] .main, :root[data-theme="light"] .content { background: #ffffff; }
table, .table-wrap { border: 1px solid #c9ced6; }
th, td { border: 1px solid #d5d9e0; }
th { background: #f1f3f6; }
.card { border-color: #d5d9e0; }
/* Nápověda */
.help-toc { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; }
.help-toc a { padding: 3px 0; }
.help-body h3 { margin: 18px 0 6px; font-size: 1rem; }
.help-body li { margin: 4px 0; line-height: 1.5; }
@media print { .help-toc, .toolbar, .sidebar, .topbar, .bottom-nav { display: none !important; } }

/* Faktury */
.invoice-head { display: flex; align-items: center; gap: 12px; }
.invoice-head h2 { margin: 0; flex: 1; }
.invoice h4 { margin: 12px 0 4px; }
.invoice-meta { display: grid; grid-template-columns: max-content 1fr max-content 1fr; gap: 2px 14px; margin: 12px 0; }
.invoice-meta dt { color: var(--muted); }
.invoice-meta dd { margin: 0; }
.invoice-total { text-align: right; margin: 12px 0; }
.invoice-total strong { font-size: 1.15rem; }
@media print {
    body * { visibility: hidden; }
    dialog.invoice-dialog, dialog.invoice-dialog * { visibility: visible; }
    dialog.invoice-dialog { position: absolute; inset: 0; width: 100%; max-width: none; border: 0; box-shadow: none; }
    dialog.invoice-dialog .dialog-head button, .invoice-actions { display: none !important; }
    dialog.invoice-dialog::backdrop { display: none; }
}
/* Nápověda: otazník v kruhu v horní liště */
.help-btn { width: 32px; height: 32px; border-radius: 50% !important; border: 2px solid var(--primary); color: var(--primary); display: inline-grid; place-items: center; font-weight: 800; font-size: 1rem; line-height: 1; text-decoration: none; flex: none; }
.help-btn:hover { background: var(--primary); color: var(--primary-text); }

/* Otazník v kruhu u položky Nápověda v menu uživatele */
.help-ic { width: 17px; height: 17px; border: 2px solid currentColor; border-radius: 50% !important; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 800; line-height: 1; flex: none; box-sizing: border-box; }

/* Dlaždice na přehledu a předmětů: barevná karta vyplněná velkou ikonou, text nad ní. */
.tile.nav-tile, .tile.subject-tile { position: relative; overflow: hidden; min-height: 104px; justify-content: flex-end; color: #fff !important; border: 0; box-shadow: var(--shadow); }
.tile.nav-tile:hover, .tile.subject-tile:hover { color: #fff; }
.tile.nav-tile .ic, .tile.subject-tile .ic { position: absolute; right: -18px; top: 50%; transform: translateY(-50%) rotate(-8deg); width: 120px; height: 120px; border-radius: 0; background: none !important; color: #fff; opacity: .28; display: block; }
.tile.nav-tile .ic svg { width: 120px; height: 120px; stroke-width: 1.6; }
.tile.nav-tile::after, .tile.subject-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .34) 0%, rgba(0, 0, 0, .12) 55%, rgba(0, 0, 0, 0) 100%); pointer-events: none; }
.tile.nav-tile .tile-title, .tile.nav-tile .tile-note, .tile.subject-tile .tile-title, .tile.subject-tile .tile-note { position: relative; z-index: 1; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.tile.nav-tile .tile-title, .tile.subject-tile .tile-title { font-size: 1.02rem; font-weight: 700; max-width: 70%; }
.tile.nav-tile small.tile-note, .tile.subject-tile small.tile-note { color: rgba(255, 255, 255, .92); font-weight: 600; }
/* Text dlaždic na střed (vodorovně i svisle), ikona jako vodoznak uprostřed. */
.tile.nav-tile, .tile.subject-tile { justify-content: center; align-items: center; text-align: center; }
.tile.nav-tile .ic, .tile.subject-tile .ic { right: auto; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(-8deg); opacity: .26; }
.tile.nav-tile::after, .tile.subject-tile::after { background: rgba(0, 0, 0, .18); }
.tile.nav-tile .tile-title, .tile.subject-tile .tile-title { max-width: 100%; font-size: 1.05rem; }

/* Dohled platformy: výrazný červený pruh. */
.supervisor-banner { background: #c81e1e !important; color: #fff; font-size: .92rem; padding: .45rem .9rem; box-shadow: 0 2px 6px rgba(200, 30, 30, .35); }

/* Rozvrh: hodiny bez zaoblených rohů. */
.tt-cell, .tt-cell.lesson, .tt-cell.free, button.tt-cell, .tt-grid, .tt-cell .flag { border-radius: 0 !important; }
.tt-cell .flag { border-radius: 50% !important; }

/* Předměty: hranaté karty, zkratka jako velký vodoznak. */
.tile.subject-tile { border-radius: 0; color: #fff; }
.tile.subject-tile .ic { width: auto; height: auto; font-size: 3.4rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; opacity: .24; transform: translate(-50%, -50%); white-space: nowrap; }

/* Zápis: kalendář termínů pro rodiče. */
.cal-mini-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; }
.cal-mini { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; max-width: 320px; }
.cal-mini b { text-align: center; font-size: .75rem; color: var(--muted); padding: 2px 0; }
.cal-day { text-align: center; padding: 8px 0; border: 1px solid var(--border); border-radius: 0; background: var(--surface); font: inherit; }
.cal-day.off { color: var(--muted); opacity: .45; background: transparent; border-color: transparent; }
.cal-day.free { background: var(--success-soft); color: var(--success); font-weight: 700; cursor: pointer; }
.cal-day.on { background: var(--primary); color: var(--primary-text); }
.cal-times { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.cal-times p { flex-basis: 100%; margin: 0; }
/* ==== Úvodní stránka (landing) ==== */
.landing { --lp-ink: var(--text); min-height: 100%; background: var(--bg); color: var(--text); }
.lp-wrap { width: min(1160px, 100%); margin: 0 auto; padding-inline: 20px; }
.lp-head { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.lp-head-in { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.01em; flex: 1; }
.lp-logo { width: 36px; height: 36px; display: grid; place-items: center; background: var(--primary); color: var(--primary-text); }
.lp-nav { display: flex; gap: 22px; }
.lp-nav a { color: var(--text); font-weight: 600; text-decoration: none; }
.lp-nav a:hover { color: var(--primary); }
.lp-login-btn { min-height: 40px; }

.lp-hero { background: radial-gradient(900px 420px at 85% -10%, rgba(99, 102, 241, .22), transparent), radial-gradient(700px 400px at 0% 110%, rgba(20, 184, 166, .16), transparent), var(--bg); padding-block: 56px 40px; background-image: linear-gradient(180deg, transparent 65%, var(--bg) 100%), radial-gradient(900px 420px at 85% -10%, rgba(99, 102, 241, .22), transparent), radial-gradient(700px 400px at 0% 110%, rgba(20, 184, 166, .16), transparent); }
.lp-hero-in { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 420px); gap: 48px; align-items: center; }
.lp-eyebrow { display: inline-block; font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--primary); background: var(--primary-soft); padding: 6px 12px; }
.lp-hero-text h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.05; letter-spacing: -.03em; margin: 18px 0 14px; text-wrap: balance; }
.lp-lead { font-size: 1.15rem; line-height: 1.55; color: var(--muted); max-width: 54ch; margin: 0 0 20px; }
.lp-points { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.lp-points li, .lp-aud li, .lp-sec-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.lp-check { flex: none; width: 22px; height: 22px; display: inline-grid; place-items: center; background: var(--success-soft); color: var(--success); margin-top: 1px; }
.lp-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.lp-cta .btn { min-height: 48px; padding-inline: 22px; font-weight: 700; width: auto; }
.lp-hero-login .card { width: 100%; padding: 30px; margin: 0; box-shadow: 0 20px 50px rgba(30, 41, 90, .18); border: 1px solid var(--border); }
.lp-hero-login { scroll-margin-top: 90px; }

.lp-mock { padding-block: 8px 56px; }
.lp-mock-frame { background: var(--surface); border: 1px solid var(--border); box-shadow: 0 24px 60px rgba(30, 41, 90, .16); }
.lp-mock-bar { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.lp-mock-bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--border); }
.lp-mock-bar em { margin-left: 10px; font-style: normal; font-weight: 700; color: var(--muted); }
.lp-mock-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 18px; }
.lp-tile { position: relative; overflow: hidden; min-height: 96px; display: grid; place-items: center; color: #fff; text-align: center; padding: 10px; }
.lp-tile::after { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .16); }
.lp-tile b { position: relative; z-index: 1; text-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.lp-tile-ic { position: absolute; inset: 0; display: grid; place-items: center; opacity: .27; transform: rotate(-8deg); }
.lp-tile-ic svg { width: 76px; height: 76px; }

.lp-section { padding-block: 72px; }
.lp-section.lp-alt { background: var(--surface); border-block: 1px solid var(--border); }
.lp-section h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.02em; text-align: center; margin: 0 0 10px; text-wrap: balance; }
.lp-sub { text-align: center; color: var(--muted); max-width: 68ch; margin: 0 auto 36px; line-height: 1.6; }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.lp-feature { background: var(--surface); border: 1px solid var(--border); padding: 22px; }
.lp-feature h3 { margin: 14px 0 6px; font-size: 1.05rem; }
.lp-feature p { margin: 0; color: var(--muted); line-height: 1.55; font-size: .94rem; }
.lp-ficon, .lp-aud-ic { display: inline-grid; place-items: center; width: 44px; height: 44px; color: #fff; }
.lp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.lp-aud { border: 1px solid var(--border); padding: 26px; background: var(--bg); }
.lp-aud-ic { width: 52px; height: 52px; }
.lp-aud h3 { margin: 16px 0 12px; font-size: 1.2rem; }
.lp-aud ul, .lp-sec-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.lp-sec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.lp-sec h2 { text-align: left; }
.lp-sec .lp-sub { text-align: left; margin-bottom: 0; }
.lp-cta-band { background: linear-gradient(135deg, #4338ca, #6366f1); color: #fff; padding-block: 44px; }
.lp-cta-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.lp-cta-band h2 { margin: 0 0 6px; text-align: left; font-size: 1.7rem; }
.lp-cta-band p { margin: 0; opacity: .9; }
.lp-cta-band .btn { background: #fff; color: #3730a3; border: 0; min-height: 48px; padding-inline: 24px; font-weight: 800; width: auto; }
.lp-foot { padding-block: 22px; color: var(--muted); font-size: .88rem; }
.lp-foot-in { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
    .lp-hero-in, .lp-sec { grid-template-columns: 1fr; }
    .lp-nav { display: none; }
    .lp-hero { padding-block: 34px 24px; }
}.lp-hero-login h1 { font-size: 1.5rem; margin: 0 0 4px; }
.lp-hero-login .btn { width: 100%; min-height: 46px; }
.lp-hero-login .brand-mark { margin-bottom: 14px; }

.lp-poss { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px 36px; }
.lp-poss-item { display: flex; gap: 12px; align-items: flex-start; }
.lp-poss-item b { display: block; margin-bottom: 4px; }
.lp-poss-item p { margin: 0; color: var(--muted); line-height: 1.5; font-size: .94rem; }

/* Přepínač světlého a tmavého režimu. */
.theme-btn { flex: none; }
.theme-btn svg { display: block; }

/* Souhlas s cookies */
.cookie-banner { position: fixed; inset: auto 16px 16px 16px; z-index: 1000; max-width: 880px; margin-inline: auto; display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px 18px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); }
.cookie-text { flex: 1 1 360px; font-size: .92rem; }
.cookie-text p { margin: 4px 0 0; color: var(--muted); }
.cookie-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.lp-cookie-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.lp-sec-list .lp-stores { align-items: center; flex-wrap: wrap; gap: 10px; }
.lp-store { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.lp-store-logo { display: inline-flex; }

/* Avatar a jméno v řádku tabulky: na střed, ne k dolní hraně. */
.name-cell { display: flex; gap: 10px; align-items: center; }

/* ---------------------------------------------------------------------
   Úvodní stránka: větší rozměry a moderní pozadí (aurora + jemná mřížka).
   Dlaždice ukázky přehledu (.lp-tile) zůstávají beze změny.
   --------------------------------------------------------------------- */
.landing { position: relative; isolation: isolate; overflow-x: clip; }
.landing::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(60vw 50vh at 88% -8%, rgba(99, 102, 241, .30), transparent 70%),
        radial-gradient(55vw 55vh at -6% 8%, rgba(6, 182, 212, .22), transparent 70%),
        radial-gradient(50vw 50vh at 70% 105%, rgba(244, 63, 94, .16), transparent 70%),
        radial-gradient(45vw 45vh at 8% 100%, rgba(20, 184, 166, .18), transparent 70%);
}
.landing::after {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
    background-image: radial-gradient(color-mix(in srgb, var(--text) 16%, transparent) 1px, transparent 1.3px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}
@media (prefers-color-scheme: dark) {
    .landing::before {
        background:
            radial-gradient(60vw 50vh at 88% -8%, rgba(99, 102, 241, .38), transparent 70%),
            radial-gradient(55vw 55vh at -6% 8%, rgba(6, 182, 212, .20), transparent 70%),
            radial-gradient(50vw 50vh at 70% 105%, rgba(244, 63, 94, .16), transparent 70%),
            radial-gradient(45vw 45vh at 8% 100%, rgba(20, 184, 166, .16), transparent 70%);
    }
}

.lp-wrap { width: min(1320px, 100%); padding-inline: 28px; }
.lp-head { background: color-mix(in srgb, var(--surface) 62%, transparent); backdrop-filter: blur(18px) saturate(1.4); }
.lp-head-in { min-height: 76px; }
.lp-brand { font-size: 1.1rem; }
.lp-logo { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 6px 18px color-mix(in srgb, var(--primary) 45%, transparent); }
.lp-nav { gap: 30px; font-size: 1.02rem; }
.lp-login-btn { min-height: 46px; padding-inline: 24px; border-radius: 12px; }

.lp-hero { background: none; padding-block: 104px 72px; }
.lp-hero-in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 470px); gap: 72px; }
.lp-eyebrow { font-size: .85rem; padding: 8px 16px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--primary) 25%, transparent); background: color-mix(in srgb, var(--primary-soft) 80%, transparent); }
.lp-hero-text h1 {
    font-size: clamp(2.6rem, 6vw, 4.8rem); line-height: 1.02; letter-spacing: -.04em; margin: 24px 0 22px;
    background: linear-gradient(120deg, var(--text) 30%, var(--primary) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lp-lead { font-size: 1.3rem; max-width: 56ch; margin-bottom: 28px; }
.lp-points { gap: 14px; margin-bottom: 36px; font-size: 1.08rem; }
.lp-check { width: 26px; height: 26px; border-radius: 50%; }
.lp-cta .btn { min-height: 56px; padding-inline: 30px; font-size: 1.05rem; border-radius: 14px; }
.lp-cta .btn.primary { box-shadow: 0 10px 28px color-mix(in srgb, var(--primary) 40%, transparent); }
.lp-hero-login .card {
    padding: 38px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--border) 70%, #fff 30%);
    background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(20px) saturate(1.3);
    box-shadow: 0 30px 80px rgba(30, 41, 90, .22);
}

.lp-mock { padding-block: 16px 96px; }
.lp-mock-frame { border-radius: 22px; overflow: hidden; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(14px); box-shadow: 0 40px 100px rgba(30, 41, 90, .22); }
.lp-mock-tiles { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; padding: 26px; }
.lp-tile { min-height: 128px; }
.lp-tile b { font-size: 1.05rem; }

.lp-section { padding-block: 112px; }
.lp-section.lp-alt { background: color-mix(in srgb, var(--surface) 55%, transparent); backdrop-filter: blur(10px); border-block: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.lp-section h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -.03em; margin-bottom: 14px; }
.lp-sub { font-size: 1.15rem; max-width: 72ch; margin-bottom: 52px; }
.lp-grid { grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 24px; }
.lp-feature, .lp-aud {
    border-radius: 20px; padding: 32px; background: color-mix(in srgb, var(--surface) 80%, transparent); backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent); box-shadow: 0 8px 28px rgba(30, 41, 90, .07);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.lp-feature:hover, .lp-aud:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(30, 41, 90, .16); border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); }
.lp-feature h3 { font-size: 1.2rem; margin: 18px 0 8px; }
.lp-feature p { font-size: 1.02rem; }
.lp-ficon, .lp-aud-ic { width: 56px; height: 56px; border-radius: 16px; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.lp-aud-ic { width: 64px; height: 64px; border-radius: 18px; }
.lp-aud h3 { font-size: 1.35rem; }
.lp-cols { gap: 26px; }
.lp-poss { gap: 30px 48px; }
.lp-poss-item p { font-size: 1.02rem; }
.lp-sec { gap: 64px; }

.lp-cta-band { position: relative; overflow: hidden; padding-block: 88px; background: linear-gradient(135deg, #3730a3, #6366f1 55%, #8b5cf6); }
.lp-cta-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(40vw 40vh at 85% 0%, rgba(255, 255, 255, .22), transparent 70%), radial-gradient(35vw 35vh at 0% 100%, rgba(6, 182, 212, .35), transparent 70%); }
.lp-cta-in { position: relative; }
.lp-cta-band h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.lp-cta-band p { font-size: 1.15rem; }
.lp-cta-band .btn { min-height: 56px; padding-inline: 32px; font-size: 1.05rem; border-radius: 14px; }
.lp-foot { padding-block: 32px; font-size: .95rem; }

@media (max-width: 900px) {
    .lp-wrap { padding-inline: 20px; }
    .lp-hero { padding-block: 56px 40px; }
    .lp-hero-in { gap: 40px; }
    .lp-section { padding-block: 72px; }
    .lp-sub { margin-bottom: 36px; }
    .lp-hero-login .card { padding: 26px; }
    .lp-cta-band { padding-block: 56px; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-feature, .lp-aud { transition: none; }
    .lp-feature:hover, .lp-aud:hover { transform: none; }
}


/* Ukázka přehledu jako galerie: dvě řady dlaždic, posun do stran (šipky, tažení, dotyk, klávesnice). */
.lp-mock-bar .lp-gal-ctl { width: auto; height: auto; border-radius: 0; background: none; margin-left: auto; display: inline-flex; gap: 8px; }
.lp-gal-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; display: grid; place-items: center; padding: 0 0 3px; transition: background .15s, transform .15s; }
.lp-gal-btn:hover { background: var(--primary); color: var(--primary-text); border-color: transparent; transform: scale(1.06); }
.lp-mock-tiles {
    grid-template-columns: none;
    display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, minmax(128px, 1fr)); grid-auto-columns: minmax(200px, 220px); gap: 16px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 26px;
    padding: 26px; scrollbar-width: thin; cursor: grab;
}
.lp-mock-tiles.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.lp-mock-tiles .lp-tile { scroll-snap-align: start; }
.lp-mock-tiles:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
@media (max-width: 640px) {
    .lp-mock-tiles { grid-auto-columns: 150px; grid-template-rows: repeat(2, 104px); gap: 12px; padding: 16px; }
    .lp-gal-ctl { display: none !important; }
}

/* Pozadí úvodní stránky: obrázek bg.png silně zesvětlený bílým závojem (ve tmavém režimu naopak ztmavený). */
.landing::before {
    background:
        linear-gradient(color-mix(in srgb, var(--bg) 90%, transparent), color-mix(in srgb, var(--bg) 90%, transparent)),
        url('icons/bg.png') right center / cover no-repeat;
}
@media (prefers-color-scheme: dark) {
    .landing::before {
        background:
            linear-gradient(color-mix(in srgb, var(--bg) 86%, transparent), color-mix(in srgb, var(--bg) 86%, transparent)),
            url('icons/bg.png') right center / cover no-repeat;
    }
}
@media (max-width: 900px) {
    .landing::before { background-position: 70% center; }
}

/* Logo škola360.cz (úvodní stránka a přihlášení). V tmavém režimu leží na světlé podložce, aby byl nápis čitelný. */
.lp-brand { text-decoration: none; }
.lp-brand-img { display: block; height: 46px; width: auto; }
.auth-logo { display: block; height: 42px; width: auto; margin-bottom: 14px; }
@media (prefers-color-scheme: dark) {
    .lp-brand-img, .auth-logo { background: #fff; border-radius: 12px; padding: 4px 10px; box-sizing: content-box; }
}
@media (max-width: 640px) { .lp-brand-img { height: 38px; } }

/* Přehled: dlaždice se samy plynule posouvají (bez posuvníků), okraje se prolínají do pozadí. */
.lp-mock-tiles.lp-marquee {
    display: block; grid-template-columns: none; overflow: hidden; cursor: default; padding: 26px 0; scroll-snap-type: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.lp-marquee-row { overflow: hidden; }
.lp-marquee-row + .lp-marquee-row { margin-top: 16px; }
.lp-track { display: flex; gap: 16px; width: max-content; padding-right: 16px; animation: lp-scroll 90s linear infinite; will-change: transform; }
.lp-track-right { animation-direction: reverse; animation-duration: 105s; }
.lp-marquee:hover .lp-track { animation-play-state: paused; }
.lp-marquee .lp-tile { flex: 0 0 210px; height: 128px; min-height: 0; }
@keyframes lp-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 640px) {
    .lp-track, .lp-marquee-row + .lp-marquee-row { gap: 12px; }
    .lp-marquee-row + .lp-marquee-row { margin-top: 12px; }
    .lp-marquee .lp-tile { flex-basis: 150px; height: 104px; }
    .lp-mock-tiles.lp-marquee { padding: 16px 0; }
}
@media (prefers-reduced-motion: reduce) {
    .lp-track { animation: none; }
    .lp-marquee-row { overflow-x: auto; scrollbar-width: none; }
    .lp-marquee-row::-webkit-scrollbar { display: none; }
}

/* Značka: jen ikona (+ název systému v záhlaví úvodní stránky, v přihlášení samotná ikona). */
.lp-brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.lp-brand-icon { display: block; width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 6px 18px color-mix(in srgb, #1e3a8a 40%, transparent); }
.lp-brand-text { font-weight: 800; font-size: 1.15rem; letter-spacing: -.01em; }
.auth-icon { display: block; width: 52px; height: 52px; margin-bottom: 16px; border-radius: 14px; box-shadow: 0 8px 22px color-mix(in srgb, #1e3a8a 40%, transparent); }
@media (max-width: 640px) { .lp-brand-text { font-size: 1rem; } .lp-brand-icon { width: 38px; height: 38px; } }

/* Text značky v záhlaví ve stejném stylu jako nadpis „Celá škola v jednom systému“. */
.lp-brand-text {
    font-size: 1.45rem; font-weight: 800; line-height: 1.1; letter-spacing: -.035em;
    background: linear-gradient(120deg, var(--text) 30%, var(--primary) 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (max-width: 640px) { .lp-brand-text { font-size: 1.1rem; } }

/* Ceník na úvodní stránce */
.lp-price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; align-items: stretch; }
.lp-price {
    display: flex; flex-direction: column; gap: 14px; padding: 30px 26px; border-radius: 20px; text-align: left;
    background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px);
    border: 1px solid color-mix(in srgb, var(--border) 80%, transparent); box-shadow: 0 8px 28px rgba(30, 41, 90, .07);
    transition: transform .2s ease, box-shadow .2s ease;
}
.lp-price:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(30, 41, 90, .16); }
.lp-price h3 { margin: 0; font-size: 1.02rem; color: var(--muted); font-weight: 700; }
.lp-price-amount { display: flex; flex-direction: column; gap: 2px; }
.lp-price-amount b { font-size: 2.3rem; line-height: 1.05; letter-spacing: -.03em; }
.lp-price-amount span { color: var(--muted); font-size: .92rem; }
.lp-price ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 10px; font-size: .95rem; }
.lp-price li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.4; }
.lp-price-main { border-color: color-mix(in srgb, var(--primary) 55%, var(--border)); box-shadow: 0 18px 50px color-mix(in srgb, var(--primary) 22%, transparent); }
.lp-price-main h3 { color: var(--primary); }
.lp-quote {
    display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; margin-top: 26px; padding: 30px 34px; border-radius: 20px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, var(--surface)), color-mix(in srgb, var(--surface) 80%, transparent));
    border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border));
}
.lp-quote h3 { margin: 0 0 6px; font-size: 1.25rem; }
.lp-quote p { margin: 0; color: var(--muted); max-width: 70ch; line-height: 1.55; }
.lp-quote .btn { min-height: 52px; padding-inline: 28px; border-radius: 14px; font-weight: 700; width: auto; }
@media (prefers-reduced-motion: reduce) { .lp-price { transition: none; } .lp-price:hover { transform: none; } }

/* Bezpečnost: stejné světlé karty jako Funkce; technická poznámka a ikony aplikace jako tichý doplněk. */
.lp-tech { text-align: center; color: var(--muted); font-size: .9rem; max-width: 70ch; margin: 36px auto 0; line-height: 1.6; }
.lp-stores { display: flex; align-items: center; gap: 10px; }
.lp-stores-center { justify-content: center; flex-wrap: wrap; margin-top: 44px; color: var(--muted); }
.lp-store { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); }
.lp-price { position: relative; }
.lp-price-badge { position: absolute; top: -12px; left: 24px; padding: 4px 12px; border-radius: 999px; background: var(--primary); color: var(--primary-text); font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.lp-price-note { margin: -4px 0 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* Přehled bez rámečku: dlaždice jezdí volně přes celou šířku stránky a na okrajích se prolínají do pozadí. */
.lp-mock-free { padding-block: 8px 88px; overflow: hidden; }
.lp-mock-free .lp-mock-tiles.lp-marquee {
    padding: 14px 0; background: none; border: 0; box-shadow: none;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.lp-mock-free .lp-tile { border-radius: 18px; box-shadow: 0 14px 34px rgba(30, 41, 90, .22); }

/* Editor ceníku v Platformě: náhled ve stejném rozložení jako na úvodní stránce, texty se upravují přímo v něm. */
.lp-edit-bar { position: sticky; top: 0; z-index: 20; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 6px 20px rgba(30, 41, 90, .1); }
.lp-edit-stage { margin-top: 12px; padding-block: 56px; border: 1px solid var(--border); border-radius: 24px; }
.lp-edit-stage .lp-wrap { padding-inline: 24px; }
.lp-edit {
    width: 100%; box-sizing: border-box; font: inherit; color: inherit; letter-spacing: inherit; text-align: inherit; resize: vertical;
    background: transparent; border: 1px dashed color-mix(in srgb, var(--primary) 35%, transparent); border-radius: 8px; padding: 4px 8px; min-height: 0;
}
.lp-edit:hover { background: color-mix(in srgb, var(--primary) 7%, transparent); }
.lp-edit:focus { outline: 2px solid var(--primary); outline-offset: 0; background: var(--surface); }
.lp-edit::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.lp-edit-h2 { display: block; font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 800; letter-spacing: -.03em; text-align: center; margin-bottom: 10px; }
.lp-edit-sub { display: block; max-width: 72ch; margin: 0 auto 36px; text-align: center; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.lp-edit-h3 { font-size: 1.02rem; font-weight: 700; color: var(--muted); }
.lp-price-edit { flex-direction: row; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.lp-edit-price { width: 7.5ch; font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; text-align: left; }
.lp-edit-badge { position: absolute; top: -14px; left: 16px; width: auto; max-width: 70%; font-size: .78rem; font-weight: 800; border-radius: 999px; text-align: center; background: color-mix(in srgb, var(--primary) 18%, var(--surface)); }
.lp-price-main .lp-edit-badge { background: var(--primary); color: var(--primary-text); }
.lp-edit-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .88rem; }
.lp-edit-row .lp-edit { width: 90px; }
.lp-edit-note { font-size: .9rem; color: var(--muted); }
.lp-edit-includes { display: grid; gap: 8px; max-width: 640px; margin: 28px auto 0; padding: 16px 18px; border: 1px dashed color-mix(in srgb, var(--primary) 40%, var(--border)); border-radius: 14px; background: color-mix(in srgb, var(--surface) 70%, transparent); }
.lp-edit-tech { display: block; max-width: 70ch; margin: 28px auto 0; text-align: center; color: var(--muted); font-size: .9rem; }
.lp-edit-quote { display: grid; gap: 8px; flex: 1 1 360px; }
.lp-edit-qh { font-size: 1.25rem; font-weight: 700; }
.lp-edit-qp { color: var(--muted); line-height: 1.55; }
.lp-edit-cta { display: grid; gap: 10px; flex: 0 1 300px; }
.lp-edit-cta .btn { pointer-events: none; opacity: .85; justify-content: center; }

/* Ikona platformy (bez školy) v postranním panelu: logo škola360 místo zkratky. */
.brand-mark-img { display: block; background: none; object-fit: contain; box-shadow: 0 4px 12px color-mix(in srgb, #1e3a8a 35%, transparent); }
.lp-edit-list { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.lp-edit-list li { display: flex; gap: 8px; align-items: center; }
.lp-edit-list .lp-edit { flex: 1; min-width: 0; font-size: .95rem; padding: 3px 8px; }
.lp-edit-x { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; line-height: 1; font-size: .8rem; }
.lp-edit-x:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }
.lp-edit-add { justify-content: flex-start; }

/* Marketing: šablona e-mailu a živý náhled. */
.mk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.mk-side { position: sticky; top: 12px; }
.mk-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; }
.mk-mail { margin: 14px 0; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); }
.mk-subject { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mk-body { margin: 0; padding: 16px; white-space: pre-wrap; font: inherit; line-height: 1.55; max-height: 460px; overflow: auto; }
@media (max-width: 980px) { .mk-grid { grid-template-columns: 1fr; } .mk-side { position: static; } }

/* Přepínač pohledů v demo škole (horní lišta). */
.demo-switch { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 12px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--border)); }
.demo-switch-label { font-size: .8rem; font-weight: 700; color: var(--primary); white-space: nowrap; }
.demo-switch select { border: 0; background: var(--surface); border-radius: 999px; padding: 6px 12px; font-weight: 600; min-height: 34px; }
@media (max-width: 640px) { .demo-switch-label { display: none; } .demo-switch { padding-left: 6px; } }

/* Oko pro náhled hesla. */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; width: 100%; box-sizing: border-box; }
.pw-eye { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.pw-eye:hover { color: var(--primary); background: color-mix(in srgb, var(--primary) 10%, transparent); }
.pw-eye[aria-pressed="true"] { color: var(--primary); }

/* Log návštěv: přehledové karty. */
.vl-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.vl-stat { display: grid; gap: 2px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.vl-stat b { font-size: 1.7rem; letter-spacing: -.02em; }
.vl-stat span { color: var(--muted); font-size: .85rem; }

/* Kontakty na úvodní stránce. */
.lp-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 860px; margin-inline: auto; }
.lp-contact { display: grid; gap: 8px; justify-items: start; padding: 28px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(10px); border: 1px solid color-mix(in srgb, var(--border) 80%, transparent); box-shadow: 0 8px 28px rgba(30, 41, 90, .07); }
.lp-contact h3 { margin: 10px 0 0; font-size: 1.15rem; }
.lp-contact p { margin: 0; color: var(--muted); line-height: 1.5; }
.lp-contact a { font-weight: 700; font-size: 1.05rem; color: var(--primary); text-decoration: none; word-break: break-all; }
.lp-contact a:hover { text-decoration: underline; }
.lp-foot-mails a { color: inherit; text-decoration: underline; }

/* Karty funkcí: vždy 5 v řadě (na menších obrazovkách postupně méně). */
.lp-grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.lp-grid-5 .lp-feature { padding: 22px 18px; }
.lp-grid-5 .lp-feature h3 { font-size: 1.05rem; margin: 14px 0 6px; }
.lp-grid-5 .lp-feature p { font-size: .92rem; }
.lp-grid-5 .lp-ficon { width: 48px; height: 48px; border-radius: 14px; }
@media (max-width: 1100px) { .lp-grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .lp-grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .lp-grid-5 .lp-feature { padding: 18px 14px; } }
@media (max-width: 480px) { .lp-grid-5 { grid-template-columns: 1fr; } }

/* Karta funkce: název vedle ikony, svisle na střed. */
.lp-feature-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.lp-feature-head .lp-ficon { flex: none; }
.lp-feature-head h3 { margin: 0; line-height: 1.25; }
.lp-grid-5 .lp-feature-head h3 { margin: 0; }
