/* SAIntS ID / badge face — Trade Gothic LT Std Bold Condensed No. 20 */
@font-face {
  font-family: "Trade Gothic LT Std";
  src:
    url("/fonts/TradeGothicLTStd-BdCn20.woff2?v=1") format("woff2"),
    url("/fonts/TradeGothicLTStd-BdCn20.otf?v=1") format("opentype");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

/* ThisCity brand kit + SAIntS crest colours (navy / sky from school logo). */
:root {
  /* ThisCity tokens */
  --tc-orange: #ff9800;
  --tc-orange-dark: #e68900;
  --tc-orange-soft: #fff4e5;
  --tc-text: #1a1a1a;
  --tc-muted: #5c5c5c;
  --tc-line: #e8e8e8;
  --tc-bg: #ffffff;
  --tc-bg-alt: #f7f7f8;
  --tc-dark: #141414;
  --tc-app-bar: #000000;
  --tc-app-bar-divider: #ffffff;
  --tc-radius: 12px;
  --tc-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
  --tc-font: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont,
    "Helvetica Neue", Arial, sans-serif;
  /* Same face as SAIntS badges / ID cards */
  --tc-font-display: "Trade Gothic LT Std", "Arial Narrow", Inter, sans-serif;
  --tc-btn-dark-bg: #1a1a1a;
  --tc-btn-dark-fg: #ffffff;
  --tc-btn-primary-bg: #ff9800;
  --tc-btn-primary-fg: #1a1a1a;
  --tc-btn-height: 44px;

  /* SAIntS crest (sampled from school logo) */
  --saints-navy: #182060;
  --saints-navy-deep: #10143c;
  --saints-sky: #0088c0;
  --saints-gold: #c9a227;

  /* Portal aliases (existing selectors) */
  --brand-orange: var(--tc-orange);
  --brand-orange-dark: var(--tc-orange-dark);
  --brand-black: var(--tc-text);
  --canvas: var(--tc-bg-alt);
  --card: var(--tc-bg);
  --border: rgba(255, 152, 0, 0.22);
  --muted: var(--tc-muted);
  --danger: #b42318;
  --ok: #067647;
  --radius: var(--tc-radius);
  --shadow: var(--tc-shadow);
  --side-w: 220px;
  --font: var(--tc-font);
  --display: var(--tc-font-display);
  /* Overridden per page load by the picker in index.html (cafe-1..3 WebP, JPG fallback). */
  --cafe-photo: url("/img/cafe-1.jpg");
  --cafe-warm: var(--saints-navy-deep);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--brand-black);
  background: var(--canvas);
}

button,
input,
select {
  font: inherit;
}

a {
  color: var(--brand-orange);
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-shell.landing-mode {
  background: #0a0a0a;
}

.app-shell.landing-mode .topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
  border-bottom: none;
  color: rgba(255, 255, 255, 0.88);
}

.app-shell.landing-mode .topbar .brand-name {
  color: var(--tc-orange);
}

.app-shell.landing-mode .topbar .brand-sep {
  color: var(--tc-app-bar-divider);
}

.app-shell.landing-mode .topbar .brand-portal {
  color: #ffffff;
}

.app-shell.landing-mode .body-row {
  flex: 1;
  min-height: 100vh;
}

.app-shell.landing-mode .main {
  max-width: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: var(--tc-app-bar);
  color: #fff;
  border-bottom: 3px solid var(--tc-orange);
  z-index: 20;
}

.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  min-width: 0;
}

.topbar .brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 999px;
  background: #fff;
  padding: 2px;
}

.topbar .brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar .brand-name {
  color: var(--tc-orange);
  font-weight: 800;
}

.topbar .brand-sep {
  color: var(--tc-app-bar-divider);
  font-weight: 500;
  margin: 0 2px;
}

.topbar .brand-portal {
  color: #ffffff;
  font-weight: 600;
}

.topbar .spacer {
  flex: 1;
}

.topbar button.linkish {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.topbar button.linkish:hover {
  border-color: var(--tc-orange);
  color: var(--tc-orange);
}

.topbar .nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.body-row {
  flex: 1;
  display: flex;
  min-height: 0;
  align-items: stretch;
}

.side-nav {
  width: var(--side-w);
  flex-shrink: 0;
  background: var(--tc-dark);
  color: #fff;
  padding: 16px 10px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: none;
  flex-direction: column;
  gap: 4px;
}

.side-nav.visible {
  display: flex;
}

.side-nav .nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 8px 12px 6px;
}

.side-nav button.nav-item {
  appearance: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 10px;
  padding: 11px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
}

.side-nav button.nav-item:hover {
  background: rgba(255, 152, 0, 0.14);
  color: #fff;
}

.side-nav button.nav-item.active {
  background: var(--tc-orange);
  color: var(--tc-btn-primary-fg);
}

.side-nav .nav-foot {
  margin-top: auto;
  padding: 12px 10px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.25;
}

.side-nav .nav-foot img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.side-nav .nav-foot-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.side-nav .nav-foot-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.82);
}

.side-nav .nav-foot-sub {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.4);
}

/* Right-hand branding rail, shown alongside the portal once signed in. */
.side-rail {
  width: 15%;
  min-width: 150px;
  max-width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 14px 16px;
  border-left: 3px solid var(--saints-navy);
  background-color: var(--cafe-warm);
  background-image:
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.55) 0%,
      rgba(10, 10, 10, 0.42) 45%,
      rgba(10, 10, 10, 0.86) 100%
    ),
    var(--cafe-photo);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.side-rail-crest-box {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  overflow: hidden;
}

.side-rail-crest {
  display: block;
  /* min-height:0 stops the image's intrinsic size stretching the square box. */
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ---- Designed loading / signing-in screen ---- */

/* Full-bleed: the progress screen ignores the 920px content column. */
.main.loading-mode {
  max-width: none;
  margin: 0;
  padding: 0;
}

.loading-screen {
  position: relative;
  isolation: isolate;
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 32px 20px;
  color: #fff;
  background-color: var(--cafe-warm);
  background-image:
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.62) 0%,
      rgba(10, 10, 10, 0.72) 55%,
      rgba(10, 10, 10, 0.9) 100%
    ),
    var(--cafe-photo);
  background-size: cover;
  background-position: center;
}

.loading-card {
  width: 100%;
  max-width: 420px;
  text-align: center;
  animation: landing-rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.loading-crest {
  width: 84px;
  height: 84px;
  object-fit: contain;
  background: #fff;
  border-radius: 18px;
  padding: 9px;
  margin-bottom: 18px;
}

.loading-title {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: #fff;
}

.loading-lead {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.96rem;
  line-height: 1.55;
}

.loading-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
  margin-bottom: 22px;
}

.loading-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--saints-navy) 0%,
    var(--saints-sky) 45%,
    var(--tc-orange) 100%
  );
  animation: loading-slide 1.25s ease-in-out infinite;
}

@keyframes loading-slide {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(280%);
  }
}

.loading-steps {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.loading-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

.loading-steps li.done {
  color: rgba(255, 255, 255, 0.9);
}

.loading-steps li.active {
  color: #fff;
  font-weight: 600;
}

.loading-dot {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.loading-steps li.done .loading-dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.loading-steps li.active .loading-dot {
  border-color: var(--brand-orange);
  border-top-color: transparent;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-foot {
  margin: 26px 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .loading-bar span,
  .loading-steps li.active .loading-dot,
  .loading-card {
    animation: none;
  }
}

.main {
  flex: 1;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  min-width: 0;
}

.main.with-nav {
  max-width: none;
  margin: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--tc-line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}

.card h2,
.card h3 {
  margin: 0 0 12px;
  color: var(--saints-navy);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
}

.org-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.org-header img {
  width: 56px;
  height: 56px;
  border-radius: 0;
  object-fit: contain;
  border: none;
  box-shadow: none;
  background: transparent;
}

.org-header .org-fallback {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--brand-orange);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--brand-orange);
  background: #fff;
}

.org-header .org-name {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0;
  color: var(--brand-black);
}

.muted {
  color: var(--muted);
  font-size: 0.92rem;
}

.balance-xl {
  font-size: 2rem;
  font-weight: 800;
  margin: 4px 0 0;
}

.student-home-hero {
  margin-top: 0;
}

.student-home-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.student-self-card .student-photo-slot {
  margin: 0 auto 12px;
}

.student-self-photo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.student-photo-upload .photo-preview img {
  max-width: 160px;
  border-radius: 12px;
}

.student-connect-layout {
  margin-top: 0;
}

.student-connect-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.student-topup-card .section-head {
  margin: 16px 0 8px;
  font-size: 0.95rem;
}

.amount-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pay-grid-compact {
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .pay-grid-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .student-connect-layout {
    grid-template-columns: 1fr;
  }
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.home-layout-single {
  grid-template-columns: 1fr;
}

.home-main {
  min-width: 0;
}

.home-family-panel {
  position: sticky;
  top: 12px;
}

.home-family-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.home-family-head h2 {
  margin: 0;
}

.family-student-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.family-student-card {
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.family-student-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.family-student-info {
  flex: 1;
  min-width: 0;
}

.family-student-balance {
  margin-top: 8px;
  font-size: 1.05rem;
}

.family-student-foot {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.family-student-card .move-panel {
  width: 100%;
  margin-top: 10px;
}

.family-student-card .access-row {
  justify-content: flex-start;
  margin-top: 10px;
}

@media (max-width: 520px) {
  .family-student-foot {
    grid-template-columns: 1fr;
  }
}

.student-photo-slot {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: var(--tc-bg-alt);
  padding: 0;
  display: grid;
  place-items: center;
  cursor: default;
}

button.student-photo-slot {
  cursor: pointer;
  font: inherit;
  color: inherit;
}

button.student-photo-slot:hover {
  border-color: rgba(11, 42, 74, 0.35);
}

.student-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.student-photo-missing {
  background: rgba(249, 115, 22, 0.08);
  border-color: rgba(249, 115, 22, 0.28);
}

.student-photo-placeholder {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #c2410c;
  text-align: center;
  line-height: 1.25;
  padding: 6px;
}

@media (max-width: 960px) {
  .home-layout {
    grid-template-columns: 1fr;
  }

  .home-family-panel {
    position: static;
  }
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.stat-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.stat-tile .label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 6px;
}

.stat-tile .value {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0;
}

.grid-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--tc-radius);
  min-height: var(--tc-btn-height);
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  background: var(--tc-btn-primary-bg);
  color: var(--tc-btn-primary-fg);
  -webkit-text-fill-color: var(--tc-btn-primary-fg);
  transition: background 0.15s ease;
}

.btn:hover:not(:disabled) {
  background: var(--tc-orange-dark);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn.secondary {
  background: #fff;
  color: var(--tc-text);
  -webkit-text-fill-color: var(--tc-text);
  border: 1px solid var(--tc-line);
}

.btn.secondary:hover:not(:disabled) {
  background: var(--tc-bg-alt);
}

.btn.ghost {
  background: transparent;
  color: var(--tc-text);
  -webkit-text-fill-color: var(--tc-text);
  border: 1px solid var(--tc-line);
}

.btn.dark,
.btn.btn-dark {
  background: var(--tc-btn-dark-bg);
  color: var(--tc-btn-dark-fg);
  -webkit-text-fill-color: var(--tc-btn-dark-fg);
}

.btn.dark:hover:not(:disabled),
.btn.btn-dark:hover:not(:disabled) {
  background: #000000;
  color: var(--tc-btn-dark-fg);
  -webkit-text-fill-color: var(--tc-btn-dark-fg);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
}

.field input,
.field select {
  border: 1px solid var(--tc-line);
  border-radius: var(--tc-radius);
  padding: 11px 12px;
  background: #fff;
  color: var(--brand-black);
  -webkit-text-fill-color: var(--brand-black);
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--brand-orange);
  outline-offset: 1px;
}

.student-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.student-row:first-of-type {
  border-top: none;
}

.list-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
}

.list-row:hover {
  background: rgba(255, 152, 0, 0.04);
}

.banner {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  font-size: 0.92rem;
}

.banner.error {
  background: #fef3f2;
  color: var(--danger);
}

.banner.ok {
  background: #ecfdf3;
  color: var(--ok);
}

.banner.warn {
  background: #fff7ed;
  color: #9a3412;
  border: 1px solid rgba(154, 52, 18, 0.22);
}

.online-ordering-closed {
  margin: 12px 0 16px;
  font-weight: 600;
  line-height: 1.45;
}

/* —— ThisCity landing (SAIntS Cafe portal) —— */
.landing {
  min-height: 100vh;
  color: #fff;
  position: relative;
}

.landing-hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(88px, 14vh, 120px) clamp(20px, 5vw, 56px)
    clamp(36px, 6vh, 64px);
  overflow: hidden;
  background-color: #0a0a0a;
  background-image:
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.45) 0%,
      rgba(10, 10, 10, 0.55) 40%,
      rgba(10, 10, 10, 0.88) 100%
    ),
    var(--cafe-photo);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(
      ellipse 55% 45% at 18% 22%,
      rgba(24, 32, 96, 0.42),
      transparent 60%
    ),
    radial-gradient(
      ellipse 70% 50% at 82% 16%,
      rgba(255, 152, 0, 0.2),
      transparent 58%
    );
  pointer-events: none;
  animation: landing-glow 9s ease-in-out infinite alternate;
}

.landing-hero::after {
  display: none;
}

.landing-visual {
  display: none;
}

.landing-copy {
  max-width: 38rem;
  animation: landing-rise 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.landing-brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.landing-crest {
  width: clamp(64px, 12vw, 88px);
  height: clamp(64px, 12vw, 88px);
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 12px;
  background: #fff;
  padding: 6px;
}

.landing-crest-fallback {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--brand-black);
  letter-spacing: 0.04em;
}

.landing-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--saints-sky);
}

.landing-brand {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 9vw, 4.75rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #fff;
  text-shadow: 0 2px 24px rgba(16, 20, 60, 0.35);
}

.landing-product {
  margin: 10px 0 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.92);
}

.landing-lead {
  margin: 18px 0 0;
  max-width: 28rem;
  font-size: clamp(1.05rem, 2.4vw, 1.2rem);
  font-weight: 400;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 18px;
  margin-top: 28px;
  animation: landing-rise 0.95s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.landing-actions .btn {
  background: var(--tc-btn-primary-bg);
  color: var(--tc-btn-primary-fg);
  -webkit-text-fill-color: var(--tc-btn-primary-fg);
  padding: 14px 22px;
  font-size: 1rem;
  border-radius: 999px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.landing-actions .btn:hover:not(:disabled) {
  background: var(--tc-orange-dark);
  transform: translateY(-2px);
}

.landing-actions .btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.landing-powered {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.48);
}

.landing-hint {
  margin: 0;
  max-width: 22rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
}

.landing-powered strong {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.landing-flash {
  margin-top: 18px;
  max-width: 28rem;
}

.landing-next {
  background: var(--canvas);
  color: var(--brand-black);
  padding: clamp(40px, 7vw, 72px) clamp(20px, 5vw, 56px);
}

.landing-next-inner {
  max-width: 920px;
  margin: 0 auto;
}

.landing-next h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  font-weight: 700;
  color: var(--brand-black);
}

.landing-next > .landing-next-inner > p {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 36rem;
  line-height: 1.5;
}

.landing-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 4vw, 40px);
}

.landing-points h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--saints-navy);
}

.landing-product-org {
  display: block;
  margin-top: 4px;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0;
}

.landing-points p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}

.site-footer {
  background: var(--tc-dark);
  color: rgba(255, 255, 255, 0.78);
  padding: clamp(28px, 5vw, 40px) clamp(20px, 5vw, 56px) 20px;
  border-top: 3px solid var(--tc-orange);
}

.site-footer-inner {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: start;
}

.site-footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.site-footer-brand img.site-footer-tc {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 2px;
}

.site-footer-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.site-footer-copy {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.62);
  max-width: 36rem;
}

.site-footer-mra {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.site-footer-mra img {
  width: 48px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  background: #fff;
  border-radius: 6px;
  padding: 3px;
}

.site-footer-mra span {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.site-footer-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer-label {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-orange);
}

.site-footer-contact a,
.site-footer-contact button.linkish {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.site-footer-contact button.linkish {
  display: block;
  width: fit-content;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.site-footer-contact a:hover,
.site-footer-contact button.linkish:hover {
  color: var(--brand-orange);
}

.site-footer-powered {
  max-width: 920px;
  margin: 28px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 720px) {
  .site-footer-inner {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@keyframes landing-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes landing-mark {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 0.18;
    transform: scale(1);
  }
}

@keyframes landing-glow {
  from {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.7;
  }
  to {
    transform: translate3d(-4%, 6%, 0) scale(1.08);
    opacity: 1;
  }
}

@keyframes landing-grain {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 120px 80px;
  }
}

@media (max-width: 760px) {
  .landing-points {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-copy,
  .landing-actions,
  .landing-hero::before {
    animation: none !important;
  }
}

.hidden {
  display: none !important;
}

.role-pick,
.pref-pick {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin: 16px 0 8px;
}

/* ---- Guided onboarding (photo left, instructions right) ---- */
/* Typography: Outfit display headings, Inter body (ThisCity brand kit). */

.main.onboarding {
  max-width: 1140px;
  padding: 24px 16px 40px;
  font-family: var(--font);
}

.onboard {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-family: var(--font);
}

.onboard-visual {
  display: none;
  position: relative;
  min-height: 320px;
  background-color: var(--cafe-warm);
  background-image:
    linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.35) 0%,
      rgba(10, 10, 10, 0.55) 55%,
      rgba(10, 10, 10, 0.85) 100%
    ),
    var(--cafe-photo);
  background-size: cover;
  background-position: center;
}

.onboard-visual-copy {
  position: absolute;
  inset: auto 0 0 0;
  padding: 28px 26px;
  color: #fff;
}

.onboard-visual-crest {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: #fff;
  border-radius: 12px;
  padding: 5px;
  margin-bottom: 12px;
}

.onboard-visual-title {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0 0 4px;
}

.onboard-visual-sub {
  margin: 0;
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.45;
}

.onboard-panel-inner {
  padding: 26px 24px 28px;
  font-family: var(--font);
}

.onboard-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-family: var(--font);
}

.onboard-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.onboard-step-num {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-family: var(--font);
  font-size: 0.75rem;
  font-weight: 700;
  border: 1.5px solid rgba(0, 0, 0, 0.16);
  background: #fff;
}

.onboard-steps li.current {
  color: var(--brand-black);
  font-weight: 600;
}

.onboard-steps li.current .onboard-step-num {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #fff;
}

.onboard-steps li.done .onboard-step-num {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.onboard-kicker {
  margin: 0 0 6px;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-orange);
}

.onboard-title {
  font-family: var(--display);
  font-size: clamp(1.45rem, 3.2vw, 1.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--brand-black);
  margin: 0 0 10px;
}

.onboard-lead {
  margin: 0 0 18px;
  font-family: var(--font);
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.5;
}

.onboard-lead strong {
  color: var(--brand-black);
  font-weight: 600;
}

.onboard-reassure {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.45;
}

.onboard-choices {
  margin-top: 4px;
}

.onboard-choice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px;
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--brand-black);
  cursor: pointer;
  font-family: var(--font);
  font-size: inherit;
}

.onboard-choice:hover:not(:disabled),
.onboard-choice:focus-visible {
  border-color: var(--brand-orange);
  background: rgba(255, 152, 0, 0.05);
  outline: none;
}

.onboard-choice:disabled {
  opacity: 0.6;
  cursor: default;
}

.onboard-choice-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.onboard-choice-copy strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.onboard-choice-copy span {
  display: block;
  font-family: var(--font);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.45;
}

.field-help {
  margin: 0;
  font-family: var(--font);
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.onboard .field label,
.onboard .pref-option,
.onboard .btn {
  font-family: var(--font);
}

.onboard .pref-option strong {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

@media (min-width: 900px) {
  .onboard {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    align-items: stretch;
  }

  .onboard-visual {
    display: block;
  }

  .onboard-panel-inner {
    padding: 34px 34px 36px;
  }
}

.pref-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(0, 0, 0, 0.1);
  background: #fff;
  color: var(--brand-black);
  cursor: pointer;
  font: inherit;
}

.pref-option strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 4px;
}

.pref-option span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.pref-option.selected {
  border-color: var(--brand-orange);
  background: rgba(255, 152, 0, 0.06);
}

.pref-option:focus {
  outline: 2px solid var(--brand-orange);
  outline-offset: 2px;
}

.auth-code {
  margin-top: 12px;
  padding: 16px 18px;
  text-align: center;
  letter-spacing: 0.28em;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--brand-black);
  background: rgba(255, 152, 0, 0.08);
  border: 1px dashed rgba(255, 152, 0, 0.45);
  border-radius: var(--radius);
}

.profile-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.profile-card-top h2 {
  margin: 0 0 4px;
}

.profile-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.profile-details span {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.receipt pre {
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85rem;
  background: #faf7f2;
  padding: 12px;
  border-radius: 10px;
}

.shop-results-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.shop-results-row p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.menu-card {
  overflow: hidden;
}

.menu-layout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 8px;
}

.menu-cat-rail {
  width: 168px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: 12px;
  background: var(--tc-dark);
  color: #fff;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

.menu-cat-label {
  margin: 0 0 6px;
  padding: 4px 8px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.menu-cat-item {
  appearance: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
}

.menu-cat-item:hover {
  background: rgba(255, 152, 0, 0.14);
  color: #fff;
}

.menu-cat-item.active {
  background: var(--brand-orange);
  color: #fff;
}

.menu-products {
  flex: 1;
  min-width: 0;
}

.menu-search-wrap {
  margin-bottom: 12px;
}

.menu-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 1rem;
  background: #fff;
  color: var(--tc-text);
}

.menu-search:focus {
  outline: 2px solid rgba(255, 152, 0, 0.35);
  border-color: var(--brand-orange);
}

.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;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.shop-tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.85rem;
  background: #ffffff;
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.shop-tile:hover {
  border-color: rgba(255, 152, 0, 0.4);
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
}

.shop-tile-media {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  overflow: hidden;
  /* Fixed square box + soft placeholder so tiles never shift while images load. */
  background: linear-gradient(135deg, #f3efe8 0%, #ece6dc 100%);
}

.shop-tile-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-tile-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--brand-orange);
  background: rgba(255, 152, 0, 0.08);
}

.shop-tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
  padding: 0.7rem 0.8rem 0.8rem;
}

.shop-tile-price {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand-black);
}

.shop-tile-name {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  color: #374151;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-tile-desc {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shop-tile-note {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--brand-orange);
}

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

@media (max-width: 860px) {
  .topbar .nav-toggle {
    display: inline-flex;
  }

  .topbar .brand-portal {
    font-size: 0.92rem;
  }

  .body-row {
    flex-direction: column;
  }

  .side-nav {
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 8px;
    gap: 6px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    -webkit-overflow-scrolling: touch;
  }

  .side-nav:not(.visible) {
    display: none;
  }

  .side-nav.visible {
    display: flex;
  }

  .side-nav .nav-label,
  .side-nav .nav-foot {
    display: none;
  }

  /* Phones: the rail would eat the content width. */
  .side-rail {
    display: none !important;
  }

  .side-nav button.nav-item {
    width: auto;
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 14px;
  }

  .menu-layout {
    flex-direction: column;
    gap: 12px;
  }

  .menu-cat-rail {
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    position: static;
    max-height: none;
    gap: 6px;
    padding: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .menu-cat-label {
    display: none;
  }

  .menu-cat-item {
    width: auto;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .main {
    padding: 16px 12px 40px;
  }
}

@media (min-width: 861px) {
  .side-nav.visible {
    display: flex;
  }
}

@media print {
  .topbar,
  .side-nav,
  .side-rail,
  .no-print,
  .nav-toggle {
    display: none !important;
  }
  .main {
    width: 100%;
    max-width: none;
    padding: 0;
  }
  .card {
    box-shadow: none;
    border: none;
  }
}


/* Family / temporary Tap card */
.student-row-rich {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}
.student-main { flex: 1; min-width: 0; }
.student-side { text-align: right; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  font-size: 12px;
  font-weight: 600;
}
.chip.ok { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.chip.warn { background: rgba(249, 115, 22, 0.12); color: #c2410c; }
.mini-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 8px; flex-wrap: wrap; }

/* Statement person tabs (children first, account holder last) */
.statement-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.statement-tab {
  flex: 0 0 auto;
  border: 1px solid rgba(11, 42, 74, 0.18);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--saints-navy);
  cursor: pointer;
  white-space: nowrap;
}
.statement-tab:hover { background: rgba(11, 42, 74, 0.06); }
.statement-tab.on {
  background: var(--saints-navy);
  border-color: var(--saints-navy);
  color: #fff;
}

/* Per-child spending permission (own balance vs family wallet) */
.access-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 10px;
  flex-wrap: wrap;
}
.access-label { font-size: 12px; font-weight: 600; color: rgba(17, 17, 17, 0.6); }
.seg-group {
  display: inline-flex;
  border: 1px solid rgba(11, 42, 74, 0.2);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}
.seg {
  border: 0;
  background: none;
  padding: 6px 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--saints-navy);
  cursor: pointer;
}
.seg + .seg { border-left: 1px solid rgba(11, 42, 74, 0.15); }
.seg.on { background: var(--saints-navy); color: #fff; }
.seg:disabled { opacity: 0.6; cursor: default; }

/* Inline "move credit" panel on a child's row */
.student-side { min-width: 0; }
.move-panel {
  margin-top: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(11, 42, 74, 0.05);
  border: 1px solid rgba(11, 42, 74, 0.12);
  text-align: left;
  width: min(320px, 100%);
}
.move-panel label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--saints-navy);
  margin-bottom: 6px;
}
.move-row { display: flex; gap: 8px; }
.move-row input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  font-size: 16px;
  font-weight: 600;
}
.move-row .btn { padding: 10px 18px; }
.move-quick { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.chip-btn {
  border: 1px solid rgba(11, 42, 74, 0.2);
  background: #fff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--saints-navy);
  cursor: pointer;
}
.chip-btn:hover { background: rgba(11, 42, 74, 0.08); }
.move-hint { font-size: 12px; margin: 8px 0 0; }
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--saints-navy);
  text-decoration: underline;
  cursor: pointer;
}
@media (max-width: 640px) {
  .student-row-rich { flex-direction: column; }
  .student-side { text-align: left; width: 100%; }
  .mini-actions { justify-content: flex-start; }
  .access-row { justify-content: flex-start; }
  .move-panel { width: 100%; }
}
.photo-preview {
  min-height: 160px;
  border-radius: 16px;
  border: 1px dashed rgba(17, 17, 17, 0.18);
  display: grid;
  place-items: center;
  overflow: hidden;
  margin: 12px 0 18px;
  background: var(--tc-bg-alt);
}
.photo-preview img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.temp-card-sheet {
  display: flex;
  justify-content: center;
  padding: 12px 0 28px;
}
.temp-card {
  width: min(100%, 420px);
  aspect-ratio: 1.6 / 1;
  border-radius: 18px;
  padding: 18px 20px;
  color: var(--saints-navy);
  background: #fff;
  border: 1px solid rgba(11, 42, 74, 0.14);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.temp-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.temp-card-crest {
  width: 46px;
  height: 46px;
  object-fit: contain;
  flex-shrink: 0;
}
.temp-card-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.temp-card-brand strong {
  font-size: 13px;
  font-weight: 700;
  color: var(--saints-navy);
  line-height: 1.25;
}
.temp-card-brand span {
  font-size: 11px;
  color: rgba(11, 42, 74, 0.6);
}
.temp-card-body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.temp-card-photo {
  width: 62px;
  height: 74px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(11, 42, 74, 0.18);
  background: #f1f4f8;
}
.temp-card-photo-empty {
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  color: rgba(11, 42, 74, 0.35);
}
.temp-card-body-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.temp-card-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}
.temp-card-qr img {
  width: 74px;
  height: 74px;
  display: block;
  image-rendering: pixelated;
}
.temp-card-qr-hint {
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(11, 42, 74, 0.5);
}
.temp-card-name {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--saints-navy);
  line-height: 1.15;
  /* Long names must not push the footer into the photo/QR row. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.temp-card-code {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.16em;
  font-variant-numeric: tabular-nums;
  color: var(--saints-navy);
}
.temp-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.temp-card-meta {
  font-size: 11px;
  line-height: 1.35;
  color: rgba(11, 42, 74, 0.62);
  max-width: 24ch;
}
.temp-card-powered {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.temp-card-powered img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}
.temp-card-powered > span {
  display: flex;
  flex-direction: column;
  font-size: 8px;
  line-height: 1.15;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(11, 42, 74, 0.55);
}
.temp-card-powered strong {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  color: var(--saints-navy);
}
@media print {
  .temp-card-sheet { padding: 0; }
  .temp-card {
    box-shadow: none;
    width: 85mm;
    height: 54mm;
    padding: 14px 16px;
    border: 1px solid rgba(11, 42, 74, 0.3);
  }
  /* Card stock is narrower than the screen card — scale the type to match. */
  .temp-card-crest { width: 38px; height: 38px; }
  .temp-card-brand strong { font-size: 10.5px; }
  .temp-card-brand span { font-size: 9px; }
  .temp-card-name { font-size: 18px; }
  .temp-card-code { font-size: 28px; letter-spacing: 0.12em; }
  .temp-card-meta { font-size: 9px; max-width: 20ch; }
  .temp-card-qr img { width: 56px; height: 56px; }
  .temp-card-photo { width: 50px; height: 60px; }
  /* Keep the white card and navy ink when printers strip backgrounds. */
  .temp-card,
  .temp-card * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}


/* Financial ledger statement */
.ledger-wrap {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 16px 8px;
  overflow: hidden;
}
.ledger-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.ledger-toolbar h2 {
  margin: 0 0 4px;
  color: var(--brand-orange);
  font-size: 1.05rem;
}
.ledger-toolbar .muted {
  margin: 0;
}
.ledger-scroll {
  overflow-x: auto;
  margin: 0 -4px;
}
.ledger-more {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
.ledger-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  min-width: 640px;
}
.ledger-table th,
.ledger-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  text-align: left;
  vertical-align: top;
}
.ledger-table thead th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  border-bottom: 2px solid rgba(17, 17, 17, 0.16);
  background: #faf7f2;
  position: sticky;
  top: 0;
}
.ledger-table th.num,
.ledger-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ledger-row {
  cursor: pointer;
}
.ledger-row:hover,
.ledger-row:focus {
  background: rgba(255, 152, 0, 0.06);
  outline: none;
}
.ledger-date {
  white-space: nowrap;
  color: #3f3f46;
  font-size: 0.88rem;
}
.ledger-account {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.06);
  font-size: 0.75rem;
  font-weight: 700;
}
.ledger-desc {
  font-weight: 600;
  color: var(--brand-black);
}
.ledger-ref {
  font-size: 0.78rem;
  margin-top: 2px;
}
.ledger-table td.debit {
  color: #b91c1c;
}
.ledger-table td.credit {
  color: #15803d;
}
.receipt-card .receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}
.receipt-card .receipt-head h2 {
  margin: 0;
}
.receipt-amount {
  font-size: 1.4rem;
  font-weight: 800;
}
.receipt-meta {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 14px;
}
.receipt-meta th,
.receipt-meta td {
  padding: 8px 0;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  text-align: left;
  vertical-align: top;
}
.receipt-meta th {
  width: 34%;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
}
.receipt-lines {
  min-width: 0;
}

.receipt-card-pos {
  padding-top: 18px;
}

.pos-receipt-wrap {
  display: flex;
  justify-content: center;
  margin: 8px 0 4px;
}

.pos-receipt-ticket {
  width: min(100%, 380px);
  background: #fff;
  color: var(--tc-text);
  border: 1px dashed rgba(17, 17, 17, 0.22);
  border-radius: 8px;
  padding: 18px 16px 14px;
  font-size: 0.92rem;
  line-height: 1.35;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.pos-receipt-logo {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin: 0 auto 10px;
}

.pos-receipt-banner,
.pos-receipt-org,
.pos-receipt-customer {
  text-align: center;
  margin: 0;
}

.pos-receipt-banner {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.pos-receipt-org {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.pos-receipt-customer {
  font-weight: 700;
  margin-bottom: 2px;
}

.pos-receipt-meta-line {
  text-align: center;
  margin: 0;
  font-size: 0.82rem;
  color: #444;
}

.pos-receipt-divider {
  border-top: 1px dashed rgba(17, 17, 17, 0.25);
  margin: 10px 0;
}

.pos-receipt-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

.pos-receipt-items th,
.pos-receipt-items td {
  padding: 5px 0;
  vertical-align: top;
  text-align: left;
}

.pos-receipt-items th.qty,
.pos-receipt-items td.qty {
  width: 2.2rem;
  text-align: center;
}

.pos-receipt-items th.amt,
.pos-receipt-items td.amt {
  width: 5.5rem;
  text-align: right;
  white-space: nowrap;
}

.pos-receipt-items thead th {
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #666;
  border-bottom: 1px solid rgba(17, 17, 17, 0.12);
}

.pos-receipt-item-name {
  display: block;
  font-weight: 700;
}

.pos-receipt-item-opt {
  display: block;
  font-size: 0.78rem;
  color: #666;
}

.pos-receipt-totals,
.pos-receipt-balance {
  display: grid;
  gap: 4px;
}

.pos-receipt-total-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.pos-receipt-total-row.grand {
  font-weight: 800;
  font-size: 1rem;
  margin-top: 2px;
}

.pos-receipt-thanks {
  text-align: center;
  margin: 12px 0 0;
  font-weight: 700;
}

@media print {
  .ledger-toolbar .grid-actions,
  .no-print {
    display: none !important;
  }
  .ledger-wrap,
  .receipt-card {
    box-shadow: none;
    border: none;
  }
  .receipt-card-pos {
    padding: 0;
    border: none;
    box-shadow: none;
  }
  .pos-receipt-wrap {
    margin: 0;
  }
  .pos-receipt-ticket {
    width: 100%;
    max-width: 80mm;
    border: none;
    box-shadow: none;
    padding: 0;
  }
}

/* ---- Enrol explainer + top-up redesign ---- */

.explain-list {
  list-style: none;
  counter-reset: explain;
  margin: 18px 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.explain-list li {
  counter-increment: explain;
  position: relative;
  padding-left: 44px;
}

.explain-list li::before {
  content: counter(explain);
  position: absolute;
  left: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--saints-navy);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.explain-list strong {
  display: block;
  color: var(--saints-navy);
}

.explain-list span {
  color: var(--muted);
  font-size: 0.94rem;
}

.section-head {
  margin: 22px 0 10px;
  font-size: 1rem;
  color: var(--saints-navy);
}

.amount-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.amount-chip {
  padding: 14px 8px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-weight: 700;
  font-size: 1rem;
  color: var(--saints-navy);
  cursor: pointer;
}

.amount-chip:hover {
  border-color: var(--saints-navy);
}

.amount-chip.selected {
  background: var(--saints-navy);
  border-color: var(--saints-navy);
  color: #fff;
}

.pay-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 6px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .pay-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.pay-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 16px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  text-align: center;
}

.pay-card:hover {
  border-color: var(--saints-navy);
}

.pay-card.selected {
  border-color: var(--saints-navy);
  box-shadow: 0 0 0 3px rgba(11, 42, 74, 0.12);
}

.pay-card-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
}

.pay-logo-svg {
  display: block;
  width: min(100%, 120px);
  height: auto;
}

.pay-card-title {
  display: block;
  font-size: 0.95rem;
  color: var(--saints-navy);
  line-height: 1.25;
}

.pay-card-note {
  display: block;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--muted);
}

.pay-brand {
  flex: 0 0 auto;
  min-width: 84px;
  padding: 10px 8px;
  border-radius: 10px;
  text-align: center;
  font-weight: 800;
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: #fff;
}

.pay-brand-airtel {
  background: #e40000;
}

.pay-brand-tnm {
  background: #ffcc00;
  color: #10243f;
}

.pay-brand-khusapay {
  background: #0b2a4a;
}

.pay-body {
  flex: 1 1 auto;
  display: grid;
  gap: 2px;
}

.pay-body strong {
  color: var(--saints-navy);
}

.pay-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  color: var(--saints-navy);
}

.pay-explain {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(11, 42, 74, 0.05);
}

.phone-saved {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: #fff;
}

.topup-progress {
  text-align: center;
}

.topup-progress .explain-list {
  text-align: left;
  max-width: 420px;
  margin: 18px auto;
}

.topup-progress .lead {
  font-size: 1.05rem;
}

.spinner {
  width: 44px;
  height: 44px;
  margin: 4px auto 12px;
  border-radius: 50%;
  border: 4px solid rgba(11, 42, 74, 0.15);
  border-top-color: var(--saints-navy);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.done-tick {
  width: 56px;
  height: 56px;
  margin: 4px auto 12px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 1.9rem;
  line-height: 56px;
}

@media (max-width: 520px) {
  .amount-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── Cafe order UX ───────────────────────────────────────────────────────── */

.menu-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.menu-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.menu-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-basket {
  background: var(--brand-orange);
  color: #fff;
  border: none;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(255, 152, 0, 0.28);
}

.menu-pickup-pill,
.basket-pickup-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 152, 0, 0.12);
  color: #9a3412;
  font-size: 0.85rem;
  font-weight: 700;
}

.shop-grid-order {
  align-items: stretch;
}

.shop-tile-order {
  min-height: 100%;
  height: 100%;
}

.shop-tile-media-logo {
  background: #ffffff;
}

.shop-tile-logo-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #ffffff;
}

/* Override .shop-tile-media img (cover / full-bleed) for logo placeholders. */
.shop-tile-media .shop-tile-logo {
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  max-width: 60%;
  max-height: 60%;
  object-fit: contain;
  display: block;
}

.shop-tile-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shop-tile-body {
  justify-content: flex-start;
}

.shop-tile-actions {
  margin-top: auto;
  padding-top: 0.55rem;
}

.cart-tile-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.qty-control,
.qty-control-modern {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: #f8f8f8;
  overflow: hidden;
  flex: 0 0 auto;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-black);
  cursor: pointer;
  line-height: 1;
}

.qty-btn:hover {
  background: rgba(255, 152, 0, 0.12);
  color: var(--brand-orange);
}

.qty-val {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
}

.btn-add-cart {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
}

.order-wizard {
  max-width: 560px;
  padding: 8px 0 20px;
}

.order-wizard-step {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-orange);
}

.order-wizard-title {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.order-day-grid,
.order-meal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.order-day-chip,
.order-meal-chip {
  border: 1.5px solid rgba(17, 17, 17, 0.12);
  border-radius: 14px;
  background: #fff;
  padding: 14px 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.order-day-chip:hover,
.order-meal-chip:hover,
.order-day-chip.selected,
.order-meal-chip.selected {
  border-color: var(--brand-orange);
  box-shadow: 0 8px 20px rgba(255, 152, 0, 0.12);
}

.order-meal-chip {
  display: grid;
  gap: 4px;
}

.order-meal-chip strong {
  font-size: 1.05rem;
}

.order-meal-chip span {
  font-size: 0.82rem;
  color: var(--muted);
}

.order-wizard-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.order-date-field {
  margin-bottom: 8px;
}

.basket-card {
  max-width: none;
}

.basket-layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 3fr);
  gap: 20px;
  align-items: start;
  margin-top: 8px;
}

.basket-items-panel {
  min-width: 0;
}

.basket-card .cart-items {
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 14px;
  background: #fff;
}

.cart-item-thumb {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #f3efe8;
  display: block;
}

.cart-item-thumb-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.06);
  padding: 0;
}

.cart-item-thumb-logo img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  display: block;
}

.cart-item-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: var(--brand-orange);
  background: rgba(255, 152, 0, 0.08);
}

.cart-item-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.cart-item-name {
  font-weight: 700;
}

.cart-item-price {
  font-weight: 800;
  white-space: nowrap;
}

.cart-total {
  font-size: 1.15rem;
  margin: 0 0 8px;
}

.cart-step-label {
  margin: 8px 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.cart-checkout-panel {
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 152, 0, 0.22);
  background: rgba(255, 152, 0, 0.05);
  display: grid;
  gap: 12px;
  position: sticky;
  top: 12px;
}

.cart-balance-note {
  display: grid;
  gap: 8px;
}

.cart-balance-note > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.btn-pay {
  width: 100%;
  font-weight: 800;
}

.btn-pay:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cart-pay-hint {
  margin: 0;
  font-size: 0.85rem;
}

.cart-pay-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cart-pay-divider::before,
.cart-pay-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(17, 17, 17, 0.12);
}

.order-success-card {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.order-success-icon {
  width: 64px;
  height: 64px;
  margin: 8px auto 12px;
  border-radius: 50%;
  background: var(--ok);
  color: #fff;
  font-size: 2rem;
  line-height: 64px;
}

.order-code-display {
  margin: 18px auto;
  padding: 18px 22px;
  border-radius: 18px;
  background: var(--tc-dark);
  color: #fff;
  font-size: clamp(1.8rem, 6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.14em;
  max-width: 320px;
}

.order-success-actions {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.open-orders-card {
  margin-bottom: 16px;
}

.open-orders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.open-orders-head h3 {
  margin: 0;
}

.open-orders-list {
  display: grid;
  gap: 8px;
}

.open-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.03);
}

.open-order-code {
  letter-spacing: 0.06em;
}

.order-list-status {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(11, 42, 74, 0.08);
}

.order-list-status.status-ready {
  background: rgba(22, 163, 74, 0.15);
  color: #166534;
}

.order-list-status.status-accepted,
.order-list-status.status-pending {
  background: rgba(255, 152, 0, 0.14);
  color: #9a3412;
}

.student-self-card-setup {
  border: 1.5px dashed rgba(255, 152, 0, 0.45);
  background: linear-gradient(180deg, #fff7f3 0%, #ffffff 70%);
}

.temp-card-preview-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.temp-card-preview-crest {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
}

.temp-card-preview-crest img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#cart-topup-mount .student-topup-card {
  margin: 0;
  border: none;
  padding: 0;
  box-shadow: none;
  background: transparent;
}

#cart-topup-mount .student-topup-card h3 {
  font-size: 1rem;
  margin: 0 0 6px;
}

.basket-topup-card .basket-topup-summary {
  margin: 12px 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(17, 17, 17, 0.03);
}

.cart-checkout-panel .btn.secondary {
  width: 100%;
}

@media (max-width: 900px) {
  .basket-layout {
    grid-template-columns: 1fr;
  }

  .cart-checkout-panel {
    position: static;
  }
}

@media (max-width: 560px) {
  .cart-item {
    grid-template-columns: 56px minmax(0, 1fr) auto;
  }

  .cart-item-thumb {
    width: 56px;
    height: 56px;
  }

  .cart-item-price {
    grid-column: 3;
    grid-row: 1;
  }

  .cart-item-qty {
    grid-column: 2 / -1;
  }
}

