/* Vinda admin (admin.vinda.pt). Light only, the app's teal and coral. */

@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('fonts/jakarta-latin-ext.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: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('fonts/jakarta-latin.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; }

:root {
  --teal: #0B3B47; --teal2: #114A57; --teal-line: #1D5868; --teal-mut: #A9C7CE;
  --coral: #FF7A59; --coral-ink: #2A1208; --deep-coral: #C24A2C; --soft: #FFF4F0;
  --bg: #F2F6F7; --card: #FFFFFF; --line: #E0E9EB; --field: #F6F9FB; --seg: #E6ECEE;
  --ink: #0B3B47; --mut: #4E6B73; --faint: #7F969C;
  --ok-bg: #E3F4EC; --ok-ink: #1E6B48; --warn-bg: #FFF1D6; --warn-ink: #8A5A00; --bad-bg: #FDE8E8; --bad-ink: #C0362C;
  --n-bg: #E6ECEE; --n-ink: #4E6B73;
  --shadow: 0 20px 40px -30px rgba(11,59,71,.45), 0 0 0 1px rgba(11,59,71,.06);
  --r: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 500 14px/1.45 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.boot { padding: 40px; color: var(--mut); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.shell > *, .grid > *, .spread > * { min-width: 0; }
.side { background: var(--teal); color: #fff; padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.brand { font-size: 24px; font-weight: 800; letter-spacing: -0.5px; padding: 0 10px 18px; display: flex; align-items: baseline; gap: 8px; }
.brand b { color: var(--coral); }
.brand small { font-size: 11px; font-weight: 700; color: var(--teal-mut); letter-spacing: .08em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: #DCEBEE; font-weight: 700; }
.nav a:hover { background: var(--teal2); }
.nav a.on { background: #fff; color: var(--teal); }
.nav .badge { background: var(--coral); color: var(--coral-ink); border-radius: 100px; padding: 1px 8px; font-size: 12px; font-weight: 800; }
.side .me { margin-top: auto; padding: 12px; font-size: 12px; color: var(--teal-mut); word-break: break-all; }
.side .me .me-email { display: block; }
.side .me button { margin-top: 8px; background: none; border: 1px solid var(--teal-line); color: #fff; border-radius: 10px; padding: 6px 10px; cursor: pointer; font-weight: 700; font-size: 12px; }
.main { padding: 28px 32px 60px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
h1 { font-size: 28px; line-height: 1.1; letter-spacing: -0.03em; margin: 0; font-weight: 800; }
h2 { font-size: 17px; margin: 0 0 10px; font-weight: 800; letter-spacing: -0.01em; }
.sub { color: var(--mut); margin-top: 4px; }
.back { display: inline-block; color: var(--mut); text-decoration: none; font-weight: 700; margin-bottom: 8px; }
.back:hover { color: var(--ink); }

/* ---------- pieces ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 20px; }
.grid { display: grid; gap: 14px; }
.kpis { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.two { grid-template-columns: 1fr 1fr; }
.kpi .k { color: var(--mut); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.kpi .v { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; }
.kpi .s { color: var(--faint); font-size: 12px; margin-top: 2px; }
a.kpi { color: inherit; text-decoration: none; }
a.kpi:hover { box-shadow: var(--shadow), 0 0 0 2px var(--coral); }
.main.busy > * { opacity: .6; transition: opacity .2s .15s; }
.kpi.coral { background: var(--teal); color: #fff; }
.kpi.coral .k, .kpi.coral .s { color: var(--teal-mut); }
.kpi.coral .v { color: var(--coral); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.muted { color: var(--mut); }
.faint { color: var(--faint); font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.empty { color: var(--mut); padding: 22px 4px; text-align: center; }
.alert { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-radius: 14px; font-weight: 700; text-decoration: none; }
.alert.warn { background: var(--warn-bg); color: var(--warn-ink); }
.alert.bad { background: var(--bad-bg); color: var(--bad-ink); }
.alert.ok { background: var(--ok-bg); color: var(--ok-ink); }

.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 100px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok-ink); }
.pill.warn { background: var(--warn-bg); color: var(--warn-ink); }
.pill.bad { background: var(--bad-bg); color: var(--bad-ink); }
.pill.n { background: var(--n-bg); color: var(--n-ink); }
.pill.coral { background: var(--soft); color: var(--deep-coral); }

.btn { border: 0; border-radius: 12px; padding: 9px 14px; font-weight: 800; cursor: pointer; background: var(--teal); color: #fff; white-space: nowrap; }
.btn:hover { filter: brightness(1.12); }
.btn.cta { background: var(--coral); color: var(--coral-ink); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--field); filter: none; }
.btn.danger { background: var(--bad-ink); color: #fff; }
.btn.small { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: default; }

.tabs { display: inline-flex; background: var(--seg); border-radius: 12px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 7px 12px; border-radius: 10px; font-weight: 700; color: var(--mut); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px -2px rgba(11,59,71,.25); }
.search { border: 0; background: #fff; box-shadow: var(--shadow); border-radius: 12px; padding: 10px 14px; min-width: 260px; outline: none; }
.search:focus { box-shadow: 0 0 0 2px var(--coral); }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--mut); font-weight: 800; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.link { cursor: pointer; }
tr.link:hover td { background: var(--field); }
.table { padding: 4px 6px; overflow-x: auto; }
td .name { font-weight: 800; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; }
dl.kv dt { color: var(--mut); font-weight: 700; }
dl.kv dd { margin: 0; font-weight: 700; word-break: break-word; }

.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.toggle:last-child { border-bottom: 0; }
.switch { width: 44px; height: 26px; border-radius: 100px; border: 0; background: var(--seg); position: relative; cursor: pointer; flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .15s; }
.switch.on { background: var(--teal); }
.switch.on::after { left: 21px; }

.bars { display: flex; align-items: flex-end; gap: 4px; height: 120px; padding-top: 8px; }
.bars div { flex: 1; background: var(--coral); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.bars div.zero { background: var(--seg); }
.bars-x { display: flex; justify-content: space-between; color: var(--faint); font-size: 11px; margin-top: 6px; }

.quote { background: var(--field); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; }
.timeline { display: flex; flex-direction: column; gap: 4px; color: var(--mut); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--teal); }
.login .card { width: 100%; max-width: 380px; padding: 28px; }
.login .brand { color: var(--teal); padding: 0 0 6px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field label { font-weight: 700; color: var(--mut); font-size: 13px; }
.field input, .field textarea, .field select { border: 0; background: var(--field); border-radius: 12px; padding: 11px 13px; outline: none; box-shadow: inset 0 0 0 1.5px var(--line); width: 100%; }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 2px var(--coral); }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-weight: 600; }
.check input { margin-top: 3px; accent-color: var(--teal); }
.err { color: var(--bad-ink); font-weight: 700; margin-top: 12px; }

/* ---------- modal + toast ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(11,59,71,.45); display: grid; place-items: center; padding: 16px; z-index: 20; }
.modal { background: #fff; border-radius: 20px; padding: 24px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow-y: auto; box-shadow: 0 30px 60px -20px rgba(11,59,71,.6); }
.modal h2 { font-size: 20px; }
.modal p { color: var(--mut); margin: 0; }
.modal .actions { justify-content: flex-end; margin-top: 20px; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--teal); color: #fff; padding: 12px 18px; border-radius: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.bad { background: var(--bad-ink); }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; padding: 14px 16px 10px; }
  .brand { padding: 0 0 10px; }
  .nav { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
  .nav a { flex: none; padding: 8px 12px; }
  .side { position: relative; }
  .side .me { position: absolute; top: 12px; right: 12px; margin: 0; padding: 0; }
  .side .me .me-email { display: none; }
  .side .me button { margin-top: 0; }
  .main { padding: 20px 16px 48px; }
  .two { grid-template-columns: 1fr; }
  .search { min-width: 0; width: 100%; }
  h1 { font-size: 24px; }
}

/* Booking funnel */
.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.funnel .step { background: var(--bg); border-radius: 14px; padding: 12px; }
.funnel .v { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.funnel .k { font-size: 12px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .04em; }
