:root {
  --green: #08783d;
  --deep: #045d31;
  --gold: #f2c230;
  --dark: #14231b;
  --muted: #66756d;
  --soft: #e9f7ef;
  --line: #dfe8e3;
  --bg: #f8faf9;
  --white: #fff;
  --shadow: 0 16px 42px rgba(20, 35, 27, .10);
}

* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--dark); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px clamp(16px, 4vw, 54px); background: rgba(255,255,255,.72); border-bottom: 1px solid rgba(255,255,255,.26); backdrop-filter: blur(14px); transition: background .25s ease, box-shadow .25s ease, padding .25s ease; }
.topbar.is-scrolled { background: rgba(255,255,255,.96); box-shadow: 0 12px 34px rgba(20,35,27,.10); padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: 0; }
.brand span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--green); color: var(--white); }
.topbar nav { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.nav-cta, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--dark); cursor: pointer; }
.btn.primary, .nav-cta { background: var(--green); border-color: var(--green); color: var(--white); font-weight: 750; }
.btn.ghost { background: var(--white); color: var(--green); border-color: rgba(8,120,61,.28); }
.hero { position: relative; overflow: hidden; min-height: calc(100vh - 72px); display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: center; padding: clamp(28px, 6vw, 76px); background: linear-gradient(115deg, rgba(3,71,40,.94), rgba(4,93,49,.74)), url("../images/sports-field.svg"); background-size: cover; background-position: center; color: var(--white); }
.hero::after { content: ""; position: absolute; inset: auto -10% -20% 35%; height: 220px; background: radial-gradient(circle, rgba(242,194,48,.26), transparent 62%); pointer-events: none; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .42; }
.hero__content, .quick-widget { position: relative; z-index: 1; }
.hero h1 { max-width: 780px; margin: 8px 0; font-size: clamp(44px, 7vw, 92px); line-height: .95; letter-spacing: 0; }
.hero p { max-width: 620px; color: rgba(255,255,255,.84); font-size: 18px; }
.eyebrow { color: #b8f0d2; text-transform: uppercase; font-weight: 800; font-size: 12px; letter-spacing: .12em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.quick-widget, .tool-panel, .login-card, .section-grid article { background: var(--white); color: var(--dark); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.quick-widget { background: rgba(255,255,255,.92); backdrop-filter: blur(18px); }
.glow { box-shadow: 0 0 0 0 rgba(242,194,48,.45); animation: pulseGlow 2.6s ease-in-out infinite; }
.quick-widget { padding: 22px; display: grid; gap: 14px; }
label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; background: var(--white); color: var(--dark); }
textarea { min-height: 92px; resize: vertical; }
.section-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; padding: clamp(28px, 5vw, 64px); }
.section-grid article { padding: 24px; box-shadow: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.section-grid article:hover { transform: translateY(-4px); border-color: rgba(8,120,61,.28); box-shadow: 0 18px 40px rgba(8,120,61,.12); }
.section-grid article img { width: 100%; max-height: 160px; object-fit: contain; margin-bottom: 14px; border-radius: 8px; background: var(--soft); }
.section-grid svg { color: var(--green); width: 32px; height: 32px; }
.split, .contact-band, .page-head { padding: clamp(28px, 5vw, 64px); }
.split { display: grid; grid-template-columns: 1fr 260px; align-items: center; gap: 24px; background: var(--white); }
.stats { border-left: 4px solid var(--green); padding-left: 22px; }
.stats span { display: block; font-size: 56px; font-weight: 900; color: var(--green); }
.contact-band { background: var(--soft); }
.page-head { background: var(--white); border-bottom: 1px solid var(--line); }
.page-head h1, .tool-panel h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 54px); letter-spacing: 0; }
.tool-panel { margin: clamp(18px, 4vw, 42px); padding: 22px; }
.filters, .form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; }
.form-grid .wide { grid-column: 1 / -1; }
.slot-grid, .metric-grid, .product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.slot, .metric-grid article, .product { border: 1px solid var(--line); background: var(--white); border-radius: 8px; padding: 16px; min-height: 86px; text-align: left; }
.slot strong, .slot span, .product strong, .product span { display: block; }
.slot { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.slot:not(.disabled):hover, .product:hover { border-color: var(--green); box-shadow: 0 10px 28px rgba(8,120,61,.12); transform: translateY(-2px); }
.slot.disabled { opacity: .48; cursor: not-allowed; background: #f1f4f2; }
.login-card, .setup { max-width: 760px; margin: 48px auto; padding: 28px; }
.admin-shell { display: grid; grid-template-columns: 240px minmax(0,1fr); min-height: calc(100vh - 68px); }
.sidebar { background: #10251b; color: var(--white); padding: 22px; display: flex; flex-direction: column; gap: 8px; }
.sidebar a { padding: 10px 12px; border-radius: 8px; color: rgba(255,255,255,.82); }
.sidebar a:hover { background: rgba(255,255,255,.09); color: var(--white); }
.sidebar span { margin-top: 10px; color: #b8f0d2; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.sidebar-search input { background: rgba(255,255,255,.08); color: var(--white); border-color: rgba(255,255,255,.12); }
.sidebar-search input::placeholder { color: rgba(255,255,255,.58); }
.admin-shell main { min-width: 0; padding: 28px; }
.metric-grid article { background: var(--white); }
.metric-grid span { color: var(--muted); font-size: 13px; font-weight: 800; }
.metric-grid strong { display: block; margin-top: 8px; font-size: 28px; color: var(--green); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; }
.badge { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 999px; background: var(--soft); color: var(--green); font-size: 12px; font-weight: 850; }
.badge.absent { background: #fdecec; color: #b42318; }
.badge.late { background: #fff4e5; color: #b54708; }
.badge.present { background: var(--soft); color: var(--green); }
.toast { margin: 14px clamp(16px, 4vw, 54px); padding: 12px 14px; border-radius: 8px; background: var(--soft); color: var(--green); border: 1px solid rgba(8,120,61,.18); }
.toast.error { background: #fdecec; color: #b42318; border-color: #f9c3c0; }
.empty-state { max-width: 680px; margin: 70px auto; padding: 32px; text-align: center; }
.warning { border-color: #ffd89a; background: #fffaf0; }
.pos { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 20px; }
.attendance-kiosk { min-height: calc(100vh - 72px); display: grid; place-items: center; gap: 20px; padding: 24px; background: #071b12; color: var(--white); text-align: center; }
.camera-box { width: min(920px, 100%); aspect-ratio: 16/9; border: 1px solid rgba(255,255,255,.22); border-radius: 8px; display: grid; place-items: center; overflow: hidden; background: #000; }
.camera-box video { width: 100%; height: 100%; object-fit: cover; }
#scan-result { position: absolute; margin-top: 42vh; background: rgba(8,120,61,.92); padding: 12px 18px; border-radius: 8px; }
.footer { padding: 24px clamp(16px, 4vw, 54px); color: var(--muted); border-top: 1px solid var(--line); background: var(--white); }
.cms-preview { color: var(--white); background: linear-gradient(135deg, var(--deep), var(--green)); }
.check { display: flex; align-items: center; gap: 10px; align-self: center; }
.check input { width: auto; }
.reveal, .reveal-grid > * { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
.reveal.is-visible, .reveal-grid > *.is-visible { opacity: 1; transform: translateY(0); }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242,194,48,.36); }
  50% { box-shadow: 0 0 0 8px rgba(242,194,48,0); }
}

@media (max-width: 900px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .hero, .section-grid, .split, .admin-shell, .pos { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .filters, .form-grid { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; }
  .admin-shell main { padding: 18px; }
  .tool-panel { margin: 18px; }
}

@media print {
  .topbar, .sidebar, .footer, .btn, .filters { display: none !important; }
  body { background: #fff; }
  .tool-panel { box-shadow: none; border: 0; margin: 0; }
}
