/* Quicc design tokens + primitives shared by the customer site and the admin panel */
:root {
  --paper: #FAFAF7;
  --surface: #FFFFFF;
  --sunk: #F3F2EE;
  --ink: #121212;
  --ink-2: #3A3A37;
  --muted: #6E6D68;
  --line: #E6E5E0;
  --line-2: #D6D5CF;
  --accent: #D7F25C;      /* signal lime, used sparingly */
  --accent-ink: #2B3300;
  --ok: #1F8A4C;
  --warn: #B86E00;
  --bad: #C2372B;
  --info: #2D5BD7;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(18,18,18,.04), 0 8px 24px rgba(18,18,18,.06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Inter Tight", "Inter", system-ui, sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: #fff; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background .15s ease, opacity .15s;
  white-space: nowrap;
}
.btn:hover { background: #000; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); background: transparent; }
.btn.light { background: #fff; color: var(--ink); border-color: #fff; }
.btn.accent { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn.block { width: 100%; }
.btn.danger { background: transparent; color: var(--bad); border-color: #EBC9C5; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 500; }

/* form */
.field { display: block; }
.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input, select.input, textarea.input {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius-sm);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(18,18,18,.08); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
  cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip:disabled { opacity: .35; cursor: not-allowed; text-decoration: line-through; }

.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--sunk); color: var(--ink-2); white-space: nowrap;
}
.badge.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.lime { background: var(--accent); color: var(--accent-ink); }
.badge.ok { background: #E3F3E9; color: var(--ok); }
.badge.warn { background: #FBEFD9; color: var(--warn); }
.badge.bad { background: #F8E2DF; color: var(--bad); }
.badge.info { background: #E5ECFB; color: var(--info); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.pad { padding: 20px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 500; z-index: 9999;
  transition: all .25s ease; pointer-events: none; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--bad); }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(18,18,18,.4); display: grid; place-items: center; z-index: 1000; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; box-shadow: var(--shadow); }
.modal h3 { font-size: 20px; margin-bottom: 4px; }
@keyframes fade { from { opacity: 0 } }

.spinner { width: 18px; height: 18px; border: 2px solid var(--line-2); border-top-color: var(--ink); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }
.skeleton { background: linear-gradient(90deg, var(--sunk), #fff, var(--sunk)); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; }
@keyframes sk { to { background-position: -200% 0 } }

/* slot grid */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slot {
  border: 1px solid var(--line-2); background: var(--surface); border-radius: 12px; padding: 10px 12px; cursor: pointer; text-align: left;
}
.slot b { display: block; font-size: 15px; }
.slot small { color: var(--muted); font-size: 12px; }
.slot:hover:not(:disabled) { border-color: var(--ink); }
.slot[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.slot[aria-pressed="true"] small { color: #cfcfcf; }
.slot:disabled { opacity: .35; cursor: not-allowed; }
.slot .few { color: var(--warn); }
.dates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.date {
  flex: 0 0 auto; width: 64px; padding: 10px 0; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface);
  text-align: center; cursor: pointer;
}
.date small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.date b { font-size: 18px; font-family: var(--display); }
.date[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.date[aria-pressed="true"] small { color: #cfcfcf; }

/* map */
.leaflet-container { font: inherit; background: var(--sunk); }
.leaflet-tile-pane { filter: grayscale(1) contrast(.92) brightness(1.06); }
.map-pin {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 500; pointer-events: none;
  width: 34px; height: 44px;
}
.map-pin::before { content: ""; position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 30px; height: 30px; border-radius: 50% 50% 50% 0; rotate: -45deg; background: var(--ink); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.map-pin::after { content: ""; position: absolute; left: 50%; top: 9px; transform: translateX(-50%); width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .grid2 { grid-template-columns: 1fr; }
}
