/* ==========================================================================
   Seventh Tower stapp - shop-side web app
   Combines stapp styles (login, home, admin) with Web App 2 waiver form styles
   ========================================================================== */

/* ---- Application font ---- */
@font-face {
  font-family: "Howie's Funhouse";
  src: url("fonts/HOWIE_S_FUNHOUSE.TTF") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---- Root variables (waiver form palette from Web App 2) ---- */
:root {
  color-scheme: dark;

  --app-font: "Howie's Funhouse", 'Hammersmith One', Georgia, serif;

  --red-500: #f44336;
  --red-700: #d32f2f;
  --red-200: #ffcdd2;
  --artist-color: var(--red-500);

  --ink: #e8e8ea;
  --ink-soft: #a0a0a8;
  --line: #3a3a40;
  --field-bg: #2c2c30;
  --page-bg: #1c1c1e;
  --danger: #ff6b5e;

  --radius: 8px;
  --gap: 16px;

  /* stapp legacy aliases */
  --brand: var(--red-500);
  --brand-dark: var(--red-700);
  --card-bg: var(--field-bg);
  --field-border: var(--line);
}

/* ---- Global reset ---- */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--app-font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

/* Inputs use the app font at 16px (prevents iOS Safari zoom on focus) */
input, textarea, select, button {
  font-family: var(--app-font);
  font-size: 16px; /* 16px prevents iOS Safari zoom on focus */
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   LOGIN SCREEN (stapp)
   ========================================================================== */
body.login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(244, 67, 54, 0.16), transparent 60%),
    var(--page-bg);
}

body.login .card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
  padding: 34px 30px 26px;
}

.brand { text-align: center; margin-bottom: 26px; }
.brand h1 { margin: 0; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.brand .sub { margin: 6px 0 0; color: var(--ink-soft); font-size: 0.95rem; }

.alert {
  background: rgba(244, 67, 54, 0.18);
  border: 1px solid rgba(244, 67, 54, 0.55);
  color: #ff8a80;
  border-radius: 10px;
  padding: 11px 14px;
  margin: 0 0 18px;
  font-size: 0.92rem;
  white-space: pre-line;
}

form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 14px 0 6px;
}

select,
input[type="password"] {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--field-bg);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 13px 14px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  margin-top: 14px;
}

select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 40px;
}

select:focus,
input[type="password"]:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.18);
}

.btn {
  width: 100%;
  margin-top: 22px;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  border: none;
  border-radius: 10px;
  padding: 14px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(244, 67, 54, 0.35);
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}

.btn:hover { box-shadow: 0 10px 22px rgba(244, 67, 54, 0.45); }
.btn:active { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  color: #ff6f60;
  border: 1px solid #ff6f60;
  box-shadow: none;
}
.btn-outline:hover { background: rgba(244, 67, 54, 0.12); box-shadow: none; }

.problems { margin-top: 18px; font-size: 0.82rem; color: var(--ink-soft); }
.problems summary { cursor: pointer; }
.problems ul { margin: 8px 0 0; padding-left: 18px; }

.foot {
  margin: 26px 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(245, 245, 245, 0.4);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   WAIVER FORM (Web App 2 styles)
   ========================================================================== */

/* ---- Hero ---- */
.hero {
  text-align: center;
  padding: 0 0 4px;
}

.hero-art {
  display: block;
  width: 100%;
  height: auto;
  max-height: 200px;
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  background: var(--field-bg);
}

/* ---- Page ---- */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--gap);
  padding-bottom: 64px;
}

.form-date {
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
  text-align: center;
}

/* ---- Cards ---- */
.card {
  background: var(--field-bg);
  border-radius: var(--radius);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  padding: var(--gap);
  margin: 0 0 24px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--red-700);
  text-align: center;
}

.card-note {
  margin: 0 0 12px;
  font-size: 14px;
  color: var(--ink-soft);
  text-align: center;
}

.confidential {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.03em;
}

.emphasis {
  margin: 20px 0 12px;
  font-size: 16px;
  font-weight: 700;
  font-style: italic;
  color: var(--red-700);
  text-align: center;
}

/* ---- Consent statements ---- */
.statements { display: flex; flex-direction: column; }

.statement {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.statement-text {
  flex: 1;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}

.initial {
  flex: 0 0 96px;
  width: 96px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
  text-transform: uppercase;
  color: var(--red-500);
  background: var(--field-bg);
}
.initial::placeholder { color: #6a6a72; }

/* ---- Fields ---- */
.row { display: flex; gap: 12px; }
.row > .field { flex: 1 1 0; }
.row-2-1 > .field:nth-child(1) { flex: 2 1 0; }
.row-2-1 > .field:nth-child(2) { flex: 1 1 0; }
.row-2-1 > .field:nth-child(3) { flex: 1 1 0; }

.field { margin-bottom: 14px; }

.field label,
.label-like {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.age {
  margin: 0;
  padding: 12px 0;
  font-size: 16px;
  font-weight: 700;
}
.age.underage { color: #8b0000; }

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='date'],
input[type='time'],
textarea,
select {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  color: var(--ink);
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--artist-color);
  outline-offset: 1px;
  border-color: var(--artist-color);
}

textarea { resize: vertical; }

/* Field-level error */
.error {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--danger);
}
.error[hidden] { display: none; }
.field.has-error > input,
.field.has-error > textarea,
.field.has-error > select { border-color: var(--danger); }

/* ---- Checkboxes and radios ---- */
.check-grid { display: flex; gap: 12px; }
.check-col { flex: 1 1 0; }

.check,
.radio {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 0;
  font-size: 16px;
  line-height: 1.3;
  cursor: pointer;
}
.check input,
.radio input {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--artist-color);
}

.yes-no { display: flex; gap: 20px; }

.question { margin: 18px 0; }
.question-text { margin: 0 0 8px; }
.time-input { max-width: 200px; }
.detail[hidden] { display: none; }

/* ---- Signature ---- */
.release { margin: 0 0 16px; font-size: 14px; line-height: 1.6; }

.pad-wrap {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
  overflow: hidden;
  touch-action: none;
}

.pad {
  display: block;
  width: 100%;
  aspect-ratio: 716 / 266;
  touch-action: none;
  cursor: crosshair;
}

.rule { height: 2px; background: var(--ink); margin: 0 0 8px; }
.caption { margin: 0 0 4px; font-size: 12px; color: var(--ink-soft); text-align: center; }
.signature-date { margin: 0 0 12px; font-size: 14px; text-align: center; }

/* ---- ID photo ---- */
#id-photo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.idphoto {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
}

.idphoto-preview {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: min(50vh, 400px);
  max-height: min(50svh, 400px);
  margin-inline: auto;
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--field-bg);
}
.idphoto-preview[hidden] { display: none; }

.idphoto-buttons {
  display: flex;
  gap: 10px;
  width: 100%;
}
.idphoto-buttons .btn { flex: 1; }
#id-photo-clear[hidden] { display: none; }

#id-photo-status {
  margin: 0;
  min-height: 1em;
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
}
#id-photo-status.is-error { color: var(--danger); }
.idphoto .error { text-align: center; }

/* ---- Buttons ---- */
.actions { display: flex; gap: 12px; margin: 0 0 16px; }

.btn {
  flex: 1;
  padding: 15px 18px;
  border: none;
  border-radius: 4px;
  background: var(--artist-color);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.btn-secondary { background: var(--red-200); color: var(--red-700); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* ---- Save status ---- */
.save-status { margin: 0 0 16px; text-align: center; font-size: 15px; }
.save-status.ok { color: #1b5e20; }
.save-status.bad { color: var(--danger); }

/* ---- Overlay ---- */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
}
.overlay[hidden] { display: none; }
.overlay-card {
  background: var(--field-bg);
  border-radius: var(--radius);
  padding: 28px 36px;
  text-align: center;
  font-family: var(--app-font);
  font-size: 15px;
}
.spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 12px;
  border: 4px solid var(--red-200);
  border-top-color: var(--red-500);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

/* ---- Narrow phones ---- */
@media (max-width: 520px) {
  .row, .check-grid { flex-direction: column; gap: 0; }
  .form-date { font-size: 20px; }
  .actions { flex-direction: column; }
  .statement { flex-direction: column; gap: 6px; }
  .initial { flex: 0 0 auto; }
}

/* ==========================================================================
   HOME SCREEN (stapp)
   ========================================================================== */
body.home .hero {
  position: relative;
  min-height: 240px;
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.15), rgba(211, 47, 47, 0.55));
  pointer-events: none;
}

.hero-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.hero-icon {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.hero-icon:hover { background: rgba(255, 255, 255, 0.12); }

.hero-signout {
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.hero-signout:hover { background: rgba(255, 255, 255, 0.12); }

.hero-text {
  position: relative;
  margin-top: auto;
  padding: 24px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.hero-text h1 { margin: 0; font-size: 2rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.hero-text p { margin: 6px 0 0; font-size: 1.05rem; opacity: 0.95; }

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  margin-left: 0.4rem;
  vertical-align: middle;
}

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.quick-card {
  position: relative;
  display: block;
  text-decoration: none;
  border: none;
  border-radius: 16px;
  overflow: hidden;
  min-height: 200px;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}
.quick-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3); }
.quick-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.05) 55%);
}
.quick-card-label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 16px;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-align: left;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  z-index: 1;
}

@media (max-width: 560px) { .quick-actions { grid-template-columns: 1fr; } }

/* ==========================================================================
   SIDE PANEL (stapp)
   ========================================================================== */
.side-panel {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--brand-dark);
  color: #fff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform 0.3s ease, visibility 0s linear 0.3s;
  overflow-y: auto;
}
.side-panel.open { transform: translateX(0); visibility: visible; transition: transform 0.3s ease; }

.panel-scrim {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 999;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.panel-scrim.open { opacity: 1; pointer-events: auto; }

.panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; }
.panel-title { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.panel-close { background: transparent; border: none; color: #fff; font-size: 1.7rem; line-height: 1; cursor: pointer; padding: 4px 10px; border-radius: 8px; }
.panel-close:hover { background: rgba(255, 255, 255, 0.12); }

.panel-nav { display: flex; flex-direction: column; padding: 4px 0 8px; }
.panel-btn {
  display: block;
  width: calc(100% - 16px);
  margin: 8px;
  padding: 13px 16px;
  font: inherit;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  color: #1a1a1a;
  background: #FF7043;
  border: 2px solid #1a1a1a;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.08s ease;
}
.panel-btn:hover { background: #FF8A65; }
.panel-btn:active { transform: translateY(1px); }

.panel-footer { margin-top: auto; padding: 16px; text-align: center; font-size: 0.75rem; opacity: 0.85; }
.panel-footer p { margin: 2px 0; }

/* Switch user form in panel */
.panel-switch-form { padding: 0 16px 12px; display: flex; flex-direction: column; }
.panel-switch-form label { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); margin: 10px 0 4px; }
.panel-switch-form select,
.panel-switch-form input[type="password"] { width: 100%; font: inherit; color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 8px; padding: 10px 12px; appearance: none; -webkit-appearance: none; outline: none; }
.panel-switch-form select { margin-top: 10px; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f5f5f5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; padding-right: 36px; }
.panel-switch-form input[type="password"] { margin-top: 10px; }
.panel-switch-form select:focus,
.panel-switch-form input[type="password"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.18); }

.panel-switch-btn { margin-top: 14px; font: inherit; font-weight: 700; letter-spacing: 0.02em; color: #1a1a1a; background: #fff; border: 2px solid #1a1a1a; border-radius: 6px; padding: 11px; cursor: pointer; transition: background 0.15s ease, transform 0.08s ease; }
.panel-switch-btn:hover { background: #f0f0f0; }
.panel-switch-btn:active { transform: translateY(1px); }

.panel-error { margin: 10px 0 0; padding: 8px 10px; background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 8px; color: #fff; font-size: 0.85rem; text-align: center; }

/* ==========================================================================
   ADMIN PAGE (stapp)
   ========================================================================== */
body.admin { min-height: 100vh; background: var(--page-bg); background-attachment: fixed; display: flex; flex-direction: column; padding-bottom: 40px; }

.admin-header { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--card-bg); border-bottom: 1px solid var(--field-border); position: sticky; top: 0; z-index: 10; }
.admin-back { color: var(--ink); text-decoration: none; font-size: 1.4rem; padding: 4px 10px; border-radius: 8px; }
.admin-back:hover { background: rgba(255, 255, 255, 0.08); }
.admin-header h1 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; flex: 1; }
.admin-user { font-size: 0.85rem; color: var(--ink-soft); }

.admin-tabs { display: flex; background: var(--card-bg); border-bottom: 1px solid var(--field-border); position: sticky; top: 57px; z-index: 10; }
.admin-tab { flex: 1; padding: 14px 10px; font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--ink-soft); background: transparent; border: none; border-bottom: 3px solid transparent; cursor: pointer; transition: color 0.15s ease, border-color 0.15s ease; }
.admin-tab:hover { color: var(--ink); }
.admin-tab.active { color: var(--brand); border-bottom-color: var(--brand); }

.admin-main { flex: 1; max-width: 720px; margin: 0 auto; padding: 20px 16px; display: flex; flex-direction: column; gap: 20px; width: 100%; box-sizing: border-box; }

.admin-section { display: flex; flex-direction: column; gap: 20px; }
.admin-section[hidden] { display: none; }

.admin-card { background: var(--card-bg); border-radius: 14px; padding: 22px 20px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); }
.admin-card h2 { margin: 0 0 16px; font-size: 1.05rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink); }

.admin-form { display: flex; flex-direction: column; }
.admin-form label { display: block; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft); margin: 12px 0 5px; }
.admin-form label:first-child { margin-top: 0; }
.admin-form input[type="text"],
.admin-form input[type="tel"],
.admin-form input[type="email"],
.admin-form input[type="password"] { width: 100%; font: inherit; color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 10px; padding: 12px 14px; outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.admin-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.18); }

.admin-btn { margin-top: 16px; font: inherit; font-weight: 700; letter-spacing: 0.02em; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-dark)); border: none; border-radius: 10px; padding: 13px 18px; cursor: pointer; box-shadow: 0 6px 16px rgba(244, 67, 54, 0.3); transition: transform 0.08s ease, box-shadow 0.15s ease; align-self: flex-start; }
.admin-btn:hover { box-shadow: 0 8px 20px rgba(244, 67, 54, 0.4); }
.admin-btn:active { transform: translateY(1px); }
.admin-btn-secondary { background: transparent; color: #ff6f60; border: 1px solid #ff6f60; box-shadow: none; padding: 8px 14px; font-size: 0.85rem; }
.admin-btn-secondary:hover { background: rgba(244, 67, 54, 0.12); box-shadow: none; }
.admin-btn-delete { background: linear-gradient(135deg, #ff4444, #cc0000); box-shadow: 0 6px 16px rgba(255, 68, 68, 0.3); padding: 8px 14px; font-size: 0.85rem; }
.admin-btn-delete:hover { box-shadow: 0 8px 20px rgba(255, 68, 68, 0.4); }

.admin-btn-row { display: flex; gap: 10px; margin-top: 16px; }
.admin-btn-row .admin-btn { margin-top: 0; }

.admin-status { margin: 12px 0 0; font-size: 0.85rem; color: var(--ink-soft); }
.admin-save-message { margin: 12px 0 0; font-size: 0.85rem; color: #4ade80; }
.admin-empty { margin: 0; color: var(--ink-soft); font-size: 0.9rem; text-align: center; padding: 16px 0; }

.admin-add-user { display: flex; gap: 10px; margin-top: 14px; }
.admin-add-user input { flex: 1; font: inherit; color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 10px; padding: 12px 14px; outline: none; }
.admin-add-user input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.18); }
.admin-add-user .admin-btn { margin-top: 0; }

.admin-user-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--field-border); }
.admin-user-row:last-child { border-bottom: none; }
.admin-user-name { font-weight: 500; font-size: 0.95rem; }
.admin-user-badges { display: flex; gap: 6px; }

.admin-user-actions { display: flex; align-items: center; gap: 10px; }

.admin-toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.admin-toggle input { opacity: 0; width: 0; height: 0; }
.admin-toggle-slider { position: absolute; cursor: pointer; inset: 0; background-color: var(--field-border); border-radius: 24px; transition: 0.2s; }
.admin-toggle-slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: var(--ink-soft); border-radius: 50%; transition: 0.2s; }
.admin-toggle input:checked + .admin-toggle-slider { background-color: var(--brand); }
.admin-toggle input:checked + .admin-toggle-slider:before { transform: translateX(20px); background-color: #fff; }

@media (max-width: 560px) {
  .admin-header h1 { font-size: 1.1rem; }
  .admin-tab { font-size: 0.8rem; padding: 12px 6px; }
  .admin-add-user { flex-direction: column; }
  .admin-edit-row { flex-direction: column; align-items: flex-start; }
}

/* ==========================================================================
   PROMPT MODAL (stapp)
   ========================================================================== */
.prompt-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.7); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 20px; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s linear 0.2s; }
.prompt-overlay:not([hidden]) { opacity: 1; visibility: visible; transition: opacity 0.2s ease; }
.prompt-container { background: var(--card-bg); border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18); max-width: 380px; width: 100%; max-height: 90vh; overflow: hidden; display: flex; flex-direction: column; transform: scale(0.95); transition: transform 0.2s ease; border: 1px solid var(--field-border); }
.prompt-overlay:not([hidden]) .prompt-container { transform: scale(1); }
.prompt-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid var(--field-border); }
.prompt-header h3 { margin: 0; font-size: 1.25rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.prompt-close { background: transparent; border: none; color: var(--ink-soft); font-size: 1.5rem; line-height: 1; cursor: pointer; padding: 8px; border-radius: 8px; transition: color 0.15s ease, background 0.15s ease; }
.prompt-close:hover { color: var(--ink); background: rgba(255, 255, 255, 0.08); }
.prompt-body { padding: 24px; }
.prompt-body p { margin: 0 0 20px; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }
.prompt-body .form-group { margin-bottom: 20px; }
.prompt-body input[type="password"] { width: 100%; font: inherit; color: var(--ink); background: var(--field-bg); border: 1px solid var(--field-border); border-radius: 10px; padding: 13px 14px; appearance: none; -webkit-appearance: none; outline: none; transition: border-color 0.15s ease, box-shadow 0.15s ease; font-size: 1rem; box-sizing: border-box; }
.prompt-body input[type="password"]:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.18); }
.prompt-error:not([hidden]) { display: block; background: rgba(244, 67, 54, 0.18); border: 1px solid rgba(244, 67, 54, 0.55); color: #ff8a80; border-radius: 10px; padding: 11px 14px; margin: 0 0 16px; font-size: 0.92rem; text-align: center; }
.prompt-actions { display: flex; gap: 12px; }
.prompt-actions .btn { flex: 1; margin-top: 0; padding: 14px; }
.prompt-actions .btn-outline { flex: 1; margin-top: 0; padding: 14px; background: transparent; color: #ff6f60; border: 1px solid #ff6f60; box-shadow: none; }
.prompt-actions .btn-outline:hover { background: rgba(244, 67, 54, 0.12); box-shadow: none; }

@media (max-width: 480px) { .prompt-container { margin: 12px; max-width: calc(100% - 24px); } .prompt-header { padding: 16px 20px 12px; } .prompt-body { padding: 20px; } }