/* ============================================================
   MyCRM - stil. Za prebrendiranje mijenjaj samo tokene ispod.
   ============================================================ */
:root {
  --brand: #2563eb;
  --brand-deep: #1d4ed8;
  --brand-soft: #e6edff;
  --ink: #1e293b;
  --ink-deep: #0f172a;
  --side: #101a2e;
  --side-2: #1a2740;
  --muted: #7c8ba1;
  --surface: #f6f7fa;
  --line: #e4e8ef;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --radius: 12px;
  --sidebar-w: 232px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 14.5px/1.55 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--ink); }
input::placeholder, textarea::placeholder { color: var(--muted); }
a { color: var(--brand); }
h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
h2 { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
h3 { font-size: 14px; font-weight: 700; margin: 0 0 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12.5px; }

.wordmark { font-weight: 800; letter-spacing: -.03em; }

/* ---------- gumbi ---------- */
.btn-primary {
  background: var(--brand); color: #fff; border: 0;
  border-radius: 9px; padding: 10px 16px; font-weight: 600;
  transition: background .15s;
}
.btn-primary:hover { background: var(--brand-deep); }
.btn-ghost {
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 14px; font-weight: 500;
}
.btn-ghost:hover { border-color: var(--muted); }
.btn-sm { padding: 7px 12px; font-size: 13px; }

/* ---------- prijava ---------- */
.login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(37,99,235,.35), transparent 60%),
    linear-gradient(150deg, var(--side) 0%, #060c18 100%);
}
.login-card {
  background: #fff; border-radius: 18px; padding: 32px 28px;
  width: 100%; max-width: 360px;
  box-shadow: 0 24px 60px rgba(6,12,24,.5);
  display: flex; flex-direction: column; gap: 13px;
}
.login-brand { display: flex; align-items: center; gap: 9px; }
.login-icon { width: 30px; height: 30px; }
.login-logo { font-size: 21px; }
.login-sub { margin: -6px 0 6px; color: var(--muted); font-size: 13px; }
.login-card label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); }
.login-card input {
  border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; outline: 0;
}
.login-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.login-error { color: var(--danger); font-size: 13px; margin: 0; }

/* ---------- kostur: sidebar + glavno ---------- */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--side); color: #cdd7e6;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px; position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 17px; padding: 0 6px; }
.side-icon { width: 26px; height: 26px; }
.side-add { width: 100%; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav button {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: none; border: 0; color: #b7c3d6; text-align: left;
  padding: 10px 12px; border-radius: 9px; font-weight: 500;
}
.side-nav button:hover { background: var(--side-2); color: #fff; }
.side-nav button.active { background: var(--brand); color: #fff; }
.side-nav b { font-size: 12px; font-weight: 600; opacity: .75; }
.side-nav b.alert {
  opacity: 1; background: var(--danger); color: #fff;
  border-radius: 999px; padding: 1px 8px; font-weight: 700;
}
.side-foot { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 14px; }
.side-user { font-size: 12px; color: var(--muted); word-break: break-all; padding: 0 6px; }
.side-foot .btn-ghost { background: transparent; color: #cdd7e6; border-color: rgba(255,255,255,.16); }
.side-foot .btn-ghost:hover { border-color: rgba(255,255,255,.4); }

.menu-btn {
  display: none; position: fixed; top: 12px; left: 12px; z-index: 40;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  width: 38px; height: 38px; font-size: 17px; box-shadow: 0 3px 12px rgba(15,23,42,.1);
}
.scrim { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 25; }

.main { flex: 1; min-width: 0; padding: 22px 26px 60px; }
.main-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.head-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.head-tools input[type="search"] {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 13px;
  min-width: 230px; background: #fff; outline: 0;
}
.head-tools input[type="search"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }

/* ---------- red s filterima ---------- */
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }

/* ---------- statusne kartice (filter) ---------- */
.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.status-tabs button {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 14px; font-size: 13px; font-weight: 500; color: var(--ink);
}
.status-tabs button b { color: var(--muted); font-size: 12px; margin-left: 3px; }
.status-tabs button:hover { border-color: var(--muted); }
.status-tabs button.active { background: var(--ink-deep); border-color: var(--ink-deep); color: #fff; }
.status-tabs button.active b { color: rgba(255,255,255,.65); }

/* ---------- kartice kontakata ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .15s, border-color .15s;
}
.card:hover { border-color: #cfd8e6; box-shadow: 0 2px 10px rgba(15,23,42,.05); }
.card-top { display: flex; align-items: flex-start; gap: 16px; padding: 13px 16px; cursor: pointer; }
.card-left { flex: 1; min-width: 0; }
.card-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
  max-width: 40%; text-align: right; flex: 0 1 auto;
}
.card-right .st-chip { margin-left: 0; }
.card-remark {
  font-size: 12.5px; line-height: 1.4; color: var(--warning);
  background: var(--warning-soft); border-radius: 8px; padding: 4px 9px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-align: left;
}
.card-remark.full { -webkit-line-clamp: unset; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 3px; }
.card-name { font-weight: 650; font-size: 15px; }
.card-sub {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.c-prof { font-weight: 600; color: var(--ink); }
.c-firm { color: var(--ink); }
.c-city { color: var(--muted); }
.meet-chip { background: var(--brand-soft); color: var(--brand-deep); border-radius: 999px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.meet-chip.today { background: var(--danger-soft); color: #991b1b; }
.note-chip {
  background: var(--brand-soft); color: var(--brand-deep); border: 1px solid #c7d7ff;
  border-radius: 999px; padding: 4px 12px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.note-chip:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

.st-chip { margin-left: auto; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; background: var(--surface); color: var(--muted); }
.st-chip.s-lead { background: var(--surface); color: var(--muted); }
.st-chip.s-kontaktiran { background: var(--brand-soft); color: var(--brand-deep); }
.st-chip.s-ponuda { background: var(--warning-soft); color: var(--warning); }
.st-chip.s-klijent { background: var(--success-soft); color: var(--success); }
.st-chip.s-odbijeno { background: var(--danger-soft); color: var(--danger); }

.card-body { border-top: 1px solid var(--line); padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.contact-row { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13.5px; }
.contact-row a { text-decoration: none; }
.contact-row a:hover { text-decoration: underline; }
.status-row { display: flex; gap: 5px; flex-wrap: wrap; }
.st-btn {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 11px; font-size: 12.5px; color: var(--muted);
}
.st-btn:hover { border-color: var(--muted); color: var(--ink); }
.st-btn.on { background: var(--ink-deep); border-color: var(--ink-deep); color: #fff; }
.card-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-act, .card-del {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 12px; font-size: 13px;
}
.btn-act:hover { border-color: var(--brand); color: var(--brand); }
.card-del { margin-left: auto; color: var(--danger); }
.card-del:hover { background: var(--danger-soft); border-color: var(--danger); }

.empty { color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 34px; text-align: center; }

.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; }
.pager button {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  width: 34px; height: 34px; font-size: 16px;
}
.pager button:disabled { opacity: .4; cursor: default; }
.pg-info { font-size: 13px; color: var(--muted); }

/* ---------- padajući izbornik ---------- */
.dd { position: relative; }
.dd-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 12px; min-width: 150px; color: var(--ink); font-size: 13.5px;
}
.dd.filled .dd-btn { border-color: var(--brand); color: var(--brand-deep); }
.dd-placeholder { color: var(--muted); }
.dd-chevron { flex: 0 0 auto; opacity: .6; }
.dd-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15,23,42,.13); min-width: 100%; padding: 5px;
}
.dd.open .dd-menu { display: block; }
.dd-opts { display: flex; flex-direction: column; max-height: 260px; overflow: auto; }
.dd-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; border: 0; border-radius: 7px; padding: 8px 10px;
  text-align: left; white-space: nowrap; color: var(--ink); font-size: 13.5px;
}
.dd-opt:hover { background: var(--surface); }
.dd-opt.sel { color: var(--brand-deep); font-weight: 600; }
.dd-check { flex: 0 0 auto; }
.dd-count { font-size: 11.5px; color: var(--muted); background: var(--surface); border-radius: 999px; padding: 1px 7px; margin-left: auto; }
.dd-empty { color: var(--muted); font-size: 13px; padding: 8px 10px; }

/* ---------- modali ---------- */
.modal {
  position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.5);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  overflow: auto;
}
.modal-card {
  background: #fff; border-radius: 16px; padding: 24px;
  width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 12px;
  box-shadow: 0 24px 60px rgba(15,23,42,.35);
}
.modal-card label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.modal-card input[type="text"], .modal-card input:not([type]),
.modal-card input[type="email"], .modal-card input[type="date"],
.modal-card input[type="time"], .modal-card input[type="search"], .modal-card textarea {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px; outline: 0; width: 100%;
}
.modal-card input:focus, .modal-card textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.modal-card textarea { resize: vertical; font-family: inherit; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.check-row { flex-direction: row !important; align-items: center; gap: 8px !important; color: var(--ink) !important; font-weight: 500 !important; font-size: 13.5px !important; }
.check-row input { width: 16px; height: 16px; }
.form-hint { margin: -6px 0 0; font-size: 12px; color: var(--muted); }
.dup-warn {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--warning-soft); color: #92400e;
  border: 1px solid #fcd34d; border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.45;
}
.dup-warn b { font-size: 13px; }
.modal-card input.dup { border-color: var(--danger); background: #fff5f5; }
.modal-card input.dup:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

.e-contact { position: relative; display: block; }
.e-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 10;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15,23,42,.13); padding: 5px; max-height: 220px; overflow: auto;
}
.e-results button {
  display: flex; justify-content: space-between; gap: 10px; width: 100%;
  background: none; border: 0; border-radius: 7px; padding: 8px 10px; text-align: left; font-size: 13.5px;
}
.e-results button:hover { background: var(--surface); }
.e-results button span { color: var(--muted); font-size: 12.5px; }
.e-selected {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--brand-soft); color: var(--brand-deep);
  border-radius: 9px; padding: 9px 12px; font-weight: 600; font-size: 13.5px;
}
.e-selected button { background: none; border: 0; color: inherit; font-size: 18px; line-height: 1; }

/* ---------- bilješke ---------- */
.notes-wrap { max-width: 720px; display: flex; flex-direction: column; gap: 16px; }
.notes-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13.5px; }
.notes-meta .st-chip { margin-left: 0; }
.notes-meta a { text-decoration: none; }
.note-add {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.notes-remark {
  width: 100%; font-size: 13px; color: var(--warning);
  background: var(--warning-soft); border-radius: 9px; padding: 9px 12px;
}
.note-add textarea {
  border: 1px solid var(--line); border-radius: 9px; padding: 11px 13px;
  resize: vertical; outline: 0; min-height: 76px;
}
.note-add textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.note-add-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.note-remind { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.note-remind input {
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; outline: 0; font-size: 13px;
}
.note-remind input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.note-list { display: flex; flex-direction: column; gap: 8px; }
.note-item {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px;
}
.note-item header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.note-date { font-size: 12px; font-weight: 600; color: var(--muted); }
.note-del { background: none; border: 0; color: var(--muted); font-size: 14px; padding: 2px 5px; border-radius: 6px; }
.note-del:hover { background: var(--danger-soft); color: var(--danger); }
.note-item p { margin: 0; white-space: pre-wrap; }

/* ---------- kalendar ---------- */
/* kalendar se širi i centrira zajedno sa svojim zaglavljem */
#view-cal { max-width: 1100px; margin: 0 auto; }
.cal-wrap { max-width: none; }
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-nav {
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  width: 34px; height: 34px; font-size: 17px; line-height: 1;
}
.cal-nav:hover { border-color: var(--muted); }
.cal-title { font-weight: 700; font-size: 16px; min-width: 170px; }
.cal-head .btn-ghost { margin-left: auto; }
.cal-dow {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px;
  font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; margin-bottom: 5px;
}
.cal-dow span { text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-day {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  aspect-ratio: 1 / .85; padding: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 4px;
}

/* gumbi se pojavljuju tek kad mišem prijeđeš preko dana */
.cal-acts {
  position: absolute; left: 5px; right: 5px; bottom: 5px;
  display: none; gap: 4px; justify-content: center;
}
.cal-day:hover .cal-acts { display: flex; }
.cal-act {
  flex: 1; text-align: center; white-space: nowrap;
  font-size: 10.5px; font-weight: 600; padding: 4px 5px; border-radius: 7px;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
}
.cal-act:hover { background: var(--ink-deep); border-color: var(--ink-deep); color: #fff; }
.cal-act.add:hover { background: var(--brand); border-color: var(--brand); }
.cal-day.other .cal-acts { display: none !important; }
@media (hover: none) { .cal-acts { display: none !important; } }
.cal-day:hover { border-color: var(--brand); }
.cal-day.other { opacity: .38; }
/* današnji dan: samo plavi okvir, bez ispune iza broja */
.cal-day.today { border-color: var(--brand); border-width: 2px; }
.cal-day.today .cal-num { color: var(--brand-deep); font-weight: 800; }
.cal-day.today-busy { border-color: var(--danger); background: #fff7f7; }
.cal-day.today-busy .cal-num { color: #991b1b; }
.cal-day.today-busy .cal-dots i { background: var(--danger); }
/* odabrani dan se od današnjeg razlikuje ispunom, ne okvirom */
.cal-day.sel { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); background: #f4f7ff; }
.cal-num { font-size: 13px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; }
.cal-dots { display: flex; gap: 4px; }
.cal-dots i {
  width: 9px; height: 9px; border-radius: 50%; background: var(--brand); display: block;
  box-shadow: 0 1px 3px rgba(37, 99, 235, .45);
}
.cal-more { font-size: 10px; color: var(--muted); }

.cal-alert {
  display: flex; flex-direction: column; gap: 4px; cursor: pointer;
  background: var(--danger-soft); border: 1px solid #fca5a5; color: #991b1b;
  border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; font-size: 13px;
}
.cal-alert > b:first-child { font-size: 14px; }
.cal-alert:hover { border-color: var(--danger); }

.agenda { margin-top: 24px; }
/* ---------- dnevni raspored po satima (modal) ---------- */
.day-card { max-width: 620px; gap: 0; }
.day-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.day-head h2 { flex: 1; margin: 0; }
.day-hours { max-height: 62vh; overflow-y: auto; }

.hour-row { display: flex; align-items: stretch; gap: 12px; border-top: 1px solid var(--line); }
.hour-row:last-child { border-bottom: 1px solid var(--line); }
.hour-label {
  flex: 0 0 54px; padding: 10px 0 10px 2px;
  font-size: 12px; font-weight: 600; color: var(--muted); text-align: right;
}
.hour-slot { flex: 1; min-width: 0; padding: 6px 0; }
.hour-slot[data-slot] {
  cursor: pointer; display: flex; align-items: center;
  border-radius: 8px; min-height: 38px;
}
.hour-slot[data-slot]:hover { background: var(--brand-soft); }
.hour-empty { font-size: 12.5px; color: transparent; padding-left: 10px; }
.hour-slot[data-slot]:hover .hour-empty { color: var(--brand-deep); font-weight: 600; }
.hour-row.busy .hour-label { color: var(--brand-deep); }
.hour-row.now { background: #fbfcff; }
.hour-row.now .hour-label { color: var(--danger); font-weight: 700; }
.hour-row .agenda-item { margin-bottom: 6px; }
.hour-row .agenda-item:last-child { margin-bottom: 0; }

.agenda-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; margin-bottom: 7px;
}
.agenda-item.past { opacity: .55; }
.agenda-time { font-weight: 700; font-size: 13px; color: var(--brand-deep); background: var(--brand-soft); border-radius: 7px; padding: 3px 8px; white-space: nowrap; }
.agenda-date { font-size: 12.5px; color: var(--muted); white-space: nowrap; min-width: 96px; }
.agenda-info { flex: 1; min-width: 0; }
.agenda-name { font-weight: 600; }
.agenda-name.linkable { color: var(--brand); cursor: pointer; }
.agenda-name.linkable:hover { text-decoration: underline; }
.agenda-sub { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 2px; }
.agenda-sub a { text-decoration: none; }
.agenda-note { font-size: 13px; color: var(--muted); margin-top: 3px; }
.agenda-del { background: none; border: 0; color: var(--muted); border-radius: 6px; padding: 3px 6px; }
.agenda-del:hover { background: var(--danger-soft); }
.agenda-empty { color: var(--muted); font-size: 13.5px; }
.up-row { cursor: pointer; }

/* ---------- obavijest ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90;
  background: var(--ink-deep); color: #fff; border-radius: 10px;
  padding: 11px 18px; font-size: 13.5px; font-weight: 500;
  box-shadow: 0 12px 30px rgba(15,23,42,.3); max-width: 90vw;
}
.toast.err { background: var(--danger); }

/* ---------- mobitel ---------- */
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 30; height: 100vh;
    transform: translateX(-100%); transition: transform .2s;
  }
  .sidebar.open { transform: none; }
  .main { padding: 62px 14px 60px; }
  .head-tools { width: 100%; margin-left: 0; }
  .head-tools input[type="search"] { flex: 1; min-width: 0; }
  .grid2 { grid-template-columns: 1fr; }
  .cal-day { aspect-ratio: 1 / 1; }
  .card-top { flex-direction: column; gap: 8px; }
  .card-right { max-width: 100%; flex-direction: row; align-items: center; flex-wrap: wrap; text-align: left; }
  .agenda-date { min-width: 0; }
}
