/* SM Dash - SajtMajstor stil */
:root {
  --red: #ee4040; --red-dark: #d33535; --red-soft: #fdeeee;
  --ink: #1b1a19; --graphite: #262423; --graphite-2: #34312e;
  --paper: #f4f2ef; --card: #ffffff; --card-2: #faf9f7; --line: #e5e0db; --line-2: #efebe7;
  --text: #1b1a19; --muted: #66605b; --muted-2: #a8a19a;
  --p1: #ee4040; --p2: #f08a24; --p3: #2f7de1; --ok: #22a861;
  --ev-bg: #ebe7e2; --ev-line: #8c857e; --ev-text: #34312e;
  --tint: 13%;
  --r: 8px; --r-s: 5px;
  --shadow: 0 1px 2px rgba(27, 26, 25, .05), 0 8px 24px rgba(27, 26, 25, .06);
  --font: "Montserrat", Arial, Helvetica, sans-serif;
  --gap: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --paper: #121110; --card: #1d1b1a; --card-2: #232120; --line: #34312e; --line-2: #2a2725;
  --text: #ece8e3; --muted: #a8a19a; --muted-2: #77706a;
  --ev-bg: #2e2b29; --ev-line: #8c857e; --ev-text: #d9d4ce;
  --red-soft: #3a1f1f; --tint: 22%;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121110; --card: #1d1b1a; --card-2: #232120; --line: #34312e; --line-2: #2a2725;
    --text: #ece8e3; --muted: #a8a19a; --muted-2: #77706a;
    --ev-bg: #2e2b29; --ev-line: #8c857e; --ev-text: #d9d4ce;
    --red-soft: #3a1f1f; --tint: 22%;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--paper); color: var(--text); font: 500 15px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- zaglavlje ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  height: 60px; padding: 0 var(--gap);
  background: var(--ink); color: #fff;
  border-bottom: 3px solid var(--red);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { height: 24px; width: auto; display: block; }
.brand-dash { font-weight: 800; font-size: 13px; letter-spacing: .14em; color: #fff; background: var(--red); padding: 3px 7px 2px; border-radius: 3px; }
.clock { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.clock b { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.clock span { font-size: 12px; color: #a8a19a; white-space: nowrap; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { text-decoration: none; padding: 8px 14px; border-radius: 6px; font-weight: 600; font-size: 14px; color: #cfc9c3; }
.tabs a:hover { background: var(--graphite-2); color: #fff; }
.tabs a.on { background: var(--graphite-2); color: #fff; box-shadow: inset 0 -2px 0 var(--red); }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { width: 38px; height: 38px; border-radius: 6px; border: 0; background: transparent; color: #cfc9c3; cursor: pointer; font-size: 18px; display: grid; place-items: center; }
.icon-btn:hover { background: var(--graphite-2); color: #fff; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); flex: none; }
.live-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 168, 97, .25); }

.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 6px; padding: 9px 16px; font-weight: 700; cursor: pointer; font-size: 14px; white-space: nowrap; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--card-2); }
.btn-ghost.danger { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* ---------- kartice ---------- */
main { padding: var(--gap); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; min-width: 0; min-height: 0; }
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.card-h h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.card-h h2 b { color: var(--red); }
.card-h .sp { flex: 1; }
.empty { color: var(--muted-2); font-size: 14px; padding: 10px 0; }

/* ---------- dashboard raspored ---------- */
.dash { display: grid; gap: var(--gap); }
/* portret (vertikalni monitor) */
@media (orientation: portrait) {
  .dash {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "next next" "cal cal" "status status" "note note" "weather focus";
  }
  .dash .cal { aspect-ratio: 1 / 1; }
  .dash .next-list { grid-template-columns: 1fr 1fr; }
}
/* pejzaz */
@media (orientation: landscape) {
  .dash {
    height: calc(100vh - 60px - 2 * var(--gap));
    grid-template-columns: minmax(0, 1fr) clamp(320px, 26vw, 440px);
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    grid-template-areas: "status status" "cal next" "cal focus" "cal note" "cal weather";
  }
  .dash .focus, .dash .next { overflow: auto; }
}
.next { grid-area: next; }
.cal { grid-area: cal; display: flex; flex-direction: column; }
.status { grid-area: status; padding: 8px 12px; }
.note { grid-area: note; display: flex; flex-direction: column; }
.weather { grid-area: weather; }
.focus { grid-area: focus; overflow: auto; }

/* ---------- red zadatka ---------- */
.next-list, .tlist { display: grid; gap: 6px; }
.trow {
  --pc: var(--p3);
  display: flex; align-items: flex-start; gap: 10px;
  padding: 8px 10px 8px 8px; border-radius: var(--r-s);
  background: color-mix(in srgb, var(--pc) 7%, var(--card));
  border-left: 4px solid var(--pc);
  cursor: pointer; min-width: 0;
  transition: background .15s;
}
.trow:hover { background: color-mix(in srgb, var(--pc) 13%, var(--card)); }
.p1 { --pc: var(--p1); } .p2 { --pc: var(--p2); } .p3 { --pc: var(--p3); }
.done { --pc: var(--ok) !important; }
.trow.done .trow-title { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--ok) 60%, transparent); }
.trow-main { min-width: 0; flex: 1; }
.trow-title { font-weight: 600; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere; }
.trow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.when.late { color: var(--red); font-weight: 700; }
.when.today { color: var(--text); font-weight: 700; }
.tag { background: var(--line-2); border-radius: 4px; padding: 1px 7px; font-weight: 600; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.star { color: #e8a317; margin-right: 4px; }
.chk {
  flex: none; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%;
  border: 2px solid var(--pc); background: var(--card); cursor: pointer; padding: 0; position: relative;
}
.chk:hover { background: color-mix(in srgb, var(--pc) 20%, var(--card)); }
.done .chk { background: var(--ok); border-color: var(--ok); }
.done .chk::after, .chk:hover::after { content: ""; position: absolute; left: 5px; top: 1.5px; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.chk:hover::after { border-color: var(--pc); }
.done .chk:hover::after { border-color: #fff; }
.flash { animation: flash 2.4s ease-out; }
@keyframes flash { 0%, 30% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--pc) 55%, transparent); } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ---------- kalendar ---------- */
.cal-nav { display: flex; gap: 4px; align-items: center; }
.cal-title { font-size: 16px; font-weight: 700; }
.cal-title small { color: var(--muted); font-weight: 600; font-size: 13px; margin-left: 6px; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; user-select: none; }
.cal-scroll { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cal-grid {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 44px repeat(var(--days), minmax(0, 1fr));
  grid-template-rows: auto minmax(44px, auto) minmax(0, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden;
}
.cal-corner, .cal-dayhead { background: var(--card-2); border-bottom: 1px solid var(--line); }
.cal-dayhead { padding: 7px 8px; border-left: 1px solid var(--line); display: flex; align-items: baseline; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; cursor: pointer; }
.cal-dayhead b { font-size: 19px; color: var(--text); letter-spacing: 0; }
.cal-dayhead .cnt { margin-left: auto; font-size: 11px; font-weight: 600; letter-spacing: 0; }
.cal-dayhead.is-today { background: var(--red); color: rgba(255, 255, 255, .85); }
.cal-dayhead.is-today b { color: #fff; }
.cal-dayhead.is-past b { color: var(--muted); }
.cal-gutter { font-size: 10px; color: var(--muted-2); text-align: right; padding: 6px 6px 0 0; border-bottom: 1px solid var(--line); line-height: 1.2; text-transform: uppercase; font-weight: 700; }
.cal-allday {
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 4px; display: flex; flex-direction: column; gap: 3px;
  max-height: 17vh; overflow: auto; min-width: 0;
}
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; font-weight: 600; }
.cal-times span:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid var(--line); min-width: 0; cursor: copy; }
.cal-col.is-today { background: color-mix(in srgb, var(--red) 3%, transparent); }
.cal-col .hl { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-2); pointer-events: none; }
.cal-col .work { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--text) 2.5%, transparent); pointer-events: none; }
.drop-on { outline: 2px dashed var(--red); outline-offset: -3px; }
.now { position: absolute; left: -1px; right: 0; height: 2px; background: var(--red); z-index: 5; pointer-events: none; }
.now::before { content: ""; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }

.chip {
  --pc: var(--p3);
  display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 3px 6px 3px 4px; border-radius: 4px; font-size: 12.5px; font-weight: 600; line-height: 1.25;
  background: color-mix(in srgb, var(--pc) var(--tint), var(--card));
  border-left: 3px solid var(--pc); cursor: pointer;
}
.chip .chk { width: 15px; height: 15px; border-width: 2px; margin: 0; }
.chip .chk::after { left: 3px !important; top: 0 !important; width: 4px !important; height: 7px !important; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.done span { text-decoration: line-through; color: var(--muted); }
.chip.ev { --pc: var(--ev-line); background: var(--ev-bg); color: var(--ev-text); cursor: default; }

.blk {
  --pc: var(--p3);
  position: absolute; z-index: 2; overflow: hidden;
  border-radius: 4px; padding: 3px 6px 3px 5px;
  font-size: 12px; line-height: 1.25; font-weight: 600;
  background: color-mix(in srgb, var(--pc) var(--tint), var(--card));
  border-left: 3px solid var(--pc);
  box-shadow: 0 0 0 1px var(--card);
  display: flex; gap: 5px; align-items: flex-start; cursor: pointer;
}
.blk:hover { z-index: 4; box-shadow: 0 0 0 1px var(--card), 0 4px 12px rgba(0, 0, 0, .12); }
.blk .chk { width: 15px; height: 15px; border-width: 2px; margin-top: 0; }
.blk .chk::after { left: 3px !important; top: 0 !important; width: 4px !important; height: 7px !important; }
.blk-body { min-width: 0; overflow: hidden; }
.blk-body b { font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 3px; }
.blk-client { display: block; color: var(--muted); font-weight: 500; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.blk.short .blk-client { display: none; }
.blk.short .blk-body { white-space: nowrap; text-overflow: ellipsis; }
.blk.done .blk-body { text-decoration: line-through; color: var(--muted); }
.blk.ev { --pc: var(--ev-line); background: var(--ev-bg); color: var(--ev-text); cursor: default; }
.blk.ev::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--ev-line) 9%, transparent) 6px 7px); pointer-events: none; }
.cal-hint { margin-top: 8px; font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal-hint a { color: var(--red); font-weight: 600; cursor: pointer; }
.legend { display: inline-flex; align-items: center; gap: 4px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

/* ---------- status traka ---------- */
.stats { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 13.5px; color: var(--muted); }
.stat b { color: var(--text); font-size: 17px; margin-right: 4px; font-variant-numeric: tabular-nums; }
.stat.red b { color: var(--red); }
.stat.green b { color: var(--ok); }
.stats .sp { flex: 1; }
.sync { font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.sync a { color: var(--red); font-weight: 600; cursor: pointer; }

/* ---------- beleska ---------- */
.note textarea {
  flex: 1; width: 100%; min-height: 90px; resize: vertical;
  border: 0; outline: 0; background: repeating-linear-gradient(var(--card), var(--card) 25px, var(--line-2) 25px, var(--line-2) 26px);
  line-height: 26px; font-size: 14.5px; padding: 0 2px; font-weight: 500;
}
@media (orientation: portrait) { .note textarea { min-height: 104px; height: 104px; } }
.saved { font-size: 12px; color: var(--ok); opacity: 0; transition: opacity .3s; }
.saved.on { opacity: 1; }

/* ---------- vreme ---------- */
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-ico { font-size: 52px; line-height: 1; }
.wx-temp { font-size: 42px; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.wx-desc { font-weight: 600; }
.wx-sub { font-size: 12.5px; color: var(--muted); }
.wx-days { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.wx-day { text-align: center; background: var(--card-2); border: 1px solid var(--line-2); border-radius: var(--r-s); padding: 7px 4px; font-size: 12.5px; }
.wx-day b { display: block; font-size: 11px; color: var(--muted); letter-spacing: .06em; }
.wx-day .i { font-size: 22px; display: block; margin: 2px 0; }
.wx-day .mx { font-weight: 700; }
.wx-day .mn { color: var(--muted); }
.wx-day .pp { display: block; color: var(--p3); font-size: 11px; }
@media (orientation: landscape) { .wx-ico { font-size: 40px; } .wx-temp { font-size: 34px; } .wx-days { margin-top: 10px; } }

/* ---------- klijenti ---------- */
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: var(--gap); flex-wrap: wrap; }
.view-head h1 { font-size: 24px; }
.view-head h1 em { font-style: normal; color: var(--red); }
.view-head .sp { flex: 1; }
.search { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 8px 12px; min-width: 220px; outline: 0; }
.search:focus, .field:focus { border-color: var(--red); }
.mood-legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.client-card {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: center;
  text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px; box-shadow: var(--shadow); transition: transform .12s, border-color .12s;
  border-top: 4px solid var(--line);
}
.client-card:hover { transform: translateY(-2px); border-color: var(--muted-2); }
.client-card.mood-ljut { border-top-color: var(--p1); }
.client-card.mood-neutralan { border-top-color: var(--p2); }
.client-card.mood-zadovoljan, .client-card.mood-super { border-top-color: var(--ok); }
.client-card .mood { grid-row: span 3; font-size: 40px; line-height: 1; }
.client-card .cname { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.counts { display: flex; gap: 5px; flex-wrap: wrap; }
.cnt { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 10px; background: color-mix(in srgb, var(--pc) 15%, var(--card)); color: var(--pc); }
.cnt.zero { opacity: .35; }
.cnt.ok { --pc: var(--ok); }
.cnt.late { --pc: var(--p1); background: var(--p1); color: #fff; }
.bar { height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ok); }

.back { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14px; }
.back:hover { color: var(--red); }
.client-head { display: flex; align-items: center; gap: 16px; margin: 10px 0 var(--gap); flex-wrap: wrap; }
.client-head .mood { font-size: 56px; line-height: 1; }
.client-head h1 { font-size: 28px; }
.client-head .sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.client-head .sub a { color: var(--red); }
.client-cols { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) and (orientation: landscape) { .client-cols { grid-template-columns: minmax(0, 1fr) 360px; } }
.quick-add { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.quick-add input[name=title] { flex: 1; min-width: 200px; }
.field { border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 8px 10px; outline: 0; min-width: 0; }
.info-notes { width: 100%; min-height: 220px; resize: vertical; }
details.done-list { margin-top: 14px; }
details.done-list summary { cursor: pointer; color: var(--muted); font-weight: 600; font-size: 14px; margin-bottom: 8px; }

/* ---------- lista ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: var(--gap); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--card); }
.seg button { border: 0; background: transparent; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--ink); color: #fff; }
:root[data-theme="dark"] .seg button.on { background: var(--graphite-2); }
.pchip { --pc: var(--p3); border: 1px solid var(--line); background: var(--card); border-radius: 20px; padding: 6px 12px 6px 9px; cursor: pointer; font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.pchip i { width: 10px; height: 10px; border-radius: 50%; background: var(--pc); }
.pchip.on { border-color: var(--pc); color: var(--text); background: color-mix(in srgb, var(--pc) 12%, var(--card)); }
.group { margin-bottom: 18px; }
.group h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.group h3 .n { background: var(--line-2); border-radius: 10px; padding: 0 8px; font-size: 12px; }
.group.late h3 { color: var(--red); }
.list-wrap { max-width: 980px; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(18, 17, 16, .55); display: grid; place-items: start center; padding: 8vh 16px 16px; overflow: auto; animation: fade .12s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: min(560px, 100%); background: var(--card); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); padding: 20px; border-top: 4px solid var(--red); }
.modal h2 { font-size: 18px; margin-bottom: 14px; }
.modal label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.modal label > .field, .modal label > select, .modal label > textarea { display: block; width: 100%; margin-top: 4px; }
.modal .in-title { width: 100%; font-size: 17px; font-weight: 600; padding: 10px 12px; margin-bottom: 12px; }
.modal textarea.field { resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.grid3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; margin-bottom: 8px; }
@media (max-width: 520px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.prio-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 12px; }
.prio-pick input { position: absolute; opacity: 0; pointer-events: none; }
.prio-pick span { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 9px; border-radius: 6px; border: 2px solid var(--line); cursor: pointer; font-weight: 700; color: var(--muted); font-size: 14px; }
.prio-pick span i { width: 11px; height: 11px; border-radius: 50%; background: var(--pc); }
.prio-pick input:checked + span { border-color: var(--pc); color: var(--text); background: color-mix(in srgb, var(--pc) 12%, var(--card)); }
.prio-pick input:focus-visible + span { outline: 2px solid var(--pc); outline-offset: 2px; }
.quick-dates { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.quick-dates button { border: 1px solid var(--line); background: var(--card-2); border-radius: 14px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; font-weight: 600; color: var(--muted); }
.quick-dates button:hover { border-color: var(--red); color: var(--red); }
.check { display: flex !important; align-items: center; gap: 8px; margin: 4px 0 12px; font-size: 14px !important; color: var(--text) !important; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--red); }
.modal-actions { display: flex; gap: 8px; align-items: center; margin-top: 16px; flex-wrap: wrap; }
.modal-actions .sp { flex: 1; }
.src { margin-top: 12px; font-size: 12px; color: var(--muted-2); }
.hint { font-size: 12.5px; color: var(--muted); margin: 4px 0 12px; line-height: 1.5; }
.hint code, .mcp-url { background: var(--card-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; font-size: 12px; word-break: break-all; }
.mcp-url { display: block; padding: 8px 10px; margin: 4px 0; font-family: ui-monospace, Consolas, monospace; }
.set-sec { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.set-sec h3 { font-size: 14px; margin-bottom: 8px; }

/* ---------- toast ---------- */
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 14px; opacity: 0; transition: .2s; z-index: 60; pointer-events: none; border-left: 4px solid var(--red); }
#toast.on { opacity: 1; transform: translateX(-50%); }

/* ---------- prijava ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--ink); padding: 16px; }
.login-box { width: min(380px, 100%); background: var(--graphite); border-radius: 12px; padding: 32px 28px; border-top: 4px solid var(--red); color: #fff; }
.login-box img { height: 28px; display: block; margin-bottom: 6px; }
.login-box p { color: #a8a19a; margin: 0 0 22px; font-size: 14px; }
.login-box input { width: 100%; padding: 12px 14px; border-radius: 6px; border: 1px solid #3d3a37; background: #1b1a19; color: #fff; outline: 0; margin-bottom: 12px; }
.login-box input:focus { border-color: var(--red); }
.login-box .btn { width: 100%; justify-content: center; padding: 12px; }
.login-err { color: #ff8a8a; font-size: 13px; margin-bottom: 12px; }

/* ---------- uski ekrani (telefon) ---------- */
@media (max-width: 760px) {
  .top { height: auto; flex-wrap: wrap; gap: 8px 12px; padding: 8px 12px; }
  .clock { order: 2; } .top-actions { order: 3; margin-left: auto; }
  .tabs { order: 4; width: 100%; margin: 0; }
  .tabs a { flex: 1; text-align: center; padding: 7px 6px; }
  .brand img { height: 20px; }
  main { padding: 10px; }
  .dash { grid-template-columns: 1fr !important; grid-template-areas: "next" "status" "cal" "focus" "note" "weather" !important; height: auto !important; grid-template-rows: none !important; }
  .dash .next-list { grid-template-columns: 1fr !important; }
  .dash .cal { aspect-ratio: auto !important; }
  .cal-scroll { overflow-x: auto; }
  .cal-grid { min-width: 620px; height: 640px; }
  .search { min-width: 0; flex: 1; }
}

/* boje prioriteta (na kraju fajla da pregaze podrazumevanu boju komponenti) */
.p1 { --pc: var(--p1); } .p2 { --pc: var(--p2); } .p3 { --pc: var(--p3); }
.done { --pc: var(--ok) !important; }
.chip.done-sum { --pc: var(--ok); justify-content: center; color: var(--ok); font-weight: 700; }
