/* ===========================================================================
   Church Parking — shared styles (no framework, no build)
   =========================================================================== */
:root {
  --brand: #2552e9;
  --brand-dark: #1d40d6;
  --brand-50: #eff5ff;
  --brand-100: #dbe8fe;
  --green: #059669;
  --green-dark: #047857;
  --green-50: #ecfdf5;
  --amber: #d97706;
  --amber-50: #fffbeb;
  --red: #dc2626;
  --red-50: #fef2f2;
  --ink: #0f172a;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-soft: 0 12px 30px -12px rgba(37, 82, 233, 0.35);
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f9fc 0%, #eef2f9 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ---- Layout ---- */
.container { max-width: 980px; margin: 0 auto; padding: 24px 16px 56px; }
.narrow { max-width: 540px; }
.center { text-align: center; }
.muted { color: var(--slate-500); }
.tiny { font-size: 12px; color: var(--slate-400); }
.hide { display: none !important; }

/* ---- Top nav ---- */
.nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px;
  background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand .mark {
  width: 36px; height: 36px; border-radius: 12px; background: var(--brand);
  color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-soft);
}
.brand b { display: block; font-size: 14px; }
.brand span { display: block; font-size: 11px; color: var(--slate-500); }
.navlinks { display: flex; gap: 6px; flex-wrap: wrap; }
.navlinks a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--slate-500); text-decoration: none; transition: 0.15s;
}
.navlinks a:hover { background: #fff; color: var(--brand-dark); }
.navlinks a.active { background: var(--brand); color: #fff; box-shadow: var(--shadow-soft); }

/* ---- Cards / forms ---- */
.card { background: #fff; border: 1px solid var(--slate-100); border-radius: 20px; box-shadow: var(--shadow); }
.pad { padding: 24px; }
@media (min-width: 640px) { .pad { padding: 28px; } }

.hero-icon {
  width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center;
  margin: 0 auto 16px; color: #fff; box-shadow: var(--shadow-soft);
}
h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin: 0; }
h2 { font-size: 18px; font-weight: 700; margin: 0 0 16px; }
.sub { color: var(--slate-500); margin-top: 8px; }

label.label { display: block; font-size: 14px; font-weight: 600; color: var(--slate-500); margin: 0 0 6px; }
.field { margin-bottom: 16px; }
.row { display: grid; gap: 16px; }
@media (min-width: 640px) { .row.two { grid-template-columns: 1fr 1fr; } .row.three { grid-template-columns: 1fr 1fr 1fr; } }

input, textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--slate-200); border-radius: 12px;
  background: #fff; color: var(--ink); font: inherit; box-shadow: var(--shadow);
  transition: 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--slate-400); }
input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
textarea { min-height: 96px; resize: vertical; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: 0.08em; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border: 0; border-radius: 12px; font: inherit; font-weight: 700;
  cursor: pointer; transition: 0.15s;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-soft); }
.btn.primary:hover:not(:disabled) { background: var(--brand-dark); }
.btn.green { background: var(--green); color: #fff; }
.btn.green:hover:not(:disabled) { background: var(--green-dark); }
.btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--slate-200); }
.btn.ghost:hover { background: var(--slate-100); }
.btn.sm { padding: 8px 12px; font-size: 13px; }

/* ---- Badges ---- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge.green { background: var(--green-50); color: var(--green-dark); }
.badge.amber { background: var(--amber-50); color: var(--amber); }
.badge.red { background: var(--red-50); color: var(--red); }
.dot { width: 8px; height: 8px; border-radius: 999px; }

/* ---- Stats ---- */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(4, 1fr); gap: 16px; } }
.stat { background: #fff; border: 1px solid var(--slate-100); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.stat .top { display: flex; align-items: flex-start; justify-content: space-between; }
.stat .lbl { font-size: 13px; font-weight: 600; color: var(--slate-500); }
.stat .ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.stat .num { font-size: 28px; font-weight: 800; margin-top: 8px; }
.stat .sub { font-size: 12px; color: var(--slate-400); }

/* ---- Tabs ---- */
.tabs { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; margin: 24px 0; }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px; border: 0; background: transparent; border-radius: 12px; font: inherit; font-weight: 700; color: var(--slate-500); cursor: pointer; }
.tab.active { background: var(--brand); color: #fff; box-shadow: var(--shadow-soft); }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; }
table { width: 100%; min-width: 640px; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--slate-500); padding: 10px 12px; border-bottom: 1px solid var(--slate-200); }
td { padding: 12px; border-bottom: 1px solid var(--slate-100); font-size: 14px; }
tr:hover td { background: #fbfdff; }
.icon-btn { border: 0; background: transparent; padding: 8px; border-radius: 10px; color: var(--slate-400); cursor: pointer; }
.icon-btn:hover { background: var(--red-50); color: var(--red); }

/* ---- Kanban board ---- */
.board { display: grid; gap: 16px; }
@media (min-width: 768px) { .board { grid-template-columns: 1fr 1fr 1fr; } }
.col { background: rgba(241, 245, 249, 0.6); border-radius: var(--radius); padding: 8px; }
.col-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 12px; border: 1px solid; font-weight: 700; }
.col-head.pending { background: var(--red-50); border-color: #fecaca; }
.col-head.informed { background: var(--amber-50); border-color: #fde68a; }
.col-head.moved { background: var(--green-50); border-color: #a7f3d0; }
.col-body { display: flex; flex-direction: column; gap: 8px; min-height: 120px; margin-top: 8px; }
.col-empty { text-align: center; color: var(--slate-400); font-size: 12px; padding: 28px 8px; }
.req-card { background: #fff; border: 1px solid var(--slate-100); border-radius: 14px; box-shadow: var(--shadow); padding: 14px; }
.req-card .plate { font-family: ui-monospace, Menlo, monospace; font-size: 18px; font-weight: 800; }
.req-meta { color: var(--slate-400); font-size: 12px; margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---- Result panels ---- */
.result-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 16px; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; }
.kv .k { font-size: 14px; color: var(--slate-500); font-weight: 500; }
.kv .v { font-size: 14px; font-weight: 700; }
.panel { border-radius: var(--radius); padding: 16px; text-align: left; }
.panel.slate { background: var(--slate-100); border: 1px solid var(--slate-200); }
.panel.amber { background: var(--amber-50); border: 1px solid #fde68a; color: #92400e; }
.panel ul { margin: 8px 0 0; padding-left: 20px; }
.panel li { margin: 4px 0; }

/* ---- QR ---- */
.qr-grid { display: grid; gap: 24px; }
@media (min-width: 768px) { .qr-grid { grid-template-columns: 1fr 1fr; } }
.qr-card { border-radius: 24px; border: 1px solid; padding: 20px; }
.qr-card.blue { background: var(--brand-50); border-color: var(--brand-100); }
.qr-card.green { background: var(--green-50); border-color: #a7f3d0; }
.qr-inner { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 24px; text-align: center; margin-top: 16px; }
.qr-canvas { display: inline-block; padding: 8px; background: #fff; border-radius: 12px; }
.qr-canvas canvas, .qr-canvas img { display: block; }
.qr-cta { margin-top: 16px; border-radius: 999px; padding: 12px; color: #fff; font-weight: 800; }
.cross-box { width: 48px; height: 48px; border: 1px solid var(--slate-200); border-radius: 12px; display: grid; place-items: center; margin: 0 auto 8px; }

/* ===========================================================================
   OFFICE MONITOR (display.html) — big-screen, high-contrast
   =========================================================================== */
body.display-mode { background: #0b1220; color: #fff; }
.display-wrap { max-width: 1700px; margin: 0 auto; padding: 24px 28px; }
.display-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.display-title { display: flex; align-items: center; gap: 14px; }
.display-title .mark { width: 52px; height: 52px; border-radius: 14px; background: var(--brand); display: grid; place-items: center; }
.display-title h1 { font-size: 30px; }
.display-title p { margin: 2px 0 0; color: #93a4c4; font-size: 14px; }
.display-clock { text-align: right; }
.display-clock .time { font-size: 30px; font-weight: 800; font-variant-numeric: tabular-nums; }
.display-clock .conn { font-size: 13px; color: #93a4c4; }
.display-controls { display: flex; gap: 10px; align-items: center; }
.display-controls .btn.ghost { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.15); }
.display-controls .btn.ghost:hover { background: rgba(255,255,255,0.12); }

.display-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.dcard {
  background: #14203a; border: 1px solid #213257; border-radius: 20px; padding: 22px;
  position: relative; overflow: hidden;
}
.dcard.pending { border-left: 8px solid #ef4444; }
.dcard.informed { border-left: 8px solid #f59e0b; }
.dcard .dtop { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dcard .dplate { font-family: ui-monospace, Menlo, monospace; font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: 0.04em; overflow-wrap: anywhere; min-width: 0; }
.dcard .downer { font-size: 20px; font-weight: 700; margin-top: 10px; color: #dbe6ff; }
.dcard .dloc { font-size: 17px; color: #9fb3da; margin-top: 8px; }
.dcard .dmeta { font-size: 14px; color: #6f83ab; margin-top: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.dcard .dstatus { flex-shrink: 0; white-space: nowrap; font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 999px; }
.dstatus.pending { background: rgba(239,68,68,0.18); color: #fca5a5; }
.dstatus.informed { background: rgba(245,158,11,0.18); color: #fcd34d; }
.dnotfound { display: inline-block; margin-top: 10px; font-size: 13px; font-weight: 700; color: #fcd34d; }
.dactions { display: flex; gap: 10px; margin-top: 18px; }
.dactions .btn { flex: 1; padding: 14px; font-size: 15px; }
.dactions .btn.advance { background: var(--brand); color: #fff; }
.dactions .btn.done { background: var(--green); color: #fff; }
.display-empty { text-align: center; padding: 90px 20px; color: #6f83ab; }
.display-empty .big { font-size: 26px; font-weight: 800; color: #cbd9f5; }

@keyframes flashIn {
  0% { transform: scale(0.96); box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
  60% { box-shadow: 0 0 0 16px rgba(239,68,68,0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.dcard.is-new { animation: flashIn 1s ease-out; }

.localwarn { background: var(--amber-50); color: #92400e; border: 1px solid #fde68a; border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
body.display-mode .localwarn { background: rgba(245,158,11,0.12); color: #fcd34d; border-color: rgba(245,158,11,0.3); }

/* ---- Print (QR page) ---- */
@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
  .qr-card { break-inside: avoid; }
}
