@font-face { font-family: 'Titillium Web'; src: url('fonts/TitilliumWeb-Regular.ttf'); font-weight: 400; }
@font-face { font-family: 'Titillium Web'; src: url('fonts/TitilliumWeb-SemiBold.ttf'); font-weight: 600; }
@font-face { font-family: 'Titillium Web'; src: url('fonts/TitilliumWeb-Bold.ttf'); font-weight: 700; }

:root {
  --primary: #04256c;
  --primary-soft: #e8ecf5;
  --accent: #91c90e;
  --accent-dark: #6c9a00;
  --bg: #f5f5f5;
  --card: #ffffff;
  --border: #dcdcdc;
  --text: #1f2330;
  --muted: #6b7280;
  --red: #d32f2f;
  --red-soft: #fdecec;
  --green-soft: #eef7dc;
  --radius: 8px;
}

* { box-sizing: border-box; }
html { font-size: 15px; scrollbar-gutter: stable; } /* místo pro posuvník je rezervované vždy – obsah neposkakuje do stran */
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: 'Titillium Web', system-ui, sans-serif; line-height: 1.45;
}
a { color: var(--primary); }
h1, h2, h3 { margin: 0; }

/* ---------- horní lišta ---------- */
.appbar {
  position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--border);
}
.appbar-inner { max-width: 1800px; margin: 0 auto; padding: 0 20px; height: 60px; display: flex; align-items: center; gap: 8px; }
.brand { font-size: 1.2rem; text-decoration: none; color: var(--text); margin-right: auto; white-space: nowrap; }
.brand b { color: var(--primary); }
.brand small { color: var(--muted); font-size: .72rem; margin-left: 6px; border: 1px solid var(--border); border-radius: 10px; padding: 1px 7px; vertical-align: middle; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a {
  color: var(--primary); text-decoration: none; text-transform: uppercase; font-weight: 600; font-size: .85rem;
  letter-spacing: .04em; padding: 8px 12px; border-radius: 4px;
}
.nav a:hover, .nav a.active { background: var(--primary-soft); }
.usermenu { position: relative; }
.usermenu > button {
  border: 0; background: none; color: var(--primary); font: inherit; font-weight: 600; cursor: pointer;
  padding: 8px 10px; border-radius: 4px; display: flex; align-items: center; gap: 6px;
}
.usermenu > button:hover { background: var(--primary-soft); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-size: .75rem; }
.usermenu .menu { display: none; position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--border); border-radius: 6px; min-width: 220px; box-shadow: 0 6px 20px rgba(0,0,0,.08); padding: 6px 0; }
.usermenu.open .menu { display: block; }
.menu .who { padding: 8px 14px; color: var(--muted); font-size: .85rem; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 8px 14px; text-decoration: none; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg); }

.impersonation { background: #fff6d6; border-bottom: 1px solid #f0d77a; }
.impersonation .inner { max-width: 1800px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; gap: 12px; }

/* ---------- rozvržení ---------- */
.container { max-width: 1800px; margin: 0 auto; padding: 28px 20px 40px; }
.section { margin-bottom: 56px; }
.section-title { font-size: 1.2rem; color: #8a8f99; text-transform: uppercase; letter-spacing: .03em; margin: 0 0 14px; font-weight: 600; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.footer { text-align: center; color: var(--muted); padding: 10px 0 24px; font-size: .9rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.row { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.grow { flex: 1; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }

/* ---------- hlášky ---------- */
.flash { border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid; }
.flash.success { background: var(--green-soft); border-color: #cfe7a2; }
.flash.error { background: var(--red-soft); border-color: #f3c0c0; color: #8f1d1d; }
.flash.info { background: var(--primary-soft); border-color: #c8d2ea; }
.alert-invalid { background: var(--red-soft); border: 1px solid #f3c0c0; color: #8f1d1d; border-radius: 6px; padding: 12px 16px; margin-bottom: 14px; max-width: 760px; }

/* ---------- tlačítka a pole ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; border-radius: 4px;
  padding: 8px 16px; font: inherit; font-weight: 600; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; background: #e9e9e9; color: var(--text); line-height: 1.2;
}
.btn:hover { filter: brightness(.96); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-text { background: none; color: var(--primary); padding: 8px 10px; }
.btn-text:hover { background: var(--primary-soft); filter: none; }
.btn-danger { background: var(--red); color: #fff; }
/* potvrzovací dialog (askConfirm / data-confirm) – uprostřed stránky, text na střed */
dialog.confirm-dlg { padding: 0; border: 0; border-radius: 12px; background: var(--card); color: var(--text); width: calc(100% - 32px);
  max-width: 420px; box-shadow: 0 24px 60px rgba(10, 20, 40, .28), 0 2px 8px rgba(10, 20, 40, .12); }
dialog.confirm-dlg::backdrop { background: rgba(10, 20, 40, .45); }
.confirm-box { padding: 26px 26px 22px; text-align: center; }
.confirm-title { margin: 0 0 8px; font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.confirm-text { margin: 0; color: var(--muted); line-height: 1.5; white-space: pre-line; }
.confirm-btns { display: flex; justify-content: center; gap: 10px; margin-top: 20px; }
.confirm-btns .btn { min-width: 110px; justify-content: center; text-align: center; }
.btn-sm { padding: 4px 10px; font-size: .75rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; border: 0; background: none; cursor: pointer; color: var(--primary); padding: 4px 6px; border-radius: 4px; font-size: 1rem; line-height: 1; text-decoration: none; }
.icon-btn:hover { background: var(--primary-soft); }
.icon-btn .ico { width: 18px; height: 18px; fill: currentColor; display: block; }
.icon-btn.icon-gap { visibility: hidden; width: 30px; height: 26px; padding: 0; }
.icon-btn.icon-del { color: var(--muted); }                    /* smazat: šedý koš, po najetí červený */
.icon-btn.icon-del:hover, .icon-btn.icon-del:focus-visible { background: #fbe9e9; color: #b42323; }
table.data td.row-actions { white-space: nowrap; overflow: visible; padding-left: 6px; padding-right: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.center { text-align: center !important; }

/* neaktivní (uzamčené) řádky – na první pohled vybledlé, akce zůstávají normálně */
table.data tr.row-off td { color: #aeb3bc; }
table.data tr.row-off td .co-tag, table.data tr.row-off td .tag { opacity: .5; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: middle; }
.dot-on { background: #43a047; box-shadow: 0 0 0 3px rgba(67, 160, 71, .16); }
.dot-off { background: #b4b9c2; box-shadow: 0 0 0 3px rgba(150, 156, 168, .16); }

label.field, div.field { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
input[type=text], input[type=password], input[type=date], input[type=number], input[type=email], input[type=search], select, textarea {
  font: inherit; font-size: .95rem; color: var(--text); padding: 8px 10px; border: 1px solid #c4c4c4; border-radius: 4px; background: #fff; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary); outline-offset: -1px; border-color: var(--primary); }
textarea { resize: vertical; min-height: 40px; }
.field .err, .err-text { color: var(--red); font-size: .8rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
.field.has-err input, .field.has-err select, .field.has-err textarea { border-color: var(--red); }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: .95rem; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.radios { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
/* volby uvnitř pole (typ schůzky, transfer) – normální písmo, ne styl popisku pole */
div.field .check, div.field .radios .muted { font-size: .95rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text); }
div.field .radios .muted { color: var(--muted); }
.of-grid .check input { width: 18px; flex: none; }

/* ---------- přepínač období ---------- */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: #fff; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 12px; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); cursor: pointer; border-right: 1px solid var(--border); }
.seg label:last-child span { border-right: 0; }
.seg input:checked + span { background: var(--primary); color: #fff; }

/* ---------- tabulky ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.big-sum { text-align: right; }
.big-sum .label { color: var(--muted); font-size: .85rem; }
.big-sum .value { font-size: 1.9rem; font-weight: 600; color: var(--primary); line-height: 1.1; }
.filters { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; display: none; }
.filters.open { display: block; }
.filters-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px 14px; }
.filters-grid .mt { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-top: 4px; text-transform: none; font-weight: 400; color: var(--text); letter-spacing: 0; font-size: .9rem; }
.badge-count { background: var(--accent); color: #fff; border-radius: 10px; padding: 0 7px; font-size: .75rem; }

.table-wrap { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow-x: auto; }
.xt.loading { opacity: .55; pointer-events: none; transition: opacity .15s; }
table.data { border-collapse: collapse; width: 100%; font-size: .88rem; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid #ececec; text-align: left; vertical-align: middle; }
table.data thead th { font-size: .72rem; color: #5f6573; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; background: #fafafa; white-space: nowrap; position: sticky; top: 0; }
table.data thead tr.group th { text-align: center; color: var(--primary); font-size: .8rem; border-bottom: 1px solid var(--border); }
table.data thead th a { color: inherit; text-decoration: none; }
table.data thead th a:hover { color: var(--primary); }
table.data thead th.sorted a { color: var(--primary); }
table.data thead th .th-sort { display: inline-flex; align-items: baseline; gap: 6px; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
table.data thead th .th-sort:hover, table.data thead th.sorted .th-sort { color: var(--primary); }
table.data thead th .th-sort:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }
.th-ico { width: 7px; height: 11px; flex: none; align-self: center; }
.th-ico path { fill: #c3c8d1; transition: fill .15s; }
table.data thead th .th-sort:hover .th-ico path { fill: #7d8697; }
table.data thead th[aria-sort=ascending] .th-sort .th-ico .up,
table.data thead th[aria-sort=descending] .th-sort .th-ico .dn { fill: var(--primary); }
table.data thead th[aria-sort=ascending] .th-sort .th-ico .dn,
table.data thead th[aria-sort=descending] .th-sort .th-ico .up { fill: #dfe3ea; }
/* pevné šířky sloupců – při hledání, řazení a listování se sloupce nehýbou */
table.data.fixed-cols { table-layout: fixed; }
table.data.fixed-cols td { overflow-wrap: anywhere; }
table.data.fixed-cols td.nowrap { overflow: hidden; text-overflow: ellipsis; }
table.data.orders-table .ellipsis { max-width: none; }
/* filtry ve sloupcích: trychtýř vedle názvu, vyskakovací políčko */
.fth-in { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.fth-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 4px; background: none; cursor: pointer; }
.fth-ico { width: 13px; height: 13px; fill: #c3c8d1; transition: fill .15s; }
.fth-btn:hover .fth-ico { fill: #7d8697; }
.fth-btn.on { background: var(--primary-soft); }
.fth-btn.on .fth-ico { fill: var(--primary); }
.fth-btn[aria-expanded=true] { background: var(--primary); }
.fth-btn[aria-expanded=true] .fth-ico { fill: #fff; }
.fth-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.fth-pop { position: fixed; z-index: 60; width: 250px; padding: 12px; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 12px 30px rgba(10, 20, 40, .18);
  text-align: left; white-space: normal; text-transform: none; letter-spacing: 0; font-size: .88rem; font-weight: 400; color: var(--text); cursor: default; }
.fth-pop .fth-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: 8px; }
.fth-pop input[type=search], .fth-pop input[type=text], .fth-pop select { width: 100%; height: 36px; }
.fth-pop .fth-range { display: flex; align-items: center; gap: 6px; }
.fth-pop .fth-range input { width: 0; flex: 1; }
.fth-pop .fth-checks { display: flex; flex-direction: column; gap: 6px; }
.fth-pop .fth-foot { display: flex; justify-content: flex-end; margin-top: 8px; }
.fth-hint { margin: -6px 0 10px; }
table.data.orders-table .chip { max-width: 100%; box-sizing: border-box; }
table.data tbody tr:hover { background: #f7f9fd; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; }
table.data tfoot td { font-weight: 700; background: #fafafa; border-top: 2px solid var(--border); }
table.data .br { border-right: 1px solid var(--border); }
tr.invalid td { background: var(--red-soft); }
.pos { color: var(--accent-dark); font-weight: 600; }
.neg { color: var(--red); font-weight: 600; }
.chip { display: inline-block; background: #eceef3; border-radius: 12px; padding: 1px 9px; margin: 1px 2px; font-size: .78rem; white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.chip.hidden-item { background: #f3d6d6; }
.ellipsis { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 10px 12px; font-size: .88rem; color: var(--muted); flex-wrap: wrap; }
.pager select { padding: 4px 6px; font-size: .85rem; }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .75rem; font-weight: 600; }
.tag.ok { background: var(--green-soft); color: var(--accent-dark); }
.tag.off { background: #eee; color: var(--muted); }
.tag.bad { background: var(--red-soft); color: var(--red); }

/* ---------- domů ---------- */
.greeting { font-size: 2.6rem; color: #8a8f99; font-weight: 400; margin-bottom: 26px; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 26px 0; }
.stat-cards .card .v { font-size: 2rem; color: var(--primary); font-weight: 600; }

/* ---------- objednávkový formulář ---------- */
.order-form h3 { font-size: 1.1rem; margin: 18px 0 10px; }
.order-form h3:first-child { margin-top: 0; }
.of-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; align-items: start; }
.of-grid .wide { grid-column: span 2; }
/* rozbalovací výběr více položek (slevy v objednávce) */
.msel { position: relative; }
.msel-toggle { width: 100%; min-height: 40px; display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 10px; border: 1px solid #c4c4c4; border-radius: 4px; background: #fff; font: inherit; font-size: .95rem; font-weight: 400; color: var(--text); text-transform: none; letter-spacing: 0; text-align: left; cursor: pointer; }
.msel-toggle:hover { border-color: #9aa1ad; }
.msel.open .msel-toggle, .msel-toggle:focus-visible { border-color: var(--primary); outline: none; box-shadow: 0 0 0 1px var(--primary); }
.msel-value { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.msel-placeholder { color: #8a8f99; }
.msel-chip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; padding: 2px 2px 2px 10px; border-radius: 12px; background: var(--primary-soft); color: var(--primary); font-size: .8rem; line-height: 1.4; }
.msel-chip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msel-x { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; line-height: 1; color: var(--primary); opacity: .6; }
.msel-x:hover { opacity: 1; background: rgba(4, 37, 108, .1); }
.msel-chev { flex: none; width: 22px; height: 22px; fill: var(--muted); transition: transform .15s; }
.msel.open .msel-chev { transform: rotate(180deg); }
.msel-panel { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40; background: #fff; border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 12px 30px rgba(10, 20, 40, .16); overflow: hidden; }
.msel-panel input[type=search] { width: 100%; border: 0; border-bottom: 1px solid #e3e3e3; border-radius: 0; text-transform: none; letter-spacing: 0; font-weight: 400; }
.msel-panel .disc-list { max-height: 280px; }
.disc-list { max-height: 190px; overflow-y: auto; padding: 4px 0; }
.disc-list label { display: flex; gap: 8px; align-items: center; padding: 3px 10px; font-size: .9rem; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); cursor: pointer; }
.disc-list label:hover { background: var(--bg); }
.disc-list .val { margin-left: auto; color: var(--muted); font-size: .8rem; white-space: nowrap; }
.disc-list input[type=checkbox] { width: auto; flex: none; margin: 0; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-top: 6px; }
.summary .k { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.summary .v { font-size: 1.3rem; color: var(--primary); font-weight: 600; }
.summary .v.neg { color: var(--red); }
.summary .v.pos { color: var(--accent-dark); }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.form-error { color: var(--red); margin-top: 12px; }

/* ---------- kalendář ---------- */
.cal { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.cal th { font-size: .75rem; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.cal td { height: 78px; vertical-align: top; background: #fff; border: 1px solid var(--border); border-radius: 6px; padding: 0; }
.cal td a { display: block; height: 100%; padding: 6px 8px; text-decoration: none; color: var(--text); border-radius: 6px; }
.cal td a:hover { background: var(--primary-soft); }
.cal td.other { opacity: .4; }
.cal td.sel { outline: 2px solid var(--primary); }
.cal td.today .d { background: var(--primary); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-grid; place-items: center; }
.cal .d { font-weight: 600; }
.cal .mini { font-size: .72rem; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.cal .has { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 4px; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.cal-head .btn-text { font-size: 1.2rem; padding: 4px 12px; }
.cal-head .m { font-size: 1.2rem; font-weight: 600; text-transform: capitalize; min-width: 170px; text-align: center; }
.meet-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.meet-grid input, .of-grid input, .of-grid select, .of-grid textarea { width: 100%; }
/* všechna pole formuláře stejně vysoká (text, datum, výběr, slevy, komentář); komentář roste s textem (order_form.js) */
.of-grid input:not([type=checkbox]):not([type=radio]), .of-grid select, .of-grid .msel-toggle { height: 40px; }
.of-grid .msel-toggle { height: auto; min-height: 40px; }
.of-grid textarea { height: 40px; min-height: 40px; line-height: 1.4; resize: vertical; overflow-y: hidden; }
.meet-total { font-size: 1.1rem; margin-top: 8px; }
/* realizované schůzky – dopočítané, jen pro čtení */
.meet-out { display: flex; align-items: center; height: 40px; padding: 0 10px; border: 1px dashed #cfd4dc; border-radius: 4px; background: #f6f7f9; font-size: .95rem; font-weight: 600; color: var(--text); text-transform: none; letter-spacing: 0; }
.meet-out.bad { color: var(--red); border-color: var(--red); background: var(--red-soft); font-weight: 400; font-size: .85rem; }
.cal .mini-out { margin-top: 1px; color: #a0690b; }

/* ---------- přihlášení ---------- */
/* přihlášení: karta nahoře (jako původní MySales), patička vždy dole na obrazovce – bez posouvání */
body.page-login { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
body.page-login main { flex: 1 0 auto; width: 100%; padding-top: 24px; }
.login-wrap { display: flex; justify-content: center; padding: 0 0 20px; }
.login-card { width: 100%; max-width: 400px; }
.login-card .btn { justify-content: center; }
.login-card h1 { font-size: 1.6rem; margin-bottom: 18px; }
.login-card form { display: flex; flex-direction: column; gap: 14px; }

.tabs-anchor { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
/* ---------- vyskakovací okna (formuláře) ---------- */
dialog.modal { padding: 0; border: 0; border-radius: 12px; background: var(--card); color: var(--text); width: calc(100% - 32px); max-width: 640px; max-height: calc(100vh - 48px); overflow: hidden; box-shadow: 0 24px 60px rgba(10, 20, 40, .28), 0 2px 8px rgba(10, 20, 40, .12); }
dialog.modal[data-size=sm] { max-width: 480px; }
dialog.modal[data-size=lg] { max-width: 920px; }
dialog.modal[data-size=xl] { max-width: 1120px; }
dialog.modal::backdrop { background: rgba(10, 20, 40, .45); }
dialog.modal[open] { animation: modal-in .16s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
html.modal-open { overflow: hidden; }
.modal-inner { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 14px; }
.modal-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.3rem; font-weight: 600; line-height: 1.3; color: var(--text); }
.modal-x { flex: none; margin: -4px -8px 0 0; padding: 2px 9px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 1.6rem; line-height: 1.1; cursor: pointer; }
.modal-x:hover { background: var(--primary-soft); color: var(--primary); }
.modal-body { padding: 2px 24px 22px; overflow-y: auto; }
.modal-body > form.card, .modal-body > .card { max-width: none !important; margin: 0 !important; padding: 0; border: 0; box-shadow: none; }
.modal-body > .order-form { padding: 0; }
.modal-body .form-actions { justify-content: flex-end; }
.modal-loading { padding: 48px 24px; text-align: center; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { dialog.modal[open] { animation: none; } }

/* ---------- oznámení ---------- */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); pointer-events: none; }
.toast { pointer-events: auto; cursor: pointer; padding: 12px 18px; border-radius: 8px; border-left: 4px solid var(--accent); background: #1f2330; color: #fff; font-size: .92rem; box-shadow: 0 10px 28px rgba(10, 20, 40, .25); animation: toast-in .18s ease-out; transition: opacity .2s, transform .2s; }
.toast.error { border-left-color: #ef5350; }
.toast.out { opacity: 0; transform: translateY(6px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 900px) {
  .appbar-inner { height: auto; padding: 10px 16px; flex-wrap: wrap; }
  .container { padding: 20px 16px 32px; }
  .of-grid .wide { grid-column: auto; }
  .greeting { font-size: 2rem; }
  .meet-grid { grid-template-columns: 1fr; }
}

/* ================= Performance ================= */
/* karta obchodníka */
a.oz-link { color: inherit; text-decoration: none; }
a.oz-link:hover { color: var(--primary); text-decoration: underline; }
.oz-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.oz-name { font-size: 2rem; margin: 6px 0 4px; color: var(--primary); }
.oz-meta { color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.oz-period { text-align: right; }
.oz-period select { margin-bottom: 4px; }
.oz-plan { margin-bottom: 14px; }
.oz-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.oz-kpis .kpi-value { font-size: 1.45rem; }
.oz-cmp { margin-top: 4px; }
.oz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 14px; margin-top: 14px; }
/* nováčci a odchody */
.ramp-table .ramp-cell { line-height: 1.2; }
.ramp-cell.rc-ok { background: #e8f5ec; }
.ramp-cell.rc-warn { background: #fff4db; }
.ramp-cell.rc-bad { background: #fde8e7; }
.ramp-cell.rc-run { background: repeating-linear-gradient(135deg, #f6f7f9, #f6f7f9 6px, #eef0f4 6px, #eef0f4 12px); }
.ramp-typical td { background: #f6f7f9; color: var(--muted); font-size: .82rem; }
.flow-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.flow-tiles { display: grid; gap: 12px; }
@media (max-width: 1100px) { .flow-grid { grid-template-columns: 1fr; } }
/* domů – můj plán a bonus (OZ) */
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; margin: 18px 0; }
.home-card .kpi-label { font-size: .87rem; }
.home-big { font-size: 1.1rem; margin-top: 6px; }
.home-big b { font-size: 1.9rem; color: var(--primary); }
.home-pct { font-size: 1.3rem; font-weight: 700; margin-left: 8px; }
.home-bands { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.home-bands span { font-size: .78rem; padding: 2px 9px; border-radius: 10px; background: #eee; color: var(--muted); }
.home-bands span.reached { background: var(--green-soft); color: var(--accent-dark); font-weight: 600; }
.home-grid-team { grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); align-items: start; }
@media (max-width: 1000px) { .home-grid-team { grid-template-columns: minmax(0, 1fr); } }
/* TOP 5 OZ firmy na Domů */
.top5-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.top5-me { background: var(--green-soft); border-radius: 6px; margin: 0 -8px; padding: 7px 8px; }
.top5-who { flex: 1; min-width: 0; }
.top5-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top5-you { font-size: .72rem; font-weight: 600; background: #c0dd97; color: #27500a; border-radius: 8px; padding: 0 6px; margin-left: 4px; }
.top5-bar { height: 6px; border-radius: 3px; background: var(--primary); margin-top: 4px; min-width: 4px; }
.top5-bar.dim { opacity: .45; }
.top5-n { font-size: 1.35rem; font-weight: 700; color: var(--primary); min-width: 34px; text-align: right; }
.home-team-table { margin: 12px 0 8px; }
.home-team-table .pbar { margin: 0; }
/* kvalita dat */
.qc-list { display: grid; gap: 10px; }
.qc summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; }
.qc summary::-webkit-details-marker { display: none; }
.qc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.qc-high .qc-dot { background: var(--red); }
.qc-medium .qc-dot { background: #eda100; }
.qc-low .qc-dot { background: #7d8697; }
.qc-ok .qc-dot { background: #43a047; }
.qc-ok { opacity: .75; }
.qc-count { margin-left: auto; font-weight: 700; }
.qc-ok .qc-count { font-weight: 400; color: var(--accent-dark); }
.qc-level { font-size: .75rem; color: var(--muted); min-width: 110px; text-align: right; }
/* týdenní report */
.report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.report-title { font-size: 1.9rem; margin: 4px 0; color: var(--primary); }
.report-sub { color: var(--muted); }
.report-kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.report-kpis .kpi-value { font-size: 1.35rem; }
.report-block { margin-bottom: 14px; }
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-alerts { margin: 6px 0 0; padding-left: 18px; line-height: 1.6; }
@media (max-width: 1100px) { .report-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .report-grid { grid-template-columns: 1fr; } }
/* denní report */
.daily-kpis { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.daily-kpis .kpi-value { font-size: 1.35rem; }
@media (max-width: 1300px) { .daily-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .daily-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.daily-pick input { padding: 6px 8px; }
.daily-table tr.daily-team td { background: #f4f5f8; border-top: 1px solid var(--border); }
.daily-table td.daily-oz { padding-left: 26px; }
.flag { display: inline-block; min-width: 26px; padding: 1px 7px; border-radius: 10px; text-align: center; font-weight: 600; }
.flag.ok { background: #e6f4e6; color: #006300; }
.flag.bad { background: #fbe9e9; color: #b42323; }
@media print { .flag { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.report-team-row td { background: #f4f6fa; padding-top: 8px; }
/* denní report: „v práci“ a volno */
.day-in { display: inline-flex; vertical-align: middle; margin-right: 6px; cursor: pointer; }
.day-in input { width: 15px; height: 15px; margin: 0; cursor: pointer; accent-color: var(--primary); }
.daily-table tr.row-dayoff td, .daily-table tr.row-dayoff a, .week-table tr.row-dayoff td, .week-table tr.row-dayoff a { color: var(--muted); }
.tag.idle { background: #eef0f3; color: var(--muted); }
@media print { .daily-table tr.row-dayoff, .week-table tr.row-dayoff { display: none; } }
@media print { .report-team-row td { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.daily-scope { margin-bottom: 14px; }
.teams-msg { margin-top: 10px; font-size: .9rem; }
.teams-msg p { margin: 0 0 8px; }
.teams-msg table { border-collapse: collapse; font-size: .82rem; }
.teams-msg table + p { margin-top: 10px; }
.teams-msg th, .teams-msg td { border: 1px solid var(--border); padding: 3px 8px; text-align: left; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; }
  .appbar, .impersonation, .footer, .no-print, .flash { display: none !important; }
  .container { max-width: none; padding: 0; }
  .card { box-shadow: none; break-inside: avoid; }
  .report-kpis { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .daily-kpis { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  a { color: inherit; text-decoration: none; }
}
/* plnění plánu */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.section-head .section-title { margin-bottom: 14px; }
.plan-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.plan-tile .kpi-value { font-weight: 700; }
.plan-tile .pbar { margin: 10px 0 8px; }
.pbar { position: relative; height: 10px; border-radius: 5px; background: #e8ecf5; overflow: visible; }
.pbar-fill { height: 100%; border-radius: 5px; background: #2a78d6; }
.pbar-fill.over { background: #1baf7a; }
.pbar-mark { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: var(--text); border-radius: 1px; opacity: .55; }
.pstat { display: inline-block; padding: 1px 9px; border-radius: 10px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.pstat-ok { background: var(--green-soft); color: var(--accent-dark); }
.pstat-warn { background: #fff3d6; color: #9a6a00; }
.pstat-bad { background: var(--red-soft); color: #b3261e; }
.pstat-none { background: #eee; color: var(--muted); }
.tag.new { background: #e7f0ff; color: #2a5bd7; }
.goals-save { position: sticky; bottom: 0; padding: 12px 0; background: linear-gradient(transparent, var(--bg) 30%); }
/* přeložené a zrušené schůzky */
.out-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(0, 2.4fr); gap: 14px; align-items: stretch; }
.out-tile .kpi-value { font-weight: 700; }
.out-types .chart-title { margin: 0 0 6px; }
table.data.compact th, table.data.compact td { padding: 5px 8px; }
.out-table tr.out-co td { background: #dfe7f5; color: var(--primary); }
.out-table td.out-rate { font-weight: 600; }
.empty-state { padding: 22px 24px; line-height: 1.6; }
@media (max-width: 1300px) { .out-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .out-types { grid-column: 1 / -1; } }
.conv-tiles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.2fr); gap: 14px; }
.kpi-value.big { font-size: 2.6rem; font-weight: 700; color: var(--primary); }
.conv-spark { margin-top: auto; padding-top: 10px; }
.conv-spark svg { width: 100%; height: auto; max-height: 90px; }
.conv-chart { padding: 16px 18px; }
.lg i.lg-stroke { width: 16px; height: 3px; border-radius: 2px; }
.perf-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.perf-title { font-size: 2.1rem; font-weight: 700; color: var(--primary); line-height: 1.1; margin-bottom: 4px; }
.asof { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 4px 12px; font-size: .85rem; color: var(--muted); }
/* období + navigace sekcí zůstávají přilepené pod horní lištou */
.perf-sticky { position: sticky; top: 61px; z-index: 10; background: var(--bg); margin: 0 -20px 18px; padding: 10px 20px 0; border-bottom: 1px solid var(--border); transition: box-shadow .15s; }
.perf-sticky.stuck { box-shadow: 0 6px 12px -8px rgba(0, 0, 0, .18); }
.perf-sticky.solo { padding-bottom: 10px; }
.perf-filter { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.sticky-range { margin-left: auto; white-space: nowrap; }
.co-filter { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; padding-left: 6px; border-left: 1px solid var(--border); }
.co-chip { position: relative; cursor: pointer; }
.co-chip input { position: absolute; opacity: 0; pointer-events: none; }
.co-chip span { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: #fff; border-radius: 16px; padding: 5px 12px 5px 10px; font-size: .82rem; font-weight: 600; color: var(--muted); }
.co-chip span::before { content: ''; width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid #b5b3ab; background: #fff; }
.co-chip input:checked + span { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.co-chip input:checked + span::before { background: var(--primary); border-color: var(--primary); box-shadow: inset 0 0 0 2px #fff; }
.co-chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.co-chip small { font-weight: 400; color: var(--muted); }
.co-tag { display: inline-block; padding: 0 7px; border-radius: 9px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; vertical-align: middle; line-height: 1.6; white-space: nowrap; }
.co-tag:not(.co-none) { background: #e8ecf5; color: #04256c; }
.co-none { background: #f0efec; color: #6b7280; font-weight: 600; }
body.perf-loading main { opacity: .55; transition: opacity .15s; }
.perf-nav { display: flex; gap: 4px; flex-wrap: wrap; padding: 6px 0 8px; margin-left: -10px; }
.perf-nav a { text-decoration: none; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; padding: 5px 10px; border-radius: 4px; color: var(--primary); }
.perf-nav a:hover { background: var(--primary-soft); }
section[id] { scroll-margin-top: 175px; }
.defs { margin: 10px 0 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; min-width: 0; }
.kpi-label { font-size: .78rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }
.kpi-value { font-size: 1.75rem; font-weight: 600; color: var(--text); line-height: 1.15; }
.kpi-note { font-size: .78rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.kpi-foot { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kpi-spark { margin-top: auto; padding-top: 6px; }
.kpi.hero { grid-column: span 2; grid-row: span 2; background: linear-gradient(160deg, #ffffff 55%, #eef3fb); }
.hero-value { font-size: 3.4rem; font-weight: 700; color: var(--primary); line-height: 1.05; letter-spacing: -.01em; }
.hero-value .unit { font-size: 1.4rem; font-weight: 600; margin-left: 8px; color: var(--muted); }
.hero-sub { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0 6px; }
.hero-sub > div { display: flex; flex-direction: column; background: #fff; border: 1px solid #eceef3; border-radius: 6px; padding: 8px 10px; }
.hero-sub b { font-size: 1.15rem; }
.hero-spark { margin-top: auto; display: flex; align-items: flex-end; gap: 10px; }
.unit-s { font-size: 1rem; color: var(--muted); font-weight: 400; }

.delta { display: inline-flex; align-items: center; font-size: .8rem; font-weight: 700; padding: 1px 8px; border-radius: 10px; white-space: nowrap; }
.delta.up { background: #e6f4e6; color: #006300; }
.delta.down { background: #fbe9e9; color: #b42323; }
.delta.flat { background: #eee; color: var(--muted); }

.pace { margin-top: 16px; }
.pace-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.pace h3 { font-size: 1.15rem; margin-bottom: 2px; }
.wd-meter { width: 260px; height: 10px; border-radius: 5px; background: #cde2fb; overflow: hidden; margin-top: 8px; }
.wd-fill { height: 100%; background: #2a78d6; border-radius: 0 4px 4px 0; }
.pace-rows { display: flex; flex-direction: column; gap: 12px; }
.pace-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 340px; gap: 16px; align-items: center; }
.pace-label { font-weight: 600; }
.pace-bar { position: relative; height: 20px; }
.pb-proj, .pb-act { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; }
.pb-proj { background: #b7d3f6; }
.pb-act { background: #2a78d6; }
.pb-prev { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--text); }
.pace-nums { display: flex; gap: 16px; font-size: .9rem; flex-wrap: wrap; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--muted); margin: 6px 0 12px; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.lg i.lg-line { width: 2px; height: 14px; background: var(--text); border-radius: 0; }

.perf-teams th.sortable { cursor: pointer; user-select: none; }
.perf-teams th.sortable:hover { color: var(--primary); }
.perf-teams th.sorted-desc::after { content: ' ▼'; }
.perf-teams th.sorted-asc::after { content: ' ▲'; }
.perf-teams th.measure-arrow::after { content: ' ▼'; }
/* žebříček: sloupec vybrané záložky jemně zeleně */
#leaderboard td.lb-active { background: #f3f9ea; }
#leaderboard th.lb-active { background: #e8f3d6; color: var(--accent-dark); }
/* zamčené šířky sloupců (performance.js) – delší text se zkrátí, celý je v tooltipu / po rozšíření okna */
table.data.cols-locked { table-layout: fixed; }
table.data.cols-locked td.nowrap { overflow: hidden; text-overflow: ellipsis; }
table.data td.loc { overflow: hidden; text-overflow: ellipsis; }
table.data.measuring td.loc { font-size: 0; min-width: 120px; }
.perf-teams tbody.grp { border-bottom: 1px solid var(--border); }
.team-row { cursor: pointer; }
.team-row .caret { display: inline-block; transition: transform .15s; color: var(--muted); }
.team-row[aria-expanded=true] .caret { transform: rotate(90deg); }
.team-row[aria-expanded=true] td { background: #f3f6fc; }
.member-row td { background: #fcfcfb; font-size: .84rem; }
.member-name { padding-left: 34px !important; }
td.heat { font-weight: 600; }
.rank { display: inline-grid; place-items: center; min-width: 24px; height: 24px; border-radius: 12px; background: #eceef3; font-size: .78rem; font-weight: 700; }
.rank.r1 { background: #f6d77a; } .rank.r2 { background: #dcdde2; } .rank.r3 { background: #e8b88f; }
.spark { display: block; }

.alerts { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.alert-card { border-left-width: 4px; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; }
.alert-card.lvl-critical { border-left-color: #d03b3b; }
.alert-card.lvl-serious { border-left-color: #ec835a; }
.alert-card.lvl-warning { border-left-color: #fab219; }
.alert-title { font-weight: 700; font-size: 1.02rem; }
.people { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.people .chip { max-width: none; }
details.more { width: 100%; }
details.more summary { cursor: pointer; color: var(--primary); font-size: .85rem; margin: 4px 0; }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text); }
.status i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-style: normal; font-size: .75rem; color: #fff; }
.status.sm { font-size: .7rem; } .status.sm i { width: 15px; height: 15px; font-size: .65rem; }
.s-critical i { background: #d03b3b; } .s-serious i { background: #ec835a; } .s-warning i { background: #fab219; color: var(--text); } .s-good i { background: #0ca30c; }

.funnels { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.funnel { padding: 16px 18px; }
.funnel-company { border-color: #9ec5f4; }
.fc-title { font-weight: 700; margin-bottom: 10px; }
.frow { display: grid; grid-template-columns: 90px minmax(0, 1fr) 118px; align-items: center; gap: 8px; margin-bottom: 6px; font-size: .85rem; }
.ftrack { height: 18px; background: #f4f4f2; border-radius: 0 4px 4px 0; }
.ffill { height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.ffill.f1 { background: #86b6ef; } .ffill.f2 { background: #3987e5; } .ffill.f3 { background: #1c5cab; }
.fv { text-align: right; white-space: nowrap; }
.fnote { font-size: .85rem; color: var(--muted); margin-top: 8px; border-top: 1px solid #eee; padding-top: 8px; }
.fnote b { color: var(--text); font-size: 1rem; }

table.heatmap td.heat { min-width: 110px; }
table.heatmap .cell-sub { font-size: .72rem; font-weight: 400; opacity: .85; }
table.heatmap td.nodata { color: var(--muted); background: #f4f4f2; }
tr.company-row td { font-weight: 700; }
.stack { display: flex; gap: 2px; height: 22px; border-radius: 0 4px 4px 0; overflow: hidden; }
.stack .seg { display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; min-width: 3px; white-space: nowrap; overflow: hidden; }
.stack .seg-end { border-radius: 0 4px 4px 0; }
.stack .seg:hover, .stack .seg:focus { filter: brightness(1.08); outline: none; }
.empty-stack { color: var(--muted); font-size: .8rem; }

.hl-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.hl-chips .spacer { flex: 1; }
.chipbtn { border: 1px solid var(--border); background: #fff; border-radius: 16px; padding: 4px 12px; font: inherit; font-size: .82rem; cursor: pointer; color: var(--text); }
.chipbtn:hover { border-color: var(--primary); }
.chipbtn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.chart-wrap svg, svg.chart { width: 100%; height: auto; display: block; }
svg.chart .tick { font-size: 11px; fill: #898781; }
svg.chart .vlabel { font-size: 11px; fill: #52514e; font-weight: 700; }
svg.chart .axis-title { font-size: 11px; fill: #52514e; }
svg.chart .quad { font-size: 12px; fill: #898781; font-weight: 600; }
svg.chart .hit:hover, svg.chart .hit:focus { fill: rgba(42, 120, 214, .07); outline: none; }
svg.chart .hitcol .xh, svg.chart .hitcol .xd { opacity: 0; }
svg.chart .hitcol:hover .xh, svg.chart .hitcol:hover .xd, svg.chart .hitcol:focus .xh, svg.chart .hitcol:focus .xd { opacity: 1; }
svg.chart .hitcol:focus { outline: none; }
svg.scatter .dot { cursor: default; outline: none; }
svg.scatter .dot:hover .mk, svg.scatter .dot:focus .mk { r: 7; }
svg.scatter .dot.dim .mk { fill: #c9c8c1; }
details.tview { margin-top: 10px; }
details.tview summary { cursor: pointer; color: var(--primary); font-size: .85rem; font-weight: 600; }
details.tview table { margin-top: 8px; }

.bonus-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.band { padding: 16px 18px; border-top: 4px solid #2a78d6; }
.band-zero { border-top-color: #c3c2b7; }
.band-total { border-top-color: var(--primary); background: #f3f6fc; }
.sub-h { font-size: 1.05rem; margin: 6px 0 10px; }
.meter { height: 10px; border-radius: 5px; background: #cde2fb; overflow: hidden; margin-bottom: 2px; }
.meter-fill { height: 100%; background: #2a78d6; border-radius: 0 4px 4px 0; }

.ibar { position: relative; height: 22px; display: flex; align-items: center; }
.ibar-fill { position: absolute; left: 0; top: 3px; bottom: 3px; background: #cde2fb; border-radius: 0 4px 4px 0; }
.ibar span { position: relative; padding-left: 6px; font-weight: 600; white-space: nowrap; }
table.leaderboard td { vertical-align: middle; }
table.leaderboard .lb-rank { width: 36px; padding-right: 0; text-align: left; }
table.leaderboard tr.lb-low td, table.leaderboard tr.lb-low a, table.leaderboard tr.lb-low .ibar span { color: var(--muted); }
table.leaderboard tr.lb-low .ibar-fill { opacity: .45; }
table.leaderboard tr.lb-first-low td { border-top: 1px dashed #c9ced8; }
.rank.none { background: transparent; color: var(--muted); }
.lb-note { margin: 10px 0 0; }

.mix-rows { display: flex; flex-direction: column; gap: 8px; }
.mix-row { display: grid; grid-template-columns: 170px minmax(0, 1fr) 110px; gap: 12px; align-items: center; }
.mix-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mix-total { border-top: 1px solid var(--border); padding-top: 8px; }
.mix-n { text-align: right; }

.trend-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chart-title { font-size: 1.02rem; }

.viz-tip { position: fixed; z-index: 100; display: none; pointer-events: none; background: #fff; border: 1px solid rgba(11,11,11,.12); box-shadow: 0 6px 18px rgba(0,0,0,.12); border-radius: 6px; padding: 6px 10px; max-width: 320px; }
.viz-tip strong { display: block; font-size: .95rem; color: var(--text); }
.viz-tip span { display: block; font-size: .78rem; color: #52514e; }

@media (max-width: 900px) {
  .perf-sticky { position: static; margin: 0 0 18px; padding: 0; }
  section[id] { scroll-margin-top: 80px; }
  .sticky-range { margin-left: 0; }
}
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .conv-chart { grid-column: span 2; }
  .bonus-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pace-row { grid-template-columns: 1fr; gap: 6px; }
  .trend-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .kpi-grid, .conv-tiles { grid-template-columns: 1fr; }
  .kpi.hero, .conv-chart { grid-column: auto; }
  .hero-value { font-size: 2.4rem; }
  .hero-sub { grid-template-columns: 1fr; }
  .mix-row { grid-template-columns: 1fr; }

}

/* ---------- firmy ---------- */
.co-form { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.co-form select { padding: 4px 8px; font-size: .85rem; }
.co-group { margin-bottom: 12px; padding: 14px 18px; }
.co-group-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.co-group details summary { cursor: pointer; color: var(--primary); font-weight: 600; margin: 4px 0; }
.co-group details table { margin-top: 8px; }

/* ---------- souhrnný přehled objednávek a schůzek ---------- */
.stats-table { font-variant-numeric: tabular-nums; }
.stats-table th, .stats-table td { padding: 6px 6px; }
table.data.stats-table thead th { letter-spacing: .01em; }
table.data.stats-table thead th .th-sort { gap: 4px; }
.stats-table thead tr.group th { font-size: .74rem; letter-spacing: .06em; padding-top: 9px; padding-bottom: 7px; }
.stats-table thead th.stick { vertical-align: bottom; font-size: .72rem; }
/* skupiny sloupců (Výkony, Schůzky, OMNI, DTB, Vlastní) oddělené tenkou svislou čarou jako v původní verzi */
.stats-table .gs { border-left: 1px solid #e1e4ea; padding-left: 10px; }
.stats-table thead tr.group th { border-bottom: 1px solid #eceef2; }
.stats-table .stick { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 190px; box-shadow: inset -1px 0 0 #e1e4ea; }
.stats-table thead .stick { background: #fafafa; }
.stats-table td.strong { font-weight: 600; }
.stats-table .zero { color: #cfcdc6; }
.stats-table td.feas { white-space: nowrap; }
/* firma */
/* součet za firmu – nejvýraznější řádek (firma → tým → OZ); další firma začíná silnější čarou */
.stats-table tr.co-row td { background: #dfe7f5; font-weight: 700; color: var(--primary); border-bottom: 1px solid #cdd9ee; padding-top: 9px; padding-bottom: 9px; }
.stats-table tr.co-row td.stick { background: #dfe7f5; }
.stats-table tr.co-row .co-tag { font-size: .78rem; padding: 2px 10px; margin-right: 4px; }
.stats-table tr.co-row .co-meta { font-weight: 400; font-size: .8rem; color: var(--muted); margin-left: 4px; }
.stats-table tbody.st-grp + tbody.st-company tr.co-row td { border-top: 2px solid #b9c8e3; }
/* tým */
.stats-table tbody.st-grp { border-top: 1px solid #dfe5f0; }
.stats-table tr.st-team td { background: #eef3fb; font-weight: 700; border-bottom: 1px solid #dfe5f0; cursor: pointer; }
.stats-table tr.st-team td.stick { background: #eef3fb; color: var(--primary); }
.stats-table tr.st-team:hover td { background: #e6edf8; }
.stats-table tr.st-team .caret { display: inline-block; width: 12px; color: var(--muted); transition: transform .15s; }
.stats-table tbody.collapsed tr.st-team .caret { transform: rotate(-90deg); }
.stats-table tbody.collapsed tr.st-row { display: none; }
/* OZ */
.stats-table td.st-name { padding-left: 32px; }
.stats-table tr.st-row:hover td { background: #f7f9fd; }
.stats-table tfoot td { background: #f3f4f6; }
.stats-table tfoot td.stick { background: #f3f4f6; }

/* ---------- rozvoj ASM (úkoly, rozvojový plán, HR) ---------- */
a.chipbtn { text-decoration: none; display: inline-block; }
.btn.danger { color: var(--red); }
form.inline { display: inline; margin: 0; }
.late { color: #b3261e; font-weight: 600; }
.tag.hot { background: var(--red-soft); color: #b3261e; }
.coach-av { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.coach-av.lg { width: 54px; height: 54px; font-size: 1.15rem; }
.coach-who { display: flex; align-items: center; gap: 12px; }
.coach-name { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.coach-h1 { margin: 2px 0 2px; font-size: 1.7rem; color: var(--primary); }
.coach-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.coach-actions { gap: 4px; flex-wrap: wrap; }
.coach-switch { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.coach-switch .chipbtn.active, .hl-chips a.chipbtn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.coach-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.coach-tabs a { padding: 10px 14px; text-decoration: none; text-transform: uppercase; font-size: .8rem; font-weight: 600; letter-spacing: .03em; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.coach-tabs a:hover { color: var(--primary); }
.coach-tabs a.active { color: var(--primary); border-bottom-color: var(--primary); }
.coach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; margin-bottom: 18px; }
.coach-card { text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 14px; transition: border-color .15s, box-shadow .15s; }
.coach-card:hover { border-color: var(--primary); box-shadow: 0 4px 14px -8px rgba(4, 37, 108, .35); }
.coach-plan .pbar { margin: 4px 0; }
.coach-facts { display: grid; grid-template-columns: 120px 1fr; gap: 5px 10px; margin: 0; font-size: .9rem; }
.coach-facts dt { color: var(--muted); }
.coach-facts dd { margin: 0; }
.coach-cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.coach-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1000px) { .coach-cols { grid-template-columns: minmax(0, 1fr); } }
.coach-block { margin-bottom: 14px; }
.coach-li { display: flex; gap: 10px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid #f0f0f0; flex-wrap: wrap; }
.coach-li:last-child { border-bottom: 0; }
.coach-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.coach-kpis .kpi-value { font-size: 1.35rem; }
.coach-kpis .pbar { margin: 6px 0 2px; height: 6px; }
.coach-kpis.compact { margin-bottom: 0; }
.coach-kpis.compact .kpi { padding: 4px 0; }
.coach-hist { display: grid; grid-template-columns: 110px 1fr 50px 110px; gap: 10px; align-items: center; padding: 4px 0; }
.pbar.thin { height: 6px; }
.coach-score { font-size: 1.9rem; font-weight: 700; color: var(--primary); line-height: 1; }
.coach-facts2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.coach-facts2 > div { display: flex; flex-direction: column; gap: 2px; }
.ctag { display: inline-block; padding: 0 7px; border-radius: 8px; font-size: .72rem; font-weight: 600; background: #eef0f4; color: #4b5563; }
.ctag-perf { background: #e7f0ff; color: #1d4fb8; }
.ctag-hr, .ctag-people { background: #fdf0e3; color: #9a5a12; }
.ctag-dev, .ctag-personal { background: #efe9fb; color: #5b3fa8; }
.ctag-ops, .ctag-quality { background: #eef0f4; color: #4b5563; }
.ctag-hire { background: #e6f4ee; color: #1f6f4a; }
/* úkoly */
.ctask { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid #f0f0f0; }
.ctask:last-child { border-bottom: 0; }
.ctask-main { flex: 1; min-width: 0; }
.ctask-title { font-weight: 600; }
.ctask-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 2px; align-items: center; }
.ctask-detail { font-size: .85rem; color: var(--text); white-space: pre-wrap; margin-top: 3px; }
.ctask.is-closed .ctask-title { color: var(--muted); }
.ctask-actions { display: flex; align-items: center; gap: 6px; flex: none; align-self: center; }
.ctask > .cst { align-self: center; margin-top: 0; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--primary); }
.btn-outline:hover { background: var(--primary-soft); border-color: var(--primary); filter: none; }
.icon-btn-box { width: 36px; height: 36px; border: 1px solid transparent; }
.icon-btn-box:hover { border-color: var(--border); }
span.cst-open { opacity: .45; cursor: default; }
a.cst-btn { background: #fff; cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s; }
a.cst-btn:hover { border-color: var(--accent-dark); background: var(--green-soft); }
a.cst-btn:hover::after { content: '✓'; color: var(--accent-dark); font-size: .75rem; }
.cgoal-actions { gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.cst { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #b5b3ab; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex: none; margin-top: 1px; color: #fff; }
.cst-done { background: var(--accent-dark); border-color: var(--accent-dark); }
.cst-failed { background: #d32f2f; border-color: #d32f2f; }
.cresult { font-size: .87rem; border-radius: 6px; padding: 6px 9px; margin-top: 6px; white-space: pre-wrap; }
.cresult-done { background: var(--green-soft); color: #2f5a00; }
.cresult-failed { background: var(--red-soft); color: #8f1d1d; }
.ok-txt { color: var(--accent-dark); font-weight: 600; }
.cgoal-done, .cgoal-failed { background: #fcfcfb; }
.outcome { display: flex; gap: 10px; margin-top: 6px; }
.outcome-opt { position: relative; cursor: pointer; }
.outcome-opt input { position: absolute; opacity: 0; }
.outcome-opt span { display: inline-block; padding: 9px 18px; border: 2px solid var(--border); border-radius: 8px; font-size: .95rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text); background: #fff; }
.outcome-opt.ok input:checked + span { border-color: var(--accent-dark); background: var(--green-soft); color: #2f5a00; }
.outcome-opt.bad input:checked + span { border-color: #d32f2f; background: var(--red-soft); color: #8f1d1d; }
.outcome-opt input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.ctask.is-late .ctask-title { color: #b3261e; }
/* rozvojový plán */
.cgoal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.cgoal { display: flex; flex-direction: column; gap: 6px; }
.cgoal-title { font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.cgoal-detail { margin: 4px 0 0; font-size: .9rem; white-space: pre-wrap; }
.cgoal-pct { font-size: 1.2rem; color: var(--primary); }
.cgoal-foot { display: flex; gap: 12px; flex-wrap: wrap; }
.cgoal-note { font-size: .85rem; background: #f7f7f5; border-radius: 6px; padding: 6px 9px; white-space: pre-wrap; }
.cgoal-mini { padding: 6px 0; }
.cgoal-mini .pbar { margin-top: 4px; }
.gstat { display: inline-block; padding: 0 7px; border-radius: 8px; font-size: .72rem; font-weight: 600; background: #eee; color: var(--muted); }
.gstat-active { background: #fff4d6; color: #8a5a00; }
.gstat-done { background: var(--green-soft); color: var(--accent-dark); }
/* musí být až za .gstat – jinak by ho obecné pravidlo přebarvilo na šedou */
.gstat-failed { background: #fbe1e1; color: #c62828; }
/* formuláře rozvoje */
.cfull, .cta { width: 100%; resize: vertical; font: inherit; font-size: .95rem; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text); padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; }
.of-grid textarea.cta { height: auto; overflow-y: auto; }
/* HR */
.chr { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f0f0f0; align-items: flex-start; }
.chr:last-child { border-bottom: 0; }
.chr-date { width: 84px; flex: none; color: var(--muted); font-size: .85rem; padding-top: 2px; }
.chr-main { flex: 1; min-width: 0; }
.chr .ico { width: 13px; height: 13px; fill: currentColor; vertical-align: -2px; }

/* ---------- Rozvoj ASM: 121 ---------- */
.wk-headline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.wk-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.wk-card .kpi-value { margin: 4px 0 6px; }
.wk-card .pbar { margin-bottom: 6px; }
.wk-card.is-empty { opacity: .6; }
.wk-card-text { font-weight: 600; margin: 6px 0; white-space: pre-line; }
.wk-notes { margin-top: 12px; }
.wk-notes-text { white-space: pre-line; margin-top: 4px; }
.wk-hist td { vertical-align: top; }
.wk-hist .wk-cell-custom { max-width: 280px; }
.wk-hist .gstat { margin-right: 4px; }
.wk-sub td { padding-top: 0; border-top: 0; font-size: .88rem; }
.wk-sub summary { cursor: pointer; color: var(--primary); font-size: .82rem; }
.wk-sub details > div { margin: 6px 0 4px; }
.wk-mini { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: baseline; margin: 8px 0; }
.wk-mini .pbar { grid-column: 1 / -1; }
.wk-mini-l { font-size: .9rem; }
.wk-mini-v { font-weight: 600; text-align: right; max-width: 260px; }
.f121-waiting { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.f121-wait-item { display: inline-flex; gap: 8px; align-items: center; }
/* formulář 121 */
.f121-top .field { max-width: 200px; }
.f121-sec { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.f121-sec.is-off .f121-period, .f121-sec.is-off table, .f121-sec.is-off .field, .f121-sec.is-off p { opacity: .4; }
.f121-h { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin: 0 0 10px; }
.f121-num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: .8rem; flex: none; }
.f121-toggle { margin-left: auto; font-size: .85rem; font-weight: 400; }
.f121-period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.f121-period input[type=date] { width: 150px; }
.f121-plabel { font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.f121-presets { display: inline-flex; gap: 4px; }
.f121-period .err { flex-basis: 100%; }
.f121-eval { width: 100%; border-collapse: collapse; }
.f121-eval th, .f121-eval td { text-align: left; padding: 8px 10px 8px 0; border-bottom: 1px solid var(--border); vertical-align: middle; }
.f121-eval thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.f121-eval tbody th { font-weight: 600; width: 150px; }
.f121-inline input { width: 90px; }
.f121-custom-goal { font-weight: 600; margin-bottom: 6px; }
.f121-custom-eval { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.f121-custom-eval .outcome { margin-top: 0; }
.f121-custom-eval input[type=text] { flex: 1; min-width: 200px; }
.f121-goals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.f121-goals .f121-wide { grid-column: 1 / -1; }
.f121-hint { display: block; margin-top: 4px; font-size: .78rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); }
.f121-facts { display: flex; gap: 24px; }
/* domovská stránka ASM: cíle z 121 a úkoly */
.home-grid-asm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 16px 0; }
.home-task { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.home-task:last-of-type { border-bottom: 0; }
.home-task-main { flex: 1; min-width: 0; }
.home-task-title { font-weight: 600; }
@media (max-width: 900px) {
  .wk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f121-goals, .home-grid-asm { grid-template-columns: 1fr; }
}

/* ---------- skupiny slev ---------- */
.dgroups { max-width: 520px; margin-bottom: 18px; }
.dgroups-head { display: flex; flex-direction: column; margin-bottom: 6px; }
.dgroups-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.dgroups-table td { padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.dgroups-table tr:last-child td { border-bottom: 0; }
.dgroups-table td.num { text-align: right; white-space: nowrap; width: 1%; }
.dgroups .btn { margin-top: 6px; padding-left: 0; }
.disc-empty { padding: 8px 10px; font-size: .85rem; color: var(--muted); }

/* ---------- doporučení (Schůzky) ---------- */
.ref-box { display: flex; align-items: center; gap: 14px; margin: 12px 0 6px; padding: 12px 14px; border: 2px solid #f0b429;
  background: #fff8e1; border-radius: 8px; }
.ref-box .ref-title { font-weight: 700; color: #7a4f00; }
.ref-box .ref-help { font-size: .85rem; color: #7a4f00; }
.ref-box .ref-text { flex: 1; }
.ref-box input { width: 84px; height: 46px; font-size: 1.5rem; text-align: center; font-weight: 700; flex: none; }
.ref-box input:placeholder-shown { background: #fff; }
.ref-box.has-err { border-color: var(--red); }
.ref-box.has-err .err { color: var(--red); font-size: .8rem; }
.ref-box.is-off { border-color: var(--border); background: #f6f6f6; }
.ref-box.is-off .ref-title, .ref-box.is-off .ref-help { color: var(--muted); }
.cal .mini-ref { color: #8a5a00; font-weight: 600; }
.cal .mini-miss { color: var(--red); font-weight: 600; }
.ref-remind { margin: 6px 0 14px; padding: 10px 14px; border-radius: 8px; background: #fff8e1; border: 1px solid #f0b429; color: #7a4f00; }
.ref-remind a { color: #7a4f00; font-weight: 700; }
