:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #eeebe3;
  --line: #e0dcd2;
  --text: #1e2422;
  --muted: #646c68;
  --accent: #1f5c4d;
  --accent-text: #ffffff;
  --own: #d9ebe4;
  --own-text: #12302a;
  --urgent: #b3261e;
  --urgent-soft: #fbe9e7;
  --dept-recepcija: #2f5f9e;
  --dept-strezba: #a8620f;
  --dept-cistilke: #0f7f78;
  --dept-vzdrzevanje: #8a4a32;
  --dept-none: #6a716d;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101614;
    --surface: #18201d;
    --surface-2: #222c28;
    --line: #2d3834;
    --text: #e7ece9;
    --muted: #9aa5a0;
    --accent: #5cb89f;
    --accent-text: #0b1a16;
    --own: #1f4238;
    --own-text: #e2f1ec;
    --urgent: #f2867e;
    --urgent-soft: #3a1d1a;
    --dept-recepcija: #4d7fc4;
    --dept-strezba: #c47d24;
    --dept-cistilke: #1f9c94;
    --dept-vzdrzevanje: #ad6547;
    --dept-none: #7b847f;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.4 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
#root { height: 100dvh; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Prijava */
.login {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login form { width: 100%; max-width: 360px; display: grid; gap: 16px; }
.login h1 { margin: 0; font-size: 26px; line-height: 1.2; }
.login h1 + p { margin: -8px 0 4px; color: var(--muted); }

/* Polja in gumbi */
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 600; }
.field small { color: var(--muted); font-size: 13px; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 16px;
}
.btn {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-weight: 600;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.danger { color: var(--urgent); }
.btn:disabled { opacity: .6; }
.error { color: var(--urgent); font-size: 14px; margin: 0; }
.ok { color: var(--accent); font-size: 14px; margin: 0; }

/* Razporeditev */
.shell { height: 100%; display: flex; }
.pane-list { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--surface); }
.pane-main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.shell[data-view="list"] .pane-main { display: none; }
.shell:not([data-view="list"]) .pane-list { display: none; }
@media (min-width: 800px) {
  .shell .pane-list, .shell[data-view] .pane-list, .shell:not([data-view="list"]) .pane-list { display: flex; flex: 0 0 340px; border-right: 1px solid var(--line); }
  .shell .pane-main, .shell[data-view] .pane-main, .shell[data-view="list"] .pane-main { display: flex; }
  .back { display: none !important; }
  .sheet-back { display: inline-flex !important; }
}

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 60px;
  padding: 8px 12px;
  padding-top: calc(8px + env(safe-area-inset-top));
  padding-left: calc(12px + env(safe-area-inset-left));
  padding-right: calc(12px + env(safe-area-inset-right));
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  flex: none;
}
.topbar h1, .topbar h2 { margin: 0; font-size: 18px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .titles { flex: 1; min-width: 0; }
.topbar .sub { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn {
  flex: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  padding: 0;
}
.icon-btn:active { background: var(--surface-2); }
svg.icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.offline {
  flex: none;
  padding: 6px 12px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* Seznam pogovorov */
.scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: env(safe-area-inset-bottom); }
.section-title {
  padding: 16px 16px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 8px 16px;
  border: 0;
  background: transparent;
  text-align: left;
}
.row:active, .row[aria-current="true"] { background: var(--surface-2); }
.row .body { flex: 1; min-width: 0; }
.row .line { display: flex; align-items: baseline; gap: 8px; }
.row .name { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .time { flex: none; color: var(--muted); font-size: 12px; }
.row .preview { flex: 1; min-width: 0; color: var(--muted); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.has-unread .preview { color: var(--text); }
.badge {
  flex: none;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 11px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}
.badge.urgent { background: var(--urgent); color: var(--surface); }
.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--dept-none);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}
.avatar.group { border-radius: 12px; }
.avatar.small { width: 36px; height: 36px; font-size: 13px; }
.avatar[data-dept="recepcija"] { background: var(--dept-recepcija); }
.avatar[data-dept="strezba"] { background: var(--dept-strezba); }
.avatar[data-dept="cistilke"] { background: var(--dept-cistilke); }
.avatar[data-dept="vzdrzevanje"] { background: var(--dept-vzdrzevanje); }
.avatar[data-dept="kuhinja"] { background: #7a4f9e; }
.avatar[data-dept="all"] { background: var(--accent); color: var(--accent-text); }

.notice {
  margin: 12px 16px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 14px;
}
.notice .actions { display: flex; gap: 8px; margin-top: 10px; }
.notice .btn { min-height: 40px; padding: 6px 12px; font-size: 14px; }

/* Klepet */
.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px;
  padding-left: calc(12px + env(safe-area-inset-left));
  padding-right: calc(12px + env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.messages > :first-child { margin-top: auto; }
.empty { margin: auto; padding: 24px; max-width: 320px; text-align: center; color: var(--muted); }
.day { align-self: center; margin: 12px 0 8px; padding: 2px 10px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 12px; }
.msg { display: flex; flex-direction: column; max-width: min(82%, 560px); align-self: flex-start; margin-top: 8px; }
.msg.cont { margin-top: 0; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.bubble {
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.msg.mine .bubble { background: var(--own); border-color: transparent; color: var(--own-text); }
.msg.urgent .bubble { background: var(--urgent-soft); border: 1px solid var(--urgent); color: var(--text); }
.msg .sender { margin: 0 0 2px 12px; font-size: 13px; font-weight: 600; color: var(--muted); }
.msg .urgent-label { display: block; margin-bottom: 2px; color: var(--urgent); font-size: 12px; font-weight: 700; }
.msg .meta { display: flex; gap: 8px; margin: 2px 4px 0; font-size: 12px; color: var(--muted); }

.composer {
  flex: none;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 8px;
  padding-left: calc(8px + env(safe-area-inset-left));
  padding-right: calc(8px + env(safe-area-inset-right));
  padding-bottom: calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.composer textarea {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  max-height: 140px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  font-size: 16px;
  line-height: 22px;
  resize: none;
}
.composer.is-urgent textarea { border-color: var(--urgent); }
.urgent-toggle { color: var(--muted); font-weight: 800; font-size: 20px; }
.urgent-toggle[aria-pressed="true"] { background: var(--urgent); color: var(--surface); }
.send { background: var(--accent); color: var(--accent-text); }
.send:active { background: var(--accent); opacity: .85; }
.send:disabled { opacity: .5; }
.urgent-hint { flex: none; padding: 6px 12px; background: var(--urgent-soft); color: var(--urgent); font-size: 13px; font-weight: 600; }

/* Nastavitve in osebje */
.sheet { max-width: 560px; width: 100%; margin: 0 auto; padding: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); display: grid; gap: 16px; }
.card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.card h3 { margin: 0; font-size: 16px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }
.card p.error { color: var(--urgent); }
.card p.ok { color: var(--accent); }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); flex: none; }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 2px; }
legend { padding: 0; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.staff-row { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-height: 60px; }
.staff-list { display: grid; gap: 8px; }
.staff-row.off { opacity: .6; }

/* Obvestila v aplikaciji */
#toasts {
  position: fixed;
  z-index: 10;
  top: calc(8px + env(safe-area-inset-top));
  left: 8px;
  right: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  justify-items: center;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  width: 100%;
  max-width: 420px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
}
.toast strong { display: block; font-size: 14px; }
.toast span { font-size: 14px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow-wrap: anywhere; }
.toast.urgent { border-color: var(--urgent); background: var(--urgent-soft); }
.toast.urgent strong { color: var(--urgent); }

/* Sobe */
.sheet.rooms { gap: 10px; max-width: 640px; grid-template-columns: minmax(0, 1fr); }
.btn.wide { width: 100%; }
.room-section { margin: 12px 0 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.room-empty { margin: 16px 0; text-align: center; color: var(--muted); }
.room-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.room-card.issue { border-color: var(--urgent); background: var(--urgent-soft); }
.room-card.done { background: transparent; }
.room-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.room-number { font-size: 20px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.room-who { font-size: 13px; color: var(--muted); margin: 0; }
.chip { padding: 2px 8px; border-radius: 10px; font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--text); }
.chip.odhod { background: var(--dept-recepcija); color: #fff; }
.chip.dnevna { background: var(--dept-cistilke); color: #fff; }
.chip.poseg { background: var(--dept-vzdrzevanje); color: #fff; }
.chip.ok { background: var(--own); color: var(--own-text); }
.chip.wait { background: var(--surface-2); color: var(--muted); }
.chip.bad { background: var(--urgent); color: var(--surface); }
.room-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.room-actions .btn { flex: 1 1 auto; padding: 8px 10px; font-size: 15px; }
.issue-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.issue-form { display: grid; gap: 8px; }
.issue-note { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-size: 16px; resize: vertical; }
.btn.small { min-height: 40px; padding: 6px 10px; font-size: 14px; flex: none; }
.work-notice { color: var(--muted); font-size: 13px; }
.list-action { padding: 12px 16px 0; }
.list-empty { padding: 4px 16px 8px; color: var(--muted); font-size: 14px; }
.target-check { min-height: 40px; }
.thread-body { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 16px; resize: vertical; }
.closed-bar { flex: none; display: flex; align-items: center; gap: 8px; justify-content: space-between; padding: 8px 12px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface-2); font-size: 14px; }
.list-results { gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.reservation .room-number { font-size: 18px; }
.res-name { font-size: 17px; font-weight: 700; overflow-wrap: anywhere; }
.room-card.changed { border: 2px solid var(--urgent); background: var(--urgent-soft); }
.res-change { margin: 0; padding: 8px 10px; border-left: 4px solid var(--urgent); background: var(--surface); font-weight: 600; overflow-wrap: anywhere; }
.res-change small { font-weight: 400; color: var(--muted); }
.res-seen { margin: 0; font-size: 0.85rem; color: var(--muted); }
.res-seen .stale { color: var(--urgent); }
.res-forward { display: grid; gap: 4px; padding: 8px 10px; border: 1px solid var(--dept-strezba); border-radius: 10px; background: var(--surface); overflow-wrap: anywhere; }
.res-forward.done { border-color: var(--line); opacity: .75; }
.res-forward small { color: var(--muted); font-size: 13px; }
.res-history summary { cursor: pointer; font-size: 13px; color: var(--muted); padding: 4px 0; }
.res-select { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; color: inherit; }
.room-card.guests-left { border: 2px solid var(--accent); }
.guests-left-banner { display: grid; gap: 2px; margin: -12px -12px 0; padding: 10px 12px; border-radius: 10px 10px 0 0; background: var(--accent); color: var(--accent-text); }
.guests-left-banner strong { font-size: 16px; }
.guests-left-banner small { font-size: 13px; }
.room-section.ready { color: var(--accent); font-size: 15px; }
.row.rooms-ready .preview { color: var(--accent); font-weight: 700; }
.toast.good { border: 2px solid var(--accent); background: var(--accent); color: var(--accent-text); }
.toast.good strong { font-size: 16px; }
.toast.good span { color: var(--accent-text); }
button.status-tile { font: inherit; cursor: pointer; }
.supply-suggestions { display: grid; grid-auto-rows: max-content; gap: 4px; max-height: 280px; overflow-y: auto; }
.supply-suggestions:empty { display: none; }
.supply-suggestion { display: grid; gap: 1px; width: 100%; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); text-align: left; }
.supply-suggestion-name { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.supply-suggestion small { font-size: 12px; color: var(--muted); }
.supply-suggestion.taken { background: var(--surface-2); border-style: dashed; cursor: not-allowed; opacity: .55; }
.supply-suggestion.taken .supply-suggestion-name { font-weight: 400; }
.brushes.supply-view { position: static; }
.block-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.block-modes .brush { min-height: 48px; align-content: center; }
.supply-view .brush { min-height: 44px; align-content: center; }
.supply-heading { margin: 14px 0 0; font-size: 16px; font-weight: 700; }
.supply-group { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 4px; border-bottom: 2px solid var(--line); color: var(--text); }
.supply-group.has-urgent { border-bottom-color: var(--urgent); }
.supply-hint { margin: 0; font-size: 13px; color: var(--muted); }
.task-repeating { display: grid; gap: 16px; }
.task-due-row input { flex: 1; min-width: 0; }
.task-due-row > span { flex: none; font-size: 13px; color: var(--muted); }
.task-repeat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; }
.task-repeat input { width: 64px; min-height: 44px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; color: inherit; }
.series-chip { border: 0; cursor: pointer; background: var(--dept-recepcija); color: #fff; font: inherit; font-size: 13px; font-weight: 600; min-height: 24px; }
.res-filter { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; font-weight: 600; }
.attach-btn { color: var(--muted); }
.attachment-chips { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 8px 0; background: var(--surface); }
.sheet .attachment-chips { padding: 0; background: transparent; }
.attachment-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 2px 2px 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); font-size: 13px; }
.attachment-chip-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-remove { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; font-size: 18px; line-height: 1; }
.attachment-image { display: block; margin-top: 6px; }
.attachment-image img { display: block; max-width: 100%; max-height: 260px; border-radius: 8px; }
.attachment-file { display: flex; align-items: center; gap: 6px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: inherit; font-size: 14px; }
.attachment-file svg.icon { flex: none; width: 18px; height: 18px; }
.attachment-file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.attachment-file small { flex: none; color: var(--muted); font-size: 12px; }
.res-times { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.res-dates { display: grid; gap: 8px; }
.res-date-row { display: flex; gap: 8px; align-items: center; }
.res-date-row input { flex: 1; min-width: 0; }
.chip.cond { background: var(--dept-strezba); color: #fff; }
.status-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.status-key { display: inline-flex; align-items: center; gap: 6px; }
.status-key::before { content: ""; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); background: var(--tile-bg); }
.status-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 4px; }
.status-tile { display: grid; justify-items: center; align-content: center; min-height: 46px; padding: 2px; border-radius: 8px; border: 1px solid var(--line); background: var(--tile-bg); color: var(--tile-text); }
.status-tile .tile-state { min-height: 0; font-size: 10px; line-height: 13px; }
[data-status="na_voljo"] { --tile-bg: var(--own); --tile-text: var(--own-text); }
[data-status="pogojno"] { --tile-bg: var(--dept-strezba); --tile-text: #fff; }
[data-status="okvara"] { --tile-bg: var(--urgent); --tile-text: var(--surface); }
[data-status="ciscenje"] { --tile-bg: var(--dept-recepcija); --tile-text: #fff; }
[data-status="zasedena"] { --tile-bg: var(--surface-2); --tile-text: var(--muted); }
.supply-title { flex: 1 1 100%; min-width: 0; font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.supply-history { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 13px; color: var(--muted); }
.supply-choice strong { display: block; font-size: 15px; }
.supply-choice small { display: block; font-size: 13px; color: var(--muted); }
.supply-choice.urgent strong { color: var(--urgent); }
.archive-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.archive-filters input, .archive-filters select { width: 100%; min-width: 0; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; color: inherit; }
.archive-filters .btn { grid-column: 1 / -1; }
.archive-results { display: grid; gap: 6px; }
.archive-row { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.archive-row .body { min-width: 0; display: grid; gap: 2px; }
.room-empty.small { margin: 4px 0; font-size: 14px; text-align: left; }
.brushes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; position: sticky; top: 0; z-index: 1; padding: 4px 0; background: var(--bg); }
.brush { display: grid; gap: 2px; min-height: 60px; padding: 6px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); text-align: center; }
.brush span { font-size: 12px; color: var(--muted); line-height: 1.2; }
.brush[aria-pressed="true"].odhod { border-color: var(--dept-recepcija); background: var(--dept-recepcija); color: #fff; }
.brush[aria-pressed="true"].dnevna { border-color: var(--dept-cistilke); background: var(--dept-cistilke); color: #fff; }
.brush[aria-pressed="true"] span { color: inherit; }
.room-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 6px; }
.room-tile { position: relative; display: grid; align-content: center; justify-items: center; min-height: 60px; padding: 4px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; }
.room-tile input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.room-tile:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.tile-number { font-weight: 700; font-variant-numeric: tabular-nums; }
.tile-state { min-height: 15px; font-size: 11px; line-height: 15px; text-align: center; }
.room-tile.odhod { border-color: var(--dept-recepcija); background: var(--dept-recepcija); color: #fff; }
.room-tile.dnevna { border-color: var(--dept-cistilke); background: var(--dept-cistilke); color: #fff; }
.room-tile.busy { opacity: .55; cursor: not-allowed; background: var(--surface-2); }
.room-tile.busy .tile-state { color: var(--muted); font-size: 10px; line-height: 12px; }
.room-footer { flex: none; padding: 8px 16px; padding-bottom: calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }

/* Legionela */
.leg-alert { border-color: var(--urgent); }
.leg-alert strong { color: var(--urgent); }
.leg-idle { border-color: var(--accent); }
.leg-card .chip { font-weight: 500; }
.sheet form.card select, .sheet form.card input[type="date"] { width: 100%; min-width: 0; min-height: 48px; }

.unit-input { position: relative; display: flex; align-items: center; }
.unit-input input { width: 100%; min-height: 48px; padding: 10px 52px 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 18px; font-variant-numeric: tabular-nums; }
.unit-input .unit { position: absolute; right: 14px; color: var(--muted); font-weight: 600; pointer-events: none; }
.unit-input.warn input { border: 2px solid var(--urgent); }
.limit-warn { display: block; color: var(--urgent) !important; font-weight: 600; }
.limit-warn:empty { display: none; }
.unit-field { display: grid; gap: 4px; }
.leg-open { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--line); }
.leg-open > div { min-width: 0; display: grid; gap: 2px; }
.leg-open small { color: var(--urgent); }
.leg-open .btn { flex: none; }
.leg-ref { margin: 0; font-weight: 600; color: var(--accent); }
.leg-dialog { width: min(440px, calc(100vw - 32px)); border: 2px solid var(--urgent); border-radius: 14px; padding: 20px; background: var(--surface); color: var(--text); }
.leg-dialog::backdrop { background: rgb(0 0 0 / .5); }
.leg-dialog h2 { margin: 0 0 8px; font-size: 19px; color: var(--urgent); }
.leg-dialog p { margin: 0 0 8px; }
.leg-dialog ol { margin: 4px 0 14px; padding-left: 20px; display: grid; gap: 4px; }
.leg-dialog small { display: block; margin-top: 10px; color: var(--muted); }

.leg-duties { gap: 8px; }
.leg-duty-head { margin: 6px 0 0; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.leg-duty-head.bad { color: var(--urgent); }
.leg-duty { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.leg-duty > div { min-width: 0; display: grid; gap: 2px; }
.leg-duty small { color: var(--muted); }
.leg-duty.late { background: transparent; border: 2px solid var(--urgent); }
.leg-duty.late strong { color: var(--urgent); }
.leg-duty.open { border-left: 4px solid var(--accent); }
.leg-duty .btn { flex: none; min-height: 40px; }
.leg-duties details .leg-duty { margin-top: 6px; }
select.warn { border: 2px solid var(--urgent) !important; }
.note-extra summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.note-extra .target-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 8px; }

.brushes.res-view { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.res-view .brush { min-height: 44px; align-content: center; }
.res-nav { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.res-nav strong { text-align: center; text-transform: capitalize; }
.res-week-total { margin: 0; color: var(--muted); font-size: 14px; }
.res-day { display: grid; gap: 8px; }
.res-day .room-section, .sheet > .room-section small { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; text-transform: capitalize; }
.res-day .room-section small, .room-section small { font-weight: 600; color: var(--muted); text-transform: none; }
.res-day.today .room-section { color: var(--accent); }
.res-day.empty-day .room-who { margin: 0; }
.res-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.res-cal-head { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.res-cal-day { position: relative; display: grid; align-content: start; justify-items: center; gap: 2px; min-height: 64px; padding: 4px 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.res-cal-day.other { opacity: .45; }
.res-cal-day.today { border: 2px solid var(--accent); }
.res-cal-day.selected { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.res-cal-num { font-weight: 700; font-size: 14px; }
.res-cal-count { min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--dept-recepcija); color: #fff; font-size: 12px; font-weight: 700; }
.res-cal-count.pending { background: var(--urgent); }
.res-cal-guests { font-size: 11px; color: var(--muted); line-height: 1.1; }
.res-cal-day.selected .res-cal-guests { color: inherit; }
.res-send legend { font-weight: 600; }
@media (max-width: 380px) { .res-cal-guests { display: none; } .res-cal-day { min-height: 48px; } }

.supply-export summary { cursor: pointer; font-weight: 600; }
.supply-export[open] { gap: 10px; }

.res-send > input[type="datetime-local"] { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); margin: 0 0 6px; }
.res-send small { color: var(--muted); }

.res-close-fields { display: grid; gap: 8px; margin-top: 6px; }
.res-close-fields[hidden] { display: none; }
.res-close-fields input { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }

/* Delovni čas */
.att-status { gap: 4px; }
.att-status.present { border-color: var(--accent); }
.att-status.present strong { color: var(--accent); }
.att-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.att-big { min-height: 84px; font-size: 22px; font-weight: 800; letter-spacing: .04em; border-width: 2px; }
.att-big.in { border-color: var(--accent); color: var(--accent); }
.att-big.out { border-color: var(--urgent); color: var(--urgent); }
.att-big.in.armed, .sheet > .att-big.in { background: var(--accent); color: var(--accent-text); }
.att-big.out.armed, .sheet > .att-big.out { background: var(--urgent); color: #fff; }
.att-big:disabled { opacity: .35; }
.att-scan-help { border: 2px dashed var(--accent); gap: 8px; }
.att-camera video { width: 100%; border-radius: 10px; }
.att-month { gap: 4px; }
.att-day { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.att-day.open .att-times { color: var(--urgent); }
.att-date { font-size: 13px; color: var(--muted); text-transform: capitalize; }
.att-times { display: flex; flex-wrap: wrap; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.att-tools .res-select.small { min-height: 36px; padding: 4px 6px; width: auto; }
.att-done { justify-items: center; text-align: center; gap: 4px; padding: 28px 16px; }
.att-done.in { border: 2px solid var(--accent); }
.att-done.out { border: 2px solid var(--urgent); }
.att-done strong { font-size: 20px; }
.att-done-time { font-size: 48px; font-weight: 800; font-variant-numeric: tabular-nums; }
.att-people { gap: 0; padding: 4px 12px; }
.att-person { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; min-height: 48px; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; }
.att-person:first-child { border-top: 0; }
.att-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--line); }
.att-dot.on { background: var(--accent); }
.att-name small { color: var(--muted); }
.att-total { font-weight: 700; font-variant-numeric: tabular-nums; }
.att-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.att-entry small { color: var(--muted); }
.att-form input[type="datetime-local"], .att-form input[type="date"], .att-form input:not([type]) { width: 100%; min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.att-form .field[hidden] { display: none; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: inherit; }
a.btn.primary { color: var(--accent-text); }
.qr-print { justify-items: center; text-align: center; }
.att-qr svg { width: min(320px, 80vw); height: auto; background: #fff; padding: 8px; border-radius: 8px; }
.qr-title { font-size: 20px; }
.qr-help { margin: 0; max-width: 420px; }
.qr-url { color: var(--muted); word-break: break-all; }

.floor-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 18px 0 0; padding: 8px 12px; border-radius: 10px; background: var(--dept-cistilke); color: #fff; font-size: 18px; }
.floor-heading small { font-size: 13px; font-weight: 600; opacity: .9; }
.floor-sub { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

.qr-sheets { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.qr-page { justify-items: center; text-align: center; position: relative; }
.qr-admin { display: flex; gap: 8px; align-items: center; justify-content: center; }
.qr-subtitle { font-weight: 800; letter-spacing: .08em; }
.qr-page .att-qr svg { width: min(220px, 70vw); }
.qr-tag { position: absolute; right: 10px; bottom: 6px; font-size: 9px; color: var(--muted); opacity: .6; }
.qr-page .room-actions { margin-bottom: 8px; }
.att-place { color: var(--muted); font-size: 12px; }
@media print {
  body * { visibility: hidden; }
  .qr-sheets, .qr-sheets * { visibility: visible; }
  .qr-sheets { position: absolute; left: 0; top: 0; width: 100%; display: block; }
  .qr-page { display: grid; break-after: page; page-break-after: always; border: 0; background: #fff; color: #000; min-height: 95vh; align-content: center; gap: 14px; }
  .qr-page.print-skip, .no-print, .qr-page .no-print { display: none !important; }
  .qr-title { font-size: 26pt; }
  .qr-subtitle { font-size: 20pt; }
  .qr-page .att-qr svg { width: 13cm; }
  .qr-help { font-size: 13pt; }
  .qr-tag { position: fixed; right: 8mm; bottom: 6mm; font-size: 7pt; color: #999; }
}

.login-picker { display: grid; gap: 12px; width: min(420px, 100%); }
.picker-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.picker-person { justify-content: center; min-height: 48px; font-weight: 600; }
.picker-pin .card { display: grid; gap: 8px; }

.floor-tiles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.floor-tile { display: grid; gap: 4px; text-align: left; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: inherit; font: inherit; cursor: pointer; min-height: 96px; }
.floor-tile strong { font-size: 18px; }
.floor-tile.has-ready { border-color: #2f7d4f; box-shadow: inset 4px 0 0 #2f7d4f; }
.floor-tile.empty-floor { opacity: .6; }
.floor-ready { color: #2f7d4f; font-weight: 700; }
.clean-confirm { display: grid; gap: 6px; padding: 12px; border-radius: 12px; border: 2px solid #c98a12; background: rgba(201, 138, 18, .08); }
.clean-confirm .room-actions { margin-top: 4px; }
.place-input { width: 100%; }

.room-request { display: grid; gap: 4px; padding: 10px 12px; border-radius: 10px; border-left: 4px solid #c98a12; background: rgba(201, 138, 18, .1); }
.room-request p { margin: 0; white-space: pre-wrap; font-weight: 600; }
.room-request small { color: var(--muted); }
.floor-request { color: #a26d0a; font-weight: 700; }

.att-upcoming { display: grid; gap: 8px; }
.att-upcoming-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.att-upcoming-row small { color: var(--muted); }
.att-decide { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--bg); }
.att-fields { display: grid; gap: 10px; }

.att-absences { display: grid; gap: 8px; }
.att-absences summary { font-weight: 700; cursor: pointer; }
.att-overlaps { display: grid; gap: 6px; padding: 10px; border-radius: 10px; background: rgba(47, 125, 79, .08); }
.att-overlaps.busy { background: rgba(201, 138, 18, .12); border-left: 4px solid #c98a12; }

.res-rows { display: grid; gap: 6px; }
.res-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; grid-template-areas: "time name guests" "time flags flags"; align-items: center; gap: 2px 10px; width: 100%; text-align: left; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: inherit; font: inherit; cursor: pointer; }
.res-row.open { border-color: var(--accent, #1f5c4a); box-shadow: inset 4px 0 0 var(--accent, #1f5c4a); }
.res-row.changed { border-color: #b3261e; }
.res-row.block { background: rgba(179, 38, 30, .08); border-color: rgba(179, 38, 30, .4); }
.res-row-time { grid-area: time; font-weight: 800; font-variant-numeric: tabular-nums; }
.res-row-name { grid-area: name; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.res-row-guests { grid-area: guests; color: var(--muted); font-weight: 600; white-space: nowrap; }
.res-row-flags { grid-area: flags; display: flex; flex-wrap: wrap; gap: 4px; }
.res-row-flags:empty { display: none; }
.res-row-flags .chip { font-size: 11px; padding: 1px 6px; }
.res-day-head { display: grid; gap: 4px; margin-top: 8px; }
.res-day-head .room-section { margin: 0; }
.res-cal-day.closed { box-shadow: inset 0 -4px 0 #b3261e; background: rgba(179, 38, 30, .1); }
.res-cal-day.over { outline: 2px solid #c98a12; outline-offset: -2px; }
.res-cal-day:disabled { opacity: .35; cursor: default; }
.res-cal-closed { font-size: 10px; color: #b3261e; font-weight: 700; }
.res-picker { display: grid; gap: 8px; }
.res-checks { display: grid; gap: 6px; }
.res-checks:empty { display: none; }
.res-check { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: 14px; }
.res-check.warn { background: rgba(201, 138, 18, .14); border-left: 4px solid #c98a12; font-weight: 600; }
.res-check.bad { background: rgba(179, 38, 30, .1); border-left: 4px solid #b3261e; font-weight: 600; }

.leg-plan { display: grid; gap: 6px; margin-top: 8px; }
.leg-month { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--surface); }
.leg-month summary { display: flex; gap: 8px; align-items: center; justify-content: space-between; cursor: pointer; padding: 4px 0; }
.leg-plan-row { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.leg-plan-row small { display: block; color: var(--muted); }
.leg-plan-row.done span { color: var(--muted); }
.leg-plan-icon { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); background: var(--bg); font-size: 18px; font-weight: 800; cursor: pointer; color: inherit; }
.leg-plan-icon.done { background: #2f7d4f; border-color: #2f7d4f; color: #fff; }
.leg-plan-icon.late { background: #b3261e; border-color: #b3261e; color: #fff; }
.leg-plan-icon.open { border-color: #c98a12; }
.leg-outlet-extra { display: grid; gap: 4px; margin-top: 4px; }

/* Konferenčna dvorana */
.chip.hall { background: rgba(30, 90, 180, .12); color: #1e5ab4; }
.res-hall { margin: 2px 0 6px; color: #1e5ab4; }
.res-cal-hall { font-size: 10px; color: #1e5ab4; font-weight: 700; line-height: 1.1; }
.res-cal-day.hall { box-shadow: inset 0 4px 0 #1e5ab4; }
@media (prefers-color-scheme: dark) { .chip.hall, .res-hall, .res-cal-hall { color: #8fb6ff; } }
