/* Tréninky týmu – rozvržení podle PIM, barvy ČSOB Pojišťovny. */
:root {
    --navy-900: #071D36;
    --navy-800: #0A2645;
    --navy: #0B2D50;
    --sky: #009EE0;
    --sky-600: #0079B8;
    --sky-100: #D6EDFA;
    --sky-50: #EAF5FC;
    --orange: #F7781F;
    --orange-600: #E0640C;
    --orange-50: #FFF1E5;
    --green: #78B72A;
    --green-700: #3E7A0C;
    --green-50: #EEF7E2;
    --red: #D33F1C;
    --red-50: #FDEBE6;
    --ground: #F2F7FB;
    --surface: #FFFFFF;
    --ink: #0B2D50;
    --text: #1E3550;
    --muted: #5C7189;
    --line: #DCE6EF;
    --line-soft: #EBF1F6;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(11, 45, 80, .05);
    --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-head: "Roboto Condensed", "Roboto", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--ground); color: var(--text);
    font: 15px/1.55 var(--font);
}
a { color: var(--sky-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-head); color: var(--ink); margin: 0; }
p { margin: 0 0 .75em; }
.ico { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ rozvržení */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
    background: var(--navy-800); color: #C5D6E8;
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
    padding: 18px 14px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; color: #fff; padding: 2px 6px 22px; }
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 36px; height: 36px; border-radius: 9px; background: var(--sky);
    display: grid; place-items: center; color: #fff;
}
.brand-mark .ico { width: 21px; height: 21px; }
.brand b { display: block; font: 700 19px/1.1 var(--font-head); letter-spacing: .01em; }
.brand small { display: block; font-size: 12px; color: #8FB0CF; }
.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-label {
    font: 500 11px/1 var(--font); letter-spacing: .14em; text-transform: uppercase;
    color: #6F8FAF; padding: 18px 12px 8px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px;
    color: #DCE8F4; font-weight: 500; border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); text-decoration: none; }
.nav-item.active { background: rgba(0, 158, 224, .16); color: #fff; border-left-color: var(--sky); }
.nav-item.active .ico { color: var(--sky); }
.nav-badge {
    margin-left: auto; background: var(--orange); color: #fff; font: 700 11px/1 var(--font);
    padding: 4px 7px; border-radius: 99px;
}
.sidebar-user {
    display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 14px 4px 0; margin-top: 12px;
}
.avatar {
    width: 34px; height: 34px; border-radius: 50%; background: var(--sky); color: #fff;
    display: grid; place-items: center; font: 700 13px/1 var(--font); flex: none;
}
.sidebar-user .who { min-width: 0; flex: 1; }
.sidebar-user .who b { display: block; color: #fff; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .who span { font-size: 12px; color: #8FB0CF; }
.icon-btn {
    background: none; border: 0; color: #8FB0CF; padding: 6px; border-radius: 6px; cursor: pointer;
    display: grid; place-items: center;
}
.icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .08); }

.main { padding: 30px 40px 60px; min-width: 0; }
.mobilebar { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumb a { color: var(--muted); }
.page-head h1 { font-size: 32px; line-height: 1.15; font-weight: 700; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }
.section-head h2 {
    font: 700 17px/1.2 var(--font-head); text-transform: uppercase; letter-spacing: .04em;
}
.section-head a { font-size: 14px; }

/* ------------------------------------------------------------ karty a KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.kpi { padding: 20px 22px; display: block; color: inherit; }
a.kpi:hover { text-decoration: none; border-color: var(--sky); }
.label {
    font: 500 11px/1 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.kpi .value { font: 700 36px/1.1 var(--font-head); color: var(--ink); margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: 13px; color: var(--muted); }
.kpi.accent { border-top: 3px solid var(--sky); }
.kpi.warn { border-top: 3px solid var(--orange); }
.kpi .sub.bad { color: var(--red); font-weight: 500; }

.card-body { padding: 22px 24px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; }

.alert {
    display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
    padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px;
    background: var(--orange-50); border: 1px solid #F8CFAE; color: #7A3A06;
}
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-weight: 500; }
.flash-ok { background: var(--green-50); color: var(--green-700); border: 1px solid #CBE5A9; }
.flash-bad { background: var(--red-50); color: #9E2B0F; border: 1px solid #F4C3B6; }

/* ------------------------------------------------------------ tabulky */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th {
    font: 500 11px/1.2 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
    text-align: left; padding: 14px 16px; background: #F7FAFD; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FAFCFE; }
.table .id { font: 700 12px/1.6 var(--font-head); color: var(--sky-600); }
.table td.actions { text-align: right; white-space: nowrap; }
.table .title-cell a { font-weight: 500; }
.table .sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); }

.pill {
    display: inline-block; font: 500 12px/1 var(--font); padding: 5px 9px; border-radius: 99px; white-space: nowrap;
}
.pill-ok { background: var(--green-50); color: var(--green-700); }
.pill-info { background: var(--sky-50); color: var(--sky-600); }
.pill-warn { background: var(--orange-50); color: #B4520A; }
.pill-bad { background: var(--red-50); color: var(--red); }
.pill-muted { background: #EEF2F6; color: var(--muted); }

.cap { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.bar { flex: 1; height: 5px; background: var(--line-soft); border-radius: 99px; overflow: hidden; min-width: 50px; }
.bar i { display: block; height: 100%; background: var(--sky); border-radius: 99px; }
.bar.full i { background: var(--orange); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tab {
    padding: 10px 14px; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--ink); text-decoration: none; }
.tab.active { color: var(--ink); border-bottom-color: var(--sky); }
.tab .count { font-size: 12px; background: #EEF2F6; padding: 2px 7px; border-radius: 99px; margin-left: 4px; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filters input[type=search] { width: auto; min-width: 260px; }
.filters select { width: auto; min-width: 180px; }

/* ------------------------------------------------------------ tlačítka a formuláře */
.btn {
    display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 8px;
    padding: 10px 16px; font: 500 14.5px/1.2 var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
    background: var(--surface); color: var(--ink); border-color: var(--line);
}
.btn:hover { text-decoration: none; border-color: #BCD0E2; }
.btn-primary { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
.btn-primary:hover { background: var(--orange-600); border-color: var(--orange-600); }
.btn-ok { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.btn-ok:hover { background: #69A322; border-color: #69A322; }
.btn-blue { background: var(--sky); border-color: var(--sky); color: #fff; font-weight: 700; }
.btn-blue:hover { background: var(--sky-600); border-color: var(--sky-600); }
.btn-ghost { background: none; border-color: transparent; color: var(--sky-600); padding-left: 8px; padding-right: 8px; }
.btn-ghost:hover { background: var(--sky-50); }
.btn-danger { color: var(--red); }
.btn-sm { padding: 6px 10px; font-size: 13px; }
.inline { display: inline; }

label { display: block; font-weight: 500; color: var(--ink); margin-bottom: 6px; font-size: 14px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], input[type=date],
input[type=time], input[type=datetime-local], input[type=search], select, textarea {
    width: 100%; font: 15px/1.4 var(--font); color: var(--text); background: #fff;
    border: 1px solid #C9D7E4; border-radius: 8px; padding: 10px 12px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sky-100); border-color: var(--sky); }
textarea { min-height: 96px; resize: vertical; }
.field { margin-bottom: 18px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.field .err { font-size: 13px; color: var(--red); margin-top: 5px; font-weight: 500; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--red); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 16px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; cursor: pointer; margin: 0; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--sky); flex: none; }
.form-card { max-width: 760px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 6px; }

/* ------------------------------------------------------------ detail tréninku */
.facts { display: flex; flex-wrap: wrap; gap: 10px 26px; color: var(--text); }
.facts span { display: inline-flex; align-items: center; gap: 7px; }
.facts .ico { color: var(--sky); }
.desc { white-space: pre-line; margin-top: 14px; }
.picklist { max-height: 360px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.picklist .group { font: 500 11px/1 var(--font); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: #F7FAFD; padding: 10px 12px; position: sticky; top: 0; }
.picklist .check { padding: 9px 12px; border-top: 1px solid var(--line-soft); }
.picklist .check:hover { background: var(--sky-50); }
.picklist .check small { color: var(--muted); margin-left: 4px; }
.pick-tools { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.pick-tools input { flex: 1; }
details.more summary { cursor: pointer; color: var(--sky-600); font-weight: 500; padding: 4px 0; }
details.more[open] summary { margin-bottom: 10px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }

.task-check { display: flex; align-items: flex-start; gap: 10px; }
.tick {
    width: 22px; height: 22px; border-radius: 6px; border: 2px solid #B7C9DA; background: #fff; cursor: pointer;
    display: grid; place-items: center; padding: 0; flex: none; color: #fff;
}
.tick:hover { border-color: var(--green); }
.tick.done { background: var(--green); border-color: var(--green); }
.tick svg { width: 14px; height: 14px; }
.tick:disabled { cursor: not-allowed; opacity: .5; }
tr.is-done .task-title { text-decoration: line-through; color: var(--muted); }
.overdue { color: var(--red); font-weight: 500; }

.copy-box { display: flex; gap: 8px; }
.copy-box input { font-family: ui-monospace, monospace; font-size: 13px; }

/* ------------------------------------------------------------ přihlášení */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side {
    background: linear-gradient(160deg, var(--navy) 0%, var(--navy-900) 100%); color: #fff;
    padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
}
.auth-side::after {
    content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
    right: -120px; bottom: -140px; background: radial-gradient(circle at 35% 35%, #33B5EA, var(--sky) 45%, #0068A6);
    opacity: .9;
}
.auth-side h1 { color: #fff; font-size: 44px; line-height: 1.05; max-width: 420px; position: relative; z-index: 1; }
.auth-side p { color: #B9CEE3; max-width: 380px; position: relative; z-index: 1; }
.auth-main { display: grid; place-items: center; padding: 32px 20px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h2 { font-size: 28px; margin-bottom: 6px; }
.auth-card .btn { width: 100%; justify-content: center; padding: 12px; }

/* ------------------------------------------------------------ AI asistenti */
.bot-sky    { --bot: #009EE0; --bot-soft: #E3F3FC; }
.bot-navy   { --bot: #0B2D50; --bot-soft: #E3EAF2; }
.bot-orange { --bot: #F7781F; --bot-soft: #FFEEDF; }
.bot-green  { --bot: #5E9E1C; --bot-soft: #EAF5DD; }
.bot-red    { --bot: #D33F1C; --bot-soft: #FCE8E3; }
.bot-violet { --bot: #6B4FBB; --bot-soft: #EFEAFB; }
.bot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.bot-card { display: flex; gap: 14px; padding: 20px; color: inherit; border-top: 3px solid var(--bot); }
.bot-card:hover { text-decoration: none; border-color: var(--bot); box-shadow: 0 4px 14px rgba(11, 45, 80, .08); }
.bot-card.is-off { opacity: .6; }
.bot-card b { display: block; font: 700 18px/1.25 var(--font-head); color: var(--ink); margin-bottom: 4px; }
.bot-card .bot-text span { display: block; font-size: 14px; color: var(--muted); }
.bot-icon {
    width: 46px; height: 46px; border-radius: 12px; background: var(--bot-soft); color: var(--bot);
    display: grid; place-items: center; font-size: 24px; flex: none; line-height: 1;
}
.bot-icon.sm { width: 34px; height: 34px; font-size: 18px; border-radius: 9px; }
.bot-icon.lg { width: 64px; height: 64px; font-size: 34px; border-radius: 16px; margin: 0 auto 12px; }

.chat-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; height: calc(100vh - 90px); min-height: 480px; }
.chat-side { overflow-y: auto; }
.conv-list a {
    display: block; padding: 9px 10px; border-radius: 8px; color: var(--text); font-size: 14px;
}
.conv-list a span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-list a small { color: var(--muted); font-size: 12px; }
.conv-list a:hover { background: #fff; text-decoration: none; }
.conv-list a.active { background: #fff; box-shadow: inset 3px 0 0 var(--sky); }
.chat-main { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.chat-head > a { flex: none; }
.chat-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.chat-title h1 { font-size: 20px; line-height: 1.2; }
.chat-log { flex: 1; overflow-y: auto; padding: 24px 22px; display: flex; flex-direction: column; gap: 16px; background: #FAFCFE; }
.chat-welcome { margin: auto; text-align: center; max-width: 560px; }
.chat-welcome h2 { font-size: 26px; margin-bottom: 6px; }
.starters { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 20px; }
.starter {
    text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
    font: 14px/1.4 var(--font); color: var(--text); cursor: pointer;
}
.starter:hover { border-color: var(--sky); background: var(--sky-50); }
.msg { display: flex; flex-direction: column; max-width: 860px; }
.msg-user { align-self: flex-end; align-items: flex-end; max-width: 75%; }
.msg-user .bubble { background: var(--navy); color: #fff; border-radius: 14px 14px 4px 14px; padding: 10px 14px; white-space: pre-wrap; }
.msg-assistant { align-self: flex-start; width: 100%; }
.msg-assistant .bubble { background: #fff; border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 12px 16px; overflow-x: auto; }
.msg.is-error .bubble:empty { display: none; }
.msg-foot { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; margin-top: 5px; padding-left: 4px; }
.err-text { color: var(--red); font-weight: 500; }
.link-btn { background: none; border: 0; padding: 0; color: var(--sky-600); cursor: pointer; font: inherit; }
.bubble p { margin: 0 0 .7em; }
.bubble > :last-child { margin-bottom: 0; }
.bubble h2, .bubble h3, .bubble h4, .bubble h5, .bubble h6 { font-size: 17px; margin: 1em 0 .4em; }
.bubble h2 { font-size: 20px; }
.bubble ul, .bubble ol { margin: 0 0 .7em; padding-left: 1.4em; }
.bubble li { margin: .2em 0; }
.bubble code { background: #EEF3F8; padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.bubble pre { background: #0F2238; color: #E3ECF5; padding: 12px 14px; border-radius: 8px; overflow-x: auto; margin: 0 0 .7em; }
.bubble pre code { background: none; padding: 0; color: inherit; }
.bubble blockquote { margin: 0 0 .7em; padding-left: 12px; border-left: 3px solid var(--sky-100); color: var(--muted); }
.bubble hr { border: 0; border-top: 1px solid var(--line); margin: 1em 0; }
.md-table { overflow-x: auto; margin: 0 0 .7em; }
.md-table table { border-collapse: collapse; font-size: 14px; }
.md-table th, .md-table td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.md-table th { background: #F4F8FB; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--sky); animation: blink 1.2s infinite both; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-input { padding: 12px 18px 10px; border-top: 1px solid var(--line); }
.chat-box { display: flex; gap: 10px; align-items: flex-end; }
.chat-box textarea { min-height: 46px; max-height: 240px; resize: none; }
.chat-box .btn { height: 46px; }
.chat-note { margin: 6px 0 0; font-size: 12px; }
.chat-input.is-busy textarea { background: #F7FAFD; }
.chat-attach { height: 46px; width: 46px; padding: 0; justify-content: center; flex: none; cursor: pointer; position: relative; }
.chat-attach input { position: absolute; inset: 0; opacity: 0; width: 0; height: 0; }
.chat-attach:focus-within { outline: 2px solid var(--sky); outline-offset: 2px; }
.chat-attach.is-disabled { opacity: .5; pointer-events: none; }
.msg-files { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; justify-content: flex-end; }
.chat-files { justify-content: flex-start; margin-bottom: 8px; }
.chat-files[hidden] { display: none; }
.file-chip {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 10px;
    background: var(--sky-50); border: 1px solid var(--sky-100); border-radius: 8px; color: var(--ink); font-size: 13px;
    overflow-wrap: anywhere;
}
.file-chip .ico { width: 15px; height: 15px; flex: none; color: var(--sky-600); }
.file-chip small { color: var(--muted); white-space: nowrap; }
.file-chip button { border: 0; background: none; color: var(--muted); font-size: 17px; line-height: 1; padding: 0 2px; cursor: pointer; }
.file-chip button:hover { color: var(--red); }
.file-chip.is-bad { background: var(--red-50); border-color: #F3C2B5; }
.reading { display: block; margin-top: 6px; font-size: 12px; }

.prompt-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.prompt-stats div { background: var(--sky-50); border-radius: 8px; padding: 10px 12px; font-size: 13px; color: var(--muted); }
.prompt-stats b { display: block; font: 700 20px/1.2 var(--font-head); color: var(--ink); }
.model-table input { padding: 6px 8px; font-size: 13.5px; }
.model-table input.num-in { width: 80px; text-align: right; }
.usage-bar { display: flex; align-items: center; gap: 8px; }
.usage-bar .bar { min-width: 60px; }
.daily { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 10px 0 0; }
.daily span { flex: 1; background: var(--sky); border-radius: 3px 3px 0 0; min-height: 2px; position: relative; }
.daily span:hover { background: var(--orange); }
.textview { white-space: pre-wrap; font: 13px/1.5 ui-monospace, monospace; max-height: 70vh; overflow: auto; background: #F7FAFD; padding: 16px; border-radius: 8px; }
@media (max-width: 900px) {
    .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 120px); }
    .chat-side { display: none; }
    .msg-user { max-width: 90%; }
    .chat-log { padding: 16px 12px; }
}

/* ------------------------------------------------------------ instalace aplikace */
.install-item { background: none; border: 0; width: 100%; text-align: left; cursor: pointer; font: inherit; color: #DCE8F4; margin-top: 8px; }
.install-item[hidden], .install-banner[hidden] { display: none; }
.install-banner {
    display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line);
    border-left: 4px solid var(--sky); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.install-banner img { border-radius: 10px; flex: none; }
.install-banner span { flex: 1; min-width: 0; }
.install-banner b { display: block; color: var(--ink); }
.install-banner small { display: block; color: var(--muted); font-size: 13px; }
.install-banner .icon-btn { color: var(--muted); font-size: 16px; }
@media (display-mode: standalone) {
    .mobilebar { padding-top: max(10px, env(safe-area-inset-top)); }
}

/* ------------------------------------------------------------ organigram */
.org-help { max-width: 760px; margin: -8px 0 16px; }
.org-tree, .org-tree ul { list-style: none; margin: 0; padding: 0; }
.org-tree ul { margin-left: 17px; padding-left: 18px; border-left: 2px solid var(--line); }
.org-node { position: relative; padding-top: 8px; }
.org-tree ul > .org-node::before {
    content: ""; position: absolute; left: -18px; top: 30px; width: 16px; border-top: 2px solid var(--line);
}
.org-node.collapsed > ul { display: none; }
.org-node:target > .org-card { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-50); }
.org-card {
    display: flex; align-items: center; gap: 10px; max-width: 620px; padding: 8px 12px 8px 6px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.org-card[draggable="true"] { cursor: grab; }
.org-card input[type=checkbox] { width: 18px; height: 18px; flex: none; margin: 0; accent-color: var(--sky); }
.org-card .avatar { width: 32px; height: 32px; font-size: 12px; background: var(--navy); }
.org-card.is-team .avatar { background: var(--sky); }
.org-card.is-me { border-color: var(--sky); box-shadow: 0 0 0 3px var(--sky-50); }
.org-card.inactive { opacity: .6; }
.org-card.dragging { opacity: .4; }
.org-card.drop-over { border-color: var(--orange); background: var(--orange-50); }
.org-card.org-hit { border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-50); }
.org-name { flex: 1; min-width: 0; line-height: 1.3; }
.org-name a { color: var(--ink); font-weight: 500; }
.org-name small { display: block; color: var(--muted); font-size: 12.5px; }
.org-name small:empty { display: none; }
.org-toggle {
    width: 24px; height: 24px; flex: none; border: 0; background: none; color: var(--muted); padding: 0;
    display: grid; place-items: center; border-radius: 6px; cursor: pointer;
}
button.org-toggle:hover { background: var(--sky-50); color: var(--sky-600); }
.org-node.collapsed > .org-card .org-toggle svg { transform: rotate(-90deg); }
.org-loose { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 12px; }
.org-loose .org-toggle { display: none; }
.org-drop-root {
    display: none; border: 2px dashed var(--line); border-radius: var(--radius); padding: 14px;
    text-align: center; color: var(--muted); margin-bottom: 12px;
}
.org-dragging .org-drop-root { display: block; }
.org-drop-root.drop-over { border-color: var(--orange); background: var(--orange-50); color: #B4520A; }
.org-bar {
    position: sticky; bottom: 14px; z-index: 30; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-top: 20px; padding: 12px 16px; background: var(--navy-800); color: #fff; border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(7, 29, 54, .25);
}
.org-bar[hidden] { display: none; }
.org-bar select { width: auto; flex: 1; min-width: 180px; }
.org-bar .btn-ghost { color: #C5D6E8; }
.plain-list { list-style: none; margin: 0 0 10px; padding: 0; }
.plain-list li { padding: 5px 0; border-bottom: 1px solid var(--line-soft); }
.plain-list li:last-child { border-bottom: 0; }

/* ------------------------------------------------------------ mobil */
@media (max-width: 1100px) {
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%);
        transition: transform .2s ease; box-shadow: 0 0 40px rgba(0, 0, 0, .3);
    }
    .sidebar.open { transform: none; }
    .mobilebar {
        display: flex; align-items: center; gap: 12px; background: var(--navy-800); color: #fff;
        padding: 10px 16px; margin: -20px -16px 20px; position: sticky; top: 0; z-index: 40;
    }
    .mobilebar .icon-btn { color: #fff; }
    .mobilebar b { font: 700 18px/1 var(--font-head); }
    .main { padding: 20px 16px 48px; }
    .page-head h1 { font-size: 26px; }
    .auth { grid-template-columns: 1fr; }
    .auth-side { padding: 28px 20px; min-height: 180px; }
    .auth-side h1 { font-size: 30px; }
    .auth-side::after { width: 220px; height: 220px; right: -70px; bottom: -90px; }
    .table th, .table td { padding: 11px 12px; }
    .hide-sm { display: none; }
}
