/* Prime Airport Parking — Admin. Same palette as the public site:
   green #0a4a39 (brand), orange #ff7a21 (actions). */
:root {
  --green: #0a4a39;
  --green-700: #083c2e;
  --green-50: #eef6f2;
  --green-100: #d7eae1;
  --orange: #ff7a21;
  --orange-600: #e8650f;
  --orange-50: #fff3ea;
  --ink: #0b1220;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8e5;
  --bg: #f3f6f4;
  --white: #fff;
  --danger: #c0392b;
  --danger-50: #fdecea;
  --info: #1d6fb8;
  --info-50: #e8f1fb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(11, 18, 32, .06), 0 6px 18px rgba(11, 18, 32, .05);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "DM Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif; color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; }
h1, h2, h3, h4 { font-family: "Outfit", "DM Sans", system-ui, sans-serif; color: var(--ink); margin: 0 0 .5rem; line-height: 1.2; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
a { color: var(--green); }
a:hover { color: var(--orange-600); }
small, .muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- header ---------- */
.topbar { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 20; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.topbar-inner { max-width: 1320px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 22px; min-height: 60px; }
.brand { display: flex; flex-direction: column; color: #fff; text-decoration: none; line-height: 1.05; }
.brand:hover { color: #fff; }
.brand-name { font-family: "Outfit", sans-serif; font-weight: 800; font-size: 1.12rem; }
.brand-name b { color: var(--orange); }
.brand-sub { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #bfe0d2; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: #dcefe6; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .93rem; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.is-active { background: rgba(255,255,255,.14); color: #fff; box-shadow: inset 0 -3px 0 var(--orange); }
.user { display: flex; align-items: center; gap: 10px; font-size: .85rem; color: #cfe3da; }
.user form { margin: 0; }
.user button { background: transparent; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; font: inherit; }
.user button:hover { background: rgba(255,255,255,.1); }

.page { max-width: 1320px; margin: 0 auto; padding: 24px 20px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 0; color: var(--muted); }

/* ---------- cards / grid ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }

.stat { padding: 16px 18px; }
.stat small { display: block; font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; }
.stat strong { display: block; font-family: "Outfit", sans-serif; font-size: 2rem; color: var(--green); line-height: 1.1; margin-top: 4px; }
.stat span { font-size: .85rem; color: var(--muted); }
.stat.is-accent strong { color: var(--orange-600); }
.meter { height: 8px; border-radius: 99px; background: var(--green-50); overflow: hidden; margin-top: 10px; }
.meter > i { display: block; height: 100%; background: var(--green); border-radius: 99px; }
.meter.is-high > i { background: var(--orange); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: #fafcfb; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; color: var(--ink); }
.table .code { font-weight: 700; letter-spacing: .03em; }
.table-empty { padding: 26px 10px; text-align: center; color: var(--muted); }
.nowrap { white-space: nowrap; }

/* ---------- chips ---------- */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--green-50); color: var(--green); }
.chip-Confirmed { background: var(--info-50); color: var(--info); }
.chip-CheckedIn { background: var(--orange-50); color: var(--orange-600); }
.chip-CheckedOut { background: var(--green-50); color: var(--green); }
.chip-Cancelled { background: var(--danger-50); color: var(--danger); }
.chip-muted { background: #eef1f3; color: var(--muted); }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .86rem; color: var(--ink); margin-bottom: 4px; }
.field { margin-bottom: 14px; }
.field .help { display: block; font-size: .8rem; color: var(--muted); margin-top: 4px; }
.input, .select, textarea.input { width: 100%; padding: 9px 11px; border: 1px solid #cdd8d2; border-radius: 9px; font: inherit; color: var(--ink); background: #fff; }
.input:focus, .select:focus { outline: 2px solid rgba(255,122,33,.35); border-color: var(--orange); }
textarea.input { min-height: 90px; resize: vertical; }
.input-group { display: flex; align-items: stretch; }
.input-group .addon { display: flex; align-items: center; padding: 0 10px; background: var(--green-50); border: 1px solid #cdd8d2; color: var(--green); font-weight: 700; }
.input-group .addon:first-child { border-right: 0; border-radius: 9px 0 0 9px; }
.input-group .addon:last-child { border-left: 0; border-radius: 0 9px 9px 0; }
.input-group .input { border-radius: 0; }
.input-group .input:first-child { border-radius: 9px 0 0 9px; }
.input-group .input:last-child { border-radius: 0 9px 9px 0; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--green); }
.field-validation-error, .text-danger { color: var(--danger); font-size: .82rem; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.filters { display: grid; grid-template-columns: 2fr repeat(4, 1fr) auto; gap: 10px; align-items: end; }
.filters .field { margin: 0; }
@media (max-width: 1000px) { .filters { grid-template-columns: 1fr 1fr; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 9px; border: 1px solid transparent; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-600); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-700); color: #fff; }
.btn-outline { background: #fff; border-color: #cdd8d2; color: var(--green); }
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.btn-danger { background: #fff; border-color: #efc2bc; color: var(--danger); }
.btn-danger:hover { background: var(--danger-50); color: var(--danger); }
.btn-sm { padding: 5px 10px; font-size: .82rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; margin: 0; }

/* ---------- alerts ---------- */
.alert { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; border: 1px solid transparent; }
.alert-success { background: var(--green-50); color: var(--green); border-color: var(--green-100); }
.alert-danger { background: var(--danger-50); color: var(--danger); border-color: #f5cfca; }
.alert-info { background: var(--info-50); color: var(--info); border-color: #cfe2f6; }
.alert-warning { background: var(--orange-50); color: #9a4a0f; border-color: #ffd9bd; }

/* ---------- booking detail ---------- */
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; margin: 0; }
.kv dt { color: var(--muted); font-size: .86rem; }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; }
.price { width: 100%; border-collapse: collapse; }
.price td { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.price td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.price .total td { border-bottom: 0; border-top: 2px solid var(--green); font-weight: 800; color: var(--green); font-size: 1.1rem; padding-top: 10px; }
.price .discount td:last-child { color: var(--green); }
.price .extra td { color: var(--orange-600); }
.code-big { font-family: "Outfit", sans-serif; font-weight: 800; font-size: 1.7rem; letter-spacing: .05em; color: var(--green); }
.timeline { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
.timeline li { padding: 6px 0 6px 18px; position: relative; border-left: 2px solid var(--green-100); margin-left: 5px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--green); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(160deg, var(--green) 0%, #0d5c47 55%, #0a4a39 100%); }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-card .brand-name { color: var(--ink); font-size: 1.35rem; }
.login-card .brand-sub { color: var(--muted); }

/* ---------- pager ---------- */
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; gap: 10px; flex-wrap: wrap; }

@media print {
  .topbar, .no-print, .actions, form.no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}

/* ---------- free spaces calendar ---------- */
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--muted); margin-bottom: 12px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-dow { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); text-align: center; padding: 4px 0; }
.cal-day { display: flex; flex-direction: column; gap: 2px; min-height: 92px; padding: 8px 9px; border-radius: 10px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: #fff; transition: box-shadow .15s, transform .15s; }
.cal-day:hover { box-shadow: var(--shadow); transform: translateY(-1px); color: var(--ink); }
.cal-num { font-weight: 700; font-size: .9rem; }
.cal-free { font-size: .8rem; color: var(--muted); }
.cal-free strong { font-family: "Outfit", sans-serif; font-size: 1.25rem; color: var(--green); }
.cal-booked { font-size: .75rem; color: var(--muted); }
.cal-day .meter { margin-top: auto; height: 6px; }
.cal-day.is-other { opacity: .45; }
.is-low { background: #fff; }
.cal-day.is-mid, .cal-legend .is-mid { background: var(--orange-50); }
.cal-day.is-high, .cal-legend .is-high { background: #ffe1cc; }
.cal-day.is-high .meter > i, .cal-day.is-mid .meter > i { background: var(--orange); }
.cal-day.is-full, .cal-legend .is-full { background: var(--danger-50); }
.cal-day.is-full .cal-free strong { color: var(--danger); }
.cal-day.is-full .meter > i { background: var(--danger); }
.cal-day.is-today, .cal-legend .is-today { border: 2px solid var(--orange); }
@media (max-width: 700px) { .cal-day { min-height: 70px; padding: 6px; } .cal-booked { display: none; } }

/* ---------- date picker (js/datepicker.js) ---------- */
.dp { position: relative; display: block; }
.dp-field { display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; }
.dp-field svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--green); stroke-width: 1.9; stroke-linecap: round; }
.dp-field span { overflow: hidden; text-overflow: ellipsis; }
.dp-field .dp-empty { color: var(--muted); }
.dp-field[aria-expanded="true"] { border-color: var(--orange); outline: 2px solid rgba(255,122,33,.35); }
.dp-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; width: 292px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 18px 40px -12px rgba(11,18,32,.3); padding: 12px; }
.dp-pop.dp-right { left: auto; right: 0; }
.dp-pop.dp-up { top: auto; bottom: calc(100% + 6px); }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dp-head strong { font-family: "Outfit", "DM Sans", system-ui, sans-serif; color: var(--ink); font-size: 1rem; }
.dp-nav { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--green); font-size: 1.2rem; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.dp-nav:hover:not(:disabled) { border-color: var(--orange); background: var(--orange-50); }
.dp-nav:disabled { opacity: .35; cursor: default; }
.dp-dow, .dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.dp-dow span { text-align: center; font-size: .66rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; padding: 4px 0; }
.dp-grid { row-gap: 2px; }
.dp-day { height: 34px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font: inherit; font-weight: 600; font-size: .88rem; color: var(--ink); }
.dp-day:hover:not(:disabled) { background: var(--orange-50); color: var(--orange-600); }
.dp-day:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.dp-day.is-today { box-shadow: inset 0 0 0 1.5px var(--orange); }
.dp-day.is-range { background: var(--green-50); border-radius: 0; }
.dp-day.is-edge { background: var(--green-100); color: var(--green); }
.dp-day.is-selected, .dp-day.is-selected:hover { background: var(--green); color: #fff; }
.dp-day:disabled { color: #c3c9cf; cursor: not-allowed; }
.dp-time { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.dp-time label { font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.dp-time .select { flex: 1; padding: 6px 9px; }
.dp-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.dp-foot-r { display: flex; gap: 8px; }
.dp-foot .btn { padding: 6px 12px; font-size: .84rem; }

/* ---------- users ---------- */
.table-middle td { vertical-align: middle; }
.user-email { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: nowrap; }
.user-actions form { display: flex; align-items: center; gap: 8px; margin: 0; }
.user-actions .input { width: 180px; height: 34px; padding: 6px 10px; }
.user-actions .btn { height: 34px; padding: 0 12px; font-size: .84rem; }
@media (max-width: 900px) { .user-actions { flex-wrap: wrap; justify-content: flex-start; } }

/* ---------- settings tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 16px; }
.tab { padding: 10px 18px; font-weight: 700; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: 8px 8px 0 0; white-space: nowrap; }
.tab:hover { color: var(--green); background: var(--green-50); }
.tab.is-active { color: var(--green); border-bottom-color: var(--orange); background: #fff; }
.settings-pane { max-width: 860px; }
.settings-pane[hidden] { display: none; }
.settings-pane .actions { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .settings-pane .grid-2 { grid-template-columns: 1fr; } }
