/* SKYDRA CRM – vizuální styl podle skydra.io: čistá bílá, tyrkysová, zaoblené prvky */
:root {
  --c-accent: #08DEED;
  --c-accent-600: #06B6C4;
  --c-accent-700: #0891A0;
  --c-accent-50: #E8FCFE;
  --c-accent-100: #C9F7FB;
  --c-ink: #0F1B2D;
  --c-ink-2: #334155;
  --c-muted: #64748B;
  --c-faint: #94A3B8;
  --c-line: #E5EAF2;
  --c-line-2: #EEF2F7;
  --c-bg: #F6F8FC;
  --c-card: #FFFFFF;
  --c-green: #10B981; --c-green-50: #E7F8F1;
  --c-red: #EF4444; --c-red-50: #FDECEC;
  --c-amber: #F59E0B; --c-amber-50: #FEF5E6;
  --c-blue: #3B82F6;
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(15, 27, 45, .05), 0 1px 3px rgba(15, 27, 45, .06);
  --sh-2: 0 4px 16px rgba(15, 27, 45, .08);
  --sh-3: 0 18px 50px rgba(15, 27, 45, .18);
  --f-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --f-head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --sidebar-w: 236px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--f-body); font-size: 14px; color: var(--c-ink); background: var(--c-bg); -webkit-font-smoothing: antialiased; line-height: 1.45; }
a { color: var(--c-accent-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--f-head); margin: 0; letter-spacing: -.01em; }
h1 { font-size: 24px; font-weight: 800; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 14px; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--c-accent-100); }
.hidden { display: none !important; }
.muted { color: var(--c-muted); }
.faint { color: var(--c-faint); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 8px; }
.between { justify-content: space-between; }
.mt { margin-top: 16px; } .mt-s { margin-top: 8px; } .mb { margin-bottom: 16px; } .mb-s { margin-bottom: 8px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; }

svg.ico { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.kpi .k-label svg.ico { width: 15px; height: 15px; }
.side-user svg.ico { width: 18px; height: 18px; }
.empty svg.ico { width: 40px; height: 40px; color: #CBD5E1; display: block; margin: 0 auto 10px; }
.alert svg.ico { width: 18px; height: 18px; flex: none; margin-top: 1px; }
/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--c-line); position: fixed; inset: 0 auto 0 0; display: flex; flex-direction: column; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 14px; }
.brand-mark { width: 58px; height: 30px; color: var(--c-ink, #0F1B2D); flex: none; }
.brand-name { font-family: 'Roboto Slab', var(--f-head); font-weight: 800; font-size: 20px; letter-spacing: .5px; }
.brand-name small { font-family: var(--f-body); font-size: 10px; font-weight: 700; color: var(--c-accent-700); background: var(--c-accent-50); border-radius: var(--r-pill); padding: 2px 7px; margin-left: 6px; vertical-align: 3px; letter-spacing: .6px; }
.nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--c-ink-2); font-weight: 600; text-decoration: none; position: relative; }
.nav a svg { width: 19px; height: 19px; flex: none; color: var(--c-faint); }
.nav a:hover { background: var(--c-line-2); }
.nav a.active { background: var(--c-accent-50); color: var(--c-ink); }
.nav a.active svg { color: var(--c-accent-700); }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--c-accent); }
.nav .badge { margin-left: auto; }
.nav-sep { height: 1px; background: var(--c-line); margin: 10px 4px; }
.side-user { border-top: 1px solid var(--c-line); padding: 12px 14px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.side-user:hover { background: var(--c-line-2); }
.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(246, 248, 252, .86); backdrop-filter: blur(10px); display: flex; align-items: center; gap: 12px; padding: 12px 28px; border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--c-line); }
.page { padding: 8px 28px 48px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 10px 0 18px; }
.page-head h1 { margin-right: auto; }
.crumbs { font-size: 13px; color: var(--c-muted); margin-bottom: 4px; }
.crumbs a { color: var(--c-muted); }

/* ---------- komponenty ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px; border-radius: var(--r-pill); border: 1px solid var(--c-line); background: #fff; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, border-color .15s, transform .05s; text-decoration: none !important; color: var(--c-ink); }
.btn:hover { border-color: #CBD5E1; background: #FAFBFD; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--c-accent); border-color: var(--c-accent); color: #04212A; box-shadow: 0 6px 18px rgba(8, 222, 237, .32); }
.btn-primary:hover { background: #22E5F2; border-color: #22E5F2; }
.btn-dark { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.btn-dark:hover { background: #1E2B40; border-color: #1E2B40; }
.btn-danger { color: var(--c-red); }
.btn-danger:hover { background: var(--c-red-50); border-color: #F8C4C4; }
.btn-green { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.btn-green:hover { background: #0EA371; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--c-line-2); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn-xs { height: 26px; padding: 0 9px; font-size: 12px; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 30px; }

.card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 18px 20px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--c-line-2); }
.card-head h2, .card-head h3 { margin-right: auto; }
.card-body { padding: 16px 18px; }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--c-line-2); color: var(--c-ink-2); white-space: nowrap; max-width: 100%; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.pill.sel { cursor: pointer; border: 1px solid transparent; }
.pill.sel:hover { border-color: rgba(15, 27, 45, .15); }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; background: var(--c-line-2); color: var(--c-ink-2); }
.badge.red { background: var(--c-red); color: #fff; }
.badge.cyan { background: var(--c-accent); color: #04212A; }

.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex: none; background: var(--c-faint); letter-spacing: .3px; }
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar.lg { width: 40px; height: 40px; font-size: 14px; }

/* formuláře */
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .lbl { font-size: 12px; font-weight: 600; color: var(--c-muted); }
.input, select.input, textarea.input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--c-line); border-radius: 10px; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s; }
textarea.input { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--c-accent-600); box-shadow: 0 0 0 3px rgba(8, 222, 237, .2); }
.input.sm { height: 32px; font-size: 13px; padding: 0 10px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 14px; }
.span2 { grid-column: span 2; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--c-accent-700); }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--c-faint); pointer-events: none; }
.search .input { padding-left: 34px; }

/* segmenty / taby */
.seg { display: inline-flex; background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 13px; border-radius: var(--r-pill); font-weight: 600; color: var(--c-muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button.on { background: var(--c-ink); color: #fff; }
.seg button:not(.on):hover { color: var(--c-ink); background: var(--c-line-2); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--c-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--c-ink); border-bottom-color: var(--c-accent); }

/* tabulky */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--c-line); background: #FBFCFE; position: sticky; top: 0; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--c-line-2); vertical-align: middle; }
.tbl tbody tr { transition: background .1s; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr:hover { background: #F8FBFD; }
.tbl tbody tr.sel { background: var(--c-accent-50); }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .w-check { width: 36px; }
.name-cell { font-weight: 600; color: var(--c-ink); }
.empty { text-align: center; padding: 42px 16px; color: var(--c-muted); }
.empty svg { width: 40px; height: 40px; color: var(--c-line); display: block; margin: 0 auto 10px; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 12px 16px; border-top: 1px solid var(--c-line-2); color: var(--c-muted); font-size: 13px; }

/* toolbar */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.toolbar .search { width: 280px; }
.bulkbar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--c-ink); color: #fff; border-radius: var(--r); margin-bottom: 12px; flex-wrap: wrap; }
.bulkbar .input { width: auto; height: 32px; color: var(--c-ink); }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .k-label { font-size: 12px; font-weight: 600; color: var(--c-muted); display: flex; align-items: center; gap: 6px; }
.kpi .k-value { font-family: var(--f-head); font-size: 26px; font-weight: 800; margin-top: 6px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; color: var(--c-muted); margin-top: 2px; }
.kpi.accent { background: linear-gradient(135deg, #0F1B2D 0%, #13324A 100%); border-color: #0F1B2D; color: #fff; }
.kpi.accent .k-label, .kpi.accent .k-sub { color: #A5B4C8; }
.kpi.accent .k-value { color: var(--c-accent); }

/* obchodníci – close rate kruh */
.reps { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.rep { padding: 18px; display: flex; gap: 18px; align-items: center; }
.ring { position: relative; width: 108px; height: 108px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .ring-val { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring .ring-val b { font-family: var(--f-head); font-size: 25px; font-weight: 800; letter-spacing: -.02em; }
.ring .ring-val span { font-size: 10px; color: var(--c-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.rep-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; flex: 1; min-width: 0; }
.rep-stats div { font-size: 12px; color: var(--c-muted); }
.rep-stats b { display: block; font-size: 15px; color: var(--c-ink); font-variant-numeric: tabular-nums; }

/* graf */
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 200px; padding: 10px 4px 0; }
.chart-bars .bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.chart-bars .bar-stack { flex: 1; width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; border-radius: 6px 6px 2px 2px; overflow: hidden; }
.chart-bars .bar-seg { width: 100%; }
.chart-bars .bar-lbl { font-size: 11px; color: var(--c-muted); white-space: nowrap; }
.chart-bars .bar-val { font-size: 10px; color: var(--c-ink-2); font-weight: 700; white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--c-ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.hbar { display: flex; align-items: center; gap: 10px; margin: 7px 0; }
.hbar .hb-name { width: 170px; font-size: 13px; }
.hbar .hb-track { flex: 1; height: 10px; background: var(--c-line-2); border-radius: 6px; overflow: hidden; }
.hbar .hb-fill { height: 100%; border-radius: 6px; }
.hbar .hb-val { width: 70px; text-align: right; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* dashboard grid */
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-top: 14px; }

/* follow-upy (Dnes) */
.fu-list { display: flex; flex-direction: column; }
.fu { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid var(--c-line-2); }
.fu:last-child { border-bottom: 0; }
.fu:hover { background: #F9FBFD; }
.fu-time { width: 64px; flex: none; font-weight: 700; font-variant-numeric: tabular-nums; }
.fu-time.late { color: var(--c-red); }
.fu-ico { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; background: var(--c-accent-50); color: var(--c-accent-700); }
.fu-ico svg { width: 16px; height: 16px; }
.fu-ico.meeting { background: #F1EBFE; color: #7C3AED; }
.fu-ico.email { background: #EAF2FE; color: var(--c-blue); }
.fu-ico.task { background: var(--c-amber-50); color: #B45309; }
.fu-main { flex: 1; min-width: 0; }
.fu-main .t { font-weight: 600; }
.fu-main .s { font-size: 12px; color: var(--c-muted); }
.fu-actions { display: flex; gap: 6px; flex: none; }
.tel { font-weight: 600; color: var(--c-ink); white-space: nowrap; }
.tel:hover { color: var(--c-accent-700); }

/* kanban */
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 16px; align-items: flex-start; min-height: calc(100vh - 190px); }
.board-col { flex: 0 0 290px; background: #EEF2F7; border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: calc(100vh - 190px); }
.board-col-head { padding: 12px 14px 10px; border-top: 4px solid var(--col, var(--c-faint)); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.board-col-head .nm { font-weight: 800; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 8px; }
.board-col-head .sm { font-size: 12px; color: var(--c-muted); margin-top: 2px; font-variant-numeric: tabular-nums; }
.board-cards { padding: 4px 10px 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; flex: 1; }
.board-col.drop .board-cards { background: rgba(8, 222, 237, .12); border-radius: 0 0 var(--r-lg) var(--r-lg); outline: 2px dashed var(--c-accent-600); outline-offset: -6px; }
.deal-card { background: #fff; border-radius: 12px; padding: 11px 12px; box-shadow: var(--sh-1); cursor: grab; border: 1px solid transparent; }
.deal-card:hover { border-color: var(--c-accent-100); box-shadow: var(--sh-2); }
.deal-card.dragging { opacity: .45; }
.deal-card .dc-title { font-weight: 700; }
.deal-card .dc-sub { font-size: 12px; color: var(--c-muted); }
.deal-card .dc-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; }
.deal-card .dc-value { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.board-drop-zones { display: flex; gap: 10px; position: sticky; bottom: 0; }
.drop-zone { flex: 1; border: 2px dashed var(--c-line); border-radius: var(--r); padding: 14px; text-align: center; font-weight: 700; color: var(--c-muted); background: #fff; transition: all .15s; }
.drop-zone.won.over { border-color: var(--c-green); background: var(--c-green-50); color: var(--c-green); }
.drop-zone.lost.over { border-color: var(--c-red); background: var(--c-red-50); color: var(--c-red); }

/* detail */
.detail-grid { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 16px; align-items: start; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--c-muted); font-weight: 600; }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-line-2); }
.tl-item:last-child { border-bottom: 0; }
.tl-ico { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; background: var(--c-line-2); color: var(--c-muted); }
.tl-ico svg { width: 15px; height: 15px; }
.tl-ico.note { background: var(--c-accent-50); color: var(--c-accent-700); }
.tl-body { flex: 1; min-width: 0; }
.tl-meta { font-size: 12px; color: var(--c-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tl-text { margin-top: 3px; white-space: pre-wrap; word-break: break-word; }
.tl-item.system .tl-text { color: var(--c-muted); font-size: 13px; }
.tl-actions { opacity: 0; transition: opacity .1s; }
.tl-item:hover .tl-actions { opacity: 1; }
.notebox { border: 1px solid var(--c-line); border-radius: var(--r); padding: 4px; background: #fff; }
.notebox textarea { border: 0; box-shadow: none !important; min-height: 70px; }
.notebox .nb-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 4px 6px 6px; }
.formdata { background: #FBFCFE; border: 1px solid var(--c-line-2); border-radius: var(--r); padding: 12px 14px; font-size: 13px; white-space: pre-wrap; max-height: 320px; overflow: auto; }
.alert { padding: 11px 14px; border-radius: var(--r); background: var(--c-amber-50); color: #92400E; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.alert.info { background: var(--c-accent-50); color: #0E5A63; }
.alert.green { background: var(--c-green-50); color: #065F46; }
.alert.red { background: var(--c-red-50); color: #991B1B; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }

/* kalendář */
.cal { background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1); }
.cal-week { display: grid; grid-template-columns: 56px repeat(7, 1fr); }
.cal-head { position: sticky; top: 60px; z-index: 5; background: #fff; border-bottom: 1px solid var(--c-line); }
.cal-dayhead { padding: 10px 6px; text-align: center; font-size: 12px; color: var(--c-muted); font-weight: 600; border-left: 1px solid var(--c-line-2); }
.cal-dayhead b { display: block; font-family: var(--f-head); font-size: 20px; color: var(--c-ink); font-weight: 800; }
.cal-dayhead.today b { color: #fff; background: var(--c-accent-700); border-radius: 50%; width: 34px; height: 34px; line-height: 34px; margin: 2px auto 0; }
.cal-body { position: relative; }
.cal-hours { display: grid; grid-template-columns: 56px repeat(7, 1fr); }
.cal-hour-lbl { height: 52px; font-size: 11px; color: var(--c-faint); text-align: right; padding: 2px 8px 0 0; }
.cal-cell { height: 52px; border-left: 1px solid var(--c-line-2); border-top: 1px solid var(--c-line-2); cursor: pointer; }
.cal-cell:hover { background: #F7FBFD; }
.cal-cell.weekend { background: #FBFCFE; }
.cal-ev { position: absolute; border-radius: 8px; padding: 4px 7px; font-size: 12px; overflow: hidden; cursor: pointer; border-left: 3px solid var(--ev, var(--c-accent)); background: color-mix(in srgb, var(--ev, var(--c-accent)) 14%, white); color: var(--c-ink); line-height: 1.25; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.cal-ev:hover { box-shadow: var(--sh-2); z-index: 3; }
.cal-ev.short { white-space: nowrap; text-overflow: ellipsis; padding-top: 2px; padding-bottom: 0; }
.cal-ev.done { opacity: .55; text-decoration: line-through; }
.cal-ev b { font-weight: 700; }
.cal-now { position: absolute; height: 2px; background: var(--c-red); z-index: 4; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--c-red); }
.cal-month { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-mday { min-height: 118px; border-left: 1px solid var(--c-line-2); border-top: 1px solid var(--c-line-2); padding: 6px; cursor: pointer; }
.cal-mday.other { background: #FBFCFE; color: var(--c-faint); }
.cal-mday .d { font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.cal-mday.today .d { color: #fff; background: var(--c-accent-700); border-radius: var(--r-pill); display: inline-block; padding: 1px 7px; }
.cal-mev { font-size: 11px; padding: 2px 6px; border-radius: 5px; margin-bottom: 3px; background: color-mix(in srgb, var(--ev, var(--c-accent)) 16%, white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cal-mev.done { opacity: .5; text-decoration: line-through; }
.cal-allday { grid-column: 2 / span 7; }

/* modál, drawer, toast */
.overlay { position: fixed; inset: 0; background: rgba(15, 27, 45, .42); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; animation: fade .15s ease; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 560px; box-shadow: var(--sh-3); animation: pop .18s ease; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px 6px; }
.modal-head h2 { margin-right: auto; font-size: 18px; }
.modal-body { padding: 12px 22px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--c-ink); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--sh-3); font-weight: 500; max-width: 380px; animation: pop .2s ease; display: flex; gap: 10px; align-items: center; }
.toast.err { background: #B91C1C; }
.toast.ok::before { content: '✓'; color: var(--c-accent); font-weight: 800; }
.menu { position: absolute; z-index: 200; background: #fff; border: 1px solid var(--c-line); border-radius: 12px; box-shadow: var(--sh-3); padding: 6px; min-width: 200px; max-height: 360px; overflow-y: auto; }
.menu button { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; text-align: left; font-weight: 500; }
.menu button:hover, .menu button.hl { background: var(--c-line-2); }
.menu .menu-sep { height: 1px; background: var(--c-line); margin: 4px; }
.menu .menu-h { font-size: 11px; font-weight: 700; color: var(--c-faint); text-transform: uppercase; padding: 8px 10px 4px; letter-spacing: .05em; }
.gsearch { position: relative; width: min(460px, 100%); }
.gsearch .menu { left: 0; right: 0; top: 44px; max-height: 70vh; }
.gs-item { display: flex !important; flex-direction: column; align-items: flex-start !important; gap: 0 !important; }
.gs-item small { color: var(--c-muted); }
.kbd { font-size: 11px; color: var(--c-faint); border: 1px solid var(--c-line); border-radius: 5px; padding: 0 5px; }

/* přihlášení */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, #DDFBFE 0%, rgba(221, 251, 254, 0) 60%), radial-gradient(900px 500px at 100% 100%, #FDEFF4 0%, rgba(253, 239, 244, 0) 55%), #fff; }
.auth-card { width: 100%; max-width: 410px; padding: 34px 32px; }
.auth-card .brand { justify-content: center; padding: 0 0 18px; }
.auth-card h1 { text-align: center; font-size: 22px; }
.auth-card p.sub { text-align: center; color: var(--c-muted); margin: 6px 0 22px; }

/* odpovídající status barvy */
.stage-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.amount { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.green { color: var(--c-green); } .red { color: var(--c-red); } .amber { color: #B45309; }
.codebox { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--c-ink); color: #D7F9FC; padding: 12px 14px; border-radius: var(--r); overflow-x: auto; white-space: pre; }
.copyline { display: flex; gap: 8px; align-items: center; }
.copyline code { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--c-line-2); padding: 8px 10px; border-radius: 8px; overflow-x: auto; white-space: nowrap; }
.list-edit { display: flex; flex-direction: column; gap: 6px; }
.list-edit .le-row { display: flex; gap: 8px; align-items: center; }
.list-edit .le-row .input { height: 34px; }
.color-in { width: 38px; height: 34px; padding: 2px; border: 1px solid var(--c-line); border-radius: 8px; background: #fff; cursor: pointer; flex: none; }

.mobile-only { display: none; }

/* ---------- responzivita (mobil – obchodník volá z telefonu) ---------- */
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1080px) {
  .dash-grid, .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); width: 260px; transition: transform .2s; box-shadow: var(--sh-3); }
  .sidebar.open { transform: none; }
  .mobile-only { display: inline-flex; }
  .topbar { padding: 10px 14px; }
  .page { padding: 4px 14px 90px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi .k-value { font-size: 21px; }
  .toolbar .search { width: 100%; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .hide-m { display: none !important; }
  .fu { flex-wrap: wrap; }
  .fu-actions { width: 100%; justify-content: flex-end; }
  .rep { flex-direction: column; align-items: stretch; }
  .ring { margin: 0 auto; }
  .board-col { flex-basis: 82vw; }
  .modal { border-radius: 16px; }
  .overlay { padding: 12px; }
  .hbar .hb-name { width: 110px; }
  .gsearch { flex: 1; }
}
select.input.sm { padding-right: 28px; background-position: right 9px center; }
.page-head > :first-child { margin-right: auto; }
.list-edit .le-row input[data-f=name] { flex: 1; min-width: 140px; }
@media (max-width: 860px) { .list-edit .le-row { flex-wrap: wrap; } }

/* prázdná kategorie: v tabulce nenápadná, zvýrazní se při najetí na řádek */
.cat-empty { background: transparent; color: var(--c-ink-3, #94A3B8); border: 1px dashed var(--c-line, #E2E8F0); font-weight: 500; }
.tbl tr .cat-empty { opacity: 0; transition: opacity .15s; }
.tbl tr:hover .cat-empty, .tbl tr .cat-empty:focus { opacity: 1; }
@media (hover: none) { .tbl tr .cat-empty { opacity: .6; } }
.auth-card .brand-mark { width: 70px; height: 36px; }

.avatar.has-photo { background-size: cover; background-position: center; background-color: var(--c-line); color: transparent; }
.avatar.xl { width: 96px; height: 96px; font-size: 32px; }
.photo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* zóny Výhra / Prohra – objeví se při přetahování karty na nástěnce */
.board-drop { position: fixed; left: calc(var(--sidebar-w) + 24px); right: 24px; bottom: 18px; display: none; gap: 14px; z-index: 40; }
.board-drop.show { display: flex; }
.drop-zone { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; height: 72px; border-radius: 16px; border: 2px dashed; font-weight: 800; font-size: 15px; background: #fff; box-shadow: var(--sh-2, 0 8px 24px rgba(15,27,45,.12)); }
.drop-zone.won { color: #047857; border-color: #10B981; background: #ECFDF5; }
.drop-zone.lost { color: #B91C1C; border-color: #EF4444; background: #FEF2F2; }
.drop-zone.drop { transform: scale(1.02); border-style: solid; }
@media (max-width: 860px) { .board-drop { left: 16px; right: 16px; } }
/* mobil: přepínače a filtry v jednom řádku s vodorovným posunem místo zalamování */
.seg button { white-space: nowrap; }
@media (max-width: 860px) {
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .seg::-webkit-scrollbar { display: none; }
  .toolbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .toolbar::-webkit-scrollbar { display: none; }
  .toolbar > * { flex: none; }
  .toolbar .search { flex: 0 0 220px; }
  .toolbar .grow { display: none; }
  /* bezpečné okraje v aplikaci na ploše (výřez displeje iPhonu) */
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); }
  .page { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
[hidden] { display: none !important; }
