:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #1d232b;
  --muted: #66707c;
  --line: #e2e5ea;
  --accent: #ea7a12;
  --accent-ink: #ffffff;
  --accent-soft: #fdf0e3;
  --side: #1f2630;
  --side-ink: #c9d0d8;
  --red: #c8372d;
  --red-soft: #fbe9e7;
  --amber: #b86e00;
  --amber-soft: #fff3dc;
  --green: #23824a;
  --green-soft: #e5f4ea;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 14px; color: var(--ink); background: var(--bg); }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.brand .mark { width: 34px; height: 34px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; font-weight: 700; color: #fff; letter-spacing: .5px; }
.brand b { display: block; font-size: 15px; }
.brand small { color: #8f99a6; font-size: 12px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; text-decoration: none; color: var(--side-ink); }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(234,122,18,.16); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nav .cnt { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 600; }
.side .grow { flex: 1; }
.side .who { font-size: 12px; color: #8f99a6; padding: 8px 10px; border-top: 1px solid rgba(255,255,255,.08); }
.side .who button { background: none; border: 0; color: #c9d0d8; cursor: pointer; padding: 0; text-decoration: underline; font-size: 12px; }
.main { padding: 22px 28px 60px; min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.top h1 { font-size: 22px; margin: 0; font-weight: 650; }
.top .sp { flex: 1; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.backbtn { font-weight: 600; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--accent); }

/* ---------- komponenty ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.card-h h2 { font-size: 15px; margin: 0; font-weight: 650; }
.card-h .sp { flex: 1; }
.card-b { padding: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.stat { padding: 16px; cursor: pointer; }
.stat .n { font-size: 30px; font-weight: 700; line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 4px; }
.stat.red .n { color: var(--red); }
.stat.amber .n { color: var(--amber); }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff; padding: 7px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #c5cbd3; background: #fafbfc; }
.btn.pri { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.pri:hover { filter: brightness(.95); }
.btn.dan { color: var(--red); }
.btn.sm { padding: 4px 9px; font-size: 13px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

input[type=text], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; border: 1px solid #cfd5dc; border-radius: 6px; padding: 7px 9px; background: #fff; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(234,122,18,.15); }
textarea { min-height: 64px; resize: vertical; }
label.f { display: block; }
label.f > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.fg { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.fg .full { grid-column: 1 / -1; }
.search { max-width: 360px; }

table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #fafbfc; position: sticky; top: 0; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr.click { cursor: pointer; }
table.t tr.click:hover td { background: #fbf7f2; }
table.t tr.arch td { color: #9aa3ad; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

.pill { display: inline-block; border-radius: 10px; padding: 2px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.overdue { background: var(--red-soft); color: var(--red); }
.pill.soon { background: var(--amber-soft); color: var(--amber); }
.pill.ok { background: var(--green-soft); color: var(--green); }
.pill.none { background: #eef0f3; color: var(--muted); }
.tag { display: inline-block; border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; font-size: 11px; color: var(--muted); }

/* ---------- formulář protokolu ---------- */
.chk { width: 100%; border-collapse: collapse; }
.chk td { padding: 6px 8px; border-bottom: 1px solid var(--line); }
.chk td.o { width: 150px; text-align: right; white-space: nowrap; }
.chk tr.sec td { background: #f6f7f9; font-weight: 650; font-size: 13px; }
.seg { display: inline-flex; border: 1px solid #cfd5dc; border-radius: 6px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 4px 10px; cursor: pointer; font-size: 13px; min-width: 42px; }
.seg button + button { border-left: 1px solid #cfd5dc; }
.seg button.on.ano { background: var(--green); color: #fff; }
.seg button.on.ne { background: var(--red); color: #fff; }
.seg button.on.na { background: #7a8592; color: #fff; }
.valin { width: 110px !important; display: inline-block; margin-left: 8px; padding: 4px 7px !important; }
.meas { display: grid; grid-template-columns: 1fr 140px 50px 150px; gap: 8px 10px; align-items: center; }
.meas .u { color: var(--muted); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sticky-act { position: sticky; bottom: 0; background: rgba(244,245,247,.94); backdrop-filter: blur(4px); padding: 12px 0; margin-top: 16px; border-top: 1px solid var(--line); z-index: 5; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; }
.kv div:nth-child(odd) { color: var(--muted); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { width: 16px; height: 16px; accent-color: var(--accent); }

.preview { width: 100%; height: 78vh; border: 1px solid var(--line); border-radius: var(--radius); background: #888; }

/* ---------- modal & toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20,26,34,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: #fff; border-radius: 10px; width: min(760px, 100%); max-height: 92vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal.wide { width: min(980px, 100%); }
.modal .mh { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; position: sticky; top: 0; background: #fff; z-index: 2; }
.modal .mh h3 { margin: 0; font-size: 17px; }
.modal .mh .x { margin-left: auto; border: 0; background: none; font-size: 22px; cursor: pointer; color: var(--muted); line-height: 1; }
.modal .mb { padding: 18px 20px; }
.modal .mf { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; position: sticky; bottom: 0; background: #fff; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 99; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
#toast div { background: #1f2630; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.2); max-width: 600px; }
#toast div.err { background: var(--red); }

/* ---------- přihlášení ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(160deg, #1f2630 0%, #2c3542 100%); padding: 20px; }
.login .box { background: #fff; border-radius: 12px; padding: 28px; width: min(380px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.login img { height: 42px; display: block; margin-bottom: 14px; }
.login h2 { margin: 0 0 4px; font-size: 20px; }
.login p { margin: 0 0 18px; color: var(--muted); }
.login .f + .f { margin-top: 12px; }
.login .btn { width: 100%; justify-content: center; margin-top: 18px; padding: 10px; }
.err-msg { color: var(--red); margin-top: 10px; min-height: 18px; }

.due-group h4 { margin: 18px 0 8px; font-size: 14px; }
.due-group:first-child h4 { margin-top: 0; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .side .grow, .side .who { display: none; }
  .brand { padding: 4px 8px; }
  .main { padding: 16px; }
  .g2, .g3, .g4, .two, .fg { grid-template-columns: 1fr; }
  .meas { grid-template-columns: 1fr 100px 40px; }
  .meas .okc { grid-column: 1 / -1; }
}

/* naplánovaná BTK – jemně světle zelená, plynulý přechod */
table.t tr td { transition: background-color 1.2s ease; }
table.t tr.planned td { background: #f2faf4; }
table.t tr.click.planned:hover td { background: #e9f6ec; }
.planbtn { transition: background-color .8s ease, color .8s ease, border-color .8s ease; }
.planbtn.on { background: #e6f4ea; border-color: #b9dfc4; color: var(--green); }
.pill.planned { background: #e3f3e8; color: var(--green); }

/* přehled – tři tabulky vedle sebe, na užším okně pod sebou */
.dash3 > .card { min-width: 0; }
@media (max-width: 1500px) {
  .dash3 { grid-template-columns: 1fr 1fr; }
  .dash3 > .card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 1150px) {
  .dash3 { grid-template-columns: 1fr; }
}

.tag.svc { background: #e8f0fb; color: #2b5797; border-color: #c9daf3; }
.dash2 > .card { min-width: 0; }
@media (max-width: 1150px) { .dash2 { grid-template-columns: 1fr; } }

/* =================== MOBIL =================== */
.burger { display: none; margin-left: auto; background: none; border: 0; color: #fff; font-size: 24px; line-height: 1; padding: 6px 8px; cursor: pointer; }
@media (max-width: 760px) {
  body { font-size: 15px; -webkit-text-size-adjust: 100%; }
  .shell { display: block; }
  .side { position: sticky; top: 0; z-index: 30; height: auto; padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); flex-direction: column; gap: 0; }
  .brand { padding: 4px 0; }
  .brand .mark { width: 30px; height: 30px; }
  .burger { display: block; }
  .side .nav { display: none; flex-direction: column; padding: 6px 0 4px; }
  .side.open .nav { display: flex; }
  .side.open .who { display: block; border-top: 1px solid rgba(255,255,255,.08); }
  .side .grow { display: none; }
  .side .who { display: none; }
  .nav a { padding: 12px 10px; font-size: 16px; }
  .main { padding: 14px 12px 90px; }
  .top { gap: 8px; margin-bottom: 12px; }
  .top h1 { font-size: 19px; width: 100%; }
  .top .sp { display: none; }
  .top .btn, .top .btns .btn { flex: 1 1 auto; justify-content: center; }
  .top .search, .top input[type=search] { max-width: none; flex: 1 1 100%; }
  .btn { padding: 10px 14px; min-height: 42px; }
  .btn.sm { padding: 7px 11px; min-height: 36px; font-size: 14px; }
  input[type=text], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea { padding: 10px 11px; font-size: 16px; }
  .g2, .g3, .g4, .two, .fg, .dash2, .dash3 { grid-template-columns: 1fr !important; }
  .grid.g4 { grid-template-columns: 1fr 1fr !important; }
  .stat .n { font-size: 26px; }
  .card-h { flex-wrap: wrap; padding: 12px; }
  .card-b { padding: 12px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv div:nth-child(odd) { margin-top: 8px; font-size: 13px; }
  .crumb { font-size: 13px; }

  /* tabulky jako karty */
  table.t, table.t tbody, table.t tr, table.t td { display: block; width: 100%; }
  table.t thead { display: none; }
  table.t tr { border-bottom: 1px solid var(--line); padding: 10px 12px; }
  table.t td { border: 0; padding: 3px 0; display: flex; gap: 10px; align-items: baseline; text-align: left !important; white-space: normal !important; }
  table.t td[data-l]::before { content: attr(data-l); flex: 0 0 96px; color: var(--muted); font-size: 12px; }
  table.t td:empty, table.t td[data-l=""]::before { display: none; }
  table.t td:first-child { font-size: 16px; }
  table.t td:first-child::before { display: none; }
  table.t td .btn { margin-top: 4px; }
  table.t tr.click:active td { background: #fbf7f2; }

  /* editor protokolu – velká tlačítka Ano/Ne */
  .chk td { padding: 10px 6px; }
  .chk td.o { width: auto; }
  .seg button { padding: 10px 14px; min-width: 56px; font-size: 15px; }
  .meas { grid-template-columns: 1fr 110px 36px; }
  .meas .okc { grid-column: 1 / -1; justify-self: end; margin-bottom: 6px; }
  .valin { width: 100% !important; margin: 6px 0 0 !important; display: block; }
  .sticky-act { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 12px; padding-bottom: max(10px, env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); box-shadow: 0 -4px 14px rgba(0,0,0,.08); }
  .sticky-act .btn { flex: 1; justify-content: center; }
  .preview { height: 65vh; }

  /* okna přes celou obrazovku */
  .modal-bg { padding: 0; place-items: stretch; }
  .modal, .modal.wide { width: 100%; max-height: none; height: 100%; border-radius: 0; }
  .modal .mh { padding-top: max(14px, env(safe-area-inset-top)); }
  .modal .mf { flex-wrap: wrap; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .modal .mf .btn { flex: 1 1 auto; justify-content: center; margin: 0 !important; }
  #toast { bottom: 84px; }
}

/* mobil: bez zaškrtávání a exportu */
@media (max-width: 760px) {
  .xsel, .xexp, .xdel, label.switch:has(#all) { display: none !important; }
}

/* Kalendář */
.cgrid { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.chd { background: #f6f7f9; padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; }
.ccell { background: #fff; min-height: 104px; padding: 4px 5px; cursor: pointer; overflow: hidden; }
.ccell.out { background: #fafbfc; }
.ccell.out .cdn { color: #b9c0c8; }
.ccell.we { background: #fcfcfd; }
.ccell.today { background: #fff7ef; box-shadow: inset 0 0 0 2px var(--accent); }
.cdn { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.cev { font-size: 11.5px; line-height: 1.3; padding: 2px 4px; margin-bottom: 2px; border-radius: 4px; background: #eef1f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.cev:hover { background: #e2e7ee; }
.cev.btk { background: #fdebd9; }
.cday .card-b .cev { font-size: 14px; white-space: normal; padding: 6px 8px; margin-bottom: 4px; }
.cday.today { box-shadow: 0 0 0 2px var(--accent); }

/* Kalendář – mobil (styl DigiCal) */
.mcal-top { display: flex; align-items: center; gap: 4px; margin: -4px -4px 8px; }
.mcal-top .btn.ghost { font-size: 20px; padding: 6px 12px; min-height: 0; border: 0; background: transparent; }
.mcal-top #cToday, .mcal-top #cRef { font-size: 14px; border: 1px solid var(--line); background: #fff; }
.mcal-title { font-size: 26px; font-weight: 700; line-height: 1; text-transform: lowercase; min-width: 120px; }
.mcal-title small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 2px; }
.mcal { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 2px 6px; user-select: none; touch-action: pan-y; }
.mrow { display: grid; grid-template-columns: 22px repeat(7, 1fr); align-items: stretch; }
.mrow .wn { font-size: 10px; color: #a3abb5; display: flex; align-items: center; justify-content: center; }
.mhd span { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.mhd span.sun, .md.sun .dn { color: #d12f2f; }
.md { height: 56px; display: flex; flex-direction: column; align-items: center; padding-top: 6px; border-radius: 8px; cursor: pointer; position: relative; }
.md .dn { font-size: 17px; font-weight: 500; line-height: 1.2; }
.md.out .dn { color: #b9c0c8; }
.md.out { background: #fafbfc; }
.md.today .dn { color: #fff; background: var(--accent); border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.md.sel { background: #fff1e3; box-shadow: inset 0 0 0 1.5px var(--accent); }
.md .dots { display: flex; gap: 3px; margin-top: 4px; flex-wrap: wrap; justify-content: center; max-width: 44px; }
.md .dots i { width: 6px; height: 6px; border-radius: 50%; background: #7cb342; display: block; }
.md .dots i.btk, .md .bars i.btk { background: var(--accent); }
.md .dots b { font-size: 9px; line-height: 6px; color: var(--muted); }
.md .bars { display: flex; flex-direction: column; gap: 2px; width: 100%; margin-top: 3px; }
.md .bars i { height: 3px; background: #7986cb; display: block; border-radius: 2px; }
#agenda { margin-top: 12px; }
.agd { display: grid; grid-template-columns: 52px 1fr; gap: 8px; margin-bottom: 12px; }
.agn { text-align: left; padding-left: 4px; }
.agn b { display: block; font-size: 30px; font-weight: 500; line-height: 1; }
.agn span { font-size: 14px; color: var(--muted); }
.agd.today .agn b { color: var(--accent); }
.agl { display: grid; gap: 8px; min-width: 0; }
.agc { background: #fff; border-radius: 8px; border-left: 6px solid #7cb342; padding: 10px 12px; box-shadow: 0 1px 2px rgba(0,0,0,.08); cursor: pointer; min-width: 0; }
.agc.btk { border-left-color: var(--accent); }
.agc.empty-day { border-left-color: var(--line); }
.agt { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agm { font-size: 14px; color: #4a5562; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mfab { position: fixed; right: 18px; bottom: calc(22px + env(safe-area-inset-bottom)); width: 58px; height: 58px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; font-size: 32px; line-height: 1; box-shadow: 0 4px 12px rgba(0,0,0,.25); z-index: 20; cursor: pointer; }
.tsel { display: flex; align-items: center; gap: 4px; }
.tsel select { width: auto; flex: 1; min-width: 64px; }
.acl { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.15); max-height: 280px; overflow: auto; }
.acl div { padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.acl div:hover { background: #fff3e6; }
.cedev { display: flex; gap: 10px; align-items: flex-start; padding: 6px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cedev input { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; accent-color: var(--accent); }

/* ===== Kalendář – moderní vzhled (v11.6) ===== */
:root { --c-btk: #ea7a12; --c-btk-bg: #fff1e3; --c-inst: #22a061; --c-inst-bg: #e5f6ed; --c-sup: #3b6fd8; --c-sup-bg: #e9f0fd;
  --c-free: #8b5cf6; --c-free-bg: #f1ebfe; --c-edu: #0e9aa7; --c-edu-bg: #e0f5f6; --c-fix: #d6455d; --c-fix-bg: #fde9ed; --c-def: #64748b; --c-def-bg: #eef1f5; }
.c-btk { --c: var(--c-btk); --cb: var(--c-btk-bg); } .c-inst { --c: var(--c-inst); --cb: var(--c-inst-bg); } .c-sup { --c: var(--c-sup); --cb: var(--c-sup-bg); }
.c-free { --c: var(--c-free); --cb: var(--c-free-bg); } .c-edu { --c: var(--c-edu); --cb: var(--c-edu-bg); } .c-fix { --c: var(--c-fix); --cb: var(--c-fix-bg); } .c-def { --c: var(--c-def); --cb: var(--c-def-bg); }

.cgrid { gap: 0; background: #fff; border: 1px solid #e6e9ee; border-radius: 14px; box-shadow: 0 1px 3px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.04); }
.chd { background: #fff; color: #8a94a3; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 8px; border-bottom: 1px solid #eef0f3; }
.ccell { min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid #f0f2f5; border-bottom: 1px solid #f0f2f5; background: #fff; transition: background .12s; }
.cgrid > .ccell:nth-child(7n) { border-right: 0; }
.ccell:hover { background: #fbfcfd; }
.ccell.we { background: #fcfcfd; }
.ccell.out { background: #f8f9fb; }
.ccell.out .cdn span, .ccell.out .cev { opacity: .55; }
.ccell.today { background: #fffaf4; box-shadow: none; }
.cdn { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-weight: 600; font-size: 13px; color: #334155; }
.cdn span { min-width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.ccell.today .cdn span { background: var(--accent); color: #fff; }
.cdn em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.cev { display: flex; gap: 5px; align-items: baseline; font-size: 12px; padding: 3px 6px; margin-bottom: 3px; border-radius: 6px; background: var(--cb, #eef1f5); color: #1f2937; border-left: 3px solid var(--c, #64748b); }
.cev b { color: var(--c); font-weight: 700; font-size: 11px; flex: 0 0 auto; }
.cev span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cev:hover { background: var(--cb); filter: brightness(.96); }
.cev.allday { background: var(--c); color: #fff; border-left: 0; font-weight: 600; }
.cmore { font-size: 11px; color: var(--accent); font-weight: 600; padding: 2px 6px; cursor: pointer; }

/* mobil – barvy kategorií */
.md .dots i { background: var(--c, #7cb342); }
.md .bars i { background: var(--c, #7986cb); }
.agc { border-left-color: var(--c, #7cb342); }
.agc .agm { color: #4a5562; }

/* detail události */
.evsheet .modal { padding: 0; overflow: hidden; max-width: 520px; }
.evsheet .mh { display: none; }
.evsheet .mb { padding: 0; }
.evs-head { position: relative; background: var(--c); color: #fff; padding: 34px 24px 22px; background-image: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,0) 60%); }
.evs-title { font-size: 24px; font-weight: 700; line-height: 1.2; padding-right: 56px; }
.evs-sub { opacity: .9; margin-top: 6px; font-size: 14px; }
.evs-pen { position: absolute; right: 20px; bottom: -26px; width: 56px; height: 56px; border-radius: 50%; border: 0; background: #fff; color: var(--c); font-size: 24px; box-shadow: 0 4px 14px rgba(0,0,0,.22); cursor: pointer; }
.evs-pen:hover { transform: scale(1.05); }
.evs-body { padding: 18px 14px 6px; background: #f4f5f7; display: grid; gap: 10px; }
.evs-card { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.06); color: inherit; text-decoration: none; }
.evs-ic { font-size: 20px; width: 26px; text-align: center; flex: 0 0 auto; }
.evs-time { font-size: 26px; font-weight: 500; margin-top: 2px; }
@media (max-width: 760px) {
  .evsheet .modal { max-width: none; width: 100%; height: 100%; max-height: none; border-radius: 0; display: flex; flex-direction: column; }
  .evsheet .mb { flex: 1; overflow: auto; background: #f4f5f7; }
  .evs-head { padding-top: 48px; min-height: 170px; display: flex; flex-direction: column; justify-content: flex-end; }
}
.evs-back { position: absolute; left: 12px; top: 10px; background: transparent; border: 0; color: #fff; font-size: 26px; cursor: pointer; padding: 4px 10px; border-radius: 8px; }
.evs-back:hover { background: rgba(255,255,255,.15); }
