/* ANKER Logistics Workspace – barvy z loga ANKER: modrá vln #00AEEF, černá kotvy #231F20 */
:root {
  --brand: #00AEEF;
  --primary: #0077B6;
  --primary-dark: #005F92;
  --primary-soft: #E5F5FC;
  --primary-softer: #F2FAFE;
  --ink: #231F20;
  --text: #1C2226;
  --muted: #5F6B73;
  --faint: #8A959C;
  --line: #E3E8EB;
  --line-strong: #CFD7DC;
  --bg: #F4F7F9;
  --card: #FFFFFF;
  --warn: #B7791F;
  --warn-soft: #FFF6E0;
  --warn-line: #F1D58A;
  --danger: #C0392B;
  --danger-soft: #FDEDEB;
  --ok: #1E8E5A;
  --ok-soft: #E6F5EE;
  --violet: #6B4FBB;
  --violet-soft: #EFEBFA;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .04), 0 2px 8px rgba(16, 24, 32, .04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
  /* šipka s kotvou – klikací bod je přesně ve špičce šipky */
  cursor: url("cursor-arrow.png") 1 1, default;
  cursor: -webkit-image-set(url("cursor-arrow.png") 1x, url("cursor-arrow@2x.png") 2x) 1 1, default;
  cursor: image-set(url("cursor-arrow.png") 1x, url("cursor-arrow@2x.png") 2x) 1 1, default;
}
a, button, select, label[for], .clickable, summary, input[type=checkbox], input[type=radio], tr.row-link, .tab, .chip, .kp-opt, .dp-day {
  cursor: url("cursor-arrow-click.png") 1 1, pointer;
  cursor: -webkit-image-set(url("cursor-arrow-click.png") 1x, url("cursor-arrow-click@2x.png") 2x) 1 1, pointer;
  cursor: image-set(url("cursor-arrow-click.png") 1x, url("cursor-arrow-click@2x.png") 2x) 1 1, pointer;
}
button:disabled { cursor: not-allowed; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input:not([type]), textarea { cursor: text; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; color: var(--text); }
h1 { font-size: 26px; letter-spacing: -.02em; }
h2 { font-size: 18px; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* ---------- rozložení ---------- */
.topbar {
  height: 64px; background: var(--ink); color: #fff; display: flex; align-items: center;
  padding: 0 24px; gap: 28px; position: sticky; top: 0; z-index: 30; border-bottom: 3px solid var(--brand);
}
.topnav { display: flex; align-items: center; gap: 4px; height: 100%; min-width: 0; }
.topnav .nav-item { display: flex; align-items: center; gap: 9px; height: 42px; padding: 0 14px; border-radius: 10px; color: #D5DDE1; font-size: 15px; white-space: nowrap; }
.topnav .nav-item:hover { background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none; }
.topnav .nav-item.active { background: rgba(0, 174, 239, .18); color: #fff; font-weight: 600; box-shadow: inset 0 -2px 0 var(--brand); }
.topnav .nav-item svg { width: 18px; height: 18px; flex: none; }
.topnav .nav-item[data-nav=settings] { margin-left: 8px; }
.topbar .logo { display: flex; align-items: center; height: 46px; padding: 0 2px; }
.topbar .logo img { height: 40px; width: auto; display: block; }
.topbar .ws { letter-spacing: .18em; font-size: 12px; color: #C9D3D8; text-transform: uppercase; }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 12px; text-align: right; }
.topbar .user .name { font-weight: 600; }
.topbar .user .role { font-size: 12px; color: #AAB6BC; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: #3A3536; color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.dot-online { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px rgba(0, 174, 239, .25); }
.icon-btn { background: transparent; border: 0; color: #C9D3D8; padding: 8px; border-radius: 8px; display: grid; place-items: center; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.shell { display: block; min-height: calc(100vh - 67px); }
.main { padding: 26px 40px 60px; min-width: 0; }

/* ---------- prvky ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text); font: inherit; font-weight: 500; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--primary-softer); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 15px; font-weight: 600; }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn svg { width: 16px; height: 16px; flex: none; }
.copy-icon { border: 0; background: transparent; color: var(--faint); padding: 6px; border-radius: 6px; display: grid; place-items: center; }
.copy-icon:hover { color: var(--primary); background: var(--primary-soft); }
.copy-icon svg { width: 17px; height: 17px; }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input:not([type]), select, textarea {
  font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line-strong); border-radius: 9px;
  height: 40px; padding: 0 12px; width: 100%; outline: none;
}
textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 119, 182, .14); }
select { padding-right: 30px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235F6B73' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; }
label.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.cap { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span4 { grid-column: 1 / -1; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: #fff; font: inherit; font-weight: 500; color: var(--text); }
.chip:hover { border-color: var(--primary); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.sm { height: 32px; padding: 0 12px; font-size: 13px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.card-title { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; font-weight: 700; color: #3D4A51; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.pill.warn, .pill.rozpracovano { background: var(--warn-soft); color: #8A5A00; border: 1px solid var(--warn-line); }
.pill.potvrzeno { background: var(--violet-soft); color: var(--violet); }
.pill.v_preprave { background: var(--ok-soft); color: var(--ok); }
.pill.dokonceno { background: var(--primary-soft); color: var(--primary-dark); }
.pill.storno { background: #EEF0F1; color: var(--muted); }
.pill.archiv { background: #EEF0F1; color: var(--muted); }
.sdot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; }
.sdot.rozpracovano { background: #E0A100; } .sdot.potvrzeno { background: #E59A1A; } .sdot.v_preprave { background: #2BAE66; } .sdot.dokonceno { background: var(--brand); }
.status-select { border-radius: 999px; height: 34px; font-weight: 600; padding: 0 30px 0 14px; width: auto; font-size: 14px; }
.status-select.rozpracovano { background-color: var(--warn-soft); border-color: var(--warn-line); color: #8A5A00; }
.status-select.potvrzeno { background-color: var(--violet-soft); border-color: #D7CEF2; color: var(--violet); }
.status-select.v_preprave { background-color: var(--ok-soft); border-color: #BFE5D1; color: var(--ok); }
.status-select.dokonceno { background-color: var(--primary-soft); border-color: #B7E3F7; color: var(--primary-dark); }

.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab { padding: 12px 16px; color: var(--muted); font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; align-items: center; gap: 8px; background: none; border-top: 0; border-left: 0; border-right: 0; font-family: inherit; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.on { color: var(--text); font-weight: 600; border-bottom-color: var(--primary); }
.tab .count { background: #EDF1F3; color: var(--muted); border-radius: 999px; font-size: 12px; padding: 1px 8px; font-weight: 600; }
.tab.on .count { background: var(--primary-soft); color: var(--primary-dark); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: #ECF0F2; border-radius: 10px; padding: 4px; }
.seg button { border: 0; background: transparent; height: 34px; border-radius: 8px; font: inherit; color: var(--muted); font-weight: 600; }
.seg button.on { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.search { position: relative; }
.search input { height: 44px; padding-left: 40px; font-size: 15px; }
.search svg { position: absolute; left: 13px; top: 13px; width: 18px; height: 18px; color: var(--faint); }

/* ---------- tabulky ---------- */
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow); }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 13px 12px; border-bottom: 1px solid var(--line); background: #FAFBFC; position: sticky; top: 0; z-index: 1; white-space: nowrap; }
table.list td { padding: 13px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.row-link:hover td { background: var(--primary-softer); }
table.list tr.sel td { background: var(--primary-softer); }
.ref { color: var(--primary); font-weight: 700; font-size: 15.5px; white-space: nowrap; }
.sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sub.accent { color: var(--primary); font-weight: 600; }
.lbl { font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); font-weight: 600; }
.cell-strong { font-weight: 600; }
.ellipsis { max-width: 210px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 50px 20px; text-align: center; color: var(--muted); }
.empty .anchor-big { width: 52px; height: 52px; color: var(--brand); margin-bottom: 8px; }

/* ---------- detail ---------- */
.back { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; margin: -6px 0 4px -10px; padding: 7px 12px 7px 10px; border-radius: 8px; }
.back:hover { color: var(--text); text-decoration: none; background: rgba(0, 119, 182, .08); }
.detail-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.detail-title { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.detail-title h1 { font-size: 30px; }
.missing { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; color: var(--muted); }
.missing .pill { font-weight: 500; }
.detail-body { margin: 0 -40px; padding: 24px 40px; background: var(--bg); }
.detail-top { margin: -26px -40px 0; padding: 26px 40px 0; background: #fff; border-bottom: 1px solid var(--line); }
.kv { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.kv:first-of-type { border-top: 0; }
.kv .k { font-size: 13px; color: var(--muted); }
.kv .v { font-weight: 600; font-size: 15.5px; margin-top: 2px; word-break: break-word; }
.kv .v.empty-v { color: var(--faint); font-weight: 400; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.big-name { font-size: 19px; font-weight: 700; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }

.timeline { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: relative; margin: 12px 0 6px; }
.tl-stop { text-align: center; position: relative; padding: 0 6px; }
.tl-stop::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 3px; background: var(--line); z-index: 0; }
.tl-stop:first-child::before { display: none; }
.tl-stop.done::before, .tl-stop.current::before { background: var(--primary); }
.tl-node { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; margin: 0 auto 10px; position: relative; z-index: 1; display: grid; place-items: center; }
.tl-stop.done .tl-node { background: var(--primary); border-color: var(--primary); color: #fff; }
.tl-stop.current .tl-node { border: 7px solid var(--primary); }
.tl-node svg { width: 15px; height: 15px; }
.tl-place { font-weight: 700; font-size: 15.5px; }
.tl-role { color: var(--muted); font-size: 13px; margin-top: 3px; }
.tl-date { margin-top: 6px; font-size: 14.5px; font-weight: 600; }
.tl-rel { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.tl-rel.ok { color: var(--ok); font-weight: 600; }
.tl-rel.soon { color: var(--warn); font-weight: 600; }
.tl-rel.late { color: var(--danger); font-weight: 600; }
.dates3 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 18px; }
.dates3 .v { font-weight: 700; font-size: 16px; margin-top: 4px; }

.progress { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; display: flex; margin: 8px 0 12px; }
.progress span { display: block; height: 100%; }
.legend { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14.5px; }
.legend b { margin: 0 4px 0 6px; }

.note-box { white-space: pre-wrap; line-height: 1.55; font-size: 15px; }

/* formuláře v záložkách */
.form-card { display: flex; flex-direction: column; gap: 18px; }
.form-section-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: #3D4A51; margin-bottom: -4px; }
.savebar { position: fixed; left: 0; right: 0; bottom: 0; background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(16, 24, 32, .08); padding: 14px 40px; display: flex; gap: 12px; align-items: center; justify-content: flex-end; z-index: 40; backdrop-filter: blur(4px); }
.detail-body { padding-bottom: 96px; }
.savebar .info { margin-right: auto; color: var(--warn); font-weight: 600; }
.stop-block { padding: 12px 0; border-top: 1px solid var(--line); }
.stop-block:first-child { border-top: 0; }
.stop-row { display: grid; grid-template-columns: 26px 1.8fr 1fr 160px 90px auto; gap: 10px; align-items: center; }
.stop-extra { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 10px; margin: 8px 0 0 36px; }
.stop-extra input { height: 36px; font-size: 13.5px; background: #FAFBFC; }
.stop-num { width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); font-weight: 700; display: grid; place-items: center; font-size: 12.5px; }

/* kontejnery */
.summary-bar { display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; font-size: 15px; }
.summary-bar .muted { margin-right: 4px; }
.ctable td { padding: 6px 10px !important; }
.ctable input, .ctable select { height: 34px; border-color: transparent; background-color: transparent; }
.ctable input:hover, .ctable select:hover { border-color: var(--line-strong); }
.ctable input:focus, .ctable select:focus { background-color: #fff; }
.ctable .num { font-family: var(--mono); font-size: 14.5px; letter-spacing: .03em; }
.badge-bad { color: var(--danger); font-size: 12px; font-weight: 600; }
.badge-ok { color: var(--ok); font-size: 12px; }
.footnote { padding: 12px 16px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); background: #FAFBFC; }

/* dokumenty */
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 26px; text-align: center; background: #fff; color: var(--muted); transition: .15s; }
.dropzone.over { border-color: var(--primary); background: var(--primary-softer); color: var(--primary-dark); }
.dropzone b { color: var(--text); font-size: 16px; display: block; margin-bottom: 4px; }
.doc-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; padding: 14px 18px; border-top: 1px solid var(--line); }
.doc-item:first-child { border-top: 0; }
.doc-ico { width: 40px; height: 40px; border-radius: 10px; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-weight: 700; font-size: 11px; }
.doc-ico.mail { background: #FFF1E0; color: #A55A00; }
.doc-name { font-weight: 600; word-break: break-all; }
.doc-children { margin: 8px 0 0; display: flex; gap: 8px; flex-wrap: wrap; }
.mail-body { white-space: pre-wrap; background: #FAFBFC; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 10px; max-height: 320px; overflow: auto; font-size: 13.5px; line-height: 1.5; }

/* doplnění z dokumentu */
.banner { display: flex; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 10px; font-size: 15px; }
.banner.ok { background: var(--primary-soft); color: #0B4B6B; }
.banner.warn { background: var(--warn-soft); color: #7A4F00; border: 1px solid var(--warn-line); }
.banner svg { width: 20px; height: 20px; flex: none; }
.extract-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.docview { background: #EEF2F4; border-radius: 10px; padding: 18px; max-height: 760px; overflow: auto; }
.docpaper { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 26px 28px; font-family: var(--mono); font-size: 12.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; color: #39434A; }
.hl { background: var(--primary-soft); border: 1px solid #9FD8F2; border-radius: 5px; padding: 1px 4px; color: var(--text); }
.hl.diff { background: var(--warn-soft); border-color: var(--warn-line); }
.hl i { font-style: normal; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 10px; font-weight: 700; margin-right: 4px; font-family: var(--font); vertical-align: 1px; }
.hl.diff i { background: var(--warn); }
.sug { display: grid; grid-template-columns: 24px 26px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line); }
.sug:first-child { border-top: 0; }
.sug .n { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.sug .val { font-weight: 600; font-size: 16px; }
.sug .src { color: var(--muted); font-size: 13px; }
input[type=checkbox], input[type=radio] { width: 20px; height: 20px; accent-color: var(--primary); margin: 0; }
.diffbox { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: 12px; padding: 16px 18px; margin-top: 8px; }
.diffbox label { display: flex; gap: 10px; align-items: center; padding: 8px 0; font-size: 15px; }
.diffbox .n { background: var(--warn); }
.cont-row { display: grid; grid-template-columns: 24px 1fr auto; gap: 14px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.cont-row.bad { background: var(--danger-soft); margin: 0 -24px; padding: 13px 24px; }
.cont-row .num { font-family: var(--mono); font-size: 15px; letter-spacing: .05em; }
.extract-foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin: 16px -24px -22px; padding: 16px 24px; }

/* modal */
.overlay { position: fixed; inset: 0; background: rgba(28, 34, 38, .55); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .12s; }
.modal { background: #fff; border-radius: 16px; width: min(760px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal.wide { width: min(980px, 100%); }
.modal-head { padding: 22px 28px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; }
.modal-head h2 { font-size: 22px; }
.modal-body { padding: 22px 28px; overflow: auto; display: flex; flex-direction: column; gap: 18px; }
.modal-foot { padding: 16px 28px; border-top: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.modal-foot .left { margin-right: auto; }
.info-box { background: var(--primary-soft); color: #0B4B6B; border-radius: 10px; padding: 12px 16px; line-height: 1.5; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .14); min-width: 250px; padding: 6px; z-index: 50; }
.menu button { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 10px 12px; border-radius: 8px; font: inherit; color: var(--text); }
.menu button:hover { background: var(--primary-softer); }
.menu button.danger { color: var(--danger); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }

.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .12); z-index: 20; max-height: 260px; overflow: auto; padding: 4px; }
.ac-list div { padding: 9px 12px; border-radius: 7px; }
.ac-list div:hover, .ac-list div.on { background: var(--primary-softer); }
.ac-list .new { color: var(--primary); font-weight: 600; }

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); font-weight: 500; display: flex; gap: 10px; align-items: center; animation: fade .15s; }
.toast.err { background: var(--danger); }
.toast svg { width: 18px; height: 18px; color: var(--brand); }

/* přihlášení */
.login-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(180deg, var(--ink) 0 38%, var(--bg) 38%); padding: 20px; }
.login-card { width: min(420px, 100%); background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .18); padding: 34px 34px 28px; display: flex; flex-direction: column; gap: 16px; }
.login-card .logo { display: flex; justify-content: center; margin-bottom: 4px; }
.login-card .logo img { height: 74px; }
.login-card h1 { font-size: 22px; text-align: center; }
.login-card p { margin: 0; color: var(--muted); text-align: center; line-height: 1.5; }
.err-msg { color: var(--danger); font-weight: 500; min-height: 18px; }

/* načítání s kotvou */
.loading { display: flex; justify-content: center; padding: 60px; }
.loading svg { width: 38px; height: 38px; color: var(--brand); animation: sway 1.1s ease-in-out infinite; transform-origin: 50% 10%; }
@keyframes sway { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }

/* přehled pro zákazníka */
.rep-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 18px; box-shadow: var(--shadow); }
.rep-bar select.rep-cust { width: 240px; max-width: 100%; }
.rep-bar .seg { grid-auto-columns: auto; }
.rep-bar .seg button { padding: 0 12px; }
.rep-range { display: flex; align-items: center; gap: 8px; }
.rep-range input { width: 132px; }
.report-sheet { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 26px 28px 20px; box-shadow: var(--shadow); width: fit-content; min-width: min(760px, 100%); max-width: 100%; }
.report-sheet header { display: flex; justify-content: space-between; align-items: center; border-bottom: 3px solid var(--brand); padding-bottom: 14px; margin-bottom: 16px; }
.report-sheet header img { height: 46px; }
.report-sheet h2 { font-size: 20px; margin-bottom: 3px; }
.rep-scroll { overflow-x: auto; }
.report-sheet table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.35; }
.report-sheet td.wrap { min-width: 110px; max-width: 260px; }
.report-sheet td.route { min-width: 170px; }
.report-sheet td.place { min-width: 170px; }
.report-sheet td.place .faint { font-size: 12px; line-height: 1.3; }
.report-sheet td.place > div + div { margin-top: 6px; }
.report-sheet td.place b.pl { font-weight: 600; }
.report-sheet .cn { display: inline-block; }
.report-sheet th { text-align: left; background: #F1F8FC; color: #0B4B6B; padding: 8px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; border-bottom: 1px solid #CDE6F3; vertical-align: bottom; }
.report-sheet td { padding: 8px 8px; border-bottom: 1px solid #EDF1F3; vertical-align: top; }
.report-sheet tbody tr:nth-child(even) td { background: #FAFCFD; }
.report-sheet td.nowrap { white-space: nowrap; }
.report-sheet td.num { text-align: right; }
.report-sheet td .pill { font-size: 11.5px; padding: 2px 9px; }
.report-sheet .cn { font-family: var(--mono); font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.report-sheet footer { margin-top: 24px; color: var(--muted); font-size: 11.5px; display: flex; justify-content: space-between; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.hist-item { display: grid; grid-template-columns: 150px 170px 1fr; gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.hist-item:first-child { border-top: 0; }
.hist-item del { color: var(--faint); }

@media (max-width: 1200px) {
  .cards3 { grid-template-columns: 1fr 1fr; }
  .extract-grid, .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .main { padding: 18px 16px 60px; }
  .savebar { left: 0; padding: 12px 16px; }
  .detail-top, .detail-body { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
  .cards3, .cards2, .grid2, .grid3, .grid4, .dates3 { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .topbar .ws, .topbar .user .role { display: none; }
  .timeline { grid-auto-flow: row; text-align: left; }
  .stop-row { grid-template-columns: 26px 1fr; }
  .stop-extra { grid-template-columns: 1fr; margin-left: 0; }
}

@media print {
  body { background: #fff; cursor: auto; }
  .topbar, .no-print, .toast-wrap { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  .report-sheet { border: 0; box-shadow: none; padding: 0; }
  .report-sheet table { font-size: 10.5px; }
  .report-sheet th { font-size: 9px; padding: 5px 6px; }
  .report-sheet td { padding: 5px 6px; }
  .report-sheet tbody tr:nth-child(even) td { background: #F6F9FA; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rep-scroll { overflow: visible; }
  @page { size: A4 landscape; margin: 12mm; }
}
.login-card .btn, .modal-foot .btn { justify-content: center; }

.stop-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.stop-contact { background: var(--primary-softer); border-radius: 10px; padding: 12px 14px; line-height: 1.45; }

.fin-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fin-table td { padding: 6px 10px; }
.fin-table input, .fin-table select { height: 36px; }
.fin-total { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.fin-sum { font-size: 22px; font-weight: 700; min-width: 180px; text-align: right; }

.view-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 14px; }
.view-bar select { height: 34px; }
.ve-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 24px; }
.ve-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; border-radius: 8px; }
.ve-row:not(.off) { background: var(--primary-softer); }
.ve-row.off { color: var(--muted); }

.cr-row { display: grid; grid-template-columns: 120px 1fr 2fr 32px; gap: 8px; align-items: center; margin-bottom: 6px; }
.cr-row input { height: 34px; font-size: 13px; }

.facts { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 2px 0 16px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.fact { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.fact .k { color: var(--muted); font-size: 13px; }
.fact .copy-icon { padding: 3px; }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cards4 .card { padding: 18px 20px; }
.big-num { font-size: 28px; font-weight: 700; margin: -4px 0 8px; }
.doc-mini { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: center; font-size: 13px; margin-top: 6px; min-width: 0; }
@media (max-width: 1200px) { .cards4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .cards4 { grid-template-columns: 1fr; } }

.step-card { gap: 16px; }
.step-head { display: flex; gap: 14px; align-items: flex-start; }
.step-n { width: 30px; height: 30px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; }
.step-title { font-size: 17px; font-weight: 700; margin-bottom: 2px; }

/* průvodce novou zásilkou */
.wz-head { align-items: flex-start; }
.wz-steps { display: flex; align-items: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.wz-step { display: inline-flex; align-items: center; gap: 7px; background: none; border: 0; padding: 4px 6px; border-radius: 8px; font: inherit; font-size: 13px; color: var(--muted, #6B7780); cursor: inherit; white-space: nowrap; }
.wz-step:disabled { opacity: .5; }
.wz-step:not(:disabled):hover { background: var(--brand-soft, #EAF6FC); }
.wz-step .wz-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: #E6ECEF; color: #4A5860; }
.wz-step.done .wz-n { background: #CDE6F3; color: var(--primary); }
.wz-step.on { color: var(--ink); font-weight: 700; }
.wz-step.on .wz-n { background: var(--primary); color: #fff; }
.wz-line { width: 14px; height: 2px; background: #DCE4E8; border-radius: 2px; }
.wz-title { font-size: 18px; font-weight: 700; margin-bottom: 2px; }
#wz-body { min-height: 380px; }
.wz-place { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #FAFCFD; }
.wz-place-title { font-weight: 700; color: var(--primary); margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 32px; }
.wz-place-title .faint { font-weight: 400; }
.wz-saved { width: auto; max-width: 62%; font-weight: 600; font-size: 13px; padding: 5px 28px 5px 10px; border-color: var(--primary); color: var(--primary); background-color: var(--primary-softer); }
.wz-save-addr { gap: 8px; margin: 2px 0 14px; font-size: 14px; color: var(--muted); align-items: flex-start; }
.wz-save-addr input { width: auto; margin-top: 3px; }
.wz-sum { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.wz-sum-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.wz-sum-head b { flex: 1; }
.wz-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #CBD5DA; display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.wz-dot.ok { background: var(--primary); border-color: var(--primary); color: #fff; }
.wz-sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 14px; }
.wz-sum-row > span:last-child { text-align: right; }

@media (max-width: 1180px) { .topbar .user .role { display: none; } .topnav .nav-item { padding: 0 11px; } }
@media (max-width: 1040px) { .topnav .nav-item span { display: none; } }

/* nástroje přehledu a filtry ve sloupcích (jako v Excelu) */
.list-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.seg-sm { flex: none; }
.seg-sm button { padding: 0 16px; white-space: nowrap; }
.seg-sm button .faint { font-weight: 500; margin-left: 4px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; min-height: 4px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--primary-dark); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; }
.fchip button { border: 0; background: transparent; color: inherit; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.fchip button:hover { background: rgba(0, 0, 0, .08); }
table.list th.th-f { user-select: none; }
table.list th.th-f:hover { background: #F0F5F8; color: var(--text); }
table.list th.f-on { color: var(--primary-dark); background: var(--primary-softer); }
.th-in { display: inline-flex; align-items: center; gap: 6px; }
.th-btn { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; color: #9AA7AE; }
th.th-f:hover .th-btn { background: #fff; color: var(--text); box-shadow: 0 0 0 1px var(--line); }
th.f-on .th-btn { background: var(--primary); color: #fff; }
.th-sort { color: var(--primary); font-size: 13px; }
.colmenu { position: absolute; z-index: 60; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 40px rgba(16, 24, 32, .18); padding: 8px; display: flex; flex-direction: column; gap: 2px; text-transform: none; letter-spacing: 0; }
.cm-title { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 6px 8px 4px; }
.cm-act { border: 0; background: transparent; text-align: left; font: inherit; font-size: 14px; padding: 7px 8px; border-radius: 8px; color: var(--text); }
.cm-act:hover { background: var(--primary-softer); }
.cm-sep { height: 1px; background: var(--line); margin: 4px 0; }
.cm-q { margin: 4px 0; height: 34px; }
.cm-list { max-height: 260px; overflow: auto; }
.cm-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.cm-row:hover { background: #F4F7F9; }
.cm-row[hidden] { display: none; }
.cm-row input { width: 16px; height: 16px; flex: none; }
.cm-foot { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.dir-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; letter-spacing: .02em; }
.dir-tag.import { background: #E3F4FC; color: #0B6E9C; }
.dir-tag.export { background: #FFF1E0; color: #A55A00; }

table.list th.th-f { padding-left: 10px; padding-right: 8px; }
#ltable table.list td { padding-left: 10px; padding-right: 10px; }
.th-in { gap: 4px; }

/* v2.0 – termíny v trase, automatický stav, úpravy z přehledu */
.stop-headrow { display: grid; grid-template-columns: 26px 1.8fr 1fr 170px 100px 86px; gap: 10px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.stop-row { grid-template-columns: 26px 1.8fr 1fr 170px 100px 86px; }
.stop-date { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); margin-top: -16px; }
.stop-date input { height: 38px; }
.stop-done { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--muted); }
.stop-done input { width: 17px; height: 17px; }
.stop-block.is-done .stop-num { background: var(--ok); color: #fff; }
.stop-block.is-done .stop-num svg { width: 14px; height: 14px; }
.stop-block.is-done .stop-done { color: var(--ok); font-weight: 600; }
.txt-danger { color: var(--danger); font-weight: 600; }
.txt-warn { color: var(--warn); font-weight: 600; }
.status-auto { font-size: 13px; padding: 5px 12px; cursor: help; }
.edit-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.edit-head h2 { margin: 0; font-size: 20px; }
.wz-legs { display: grid; grid-template-columns: 170px 1.4fr 1fr; gap: 4px 14px; align-items: end; }
.wz-legs .lbl { font-weight: 600; padding-bottom: 12px; font-size: 14px; }
@media (max-width: 860px) { .stop-headrow { display: none; } .stop-date { margin-top: 0; } .wz-legs { grid-template-columns: 1fr; } }
.viewmenu .cm-act.on { background: var(--primary-softer); color: var(--primary-dark); font-weight: 600; }
.viewmenu .cm-act.danger { color: var(--danger); }
#lview-btn b { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wz-legs .lbl { text-transform: none; letter-spacing: 0; color: var(--text); font-size: 14px; align-self: end; padding-bottom: 12px; }
.wz-legs .lbl .hint { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }

/* sdílené seznamy */
.kpick { position: absolute; z-index: 150; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 34px rgba(16, 24, 32, .16); max-height: 300px; overflow: auto; padding: 4px; max-width: 520px; }
.kp-head { font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 6px 10px 4px; }
.kp-opt { padding: 8px 10px; border-radius: 7px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kp-opt[data-i]:hover, .kp-opt.on { background: var(--primary-softer); }
.kp-opt.add { color: var(--primary); font-weight: 600; border-top: 1px solid var(--line); margin-top: 2px; }
input.nil { border-color: var(--warn-line) !important; background: var(--warn-soft) !important; }
.lists-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tab .count.warn { background: var(--warn-soft); color: var(--warn); margin-left: 4px; }
.ls-table td { padding: 10px 12px; }
.un-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.un-row:first-child { border-top: 0; }
.dash-empty { display: flex; gap: 10px; align-items: center; color: var(--ok); padding: 8px 0; }
.dash-empty svg { width: 20px; height: 20px; }
@media (max-width: 1100px) { .lists-grid { grid-template-columns: 1fr; } }

/* v2.6 – ARES/VIES, HS kódy, Incoterms */
.txt-ok { color: var(--ok); font-weight: 600; }
.parity { display: grid; grid-template-columns: 92px 1fr; gap: 6px; }
.parity select { padding-left: 10px; }
.hs-hint { font-size: 11.5px; color: var(--muted); margin-top: 3px; line-height: 1.3; max-height: 2.6em; overflow: hidden; }
.hs-hint:empty { display: none; }

/* český kalendář */
input.dp-input { padding-right: 34px !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235F6B73' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M3 10h18M8 3v4M16 3v4'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 11px center !important; }
.dp-pop { position: absolute; z-index: 160; width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 40px rgba(16, 24, 32, .18); padding: 12px; user-select: none; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head b { font-size: 15px; text-transform: capitalize; }
.dp-nav { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 8px; font-size: 20px; line-height: 1; color: var(--text); }
.dp-nav:hover { background: var(--primary-softer); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.dp-day { height: 34px; border: 0; background: transparent; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); }
.dp-day:hover { background: var(--primary-soft); }
.dp-day.we { color: #8A5A44; }
.dp-day.out { color: #B8C2C8; }
.dp-day.today { box-shadow: inset 0 0 0 1.5px var(--brand); font-weight: 700; }
.dp-day.sel { background: var(--primary); color: #fff; font-weight: 700; }
.dp-time { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-time span { color: var(--muted); font-size: 13px; }
.dp-time input { width: 80px; height: 34px; text-align: center; }
.dp-foot { display: flex; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }

/* v2.8 přepínač Aktivní / Archiv / Stornované v záhlaví přehledu */
.lstate { display: inline-flex; background: #ECF0F2; border-radius: 11px; padding: 4px; gap: 2px; }
.lstate button { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; font: inherit; font-weight: 600; color: var(--muted); }
.lstate button svg { width: 17px; height: 17px; opacity: .8; }
.lstate button .n { font-size: 12px; font-weight: 600; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: rgba(0,0,0,.06); color: var(--muted); text-align: center; }
.lstate button:hover:not(.on) { color: var(--ink); background: rgba(255,255,255,.55); }
.lstate button.on { background: #fff; color: var(--primary-dark); box-shadow: 0 1px 3px rgba(0,0,0,.09); }
.lstate button.on .n { background: var(--primary-soft); color: var(--primary-dark); }
.lstate button.archive.on { color: #5A4A1E; } .lstate button.archive.on .n { background: #F5EDD6; color: #6B5414; }
.lstate button.cancelled.on { color: #8B2E2E; } .lstate button.cancelled.on .n { background: #F8E3E3; color: #8B2E2E; }
.ltag { display: inline-block; vertical-align: middle; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 8px; background: #EEF0F1; color: var(--muted); margin-left: 6px; position: relative; top: -3px; }
@media (max-width: 900px) { .lstate button span:not(.n) { display: none; } }

/* v2.11 avizace vyclení */
.av-body .field input.av-empty, .av-body .field textarea.av-empty, .av-kt input.av-empty { background: #FFF8E6; border-color: #F0D58C; }
.av-kt { margin-top: 4px; }
.av-kt td, .av-kt th { padding: 6px 8px; }
.av-kt input { height: 34px; }
.av-docs { display: flex; flex-direction: column; gap: 6px; }
.av-doc { gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
.av-doc:hover { background: #FAFBFC; }

/* v2.12 balení: počet + typ */
.pkg { display: flex; gap: 6px; align-items: center; min-width: 0; }
.pkg .pkg-n { width: 86px; flex: none; text-align: right; }
.pkg .pkg-u { flex: 1 1 120px; min-width: 110px; }
.pkg .pkg-o { flex: 1 1 110px; min-width: 90px; }
.ctable .pkg .pkg-n { width: 70px; } .ctable .pkg .pkg-u { min-width: 110px; flex: none; width: 118px; } .ctable .pkg .pkg-o { width: 100px; flex: none; }
.av-kt .pkg .pkg-n { width: 70px; } .av-kt .pkg .pkg-u { width: 112px; flex: none; }
input.av-empty + .pkg input, input.av-empty + .pkg select { background: #FFF8E6; border-color: #F0D58C; }

/* v2.13 odesílatelé */
.party-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin-bottom: 14px; background: #FCFDFD; }
.party-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.party-n { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.ex-party { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; margin-bottom: 18px; }
.ex-party select { width: auto; min-width: 280px; }
.av-pt td, .av-pt th { padding: 6px 8px; font-size: 13px; }
td.right { text-align: right; }
.modal-body > .rep-scroll { flex-shrink: 0; }
.av-pt td { white-space: nowrap; } .av-pt td:first-child, .av-pt td:nth-child(9) { white-space: normal; min-width: 150px; }

/* v2.14 pojistné hlášenky */
.ins-need { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #F4F6F7; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.ins-need.on { background: var(--warn-soft); color: #6B4A00; border: 1px solid var(--warn-line); }
.ins-need svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.in-missing { margin-bottom: 18px; border-color: var(--warn-line); }
.in-missing .card-title { display: flex; align-items: center; gap: 8px; } .in-missing .card-title svg { width: 18px; height: 18px; }
.in-table tr.in-month td { background: #F1F8FC; color: #0B4B6B; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 7px 12px; }
.dc-drop { display: block; border: 2px dashed var(--line-strong); border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: url("cursor-arrow-click.png") 1 1, pointer; background: #FAFCFD; }
.dc-drop:hover, .dc-drop.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.dc-drop svg { width: 18px; height: 18px; vertical-align: -4px; margin-right: 4px; }
.pt-items td { padding: 4px 6px 4px 0; } .pt-items td:last-child { width: 32px; }

/* v2.16 poptávka */
.iq-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.iq-form .card { margin-bottom: 16px; }
.iq-row { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; } .iq-row .seg { grid-auto-columns: auto; } .iq-row .seg button { padding: 0 14px; }
.iq-lab { width: 72px; color: var(--muted); font-size: 13px; font-weight: 600; }
.iq-prev { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow: auto; }
.iq-subj { padding: 10px 12px; background: #F4F6F7; border-radius: 8px; margin-bottom: 14px; font-size: 13.5px; }
.iq-body { font-size: 13px; line-height: 1.5; }
.iq-body p { margin: 0 0 10px; }
@media (max-width: 1100px) { .iq-grid { grid-template-columns: 1fr; } .iq-prev { position: static; max-height: none; } }
.iq-ag { display: flex; flex-direction: column; gap: 6px; }
.iq-ac { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; }
.iq-ac.on { border-color: var(--primary); background: var(--primary-soft); }
.iq-ac input { margin-top: 3px; }
.iq-each { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; padding: 12px; background: #F7F9FA; border-radius: 10px; }
.ag-card { margin-bottom: 16px; }

/* v2.18 dokumenty jako ve Finderu */
.docs-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.doc-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-checks .dc { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 9px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--muted); }
.doc-checks .dc i { width: 15px; height: 15px; border-radius: 50%; border: 1.6px dashed #B8C2C8; }
.doc-checks .dc.ok { color: #0E6B3A; border-color: #BFE3CD; background: #F1FAF4; }
.doc-checks .dc svg { width: 16px; height: 16px; }
.docs-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.doc-filters { display: flex; flex-wrap: wrap; gap: 4px; background: #ECF0F2; padding: 4px; border-radius: 10px; }
.doc-filters button { border: 0; background: transparent; padding: 6px 12px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); }
.doc-filters button span { font-weight: 500; opacity: .7; margin-left: 2px; }
.doc-filters button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.dlist { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.drow { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 150px auto; align-items: center; gap: 14px; padding: 9px 14px; border-bottom: 1px solid #EEF1F3; outline: none; }
.drow:last-child { border-bottom: 0; }
.drow.kid { padding-left: 42px; background: #FBFCFC; }
.drow.sel { background: #EAF5FC; box-shadow: inset 3px 0 0 var(--primary); }
.dk { display: grid; place-items: center; width: 40px; height: 30px; border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .02em; background: #EEF1F3; color: #4A565E; border: 0; }
[data-kindbtn] { cursor: url("cursor-arrow-click.png") 1 1, pointer; } [data-kindbtn]:hover { outline: 2px solid var(--primary); }
.dk-bl, .dk-swb, .dk-awb, .dk-telex { background: #E3F0FB; color: #0B4B6B; } .dk-ci, .dk-pl, .dk-proforma { background: #EAF6EE; color: #17643A; }
.dk-pojisteni { background: #FFF3D6; color: #7A5300; } .dk-celni { background: #F1E9FB; color: #5B2E91; } .dk-email { background: #FDECEC; color: #9B2C2C; }
.dname { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dmeta { font-size: 12px; color: var(--faint, #8A959C); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtype { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dparty { font-size: 12px; padding: 3px 10px; border-radius: 999px; border: 1px dashed #B8C2C8; color: var(--muted); white-space: nowrap; cursor: url("cursor-arrow-click.png") 1 1, pointer; }
.dparty.on { border-style: solid; border-color: #BFE3CD; background: #F1FAF4; color: #17643A; }
.dact { display: flex; gap: 6px; align-items: center; opacity: 0; transition: opacity .12s; }
.drow.sel .dact, .drow:hover .dact, .drow:focus-within .dact { opacity: 1; }
.dact .copy-icon svg { width: 17px; height: 17px; }
.dhint { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
kbd { display: inline-block; min-width: 20px; padding: 1px 6px; border: 1px solid #CDD5DA; border-bottom-width: 2px; border-radius: 5px; background: #fff; font: 600 11.5px/1.5 var(--font, inherit); text-align: center; margin: 0 1px; }
.dz-over { display: none; }
.dz-on { position: relative; }
.dz-on .dz-over { display: flex; position: absolute; inset: -8px; z-index: 5; flex-direction: column; gap: 8px; align-items: center; justify-content: center; background: rgba(234,245,252,.92); border: 2px dashed var(--primary); border-radius: 14px; color: var(--primary-dark); font-size: 15px; }
.popmenu { position: absolute; z-index: 170; min-width: 200px; }
.popmenu button.on { font-weight: 700; }
.modal.pv-modal { width: min(1200px, 96vw); max-width: none; height: 92vh; display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.pv-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.pv-body { flex: 1; min-height: 0; background: #E9EDF0; }
.pv-body iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.pv-img { height: 100%; display: grid; place-items: center; padding: 16px; } .pv-img img { max-width: 100%; max-height: 100%; box-shadow: 0 4px 18px rgba(0,0,0,.15); background: #fff; }
.pv-mail { height: 100%; overflow: auto; background: #fff; padding: 20px 28px; }
.pv-mh { display: grid; gap: 4px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pv-mh span { display: inline-block; width: 70px; color: var(--muted); }
@media (max-width: 900px) { .drow { grid-template-columns: 44px minmax(0, 1fr) auto; } .drow .dtype, .drow .dparty { display: none; } }
/* akce u dokumentu: vždy celé vidět, přes pravý okraj řádku */
.drow { position: relative; grid-template-columns: 44px minmax(0, 1fr) auto 150px; }
.dact { position: absolute; right: 0; top: 0; bottom: 0; padding: 0 14px 0 40px; background: linear-gradient(to right, rgba(234,245,252,0), #EAF5FC 34px); }
.drow.kid .dact { background: linear-gradient(to right, rgba(234,245,252,0), #EAF5FC 34px); }
.copy-icon.danger:hover { color: #B42318; background: #FDECEC; }
.drow { grid-template-columns: 44px minmax(0, 1fr) auto 290px; }
.dend { position: relative; display: flex; justify-content: flex-end; align-items: center; height: 34px; }
.dact { position: absolute; inset: 0; padding: 0; background: none; justify-content: flex-end; opacity: 0; pointer-events: none; }
.drow.kid .dact { background: none; }
.drow.sel .dact, .drow:hover .dact, .drow:focus-within .dact { opacity: 1; pointer-events: auto; }
.drow.sel .dtype, .drow:hover .dtype { visibility: hidden; }
@media (max-width: 900px) { .drow { grid-template-columns: 44px minmax(0, 1fr) 260px; } .drow .dtype { display: none; } }
/* v2.20 typ dokumentu jako rozbalovací štítek, akce ve vlastním sloupci */
.drow { grid-template-columns: 44px minmax(0, 1fr) auto 170px 252px; }
.dtype-btn { justify-self: start; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: url("cursor-arrow-click.png") 1 1, pointer; }
.dtype-btn span { color: var(--muted); font-size: 10px; }
.dtype-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.drow .dtype { justify-self: start; padding-left: 11px; }
.dact { position: static; justify-content: flex-end; opacity: 0; pointer-events: none; padding: 0; background: none; }
.drow.sel .dtype { visibility: visible; }
.dt-list { display: flex; flex-direction: column; gap: 8px; }
.dt-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; }
@media (max-width: 1000px) { .drow { grid-template-columns: 44px minmax(0, 1fr) 150px 200px; } .drow .dparty { display: none; } }
/* v2.20 stání kontejneru */
.dwell { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #F1F3F4; color: var(--muted); border: 1px solid #E1E6E9; vertical-align: middle; }
.dwell svg { width: 13px; height: 13px; flex: none; }
.dwell.on { background: #FDECEC; color: #B42318; border-color: #F6C9C5; }
.dwell.on.long { background: #B42318; color: #fff; border-color: #B42318; }
.dwell b { font-weight: 700; margin-left: 2px; opacity: .85; }
.detail-title .dwell { margin-left: 4px; font-size: 13px; padding: 4px 11px; }
/* free time (demurrage / detention) */
.ftc { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #F1F3F4; color: var(--muted); border: 1px solid #E1E6E9; vertical-align: middle; }
.ftc svg { width: 13px; height: 13px; flex: none; }
.ftc b { font-weight: 700; margin-left: 2px; opacity: .85; }
.ftc.soon { background: var(--warn-soft); color: #8A5A00; border-color: var(--warn-line); }
.ftc.over { background: #B42318; color: #fff; border-color: #B42318; }
.ftc.paid { background: #FDECEC; color: #B42318; border-color: #F6C9C5; }
.ftc.ok { background: var(--ok-soft); color: var(--ok); border-color: #C8E8D8; }
.ftc.plan, .ftc.unk { background: #F6F7F8; border-style: dashed; }
.detail-title .ftc { margin-left: 4px; font-size: 13px; padding: 4px 11px; }
.ft-now { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; margin-bottom: 14px; border-radius: 10px; background: #F6F8F9; border: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.ft-now svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--muted); }
.dwell-btn { border: 0; background: none; padding: 0; cursor: url("cursor-arrow-click.png") 1 1, pointer; }
.dwell-btn:hover .dwell { box-shadow: 0 0 0 2px rgba(180,35,24,.18); }
.btn.ghost svg { width: 15px; height: 15px; }
/* v2.21 úklid: akce v dlouhých seznamech až po najetí */
td.row-act > * { opacity: 0; transition: opacity .12s; }
tr:hover td.row-act > *, tr:focus-within td.row-act > * { opacity: 1; }

/* ---- přehled zásilky jako papírové desky CONTAINER EXPORT – IMPORT */
.ov-switch { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.ov-switch .seg { width: 200px; }
.desky { --dk-ink: #1d1d1b; --dk-pen: #12306e; background: #79c98e; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 4px 4px;
  max-width: 900px; margin: 0 auto 30px; padding: 30px 36px 40px; border-radius: 6px; box-shadow: 0 10px 30px rgba(20, 60, 30, .18), inset 0 0 0 1px rgba(0,0,0,.06); color: var(--dk-ink); }
.dk-title { text-align: center; font-weight: 800; font-size: 25px; letter-spacing: .09em; margin: 0 0 18px; }
.dk-row { display: grid; gap: 14px 18px; margin-bottom: 14px; }
.dk-row.r1 { grid-template-columns: 1fr; }
.dk-row.top { grid-template-columns: 1.55fr 1fr; }
.dk-row.r3 { grid-template-columns: 1fr 1fr 1fr; }
.dk-row.tall .dk-box { min-height: 118px; }
.dk-stack { display: grid; gap: 14px; grid-template-rows: 1fr 1fr; }
.dk-box { border: 1.6px solid var(--dk-ink); padding: 7px 10px 8px; min-height: 76px; display: flex; flex-direction: column; gap: 2px; position: relative; }
.dk-box[data-go] { cursor: pointer; }
.dk-box[data-go]:hover { background: rgba(255, 255, 255, .22); }
.dk-l { font-size: 11.5px; color: #26322a; white-space: nowrap; }
.dk-v { display: block; font-size: 14px; font-weight: 600; color: var(--dk-pen); line-height: 1.35; overflow-wrap: anywhere; }
.dk-v.big { font-size: 16px; }
.dk-v.muted-v { font-weight: 500; font-size: 12.5px; color: #2f4a7a; }
.dk-v.pkg { margin-top: 2px; }
.dk-kv { display: flex; align-items: baseline; gap: 6px; }
.dk-kv .dk-v { display: inline; }
.dk-cust { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.dk-cust .dk-l { font-size: 14px; font-weight: 600; color: var(--dk-ink); }
.dk-sub { display: flex; gap: 10px; margin-bottom: 4px; }
.dk-sub .dk-v { display: inline; }
.dk-foot { margin-top: auto; padding-top: 6px; }
.dk-box.logo { align-items: stretch; justify-content: space-between; }
.dk-logo { display: flex; justify-content: center; padding: 4px 0; }
.dk-logo img { height: 66px; mix-blend-mode: multiply; }
.dk-dir { font-size: 11.5px; color: #26322a; text-align: right; }
.dk-mv { display: flex; align-items: center; gap: 14px; height: 100%; }
.dk-mv b { font-size: 16px; letter-spacing: .04em; }
.dk-box.conts { min-height: 120px; padding-bottom: 46px; }
.dk-conts { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 18px; margin-top: 2px; }
.dk-conts .dk-v b { font-weight: 700; }
.dk-strip { position: absolute; left: 14px; right: -1.6px; bottom: -1.6px; display: grid; grid-template-columns: 1fr 1fr; }
.dk-strip .dk-kv { border: 1.6px solid var(--dk-ink); padding: 5px 10px; background: #79c98e; min-height: 34px; }
.dk-strip .dk-kv + .dk-kv { border-left: 0; }
.dk-yn { display: inline-block; padding: 0 5px; margin: 0 2px; border: 1.6px solid transparent; border-radius: 50%; font-weight: 700; }
.dk-yn.on { border-color: var(--dk-pen); color: var(--dk-pen); }
.dk-box.note { min-height: 120px; }
.dk-note { white-space: pre-wrap; font-size: 14px; font-weight: 600; color: var(--dk-pen); }
@media (max-width: 760px) { .dk-row.r3, .dk-row.top { grid-template-columns: 1fr; } }
@media print {
  body.print-desky * { visibility: hidden; }
  body.print-desky .desky, body.print-desky .desky * { visibility: visible; }
  body.print-desky .desky { position: absolute; left: 0; top: 0; width: 100%; max-width: none; margin: 0; box-shadow: none; background: #fff; -webkit-print-color-adjust: exact; }
  body.print-desky .dk-strip .dk-kv { background: #fff; }
}

/* v2.24 horní lišta: evidence vlevo, nová přeprava a nastavení vpravo */
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; padding-right: 6px; border-right: 1px solid rgba(255,255,255,.14); margin-right: 4px; }
.top-actions + .user { margin-left: 8px; }
.top-actions .top-new { height: 38px; }
.top-actions .nav-item.icon-btn { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: #D5DDE1; }
.top-actions .nav-item.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.top-actions .nav-item.icon-btn.active { background: rgba(0, 174, 239, .18); color: #fff; box-shadow: inset 0 -2px 0 var(--brand); }
.top-actions .nav-item.icon-btn svg { width: 20px; height: 20px; }
@media (max-width: 1120px) { .top-actions .top-new span { display: none; } .top-actions .top-new { width: 40px; justify-content: center; padding: 0; } }
@media (max-width: 1250px) { .topbar .user > div:first-child { display: none; } .topbar .user { gap: 8px; } }

/* v2.24 Nastavení: boční menu + jedna sekce */
.set-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.set-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.set-group { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 14px 12px 6px; }
.set-group:first-child { margin-top: 0; }
.set-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text); }
.set-link:hover { background: #fff; text-decoration: none; }
.set-link b { display: block; font-weight: 600; font-size: 14.5px; }
.set-link small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.set-link .count { background: #EDF1F3; color: var(--muted); border-radius: 999px; font-size: 12px; padding: 1px 8px; font-weight: 600; }
.set-link.on { background: #fff; box-shadow: inset 3px 0 0 var(--primary), 0 1px 3px rgba(0,0,0,.05); }
.set-link.on b { color: var(--primary-dark); }
.set-body { max-width: 860px; }
.set-head { border-bottom: 1px solid var(--line); margin: -4px 0 18px; padding-bottom: 12px; }
.set-head h2 { font-size: 20px; margin: 0; }
.set-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.set-tile { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; color: var(--text); }
.set-tile:hover { border-color: var(--primary); text-decoration: none; }
.set-tile small { color: var(--primary); }
.cr-headrow span { font-size: 12px; color: var(--muted); font-weight: 600; }
.callout { background: var(--primary-soft, #E6F4FB); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; }
@media (max-width: 900px) { .set-layout { grid-template-columns: 1fr; } .set-nav { position: static; } }

/* v2.28 vložení plánu lodi z e-mailu */
.sc-paste { min-height: 70px; max-height: 160px; overflow: auto; border: 1.5px dashed var(--line-strong, #C9D3D8); border-radius: 10px; padding: 12px 14px; font-size: 13px; white-space: pre-wrap; color: var(--muted); outline: none; }
.sc-paste:focus { border-color: var(--primary); background: #FAFCFD; }
.sc-paste:empty::before { content: attr(data-ph); color: var(--faint, #9AA7AE); }
.sc-tab td { vertical-align: top; }
.sc-tab .sc-val { width: 100%; height: 34px; font-size: 14px; }
.sc-tab tr.sc-same td { opacity: .6; }
.sc-role { height: 28px; font-size: 12.5px; padding: 0 6px; margin-left: 4px; }
.sc-paste.over { border-color: var(--primary); background: var(--primary-soft, #E6F4FB); }
.callout.warn-c { background: var(--warn-soft, #FFF4DE); }


/* ===== v2.30 přehlednost: nástěnka Dnes, rychlé hledání, odznaky, detail ===== */
/* horní lišta */
.top-search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 9px 0 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #C9D3D8; font: inherit; font-size: 14px; cursor: pointer; min-width: 150px; }
.top-search:hover { background: rgba(255,255,255,.12); color: #fff; }
.top-search svg { width: 16px; height: 16px; flex: none; }
.top-search span { flex: 1; text-align: left; }
.top-search kbd, .qs-box kbd { font-family: var(--font); font-size: 11px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; line-height: 17px; color: var(--muted); background: #fff; }
.top-search kbd { background: transparent; color: #AAB6BC; border-color: rgba(255,255,255,.22); }
@media (max-width: 1320px) { .top-search span, .top-search kbd { display: none; } .top-search { min-width: 0; width: 40px; justify-content: center; padding: 0; } }
.topnav .nav-item { position: relative; }
.nbadge { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #fff; background: var(--danger); line-height: 1; margin-left: -3px; }
.nbadge.amber { background: var(--warn); }
@media (max-width: 1040px) { .nbadge { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; margin: 0; } }

/* nástěnka Dnes */
/* datum a světové hodiny (Dnes) */
.wclock { display: grid; grid-template-columns: minmax(210px, 1.2fr) repeat(4, minmax(0, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.wc-date, .wc { padding: 14px 18px 13px; display: flex; flex-direction: column; min-width: 0; }
.wc-date { background: var(--ink); color: #fff; justify-content: center; gap: 2px; }
.wc-date .wc-wd { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); }
.wc-date b { font-size: 23px; font-weight: 750; line-height: 1.2; white-space: nowrap; }
.wc-date .wc-wk { font-size: 13px; color: rgba(255, 255, 255, .7); }
.wc { border-left: 1px solid var(--line); gap: 1px; }
.wc.home { background: var(--primary-softer); }
.wc-l { display: flex; align-items: baseline; gap: 6px; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.wc-l b { font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .05em; }
.wc-l span { color: var(--faint); }
.wc-t { font-size: 34px; font-weight: 750; line-height: 1.12; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.wc-s { display: flex; gap: 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.wc-off { font-weight: 700; color: var(--text); }
.wc-day { color: var(--primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.wc-w { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--faint); margin-top: 3px; white-space: nowrap; }
.wc-w i { width: 7px; height: 7px; border-radius: 50%; background: #C5CDD2; flex: none; }
.wc.work .wc-w { color: var(--ok); }
.wc.work .wc-w i { background: var(--ok); }
@media (max-width: 1180px) {
  .wclock { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .wc-date { grid-column: 1 / -1; flex-direction: row; align-items: baseline; gap: 12px; padding: 10px 18px; }
  .wc:nth-child(2) { border-left: 0; }
}
@media (max-width: 640px) {
  .wclock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wc:nth-child(4) { border-left: 0; }
  .wc:nth-child(n+4) { border-top: 1px solid var(--line); }
  .wc-t { font-size: 28px; }
}
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 13px; display: flex; flex-direction: column; gap: 1px; color: var(--text); transition: border-color .12s; }
.kpi:hover { border-color: var(--primary); text-decoration: none; }
.kpi-l { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.kpi-n { font-size: 30px; font-weight: 750; line-height: 1.2; color: var(--ink); }
.kpi-s { font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi.red { box-shadow: inset 0 3px 0 var(--danger), var(--shadow); }
.kpi.red .kpi-n { color: var(--danger); }
.kpi.amber { box-shadow: inset 0 3px 0 var(--warn), var(--shadow); }
.kpi.amber .kpi-n { color: var(--warn); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.count-pill { background: var(--danger-soft); color: var(--danger); font-weight: 700; border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.count-pill.ok { background: var(--ok-soft); color: var(--ok); }
.att-group + .att-group { margin-top: 20px; }
.att-gh { display: flex; align-items: center; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); min-width: 0; }
.att-gh b { white-space: nowrap; }
.att-gh .count { background: #EDF1F3; color: var(--muted); border-radius: 999px; font-size: 12px; padding: 1px 8px; font-weight: 700; }
.att-hint { font-size: 12.5px; color: var(--faint); margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.att-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.att-dot.red { background: var(--danger); }
.att-dot.amber { background: var(--warn); }
.att-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.att-row.hide { display: none; }
.att-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; color: inherit; }
.att-main:hover { text-decoration: none; }
.att-main:hover .att-ref { text-decoration: underline; }
.att-id { width: 168px; flex: none; display: flex; flex-direction: column; min-width: 0; }
.att-ref { font-weight: 700; color: var(--primary-dark); }
.att-cust { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-why { flex: 1; min-width: 0; font-size: 14px; }
.att-more { margin-top: 8px; }
.ag-day + .ag-day { margin-top: 14px; }
.ag-dh { display: flex; align-items: baseline; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.ag-dh b { font-size: 14.5px; }
.ag-dh span { color: var(--muted); font-size: 13px; }
.ag-ev { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; color: var(--text); }
.ag-ev:hover { background: var(--primary-softer); text-decoration: none; }
.ag-k { flex: none; width: 96px; text-align: center; font-size: 11.5px; font-weight: 700; padding: 3px 0; border-radius: 6px; background: #EEF2F4; color: var(--muted); }
.ag-k.k-close { background: var(--danger-soft); color: var(--danger); }
.ag-k.k-dep, .ag-k.k-load { background: var(--primary-soft); color: var(--primary-dark); }
.ag-k.k-arr, .ag-k.k-ts { background: var(--ok-soft); color: var(--ok); }
.ag-k.k-term, .ag-k.k-del { background: var(--violet-soft); color: var(--violet); }
.ag-what { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ag-what b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ag-time { font-size: 13px; font-weight: 700; color: var(--danger); }
.dash-empty { display: flex; gap: 14px; align-items: center; padding: 20px 4px; }
.dash-empty svg { width: 30px; height: 30px; color: var(--ok); flex: none; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dash-grid { grid-template-columns: 1fr; } }

/* rychlé hledání */
.qs-overlay { position: fixed; inset: 0; background: rgba(20, 30, 36, .38); z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding-top: 11vh; }
.qs-box { width: min(660px, 92vw); background: #fff; border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, .25); overflow: hidden; display: flex; flex-direction: column; max-height: 72vh; }
.qs-in { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.qs-in svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.qs-in input { flex: 1; border: 0 !important; outline: 0; font-size: 17px; height: 30px; padding: 0; background: transparent; box-shadow: none !important; }
.qs-res { overflow: auto; padding: 4px 8px 10px; }
.qs-gh { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 10px 10px 4px; }
.qs-item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.qs-item.on { background: var(--primary-softer); }
.qs-ic { width: 30px; height: 30px; border-radius: 8px; background: #F1F4F6; display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; }
.qs-ic svg { width: 16px; height: 16px; }
.qs-item.on .qs-ic { background: #fff; color: var(--primary); }
.qs-t { flex: 1; min-width: 0; }
.qs-t b { font-weight: 650; }
.qs-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qs-empty { padding: 26px 12px; text-align: center; color: var(--muted); }
.qs-foot { display: flex; gap: 18px; padding: 9px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); background: #FAFBFC; }
.qs-foot kbd { margin-right: 3px; }

/* detail: další krok v hlavičce */
.next-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px 4px 9px; border-radius: 999px; background: var(--primary-softer); color: var(--primary-dark); font-size: 13.5px; }
.next-pill:hover { text-decoration: none; filter: brightness(.97); }
.next-pill svg { width: 15px; height: 15px; flex: none; }
.next-pill b { font-weight: 650; }
.next-pill.soon { background: var(--warn-soft); color: var(--warn); }
.next-pill.late { background: var(--danger-soft); color: var(--danger); }
.missing-l { margin-left: 6px; }
.next-pill + .missing-l { padding-left: 10px; border-left: 1px solid var(--line); }

/* v2.31 souběžná práce */
.cf-tab td { vertical-align: top; }
.cf-tab td:first-child { width: 28%; }
.live-bar { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: 12px; max-width: min(900px, 94vw); padding: 10px 12px 10px 16px; border-radius: 12px; background: #1F2A30; color: #fff; box-shadow: 0 12px 34px rgba(0,0,0,.25); font-size: 14px; }
.live-bar svg { width: 18px; height: 18px; flex: none; color: #7FD3F7; }
.live-bar .btn { white-space: nowrap; }
.live-bar .copy-icon { color: #C9D3D8; }
.warn-line { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13.5px; max-width: 1100px; }
.warn-line svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.warn-line a { color: inherit; text-decoration: underline; text-decoration-color: rgba(0,0,0,.2); }
.warn-line b { font-weight: 650; margin-right: 2px; }
.warn-line .sep { margin: 0 6px; opacity: .6; }
.tr-tab td { vertical-align: top; }
#doc-trash .count { background: #EDF1F3; color: var(--muted); border-radius: 999px; font-size: 12px; padding: 0 7px; font-weight: 700; }

/* změna čísla ANKER (správce) */
.ref-edit { border: 1px solid var(--line); background: var(--card); color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.ref-edit:hover { color: var(--primary); border-color: var(--primary); }

/* adresář zákazníka */
.ab-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.ab-col { padding: 4px 16px 12px; border-left: 1px solid var(--line); min-width: 0; }
.ab-col:first-child { border-left: 0; padding-left: 0; }
.ab-col:last-child { padding-right: 0; }
.ab-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ab-head b { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ab-item { padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 8px; background: #FBFCFC; }
.ab-item .n { font-weight: 700; }
.ab-item .a { color: var(--muted); font-size: 13px; white-space: pre-line; margin-top: 2px; }
.ab-item .c { color: var(--faint); font-size: 12.5px; margin-top: 2px; }
.ab-item .ab-act { display: flex; gap: 4px; margin-top: 6px; }
.ab-empty { color: var(--faint); font-size: 13px; padding: 6px 0 10px; }
@media (max-width: 1100px) { .ab-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ab-col:nth-child(3) { border-left: 0; padding-left: 0; } }

/* přetažení dokumentu ven */
.drow[draggable="true"] { cursor: grab; }
.drow.dragging { opacity: .55; }

/* e-maily a dokumenty: užší řádky + přihrádka jen s dokumenty */
.docs-split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
@media (max-width: 1150px) { .docs-split { grid-template-columns: 1fr; } }
.drow { padding: 4px 12px; gap: 10px; grid-template-columns: 34px minmax(0, 1fr) auto 150px 252px; min-height: 40px; }
@media (max-width: 1000px) { .drow { grid-template-columns: 34px minmax(0, 1fr) 150px 200px; } }
.drow.kid { padding-left: 32px; }
.drow .dk, .dti .dk { width: 32px; height: 20px; border-radius: 5px; font-size: 9.5px; }
.dmain { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.dname { flex: 0 1 auto; min-width: 0; font-size: 14px; }
.dmeta { flex: 1 1 0; min-width: 60px; margin-top: 0; }
.dtype-btn { padding: 3px 9px; font-size: 12px; }
.dact .btn.sm { padding: 3px 10px; font-size: 12.5px; }
.dtray { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 8px; position: sticky; top: 76px; max-height: calc(100vh - 100px); overflow: auto; }
.dtray-h { display: flex; justify-content: space-between; align-items: center; padding: 0 4px; }
.dtray-h span { font-size: 12px; color: var(--muted); background: #EEF1F3; border-radius: 999px; padding: 1px 8px; font-weight: 700; }
.dtray-hint { font-size: 12px; color: var(--faint); padding: 2px 4px 6px; }
.dtray-g { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 4px 3px; }
.dti { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 4px 4px; border-radius: 8px; cursor: pointer; }
.dti:hover { background: #EAF5FC; }
.dti[draggable="true"] { cursor: grab; }
.dti.dragging { opacity: .55; }
.dti-n { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dti .copy-icon { opacity: 0; }
.dti:hover .copy-icon { opacity: 1; }
.dti .copy-icon svg { width: 16px; height: 16px; }

/* ranní přehled (Dnes, jen první otevření dne) */
.mhero { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 18px 12px; margin-bottom: 14px; }
.mh-hello { display: flex; align-items: baseline; gap: 10px; font-size: 17px; }
.mh-hello b { font-weight: 750; color: var(--ink); }
.mh-hello span { color: var(--muted); font-size: 15px; flex: 1; }
.mh-hello .copy-icon { align-self: center; }
.mh-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; margin-top: 10px; }
@media (max-width: 1000px) { .mh-body { grid-template-columns: 1fr; } }
.mh-h { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-bottom: 4px; }
.mh-h span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.mh-f { display: flex; gap: 10px; align-items: flex-start; padding: 5px 6px; border-radius: 8px; color: var(--text); text-decoration: none; }
.mh-f:hover, .mh-c:hover { background: #F2F7FA; }
.mh-n { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 11px; background: #EEF1F3; color: var(--muted); margin-top: 1px; }
.mh-n.red { background: #FDECEC; color: #B42318; }
.mh-n.amber { background: var(--warn-soft); color: #8A5A00; }
.mh-ft { min-width: 0; line-height: 1.35; font-size: 14px; }
.mh-fc { font-size: 12px; color: var(--faint); margin-left: 4px; }
.mh-fw { display: block; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-c { display: block; padding: 5px 6px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mh-c span { color: var(--muted); font-size: 13px; }
.mh-quiet { font-size: 13.5px; color: var(--muted); padding: 5px 6px; }

/* datum a časy – nenápadný řádek na Dnes */
.wmini { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; font-size: 13px; color: var(--faint); }
.wm-date { color: var(--muted); font-weight: 600; }
.wm b { color: var(--muted); font-weight: 650; font-variant-numeric: tabular-nums; }
.wm i { font-style: normal; font-size: 11.5px; margin-left: 3px; }

/* podpis v e-mailech – editor v Nastavení → Můj účet */
.sig-ed { min-height: 110px; max-height: 360px; overflow: auto; padding: 12px 14px; border: 1px solid var(--line, #D5DEE3); border-radius: 8px; background: #fff;
  font-family: Aptos, Calibri, Arial, sans-serif; font-size: 11pt; color: #1C2226; line-height: 1.4; }
.sig-ed:focus { outline: none; border-color: var(--primary, #0B6E99); box-shadow: 0 0 0 3px rgba(11, 110, 153, .12); }
.sig-ed:empty::before { content: 'Sem vložte nebo napište svůj podpis…'; color: #9AA5AC; }
.sig-ed img { max-width: 100%; }

/* nebezpečné a veterinární zboží */
.dk-msds, .dk-dgd { background: #FDECEC; color: #9B2C2C; } .dk-vet { background: #E6F4F1; color: #145C4F; }
.pill.flag-dg { background: #FDECEC; color: #9B2C2C; } .pill.flag-vet { background: #E6F4F1; color: #145C4F; }
.flag-mini .pill { font-size: 10.5px; padding: 1px 6px; margin-left: 4px; vertical-align: 1px; }
.flag-rows { display: grid; gap: 8px; margin-bottom: 6px; }
.flag-row { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.flag-row .flag-note { max-width: 460px; }
@media (max-width: 640px) { .flag-row { flex-wrap: wrap; } }

/* nápověda v Nastavení */
.help-item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.help-item summary { padding: 12px 16px; font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; }
.help-item summary::-webkit-details-marker { display: none; }
.help-item summary::before { content: '›'; display: inline-block; width: 10px; color: var(--muted); font-size: 18px; line-height: 1; transition: transform .15s; }
.help-item[open] summary::before { transform: rotate(90deg); }
.help-body { padding: 0 18px 14px 34px; line-height: 1.55; color: var(--text); }
.help-body ul, .help-body ol { margin: 0; padding-left: 18px; } .help-body li { margin: 4px 0; } .help-body p { margin: 4px 0 8px; }
.help-keys td { padding: 4px 14px 4px 0; vertical-align: top; } .help-keys td:first-child { white-space: nowrap; }

.dk-booking, .dk-an, .dk-cmr, .dk-pod { background: #E3F0FB; color: #0B4B6B; } .dk-coo { background: #F1E9FB; color: #5B2E91; }

/* e-mail přetažený mimo zásilku */
body.mail-drop::after { content: 'Pusťte e-mail – zařadí se k zásilce podle čísla ANKER, kontejneru nebo bookingu'; position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: #0B2A3A; color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 9999; pointer-events: none; }
.mm-list { display: grid; gap: 6px; }
.mm-c { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; cursor: pointer; font: inherit; }
.mm-c:hover { border-color: var(--primary); background: #F4FAFE; }

/* stránka Dnes: rozdělení na „Dnes musím“ a sbalené „K vyřízení“ */
.att-sec { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 14px 0 6px; }
.att-sec:first-of-type { margin-top: 4px; }
.att-none { padding: 4px 0 10px; }
details.att-group > summary { list-style: none; cursor: pointer; }
details.att-group > summary::-webkit-details-marker { display: none; }
details.att-fold > summary::before { content: '›'; display: inline-block; width: 10px; margin-right: 2px; color: var(--muted); font-size: 16px; transition: transform .15s; }
details.att-fold[open] > summary::before { transform: rotate(90deg); }
details.att-fold:not([open]) > summary .att-hint { display: none; }

/* tabulka kontejnerů: kompaktní řádek, další údaje po rozkliknutí */
.c-tog { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 13px; width: 22px; padding: 0; margin-right: 2px; vertical-align: middle; }
.c-tog:hover { color: var(--primary); }
.ctable tr.c-open > td { border-bottom-color: transparent; }
.ctable tr.c-more > td { background: #F7FAFC; padding-top: 4px; padding-bottom: 14px; }
.cm-grid { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.cm-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.cm-f.cm-wide { flex: 1 1 260px; } .cm-f.cm-wide input { width: 100%; }
.cm-ft { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: #fff; border: 1px solid var(--line); line-height: 1.5; max-width: 820px; }
.cm-ft svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--muted); }

/* hláška s tlačítkem Vrátit */
.toast .toast-undo { margin-left: 10px; border: 0; background: rgba(255,255,255,.16); color: inherit; font: 600 13px var(--font); padding: 4px 10px; border-radius: 6px; cursor: pointer; }
.toast .toast-undo:hover { background: rgba(255,255,255,.28); }
/* jen čtení: skrýt ovládání, které by stejně nešlo použít */
body.ro #top-new, body.ro #cn, body.ro .savebar, body.ro #c-add, body.ro #c-paste, body.ro #c-del, body.ro .dropzone, body.ro [data-del], body.ro #ls-add { display: none !important; }
.ro-badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: #FFF3D6; color: #7A5300; margin-left: 6px; }

/* seznam přeprav: zákazník výrazněji, druh přepravy s obrázkem */
.cust-name { font-weight: 600; color: var(--text); }
.tt { display: flex; align-items: center; gap: 10px; }
.tt-ic { display: inline-flex; align-items: center; justify-content: center; gap: 1px; min-width: 34px; height: 30px; padding: 0 6px; border-radius: 8px; background: #E3F0FB; color: #0B4B6B; flex: none; }
.tt-ic svg { width: 18px; height: 18px; }
.tt-ic.tt-sea_lcl svg { width: 15px; height: 15px; }
.tt-ic.tt-sea_lcl { background: #EAF6EE; color: #17643A; }
.tt-ic.tt-air { background: #F1E9FB; color: #5B2E91; }
.tt-ic.tt-rail { background: #FFF3D6; color: #7A5300; }
.tt-ic.tt-road { background: #EEF1F3; color: #4A565E; }

/* detail přepravy: zákazník výrazně a pruh hlavních údajů */
.d-cust { margin-top: 4px; font-size: 26px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.d-cust a { color: var(--text); text-decoration: none; } .d-cust a:hover { color: var(--primary); text-decoration: underline; }
.d-cref { font-size: 14px; font-weight: 500; color: var(--muted); }
.kfacts { display: flex; flex-wrap: wrap; gap: 10px 18px; position: relative; padding-right: 34px !important; align-items: center; margin-top: 12px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.kf { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.kf > span { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kf > b { font-size: 14px; font-weight: 600; color: var(--text); }
.kf > b.kf-empty { color: #A3AEB5; font-weight: 500; }
.kf-type { flex-direction: row; align-items: center; gap: 10px; padding-right: 14px; border-right: 1px solid var(--line); }
.kf-type > div { display: flex; flex-direction: column; } .kf-type b { font-size: 14px; } .kf-type div span { font-size: 12px; color: var(--muted); }
.kf-added { margin-left: auto; } .kf-added > b { font-weight: 500; color: var(--muted); }

body.mail-drop-nofile::after { content: 'Z Outlooku přetáhněte e-mail nejdřív na plochu a odtud sem – prohlížeč jinak dostane jen text'; position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  background: #7A5300; color: #fff; padding: 12px 20px; border-radius: 10px; font-weight: 600; box-shadow: 0 8px 30px rgba(0,0,0,.25); z-index: 9999; pointer-events: none; max-width: 90vw; text-align: center; }

.inbox-card { margin-bottom: 16px; }

.md-kid { padding-left: 26px; }

/* přehled přepravy: kompaktní trasa a poznámka nahoře */
.timeline.tl-compact { margin: 6px 0 2px; }
.tl-compact .tl-stop::before { top: 10px; height: 2px; }
.tl-compact .tl-node { width: 22px; height: 22px; margin-bottom: 6px; }
.tl-compact .tl-node svg { width: 12px; height: 12px; }
.tl-compact .tl-stop.current .tl-node { border-width: 6px; }
.tl-compact .tl-place { font-size: 14px; }
.tl-compact .tl-role { font-size: 12px; margin-top: 1px; }
.tl-compact .tl-date { font-size: 13px; margin-top: 3px; }
.tl-compact .tl-rel { font-size: 12px; }
.tl-past .tl-place { color: var(--muted); font-weight: 600; }
.tl-more { border: 0; background: none; color: var(--primary); cursor: pointer; font: inherit; font-size: 12px; padding: 0; }
.tl-more:hover { text-decoration: underline; }
.ov-note { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; padding: 10px 14px; border-radius: 10px; border: 1px dashed var(--line-strong); background: transparent; }
.ov-note.has { border: 1px solid #F0DFA8; background: #FFFBEB; }
.ov-note-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 8px; }
.ov-note .note-box { display: inline; white-space: pre-wrap; }
.ov-note.has .note-box { display: block; margin-top: 2px; }

/* pruh hlavních údajů: klik = úprava dopravy */
#kfacts { cursor: pointer; transition: border-color .12s, box-shadow .12s; }
#kfacts:hover { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,119,182,.08); }
.kf-num b { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.kf-copy { border: 0; background: none; padding: 0 2px; cursor: pointer; color: var(--muted); display: inline-grid; }
.kf-copy svg { width: 13px; height: 13px; } .kf-copy:hover { color: var(--primary); }
.kf-added > b { color: var(--primary) !important; font-weight: 600 !important; }
/* trasa jako úzký řádek */
.route-row { margin-bottom: 16px; padding: 10px 16px; }
.tll-line { display: flex; align-items: center; gap: 0; overflow-x: auto; }
.tll { display: flex; align-items: center; gap: 7px; flex: none; white-space: nowrap; }
.tll-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); background: #fff; display: grid; place-items: center; flex: none; color: #fff; }
.tll-dot svg { width: 10px; height: 10px; }
.tll.done .tll-dot { background: var(--primary); border-color: var(--primary); }
.tll.current .tll-dot { border: 5px solid var(--primary); }
.tll-t { display: inline-flex; align-items: baseline; gap: 6px; font-size: 13.5px; }
.tll-t b { font-weight: 600; } .tll.done:not(.tll-past) .tll-t b, .tll-past .tll-t b { color: var(--muted); font-weight: 500; }
.tll.current .tll-t b { color: var(--primary); }
.tll-d { color: var(--text); font-variant-numeric: tabular-nums; }
.tll-rel { font-size: 12px; color: var(--muted); } .tll-rel.ok { color: var(--ok); font-weight: 600; } .tll-rel.soon { color: var(--warn); font-weight: 600; } .tll-rel.late { color: var(--danger); font-weight: 600; }
.tll-sep { flex: 1 1 24px; min-width: 18px; height: 2px; background: var(--line); margin: 0 10px; }
.stop-det { margin-top: 8px; font-size: 13px; } .stop-det > summary { cursor: pointer; color: var(--muted); }
.stop-det .stop-contacts { margin-top: 8px; border-top: 0; padding-top: 0; }

.kf-type { padding-right: 12px !important; }

.kf-edit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%) rotate(-90deg); color: var(--muted); display: grid; } .kf-edit svg { width: 16px; height: 16px; } #kfacts:hover .kf-edit { color: var(--primary); }

/* kontejnery v nákladu */
.ce-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 6px 0 10px; }
.ce-g { display: inline-flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.ce-g input { width: 64px; text-align: right; } .ce-g select { width: 130px; }
.ce-wrap { margin-bottom: 14px; } .ce-tab td, .ce-tab th { padding-top: 6px; padding-bottom: 6px; }

.calc-v { min-height: 38px; display: flex; align-items: center; padding: 0 12px; border-radius: 8px; background: #F3F6F8; border: 1px solid var(--line); font-weight: 600; font-variant-numeric: tabular-nums; }

/* přehled: nahoře Další krok a Poznámka vedle sebe */
.ov-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; align-items: stretch; }
.ov-top .ov-note { margin-bottom: 0; }
.ov-next { padding: 12px 16px; margin: 0; display: flex; flex-direction: column; gap: 2px; position: relative; }
.ov-next-l { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.ov-next-l svg { width: 14px; height: 14px; }
.ov-next-what { font-size: 18px; font-weight: 700; margin-top: 2px; }
.ov-next-when { color: var(--muted); font-variant-numeric: tabular-nums; }
.ov-next.soon .ov-next-when b { color: var(--warn); } .ov-next.late .ov-next-when b { color: var(--danger); }
.ov-next:not(.soon):not(.late) .ov-next-when b { color: var(--text); }
.ov-route-tog { position: absolute; right: 14px; top: 12px; }
@media (max-width: 900px) { .ov-top { grid-template-columns: 1fr; } }

.dk-rwb { background: #E3F0FB; color: #0B4B6B; }
.tt-ic.tt-rail_lcl { background: #EAF6EE; color: #17643A; } .tt-ic.tt-rail_lcl svg { width: 15px; height: 15px; }
/* nabídky (druh dokumentu ap.): čitelné položky zarovnané vlevo */
.popmenu { min-width: 250px; width: auto !important; max-height: 70vh; overflow-y: auto; }
.popmenu button { display: block; width: 100%; text-align: left; border: 0; background: none; font: 500 14.5px/1.3 var(--font, inherit); color: var(--text); padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.popmenu button:hover { background: #EEF4F8; }
.popmenu button.on { font-weight: 700; color: var(--primary); }

/* pojištění a clení v hlavičce přepravy */
.pill.yn { font-size: 12px; }
.pill.yn-yes { background: #EAF6EE; color: #17643A; }
.pill.yn-no { background: #EEF1F3; color: #4A565E; }
.pill.yn-unk { background: #FFF3D6; color: #7A5300; }

/* seznam přeprav: stav (aktivní / archiv / storno) úsporně vedle hledání */
.lstate.lstate-sm { padding: 3px; border-radius: 9px; }
.lstate.lstate-sm button { height: 30px; padding: 0 10px; font-size: 13px; gap: 5px; }
.lstate.lstate-sm button svg { display: none; }
.lstate.lstate-sm button .n { font-size: 11px; min-width: 16px; padding: 0 5px; }
/* detail přepravy: výraznější číslo a zákazník */
.detail-title h1 { font-size: 36px !important; font-weight: 800; letter-spacing: -.02em; }
.d-cust { font-size: 30px !important; font-weight: 800 !important; letter-spacing: -.015em; margin-top: 2px !important; }
#d-track { color: var(--muted); }
/* Moje / Celý tým stejně nízké jako stav vedle */
.list-tools #lscope { padding: 3px; border-radius: 9px; }
.list-tools #lscope button { height: 30px; padding: 0 12px; font-size: 13px; }
/* logo v horní liště: celé, bez ořezu, co největší */
