/* Shared presentation primitives. Page layouts and application logic stay local. */
:root {
  --b1-bg: #100a1c;
  --b1-surface: #1d1230;
  --b1-surface-raised: #291b3d;
  --b1-text: #faf6ff;
  --b1-muted: #c7b9d8;
  --b1-accent: #d3a6ff;
  --b1-primary: #7c2bd7;
  --b1-primary-hover: #913ce6;
  --b1-primary-text: #ffffff;
  --b1-brand-gradient: linear-gradient(120deg, #6c2bd9, #a329bd);
  --b1-violet: #bfa2ff;
  --b1-line: #4b365f;
  --b1-success: #94e3bc;
  --b1-error: #ffb4ae;
  --b1-radius: 16px;
  --b1-shadow: 0 12px 32px #00000020;
}

*, *::before, *::after { box-sizing: border-box; }
::selection { background: #d3a6ff; color: #100a1c; }
body:is(.b1-public, .b1-admin, .b1-legal, .b1-transaction) {
  margin: 0;
  color-scheme: dark;
  background: var(--b1-bg);
  color: var(--b1-text);
  font-family: "Anek Devanagari", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
:where(.b1-public, .b1-admin, .b1-legal, .b1-transaction) :where(button, input, select, textarea) { font: inherit; }
:where(.b1-public, .b1-admin, .b1-legal, .b1-transaction) :where(img, svg, video) { max-width: 100%; }
:where(.b1-public, .b1-admin, .b1-legal, .b1-transaction) :where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--b1-accent);
  outline-offset: 4px;
}
:where(.b1-public, .b1-admin, .b1-legal, .b1-transaction) :where(button, .btn, .button-link) {
  min-height: 44px;
  touch-action: manipulation;
}
:where(.b1-public, .b1-admin, .b1-legal, .b1-transaction) :where(input, select, textarea) {
  max-width: 100%;
  accent-color: var(--b1-accent);
}
:where(.b1-public, .b1-admin, .b1-legal, .b1-transaction) :where(input, textarea)::placeholder { color: #bdaacd; opacity: 1; }
:where(.b1-public, .b1-admin, .b1-legal, .b1-transaction) :where(button:disabled, [aria-disabled="true"]) { cursor: not-allowed; opacity: .65; }
:where(.b1-public, .b1-admin, .b1-legal, .b1-transaction) :where([aria-invalid="true"]) { border-color: var(--b1-error); }
[hidden] { display: none !important; }
.sr-only, .b1-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.b1-skip-link, .skip-link {
  position: fixed;
  z-index: 10000;
  top: 12px; left: 12px;
  padding: 12px 20px;
  border-radius: 10px;
  background: var(--b1-accent);
  color: var(--b1-bg);
  font-weight: 700;
  transform: translateY(-200%);
}
.b1-skip-link:focus, .skip-link:focus { transform: translateY(0); }
.b1-public .skip-link, .b1-admin .b1-skip-link, .b1-legal .skip-link { color: var(--b1-bg); }
.b1-feedback, .b1-public .form-status { color: var(--b1-muted); overflow-wrap: anywhere; }
[data-state="success"] { color: var(--b1-success); }
[data-state="error"] { color: var(--b1-error); }

/* Administrative pages share their controls, cards, navigation and data tables. */
.b1-admin h1, .b1-admin h2, .b1-admin h3 { margin: 0; color: var(--b1-text); line-height: 1.2; letter-spacing: -.025em; }
.b1-admin h1 { font-size: clamp(28px, 3.5vw, 42px); }
.b1-admin h2 { font-size: clamp(21px, 2.2vw, 28px); }
.b1-admin h3 { font-size: 19px; }
.b1-admin p { margin: 0 0 12px; }
.b1-admin a { color: var(--b1-accent); text-underline-offset: 4px; }
.b1-admin :is(.lead, .muted, .subtle, .helper, .field-note, .hint, .note, small) { color: var(--b1-muted); }
.b1-admin :is(.subcopy, .stat-label, .tiny, .file-meta) { color: var(--b1-muted); }
.b1-admin :is(.eyebrow, .gradient-text) { color: var(--b1-accent); }
.b1-admin .eyebrow { display: inline-block; margin-bottom: 12px; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.b1-admin :is(.hero, .panel, .card, .stat-card, .info-card, .list-item, .checkin-item, .pitch-full) {
  min-width: 0;
  padding: clamp(18px, 3vw, 28px);
  background: var(--b1-surface);
  color: var(--b1-text);
  border: 1px solid var(--b1-line);
  border-radius: var(--b1-radius);
  box-shadow: var(--b1-shadow);
}
.b1-admin :is(.hero, .panel, .card) > :is(h1, h2, h3) { margin-bottom: 12px; }
.b1-admin .admin-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px 24px;
  width: min(100% - 40px, 1320px);
  margin: 0 auto;
  padding: 20px 0;
  border-bottom: 1px solid var(--b1-line);
}
.b1-admin .admin-brand { font-size: 20px; color: var(--b1-text); font-weight: 800; text-decoration: none; }
.b1-admin .admin-links { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.b1-admin .admin-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 8px; color: var(--b1-muted); text-decoration: none; font-size: 14px; }
.b1-admin .admin-links a:is(:hover, [aria-current="page"]) { color: var(--b1-accent); background: #d3a6ff12; }
.b1-admin :is(button, .btn, .button-link) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px;
  border: 1px solid var(--b1-line); border-radius: 10px;
  background: var(--b1-surface-raised); color: var(--b1-text);
  font-weight: 700; font-size: 15px; line-height: 1.35;
  text-decoration: none; cursor: pointer;
  transition: background .16s ease, border-color .16s ease;
}
.b1-admin :is(button, .btn, .button-link):hover { border-color: var(--b1-accent); background: #38234f; }
.b1-admin :is(.btn-gradient, .btn-primary, button.primary) { color: var(--b1-primary-text); background: var(--b1-primary); border-color: var(--b1-primary); }
.b1-admin :is(.btn-gradient, .btn-primary, button.primary):hover { background: var(--b1-primary-hover); }
.b1-admin :is(.danger, .btn-danger) { color: var(--b1-error); background: #ffb4ae0c; border-color: #a26a6b; }
.b1-admin label { display: block; color: var(--b1-text); font-weight: 600; font-size: 15px; margin-bottom: 7px; }
.b1-admin :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  width: 100%; min-height: 46px; padding: 11px 13px;
  border: 1px solid #806792; border-radius: 10px;
  background: #140c22; color: var(--b1-text);
  font-size: 16px;
}
.b1-admin input[type="checkbox"], .b1-admin input[type="radio"] { width: 20px; height: 20px; }
.b1-admin textarea { min-height: 120px; resize: vertical; }
.b1-admin :is(.status, .error, .success, .message) { min-height: 24px; margin-top: 14px; font-size: 15px; overflow-wrap: anywhere; }
.b1-admin :is(.status, .message) { color: var(--b1-muted); }
.b1-admin :is(.error, .status.error) { color: var(--b1-error); }
.b1-admin :is(.success, .status.success) { color: var(--b1-success); }
.b1-admin :is(.empty, .empty-state) { color: var(--b1-muted); text-align: center; padding: 28px 18px; }
.b1-admin :is(.table-wrap, .table-shell) { overflow-x: auto; border: 1px solid var(--b1-line); border-radius: 12px; scrollbar-color: #806792 #1d1230; }
.b1-admin table { width: 100%; border-collapse: collapse; font-size: 14px; }
.b1-admin th { background: #2c1a40; color: #e9def4; text-align: left; font-weight: 700; }
.b1-admin th, .b1-admin td { padding: 14px 16px; border-bottom: 1px solid var(--b1-line); vertical-align: top; line-height: 1.5; }
.b1-admin td { color: #e9def4; }
.b1-admin tbody tr:last-child td { border-bottom: 0; }
.b1-admin tbody tr:hover { background: #ffffff04; }
.b1-admin :is(.pill, .badge, .count-pill) { display: inline-flex; align-items: center; border: 1px solid var(--b1-line); background: #d3a6ff0c; color: var(--b1-accent); border-radius: 999px; padding: 5px 10px; font-size: 13px; font-weight: 600; }
.b1-admin :is(.stat-value, .stat-number, .count) { color: var(--b1-text); font-variant-numeric: tabular-nums; }
.b1-admin :is(code, pre) { overflow-wrap: anywhere; white-space: pre-wrap; color: #e9def4; }
@media (max-width: 640px) {
  .b1-admin .admin-nav { width: calc(100% - 28px); padding: 16px 0; }
  .b1-admin .admin-links { width: 100%; }
  .b1-admin .admin-links a { padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
