/* Cadence. Barvy a písma podle otacerny.cz. */
@font-face { font-family: 'Manrope'; font-weight: 300 800; font-display: swap; src: url(fonts/manrope.woff2) format('woff2'); }
@font-face { font-family: 'Bricolage Grotesque'; font-weight: 700 800; font-display: swap; src: url(fonts/bricolage-grotesque.woff2) format('woff2'); }

:root {
  --ink: #141a45; --navy: #1f2a6b; --orange: #d97757; --cream: #f7f3ea; --paper: #f2f4f9; --royal: #4169e1;
  --line: #e1e4ee; --muted: #6b7194; --white: #fff; --red: #c0392b; --green: #2e8b5e; --amber: #b8860b;
  --r: 12px; --sh: 0 1px 2px rgba(20, 26, 69, .06), 0 4px 16px rgba(20, 26, 69, .06);
  --display: 'Bricolage Grotesque', system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.45 Manrope, system-ui, sans-serif; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
body.has-modal { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--royal); }
.muted { color: var(--muted); }
.sm { font-size: 13px; }
.pad { padding: 24px; }
.sp { flex: 1; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -.01em; margin: 0; }

/* ---------- tlačítka a pole */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 999px; padding: 8px 16px; font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #fff; border-color: #c9cee0; }
.btn.sm { padding: 5px 11px; font-size: 13px; }
.btn.icon { width: 36px; height: 36px; padding: 0; }
.btn.danger { color: var(--red); }
input:not([type=checkbox]):not([type=radio]):not([type=color]), select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 8px 10px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--royal); box-shadow: 0 0 0 3px rgba(65, 105, 225, .15); }
textarea { resize: vertical; }
input[type=color] { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 3px; }
label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 700; color: var(--navy); }
label small, .lbl small { font-weight: 500; color: var(--muted); }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.hint { font-size: 13px; color: var(--muted); margin: 4px 0 0; }
.lbl { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: end; }
.row-btns { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.seg { display: inline-flex; background: #e7e9f2; border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh); }

/* ---------- stavy */
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; white-space: nowrap; border: 0; background: var(--st-bg); color: var(--st); }
button.pill { cursor: pointer; }
.st-napad { --st: #5a6283; --st-bg: #e8eaf3; }
.st-podklady { --st: #8a6508; --st-bg: #f6ecd0; }
.st-priprava { --st: #2c4fbf; --st-bg: #e1e8fb; }
.st-schvaleni { --st: #b5532f; --st-bg: #fbe5dc; }
.st-upravy { --st: #a8291c; --st-bg: #f8dcd8; }
.st-schvaleno { --st: #20734c; --st-bg: #d9f0e3; }
.st-publikovano { --st: #3e4466; --st-bg: #dfe1ea; }
.pill-new { --st: #fff; --st-bg: var(--orange); }
.dot-new { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; margin-right: 6px; }

/* ---------- přihlášení */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--ink); }
.auth-card { width: 100%; max-width: 380px; background: var(--cream); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-size: 28px; }
.auth-card .btn { margin-top: 6px; padding: 11px; }
.auth-err { margin: 0; color: var(--red); font-weight: 700; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-weight: 800; font-size: 17px; white-space: nowrap; }
button.brand { border: 0; background: none; padding: 4px 6px; margin: -4px -6px; border-radius: 8px; cursor: pointer; color: inherit; }
button.brand:hover { background: var(--paper); }
.ptop button.brand:hover { background: rgba(255, 255, 255, .08); }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--orange); }

/* ---------- aplikace */
/* rozbalovací seznamy: vlastní šipka s odsazením */
select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236b7194' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 11px 7px; padding-right: 34px !important; cursor: pointer; text-overflow: ellipsis; }
select:hover { border-color: #c4c9dc; }
select::-ms-expand { display: none; }
.ed-client select { font-weight: 800; border-color: transparent; background-color: var(--paper); }

.board { min-width: 0; }
.empty { padding: 40px; text-align: center; color: var(--muted); background: #fff; border-radius: var(--r); }

/* kalendář */
.cal { background: #fff; border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.cal-h { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); }
.cal-h div { padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.day { min-height: 118px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 4px; transition: background .12s; }
.day:nth-child(7n) { border-right: 0; }
.day.out { background: #fafbfd; }
.day.out .day-h span { color: #b4b9cf; }
.day.today .day-h span { background: var(--orange); color: #fff; border-radius: 999px; padding: 0 7px; }
.day.over, .backlog.over { background: #eef2fd; box-shadow: inset 0 0 0 2px var(--royal); }
.day-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; height: 22px; }
.day-add { opacity: 0; border: 0; background: var(--paper); border-radius: 6px; width: 22px; height: 22px; cursor: pointer; font-weight: 700; color: var(--muted); }
.day:hover .day-add { opacity: 1; }
.day-add:hover { background: var(--navy); color: #fff; }
.chip { display: flex; align-items: center; gap: 6px; background: var(--st-bg); border-radius: 6px; padding: 4px 7px; font-size: 12px; line-height: 1.25; cursor: grab; user-select: none; min-width: 0; }
.chip:hover { filter: brightness(.97); }
.chip.dragging { opacity: .35; }
.chip img { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; flex: none; }
.chip .cdot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.chip-t { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-weight: 600; color: var(--ink); }
.chip-t em { font-style: normal; font-weight: 800; color: var(--st); margin-right: 4px; }
.chip small { font-size: 11px; color: var(--muted); font-weight: 700; }
.chip .dot-new { margin: 0; }

/* seznam */
.lh { font-size: 18px; text-transform: capitalize; margin: 18px 0 8px; display: flex; gap: 8px; align-items: baseline; }
.lh:first-child { margin-top: 0; }
.lh small { font-family: Manrope, sans-serif; font-size: 13px; color: var(--muted); }
.tbl { background: #fff; border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.row { display: grid; grid-template-columns: 74px 92px minmax(180px, 1fr) 64px 110px 48px 140px; gap: 12px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.row.with-client { grid-template-columns: 74px 92px 120px minmax(180px, 1fr) 64px 110px 48px 140px; }
.row:last-child { border-bottom: 0; }
.row:hover { background: #fafbfd; }
.row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-date { font-weight: 700; color: var(--navy); white-space: nowrap; }
.r-client { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.r-client i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.r-title { font-weight: 700; display: flex; align-items: center; min-width: 0; }
.r-title > span { overflow: hidden; text-overflow: ellipsis; }
.r-title small { font-weight: 500; color: var(--muted); margin-left: 8px; }
.r-fmt, .r-pil, .r-who { font-size: 13px; color: var(--muted); }
.r-fmt em { font-style: normal; color: var(--green); font-weight: 800; }
.r-pv img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; display: block; }
.r-pv .pr-noimg { display: block; width: 40px; height: 40px; }

/* zásobník */

/* ---------- modální okna */
.modal { position: fixed; inset: 0; background: rgba(20, 26, 69, .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow: auto; animation: fade .15s ease-out; }
.modal-box { background: var(--paper); border-radius: 18px; width: 100%; max-width: 1080px; box-shadow: 0 20px 60px rgba(20, 26, 69, .3); animation: rise .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.ed-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fff; border-radius: 18px 18px 0 0; }
.ed-top > :first-child { flex: 1; }
.ed-client { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.ed-client i { width: 10px; height: 10px; border-radius: 50%; }
.ed-client select { width: auto; }
.ed { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; padding: 18px; }
.ed-box.filedrag { box-shadow: 0 0 0 3px var(--royal), 0 20px 60px rgba(20, 26, 69, .3); }
.ed-form { display: flex; flex-direction: column; gap: 14px; }
.ed-title { font-family: var(--display); font-size: 22px !important; font-weight: 800; padding: 10px 12px !important; }
.stbar { display: flex; flex-wrap: wrap; gap: 6px; }
.stbar .pill { cursor: pointer; opacity: .55; padding: 5px 11px; flex-direction: row; font-size: 12px; color: var(--st); }
.stbar .pill input { display: none; }
.stbar .pill.on { opacity: 1; box-shadow: inset 0 0 0 2px var(--st); }
.stbar .pill:hover { opacity: 1; }
.cnt { align-self: flex-end; }
.media-ed .thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.th { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; cursor: grab; background: #fff; }
.th img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.th button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(20, 26, 69, .7); color: #fff; font-size: 11px; cursor: pointer; opacity: 0; }
.th:hover button { opacity: 1; }
.drop { width: 84px; height: 84px; border: 2px dashed #c4c9dc; border-radius: 10px; display: grid; place-items: center; cursor: pointer; color: var(--muted); font-weight: 700; font-size: 12px; text-align: center; }
.drop:hover { border-color: var(--royal); color: var(--royal); }
.ed-side { display: flex; flex-direction: column; gap: 16px; }
.ed-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 18px 18px; position: sticky; bottom: 0; }
.saved { font-size: 13px; }
.set-box { max-width: 920px; }
.set-h { font-family: var(--display); font-size: 18px; }
.set { display: grid; grid-template-columns: 200px 1fr; min-height: 420px; }
.set-list { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-right: 1px solid var(--line); }
.set-list button { display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 8px; font-weight: 700; cursor: pointer; color: var(--muted); }
.set-list button i { width: 9px; height: 9px; border-radius: 50%; }
.set-list button.on { background: #fff; color: var(--ink); box-shadow: var(--sh); }
.set-body { padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.set-body.solo { max-width: 720px; }
.set-body h4 { font-size: 16px; margin-top: 8px; }
.cl-form { display: flex; flex-direction: column; gap: 12px; }
.ppl { display: flex; flex-direction: column; gap: 6px; }
.pp { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pp input { flex: 1 1 150px; width: auto !important; }
.pp.ro { gap: 12px; padding: 8px 10px; background: #fff; border-radius: 9px; }

/* ---------- náhled příspěvku */
.pv { background: #fff; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); width: 100%; }
.pvw { max-width: 400px; width: 100%; margin: 0 auto; }
.pv-head { display: flex; align-items: center; gap: 9px; padding: 10px 12px; font-size: 13px; line-height: 1.2; }
.pv-head small { display: block; color: var(--muted); font-size: 11px; }
.pv-av { width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; flex: none; }
.pv-media { position: relative; overflow: hidden; background: #eceef5; max-height: 560px; }
.pv-tall .pv-media { max-height: 520px; margin: 0 auto; }
.pv-track { display: flex; height: 100%; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.pv-track img { width: 100%; height: 100%; flex: none; object-fit: cover; display: block; }
.pv-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 13px; background: repeating-linear-gradient(45deg, #eceef5 0 12px, #e5e8f1 12px 24px); }
.pv-empty b { font-family: var(--display); font-size: 18px; color: var(--navy); }
.pv-arr { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); font-size: 18px; line-height: 1; cursor: pointer; box-shadow: var(--sh); }
.pv-prev { left: 8px; } .pv-next { right: 8px; }
.pv-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; }
.pv-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.pv-dots i.on { background: #fff; }
.pv-count { position: absolute; top: 8px; right: 8px; background: rgba(20, 26, 69, .7); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
.pv-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(20, 26, 69, .8); color: #fff; text-decoration: none; font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px; }
.pv-cap { padding: 10px 12px 12px; font-size: 13px; line-height: 1.45; white-space: pre-line; position: relative; }
.pv-cap .pv-text { display: inline; }
.pv-cap:not(.open) { max-height: calc(1.45em * 3 + 10px); overflow: hidden; padding-bottom: 0; margin-bottom: 12px; }
.pv-more { position: absolute; right: 0; bottom: 0; border: 0; background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 30%); color: var(--muted); font-size: 13px; line-height: 1.45; cursor: pointer; padding: 0 12px 0 36px; }
.pv-cap.open .pv-more { display: none; }
.pv-cap-empty { color: var(--muted); font-style: italic; }

/* ---------- vlákno */
.thread { background: #fff; border-radius: 14px; padding: 12px; border: 1px solid var(--line); }
.th-list { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; margin-bottom: 10px; }
.th-empty { margin: 0; color: var(--muted); font-size: 13px; }
.th-c { background: var(--paper); border-radius: 10px; padding: 8px 10px; font-size: 13px; }
.th-client { background: var(--cream); }
.th-h { display: flex; align-items: center; gap: 6px; }
.th-h time { margin-left: auto; color: var(--muted); font-size: 11px; }
.th-b { white-space: pre-line; margin-top: 3px; }
.th-ev { font-size: 11px; color: var(--muted); text-align: center; }
.th-add { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.tag { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 1px 7px; }
.tag-ok { background: #d9f0e3; color: var(--green); }
.tag-bad { background: #f8dcd8; color: var(--red); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; max-width: calc(100% - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--red); }

/* ---------- portál klienta */
.is-portal { background: var(--cream); }
.ptop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--ink); color: #fff; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.2; }
.who small { display: block; opacity: .7; font-size: 12px; }
.pmain { max-width: 1040px; margin: 0 auto; padding: 24px 16px 60px; display: flex; flex-direction: column; gap: 36px; }
.pmain h2 { font-size: 26px; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.badge { white-space: nowrap; flex: none; background: var(--orange); color: #fff; font-family: Manrope, sans-serif; font-size: 14px; border-radius: 999px; padding: 2px 10px; }
.calm { margin: 0; padding: 18px; background: #fff; border-radius: var(--r); color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; align-items: start; }
.card { background: #fff; border-radius: 18px; padding: 16px; box-shadow: var(--sh); display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 16px; }
.card h3 { font-size: 19px; }
.card .pv { max-width: none; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); }
.meta span:not(:last-child)::after { content: '·'; margin-left: 6px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.card .acts { margin-top: 0; }
.acts .btn-primary { flex: 1 1 auto; padding: 11px 18px; font-size: 15px; }
.ok-note { color: var(--green); font-weight: 800; }
.chg[hidden] { display: none; }
.chg { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.chg .row-btns { justify-content: flex-end; margin: 0; }
.plist { background: #fff; border-radius: var(--r); box-shadow: var(--sh); overflow: hidden; }
.prow { display: grid; grid-template-columns: 74px 1fr 40px auto; gap: 12px; align-items: center; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); background: #fff; padding: 10px 14px; cursor: pointer; }
.prow:last-child { border-bottom: 0; }
.prow:hover { background: #fafbfd; }
.prow img { width: 40px; height: 40px; border-radius: 6px; object-fit: cover; }
.prow .r-title { display: block; }
.prow .r-title small { display: block; margin: 2px 0 0; }
.pm-box { max-width: 860px; }
.pm-box .ed-top h3 { font-size: 20px; margin-top: 2px; }
.pm { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; padding: 18px; align-items: start; }

/* ---------- menší obrazovky */

/* ---------- v2: přehled, panel příspěvku, sítě */
.own-check { align-items: flex-start; background: var(--paper); border-radius: 10px; padding: 10px 12px; }
.own-check input { margin-top: 3px; }
.own-check small { display: block; font-weight: 500; color: var(--muted); }
.linkbtn { white-space: nowrap; border: 0; background: none; padding: 0; color: var(--royal); font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-cream { background: var(--cream); color: var(--ink); }
.btn-cream::after { content: '→'; color: var(--orange); margin-left: 4px; }
.btn-cream:hover { background: #fff; }
.day.past:not(.today) { background: #fbfbfd; }
.day.past .chip { opacity: .75; }

/* Co teď */
.pb { background: #fff; border-radius: var(--r); box-shadow: var(--sh); margin-bottom: 16px; overflow: hidden; }
.pb-h { padding: 14px 16px 10px; }
.pb-h h3 { font-size: 18px; display: flex; align-items: baseline; gap: 8px; }
.pb-h h3 small { font-family: Manrope, sans-serif; font-size: 13px; color: var(--muted); }
.pb-h p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.pb-late { opacity: .92; }
.pr-btns { display: flex; gap: 6px; flex: none; }
.prl { border-top: 1px solid var(--line); }
.pr { display: flex; align-items: center; gap: 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pr:last-child { border-bottom: 0; }
.pr:hover { background: #fafbfd; }
.pr-when { width: 72px; flex: none; font-weight: 800; font-size: 13px; color: var(--navy); }
.pr-when.late { color: var(--red); }
.pr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-main b { display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-main small { color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pr img, .pr-noimg { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; flex: none; }
.pr-noimg { background: repeating-linear-gradient(45deg, #eceef5 0 6px, #e5e8f1 6px 12px); }
.cdot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; }
.why { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.why.bad { background: #f8dcd8; color: var(--red); }
.why.new { background: var(--orange); color: #fff; }
.miss { color: #a0651a; font-weight: 700; }
.ok-mini { color: var(--green); font-weight: 700; }
.pick { display: grid; place-items: center; width: 24px; cursor: pointer; }
.pick input { width: 18px; height: 18px; accent-color: var(--navy); cursor: pointer; }
.pb-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #fafbfd; border-top: 1px solid var(--line); }
.calm-big { background: #fff; border-radius: var(--r); padding: 40px 24px; text-align: center; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--sh); }
.calm-big b { font-family: var(--display); font-size: 24px; }
.calm-big span { color: var(--muted); }

/* seznam */
.r-pl { display: flex; gap: 3px; }
.plb { width: 20px; height: 20px; border-radius: 5px; display: grid; place-items: center; font-style: normal; font-size: 10px; font-weight: 800; color: #fff; }
.pl-ig.plb { background: #c13584; } .pl-fb.plb { background: #1877f2; } .pl-li.plb { background: #0a66c2; }
.st-sel { width: 100% !important; border: 0 !important; border-radius: 999px !important; padding: 5px 28px 5px 12px !important; font-size: 12px; font-weight: 700; background-color: var(--st-bg) !important; background-position: right 10px center; color: var(--st); cursor: pointer; }

/* panel příspěvku */
.drawer { position: fixed; inset: 0; z-index: 50; background: rgba(20, 26, 69, .35); display: flex; justify-content: flex-end; animation: fade .15s ease-out; }
.drawer-box { width: min(1060px, 100%); height: 100%; background: var(--paper); display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(20, 26, 69, .25); animation: slidein .22s cubic-bezier(.2, .8, .2, 1); }
.drawer-box.filedrag { box-shadow: inset 0 0 0 3px var(--royal); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.dr-top { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: #fff; border-bottom: 1px solid var(--line); }
.dr-top .ed-client { flex: 1; }
.saved { font-size: 13px; }
.saved.bad { color: var(--red); font-weight: 700; }
.dr-body { flex: 1; overflow: auto; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; padding: 18px; align-items: start; }
.dr-body .ed-side { position: sticky; top: 0; }
.dr-foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: #fff; border-top: 1px solid var(--line); }
.ed-form fieldset { border: 0; margin: 0; padding: 14px; background: #fff; border-radius: var(--r); display: flex; flex-direction: column; gap: 12px; }
.ed-form legend { float: left; width: 100%; padding: 0; font-family: var(--display); font-weight: 800; font-size: 15px; margin-bottom: 2px; }
.ed-form legend + * { clear: both; }
.flow { display: flex; align-items: center; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.flow-s { border: 0; background: transparent; color: var(--muted); padding: 5px 8px; white-space: nowrap; flex: none; border-radius: 999px; font-size: 12px; font-weight: 700; cursor: pointer; }
.flow-s:hover { background: var(--st-bg); color: var(--st); }
.flow-s.on { background: var(--st-bg); color: var(--st); box-shadow: inset 0 0 0 2px var(--st); }
.flow-ar { color: #c4c9dc; font-size: 13px; }
.plsel { display: flex; flex-wrap: wrap; gap: 6px; }
.plt { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; flex-direction: row; }
.plt.on { color: #fff; border-color: transparent; }
.plt.pl-ig.on { background: #c13584; } .plt.pl-fb.on { background: #1877f2; } .plt.pl-li.on { background: #0a66c2; }
.captabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: -4px; }
.captabs button { border: 0; background: none; padding: 7px 12px; font-weight: 700; font-size: 13px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.captabs button.on { color: var(--ink); border-bottom-color: var(--orange); }
.captabs i { font-style: normal; font-size: 10px; background: var(--orange); color: #fff; border-radius: 999px; padding: 1px 6px; margin-left: 3px; vertical-align: 1px; }
.caprow { display: flex; align-items: center; gap: 10px; }
.cnt { font-size: 12px; color: var(--muted); font-weight: 600; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; }
.more { background: #fff; border-radius: var(--r); padding: 12px 14px; }
.more summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--navy); }
.more[open] summary { margin-bottom: 12px; }
.more label + label { margin-top: 10px; }
.menu-wrap { position: relative; }
.menu { position: absolute; bottom: calc(100% + 6px); left: 0; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 26, 69, .2); padding: 6px; display: flex; flex-direction: column; min-width: 240px; z-index: 5; }
.menu[hidden] { display: none; }
.menu button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.menu button:hover { background: var(--paper); }
.menu .danger { color: var(--red); }

/* náhledy podle sítí */
.pv-tabs { display: flex; gap: 4px; margin-bottom: 8px; justify-content: center; }
.pv-tab { border: 0; background: #e7e9f2; color: var(--muted); border-radius: 999px; padding: 5px 12px; font-size: 12px; font-weight: 700; cursor: pointer; position: relative; }
.pv-tab.on { background: var(--ink); color: #fff; }
.pv-tabs.single .pv-tab { background: transparent; color: var(--muted); cursor: default; padding: 0; }
.pv-tab i { position: absolute; top: 2px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.pv-var { display: none; }
.pv-var.on { display: block; }
.pv-av.sq { border-radius: 6px; }
.pv-bar { display: flex; gap: 14px; padding: 8px 12px 0; font-size: 16px; color: var(--ink); }
.pv-bar-txt { justify-content: space-around; border-top: 1px solid var(--line); margin: 4px 12px 0; padding: 8px 0; font-size: 12px; font-weight: 700; color: var(--muted); }
.pv-fb .pv-cap, .pv-li .pv-cap { padding: 0 12px 10px; }
.pv-fb .pv-cap:not(.open), .pv-li .pv-cap:not(.open) { margin-bottom: 10px; padding-bottom: 0; }
.pv-li .pv-cap:not(.open) { max-height: calc(1.45em * 3); }
.pv-fb .pv-cap:not(.open) { max-height: calc(1.45em * 5); }
.pv-fb .pv-more, .pv-li .pv-more { padding-bottom: 0; }
.pv-li .pv-head small, .pv-fb .pv-head small { font-size: 11px; }

/* portál v2 */
.phero { background: var(--ink); color: #fff; padding: 8px 16px 36px; }
.phero-in { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.phero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.08; letter-spacing: -.02em; }
.phero .hl { color: var(--orange); }
.phero p { margin: 0; max-width: 560px; opacity: .8; font-size: 16px; }
.phero .btn { margin-top: 6px; padding: 11px 20px; }
.ptop { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.card-h h3 { margin-top: 4px; }
.card .acts { padding-top: 2px; }
.card .acts .btn-primary { flex: 1 1 auto; }
.card-th { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.card-th .th-list { margin: 0; max-height: none; }
.card-th .th-list:empty { display: none; }
.card-th .th-add { flex-direction: row; align-items: flex-end; }
.card-th textarea { resize: none; min-height: 38px; }
.card-done { padding: 14px 16px; }
.cd-row { display: flex; align-items: center; gap: 12px; }
.cd-row b { display: block; }
.cd-ok { width: 32px; height: 32px; border-radius: 50%; background: #d9f0e3; color: var(--green); display: grid; place-items: center; font-weight: 800; flex: none; }
.older { margin-top: 18px; }
.older summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 8px 0; }
.chg label { color: var(--ink); }
@media (max-width: 900px) {
  .dr-body { grid-template-columns: 1fr; }
  .dr-body .ed-side { position: static; }
}
@media (max-width: 640px) {
  .drawer-box { width: 100%; }
  .dr-body { padding: 12px; }
  .pr-when { width: 56px; }
  .pr img, .pr-noimg { display: none; }
  .phero { padding: 4px 16px 28px; }
}

@media (max-width: 1100px) {
  .row, .row.with-client { grid-template-columns: 70px 92px minmax(0, 1fr) 140px; }
  .r-client, .r-pl, .r-who, .r-pv { display: none !important; }
}
@media (max-width: 900px) {
  .ed, .pm { grid-template-columns: 1fr; }
  .day { min-height: 84px; padding: 4px; }
  .chip img, .chip .cdot { display: none; }
}
@media (max-width: 640px) {
  .cal-h div { padding: 6px 2px; text-align: center; font-size: 10px; }
  .day { min-height: 64px; }
  .chip { padding: 2px 4px; font-size: 10px; }
  .chip-t em, .chip small { display: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .set { grid-template-columns: 1fr; }
  .set-list { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .modal { padding: 0; }
  .modal-box { border-radius: 0; min-height: 100%; }
  .ed-top { border-radius: 0; }
  .ed-foot { border-radius: 0; }
  .row, .row.with-client { grid-template-columns: 56px 74px minmax(0, 1fr) auto; }
  .ptop { padding: 12px 16px; }
  .pmain h2 { font-size: 22px; }
  .cards { grid-template-columns: 1fr; }
  .prow { grid-template-columns: 68px 1fr auto; gap: 10px; }
  .prow img, .prow > span:nth-child(3):empty { display: none; }
}

/* ---------- v3: zásobník, pilíře, měsíc v číslech */
.seg button small { font-weight: 800; color: var(--muted); margin-left: 3px; }
.seg button.on small { color: var(--orange); }
.seg-sm button { padding: 5px 11px; font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.pick-cl { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }

.pil-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-bottom: 12px; }
.pil-top .check { flex-direction: row; align-items: center; }
.pcols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.pcol { background: #fff; border-radius: var(--r); box-shadow: var(--sh); min-height: 160px; transition: box-shadow .12s, background .12s; }
.pcol.over { background: #f6f8fe; box-shadow: inset 0 0 0 2px var(--pc), var(--sh); }
.pcol-h { display: flex; align-items: center; gap: 8px; padding: 12px 14px 10px; }
.pcol-h i { width: 10px; height: 10px; border-radius: 3px; background: var(--pc); flex: none; }
.pcol-h b { font-family: var(--display); font-size: 15px; flex: 1; min-width: 0; }
.pcol-h small { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.pcol-l { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 12px; }
.pcol-empty { margin: 0; padding: 18px 6px; text-align: center; font-size: 13px; color: #b4b9cf; border: 2px dashed var(--line); border-radius: 10px; }
.pcard { display: flex; flex-direction: column; gap: 6px; background: var(--paper); border-radius: 10px; padding: 10px; cursor: grab; user-select: none; }
.pcard:hover { box-shadow: inset 0 0 0 1px #d5d9e7; }
.pcard.dragging { opacity: .35; }
.pcard img { width: 100%; height: 90px; object-fit: cover; border-radius: 7px; }
.pcard-t small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); }
.pcard-t b { display: block; font-size: 14px; line-height: 1.3; margin-top: 2px; }
.pcard .pill { align-self: flex-start; font-size: 11px; padding: 2px 8px; }

.mb { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 18px; margin-bottom: 16px; }
.mb-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.mb-h h3 { font-size: 20px; display: flex; align-items: center; gap: 8px; }
.kpis { display: flex; gap: 8px; }
.kpis span { display: flex; flex-direction: column; align-items: center; background: var(--paper); border-radius: 10px; padding: 6px 14px; font-size: 11px; font-weight: 700; color: var(--muted); }
.kpis b { font-family: var(--display); font-size: 22px; color: var(--ink); line-height: 1.1; }
.tips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tips span { background: #fdf0e9; color: #9a4a2b; border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.mb-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.mb-c { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.mb-c h4 { font-size: 14px; margin-bottom: 10px; }
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-r { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 64px; align-items: center; gap: 10px; font-size: 13px; }
.bar-r.zero { color: #b4b9cf; }
.bar-l { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-t { height: 10px; background: var(--paper); border-radius: 999px; overflow: hidden; }
.bar-t i { display: block; height: 100%; background: var(--navy); border-radius: 999px; }
.bar-n { font-weight: 800; text-align: right; }
.bar-n small { font-weight: 600; color: var(--muted); margin-left: 6px; }
.rh-h, .rh-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.rh-h span { font-size: 10px; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; }
.rh-g { margin-top: 4px; }
.rh-d { min-height: 44px; background: var(--paper); border-radius: 6px; padding: 3px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px; }
.rh-d.today { box-shadow: inset 0 0 0 2px var(--orange); }
.rh-d em { width: 100%; font-style: normal; font-size: 10px; font-weight: 700; color: var(--muted); }
.rh-p { width: 18px; height: 18px; border: 0; border-radius: 4px; color: #fff; font-size: 10px; font-weight: 800; cursor: pointer; padding: 0; }
.rh-p:hover { transform: scale(1.15); }

.zadd { display: flex; flex-wrap: wrap; gap: 8px; background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 12px; margin-bottom: 18px; }
.zadd input[name=t] { flex: 1 1 260px; width: auto; }
.zadd select { flex: 0 1 190px; width: auto; }
.igrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 18px; }
.icard { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 14px 14px 12px 16px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; position: relative; overflow: hidden; transition: transform .12s, box-shadow .12s; }
.icard:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(20, 26, 69, .06), 0 8px 24px rgba(20, 26, 69, .1); }
.icard b { font-size: 15px; line-height: 1.3; }
.icard small { color: var(--muted); font-size: 12px; font-weight: 600; }
.icard-plan { flex-direction: row; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--muted); font-weight: 600; }
.icard-plan input { flex: 1; padding: 5px 8px !important; font-size: 12px; }
.lh .cdot { width: 10px; height: 10px; }
@media (max-width: 900px) {
  .mb-g { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bar-r { grid-template-columns: 90px 1fr 56px; }
  .kpis span { padding: 4px 10px; }
  .pcols { grid-auto-columns: 82%; }
}


/* ---------- kampaně: náhled Meta reklamy */
.pv-ad .pv-cap { padding: 0 12px 10px; }
.ad-bar { display: flex; align-items: center; gap: 10px; background: #f0f2f5; padding: 10px 12px; }
.ad-bar > div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.ad-bar small { font-size: 10px; color: var(--muted); letter-spacing: .02em; }
.ad-bar b { font-size: 14px; }
.ad-bar span:not(.ad-btn) { font-size: 12px; color: var(--muted); }
.ad-btn { flex: none; background: #e4e6eb; border-radius: 6px; padding: 7px 12px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pv-story { background: #111; border: 0; }
.st-frame { position: relative; aspect-ratio: 9 / 16; max-height: 560px; margin: 0 auto; overflow: hidden; color: #fff; }
.st-frame > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-frame .pv-empty { background: repeating-linear-gradient(45deg, #2a2f4a 0 12px, #252a43 12px 24px); color: #b4b9cf; }
.st-frame .pv-empty b { color: #fff; }
.st-top { position: absolute; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 14px 12px; font-size: 13px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); }
.st-top small { opacity: .8; font-size: 11px; }
.st-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 14px 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); text-align: center; }
.st-bottom p { margin: 0; font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.st-btn { background: #fff; color: #111; border-radius: 999px; padding: 4px 16px 8px; font-size: 12px; font-weight: 800; line-height: 1.1; }

/* ---------- kampaně: tým */
.vs-priprava { --st: #2c4fbf; --st-bg: #e1e8fb; }
.vs-schvaleni { --st: #b5532f; --st-bg: #fbe5dc; }
.vs-upravy { --st: #a8291c; --st-bg: #f8dcd8; }
.vs-schvaleno { --st: #20734c; --st-bg: #d9f0e3; }
.vs-vyrazeno { --st: #8a8fa8; --st-bg: #eceef3; }
.camp-tag { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; background: var(--ink); color: #fff; border-radius: 5px; padding: 2px 6px; margin-right: 6px; vertical-align: 2px; }
.vpills { display: inline-flex; gap: 3px; flex: none; }
.vp { position: relative; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-style: normal; font-size: 11px; font-weight: 800; background: var(--st-bg); color: var(--st); box-shadow: inset 0 0 0 1.5px var(--st); }
.vp.vs-vyrazeno { text-decoration: line-through; box-shadow: none; }
.vp .dot-new { position: absolute; top: -3px; right: -3px; margin: 0; width: 7px; height: 7px; }
.k-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.kgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.kcard { display: flex; gap: 14px; background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 12px; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.kcard:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(20, 26, 69, .06), 0 8px 24px rgba(20, 26, 69, .1); }
.kc-img { width: 84px; flex: none; }
.kc-img img, .kc-img .pr-noimg { width: 84px; height: 105px; border-radius: 8px; object-fit: cover; display: block; }
.kc-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.kc-b > small { font-size: 12px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.kc-b > b { font-family: var(--display); font-size: 17px; line-height: 1.2; }
.kc-f { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; }
.run { color: var(--green); }
.cbar { display: block; width: calc(100% + 12px); margin: 0 -6px; border: 0; background: var(--cc); color: #fff; font-size: 11px; font-weight: 800; text-align: left; padding: 2px 8px; height: 19px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; opacity: .9; }
.cbar.start { margin-left: 0; width: calc(100% + 6px); border-radius: 6px 0 0 6px; }
.cbar.end { width: calc(100% + 6px); border-radius: 0 6px 6px 0; }
.cbar.start.end { width: 100%; border-radius: 6px; }
.cbar:hover { opacity: 1; }
.vtabs { display: flex; flex-wrap: wrap; gap: 6px; }
.vtab { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 12px; cursor: pointer; min-width: 74px; text-align: left; }
.vtab b { font-family: var(--display); font-size: 16px; line-height: 1.1; }
.vtab small { font-size: 11px; font-weight: 700; color: var(--st); }
.vtab.on { border-color: var(--st); box-shadow: inset 0 0 0 1.5px var(--st); background: var(--st-bg); }
.vtab .dot-new { position: absolute; top: 5px; right: 5px; margin: 0; }
.vadd { justify-content: center; align-items: center; color: var(--muted); font-weight: 700; font-size: 13px; border-style: dashed; }
.vadd:hover { color: var(--royal); border-color: var(--royal); }
.flow-s.vs-priprava, .flow-s.vs-schvaleni, .flow-s.vs-upravy, .flow-s.vs-schvaleno, .flow-s.vs-vyrazeno { color: var(--muted); }
.flow-s[class*="vs-"]:hover, .flow-s[class*="vs-"].on { background: var(--st-bg); color: var(--st); }
.cnt.over { color: #b5532f; }
label .cnt { align-self: flex-end; font-weight: 600; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.slot { position: relative; display: flex; flex-direction: column; gap: 4px; }
.slot small { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; }
.slot img, .slot-up { width: 100%; border-radius: 8px; object-fit: cover; display: block; }
.slot-feed img, .slot-feed .slot-up { aspect-ratio: 4 / 5; }
.slot-story img, .slot-story .slot-up { aspect-ratio: 9 / 16; }
.slot-square img, .slot-square .slot-up { aspect-ratio: 1; }
.slot-up { display: grid; place-items: center; border: 2px dashed #c4c9dc; color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.slot-up:hover { border-color: var(--royal); color: var(--royal); }
.slot button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(20, 26, 69, .7); color: #fff; font-size: 11px; cursor: pointer; }
.pr .camp-tag { margin-right: 0; }

/* ---------- kampaně: portál */
.kcamp { background: #fff; border-radius: 18px; box-shadow: var(--sh); padding: 18px; margin-bottom: 18px; scroll-margin-top: 16px; }
.kcamp-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kcamp-h h3 { font-size: 22px; margin-top: 4px; }
.kcamp-h p { margin: 4px 0 0; }
.kcamp > .hint { margin: 8px 0 14px; }
.kvars { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; align-items: start; }
.kvar { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.kvar.vs-schvaleno { border-color: #a9d8bf; background: #f6fbf8; }
.kvar.vs-upravy { border-color: #efc2bb; }
.kvar-h { display: flex; align-items: center; justify-content: space-between; }
.kvar-h b { font-family: var(--display); font-size: 17px; }
.kvar .pvw { max-width: none; }
.vacts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vacts .btn-primary { flex: 1 1 auto; }
.portal .kcamp .pill { font-size: 11px; }
.imp-btn { align-self: flex-start; cursor: pointer; }
.lead-chk { flex-direction: row; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.lead-chk.on, .lead-chk:has(input:checked) { color: #8a6508; background: #f6ecd0; border-color: #e6d29a; }
.lead-chk input { margin: 0; }

/* ---------- portál: kalendář a role */
.lead-badge { color: #f6d77a; font-weight: 800; }
.acts-note { margin: 0; }
.ph2 { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ph2 h2 { margin: 0 !important; }
.pcal { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 12px; }
.pcal-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 10px; }
.pcal-nav b { font-family: var(--display); font-size: 18px; text-transform: capitalize; min-width: 150px; text-align: center; }
.pcal-h, .pcal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.pcal-h span { font-size: 11px; font-weight: 700; color: var(--muted); text-align: center; text-transform: uppercase; padding-bottom: 4px; }
.pday { min-height: 92px; background: var(--paper); border-radius: 8px; padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pday.out { opacity: .45; }
.pday.today { box-shadow: inset 0 0 0 2px var(--orange); }
.pday em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--muted); }
.pchip { display: flex; align-items: center; gap: 4px; border: 0; background: var(--st-bg); border-radius: 5px; padding: 3px 4px; font-size: 11px; font-weight: 600; text-align: left; cursor: pointer; min-width: 0; color: var(--ink); }
.pchip img { width: 18px; height: 18px; border-radius: 3px; object-fit: cover; flex: none; }
.pchip span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; }
.pcbar { display: block; background: var(--ink); color: #fff; font-size: 10px; font-weight: 800; border-radius: 4px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.pcal .legend i { width: 10px; height: 10px; border-radius: 3px; }
@media (max-width: 640px) {
  .pcal { padding: 8px; }
  .pday { min-height: 58px; padding: 3px; }
  .pchip { padding: 0; height: 8px; border-left: 0; background: var(--st); border-radius: 3px; }
  .pchip img, .pchip span { display: none; }
  .pcbar { font-size: 0; height: 5px; padding: 0; }
}

/* ---------- AI asistent */
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; margin-right: 6px; vertical-align: -1px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-warn { background: #fdf0e9; color: #7a3d22; border-radius: var(--r); padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.ai-warn.soft { background: #eef2fd; color: var(--navy); }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ai-col { display: flex; flex-direction: column; }
.ai-card form { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-card form select { width: auto; }
.ideas { border-top: 1px solid var(--line); }
.idea { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 400; color: var(--ink); cursor: pointer; }
.idea input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--navy); flex: none; }
.idea b { font-size: 15px; display: block; }
.idea small { color: var(--muted); font-weight: 600; font-size: 12px; }
.idea p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; }
.idea .hook { font-style: italic; color: var(--navy); }
.idea.added { opacity: .6; }
.dup { border-top: 1px solid var(--line); padding: 10px 16px; }
.dup p { margin: 0 0 6px; }
.dup-r { padding: 6px 10px; border-radius: 8px; background: var(--paper); margin-bottom: 4px; cursor: pointer; font-size: 14px; font-weight: 600; }
.dup-r small { color: var(--muted); font-weight: 500; }
.dup-r.keep { background: #d9f0e3; }
.ai-chat { position: sticky; top: 76px; display: flex; flex-direction: column; max-height: calc(100vh - 96px); }
.chat-list { flex: 1; overflow: auto; padding: 0 16px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.msg { max-width: 90%; padding: 10px 12px; border-radius: 12px; font-size: 14px; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; white-space: pre-line; }
.msg.assistant { align-self: flex-start; background: var(--paper); }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul { margin: 4px 0 6px; padding-left: 18px; }
.msg.typing { color: var(--muted); }
.chat-tips { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 12px; }
.chip-btn { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--navy); }
.chip-btn:hover { border-color: var(--royal); color: var(--royal); }
.chat-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-form textarea { resize: none; }
.ai-chat > .row-btns { padding: 0 16px 10px; margin: 0; }
.ai-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ai-instr { flex: 1 1 180px; width: auto !important; font-size: 13px; padding: 6px 10px !important; }
.ai-box { background: var(--paper); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.chk-h { display: flex; align-items: center; gap: 10px; }
.chk-h span { flex: 1; }
.score { border-radius: 8px; padding: 3px 8px; font-weight: 800; }
.score.sok { background: #d9f0e3; color: var(--green); } .score.smid { background: #f6ecd0; color: #8a6508; } .score.sbad { background: #f8dcd8; color: var(--red); }
.chk { margin: 8px 0 0; padding-left: 18px; }
.chk.good li::marker { content: '✓  '; color: var(--green); }
.chk.bad li::marker { content: '!  '; color: var(--red); font-weight: 800; }
.ai-box details { margin-top: 8px; }
.ai-box summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.rew { white-space: pre-line; background: #fff; border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.brand-box { border-top: 1px solid var(--line); padding-top: 10px; }
.brand-box summary { cursor: pointer; font-weight: 800; color: var(--navy); }
.brand-box[open] summary { margin-bottom: 6px; }
@media (max-width: 900px) { .ai-grid { grid-template-columns: 1fr; } .ai-chat { position: static; max-height: none; } }
.ai-how { background: #fff; border-radius: var(--r); box-shadow: var(--sh); padding: 12px 16px; margin-bottom: 14px; font-size: 14px; line-height: 1.5; }
.stepn { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; margin-right: 6px; }
.ai-card .lbl { margin: 4px 0 0; }
.ai-col > .pb + .pb { margin-top: 0; }
.brand-ai { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ser { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.ser .lbl small { font-weight: 600; color: var(--muted); }
.ser-r { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; border: 0; background: var(--paper); border-radius: 8px; padding: 6px 10px; text-align: left; cursor: pointer; font-size: 13px; color: var(--ink); }
.ser-r:hover { background: #e9ecf5; }
.ser-r.me { box-shadow: inset 0 0 0 2px var(--navy); background: #fff; cursor: default; }
.ser-r span { font-weight: 700; color: var(--navy); font-size: 12px; }
.ser-r b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ser-r small { color: var(--muted); }
.ser-r .pill { font-style: normal; font-size: 11px; }
.ser .linkbtn { align-self: flex-start; margin-top: 4px; }

/* ---------- scénář */
.sc-koncept { --st: #5a6283; --st-bg: #e8eaf3; } .sc-schvaleni { --st: #b5532f; --st-bg: #fbe5dc; } .sc-upravy { --st: #a8291c; --st-bg: #f8dcd8; } .sc-schvaleno { --st: #20734c; --st-bg: #d9f0e3; }
.sc-fs legend .pill { font-family: Manrope, sans-serif; font-size: 11px; margin-left: 6px; vertical-align: 2px; }
.sc-mini { margin: -4px 0 0; }
.sc-note { margin: 0; background: #fdf0e9; color: #7a3d22; border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.sc-note.bad { background: #f8dcd8; color: var(--red); }
.scenes { display: flex; flex-direction: column; gap: 6px; }
.sc-h, .sc-row { display: grid; grid-template-columns: 22px 84px repeat(3, minmax(0, 1fr)) 28px; gap: 6px; align-items: start; }
.sc-h span { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.sc-row { background: var(--paper); border-radius: 10px; padding: 6px; }
.sc-row textarea { font-size: 13px; padding: 6px 8px !important; resize: vertical; min-height: 54px; }
.sc-n { font-family: var(--display); text-align: center; padding-top: 6px; color: var(--navy); }
.sc-tools { display: flex; flex-direction: column; gap: 2px; }
.sc-tools button { border: 0; background: #fff; border-radius: 6px; width: 26px; height: 22px; cursor: pointer; font-size: 12px; color: var(--muted); }
.sc-tools button:hover:not(:disabled) { color: var(--ink); background: #e7e9f2; }
.sc-tools button:disabled { opacity: .3; cursor: default; }
.sc-pozn { grid-column: 3 / 6; font-size: 12px !important; padding: 5px 8px !important; }
.scenes > .linkbtn { align-self: flex-start; }
.sc-act { flex-wrap: wrap; }
.sc-pastebox { display: flex; flex-direction: column; gap: 6px; }
.linkbtn.danger { color: var(--red); }
.th-add .row-btns { margin: 0; width: 100%; }
.tag-sc { background: #e8eaf3; color: var(--navy); }
@media (max-width: 640px) {
  .sc-h { display: none; }
  .sc-row { grid-template-columns: 22px minmax(0, 1fr) 28px; }
  .sc-row textarea, .sc-pozn, .sc-img { grid-column: 2; }
  .sc-img { width: 120px; }
  .sc-tools { grid-column: 3; grid-row: 1; }
}
.sc-badge { display: inline-block; background: var(--navy); color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 3px 10px; margin-bottom: 6px; letter-spacing: .02em; }
.sdoc { display: flex; flex-direction: column; gap: 8px; }
.sdoc-hook { margin: 0; background: #fdf0e9; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.sdoc-s { display: grid; grid-template-columns: 26px 1fr; gap: 8px; background: var(--paper); border-radius: 10px; padding: 10px 12px; }
.sdoc-n { font-family: var(--display); font-size: 18px; color: var(--navy); }
.sdoc-s p { margin: 0 0 4px; font-size: 14px; line-height: 1.45; }
.sdoc-s p span { display: inline-block; min-width: 62px; font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.sdoc-foot { margin: 0; font-size: 14px; }
.linkbtn.sm { font-size: 12px; }
.sc-inline { font-weight: 700; color: var(--st); }
.pm .lbl .pill { font-size: 11px; }
.sc-dot { font-style: normal; margin-right: 3px; }

/* štítek formátu v seznamu */
.r-fmt { display: flex; align-items: center; gap: 4px; overflow: visible !important; }
.r-fmt em { font-style: normal; font-weight: 800; color: var(--green); }
.fmt-b { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; border-radius: 6px; padding: 4px 8px; color: #fff; background: #8a8fa8; }
.fmt-reel { background: #7b3fe4; }
.fmt-karusel { background: #2c6be0; }
.fmt-foto { background: #1f8a5a; }
.fmt-grafika { background: #d97757; }
.fmt-story { background: #c13584; }
.fmt-text { background: #3e4466; }
@media (max-width: 640px) { .fmt-b { font-size: 10px; padding: 3px 6px; } }

/* storyboard: obrázek ke scéně */
.sc-img { position: relative; width: 84px; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; background: #fff; }
.sc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-img button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(20, 26, 69, .7); color: #fff; font-size: 10px; cursor: pointer; opacity: 0; }
.sc-img:hover button { opacity: 1; }
.sc-up { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; border: 2px dashed #c4c9dc; border-radius: 8px; font-size: 11px; font-weight: 700; color: var(--muted); cursor: pointer; flex-direction: row; }
.sc-up:hover { border-color: var(--royal); color: var(--royal); }
.sc-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); }
.sc-row.over { box-shadow: inset 0 0 0 2px var(--royal); }

.sdoc-s.has-img { grid-template-columns: 26px 92px 1fr; }
.sdoc-img { border: 0; padding: 0; background: none; cursor: zoom-in; width: 92px; aspect-ratio: 9 / 16; border-radius: 8px; overflow: hidden; }
.sdoc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.zoom { position: fixed; inset: 0; z-index: 90; background: rgba(20, 26, 69, .85); display: grid; place-items: center; padding: 16px; cursor: zoom-out; animation: fade .15s; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; }
@media (max-width: 640px) { .sdoc-s.has-img { grid-template-columns: 22px 72px 1fr; } .sdoc-img { width: 72px; } }

/* =====================================================================
   v5: rozvržení aplikace (postranní panel + hlavička stránky) a sjednocení
   ===================================================================== */
:root { --side: 236px; --surface: #fff; --sh-1: 0 1px 2px rgba(20, 26, 69, .05), 0 2px 8px rgba(20, 26, 69, .04); --r-card: 14px; }
::selection { background: rgba(217, 119, 87, .25); color: var(--ink); }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; border-radius: 6px; }
* { scrollbar-width: thin; scrollbar-color: #c9cee0 transparent; }
.r-date, .pr-when, .day-h span, .kpis b, .bar-n, .cnt, .side-n { font-variant-numeric: tabular-nums; }
.ic { flex: none; width: 18px; height: 18px; }
.btn .ic { width: 16px; height: 16px; margin-right: 2px; }
.btn.icon .ic { margin: 0; }

.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow: auto; background: var(--surface); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.side .brand { margin: 0 6px 12px; padding: 4px 6px; }
.side-new { margin: 0 4px 14px; justify-content: flex-start; padding: 10px 14px; }
.side-sec { font-size: 11px; font-weight: 700; color: var(--muted); padding: 10px 12px 4px; }
.side-list { display: flex; flex-direction: column; gap: 1px; }
.side-i { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: transparent; border-radius: 8px; padding: 8px 10px; font-size: 14px; font-weight: 600; color: #3e4466; cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.side-i span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-i:hover { background: var(--paper); color: var(--ink); }
.side-i.on { background: #e9ecf6; color: var(--ink); font-weight: 800; }
.side-i .ic { color: var(--muted); }
.side-i.on .ic { color: var(--navy); }
.side-i .cdot { width: 10px; height: 10px; margin: 0 4px; }
.cdot.all { background: conic-gradient(var(--royal) 0 33%, var(--orange) 0 66%, #2e8b5e 0); }
.side-n { font-size: 11px; font-weight: 800; color: var(--muted); background: var(--paper); border-radius: 999px; padding: 1px 7px; }
.side-n.hot { background: var(--orange); color: #fff; }
.side-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }

.content { min-width: 0; padding: 22px 32px 48px; }
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ph h1 { font-size: 28px; line-height: 1.1; letter-spacing: -.02em; }
.ph-t p { margin: 4px 0 0; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; font-weight: 600; }
.ph-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mnav { display: flex; align-items: center; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.mnav b { font-family: Manrope, sans-serif; font-size: 14px; font-weight: 800; min-width: 128px; text-align: center; text-transform: capitalize; }
.mnav .btn.icon { width: 30px; height: 30px; border: 0; }
.mnav .btn.sm { border: 0; }
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.filters select { width: auto; font-size: 13px; border-radius: 999px; padding: 7px 32px 7px 14px; background-color: var(--surface); background-position: right 12px center; }
.filters .check { flex-direction: row; align-items: center; color: var(--muted); font-weight: 600; margin-left: 4px; }
.search { position: relative; flex: 0 1 300px; display: block; }
.search .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; pointer-events: none; }
.search input { width: 100% !important; border-radius: 999px !important; padding: 7px 14px 7px 36px !important; font-size: 13px; }
.board { min-width: 0; }

/* jeden styl karet: bílá plocha, jemný stín, poloměr 14 px */
.pb, .mb, .cal, .tbl, .kcard, .icard, .pcol, .calm-big, .zadd, .ai-how, .plist, .mb-c { border-radius: var(--r-card); box-shadow: var(--sh-1); border: 0; }
.mb-c { box-shadow: none; border: 1px solid var(--line); }
.pb { margin-bottom: 14px; }
.pb-h h3, .mb-h h3 { font-family: Manrope, sans-serif; font-size: 16px; font-weight: 800; letter-spacing: 0; }
.pb-h { padding: 16px 18px 12px; }
.pr { padding: 10px 18px; }

/* bez barevných postranních pruhů: stav nese tónovaná plocha a tečka */
.pb-hot .pb-h h3::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); margin-right: 8px; vertical-align: 2px; }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--st); flex: none; }
.chip:has(.cdot)::before { display: none; }
.icard b::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); margin-right: 8px; vertical-align: 2px; }

/* prázdná místa bez proužků */
.pr-noimg, .pv-empty, .st-frame .pv-empty { background: #eceef5; }
.st-frame .pv-empty { background: #2a2f4a; }
.sc-dot { display: inline-flex; vertical-align: -2px; margin-right: 4px; color: var(--st, var(--navy)); }
.sc-dot .ic { width: 13px; height: 13px; }
.sc-dot.schvaleni { color: #b5532f; } .sc-dot.upravy { color: var(--red); }

/* typografie produktu: display písmo jen pro nadpisy stránek a sekcí */
.lh { font-family: Manrope, sans-serif; font-size: 15px; font-weight: 800; letter-spacing: 0; }
.vtab b, .sc-n, .kc-b > b, .pcol-h b, .bl-h { font-family: Manrope, sans-serif; }

@media (max-width: 1100px) {
  .content { padding: 18px 22px 40px; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 10px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side .brand { margin: 0; order: 1; }
  .side-new { order: 2; margin: 0 0 0 auto; padding: 8px 12px; }
  .side-foot { order: 3; margin: 0; padding: 0; border: 0; }
  .side-foot .side-i span { display: none; }
  .side-sec { display: none; }
  .side-list { order: 4; flex-direction: row; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .side-i { width: auto; flex: none; padding: 7px 10px; }
  .side-nav .ic { display: none; }
  .content { padding: 16px 16px 40px; }
  .ph h1 { font-size: 24px; }
}
@media (max-width: 640px) {
  .search { flex-basis: 100%; }
  .mnav b { min-width: 0; padding: 0 4px; }
}
.ed-form legend { font-family: Manrope, sans-serif; font-size: 14px; font-weight: 800; letter-spacing: 0; }
.pcol { box-shadow: var(--sh-1), inset 0 1px 0 var(--pc); }
.pchip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--st); flex: none; }
@media (max-width: 640px) { .pchip::before { display: none; } }
@media (max-width: 640px) {
  /* řádek seznamu na mobilu ve dvou patrech: datum, formát, stav / téma */
  .row, .row.with-client { grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "d f s" "t t t"; row-gap: 6px; column-gap: 8px; padding: 10px 12px; }
  .row .r-date { grid-area: d; } .row .r-fmt { grid-area: f; } .row .r-st { grid-area: s; justify-self: end; width: 128px; }
  .row .r-title { grid-area: t; white-space: normal; }
  .row .r-title > span { white-space: normal; }
  .side-new { padding: 8px 10px; }
  .side-new .ic { margin: 0; }
  .side-new { font-size: 0; gap: 0; }
}
@media (max-width: 640px) { .row .r-title { display: block; } .row .r-title small { display: block; margin: 2px 0 0; } }
.bin-tabs { margin-bottom: 14px; }
.bin-hint { margin: -4px 0 14px; }
.icard-f { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px; }
.icard-f .icard-plan { margin: 0; flex: 1 1 180px; white-space: nowrap; }
.icard-f .linkbtn { color: var(--muted); margin-left: auto; }
.rev-sum { margin: 0; padding: 4px 18px 12px 34px; font-size: 13px; line-height: 1.5; border-top: 1px solid var(--line); padding-top: 12px; }
.rev-list { border-top: 1px solid var(--line); }
.rev { display: flex; flex-direction: row; gap: 12px; align-items: flex-start; padding: 10px 18px; border-bottom: 1px solid var(--line); font-weight: 400; color: var(--ink); cursor: pointer; }
.rev input { margin-top: 3px; width: 17px; height: 17px; accent-color: var(--navy); flex: none; }
.rev > div > b { font-size: 14px; display: block; cursor: pointer; }
.rev > div > b:hover { color: var(--royal); }
.rev-ch { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 3px 0; font-size: 12px; }
.rev-ch i { font-style: normal; background: var(--paper); border-radius: 6px; padding: 2px 8px; }
.rev-ch s { color: var(--muted); }
.rev small { color: var(--muted); font-size: 12px; }
.rev.done { opacity: .6; }
/* panel na celou stránku: obsah vystředěný, náhled širší */
.drawer-box { transition: width .25s cubic-bezier(.2, .8, .2, 1); }
.drawer-box.full { width: 100%; box-shadow: none; }
.drawer-box.full .dr-body { grid-template-columns: minmax(0, 760px) minmax(340px, 460px); justify-content: center; gap: 32px; padding: 28px 32px; }
.drawer-box.full .dr-top, .drawer-box.full .dr-foot { padding-left: max(18px, calc((100% - 1252px) / 2)); padding-right: max(18px, calc((100% - 1252px) / 2)); }
.drawer-box.full .pvw { max-width: 440px; }
@media (max-width: 900px) { .drawer-box.full .dr-body { grid-template-columns: 1fr; padding: 16px; } }

/* ---------- portál: scénář v seznamu a přes celou obrazovku */
.card-sc .card-h h3 { margin-top: 4px; }
.sb-strip { display: flex; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer; overflow: hidden; }
.sb-strip img { width: 56px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; flex: none; }
.sc-hook-x { margin: 0; font-size: 15px; line-height: 1.45; color: var(--navy); font-style: italic; }
.card-sc .acts .btn-primary { flex: 1 1 100%; }
.sc-open { display: flex; align-items: center; gap: 10px; width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; cursor: pointer; text-align: left; }
.sc-open b { flex: 1; } .sc-open small { color: var(--muted); }
.sc-open:hover { border-color: var(--royal); }

.reader { position: fixed; inset: 0; z-index: 60; background: var(--cream); animation: fade .15s ease-out; }
.rd { display: flex; flex-direction: column; height: 100%; }
.rd-top { display: flex; align-items: center; gap: 14px; padding: 12px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.rd-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.rd-t small { color: var(--muted); font-size: 12px; font-weight: 600; }
.rd-t b { font-family: var(--display); font-size: 18px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-body { flex: 1; overflow: auto; padding: 28px 20px 40px; }
.rd-body > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.rd-lead { margin-top: 0; margin-bottom: 18px; }
.rd-hook { background: #fbe9e1; border-radius: 14px; padding: 14px 18px; font-size: 17px; line-height: 1.5; margin-bottom: 18px; }
.rd-hook span, .rd-txt p span { display: block; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.rd-cta { background: #e9ecf6; margin-top: 4px; }
.rd-scene { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 14px; background: #fff; border-radius: 14px; box-shadow: var(--sh-1); padding: 18px 20px; margin-bottom: 14px; scroll-margin-top: 16px; }
.rd-scene.has-img { grid-template-columns: 32px 168px minmax(0, 1fr); }
.rd-n { font-family: var(--display); font-size: 24px; color: var(--navy); line-height: 1; }
.rd-img { border: 0; padding: 0; background: none; cursor: zoom-in; width: 168px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; align-self: start; }
.rd-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-txt { min-width: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.rd-txt p { margin: 0; font-size: 16px; line-height: 1.55; }
.rd-rec { font-size: 17px !important; }
.rd-cm { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.rd-cform, .rd-gform { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.rd-cform .row-btns, .rd-gform .row-btns { margin: 0; }
.rd-general { background: #fff; border-radius: 14px; box-shadow: var(--sh-1); padding: 18px 20px; margin-top: 18px; }
.rd-general h3 { font-family: Manrope, sans-serif; font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.rd-general .th-list { max-height: none; }
.rd-bar { position: sticky; bottom: 0; background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(20, 26, 69, .08); padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rd-bar > * { }
.rd-btns { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 760px; margin: 0 auto; }
.rd-btns .btn-primary { min-width: 220px; }
.rd-chg { width: 100%; max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.rd-chg .row-btns { margin: 0; }
.rd-note { margin: 0 auto; max-width: 760px; width: 100%; color: var(--muted); font-size: 14px; }
.rd-bar .ok-note { margin-left: max(0px, calc((100% - 760px) / 2)); }
.rd-bar > .btn-primary { margin-right: max(0px, calc((100% - 760px) / 2)); }
@media (max-width: 640px) {
  .rd-top { padding: 10px 12px; gap: 8px; }
  .rd-top .pill { display: none; }
  .rd-body { padding: 18px 12px 28px; }
  .rd-scene, .rd-scene.has-img { grid-template-columns: 26px minmax(0, 1fr); padding: 14px; }
  .rd-img { grid-column: 2; width: 140px; }
  .rd-txt { grid-column: 2; }
  .rd-btns .btn { flex: 1; min-width: 0; padding: 12px 10px; }
  .rd-btns .sp, .rd-btns .pill { display: none; }
  .rd-bar { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
}
body:has(.reader) .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }

/* Kontrola zařazení: výběr období */
.rev-scope { flex-wrap: wrap; }
.rev-range { display: inline-flex; gap: 8px; align-items: center; }
.rev-range label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.rev-range input { width: auto; }

/* ---------- scénář: v panelu karta, editor na celé stránce */
.sc-open { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "t imgs" "go imgs"; gap: 4px 16px; align-items: start; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--cream); border-radius: 12px; padding: 14px 16px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.sc-open:hover { border-color: var(--navy); box-shadow: var(--sh); }
.sc-open:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }
.sc-o-t { grid-area: t; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-o-t small { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.sc-o-t b { font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sc-o-t .muted { font-size: 13px; }
.sc-o-imgs { grid-area: imgs; display: flex; gap: 4px; }
.sc-o-imgs img { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; background: #fff; }
.sc-o-go { grid-area: go; font-weight: 700; font-size: 13px; color: var(--navy); margin-top: 6px; }
.sc-open:hover .sc-o-go { color: var(--orange); }

.sc-page { position: fixed; inset: 0; z-index: 60; background: var(--paper); display: flex; flex-direction: column; animation: fade .15s ease-out; }
.sc-page .rd-top .saved { font-size: 13px; white-space: nowrap; }
.scp-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.scp-main { overflow: auto; padding: 24px 28px 48px; }
.scp-side { overflow: auto; background: #fff; border-left: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.scp-side .lbl { margin: 0; }
.sc-page .sc-row textarea { min-height: 72px; font-size: 14px; }
@media (max-width: 960px) {
  .scp-body { grid-template-columns: 1fr; overflow: auto; }
  .scp-main { overflow: visible; padding: 16px; }
  .scp-side { border-left: 0; border-top: 1px solid var(--line); overflow: visible; }
}

/* přesouvání scén za číslo */
.sc-n { border: 0; background: transparent; border-radius: 6px; padding: 6px 0 4px; cursor: grab; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 16px; font-weight: 700; }
.sc-n i { font-style: normal; font-size: 12px; color: var(--muted); line-height: 1; }
.sc-n:hover { background: #e7e9f2; }
.sc-n:hover i { color: var(--ink); }
.sc-n:active { cursor: grabbing; }
.sc-n:focus-visible { outline: 2px solid var(--royal); }
.sc-row.dragging { opacity: .4; }
.sc-row.drop-b { box-shadow: 0 -3px 0 var(--royal); }
.sc-row.drop-a { box-shadow: 0 3px 0 var(--royal); }

/* stránka scénáře: horní lišta s akcemi, karty Základ a Scény */
.sc-page .rd-top { gap: 12px; padding: 12px 24px; }
.sc-page .rd-top .pill { flex: none; }
.scp-act { display: flex; gap: 8px; align-items: center; flex: none; }
.scp-act .ok-note { margin-right: 4px; }
.scp-wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.scp-card { background: #fff; border-radius: var(--r); padding: 18px 20px; }
.scp-meta { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 14px 16px; align-items: start; }
.scp-meta label > span { display: flex; align-items: baseline; gap: 8px; }
.scp-meta textarea[name=sc_hook] { font-size: 15px; font-weight: 600; resize: vertical; min-height: 0; }
.scp-h { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.scp-h h3 { margin: 0; font-size: 15px; color: var(--ink); }
.scp-h h3 small { font-weight: 600; color: var(--muted); margin-left: 4px; }
.sc-page .scenes { gap: 8px; }
.sc-page .sc-row { padding: 10px 8px; }
.sc-addrow { border: 1.5px dashed var(--line); background: transparent; border-radius: 10px; padding: 12px; font: inherit; font-weight: 700; font-size: 13px; color: var(--navy); cursor: pointer; transition: border-color .15s, background .15s; }
.sc-addrow:hover { border-color: var(--navy); background: var(--paper); }
.sc-page .sc-act { margin: 0; padding: 0 4px; }
@media (max-width: 1240px) { .scp-body { grid-template-columns: minmax(0, 1fr) 300px; } .sc-page .rd-top { padding: 10px 16px; } .scp-main { padding: 20px; } }
@media (max-width: 860px) {
  .sc-page .rd-top { flex-wrap: wrap; }
  .scp-act { width: 100%; justify-content: flex-end; }
}
@media (max-width: 640px) { .scp-meta { grid-template-columns: 1fr; } }

/* =====================================================================
   v6: znak klienta, značka, patička s odkazem na web, prémiové doladění
   ===================================================================== */
/* znak klienta: logo na bílé dlaždici, jinak iniciály v barvě klienta */
.cmark { width: 22px; height: 22px; border-radius: 6px; flex: none; display: inline-grid; place-items: center; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.cmark.has-logo { background: #fff; object-fit: contain; padding: 2px; box-shadow: inset 0 0 0 1px var(--line); }
.cmark.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 15px; }
.cmark.lg.has-logo { padding: 5px; }
.cmark.xl { width: 72px; height: 72px; border-radius: 16px; font-size: 22px; }
.cmark.xl.has-logo { padding: 8px; }
.pv-av.has-logo { background: #fff; object-fit: contain; box-shadow: inset 0 0 0 1px var(--line); }
.side-i .cmark { margin: 0 1px; }
.set-list button .cmark { width: 20px; height: 20px; }
.mb-h h3 .cmark { margin-right: 8px; vertical-align: -5px; }

/* značka aplikace */
.brand-mark { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.side .brand { gap: 10px; font-size: 16px; letter-spacing: -.01em; }

/* hlavička stránky se znakem klienta */
.ph-t { display: flex; align-items: center; gap: 14px; }
.ph-t p { margin-top: 2px; }

/* prázdné stavy s akcí */
.calm-big .row-btns { margin-top: 12px; }
.row-btns.center { justify-content: center; }
.calm-big b { color: var(--ink); }

/* barva klienta jako vzorek, ne pruh přes celou šířku */
input[type=color] { width: 44px; height: 38px; padding: 4px; cursor: pointer; }
input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 6px; }

/* nastavení klienta: logo, název a barva v jednom řádku */
.cl-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.cl-logo { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 96px; }
.cl-logo .linkbtn { font-size: 12px; cursor: pointer; flex-direction: row; }
.cl-logo small { font-size: 11px; text-align: center; max-width: 96px; }
.cl-color input { width: 56px; }

/* patička: kdo nástroj připravuje, odkaz na web */
.ota-foot { padding: 28px 0 8px; }
.of-in { display: flex; align-items: center; gap: 14px; max-width: 640px; text-decoration: none; color: inherit; padding: 12px 18px 12px 12px; border-radius: 16px; transition: background .2s, box-shadow .2s; }
.of-in img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: none; }
.of-in > span:not(.of-go) { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.of-in small { font-size: 11px; font-weight: 700; color: var(--muted); }
.of-in b { font-size: 15px; color: var(--ink); }
.of-in em { font-style: normal; font-size: 13px; color: var(--muted); }
.of-go { font-weight: 800; font-size: 13px; color: var(--navy); white-space: nowrap; transition: transform .2s cubic-bezier(.2, .8, .2, 1), color .2s; }
.of-in:hover { background: var(--surface); box-shadow: var(--sh-1); }
.of-in:hover .of-go { color: var(--orange); transform: translateX(3px); }
.content > .ota-foot { margin-top: 32px; border-top: 1px solid var(--line); }
.content > .ota-foot .of-in { margin-left: -12px; }
.ota-foot.on-cream { background: var(--cream); padding: 28px 16px 40px; }
.ota-foot.on-cream .of-in { margin: 0 auto; background: #fff; box-shadow: var(--sh-1); }
.ota-foot.on-dark { position: fixed; left: 0; right: 0; bottom: 0; padding: 16px; }
.ota-foot.on-dark .of-in { margin: 0 auto; max-width: 540px; }
.ota-foot.on-dark small, .ota-foot.on-dark em { color: rgba(247, 243, 234, .6); }
.ota-foot.on-dark b, .ota-foot.on-dark .of-go { color: var(--cream); }
.ota-foot.on-dark .of-in:hover { background: rgba(255, 255, 255, .06); box-shadow: none; }
@media (max-width: 640px) { .of-go { display: none; } .ota-foot.on-dark { position: static; } }

/* portál: hlavička se znakem klienta */
.pbrand { gap: 12px; text-align: left; font-family: Manrope, sans-serif; }
.pbrand > span:not(.cmark) { display: flex; flex-direction: column; line-height: 1.2; }
.pbrand b { font-family: var(--display); font-size: 17px; font-weight: 800; }
.pbrand small { font-size: 12px; font-weight: 600; opacity: .65; }
.pbrand .cmark.lg { width: 40px; height: 40px; }
.portal { background: var(--cream); min-height: 100vh; display: flex; flex-direction: column; }
.portal > .pmain { flex: 1; width: 100%; }

/* přihlášení: větší značka, karta s jemným stínem */
.auth { padding-bottom: 120px; }
.auth-card { box-shadow: 0 24px 60px rgba(0, 0, 0, .25); padding: 32px; }
.auth-card .brand { gap: 10px; font-size: 16px; color: var(--ink); }

/* drobnosti: plynulejší karty a řádky */
.pr, .r, .kcard, .icard, .sc-open { transition: background .15s, box-shadow .2s, transform .2s cubic-bezier(.2, .8, .2, 1); }
.kcard:hover, .icard:hover { box-shadow: 0 2px 4px rgba(20, 26, 69, .05), 0 10px 28px rgba(20, 26, 69, .08); }
.ph h1 { font-weight: 800; }

.side-i > .cmark, .set-list .cmark, .pbrand > .cmark { flex: 0 0 auto; overflow: visible; }
.cmark.all { background: #e9ecf6; color: var(--navy); }
.cmark.all .ic { width: 14px; height: 14px; }
/* portál: víc vzduchu pod horní lištou */
.phero { padding-top: 32px; padding-bottom: 40px; }
@media (max-width: 640px) { .phero { padding-top: 20px; padding-bottom: 28px; } }
/* značka Cadence s podtitulem */
.brand > span:not(.cmark) { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.brand > span > small { font-family: Manrope, sans-serif; font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 2px; }
.side .brand { font-size: 18px; }
.auth-card .brand { font-size: 18px; }
.ptop .brand > span > small { color: rgba(247, 243, 234, .7); opacity: 1; }

/* =====================================================================
   v7: dialogy, příkazová paleta, prázdné měsíce, drobné opravy z auditu
   ===================================================================== */
/* potvrzovací dialog (PV.ask) */
.dlg { position: fixed; inset: 0; z-index: 100; background: rgba(20, 26, 69, .4); display: grid; place-items: center; padding: 16px; animation: fade .12s ease-out; }
.dlg-box { width: min(440px, 100%); background: #fff; border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 24px 60px rgba(20, 26, 69, .28); display: flex; flex-direction: column; gap: 10px; animation: pop .18s cubic-bezier(.2, .8, .2, 1); }
.dlg-box h3 { font-family: Manrope, sans-serif; font-size: 17px; font-weight: 800; line-height: 1.35; color: var(--ink); }
.dlg-box p { margin: 0; color: #4a5078; font-size: 14px; white-space: pre-line; max-height: 40vh; overflow: auto; }
.dlg-box input { margin-top: 2px; }
.dlg-act { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { background: #a3311f; }
@keyframes pop { from { transform: translateY(6px) scale(.98); opacity: 0; } }

/* příkazová paleta (⌘K) */
kbd { font: 700 11px/1 Manrope, sans-serif; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; white-space: nowrap; }
.side-search { display: flex; align-items: center; gap: 10px; margin: -6px 4px 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.side-search span { flex: 1; text-align: left; }
.side-search .ic { width: 16px; height: 16px; }
.side-search:hover { border-color: #c9cee0; color: var(--ink); background: #fff; }
.cmdk { position: fixed; inset: 0; z-index: 95; background: rgba(20, 26, 69, .35); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; animation: fade .12s ease-out; }
.cmdk-box { width: min(640px, 100%); max-height: 70vh; background: #fff; border-radius: 16px; box-shadow: 0 30px 80px rgba(20, 26, 69, .3); display: flex; flex-direction: column; overflow: hidden; animation: pop .16s cubic-bezier(.2, .8, .2, 1); }
.cmdk-in { flex-direction: row; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.cmdk-in input { border: 0 !important; box-shadow: none !important; padding: 2px 0 !important; font-size: 16px; font-weight: 600; color: var(--ink); }
.cmdk-list { overflow: auto; padding: 6px; }
.cmdk-g { font-size: 11px; font-weight: 800; color: var(--muted); padding: 10px 10px 4px; }
.cmdk-i { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; border-radius: 10px; padding: 8px 10px; text-align: left; cursor: pointer; color: var(--ink); }
.cmdk-i.on { background: #eef1fa; }
.cmdk-ic { width: 22px; height: 22px; display: grid; place-items: center; color: var(--navy); flex: none; }
.cmdk-ic .ic { width: 17px; height: 17px; }
.cmdk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.cmdk-t b { font-size: 14px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-t small { font-size: 12px; color: var(--muted); }
.cmdk-i em { font-style: normal; font-size: 12px; color: var(--muted); }
.cmdk-i .pill { font-size: 11px; padding: 2px 8px; }
.cmdk-none { margin: 0; padding: 18px 12px; color: var(--muted); font-size: 14px; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 16px; border-top: 1px solid var(--line); background: var(--paper); font-size: 12px; color: var(--muted); }
.cmdk-foot kbd { margin-right: 3px; }
@media (max-width: 640px) { .cmdk { padding-top: 16px; } .cmdk-foot { display: none; } }

/* zásobník: karta nápadu s formátem nahoře a tlačítkem Naplánovat místo holého pole data */
.icard { gap: 8px; padding: 14px 16px; }
.icard b::before { display: none; }
.icard-h { display: flex; align-items: center; gap: 8px; min-width: 0; }
.icard-pil { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icard-pil::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); flex: none; }
.icard-cm { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.icard-cm .ic { width: 14px; height: 14px; }
.icard b { font-size: 15px; line-height: 1.35; }
.icard-f { margin-top: auto; padding-top: 4px; }
.icard-f .icard-plan { flex: none; position: relative; overflow: hidden; color: var(--navy); }
.icard-plan .ic { width: 15px; height: 15px; }
.icard-plan input { position: absolute; inset: 0; opacity: 0; width: 100% !important; cursor: pointer; padding: 0 !important; }

/* prázdný měsíc: odkaz na nejbližší měsíc s příspěvky */
.nudge { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-1); padding: 10px 12px 10px 16px; margin-bottom: 12px; font-size: 14px; color: #3e4466; }
.nudge > .ic { color: var(--orange); }
.nudge span { flex: 1; }
/* měsíc v číslech: souhrn vlevo nahoře, ne zastrčený v rohu */
.mb-h > span:empty { display: none; }
.mb-h:has(> span:empty) { justify-content: flex-start; }
.kpis span { align-items: flex-start; padding: 8px 16px; min-width: 96px; }
/* načítání: místo prázdné stránky klidný obrys aplikace */
.app:empty { background: linear-gradient(90deg, #fff 0 var(--side), var(--paper) var(--side)); }
.app:empty::after, .portal:empty::after { content: ''; position: fixed; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 10px; background: url(cadence.svg) center / cover; animation: breathe 1.2s ease-in-out infinite; }
.app:empty::after { left: calc(50% + var(--side) / 2); }
@keyframes breathe { 50% { opacity: .45; transform: scale(.94); } }
@media (prefers-reduced-motion: reduce) { .app:empty::after, .portal:empty::after { animation: none; } }
.icard-h .fmt-b { flex: none; }
.mb-g { align-items: start; }

/* editor příspěvku: datum, formát, pilíř a schvalovatel v jednom řádku nahoře */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ed-meta { gap: 14px; }
.ed-meta-r { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ed-meta-r .check { font-size: 13px; color: var(--ink); }
.ed-meta-r .hint { margin: 0; }
@media (max-width: 1100px) { .drawer-box:not(.full) .grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid4 { grid-template-columns: 1fr 1fr; } }

/* Co teď: souhrn nahoře, klik sjede na blok */
.prs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.prs-i { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 0; background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-1); padding: 12px 14px; cursor: pointer; text-align: left; color: var(--ink); transition: box-shadow .2s, transform .2s cubic-bezier(.2, .8, .2, 1); }
.prs-i b { font-family: var(--display); font-size: 26px; line-height: 1; font-variant-numeric: tabular-nums; }
.prs-i span { font-size: 12px; font-weight: 700; color: var(--muted); }
.prs-i:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(20, 26, 69, .05), 0 10px 28px rgba(20, 26, 69, .08); }
.prs-i.zero { box-shadow: none; background: transparent; border: 1px dashed var(--line); cursor: default; }
.prs-i.zero b { color: #b7bccf; }
.prs-i.hot:not(.zero) b { color: var(--orange); }
.prs-i.late:not(.zero) b { color: var(--red); }
.prs-i.ok:not(.zero) b { color: var(--green); }
.pb { scroll-margin-top: 16px; transition: box-shadow .3s; }
.pb.flash { box-shadow: 0 0 0 3px rgba(65, 105, 225, .35), var(--sh-1); }
@media (max-width: 1100px) { .prs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .prs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* kalendář: týdenní pohled */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: start; }
.wday { background: #fff; border-radius: var(--r-card); box-shadow: var(--sh-1); padding: 10px; min-height: 360px; display: flex; flex-direction: column; gap: 8px; border: 0; }
.wday.past { background: #fafbfd; }
.wday.today { box-shadow: 0 0 0 2px var(--orange), var(--sh-1); }
.wday.over { box-shadow: 0 0 0 2px var(--royal), var(--sh-1); }
.wday-h { display: flex; align-items: baseline; gap: 6px; padding: 2px 2px 4px; }
.wday-h span { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.wday-h b { font-size: 15px; font-variant-numeric: tabular-nums; }
.wday.today .wday-h b { color: var(--orange); }
.wday-h .day-add { margin-left: auto; }
.wcard { border-radius: 10px; background: var(--paper); overflow: hidden; cursor: grab; transition: box-shadow .2s, transform .2s cubic-bezier(.2, .8, .2, 1); }
.wcard:hover { background: #fff; box-shadow: 0 2px 4px rgba(20, 26, 69, .05), 0 8px 20px rgba(20, 26, 69, .1); transform: translateY(-1px); }
.wcard.dragging { opacity: .4; }
.wcard img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #e7e9f2; }
.wcard-b { padding: 8px 9px 9px; display: flex; flex-direction: column; gap: 5px; }
.wcard-h { display: flex; align-items: center; gap: 6px; }
.wcard-h .fmt-b { font-size: 9px; }
.wcard-h .dot-new { margin-left: auto; }
.wcard b { font-size: 13px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wcard b .cmark { width: 16px; height: 16px; font-size: 7px; vertical-align: -3px; margin-right: 5px; }
.wcard-pil { font-size: 11px; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.wcard-pil::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--pc); flex: none; }
.wcard-f { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wcard-f .pill { font-size: 10px; padding: 2px 7px; }
.wcard-f small { font-size: 11px; color: var(--muted); }
.wcamp { display: flex; align-items: center; gap: 6px; border: 0; border-radius: 8px; background: var(--cc); color: #fff; font-size: 11px; font-weight: 700; padding: 5px 8px; cursor: pointer; text-align: left; }
.wcamp .ic { width: 13px; height: 13px; flex: none; }
.wcamp span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 1100px) { .week { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 640px) { .week { grid-template-columns: 1fr; } .wday { min-height: 0; } }
/* mobil (tým): hledání jako ikona vedle + a nastavení, řádky v Co teď se zalamují, souhrn jako pás */
@media (max-width: 900px) {
  .side-search { order: 2; margin: 0 0 0 auto; padding: 0; width: 36px; height: 36px; justify-content: center; border-radius: 999px; }
  .side-search span, .side-search kbd { display: none; }
  .side-new { margin-left: 0; }
}
@media (max-width: 640px) {
  .pr { flex-wrap: wrap; row-gap: 4px; padding: 10px 14px; }
  .pr-when { min-width: 64px; }
  .pr-main { flex-basis: calc(100% - 80px); }
  .pr-main b { white-space: normal; }
  .pr > img { display: none; }
  .pr > .why, .pr > .vp, .pr > .pr-btns, .pr > .btn { margin-left: 76px; }
  .prs { display: flex; overflow-x: auto; scrollbar-width: none; gap: 8px; margin: 0 -16px 14px; padding: 2px 16px 6px; }
  .prs-i { flex: none; min-width: 112px; padding: 10px 12px; }
  .prs-i b { font-size: 22px; }
  .wday { min-height: 0; }
}
/* fieldset má v prohlížeči min-width: min-content, na mobilu pak roztahoval panel do strany */
.ed-form fieldset { min-width: 0; }
@media (max-width: 900px) { .dr-body { grid-template-columns: minmax(0, 1fr) !important; } }
/* mobil: asistent a nastavení se nevejdou do šířky kvůli min-content obsahu */
@media (max-width: 900px) { .ai-grid, .set { grid-template-columns: minmax(0, 1fr); } .ai-col, .set-body { min-width: 0; } }
@media (max-width: 640px) {
  .ai-card .row-btns, .set-body .row-btns, .pp { flex-wrap: wrap; }
  .modal-box { max-width: 100vw; overflow-x: hidden; }
  .cl-head { grid-template-columns: auto minmax(0, 1fr); }
  .cl-color { grid-column: 2; }
}
