:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe5ee;
  --soft: #f8fafc;
  --brand: #0f6b45;
  --brand-2: #128155;
  --nav: #101827;
  --danger: #a61b1b;
  --shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 20% -10%, #d9f5e5 0, rgba(217, 245, 229, 0) 330px),
    linear-gradient(180deg, #fbfdff, var(--bg));
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
small { color: var(--muted); }
code {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 2px 5px;
  border-radius: 6px;
}

.wrap { max-width: 980px; margin: 0 auto; padding: 22px; }
.admin-main { margin-left: 252px; padding: 26px; max-width: 1480px; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 252px;
  background: linear-gradient(180deg, #0b1220, #111827);
  color: #dbeafe;
  box-shadow: var(--shadow);
  z-index: 5;
}
.brand {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  color: #86efac;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.brand strong { display: block; margin-top: 5px; color: #fff; font-size: 20px; text-transform: none; }
.sidebar nav { display: grid; gap: 5px; padding: 14px; }
.sidebar a {
  padding: 11px 12px;
  border-radius: 10px;
  color: #dbeafe;
  font-weight: 800;
  font-size: 14px;
}
.sidebar a:hover { background: rgba(255,255,255,.10); color: #fff; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  margin-left: 252px;
  background: rgba(255,255,255,.90);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 16px 26px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.topbar h1 { font-size: 24px; margin: 0; font-weight: 950; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.public-top {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 950;
  color: #0f172a;
}
.public-brand:before {
  content: "";
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, #16a34a, #0f172a);
  display: inline-block;
  box-shadow: 0 8px 20px rgba(15,23,42,.16);
}
.lang-switch { display: flex; gap: 6px; }
.lang-switch a {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  color: #334155;
  font-weight: 900;
  font-size: 12px;
}
.lang-switch a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.panel {
  background: rgba(255,255,255,.97);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(15,23,42,.04);
}
.panel h1, .panel h2 { margin-top: 0; letter-spacing: 0; }
.hero-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff, #f7fbff 55%, #eefdf4);
  border-color: #cfe8d8;
}
.hero-panel:after {
  content: "";
  position: absolute;
  right: -42px;
  top: -42px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(20,108,67,.12);
}
.hero-panel > * { position: relative; z-index: 1; }
.hero-panel h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.02; margin-bottom: 10px; }
.eyebrow {
  margin: 0 0 8px;
  color: #15803d;
  font-weight: 950;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.action-row { display: flex; gap: 9px; flex-wrap: wrap; }
.date-heading { max-width: 980px; margin: 22px 0 10px; color: #0f172a; font-size: 18px; }
.shift-card { border-left: 4px solid #16a34a; }
.mini-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fbfdff;
  padding: 14px;
  margin-top: 12px;
}
.mini-card h3 { margin: 0 0 10px; font-size: 18px; }
.mini-card p { margin: 10px 0 0; }
.muted { color: var(--muted); }
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-head h2 { margin-bottom: 4px; }
.section-head p { margin: 0; }
.scroll-panel {
  max-height: min(68vh, 720px);
  overflow-y: auto;
  padding-right: 7px;
  scroll-behavior: smooth;
}
.scroll-panel.compact { max-height: 360px; }
.scroll-panel::-webkit-scrollbar { width: 8px; }
.scroll-panel::-webkit-scrollbar-track { background: #eef2f7; border-radius: 999px; }
.scroll-panel::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 999px; }
.shift-list {
  display: grid;
  gap: 12px;
}
.shift-list .mini-card { margin-top: 0; }
.apply-details,
.cancel-details { margin-top: 12px; }
.apply-details summary,
.cancel-details summary {
  list-style: none;
  width: fit-content;
}
.apply-details summary::-webkit-details-marker,
.cancel-details summary::-webkit-details-marker { display: none; }
.reveal-form { margin-top: 12px; }
.inline-form { margin-top: 12px; }
.compact-success {
  display: inline-flex;
  margin: 10px 0 0;
  padding: 9px 11px;
}

.grid { display: grid; gap: 13px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0,1fr)); }
label { display: grid; gap: 7px; font-size: 14px; font-weight: 850; color: #334155; }
input, select, textarea {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
  color: var(--ink);
  min-height: 42px;
}
input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: #15803d;
  box-shadow: 0 0 0 3px rgba(21,128,61,.13);
}
textarea { min-height: 96px; }
.btn, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  padding: 10px 14px;
  font-weight: 950;
  cursor: pointer;
  min-height: 42px;
}
.btn:hover, button:hover { background: var(--brand-2); }
.btn.secondary, button.secondary { background: #fff; color: #0f172a; border: 1px solid #cbd5e1; }
.btn.secondary:hover, button.secondary:hover { background: #f8fafc; }
.btn.danger, button.danger { background: var(--danger); color: #fff; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; }
.table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 13px; border-bottom: 1px solid #edf2f7; text-align: left; vertical-align: top; }
.table th { background: #f8fafc; color: #475569; font-size: 12px; text-transform: uppercase; }
.table tr:hover td { background: #fbfdfc; }

.badge { display: inline-flex; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 950; border: 1px solid; }
.badge.good { background: #ecfdf5; color: #166534; border-color: #bbf7d0; }
.badge.warn { background: #fffbeb; color: #92400e; border-color: #fde68a; }
.badge.bad { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 13px; margin-bottom: 16px; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 17px; box-shadow: 0 2px 10px rgba(15,23,42,.04); }
.metric span { color: var(--muted); font-size: 13px; font-weight: 850; }
.metric strong { display: block; margin-top: 8px; font-size: 31px; line-height: 1; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; }
.pager div { display: flex; gap: 8px; }
.notice { padding: 13px; border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }
.error { padding: 13px; border-radius: 12px; background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; margin-bottom: 12px; }
.success { padding: 13px; border-radius: 12px; background: #ecfdf5; border: 1px solid #bbf7d0; color: #166534; margin-bottom: 12px; }
.info-list { display: grid; gap: 8px; }
.info-list div { display: flex; gap: 8px; justify-content: space-between; border-bottom: 1px solid #edf2f7; padding-bottom: 8px; }
.info-list span { color: var(--muted); font-weight: 800; }
.info-list strong { text-align: right; }
.info-list .driver-highlight {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px;
}
.driver-highlight span { color: #166534; }
.driver-highlight strong { display: grid; gap: 4px; color: #14532d; }
.driver-highlight a { color: #0f6b45; text-decoration: underline; }

@media (max-width: 980px) {
  .sidebar { position: static; width: auto; }
  .sidebar nav { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .topbar { margin-left: 0; position: static; }
  .admin-main { margin-left: 0; padding: 14px; }
  .grid.two, .grid.three, .grid.four, .metrics { grid-template-columns: 1fr; }
  .wrap { padding: 14px; }
  .table { min-width: 720px; }
  .pager { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .sidebar nav { grid-template-columns: 1fr; }
  .panel { padding: 15px; }
  .btn, button { width: 100%; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .metrics { gap: 8px; }
  .public-top { padding: 14px; }
  .info-list div { display: grid; }
  .info-list strong { text-align: left; }
  .hero-panel h1 { font-size: 30px; }
  .action-row { display: grid; }
  .mini-card { padding: 12px; }
  .section-head { display: grid; }
  .scroll-panel { max-height: 62vh; }
  .scroll-panel.compact { max-height: 320px; }
}
