:root {
  /* barve iz rodsivegavolka.si/themes/blue.css */
  --accent: #275497;        /* --bg-dark-color */
  --accent-hover: #234B87;  /* --bg-header-container-color */
  --accent-light: #2A81CA;  /* --bg-light-color */
  --accent-soft: #EAF3FC;
  --accent-tint: #BCDCF6;   /* --tr-2-color */
  --danger: #b3261e;
  --ink: #1d1b1a;
  --muted: #77706c;
  --line: #ebe7e4;
  --bg: #ffffff;
  --bg-2: #f7f5f4;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }

/* ---------- glava ---------- */
.top-actions { display: flex; gap: 8px; align-items: center; }
.top-actions form { margin: 0; }
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1100px; margin: 0 auto; padding: 18px 20px 8px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { height: 44px; width: auto; }
.brand span { font-weight: 650; font-size: 17px; line-height: 1.2; display: flex; flex-direction: column; }
.brand small { font-weight: 400; font-size: 13px; color: var(--muted); }

main { max-width: 1100px; margin: 0 auto; padding: 0 20px 40px; }

/* ---------- gumbi ---------- */
.btn {
  border: 0; background: var(--accent); color: #fff; padding: 9px 16px;
  border-radius: 8px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-block;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-hover); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.ghost:hover { background: var(--bg-2); }
.btn.danger { background: #1d1b1a; }
.btn.small { padding: 5px 12px; font-size: 14px; }
.icon {
  border: 0; background: transparent; width: 34px; height: 34px; border-radius: 50%;
  font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted);
}
.icon:hover { background: var(--bg-2); color: var(--ink); }

/* ---------- koledar ---------- */
.toolbar { display: flex; align-items: center; gap: 6px; margin: 14px 0 12px; }
.toolbar h1 { font-size: 22px; font-weight: 600; margin: 0 6px; min-width: 190px; text-align: center; }
.toolbar h1::first-letter { text-transform: uppercase; }
.toolbar .btn { margin-left: auto; }

.weekdays, .grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.weekdays span {
  font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--muted); padding: 0 8px 6px;
}
.grid { border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cell {
  min-height: 112px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--bg); cursor: pointer; text-align: left; border-top: 0; border-left: 0;
  display: flex; flex-direction: column; gap: 3px; overflow: hidden;
}
.cell:hover { background: var(--bg-2); }
.cell.out { color: #bdb6b2; background: #fcfbfa; }
.cell.past .num { color: #bdb6b2; }
.num {
  font-size: 13px; width: 26px; height: 26px; display: grid; place-items: center;
  border-radius: 50%; margin-bottom: 2px; flex: none;
}
.cell.today .num { background: var(--accent); color: #fff; font-weight: 700; }
.ev {
  font-size: 12px; line-height: 1.3; padding: 3px 6px; border-radius: 5px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ev b { font-weight: 650; }
.ev .who { color: var(--muted); }
.cell.past .ev { opacity: .55; }
.more { font-size: 12px; color: var(--muted); padding-left: 4px; }

/* ---------- pogovorno okno ---------- */
dialog {
  border: 0; border-radius: 14px; padding: 0; width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(29, 27, 26, .35); }
.dlg-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 10px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: #fff; z-index: 2;
}
.dlg-head h2 { margin: 0; font-size: 18px; font-weight: 600; }
.dlg-head h2::first-letter { text-transform: uppercase; }
.editor { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; padding: 16px 18px 20px; }
.tl-label { font-size: 13px; color: var(--muted); margin: 0 0 12px 42px; }
.tl-label::first-letter { text-transform: uppercase; }

.timeline { position: relative; border-left: 1px solid var(--line); margin-left: 42px; cursor: crosshair; }
.timeline .hr {
  position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line);
}
.timeline .hr span {
  position: absolute; left: -44px; top: -8px; font-size: 11px; color: var(--muted);
  width: 38px; text-align: right;
}
.timeline .blk {
  position: absolute; left: 6px; right: 4px; border-radius: 6px; padding: 3px 7px;
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  font-size: 12px; line-height: 1.3; overflow: hidden; cursor: default;
}
.timeline .blk b { display: block; }
.timeline .blk.sel { background: repeating-linear-gradient(45deg, #fff, #fff 5px, var(--accent-tint) 5px, var(--accent-tint) 10px);
  border-left-style: dashed; pointer-events: none; }
.timeline .now { position: absolute; left: -4px; right: 0; border-top: 2px solid var(--accent); }

form h3 { margin: 0 0 10px; font-size: 15px; }
form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
form input, form select {
  display: block; width: 100%; margin-top: 4px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
form input:focus, form select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.email { display: flex; align-items: stretch; margin-top: 4px; }
.email input { margin: 0; border-radius: 8px 0 0 8px; min-width: 0; }
.email span {
  display: flex; align-items: center; padding: 0 10px; background: var(--bg-2);
  border: 1px solid var(--line); border-left: 0; border-radius: 0 8px 8px 0;
  color: var(--ink); font-size: 14px; white-space: nowrap;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.hint { font-size: 12px; color: var(--muted); margin: 4px 0 10px; }
.msg { font-size: 14px; margin: 0 0 10px; }
.msg:empty { display: none; }
.msg.err { color: var(--danger); }
.msg.ok { background: #eef6ee; color: #1f5f2a; padding: 10px 12px; border-radius: 8px; }

/* ---------- potrditvene strani ---------- */
.page-simple { background: var(--bg-2); min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card { background: #fff; border-radius: 14px; padding: 26px; width: min(440px, 100%); box-shadow: 0 6px 30px rgba(0,0,0,.06); }
.card h1 { font-size: 20px; margin: 18px 0 12px; }
.summary { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; background: var(--bg-2);
  border-left: 3px solid var(--accent); border-radius: 8px; margin-bottom: 14px; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- mobilno ---------- */
/* ---------- ponavljanje, termini, dejanja ---------- */
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn.danger-text { color: var(--danger); }
.conflict { margin: -4px 0 10px; }
.rule-hint { margin-top: -4px; }
.warn { color: #8a5a00; }
.ev i { font-style: normal; color: var(--accent-light); }
.timeline .blk.link { cursor: pointer; }
.timeline .blk.link:hover { filter: brightness(.97); }
.icon.small { width: 26px; height: 26px; font-size: 18px; }
.occ { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.occ h4 { margin: 0 0 8px; font-size: 13px; font-weight: 600; }
.occ ul { list-style: none; margin: 0; padding: 0; max-height: 220px; overflow: auto; }
.occ li { display: flex; align-items: center; justify-content: space-between; border-radius: 6px; }
.occ li:hover { background: var(--bg-2); }
.occ li.past { opacity: .5; }
.occ li.cur .occ-day { font-weight: 650; color: var(--accent); }
.occ-day { border: 0; background: none; padding: 5px 6px; cursor: pointer; font-size: 13px; text-align: left; }
.occ-day::first-letter { text-transform: uppercase; }

/* ---------- urejanje prek povezave ---------- */
.edit-page { background: #fff; border: 1px solid var(--line); border-radius: 14px; margin-top: 14px; }
.edit-page .card.done { box-shadow: none; margin: 10px auto; }

/* ---------- skrbnik ---------- */
.list { margin-top: 34px; }
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.list-head h2 { font-size: 18px; margin: 0; }
.list-head input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; width: 220px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.list table { width: 100%; border-collapse: collapse; font-size: 14px; }
.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 500; background: var(--bg-2); }
.list th, .list td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.list tr:last-child td { border-bottom: 0; }
.list tr.past td { color: var(--muted); }
.list td:last-child { text-align: right; }
.badge { font-size: 11px; background: #fff4d6; color: #8a5a00; padding: 1px 6px; border-radius: 10px; font-weight: 500; }
.login label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.login input { display: block; width: 100%; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }

@media (max-width: 680px) {
  .top { padding: 14px 14px 4px; }
  .brand img { height: 36px; }
  main { padding: 0 8px 30px; }
  .toolbar h1 { font-size: 18px; min-width: 0; }
  .weekdays span { padding: 0 0 6px; text-align: center; }
  .cell { min-height: 58px; padding: 4px 2px; align-items: center; }
  .ev { font-size: 0; padding: 0; height: 4px; width: 80%; border: 0; background: var(--accent); }
  .more { font-size: 10px; padding: 0; }
  .editor { grid-template-columns: 1fr; }
  .editor .tl-col { order: 2; }
  .list td:nth-child(5), .list th:nth-child(5) { display: none; }
  dialog { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 14px 14px 0 0; max-height: 92vh; }
}
