html {
  font-size: 14px;
}

:root {
  /* ── Brand tokens (overridable per workspace in V12-S7) ─────────────── */
  --qip-ink: #152137;
  --qip-slate: #5f6f92;
  --qip-muted: #9aa3b2;
  --qip-surface: #ffffff;
  --qip-surface-soft: #f8fafc;
  --qip-surface-raised: #eef2f7;

  /* Accent */
  --qip-accent: #0e7c86;
  --qip-accent-hover: #0a6470;
  --qip-accent-soft: #dbf4f6;

  /* White-label reserved — populated by V12-S7 */
  --qip-brand-logo-url: url('/images/qrip-logo.svg');
  --qip-brand-name: 'QR INTERACTION PLATFORM';

  /* ── Semantic tokens (never overridden — platform UX) ───────────────── */
  --qip-success: #1a8a4a;
  --qip-success-soft: #d4f5e2;
  --qip-warning: #c27b00;
  --qip-warning-soft: #fff3cd;
  --qip-danger: #b83232;
  --qip-danger-soft: #fde8e8;
  --qip-info: #2a6bbf;
  --qip-info-soft: #ddeeff;

  /* ── Operator tokens (never overridden — platform UX) ───────────────── */
  --qip-live: #d46b08;
  --qip-live-soft: #fff0e0;
  --qip-assist: #4a3d8f;
  --qip-assist-soft: #ede9f8;

  /* ── Border ─────────────────────────────────────────────────────────── */
  --qip-border: #d8e1ee;
  --qip-border-strong: #b3c2d9;

  /* ── Spacing scale (base 4px) ───────────────────────────────────────── */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 64px;

  /* ── Radius scale ───────────────────────────────────────────────────── */
  --r-tight: 6px;
  --r-medium: 12px;
  --r-card: 18px;
  --r-large: 24px;
  --r-pill: 999px;

  /* ── Shadow scale ───────────────────────────────────────────────────── */
  --shadow-sm: 0 2px 6px rgba(17, 44, 77, 0.06);
  --shadow-md: 0 10px 22px rgba(17, 44, 77, 0.08);
  --shadow-lg: 0 20px 40px rgba(17, 44, 77, 0.12);
  --shadow-focus: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  background: radial-gradient(circle at 20% -10%, #edf7ff 0%, #f8fbff 35%, #ffffff 80%);
  color: var(--qip-ink);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin-bottom: 60px;
}

.app-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
}

.app-nav-shell {
  padding-left: clamp(1rem, 2vw, 2rem);
  padding-right: clamp(1rem, 2vw, 2rem);
}

.brand-title {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
}

.brand-logo {
  width: 34px;
  height: 34px;
  display: inline-block;
}

.app-nav-collapse {
  align-items: center;
  gap: 1rem;
}

.app-nav-links {
  gap: 0.15rem;
}

.app-nav .nav-link {
  white-space: nowrap;
  color: var(--qip-ink);
}

.app-nav .nav-link.app-nav-link:hover {
  color: var(--qip-accent);
}

.app-nav .nav-link:focus,
.app-nav .nav-link.app-nav-link:focus {
  outline: 2px solid var(--qip-accent);
  outline-offset: 2px;
  border-radius: var(--r-tight);
}

.account-link {
  font-weight: 600;
}

.footer {
  color: var(--qip-slate);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .brand-title {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }

  .brand-logo {
    width: 30px;
    height: 30px;
  }
}

@media (min-width: 1400px) {
  .app-nav-links {
    flex-wrap: wrap;
  }
}

@media (max-width: 1399.98px) {
  .app-nav-collapse {
    padding-top: 0.8rem;
  }

  .app-nav-links {
    gap: 0;
  }
}

.landing-hero {
  margin-top: 2.5rem;
  padding: clamp(1.5rem, 3vw, 3rem);
  max-width: 1100px;
  background:
    radial-gradient(circle at top right, rgba(14, 124, 134, 0.12), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.96));
}

.landing-kicker {
  color: var(--qip-accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  font-size: 0.78rem;
  margin-bottom: 0.9rem;
}

.landing-title {
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
  max-width: 12ch;
  margin-bottom: 1rem;
}

.landing-copy {
  color: var(--qip-slate);
  font-size: 1.05rem;
  max-width: 70ch;
  margin-bottom: 1.75rem;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.landing-feature {
  border: 1px solid #d8e1ee;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  padding: 1rem 1.1rem;
}

.landing-feature h2 {
  font-size: 1rem;
  margin-bottom: 0.45rem;
}

.landing-feature p {
  color: var(--qip-slate);
  margin-bottom: 0;
}

@media (max-width: 767.98px) {
  .landing-grid {
    grid-template-columns: 1fr;
  }

  .landing-title {
    max-width: none;
  }
}

.dashboard-shell {
  padding: 2.5rem 1rem;
}

.dashboard-kicker {
  color: var(--qip-accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
}

.dashboard-subtitle {
  color: var(--qip-slate);
  margin-bottom: 1.5rem;
}

.dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.dashboard-action-card {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-weight: 600;
}

@media (max-width: 991.98px) {
  .dashboard-actions-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-action-card {
    width: 100%;
  }
}

.card-shell {
  border: 1px solid var(--qip-border);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-md);
  background: var(--qip-surface);
  padding: 1.2rem;
}

/* ── Venue navigation tiles ────────────────────────────────────────────── */
.venue-nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--qip-border);
  border-radius: var(--r-medium);
  background: var(--qip-surface-soft);
  color: var(--qip-ink);
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease;
}

.venue-nav-link:hover,
.venue-nav-link:focus {
  background: var(--qip-surface-raised);
  color: var(--qip-ink);
  text-decoration: none;
}

.venue-nav-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* ── Hub dashboard cards ───────────────────────────────────────────────── */
.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
  max-width: 900px;
  text-align: left;
  margin-top: 2rem;
}

.hub-card {
  display: block;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--qip-border);
  border-radius: var(--r-card);
  background: var(--qip-surface);
  color: var(--qip-ink);
  text-decoration: none;
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}

.hub-card:hover,
.hub-card:focus {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
  color: var(--qip-ink);
  text-decoration: none;
}

.hub-card-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.hub-card-desc {
  font-size: 0.82rem;
  color: var(--qip-slate);
  margin: 0;
  line-height: 1.4;
}

/* ── Module view ───────────────────────────────────────────────────────── */
.module-view {
  max-width: 760px;
  padding: 0.5rem 0;
}

.module-view-header {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--qip-border);
  margin-bottom: 1.75rem;
}

@media (max-width: 575.98px) {
  .hub-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Touch targets ─────────────────────────────────────────────────────── */
.touch-action-btn {
  min-height: 44px;
  min-width: 44px;
}

/* ── Operator view: queue and table service ────────────────────────────── */
.queue-row-live {
  background: var(--qip-live-soft);
  border-left: 3px solid var(--qip-live);
}

.queue-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}

.queue-assist-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
  padding-left: var(--sp-2);
  border-left: 2px solid var(--qip-assist);
}

.table-action-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}

.operator-action-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  align-items: center;
}

.qr-preview-wrap {
  display: inline-flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--qip-accent-soft);
  border: 1px solid #bae7eb;
}

.qr-brand-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  font-weight: 700;
  text-transform: uppercase;
  color: #0d4262;
}

.qr-brand-logo {
  width: 22px;
  height: 22px;
}

.qr-preview-brand {
  width: 100%;
  justify-content: center;
}

.qr-preview-image {
  border-radius: 10px;
}

.qr-fullscreen-overlay {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;
  background: rgba(10, 16, 28, 0.82);
  z-index: 1100;
  padding: 1rem;
}

.qr-fullscreen-overlay.is-open {
  display: flex;
}

.qr-fullscreen-panel {
  position: relative;
  width: min(96vw, 720px);
  background: #ffffff;
  border-radius: 22px;
  padding: 1.2rem 1.8rem 1.2rem;
  text-align: center;
  box-shadow: 0 25px 45px rgba(4, 10, 20, 0.35);
}

.qr-fullscreen-title {
  letter-spacing: 0.04em;
  font-size: 1.35rem;
  font-weight: 700;
}

.qr-fullscreen-title-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 0;
}

.qr-fullscreen-title-wrap .qr-brand-logo {
  width: 42px;
  height: 42px;
}

.qr-fullscreen-brand-band {
  border: 1px solid #c7dcef;
  background: linear-gradient(145deg, #f2f9ff 0%, #e8f8ff 100%);
  border-radius: 14px;
  padding: 0.8rem 1rem;
  margin: 0.8rem auto 1rem;
}

.qr-fullscreen-kicker {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: #0d4262;
  font-weight: 700;
  text-transform: uppercase;
}

.qr-fullscreen-image {
  width: min(72vw, 500px);
  height: auto;
  border-radius: 14px;
  border: 1px solid #e1e9f2;
}

.qr-fullscreen-helper {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  color: #35536d;
  font-weight: 600;
}

.qr-fullscreen-close {
  position: absolute;
  right: 1rem;
  top: 0.9rem;
}

body.qr-fullscreen-open {
  overflow: hidden;
}

body[data-path='/identity/account/login'] .col-md-6.col-md-offset-2,
body[data-path='/identity/account/login'] #external-account,
body[data-path='/identity/account/login'] form[action*='ExternalLogin'],
body[data-path='/identity/account/login'] .row > div:has(a[href*='go.microsoft.com/fwlink/?LinkID=532715']) {
  display: none !important;
}

body[data-path='/identity/account/login'] .row > div:has(form#account) {
  max-width: 760px;
  flex: 0 0 100%;
}

body[data-path='/identity/account/login'] .row {
  justify-content: flex-start;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.adventure-shell {
  --adventure-deep: #12243b;
  --adventure-ember: #ff7a34;
  --adventure-sky: #16a7bf;
  --adventure-foam: #f4fbff;
  --adventure-border: #c9deec;
  --adventure-shadow: 0 18px 32px rgba(11, 36, 60, 0.12);
  position: relative;
  isolation: isolate;
  font-family: "Avenir Next", "Trebuchet MS", "Segoe UI", sans-serif;
}

.adventure-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 24px;
  background:
    radial-gradient(70% 60% at 10% -5%, rgba(255, 122, 52, 0.16), transparent 60%),
    radial-gradient(65% 55% at 96% 12%, rgba(22, 167, 191, 0.18), transparent 62%),
    linear-gradient(180deg, #fafdff 0%, #eef6fc 100%);
}

.adventure-hero {
  border-radius: 22px;
  border: 1px solid var(--adventure-border);
  box-shadow: var(--adventure-shadow);
  background:
    linear-gradient(130deg, rgba(18, 36, 59, 0.95) 0%, rgba(20, 58, 92, 0.92) 38%, rgba(22, 167, 191, 0.9) 100%);
  color: #f7fbff;
  padding: clamp(1.2rem, 2.8vw, 2.1rem);
}

.adventure-hero .display-6,
.adventure-hero .lead,
.adventure-hero .adventure-muted {
  color: #f7fbff;
}

.adventure-kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 700;
  font-size: 0.75rem;
  color: #ffe4d6;
}

.adventure-muted {
  opacity: 0.86;
}

.adventure-actions {
  animation: adventure-rise 420ms ease-out both;
}

.adventure-btn {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.adventure-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(11, 36, 60, 0.16);
}

.adventure-btn-primary {
  background: linear-gradient(135deg, #ff7a34 0%, #f8553f 100%);
  border-color: transparent;
}

.adventure-btn-primary:hover,
.adventure-btn-primary:focus {
  background: linear-gradient(135deg, #ff8a4d 0%, #f96652 100%);
  border-color: transparent;
}

.adventure-btn-outline {
  border-color: #2f6e97;
  color: #1f4f70;
  background: rgba(255, 255, 255, 0.88);
}

.adventure-btn-outline:hover,
.adventure-btn-outline:focus {
  background: #e9f5fc;
  color: #143750;
  border-color: #22567a;
}

.adventure-card {
  border-radius: 20px;
  border: 1px solid var(--adventure-border);
  box-shadow: var(--adventure-shadow);
  background: rgba(255, 255, 255, 0.94);
}

.adventure-card-header,
.adventure-modal-header {
  border-bottom: 1px solid #d6e8f4;
  background: linear-gradient(180deg, #f7fbff 0%, #eef6fc 100%);
}

.adventure-list-card {
  animation: adventure-rise 520ms ease-out both;
}

.adventure-list-group {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #dbe9f2;
}

.adventure-list-item {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 0;
  border-bottom: 1px solid #dbe9f2;
}

.adventure-list-item:last-child {
  border-bottom: 0;
}

.adventure-list-item:hover {
  background: linear-gradient(180deg, #fff8f4 0%, #f2fbff 100%);
}

.adventure-badge-soft {
  background: #dff3ff;
  color: #16415e;
  font-weight: 700;
}

.adventure-badge-solid {
  background: linear-gradient(135deg, #168bb2 0%, #0f5f94 100%);
  color: #ffffff;
}

.adventure-alert {
  border-radius: 16px;
  border-width: 1px;
}

.adventure-modal-content {
  border-radius: 18px;
  border: 1px solid #d0e2ee;
}

.adventure-page-title {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.adventure-qr-panel {
  display: inline-flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid #d8e8f4;
  border-radius: 14px;
  background: #f6fbff;
}

@keyframes adventure-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767.98px) {
  .adventure-shell::before {
    border-radius: 16px;
  }

  .adventure-hero {
    border-radius: 16px;
  }

  .adventure-btn {
    width: 100%;
  }
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}