/* ============================================================
   Flex Desk Booking — premium UI
   Type: Sora (display) + Manrope (body) · Graphite + indigo accent
   ============================================================ */

:root {
  --bg: #f3f4f7;
  --bg-grid: rgba(20, 23, 33, 0.025);
  --surface: #ffffff;
  --surface-2: #fbfbfd;
  --ink: #14171f;
  --ink-soft: #3b414f;
  --muted: #828a9a;
  --line: #e8eaef;
  --line-strong: #d8dbe3;

  --accent: #e2001a;
  --accent-ink: #b3001a;
  --accent-soft: #fdeced;
  --ring: 0 0 0 4px rgba(226, 0, 26, 0.16);

  --free: #10b981;
  --reserved: #f59e0b;
  --taken: #ef4444;

  --radius: 14px;
  --radius-sm: 10px;
  --sh-sm: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.09);
  --sh-md: 0 6px 16px -6px rgba(16, 24, 40, 0.12), 0 2px 6px rgba(16, 24, 40, 0.06);
  --sh-pop: 0 18px 40px -12px rgba(16, 24, 40, 0.22), 0 4px 10px rgba(16, 24, 40, 0.07);
  --sh-modal: 0 32px 64px -16px rgba(16, 24, 40, 0.34);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --font-display: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Manrope", ui-sans-serif, system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(var(--bg-grid) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent-soft); color: var(--accent-ink); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }

/* ---------- Top bar ---------- */
/* Pin the logo bar + booking bar together while the plan scrolls underneath. */
.stickytop { position: sticky; top: 0; z-index: 41; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 12px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo {
  width: 34px; height: 34px; object-fit: contain; display: block; flex-shrink: 0;
  transition: transform 0.35s var(--ease);
}
.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.08); }
.brand-name {
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  letter-spacing: -0.02em; color: var(--ink);
}
.brand-name .tmp { color: var(--muted); font-weight: 500; font-size: 11px; vertical-align: super; margin-left: 4px; letter-spacing: 0; }
.topbar h1 { display: none; }
.spacer { flex: 1; }

.nav-link {
  position: relative; font-size: 14px; font-weight: 600; color: var(--muted);
  text-decoration: none; padding: 8px 12px; border-radius: 9px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-link:hover { color: var(--ink); background: var(--surface-2); }
.nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -13px; height: 2px;
  background: var(--accent); border-radius: 2px;
  animation: tabIn 0.3s var(--ease);
}
@keyframes tabIn { from { transform: scaleX(0); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }

.me-tag { font-size: 13px; color: var(--muted); white-space: nowrap; }
.me-tag b { color: var(--ink); font-weight: 600; }
.me-tag #meName { color: var(--accent); font-weight: 700; }
.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--accent); font-weight: 600; text-decoration: underline;
}
.linkbtn:hover { opacity: 0.8; }

.langsw { display: flex; }
.langsw .lang-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 6px 26px 6px 10px; cursor: pointer; color: var(--ink);
  font-family: var(--font-body); font-size: 12px; font-weight: 600;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  transition: all 0.18s var(--ease);
}
.langsw .lang-select:hover { border-color: var(--line-strong); }
.langsw .lang-select:focus { outline: none; border-color: var(--accent); }

/* ---------- Booking bar ---------- */
.bookbar {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: 22px;
  background: var(--surface); border-bottom: 1px solid var(--line); padding: 16px 24px;
}
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
.pills { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; border: 1px solid var(--line); }
.pill {
  border: 0; background: transparent; border-radius: 9px; padding: 7px 14px;
  font-family: var(--font-body); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink-soft);
  line-height: 1.25; transition: all 0.2s var(--ease);
}
.pill small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); margin-top: 1px; }
.pill:hover { background: #fff; color: var(--ink); }
.pill.active { background: var(--accent); color: #fff; box-shadow: var(--sh-sm); }
.pill.active small { color: rgba(255, 255, 255, 0.7); }

/* custom time field */
.timefield {
  position: relative; display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface);
  transition: border-color 0.18s var(--ease);
}
.timefield:hover { border-color: var(--muted); }
.timefield:focus-within { border-color: var(--ink-soft); }
.timefield input {
  border: 0; background: transparent; width: 58px; outline: none;
  font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 9px 2px 9px 12px; letter-spacing: 0.01em; font-variant-numeric: tabular-nums;
}
.timefield input:focus-visible { box-shadow: none; }
.clock-btn {
  border: 0; background: transparent; cursor: pointer; color: var(--accent);
  display: flex; align-items: center; padding: 8px 10px 8px 4px; border-radius: 0 9px 9px 0;
  transition: color 0.15s var(--ease), transform 0.1s var(--ease);
}
.clock-btn:hover { color: var(--accent-ink); }
.clock-btn:active { transform: scale(0.9); }
.clock-btn:active { transform: scale(0.9); }
.time-pop {
  position: absolute; top: calc(100% + 7px); left: 0; min-width: calc(100% + 8px);
  max-height: 210px; overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: var(--sh-pop); padding: 6px; z-index: 55; display: none;
}
.time-pop.open { display: block; animation: popIn 0.16s var(--ease); }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.time-pop::-webkit-scrollbar { width: 8px; }
.time-pop::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid var(--surface); }
.time-opt {
  padding: 8px 14px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-soft);
  cursor: pointer; text-align: center; font-variant-numeric: tabular-nums; transition: background 0.12s var(--ease), color 0.12s var(--ease);
}
.time-opt:hover { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--accent); }
.time-opt.sel { background: var(--accent-soft); color: var(--accent-ink); }
.bookbar .dur {
  align-self: center; font-size: 12px; font-weight: 700; color: var(--accent-ink);
  background: var(--accent-soft); padding: 5px 11px; border-radius: 999px;
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-body); font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
  padding: 10px 16px; border-radius: 11px; letter-spacing: -0.01em;
  transition: transform 0.12s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), filter 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh-md); filter: brightness(1.08); }
.btn:active { transform: translateY(0) scale(0.985); box-shadow: var(--sh-sm); }
.btn:focus-visible { box-shadow: var(--ring); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--muted); filter: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; filter: none; }
.hint { font-size: 13px; color: var(--muted); }
.badge {
  display: inline-block; background: var(--accent-soft); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; vertical-align: middle;
  margin-left: 8px; letter-spacing: 0.01em;
}

/* ---------- Toolbar (admin) ---------- */
.toolbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
  background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 24px;
}
.toolbar label { font-size: 12px; font-weight: 600; color: var(--muted); margin-right: 8px; }
.toolbar select {
  font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); cursor: pointer;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.toolbar select:focus { border-color: var(--accent); box-shadow: var(--ring); outline: none; }
.zoombar { display: flex; gap: 4px; align-items: center; background: var(--surface-2); padding: 4px; border-radius: 11px; border: 1px solid var(--line); }
.zoombar button {
  border: 0; background: transparent; border-radius: 8px; width: 32px; height: 32px; font-size: 16px; cursor: pointer; color: var(--ink-soft);
  transition: all 0.16s var(--ease);
}
.zoombar button:hover { background: #fff; color: var(--accent); box-shadow: var(--sh-sm); }
.zoombar button:active { transform: scale(0.92); }
.zoombar .zlevel { font-size: 12px; font-weight: 700; color: var(--muted); min-width: 46px; text-align: center; }

/* ---------- Layout ---------- */
.wrap { display: flex; gap: 20px; padding: 22px 24px; align-items: flex-start; }
.plan-area { flex: 1; min-width: 0; animation: rise 0.55s var(--ease) both; }
.side {
  width: 256px; flex-shrink: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; box-shadow: var(--sh-sm);
  animation: rise 0.55s var(--ease) 0.07s both;
}
.side h2 { font-family: var(--font-display); font-size: 12px; font-weight: 700; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Floor plan + markers ---------- */
.viewport { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--sh-sm); }
.viewport .plan-wrap { border: none; border-radius: 0; box-shadow: none; }
.zoombar + .btn { margin-left: 2px; }

.plan-wrap {
  position: relative; display: inline-block; width: 100%;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; line-height: 0; box-shadow: var(--sh-sm);
}
.plan-wrap img.plan { width: 100%; height: auto; display: block; user-select: none; -webkit-user-drag: none; }
.markers { position: absolute; inset: 0; }

.marker {
  position: absolute; width: 17px; height: 17px; border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 2.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.18), 0 2px 4px rgba(16, 24, 40, 0.25);
  cursor: pointer; transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.marker.free { background: var(--free); }
.marker.reserved { background: var(--reserved); }
.marker.taken { background: var(--taken); }
.marker:hover {
  transform: translate(-50%, -50%) scale(1.45);
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.18), 0 0 0 6px rgba(226, 0, 26, 0.14), 0 6px 14px rgba(16, 24, 40, 0.28);
  z-index: 5;
}
.marker.free:hover { box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.18), 0 0 0 6px rgba(16, 185, 129, 0.18), 0 6px 14px rgba(16, 24, 40, 0.28); }
.marker.reserved { animation: pulseAmber 2.4s var(--ease) infinite; }
@keyframes pulseAmber {
  0%, 100% { box-shadow: 0 0 0 1px rgba(16,24,40,.18), 0 0 0 0 rgba(245, 158, 11, 0.45), 0 2px 4px rgba(16,24,40,.25); }
  50% { box-shadow: 0 0 0 1px rgba(16,24,40,.18), 0 0 0 7px rgba(245, 158, 11, 0), 0 2px 4px rgba(16,24,40,.25); }
}
.marker.selected { outline: 2.5px solid var(--accent); outline-offset: 3px; }
.marker.dragging { opacity: 0.75; cursor: grabbing; transform: translate(-50%, -50%) scale(1.3); }
/* desks outside the signed-in user's zones: visible for orientation but not bookable */
.marker.locked {
  background: #c3c8d1 !important; border-color: #eef0f3;
  opacity: 0.5; cursor: default; animation: none;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.10);
}
.marker.locked:hover { transform: translate(-50%, -50%); box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.10); z-index: auto; }

/* tooltip */
.tip {
  position: fixed; pointer-events: none; z-index: 60;
  background: rgba(20, 23, 31, 0.96); color: #fff; font-size: 12px; font-weight: 500;
  padding: 7px 11px; border-radius: 9px; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px)); display: none;
  box-shadow: var(--sh-pop); letter-spacing: -0.01em;
}
.tip::after { content: ""; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%) rotate(45deg); width: 9px; height: 9px; background: rgba(20, 23, 31, 0.96); border-radius: 2px; }

/* ---------- Legend + zones ---------- */
.legend-row { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 500; color: var(--ink-soft); margin-bottom: 11px; }
.swatch { width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.18); flex-shrink: 0; }
.zone-list { font-size: 13.5px; }
.zone-list .z {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; margin: 0 -8px; border-radius: 9px;
  font-weight: 500; color: var(--ink-soft); transition: background 0.15s var(--ease);
}
.zone-list .z:hover { background: var(--surface-2); }
.zone-list .z .count { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.zone-list .z.locked { opacity: 0.45; }
.zone-list .z.locked::before { content: "🔒"; font-size: 11px; margin-right: 5px; filter: grayscale(1); }

.status-line { font-size: 13px; color: var(--muted); padding: 6px 24px 20px; font-variant-numeric: tabular-nums; }

/* ---------- Modal ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(20, 23, 31, 0.42);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px;
}
.modal-bg.open { display: flex; animation: fadeIn 0.22s var(--ease); }
.modal {
  background: var(--surface); border-radius: 20px; width: 380px; max-width: 100%;
  padding: 26px; box-shadow: var(--sh-modal); border: 1px solid var(--line);
  animation: modalIn 0.3s var(--ease);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(14px) scale(0.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal h3 { font-family: var(--font-display); margin: 0 0 5px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.modal .sub { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.modal .row { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.modal .row span { color: var(--muted); font-weight: 500; }
.modal .row b { font-weight: 700; letter-spacing: -0.01em; }
.modal label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 18px 0 6px; letter-spacing: 0.01em; }
.modal input[type=text], .modal input[type=password] {
  width: 100%; font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface-2);
  letter-spacing: 0.02em; transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), background 0.18s var(--ease);
}
.modal input::placeholder { color: var(--muted); font-weight: 500; }
.modal input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
.modal .actions { display: flex; gap: 10px; margin-top: 22px; }
.modal .actions .btn { flex: 1; }
.modal .err { color: var(--taken); font-size: 13px; font-weight: 500; margin-top: 12px; min-height: 17px; }

/* ---------- My bookings ---------- */
.mb-wrap { max-width: 680px; margin: 28px auto; padding: 0 20px; animation: rise 0.5s var(--ease) both; }
.mb-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px; box-shadow: var(--sh-sm); margin-bottom: 16px;
}
.mb-card h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.02em; }
.mb-sub { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }
.mb-card label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 6px 0; }
.mb-card input[type=text] {
  width: 100%; font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink);
  padding: 11px 13px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface-2);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
.mb-card input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
.mb-card .actions { display: flex; gap: 10px; margin-top: 16px; }
.mb-card .err { color: var(--taken); font-size: 13px; font-weight: 500; margin-top: 10px; min-height: 17px; }

.mb-greet { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin: 4px 4px 14px; color: var(--ink); }
.mb-empty { color: var(--muted); font-size: 14px; text-align: center; padding: 24px; }

.mb-card.book { padding: 16px 18px; }
.mb-row1 { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mb-desk-title { font-size: 15px; color: var(--ink); }
.mb-desk-title b { font-family: var(--font-display); letter-spacing: -0.01em; }
.mb-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.03em; white-space: nowrap; }
.mb-badge.pending { background: #fef3e2; color: #9a6400; }
.mb-badge.checkedin { background: #fee2e2; color: #dc2626; }
.mb-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--ink-soft); }
.mb-meta .mb-time { font-weight: 700; font-variant-numeric: tabular-nums; }
.mb-meta .mb-win { color: var(--muted); }
.mb-edit { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line); }
.mb-edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.mb-edit-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.mb-edit-grid input, .mb-edit-grid select {
  font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--ink);
  padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-2);
}
.mb-edit-grid input { font-variant-numeric: tabular-nums; }
.mb-edit-grid input:focus, .mb-edit-grid select:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
.mb-edit-actions { display: flex; gap: 10px; margin-top: 12px; }
.mb-err { color: var(--taken); font-size: 12.5px; font-weight: 500; }
.mb-err:not(:empty) { margin-top: 8px; }
.mb-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.mb-locked { font-size: 12.5px; color: var(--muted); font-style: italic; flex: 1; }
.btn.sm { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn.danger { color: var(--accent-ink); border-color: var(--line-strong); background: var(--surface); }
.btn.danger:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); filter: none; }

/* ---------- Check-in reminder banner ---------- */
.checkin-banner {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--accent-soft); border-bottom: 1px solid var(--line);
  padding: 11px 24px; color: var(--accent-ink); font-weight: 600; font-size: 14px;
}
.checkin-banner .cb-text { flex: 1; }

/* ---------- Touch / mobile polish ---------- */
@media (pointer: coarse) {
  .marker { width: 24px; height: 24px; }            /* bigger tap targets on touch */
  .nav-link { padding: 8px 10px; }
}

/* ---------- Tools bar + list view ---------- */
.toolsbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border-bottom: 1px solid var(--line); padding: 10px 24px; }
.viewtoggle { display: flex; gap: 2px; background: var(--surface-2); padding: 3px; border-radius: 10px; border: 1px solid var(--line); }
.vt { border: 0; background: transparent; border-radius: 8px; padding: 6px 14px; font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; transition: all 0.2s var(--ease); }
.vt.active { background: var(--accent); color: #fff; box-shadow: var(--sh-sm); }
.searchbox { font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink); padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); min-width: 220px; }
.searchbox:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
.chk { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.chk input { accent-color: var(--accent); width: 15px; height: 15px; }
.chk.remember { display: inline-flex; margin: 12px 0 0; font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.quickbook { display: flex; align-items: center; gap: 8px; }
.quickbook select { font-family: var(--font-body); font-size: 13px; font-weight: 600; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface-2); }
.quickbook select:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }

.listview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--sh-sm); padding: 4px 16px; }
.lv-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.lv-row:last-child { border-bottom: 0; }
.lv-main { font-size: 14px; }
.lv-main b { font-family: var(--font-display); letter-spacing: -0.01em; }
.lv-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lv-free { font-size: 13px; font-weight: 600; color: var(--free); }
.mb-badge.oos { background: #eceef2; color: #6b7280; }

/* ---------- Admin panel ---------- */
.mg-wrap { max-width: 920px; margin: 22px auto; padding: 0 20px; animation: rise 0.5s var(--ease) both; }
.mg-section { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--sh-sm); margin-bottom: 16px; }
.mg-section > h2 { font-family: var(--font-display); font-size: 13px; font-weight: 700; margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.mg-occ { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mg-occ-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.mg-occ-zone { font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
.mg-occ-bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.mg-occ-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width 0.3s var(--ease); }
.mg-occ-num { font-size: 12px; font-weight: 600; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.mg-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.mg-row:last-child { border-bottom: 0; }
.mg-row.muted .mg-row-main { color: var(--muted); }
.mg-row-main { font-size: 14px; }
.mg-row-main b { font-family: var(--font-display); letter-spacing: -0.01em; }
.mg-row-side { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.mg-time { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.mg-oos-form { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); }
.mg-oos-form h3 { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin: 0 0 12px; }
.mg-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 12px; }
.mg-form-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.mg-form-grid input, .mg-form-grid select { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--ink); padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-2); }
.mg-form-grid input:focus, .mg-form-grid select:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
.mg-oos-form .actions { margin-top: 14px; }
.mg-oos-form .err { color: var(--taken); font-size: 13px; font-weight: 500; margin-top: 10px; min-height: 17px; }

/* out-of-service desk markers on the map */
.marker.blocked { background: repeating-linear-gradient(45deg, #9aa1ad, #9aa1ad 3px, #c3c8d1 3px, #c3c8d1 6px) !important; cursor: not-allowed; animation: none; }

/* GDPR / compliance */
.mg-gdpr { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mg-gdpr-block h3 { font-family: var(--font-display); font-size: 14px; font-weight: 700; margin: 0 0 8px; }
.mg-inline { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.mg-inline label { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.mg-inline input { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: var(--ink); padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface-2); width: 150px; }
.mg-inline input:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: var(--ring); }
.mg-pc-note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.mg-audit-row { display: grid; grid-template-columns: 170px 120px 1fr; gap: 10px; padding: 7px 2px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mg-audit-row:last-child { border-bottom: 0; }
.mg-audit-ts { color: var(--muted); font-variant-numeric: tabular-nums; }
.mg-audit-act { font-weight: 700; color: var(--accent-ink); }
.mg-audit-detail { color: var(--ink-soft); word-break: break-word; }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.toast {
  display: flex; align-items: center; gap: 10px; background: rgba(20, 23, 31, 0.97); color: #fff;
  font-size: 13.5px; font-weight: 600; padding: 12px 18px; border-radius: 13px; box-shadow: var(--sh-modal);
  animation: toastIn 0.35s var(--ease); letter-spacing: -0.01em;
}
.toast .dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,0.12); }
.toast.ok .dot { background: var(--free); }
.toast.info .dot { background: var(--accent); }
.toast.hide { animation: toastOut 0.3s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(0.97); } }

@media (max-width: 720px) {
  .wrap { flex-direction: column; }
  .side { width: 100%; }
  .brand-name .tmp { display: none; }
  .mb-edit-grid { grid-template-columns: 1fr; }
  .mg-gdpr { grid-template-columns: 1fr; }
  .mg-audit-row { grid-template-columns: 1fr; gap: 2px; }
  .toolsbar { padding: 10px 16px; }
  .searchbox { min-width: 0; flex: 1 1 140px; }
  .quickbook { flex: 1 1 100%; }
  .quickbook select { flex: 1; }
  .bookbar { padding: 14px 16px; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
