:root {
  --bg-start: #cc0519;
  --bg-end: #72030b;
  --accent: #cc0519;
  --accent-hover: #72030b;
  --accent-light: #febd40;
  --panel-dark: #2b080d;
  --text: #171717;
  --muted: #666a73;
  --line: #e6e7eb;
  --white: #ffffff;
  --faith-yellow: #fdcd48;
  --faith-yellow-dark: #c79a1e;
  --faith-green: #38a060;
  --faith-green-dark: #26753f;
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", sans-serif;
  background: #f6f4f5;
  color: var(--text);
  touch-action: manipulation;
}

body:has(.auth-layout) {
  background: var(--white);
  min-height: 100vh;
  display: grid;
  align-items: center;
}

.hidden-view {
  display: none;
}

.auth-layout {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--white);
  overflow: hidden;
}

/* One elegant, asymmetrical curve — not a circle — drawn once as an SVG
   path. Its viewBox stretches to fill the panel via preserveAspectRatio=
   "none", so the same 0-100 path coordinates stay responsive at any
   viewport size. */
.divider-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.branding-panel {
  position: absolute;
  inset: 0;
  width: 38%;
  padding: clamp(1.5rem, 3vw, 3.25rem);
  display: grid;
  place-items: center;
  color: var(--white);
  z-index: 1;
}

.branding-content {
  position: relative;
  text-align: center;
}

.logo-box {
  width: 180px;
  height: 180px;
  margin: 0 auto 1.4rem;
  border-radius: 36px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: #ffffff;
  border: 1.5px solid rgba(254, 189, 64, 0.6);
  box-shadow: 0 0 0 5px rgba(254, 189, 64, 0.12), 0 10px 26px rgba(6, 20, 38, 0.35);
  padding: 10px;
}

.logo-box-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.branding-content h1 {
  margin: 0;
  font-size: 2.9rem;
  font-weight: 800;
  text-shadow: 0 2px 18px rgba(6, 20, 38, 0.35);
}

.branding-content h2 {
  margin: 0.5rem 0 1rem;
  font-size: 0.92rem;
  letter-spacing: 0.26em;
  font-weight: 700;
  color: #febd40;
  opacity: 1;
}

.brand-insti {
  color: var(--white);
}

.brand-pay {
  color: #febd40;
}

.brand-underline {
  display: block;
  width: 44px;
  height: 3px;
  margin: 0 auto 1.3rem;
  background: #febd40;
  border-radius: 2px;
}

.branding-content p {
  margin: 0 auto;
  max-width: 280px;
  color: #ffd9de;
  line-height: 1.6;
  font-size: 1.08rem;
}

.login-panel {
  position: absolute;
  inset: 0;
  left: 64%;
  width: 36%;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 3vw, 3.25rem);
  z-index: 1;
}

.login-card {
  width: 100%;
  max-width: 480px;
}

.login-accent {
  display: block;
  width: 36px;
  height: 4px;
  margin-bottom: 0.9rem;
  background: #febd40;
  border-radius: 2px;
}

.login-card h3 {
  margin: 0;
  font-size: 2rem;
  line-height: 1.25;
  color: #171717;
}

.login-role {
  color: var(--accent);
}

.subtitle {
  margin: 0.6rem 0 1.9rem;
  color: var(--muted);
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

label {
  font-size: 0.88rem;
  font-weight: 500;
}

input {
  width: 100%;
  height: 46px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  padding: 0 0.9rem;
  font-size: 0.94rem;
  outline: none;
  background: #fafbfc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input-wrap {
  position: relative;
}

.input-wrap input {
  padding-left: 2.6rem;
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  display: flex;
  pointer-events: none;
}

input:focus {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(204, 5, 25, 0.14);
}

.password-header {
  margin-top: 0.35rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0;
}

.text-btn:hover {
  text-decoration: underline;
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 2.6rem;
}

.icon-btn {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1rem;
}

.primary-btn {
  margin-top: 0.85rem;
  height: 46px;
  border: none;
  border-radius: 9px;
  color: var(--white);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  box-shadow: 0 4px 14px rgba(204, 5, 25, 0.28);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.primary-btn:hover {
  background: linear-gradient(135deg, var(--accent-hover), var(--accent-hover));
  box-shadow: 0 6px 18px rgba(204, 5, 25, 0.38);
}

.primary-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.status {
  min-height: 1.25rem;
  margin: 0.7rem 0 0.35rem;
  font-size: 0.86rem;
}

.status.error {
  color: #9f001f;
}

.status.success {
  color: #08723c;
}

small {
  display: block;
  margin-top: 0.8rem;
  color: #8d8f97;
  text-align: center;
  font-size: 0.73rem;
}

.footer-divider {
  margin: 1.4rem 0 0;
  border: none;
  border-top: 1px solid var(--line);
}

.auth-standalone {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 2.5vw, 2rem);
  background: #eef1f5;
}

.standalone-card {
  width: 100%;
  max-width: 430px;
  background: var(--white);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(6, 20, 38, 0.15);
  position: relative;
  overflow: hidden;
}

/* A straight accent strip across the top, clipped by the card's rounded corners. */
.standalone-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), #fdbd40);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.4rem 0 1.5rem;
}

.brand-row.centered {
  justify-content: center;
}

.compact-logo {
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 5px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid rgba(254, 189, 64, 0.75);
  box-shadow: 0 4px 12px rgba(204, 5, 25, 0.16);
}

.standalone-brand {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
}

.standalone-title {
  margin: 0;
  font-size: 1.75rem;
}

.standalone-subtitle {
  margin: 0.5rem 0 1.6rem;
  color: #7a8190;
  font-size: 0.95rem;
  line-height: 1.5;
}

.back-link-btn {
  margin: 1.4rem auto 0;
  border: none;
  background: #f3f5f8;
  color: #586074;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.back-link-btn:hover {
  background: #e9edf2;
  color: #2f3646;
}

.code-card {
  max-width: 460px;
  text-align: center;
}

.shield-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.4rem;
  border-radius: 14px;
  background: #fde8ec;
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 1.45rem;
}

.centered-title {
  font-size: 1.9rem;
  text-align: center;
}

.centered-subtitle {
  margin-bottom: 1.6rem;
  text-align: center;
}

.code-inputs {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.code-input {
  width: 50px;
  height: 50px;
  text-align: center;
  padding: 0;
  font-size: 1.2rem;
}

.code-form-label {
  display: block;
  text-align: left;
  margin: 0.9rem 0 0.4rem;
}

.resend-row {
  margin: 1.15rem 0 0;
  color: #7a8190;
}

.inline-link-btn {
  border: none;
  background: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.inline-link-btn:hover {
  text-decoration: underline;
}

@media (max-width: 860px) {
  .auth-layout {
    width: 100%;
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  /* The curved divider only makes sense in the two-column desktop layout;
     stacked on mobile, the branding panel just gets its own solid red bg. */
  .divider-svg {
    display: none;
  }

  .branding-panel,
  .login-panel {
    position: static;
    width: 100%;
    inset: auto;
  }

  .branding-panel {
    min-height: 300px;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-end) 100%);
  }

  .standalone-brand {
    font-size: 1.7rem;
  }

  .standalone-title,
  .centered-title {
    font-size: 1.8rem;
  }
}

/* Dashboard (after sign-in) */
.dashboard-shell {
  height: 100vh;
  width: 100%;
  display: grid;
  grid-template-columns: clamp(220px, 18vw, 280px) 1fr;
  background: linear-gradient(165deg, #fdeaec 0%, #fff3e2 100%);
  overflow: hidden;
}

.dashboard-sidebar {
  background: var(--panel-dark);
  color: #e5e7eb;
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  height: 100vh;
  box-shadow: 2px 0 18px rgba(7, 29, 56, 0.25);
}

/* Only this part scrolls (logo + nav items, including the long per-stall
   list) — .sidebar-footer below it (Collapse/Sign out) stays in view. */
.sidebar-scroll {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid rgba(254, 189, 64, 0.5);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  overflow: hidden;
  padding: 4px;
}

.sidebar-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icon-svg {
  display: block;
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.sidebar-name {
  font-weight: 700;
  font-size: 0.95rem;
}

.sidebar-role {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  opacity: 0.75;
  margin-top: 0.2rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-section {
  margin-top: 0.45rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-divider {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 0.75rem 0.5rem;
}

.nav-divider::before,
.nav-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.nav-divider-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(203, 213, 225, 0.5);
  white-space: nowrap;
}

.nav-section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  border-radius: 8px;
  transition: background 0.15s ease;
}

.nav-section-label:hover,
.nav-section-label:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}

.nav-section-chevron {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-section.open .nav-section-chevron {
  transform: rotate(90deg);
}

.nav-section.open .nav-subnav {
  display: flex;
}

.nav-section-label--hot,
.nav-section-label--snacks,
.nav-section-label--zagu,
.nav-section-label--rovis,
.nav-section-label--jnb,
.nav-section-label--ateara,
.nav-section-label--trfh {
  color: #e8c988;
}

.nav-section-icon {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--white);
}

.nav-subnav {
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  padding-left: 0.4rem;
  margin-left: 0.4rem;
  border-left: 2px solid rgba(255, 255, 255, 0.06);
}

.nav-item {
  color: #cbd5e1;
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
  font-size: 0.94rem;
  opacity: 0.95;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: #ffffff;
}

.nav-item--sub {
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(203, 213, 225, 0.78);
  padding: 0.5rem 0.65rem;
}

.nav-item--sub.active {
  color: #ffffff;
}

.nav-icon {
  width: 22px;
  display: inline-flex;
  justify-content: center;
  color: var(--white);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.5rem;
}

/* Spotify-style: the toggle is the sidebar's own header row (icon + label).
   The icon stays put when the sidebar collapses, so it never jumps. */
.sidebar-library-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin-left: auto;
  padding: 0;
  border: none;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.15s ease;
}

/* Arrow inside the panel points left (collapse); flips right when collapsed. */
.sidebar-library-arrow {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.2s ease;
}

.dashboard-sidebar--collapsed .sidebar-library-arrow {
  transform: rotate(180deg);
}

.sidebar-library-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-library-icon {
  flex: none;
}

.dashboard-sidebar--collapsed .sidebar-library-toggle {
  margin-left: 0;
}

.sidebar-collapse-icon {
  display: inline-flex;
  width: 22px;
  justify-content: center;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--white);
  transition: transform 0.2s ease;
}

.sidebar-signout-icon {
  display: inline-flex;
  width: 22px;
  justify-content: center;
  color: var(--white);
}

.dashboard-sidebar--collapsed .sidebar-collapse-icon {
  transform: rotate(180deg);
}

.sidebar-signout {
  border: none;
  width: 100%;
  border-radius: 12px;
  padding: 0.7rem 0.75rem;
  background: rgba(255, 255, 255, 0.06);
  color: #e5e7eb;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-content: flex-start;
}

.sidebar-signout:hover {
  background: rgba(255, 255, 255, 0.1);
}

.dashboard-shell--sidebar-collapsed {
  grid-template-columns: 72px 1fr;
}

.dashboard-sidebar--collapsed {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  align-items: stretch;
}

.dashboard-sidebar--collapsed .sidebar-label-text,
.dashboard-sidebar--collapsed .nav-section-title {
  display: none;
}

.dashboard-sidebar--collapsed .nav-divider {
  display: none;
}

/* Per-stall nav sections have no icon of their own (text-only labels), so
   there's nothing meaningful left to show once the sidebar is icon-only —
   hide them rather than leave blank, wrapping rows. */
.dashboard-sidebar--collapsed .nav-section {
  display: none;
}

.dashboard-sidebar--collapsed .sidebar-nav {
  align-items: center;
}

.dashboard-sidebar--collapsed .nav-item,
.dashboard-sidebar--collapsed .sidebar-signout {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.dashboard-sidebar--collapsed .nav-subnav {
  border-left: none;
  padding-left: 0;
  margin-left: 0;
  align-items: center;
}

.dashboard-sidebar--collapsed .nav-section {
  align-items: center;
}

.dashboard-sidebar--collapsed .nav-section-label {
  justify-content: center;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

/* 72px is too narrow for logo + toggle side by side, so the toggle drops
   under the logo. */
.dashboard-sidebar--collapsed .sidebar-brand {
  flex-direction: column;
  justify-content: center;
  gap: 0.6rem;
}

.dashboard-content {
  height: 100vh;
  padding: clamp(0.9rem, 2vw, 2rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #b9c6d6 transparent;
}

.dashboard-content::-webkit-scrollbar {
  width: 8px;
}

.dashboard-content::-webkit-scrollbar-thumb {
  background: #b9c6d6;
  border-radius: 999px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

.sidebar-scroll {
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.dash-header {
  margin-bottom: 1.2rem;
}


.dash-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 1.75rem 1.9rem;
  margin-bottom: 1.4rem;
  background: linear-gradient(120deg, var(--bg-start) 0%, var(--bg-start) 58%, var(--bg-end) 100%);
}

/* Layered wave divider along the bottom edge — a standard, proven "wave
   hero" pattern: smooth filled SVG curves stretched full-width, stacked. */
.dash-hero::before,
.dash-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 42px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
}

.dash-hero::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,45 C240,95 480,5 720,35 C960,65 1200,15 1440,55 L1440,100 L0,100 Z' fill='%23FEBD40' opacity='0.55'/%3E%3C/svg%3E");
}

.dash-hero::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C240,20 480,100 720,65 C960,35 1200,90 1440,50 L1440,100 L0,100 Z' fill='%23CC0519' opacity='0.5'/%3E%3C/svg%3E");
}

.dash-hero-eyebrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffe9a8;
}

.dash-hero-title {
  position: relative;
  z-index: 1;
  margin: 0.55rem 0 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 2px 14px rgba(6, 20, 38, 0.3);
  max-width: 420px;
}

.dash-tag {
  margin: 0 0 0.2rem;
  color: #6b7280;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dash-tag.dash-tag--hot {
  color: var(--accent);
}

.dash-tag.dash-tag--snacks {
  color: var(--faith-yellow-dark);
}

.dash-tag.dash-tag--zagu {
  color: var(--faith-green-dark);
}

.dash-tag.dash-tag--rovis {
  color: var(--accent-hover);
}

.dash-tag.dash-tag--jnb {
  color: #b5651d;
}

.dash-tag.dash-tag--ateara {
  color: #9c3f73;
}

.dash-tag.dash-tag--trfh {
  color: #0d7a85;
}

.dash-title {
  margin: 0;
  font-size: 1.6rem;
}

.dash-subtitle {
  margin: 0.35rem 0 0;
  color: #6b7280;
  font-size: 0.85rem;
}

.stat-card--clickable {
  cursor: pointer;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-card--clickable:hover {
  box-shadow: 0 10px 24px rgba(204, 5, 25, 0.16);
  transform: translateY(-3px);
}

.stat-card--clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.dash-back-btn {
  margin-bottom: 1rem;
  border: none;
  background: #eef2f7;
  color: #475569;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.9rem 0.5rem 0.6rem;
  border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}

.dash-back-btn:hover {
  background: #dce8f4;
  color: var(--accent);
}

.total-orders-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.orders-toolbar--inline {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 150px;
  gap: 0.6rem;
}

/* One search box and no status filter next to it, so it sits flush with the
   right edge instead of leaving an empty filter-sized gap. The extra class
   is needed because the base .orders-toolbar rule further down would
   otherwise win. */
.orders-toolbar.orders-toolbar--single {
  grid-template-columns: minmax(280px, 380px);
}

.summary-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 1.1rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.summary-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--white);
  display: grid;
  place-items: center;
}

.summary-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-value {
  margin-top: 0.15rem;
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
}

.summary-meta {
  margin-top: 0.1rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.stalls-table-panel {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.stalls-table-header-row,
.stalls-table-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1.1fr 1fr 24px;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem;
}

.stalls-table-header-row {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 700;
}

.stalls-table-panel--compact .stalls-table-header-row,
.stalls-table-panel--compact .stalls-table-row {
  grid-template-columns: 2.2fr 1.3fr 1fr 24px;
}

.stalls-table-row {
  border-bottom: 1px solid #eef2f7;
}

.stalls-table-row:last-child {
  border-bottom: none;
}

.stall-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stall-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  font-weight: 800;
  color: #334155;
}

.stall-icon--pink {
  background: #d7e6f5;
}

.stall-icon--orange {
  background: #fef3d1;
}

.stall-icon--purple {
  background: #dcf2e3;
}

.stall-icon--red {
  background: #c9dcee;
}

.stall-icon--teal {
  background: #d7f0ea;
}

.stall-icon--brown {
  background: #f0e0d0;
}

.stall-icon--cyan {
  background: #d6f3f7;
}

.stall-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #1f2937;
}

.stall-desc {
  margin-top: 0.1rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.stall-orders,
.stall-sales {
  font-weight: 800;
  color: #0f172a;
}

.stall-cell-label {
  display: block;
  margin-top: 0.1rem;
  font-weight: 500;
  font-size: 0.78rem;
  color: #6b7280;
}

.stall-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: #e1f5e8;
  color: #26753f;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.stall-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #26753f;
}

.vendor-badge {
  display: inline-flex;
  align-items: center;
  background: #e1f5e8;
  color: #26753f;
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.stall-chevron {
  color: #9ca3af;
  font-size: 1.2rem;
  text-align: right;
}

.stalls-table-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.stalls-table-row:hover {
  background: #eef5fc;
}

.stalls-table-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.stall-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.stall-detail-head-left {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.stall-icon--lg {
  width: 52px;
  height: 52px;
  font-size: 1.4rem;
}

@media (max-width: 640px) {
  .orders-toolbar--inline {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .total-orders-header {
    flex-direction: column;
  }

  .stalls-table-header-row,
  .stalls-table-row {
    grid-template-columns: 1.6fr 0.8fr 0.9fr 0.9fr 16px;
    font-size: 0.85rem;
  }

  .stalls-table-panel--compact .stalls-table-header-row,
  .stalls-table-panel--compact .stalls-table-row {
    grid-template-columns: 1.8fr 1fr 0.9fr 16px;
  }
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(0.75rem, 1.2vw, 1.1rem);
}

.stat-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07);
  min-height: 128px;
  border: 1px solid transparent;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

/* Pink/gold tint alternating across the top KPI row — stays on the red/
   gold brand palette instead of the old arbitrary blue/green/yellow mix. */
#statTotalRevenue {
  background: linear-gradient(160deg, #ffffff 50%, #fdeaec 100%);
  border-color: rgba(204, 5, 25, 0.2);
}

#statTotalOrders {
  background: linear-gradient(160deg, #ffffff 50%, #fdf0d5 100%);
  border-color: rgba(254, 189, 64, 0.3);
}

#statReservations {
  background: linear-gradient(160deg, #ffffff 50%, #fdeaec 100%);
  border-color: rgba(204, 5, 25, 0.2);
}

#statCustomers {
  background: linear-gradient(160deg, #ffffff 50%, #fdf0d5 100%);
  border-color: rgba(254, 189, 64, 0.3);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #6b7280;
}

.stat-chip {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--white);
  display: grid;
  place-items: center;
}

#statTotalOrders .stat-chip {
  background: linear-gradient(135deg, var(--accent-light), var(--accent-hover));
}

#statReservations .stat-chip {
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
}

#statCustomers .stat-chip {
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
}

.stat-value {
  margin-top: 0.7rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
}

#statTotalRevenue .stat-value,
#statTotalOrders .stat-value,
#statReservations .stat-value,
#statCustomers .stat-value {
  color: var(--accent);
}

.stat-meta {
  margin-top: 0.2rem;
  color: #6b7280;
  font-size: 0.82rem;
}

.stat-trend {
  margin-top: 0.55rem;
  font-size: 0.78rem;
  color: #6b7280;
}

.trend-up {
  color: #059669;
  font-weight: 800;
}

.trend-down {
  color: #dc2626;
  font-weight: 800;
}

.lower-grid {
  margin-top: 1.25rem;
  display: grid;
  grid-template-columns: 2fr 1.35fr;
  gap: 1.2rem;
  align-items: start;
}

.panel {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.05rem;
  box-shadow: 0 2px 12px rgba(204, 5, 25, 0.07);
  border: 1px solid #eef2f7;
}

.panel-header {
  margin-bottom: 0.9rem;
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-title::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  flex-shrink: 0;
}

.panel-subtitle {
  margin: 0.25rem 0 0;
  color: #6b7280;
  font-size: 0.82rem;
}

.bar-chart {
  height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 0.55rem;
  padding-top: 0.25rem;
  height: 150px;
}

.bar {
  flex: 1;
  border-radius: 10px 10px 0 0;
  background: var(--accent);
}

/* Flat accent blue on every bar — rank reads through opacity, no gradient. */
.bar-rank-1 {
  opacity: 1;
}
.bar-rank-2 {
  opacity: 0.75;
}
.bar-rank-3 {
  opacity: 0.5;
}

.bar-labels {
  display: flex;
  gap: 0.55rem;
  margin-top: 0.5rem;
}

.bar-labels span {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: #6b7280;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #6b7280;
  font-size: 0.82rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(204, 5, 25, 0.9);
}

.vendor-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.vendor-list-empty {
  padding: 1rem 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

.chart-legend-empty {
  color: #6b7280;
}

.orders-list-empty {
  padding: 1.5rem 0;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

.vendor-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
}

.vendor-pill {
  font-weight: 800;
  padding: 0.5rem 0.65rem;
  border-radius: 999px;
  background: rgba(204, 5, 25, 0.12);
  color: var(--accent);
}

.vendor-pill.alt {
  background: rgba(254, 189, 64, 0.18);
  color: #8a5a00;
}

.vendor-value {
  font-weight: 900;
  color: #0f172a;
}

.vendor-orders {
  color: #6b7280;
  font-size: 0.85rem;
}

.recent-orders-section {
  margin-top: 1.2rem;
  padding-bottom: 1rem;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.order-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.order-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.order-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1f2937;
}

.order-meta {
  font-size: 0.8rem;
  color: #6b7280;
}

.order-right {
  text-align: right;
  flex-shrink: 0;
}

.order-amount {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.order-status {
  display: inline-block;
  margin-top: 0.2rem;
  border-radius: 999px;
  padding: 0.14rem 0.48rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: lowercase;
}

.student-id-badge {
  display: inline-block;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.order-status.completed {
  background: #e1f5e8;
  color: #26753f;
}

.order-status.preparing {
  background: #dce8f4;
  color: #0c4384;
}

.order-status.pending {
  background: #fef3c7;
  color: #b45309;
}

.orders-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.orders-kpi-grid--2col {
  grid-template-columns: repeat(2, 1fr);
}

.orders-kpi-card {
  background: linear-gradient(160deg, #ffffff 55%, #e3eefb 100%);
  border-radius: 14px;
  padding: 0.95rem;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(204, 5, 25, 0.14);
  text-align: center;
}

.orders-kpi-grid .orders-kpi-card:nth-child(2) {
  background: linear-gradient(160deg, #ffffff 55%, #e1f5e9 100%);
  border-color: rgba(56, 160, 96, 0.2);
}

.orders-kpi-grid .orders-kpi-card:nth-child(3) {
  background: linear-gradient(160deg, #ffffff 55%, #fdf1cd 100%);
  border-color: rgba(199, 154, 30, 0.25);
}


.orders-kpi-value {
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f172a;
}

.orders-kpi-label {
  margin-top: 0.1rem;
  color: #6b7280;
  font-size: 0.95rem;
}

.payout-label {
  margin-top: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.payout-value-pending {
  color: #d97706;
}

.payout-value-paid {
  color: #059669;
}

.payout-next-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin: 1rem 0;
  padding: 1.1rem 1.3rem;
  border-radius: 14px;
  background: linear-gradient(160deg, #ffffff 55%, #fdf1cd 100%);
  border: 1px solid rgba(199, 154, 30, 0.3);
}

.payout-next-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.payout-next-amount {
  margin-top: 0.2rem;
  font-size: 1.9rem;
  font-weight: 800;
  color: #0f172a;
}

.payout-next-period {
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.payout-next-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.6rem;
}

.payout-request-actions {
  display: flex;
  gap: 0.5rem;
}

.payout-request-actions.hidden-view {
  display: none;
}

.payout-no-pending {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: #f3f4f6;
  color: #6b7280;
}

.payout-decision-btn {
  border: none;
  border-radius: 8px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.payout-decision-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

.payout-decision-btn--approve {
  background: var(--faith-green);
  color: #ffffff;
}

.payout-decision-btn--approve:hover:not(:disabled) {
  background: var(--faith-green-dark);
}

.payout-decision-btn--reject {
  background: #f3f4f6;
  color: #374151;
}

.payout-decision-btn--reject:hover:not(:disabled) {
  background: #e5e7eb;
}

.payout-history-label {
  margin: 1.2rem 0 0.4rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
}

.payouts-table-header-row,
.payouts-table-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr 0.9fr 1.1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
}

.payouts-table-header-row {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 700;
}

.payouts-table-row {
  border-bottom: 1px solid #eef2f7;
}

.payouts-table-row:last-child {
  border-bottom: none;
}

.payouts-empty-row {
  padding: 1.5rem 0.9rem;
  text-align: center;
  color: #6b7280;
  font-size: 0.9rem;
}

/* .payout-request-actions / .payout-no-pending set their own display after
   .hidden-view is declared, which made both always visible at once. */
.payout-request-actions.hidden-view,
.payout-no-pending.hidden-view {
  display: none;
}

/* --- Refunds view --------------------------------------------------------- */

.nav-count-badge {
  margin-left: auto;
  min-width: 1.25rem;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: #b3123b;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.refunds-table-header-row,
.refunds-table-row {
  display: grid;
  grid-template-columns: 0.9fr 1.2fr 1.8fr 1fr 0.9fr 1.3fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
}

.refunds-table-header-row {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 700;
}

.refunds-table-row {
  border-bottom: 1px solid #eef2f7;
}

.refunds-table-row:last-child {
  border-bottom: none;
}

.refunds-reason {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  color: #0f172a;
  font-size: 0.88rem;
}

.refunds-reason small,
.refunds-sub {
  display: block;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 500;
}

.refunds-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.refunds-action-btn {
  padding: 0.35rem 0.7rem;
}

.refunds-message {
  margin: 0.8rem 0 0;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  background: #e1f5e8;
  color: #26753f;
  font-size: 0.88rem;
  font-weight: 600;
}

.refunds-message--error {
  background: #fde8ec;
  color: #b3123b;
}

.refunds-toolbar {
  grid-template-columns: 1fr;
  align-items: center;
}

.orders-kpi-grid--4col {
  grid-template-columns: repeat(4, 1fr);
}

/* Refund requests are listed under a heading per stall. */
.refunds-stall-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.9rem;
  background: #f1f5f9;
  border-top: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
}

.refunds-stall-group-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #334155;
  letter-spacing: 0.02em;
}

.refunds-stall-group-count {
  font-size: 0.74rem;
  font-weight: 700;
  color: #64748b;
}


.orders-kpi-grid .orders-kpi-card:nth-child(4) {
  background: linear-gradient(160deg, #ffffff 55%, #ece6fa 100%);
  border-color: rgba(110, 80, 190, 0.2);
}

/* Refund status cards double as the table filter. */
.refunds-filter-card {
  font: inherit;
  cursor: pointer;
  width: 100%;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.refunds-filter-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.refunds-filter-card.active {
  border-color: #cc0519;
  box-shadow: 0 0 0 2px rgba(204, 5, 25, 0.22), 0 4px 14px rgba(15, 23, 42, 0.1);
}

.refunds-filter-card:focus-visible {
  outline: 2px solid #cc0519;
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .orders-kpi-grid--4col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.refunds-mode-label {
  justify-self: end;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 700;
}

.refunds-mode-label--test {
  color: #b45309;
}

.orders-chip.processing {
  background: #dce8f4;
  color: #0c4384;
}

.orders-chip.refunded {
  background: #ede9fe;
  color: #5b21b6;
}

.orders-chip.failed,
.orders-chip.flagged {
  background: #fde8ec;
  color: #b3123b;
}

.orders-chip.rejected {
  background: #f3f4f6;
  color: #6b7280;
}

@media (max-width: 900px) {
  .refunds-table-header-row {
    display: none;
  }

  .refunds-table-row {
    grid-template-columns: 1fr 1fr;
  }

  .refunds-actions {
    justify-content: flex-start;
  }
}

.orders-toolbar {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: 1fr 170px;
  gap: 0.75rem;
}

.orders-search-wrap {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 0.75rem;
}

.orders-search-icon {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  font-size: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.4' y2='16.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.orders-search-input {
  width: 100%;
  border: none;
  outline: none;
  height: 100%;
  background: transparent;
  color: #0f172a;
  font-size: 0.95rem;
}

.orders-filter-select {
  background: #ffffff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23cc0519' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 0.7rem center / 16px;
  appearance: none;
  -webkit-appearance: none;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 2.1rem 0 0.8rem;
  font-size: 0.92rem;
  color: #374151;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.orders-filter-select:hover {
  border-color: var(--accent-light);
}

.orders-filter-select:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(204, 5, 25, 0.14);
}

.orders-table-panel {
  margin-top: 1rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.orders-table-header-row,
.orders-table-row {
  display: grid;
  grid-template-columns: 1.2fr 1.3fr 0.8fr 0.95fr 0.9fr 0.9fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
}

.orders-table-header-row {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 700;
}

.orders-table-row {
  border-bottom: 1px solid #eef2f7;
}

.orders-table-row:last-child {
  border-bottom: none;
}

.orders-id {
  color: #64748b;
  font-size: 0.94rem;
}

.orders-student {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.orders-student strong {
  color: #1f2937;
  font-size: 0.97rem;
}

.orders-student span {
  color: #64748b;
  font-size: 0.88rem;
}

.orders-amount {
  color: #0f172a;
  font-weight: 800;
}

.orders-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.14rem 0.5rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: lowercase;
}

.orders-chip.payment {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #e5e7eb;
  text-transform: none;
}

.orders-chip.completed,
.orders-chip.paid {
  background: #e1f5e8;
  color: #26753f;
}

.orders-chip.pending {
  background: #fef3c7;
  color: #b45309;
}

.orders-chip.preparing {
  background: #dce8f4;
  color: #0c4384;
}

.orders-chip.ready {
  background: #fef3c7;
  color: #b45309;
}

.orders-date {
  color: #64748b;
  font-size: 0.9rem;
}

.reservations-table-header-row,
.reservations-table-row {
  display: grid;
  grid-template-columns: 1.35fr 0.8fr 1fr 0.8fr 0.9fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
}

.reservations-table-header-row {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 700;
}

.reservations-table-row {
  border-bottom: 1px solid #eef2f7;
}

.reservations-table-row:last-child {
  border-bottom: none;
}

@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .lower-grid {
    grid-template-columns: 1fr;
  }
  .orders-kpi-grid {
    grid-template-columns: 1fr;
  }
  .orders-toolbar {
    grid-template-columns: 1fr;
  }
  .orders-table-header-row,
  .orders-table-row {
    grid-template-columns: 1.1fr 1.3fr 0.9fr 1fr 0.95fr 0.95fr;
  }
  .reservations-table-header-row,
  .reservations-table-row {
    grid-template-columns: 1.2fr 0.9fr 1fr 0.9fr 1fr;
  }
  .payouts-table-header-row,
  .payouts-table-row {
    grid-template-columns: 0.9fr 1.3fr 0.95fr 0.85fr 1fr;
  }
}

@media (max-width: 860px) {
  .dashboard-shell {
    grid-template-columns: 1fr;
    height: auto;
    overflow: visible;
  }

  .dashboard-shell--sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    height: auto;
    max-height: 70vh;
  }

  .dashboard-content {
    padding: 1rem;
    height: auto;
  }

  .orders-table-panel {
    overflow-x: auto;
  }

  .orders-table-header-row,
  .orders-table-row {
    min-width: 760px;
  }
  .reservations-table-header-row,
  .reservations-table-row {
    min-width: 680px;
  }
  .payouts-table-header-row,
  .payouts-table-row {
    min-width: 740px;
  }
}

@media (max-width: 480px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }

  .bar-labels span {
    font-size: 0.64rem;
  }

  .summary-card {
    flex-wrap: wrap;
  }
}

/* ---------------------------------------------------------- Manage Stalls */
.manage-stalls-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 1.25rem;
}

.manage-stalls-add-btn {
  width: auto;
  padding: 0.6rem 1.1rem;
}

.add-stall-form {
  background: #fff;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: 1.6rem 1.6rem 1.4rem;
  margin: 0 0 1.25rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.add-stall-form .input-wrap label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b5563;
  display: block;
  margin-bottom: 0.45rem;
}

.add-stall-form .input-wrap input {
  height: 42px;
  font-size: 0.86rem;
  padding: 0 0.85rem;
}

.add-stall-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem 1.4rem;
}

.add-stall-form-full {
  grid-column: 1 / -1;
}

.add-stall-form-section-label {
  margin: 1.6rem 0 1rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.add-stall-form-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .add-stall-form-grid {
    grid-template-columns: 1fr;
  }
}

.manage-stalls-table-header-row,
.manage-stalls-table-row {
  display: grid;
  /* minmax(0, …) so every row gets identical column widths regardless of
     its content — otherwise columns drift from row to row. */
  grid-template-columns:
    minmax(0, 0.5fr) minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(0, 0.8fr)
    minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  font-size: 0.84rem;
}

.manage-stalls-table-row strong {
  font-weight: 600;
}

.manage-stalls-table-header-row {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 700;
}

.manage-stalls-table-row {
  border-bottom: 1px solid #eef2f7;
}

.manage-stalls-table-row:last-child {
  border-bottom: none;
}

.manage-stalls-id {
  color: #9a9a9a;
  font-size: 0.82rem;
  font-weight: 600;
}

.manage-stalls-owner {
  color: #0f172a;
  font-size: 0.84rem;
  line-height: 1.4;
}

.manage-stalls-owner small {
  color: #9a9a9a;
  font-size: 0.74rem;
  font-weight: 500;
}

.manage-stalls-owner--empty {
  font-style: italic;
  color: #b0b0b0;
}

.manage-stalls-table-row .stall-status-badge {
  display: inline-block;
  min-width: 4.6rem;
  text-align: center;
}

.manage-stalls-toggle-btn {
  min-width: 6.2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.manage-stalls-toggle-btn--deactivate {
  border: 1px solid #f3c6d3;
  background: #fde8ec;
  color: #b3123b;
}

.manage-stalls-toggle-btn--deactivate:hover {
  background: #fbd7de;
}

.manage-stalls-toggle-btn--activate {
  border: 1px solid #bfe8cc;
  background: #e1f5e8;
  color: #26753f;
}

.manage-stalls-toggle-btn--activate:hover {
  background: #cdeed9;
}

.manage-stalls-toggle-btn:not(.manage-stalls-toggle-btn--deactivate):not(.manage-stalls-toggle-btn--activate) {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #4a4a4a;
}

.manage-stalls-toggle-btn:not(.manage-stalls-toggle-btn--deactivate):not(.manage-stalls-toggle-btn--activate):hover {
  background: #eef2f7;
}

.manage-stalls-toggle-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.manage-stalls-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.manage-stalls-edit-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.manage-stalls-edit-input {
  width: 100%;
  padding: 0.35rem 0.5rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.85rem;
  font-family: inherit;
  color: #1a1a1a;
}

.manage-stalls-edit-input:focus {
  outline: none;
  border-color: #b3123b;
}

.manage-stalls-kebab {
  position: relative;
  display: inline-block;
}

.manage-stalls-kebab-btn {
  width: 2rem;
  height: 2rem;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 8px;
  color: #4a4a4a;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}

.manage-stalls-kebab-btn:hover {
  background: #eef2f7;
}

.manage-stalls-kebab-menu {
  position: absolute;
  top: calc(100% + 0.3rem);
  right: 0;
  z-index: 20;
  min-width: 9rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  padding: 0.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* .hidden-view is defined earlier in this file with equal specificity, so
   without this it loses to the rule above by source order alone — same
   issue as .confirm-overlay.hidden-view further down. */
.manage-stalls-kebab-menu.hidden-view {
  display: none;
}

.manage-stalls-kebab-item {
  text-align: left;
  padding: 0.5rem 0.6rem;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #1a1a1a;
  cursor: pointer;
}

.manage-stalls-kebab-item:hover {
  background: #f8fafc;
}

.manage-stalls-kebab-item--danger {
  color: #b3123b;
}

.stall-status-badge--closed {
  color: #9a9a9a;
}

.manage-stalls-empty {
  padding: 1.5rem;
  text-align: center;
  color: #9a9a9a;
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .orders-table-panel:has(.manage-stalls-table-header-row) {
    overflow-x: auto;
  }

  .manage-stalls-table-header-row,
  .manage-stalls-table-row {
    min-width: 980px;
  }
}

/* ----------------------------------------------------------- Manage Users */
.manage-users-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.manage-users-search {
  width: 260px;
  height: 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  padding: 0 0.9rem;
  font-size: 0.86rem;
  background: #fff;
}

.manage-users-table-header-row,
.manage-users-table-row {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 0.8fr 1fr 0.8fr 0.9fr 0.9fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  font-size: 0.84rem;
}

.manage-users-table-header-row {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-weight: 700;
}

.manage-users-table-row {
  border-bottom: 1px solid #eef2f7;
}

.manage-users-table-row:last-child {
  border-bottom: none;
}

.manage-users-table-row strong {
  font-weight: 600;
}

.manage-users-role-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 700;
}

.manage-users-role-badge--customer-student {
  background: #e3eefb;
  color: #2f6fed;
}

.manage-users-role-badge--customer-employee {
  background: #e1f5ee;
  color: #1f7a5c;
}

.manage-users-role-badge--stall_admin {
  background: #fdeaec;
  color: #b3123b;
}

.manage-users-role-badge--superadmin {
  background: #fdf0d5;
  color: #8a5a00;
}

.manage-users-self-note {
  font-size: 0.78rem;
  color: #9a9a9a;
  font-style: italic;
}

@media (max-width: 900px) {
  .orders-table-panel:has(.manage-users-table-header-row) {
    overflow-x: auto;
  }

  .manage-users-table-header-row,
  .manage-users-table-row {
    min-width: 820px;
  }

  .manage-users-toolbar {
    flex-wrap: wrap;
  }

  .manage-users-search {
    width: 100%;
  }
}

/* --------------------------------------------------------------- Approvals */
.approvals-table-header-row,
.approvals-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 2.4fr) minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.9rem;
  font-size: 0.84rem;
}

.approvals-table-header-row {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 0.84rem;
  font-weight: 700;
}

.approvals-table-row {
  border-bottom: 1px solid #eef2f7;
}

.approvals-table-row:last-child {
  border-bottom: none;
}

.approvals-change {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 0.35rem;
}

.approvals-change:last-child {
  margin-bottom: 0;
}

.approvals-change small {
  color: #9a9a9a;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.approvals-change-old {
  color: #9a9a9a;
  text-decoration: line-through;
}

.approvals-change-new {
  color: #0f172a;
  font-weight: 700;
}

.approvals-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .orders-table-panel:has(.approvals-table-header-row) {
    overflow-x: auto;
  }

  .approvals-table-header-row,
  .approvals-table-row {
    min-width: 860px;
  }
}

/* ----------------------------------------------------------- Announcements */
.announcement-form {
  max-width: 720px;
  margin-top: 1rem;
}

.announcement-select,
.announcement-textarea {
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 0.86rem;
  color: #0f172a;
  padding: 0.7rem 0.85rem;
}

.announcement-select {
  height: 42px;
  padding: 0 0.85rem;
}

.announcement-textarea {
  resize: vertical;
  min-height: 96px;
}

.announcement-count {
  float: right;
  font-weight: 500;
  color: #9a9a9a;
}

/* --------------------------------------------------------- Payout requests */
.payreq-table-header-row,
.payreq-table-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 0.9rem;
  font-size: 0.86rem;
}

.payreq-table-header-row {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  color: #6b7280;
  font-weight: 700;
}

.payreq-table-row {
  border-bottom: 1px solid #eef2f7;
}

.payreq-table-row:last-child {
  border-bottom: none;
}

.payreq-amount {
  font-weight: 800;
  font-size: 0.98rem;
  color: #0f172a;
}

@media (max-width: 900px) {
  .orders-table-panel:has(.payreq-table-header-row) {
    overflow-x: auto;
  }

  .payreq-table-header-row,
  .payreq-table-row {
    min-width: 640px;
  }
}

/* ----------------------------------------- Approvals: payouts + stall changes */
.approvals-section {
  margin-bottom: 1.6rem;
}

.approvals-section-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.6rem;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.approvals-section-count {
  min-width: 1.4rem;
  padding: 0.05rem 0.5rem;
  border-radius: 999px;
  background: #b3123b;
  color: #fff;
  font-size: 0.74rem;
  font-weight: 700;
  text-align: center;
}

.approvals-empty {
  display: grid;
  gap: 0.3rem;
  justify-items: center;
  text-align: center;
  padding: 3rem 1rem;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  color: #64748b;
}

.approvals-empty strong {
  color: #0f172a;
  font-size: 1rem;
}

/* ------------------------------------------- Reset password: split layout */
body:has(.reset-page) {
  background: #b3123b;
}

.reset-page {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #a40f33 0%, #cf1d46 55%, #e4425f 100%);
}

/* Soft circles and a dot grid behind the card. */
.reset-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 8% 4%, rgba(255, 255, 255, 0.12) 0 22%, transparent 22.2%),
    radial-gradient(circle at 96% 98%, rgba(255, 255, 255, 0.1) 0 26%, transparent 26.2%),
    radial-gradient(circle at 90% 8%, rgba(255, 255, 255, 0.08) 0 12%, transparent 12.2%);
  pointer-events: none;
}

.reset-page::after {
  content: "";
  position: absolute;
  top: 5%;
  right: 4%;
  width: 190px;
  height: 130px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.35) 1.6px, transparent 1.7px);
  background-size: 19px 19px;
  pointer-events: none;
}

.reset-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  min-height: 560px;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  background: #ffffff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(60, 4, 20, 0.35);
}

.reset-illustration {
  position: relative;
  display: grid;
  place-items: center;
  padding: 2.5rem 2rem;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(160deg, #a40f33 0%, #cf1d46 100%);
}

/* Soft circles inside the brand panel. */
.reset-illustration::before,
.reset-illustration::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  pointer-events: none;
}

.reset-illustration::before {
  width: 320px;
  height: 320px;
  top: -140px;
  left: -120px;
}

.reset-illustration::after {
  width: 380px;
  height: 380px;
  bottom: -190px;
  right: -140px;
}

.reset-hero {
  position: relative;
  z-index: 1;
  text-align: center;
}

.reset-hero-logo {
  width: 190px;
  height: 190px;
}

.reset-hero-name {
  margin: 0;
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 2px 18px rgba(60, 4, 20, 0.35);
}

.reset-hero-school {
  margin: 0.6rem 0 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  color: #febd40;
}

.reset-hero-tagline {
  margin: 0 auto;
  max-width: 260px;
  color: #ffd9de;
  font-size: 1rem;
  line-height: 1.55;
}

.reset-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem clamp(2rem, 5vw, 4.2rem);
}

.reset-step {
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.reset-step.hidden-view {
  display: none;
}

.reset-title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #1c1c24;
}

.reset-subtitle {
  margin: 0.6rem 0 2rem;
  max-width: 28rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #a8a2b4;
}

.reset-subtitle strong {
  color: #6b6679;
}

.reset-step label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 1rem;
  font-weight: 500;
  color: #26262e;
}

.reset-step .input-wrap input {
  height: 48px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #dcd8e2;
}

.reset-step .input-wrap input:focus {
  border-color: #b3123b;
  box-shadow: 0 0 0 3px rgba(179, 18, 59, 0.12);
}

.reset-send-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 200px;
  margin-top: 1.6rem;
  padding: 0 2.4rem;
  height: 52px;
  border-radius: 999px;
  font-size: 1.05rem;
  box-shadow: 0 10px 24px rgba(179, 18, 59, 0.35);
}

.reset-step .code-inputs {
  justify-content: flex-start;
}

.reset-step .code-input {
  width: 46px;
  height: 50px;
  border-radius: 6px;
}

.reset-step .code-form-label {
  margin-top: 1.1rem;
}

.reset-step .resend-row {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
}

.reset-back {
  margin-top: auto;
  padding: 1.6rem 0 0;
  align-self: flex-start;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.98rem;
  color: #a8a2b4;
  cursor: pointer;
}

.reset-back:hover {
  color: #b3123b;
}

@media (max-width: 860px) {
  .reset-shell {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .reset-illustration {
    padding: 1.2rem 1.5rem 0.4rem;
  }

  .reset-hero-logo {
    width: 110px;
    height: 110px;
    margin-bottom: 0.9rem;
  }

  .reset-hero-name {
    font-size: 2.2rem;
  }

  .reset-hero-school {
    margin: 0.4rem 0 0.7rem;
    font-size: 0.8rem;
  }

  /* The tagline would sit on the bottom wave in the compact layout. */
  .reset-hero-tagline {
    display: none;
  }

  .reset-illustration {
    padding-bottom: 3.4rem;
  }

  .reset-panel {
    padding: 1.6rem 1.5rem 2rem;
  }

  .reset-step {
    min-height: 0;
  }

  .reset-title {
    font-size: 1.7rem;
  }
}

/* ---------------------------------- Reset password: Option 4 (minimal) skin */
body:has(.reset-page) {
  background: #f6f0f1;
}

.reset-page {
  background: #f6f0f1;
}

.reset-page::before,
.reset-page::after {
  content: none;
}

.reset-shell {
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(120, 30, 50, 0.16);
}

.reset-illustration {
  color: #26262e;
  background: linear-gradient(135deg, #fff7f8 0%, #fdeaee 100%);
}

.reset-illustration::before,
.reset-illustration::after {
  content: none;
}

.reset-waves {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.reset-hero-logo {
  background: #ffffff;
  border: none;
  box-shadow: 0 14px 34px rgba(179, 18, 59, 0.2);
}

.reset-hero-name {
  text-shadow: none;
}

.reset-illustration .brand-insti {
  color: #a50f33;
}

.reset-illustration .brand-pay {
  color: #f5a30c;
}

.reset-hero-school {
  color: #e29a12;
}

.reset-hero-tagline {
  color: #4b4b57;
}

.reset-title {
  font-weight: 800;
}

.reset-title-accent {
  color: #c8102e;
}

.reset-step {
  min-height: 0;
}

.reset-step .input-wrap input {
  background: #fff9fa;
  border: 1px solid #efd3d9;
  border-radius: 10px;
}

.reset-step .code-input {
  background: #fff9fa;
  border: 1px solid #efd3d9;
  border-radius: 10px;
}

/* Full-width pill with the arrow on the right. */
.reset-send-btn {
  position: relative;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  background: linear-gradient(135deg, #c8102e, #a40f33);
  box-shadow: 0 10px 22px rgba(200, 16, 46, 0.3);
}

.reset-btn-arrow {
  position: absolute;
  right: 1.6rem;
  font-size: 1.15rem;
}

/* A tidy outlined pill under the main button. */
.reset-back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  align-self: stretch;
  width: 100%;
  height: 48px;
  margin-top: 1rem;
  padding: 0 1.4rem;
  border: 1.5px solid #efc9d1;
  border-radius: 999px;
  background: #ffffff;
  color: #c8102e;
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.reset-back:hover {
  background: #fff4f6;
  border-color: #e39aa8;
  color: #a40f33;
}

/* Reset page: the status line only takes up room when it has a message, so
   the gaps between the field, the button and the back button stay even. */
.reset-step .status {
  min-height: 0;
  margin: 0.8rem 0 0;
}

.reset-step .status:empty {
  display: none;
}

.reset-step .reset-send-btn {
  margin-top: 1.5rem;
}

.reset-step .reset-back {
  margin-top: 1.1rem;
}

.reset-step .resend-row {
  margin: 1rem 0 0;
}

/* Even gap between the code boxes and the next label. */
.reset-step .code-inputs {
  margin-bottom: 0;
}

/* Confirm/prompt dialog — replaces window.confirm()/window.prompt(), whose
   native "<host> says" chrome looks like a stray browser warning rather
   than part of the app. */
.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(23, 23, 23, 0.55);
  backdrop-filter: blur(2px);
}

/* .hidden-view is defined earlier in this file with equal specificity, so
   without this it loses to the rule above by source order alone — this
   combined selector outranks both and is what actually keeps the dialog
   hidden until JS removes the class. */
.confirm-overlay.hidden-view {
  display: none;
}

.confirm-dialog {
  width: 100%;
  max-width: 420px;
  background: var(--white);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  animation: confirm-pop 0.15s ease-out;
}

@keyframes confirm-pop {
  from {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.confirm-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.confirm-message {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre-line;
}

.confirm-input {
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.65rem 0.8rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  resize: vertical;
}

.confirm-input:focus {
  outline: none;
  border-color: var(--accent);
}

.confirm-error {
  margin-top: 0.6rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 1.4rem;
}

.confirm-btn {
  border: none;
  border-radius: 8px;
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.confirm-btn--cancel {
  background: #f3f4f6;
  color: #374151;
}

.confirm-btn--cancel:hover {
  background: #e5e7eb;
}

.confirm-btn--ok {
  background: var(--faith-green);
  color: #ffffff;
}

.confirm-btn--ok:hover {
  background: var(--faith-green-dark);
}

/* Destructive confirms (reject/deactivate/retry) use the brand red instead
   of green, so the color itself signals what the action does. */
.confirm-dialog.confirm-dialog--danger .confirm-btn--ok {
  background: var(--accent);
}

.confirm-dialog.confirm-dialog--danger .confirm-btn--ok:hover {
  background: var(--accent-hover);
}

/* Login page: way back to the landing page. */
.home-link {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.home-link:hover {
  text-decoration: underline;
}


/* ---------------------------------------- Add Stall: a floating card */
#addStallForm:not(.hidden-view) {
  position: fixed;
  z-index: 900;
  inset: 0;
  margin: auto;
  width: min(760px, calc(100vw - 2rem));
  height: fit-content;
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(23, 17, 19, 0.28);
  animation: add-stall-pop 0.2s ease;
}

@keyframes add-stall-pop {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.add-stall-backdrop {
  display: none;
}

#addStallForm:not(.hidden-view) + .add-stall-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 899;
  background: rgba(23, 17, 19, 0.38);
}

.add-stall-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.add-stall-head h3 {
  margin: 0;
  font-size: 1.25rem;
}

.stall-modal-close {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #f6f1f2;
  color: #52514e;
  cursor: pointer;
}

.stall-modal-close:hover {
  background: #fdeaec;
  color: #cc0519;
}

.stall-modal-close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

@media (prefers-reduced-motion: reduce) {
  #addStallForm:not(.hidden-view) {
    animation: none;
  }
}
