/* ============================================================
   Kids FunZone – Admin Console Stylesheet
   Simple, high-contrast, large-touch-target UI for staff/manager/admin.
   No gradients, no decorative animation, no horizontal scrolling.
   ============================================================ */

:root {
  --adm-bg:          #f4f6f8;
  --adm-surface:     #ffffff;
  --adm-card:        #ffffff;
  --adm-border:      #d7dde3;

  --adm-accent:      #2563eb;
  --adm-accent-soft: #e8f0fe;
  --adm-green:       #15803d;
  --adm-green-soft:  #dcfce7;
  --adm-yellow:      #92400e;
  --adm-yellow-soft: #fef3c7;
  --adm-red:         #b91c1c;
  --adm-red-soft:    #fee2e2;

  --adm-text-primary:   #111827;
  --adm-text-secondary: #4b5563;
  --adm-text-muted:     #9ca3af;

  --adm-font: 'Segoe UI', Inter, system-ui, sans-serif;

  --adm-sidebar-width: 240px;
  --adm-r: 8px;
}

*, *::before, *::after { box-sizing: border-box; }

.admin-page {
  font-family: var(--adm-font);
  background: var(--adm-bg);
  color: var(--adm-text-primary);
  min-height: 100vh;
  font-size: 16px;
  line-height: 1.5;
}
.admin-page a { color: var(--adm-accent); text-decoration: none; }

/* ── Layout ────────────────────────────────────────────────── */
.adm-layout { display: flex; min-height: 100vh; }

/* ── Sidebar ───────────────────────────────────────────────── */
.adm-sidebar {
  width: var(--adm-sidebar-width);
  background: #ffffff;
  border-right: 1px solid var(--adm-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  top: 0;
  left: 0;
  z-index: 1000;
}
.adm-sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--adm-border);
  flex-shrink: 0;
}
.adm-logo-text { font-weight: 700; font-size: 1.15rem; color: var(--adm-text-primary); }
.adm-logo-text span { color: var(--adm-accent); }
.adm-logo-img { width: 34px; height: 34px; margin-right: 10px; flex-shrink: 0; }
.adm-sidebar-logo { display: flex; align-items: center; }

.adm-nav {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.adm-nav-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 14px;
  border-radius: var(--adm-r);
  color: var(--adm-text-secondary);
  font-weight: 600;
  font-size: 1rem;
}
.adm-nav-link:hover { background: #f1f5f9; color: var(--adm-text-primary); }
.adm-nav-link.active { background: var(--adm-accent-soft); color: var(--adm-accent); }
.adm-nav-link i { font-size: 1.2rem; width: 22px; text-align: center; flex-shrink: 0; }

.adm-sidebar-footer { padding: 12px; border-top: 1px solid var(--adm-border); flex-shrink: 0; }
.adm-user-card { display: flex; align-items: center; gap: 10px; padding: 8px; }
.adm-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--adm-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem; flex-shrink: 0;
}
.adm-user-info { min-width: 0; flex: 1; }
.adm-user-name { font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-user-role { font-size: 0.78rem; color: var(--adm-text-secondary); }
.adm-logout-btn {
  background: transparent; border: none; color: var(--adm-text-secondary);
  cursor: pointer; font-size: 1.2rem; padding: 6px;
}
.adm-logout-btn:hover { color: var(--adm-red); }

.adm-role-gate { display: none; }

/* ── Main content ──────────────────────────────────────────── */
.adm-main {
  flex: 1;
  margin-left: var(--adm-sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.adm-topbar {
  min-height: 64px;
  background: var(--adm-surface);
  border-bottom: 1px solid var(--adm-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.adm-topbar-title { font-size: 1.4rem; font-weight: 700; flex: 1; padding: 14px 0; }
.adm-topbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; }

.adm-content { padding: 24px; flex: 1; }
.adm-content-narrow { max-width: 640px; }
.adm-center { margin-left: auto; margin-right: auto; }

.adm-kid-chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.adm-kid-chip {
  display: inline-block;
  background: var(--adm-green-soft);
  color: var(--adm-green);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 700;
  font-size: 0.95rem;
}
.adm-kid-entry {
  border: 1px dashed var(--adm-border);
  border-radius: var(--adm-r);
  padding: 14px;
  margin-bottom: 12px;
}

/* ── Filter bar (Manager & Super Admin list views) ───────────── */
.adm-filter-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}
.adm-filter-row .adm-form-select,
.adm-filter-row input[type="date"] {
  max-width: 200px;
  min-height: 44px;
}
.adm-filter-row input[type="text"] {
  max-width: 260px;
  min-height: 44px;
}
.adm-filter-row .adm-filter-spacer { flex: 1; }
.adm-filter-row label.adm-inline-label {
  font-size: 0.85rem;
  color: var(--adm-text-secondary);
  font-weight: 600;
}

/* ── Buttons ───────────────────────────────────────────────── */
.adm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--adm-r);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  min-height: 44px;
}
.adm-btn-primary { background: var(--adm-accent); color: #fff !important; }
.adm-btn-primary:hover { background: #1d4ed8; color: #fff !important; }
.adm-btn-secondary { background: #ffffff; color: var(--adm-text-primary) !important; border-color: var(--adm-border); }
.adm-btn-secondary:hover { background: #f1f5f9; }
.adm-btn-danger { background: var(--adm-red-soft); color: var(--adm-red) !important; border-color: var(--adm-red); }
.adm-btn-danger:hover { background: #fecaca; }
.adm-btn-link { background: transparent; color: var(--adm-accent) !important; border: none; font-weight: 600; }
.adm-btn-lg { min-height: 52px; font-size: 1.1rem; padding: 12px 24px; }
.adm-btn-sm { min-height: 34px; padding: 6px 12px; font-size: 0.85rem; }

/* Big green check-in button — the single most important action on the
   Register Kid screen, so it gets its own unmissable style. */
.adm-btn-checkin {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 20px;
  background: var(--adm-green);
  color: #fff;
  border: none;
  border-radius: var(--adm-r);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.adm-btn-checkin:hover { background: #14632f; }

/* ── Cards ─────────────────────────────────────────────────── */
.adm-card {
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-r);
  padding: 20px;
  margin-bottom: 20px;
}
.adm-card-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; }
.adm-mt { margin-top: 18px; }
.adm-info-line { font-size: 1.1rem; margin-bottom: 6px; }

/* ── Forms ─────────────────────────────────────────────────── */
.adm-form-label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--adm-text-secondary); margin-bottom: 6px; }
.adm-form-control, .adm-form-select {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid var(--adm-border);
  border-radius: var(--adm-r);
  padding: 12px 14px;
  color: var(--adm-text-primary);
  font-size: 1rem;
  min-height: 48px;
}
.adm-form-control:focus, .adm-form-select:focus {
  border-color: var(--adm-accent);
  outline: none;
}
.adm-form-control-lg { font-size: 1.2rem; padding: 16px; min-height: 56px; }
.adm-form-group { margin-bottom: 16px; }

.adm-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.adm-search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.adm-search-row .adm-form-control { flex: 1; min-width: 220px; }

/* ── Text helpers ──────────────────────────────────────────── */
.adm-text-secondary { color: var(--adm-text-secondary); }
.adm-text-muted { color: var(--adm-text-muted); }
.adm-fw-600 { font-weight: 600; }

/* ── Table (simple, no horizontal scroll) ─────────────────── */
.adm-table-wrap { width: 100%; }
.adm-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.adm-table th, .adm-table td {
  padding: 12px 14px;
  font-size: 0.95rem;
  text-align: left;
  word-break: break-word;
}
.adm-table thead th {
  background: #f8fafc;
  border-bottom: 2px solid var(--adm-border);
  font-weight: 700;
  color: var(--adm-text-secondary);
}
.adm-table tbody tr { border-bottom: 1px solid var(--adm-border); }
.adm-table-empty { text-align: center; padding: 32px !important; color: var(--adm-text-muted); }

/* ── Status pills / row tints (green / yellow / red) ─────────
   Used for the Currently Playing timer and any other status column. */
.adm-status-pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
}
.status-green, .adm-status-pill.status-green { color: var(--adm-green); background: var(--adm-green-soft); }
.status-yellow, .adm-status-pill.status-yellow { color: var(--adm-yellow); background: var(--adm-yellow-soft); }
.status-red, .adm-status-pill.status-red { color: var(--adm-red); background: var(--adm-red-soft); }
.adm-status-pill.status-muted { color: var(--adm-text-secondary); background: #f1f5f9; }

tr.status-green { background: var(--adm-green-soft); }
tr.status-yellow { background: var(--adm-yellow-soft); }
tr.status-red { background: var(--adm-red-soft); }

/* ── Kid selection cards (Register Kid screen) ───────────────
   Selecting a kid reads unmistakably as "confirmed": green fill + border. */
.adm-kid-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.adm-kid-card {
  text-align: left;
  background: #ffffff;
  border: 2px solid var(--adm-border);
  border-radius: var(--adm-r);
  padding: 14px;
  cursor: pointer;
  min-height: 60px;
}
.adm-kid-card:hover { border-color: var(--adm-accent); }
.adm-kid-card.selected { background: var(--adm-green-soft); border-color: var(--adm-green); }
.adm-kid-card.is-disabled { opacity: 0.5; cursor: not-allowed; }
.adm-kid-card-name { font-weight: 700; font-size: 1.05rem; }
.adm-kid-card-meta { font-size: 0.85rem; color: var(--adm-text-secondary); margin-top: 4px; }

/* ── Price display ────────────────────────────────────────── */
.adm-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-r);
  padding: 14px 18px;
  margin: 16px 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.adm-price-value { font-size: 1.6rem; font-weight: 800; color: var(--adm-accent); }

/* ── Count tiles (Dashboard) ─────────────────────────────────── */
.adm-count-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}
.adm-count-tile {
  background: var(--adm-card);
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-r);
  padding: 24px;
  text-align: center;
}
.adm-count-value { font-size: 2.2rem; font-weight: 800; color: var(--adm-accent); }
.adm-count-label { font-size: 0.95rem; color: var(--adm-text-secondary); margin-top: 6px; }

/* ── Danger zone ──────────────────────────────────────────── */
.adm-danger-card { border-color: var(--adm-red); }

/* ── Overlay modals (receipt / confirmation) ─────────────────
   Plain fixed-position overlay — same pattern for every confirm-style
   popup so staff learn one interaction, not several. */
.adm-overlay-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 16px;
}
.adm-receipt-card, .adm-confirm-card {
  background: #ffffff;
  border-radius: var(--adm-r);
  padding: 28px;
  width: 100%;
  max-width: 420px;
}
.adm-receipt-title, .adm-confirm-title { font-size: 1.3rem; font-weight: 800; margin-bottom: 16px; }
.adm-receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--adm-border);
  font-size: 1rem;
}
.adm-confirm-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 1.05rem; }
.adm-confirm-actions { display: flex; gap: 12px; margin-top: 20px; }
.adm-confirm-actions .adm-btn { flex: 1; }

/* ── Modal (Bootstrap) ────────────────────────────────────── */
.adm-modal .modal-content { border-radius: var(--adm-r); }
.adm-modal .modal-header { border-bottom: 1px solid var(--adm-border); }
.adm-modal .modal-body { padding: 24px; }

/* ── Login page ───────────────────────────────────────────── */
.adm-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.adm-login-card {
  background: #ffffff;
  border: 1px solid var(--adm-border);
  border-radius: var(--adm-r);
  padding: 36px;
  width: 100%;
  max-width: 400px;
}
.adm-login-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 20px; }
.adm-mb { margin-bottom: 20px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .adm-sidebar { width: 72px; }
  .adm-sidebar .adm-nav-link span,
  .adm-sidebar .adm-logo-text,
  .adm-sidebar .adm-user-info { display: none; }
  .adm-main { margin-left: 72px; }
  .adm-content { padding: 14px; }
  .adm-topbar { padding: 0 14px; }
}
