:root {
  --bg: #0b1020;
  --bg-soft: #121a30;
  --panel: #ffffff;
  --ink: #1a2138;
  --muted: #6b7488;
  --line: #e3e7ef;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --accent: #f59e0b;
  --ok: #16a34a;
  --danger: #dc2626;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 24, 48, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: #f5f7fb;
  line-height: 1.55;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }
code { background: #eef1f7; padding: 1px 5px; border-radius: 5px; font-size: 0.9em; }

/* Buttons */
.btn {
  display: inline-block; cursor: pointer; border: 0; border-radius: 10px;
  background: var(--brand); color: #fff; padding: 10px 18px; font-size: 1rem;
  font-weight: 600; text-decoration: none; transition: background .15s;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-lg { padding: 13px 24px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: 0.85rem; }
.btn-ghost { background: transparent; color: #cdd5ea; border: 1px solid #33405f; }
.btn-ghost:hover { background: #1b2540; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b91c1c; }

/* Public header */
.site-header { background: var(--bg); color: #fff; }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { color: #fff; font-weight: 700; font-size: 1.15rem; display: flex; align-items: center; gap: 9px; }
.brand:hover { text-decoration: none; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(37,99,235,.25); }
.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { color: #cdd5ea; }
.site-header nav a.active { color: #fff; }

/* Hero */
.hero { background: linear-gradient(160deg, #0b1020, #16213f); color: #fff; padding: 56px 0 64px; }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: 2.6rem; margin: 0 0 12px; }
.hero .lead { font-size: 1.2rem; color: #c4cce0; margin: 0 0 24px; }
.hero-cta { margin: 18px 0; }
.checklist { list-style: none; padding: 0; margin: 18px 0 0; color: #d6dcec; }
.checklist li { padding-left: 28px; position: relative; margin: 8px 0; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.hero-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 20px; padding: 40px; text-align: center; }
.dish { font-size: 5rem; }
.dish-label { color: #c4cce0; margin: 8px 0 0; }

/* Sections */
.section { padding: 48px 0; }
.section h2 { font-size: 1.7rem; margin: 0 0 8px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.card p { margin: 0; color: var(--muted); }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 18px; }
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: relative; box-shadow: var(--shadow); }
.steps li::before { counter-increment: step; content: counter(step); display: flex; align-items:center; justify-content:center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 12px; }
.steps strong { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: .92rem; }

/* Price table */
.price-table { width: 100%; border-collapse: collapse; background: var(--panel); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-top: 12px; }
.price-table th, .price-table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.price-table thead th { background: #f0f3fa; font-size: .9rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.price-table tr:last-child td { border-bottom: 0; }

/* Footer */
.site-footer { background: var(--bg); color: #c4cce0; margin-top: 40px; padding: 32px 0 24px; }
.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding-bottom: 16px; }
.site-footer a { color: #c4cce0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* Forms */
.form label { display: block; margin: 14px 0; font-weight: 600; }
.form input, .form select, .form textarea {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 9px; font-size: 1rem; font-weight: 400;
  background: #fff; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.form .check { font-weight: 500; display: flex; align-items: center; gap: 8px; }
.form .check input { width: auto; margin: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { margin-top: 20px; }
.inline { display: flex; gap: 12px; align-items: flex-end; }
.inline .grow { flex: 1; margin: 0; }
fieldset.subfields { border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 18px 18px; margin: 18px 0; }
fieldset.subfields legend { font-weight: 700; padding: 0 8px; }

/* Quote box */
.quote { background: #f0f5ff; border: 1px solid #cfe0ff; border-radius: var(--radius); padding: 18px 20px; margin: 20px 0; }
.quote-row { display: flex; justify-content: space-between; padding: 6px 0; }
.quote-row.total { border-top: 1px solid #cfe0ff; margin-top: 6px; padding-top: 12px; font-size: 1.15rem; }
.quote-avail { margin-top: 10px; font-weight: 600; }
.quote-avail.ok { color: var(--ok); }
.quote-avail.warn { color: var(--accent); }

/* Alerts */
.alert { padding: 14px 18px; border-radius: var(--radius); margin: 16px 0; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert ul { margin: 0; padding-left: 18px; }

/* ===== Admin ===== */
body.admin { display: flex; min-height: 100vh; background: #eef1f7; }
.sidebar { width: 240px; background: var(--bg); color: #c4cce0; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { padding: 20px; font-weight: 700; color: #fff; display: flex; align-items: center; gap: 9px; border-bottom: 1px solid #1e2a47; }
.sidebar nav { display: flex; flex-direction: column; padding: 12px 0; flex: 1; }
.sidebar nav a { color: #c4cce0; padding: 11px 20px; }
.sidebar nav a:hover { background: #16213f; text-decoration: none; }
.sidebar nav a.active { background: var(--brand); color: #fff; }
.sidebar-foot { padding: 16px 20px; border-top: 1px solid #1e2a47; display: flex; flex-direction: column; gap: 10px; }
.sidebar-foot form { margin: 0; }
.admin-main { flex: 1; min-width: 0; }
.admin-content { max-width: 960px; margin: 0 auto; padding: 28px 28px 60px; }
.admin-content h1 { margin-top: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: block; color: var(--ink); }
.kpi:hover { text-decoration: none; border-color: var(--brand); }
.kpi-num { font-size: 2rem; font-weight: 700; }
.kpi-num.accent { color: var(--accent); }
.kpi-label { color: var(--muted); font-size: .9rem; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); margin-bottom: 22px; }
.panel h2 { margin-top: 0; font-size: 1.25rem; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table thead th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; }
.badge-requested { background: #fef3c7; color: #92400e; }
.badge-confirmed { background: #dbeafe; color: #1e40af; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-returned { background: #e5e7eb; color: #374151; }
.badge-cancelled { background: #fee2e2; color: #991b1b; }

.filterbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip { padding: 6px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); font-size: .9rem; }
.chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip:hover { text-decoration: none; }

.page-head { display: flex; align-items: center; gap: 14px; }
.danger-zone { margin: 10px 0 20px; }

.kit-row { border-bottom: 1px solid var(--line); padding: 8px 0; margin: 0; }
.kit-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr auto; gap: 10px; align-items: end; }
.kit-grid label { margin: 0; font-weight: 500; }
.kit-actions { display: flex; gap: 6px; }

/* Login */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(160deg, #0b1020, #16213f); }
.login-card { background: #fff; padding: 32px; border-radius: 18px; width: 100%; max-width: 360px; box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.login-card h1 { margin-top: 0; }

@media (max-width: 860px) {
  .hero-inner, .grid-2, .cards, .steps, .kpis { grid-template-columns: 1fr; }
  .kit-grid { grid-template-columns: 1fr 1fr; }
  body.admin { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .sidebar nav { flex-direction: row; flex-wrap: wrap; }
}
