/* Same fonts as pd82.cz, served from the admin itself (OFL, licences in fonts/). */
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/cormorant-garamond-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/cormorant-garamond-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-display: swap; font-weight: 100 900; src: url(fonts/cormorant-garamond-latin-ext-wght-italic.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Cormorant Garamond'; font-style: italic; font-display: swap; font-weight: 100 900; src: url(fonts/cormorant-garamond-latin-wght-italic.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-ext-wght-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-style: normal; font-display: swap; font-weight: 100 900; src: url(fonts/inter-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* Admin prototype. Tokens copied from src/styles/tokens.css so it reads as the
   same house as pd82.cz; the admin is denser and quieter than the site. */
:root {
  --bg: #f6f4ee;
  --panel: #fbfaf6;
  --ink: #1c1c1a;
  --accent: #2f3a2c;
  --accent-soft: rgba(47, 58, 44, 0.1);
  --mid: #7a756f;
  --rule: rgba(28, 28, 26, 0.1);
  --rule-strong: rgba(28, 28, 26, 0.18);
  --warn: #9a5b13;
  --warn-soft: #f3e6d2;
  --bad: #9b2c2c;
  --bad-soft: #f4dede;
  --ok: #2f5a3a;
  --ok-soft: #dfeadf;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 10px;
  --hatch: repeating-linear-gradient(135deg, var(--accent) 0 3px, transparent 3px 8px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 2rem; line-height: 1.1; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.15rem; }

.kicker {
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--mid);
}
.muted { color: var(--mid); }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.right { text-align: right; }

/* --- shell ------------------------------------------------------------- */
.shell {
  display: grid; grid-template-columns: 232px 1fr; min-height: 100vh;
  /* the sidebar is sticky and one screen tall; this paints the column below it */
  background: linear-gradient(90deg, var(--accent) 232px, transparent 232px);
}
.side {
  background: var(--accent);
  color: #f6f4ee;
  padding: 22px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand { display: flex; align-items: baseline; gap: 8px; padding: 0 10px 18px; }
.brand b { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: 1.75rem; }
.brand span { font-size: 0.625rem; letter-spacing: 0.2em; opacity: 0.7; }
.nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: rgba(246, 244, 238, 0.82);
}
.nav a:hover { background: rgba(246, 244, 238, 0.08); color: #fff; }
.nav a.on { background: rgba(246, 244, 238, 0.16); color: #fff; }
.nav .badge { background: #f6f4ee; color: var(--accent); }
.side .foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgba(246, 244, 238, 0.15); font-size: 12px; opacity: 0.85; }
.side .foot select { width: 100%; margin-top: 6px; background: rgba(246, 244, 238, 0.1); color: #fff; border: 1px solid rgba(246, 244, 238, 0.25); border-radius: 6px; padding: 5px; }
.side .foot select option { color: var(--ink); }

.main { min-width: 0; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
.sync { display: flex; align-items: center; gap: 8px; color: var(--mid); font-size: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; }
.dot.warn { background: var(--warn); }
.page { padding: 26px 28px 80px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--mid); }

.tabbar { display: none; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: #f6f4ee; font-size: 12px; font-weight: 600;
}

/* --- building blocks ---------------------------------------------------- */
.card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.card + .card { margin-top: 16px; }
.grid > .card + .card { margin-top: 0; }
.card h2, .card h3 { margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }

.stat { display: flex; flex-direction: column; gap: 4px; }
.stat b { font-family: var(--font-display); font-size: 2.2rem; font-weight: 500; line-height: 1; }
.stat a { text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--ink);
  background: transparent;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { background: var(--ink); color: var(--bg); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #f6f4ee; }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn.ghost { border-color: var(--rule-strong); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.danger:hover { background: var(--bad); color: #fff; }
.btn.small { padding: 4px 10px; font-size: 11px; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  display: inline-block;
  min-width: 20px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  border: 1px solid var(--rule-strong);
  font-family: var(--font-body);
  letter-spacing: 0;
  vertical-align: middle;
}
.pill i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.s-enquiry i { border: 1.5px solid var(--ink); }
.s-waitlist i { border: 1.5px dashed var(--ink); }
.s-tentative i { background: var(--hatch); border: 1px solid var(--accent); }
.s-confirmed i { background: var(--accent); }
.s-paid i { background: var(--ok); }
.s-stayed i, .s-settled i { background: var(--mid); }
.s-rejected, .s-expired, .s-cancelled { color: var(--mid); }
.s-rejected i, .s-expired i, .s-cancelled i { background: transparent; border: 1px solid var(--mid); }

.flag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: 12px; }
.flag.warn { background: var(--warn-soft); color: var(--warn); }
.flag.bad { background: var(--bad-soft); color: var(--bad); }
.flag.ok { background: var(--ok-soft); color: var(--ok); }

table.list { width: 100%; border-collapse: collapse; }
.list th {
  text-align: left; font-weight: 500;
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid);
  padding: 8px 10px; border-bottom: 1px solid var(--rule-strong);
}
.list td { padding: 11px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.list tr.click { cursor: pointer; }
.list tr.click:hover td { background: var(--accent-soft); }
.list td .sub { color: var(--mid); font-size: 12px; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--rule-strong); background: transparent;
  border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer;
}
.chip.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.kv dt { color: var(--mid); }
.kv dd { margin: 0; }

.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mid); }
.field input, .field select, .field textarea {
  border: 1px solid var(--rule-strong); border-radius: 8px; background: #fff;
  padding: 8px 10px;
}
.field input:disabled { background: transparent; }
.field textarea { min-height: 70px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px 16px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.timeline li:last-child { border-bottom: 0; }
.timeline .arrow { color: var(--mid); font-size: 13px; padding-top: 1px; }
.timeline .meta { color: var(--mid); font-size: 12px; }

.steps { display: flex; gap: 4px; margin: 6px 0 4px; flex-wrap: wrap; }
.steps span {
  flex: 1; min-width: 70px;
  font-size: 11px; color: var(--mid);
  padding-top: 8px; border-top: 3px solid var(--rule-strong);
}
.steps span.done { border-color: var(--accent); color: var(--ink); }
.steps span.now { border-color: var(--accent); color: var(--ink); font-weight: 600; }

.notice {
  border-left: 3px solid var(--warn); background: var(--warn-soft);
  padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 14px;
}
.notice.info { border-color: var(--accent); background: var(--accent-soft); }

/* --- calendar ------------------------------------------------------------ */
.cal-wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.cal h3 { margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-grid .dow { font-size: 10px; letter-spacing: 0.12em; color: var(--mid); text-align: center; padding-bottom: 4px; }
.day {
  position: relative;
  min-height: 64px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 4px 5px;
  background: #fff;
  overflow: hidden;
  font-size: 11px;
}
.day.pad { visibility: hidden; }
.day.today { outline: 2px solid var(--ink); outline-offset: -2px; }
.day .d { font-variant-numeric: tabular-nums; color: var(--mid); }
.day .ev {
  display: block;
  margin-top: 3px;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 10.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  text-decoration: none;
}
.ev.confirmed, .ev.paid { background: var(--accent); color: #f6f4ee; }
.ev.paid::after { content: ' ✓'; }
.ev.tentative { background: repeating-linear-gradient(135deg, rgba(47, 58, 44, 0.28) 0 3px, transparent 3px 7px), #fff; color: var(--accent); border: 1px solid var(--accent); font-weight: 600; }
.ev.enquiry { border: 1px solid var(--ink); color: var(--ink); background: #fff; }
.ev.waitlist { border: 1px dashed var(--ink); color: var(--ink); background: #fff; }
.ev.stayed, .ev.settled { background: var(--mid); color: #fff; }
.ev.google { background: var(--warn-soft); color: var(--warn); border: 1px solid var(--warn); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0 16px; }

/* --- modal ------------------------------------------------------------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(28, 28, 26, 0.45);
  display: grid; place-items: center; padding: 20px; z-index: 50;
}
.modal {
  background: var(--bg); border-radius: 14px; max-width: 760px; width: 100%;
  max-height: calc(100vh - 40px); overflow: auto; padding: 22px 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.x { border: 0; background: transparent; font-size: 22px; cursor: pointer; line-height: 1; }

/* e-mail preview mirrors the Rumiej summary */
.mail { background: #fff; border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.mail-head { background: var(--accent); color: #f6f4ee; padding: 14px 20px; display: flex; justify-content: space-between; align-items: baseline; }
.mail-head b { font-family: var(--font-display); font-style: italic; font-size: 1.5rem; font-weight: 500; }
.mail-head span { font-size: 10px; letter-spacing: 0.2em; }
.mail-body { padding: 18px 22px; }
.mail-body h4 { font-family: var(--font-display); font-weight: 500; font-size: 1.2rem; margin: 18px 0 8px; }
.mail-pay { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.mail-pay > div { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; display: grid; grid-template-columns: 1fr 64px; gap: 8px; align-items: center; }
.qr {
  width: 64px; height: 64px; border-radius: 4px;
  background:
    linear-gradient(90deg, #000 6px, transparent 6px) 0 0 / 14px 14px,
    linear-gradient(#000 6px, transparent 6px) 0 0 / 14px 14px,
    #fff;
  border: 4px solid #fff; outline: 1px solid #000;
  opacity: 0.85;
}

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { max-width: 420px; width: 100%; padding: 30px; }
.login .brand { padding: 0 0 6px; color: var(--accent); }
.role-pick { display: grid; gap: 8px; margin: 16px 0; }
.role-pick label { display: flex; gap: 10px; align-items: center; border: 1px solid var(--rule-strong); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.role-pick input { accent-color: var(--accent); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 999px;
  font-size: 13px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.proto-note { font-size: 12px; color: var(--mid); border: 1px dashed var(--rule-strong); border-radius: 8px; padding: 8px 12px; margin-top: 18px; }

/* --- phone -------------------------------------------------------------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; background: none; }
  .side { display: none; }
  .top { padding: 12px 16px; }
  .page { padding: 18px 16px 96px; }
  h1 { font-size: 1.6rem; }
  .g2, .g3, .g4, .cal-wrap { grid-template-columns: 1fr; }
  .g4.stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span2 { grid-column: auto; }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: var(--accent); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .tabbar a {
    flex: 1; text-align: center; color: rgba(246,244,238,.78); text-decoration: none;
    font-size: 10.5px; padding: 6px 2px; border-radius: 8px; position: relative;
  }
  .tabbar a .ic { display: block; font-size: 17px; line-height: 1.1; }
  .tabbar a.on { color: #fff; background: rgba(246,244,238,.14); }
  .tabbar .badge { position: absolute; top: 0; right: 14%; background: #f6f4ee; color: var(--accent); font-size: 10px; padding: 0 5px; }

  /* tables become cards */
  table.list thead { display: none; }
  table.list, .list tbody, .list tr, .list td { display: block; width: 100%; }
  .list tr { border: 1px solid var(--rule); border-radius: 10px; background: #fff; margin-bottom: 10px; padding: 8px 12px; }
  .list td { border: 0; padding: 3px 0; }
  .list td[data-l]::before { content: attr(data-l); display: inline-block; min-width: 92px; color: var(--mid); font-size: 12px; }
  .list td.right { text-align: left; }

  .day { min-height: 46px; padding: 3px; }
  .day .ev { font-size: 9.5px; padding: 0 3px; }
  .modal { padding: 18px 16px; }
  .sync .long { display: none; }
  .toast { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); text-align: center; }
}

.btn:disabled, .btn[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; color: inherit; }
