/* Self-hosted fonts (no Google Fonts / CDN). Built by tools/build_fonts.py: Inter (latin, weights
   400–800, OFL) and Material Symbols Outlined trimmed to the icons the app uses (Apache-2.0). */
@font-face{font-family:"Inter";src:url("../fonts/Inter-var.391c1a830a50.woff2") format("woff2");font-weight:400 800;font-style:normal;font-display:swap}
@font-face{font-family:"Material Symbols Outlined";src:url("../fonts/MaterialSymbolsOutlined-subset.b5dbb2c81471.woff2") format("woff2");font-weight:500 700;font-style:normal;font-display:block}

:root {
  /* Clean white professional palette */
  --page: #ffffff;
  --panel: #f6f7f9;
  --surface: #ffffff;
  --ink: #1f2328;
  --ink2: #656d76;
  --border: #e4e7eb;

  --nav: #ffffff;
  --nav-text: #3a3f45;
  --nav-active-bg: #fef0e5;
  --nav-active: #d9640a;

  --accent: #e8730c;
  --accent-dark: #c85e00;
  --accent-soft: #fef0e5;

  --ok: #1a7a3c;
  --ok-bg: #e6f4ea;
  --ok-tint: #f8fcf9;
  --ok-tint-hover: #f1f8f3;
  --muted: #7a828b;
  --danger: #b3261e;
  --danger-bg: #fce8e6;

  --owner: #b45309;
  --owner-bg: #fef3e2;
  --employee: #6d28d9;
  --employee-bg: #f1ebfd;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-pill: 999px;

  --sidebar-width: 260px;
  --shadow-sm: 0 2px 8px rgba(31, 35, 40, 0.06);
  --shadow-md: 0 12px 32px rgba(31, 35, 40, 0.12);
  --shadow-lg: 0 24px 60px rgba(31, 35, 40, 0.18);

  --gradient-brand: radial-gradient(circle at 25% 15%, #e8730c 0%, #c33a1a 55%, #a01e1e 100%);

  --font-family: "Inter", "Segoe UI", Roboto, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

.material-symbols-outlined,
.mi {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1, h2, h3 {
  font-weight: 600;
  color: var(--ink);
}

.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--panel);
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--nav);
  color: var(--nav-text);
  border-right: 1px solid var(--border);
  box-shadow: 1px 0 0 rgba(31, 35, 40, 0.02), 6px 0 24px -10px rgba(31, 35, 40, 0.14);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  transform: translateX(0);
  transition: transform 0.2s ease;
  z-index: 20;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 72px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logo .material-symbols-outlined {
  font-size: 22px;
}

.sidebar-brand-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.sidebar-brand-text span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink2);
}

.sidebar-nav {
  list-style: none;
  margin: 0;
  padding: 16px 12px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav li a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 46px;
  padding: 0 14px;
  color: var(--nav-text);
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-nav li a .material-symbols-outlined {
  font-size: 22px;
}

.sidebar-nav li a .material-symbols-outlined {
  color: var(--ink2);
}

.sidebar-nav li a:hover {
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
}

.sidebar-nav li.active a {
  background: var(--nav-active-bg);
  color: var(--nav-active);
  font-weight: 600;
}

/* Active item: a short accent bar on the left edge of the pill. */
.sidebar-nav li.active a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  bottom: 11px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--nav-active);
}

.sidebar-nav li.active a .material-symbols-outlined {
  color: var(--nav-active);
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

/* Mobile toggle */
.sidebar-toggle {
  display: none;
}

.topbar {
  display: none;
}

/* Main content */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-width: 0;
  padding: var(--space-lg);
}

.page-header {
  margin-bottom: var(--space-lg);
}

.page-header h1 {
  margin: 0 0 var(--space-xs) 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.page-header p {
  margin: 0;
  color: var(--ink2);
  font-size: 15px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  margin-bottom: var(--space-sm);
}

.breadcrumb a {
  color: var(--ink2);
}

.breadcrumb a:hover {
  color: var(--accent);
}

.breadcrumb .material-symbols-outlined {
  font-size: 16px;
}

.id-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-xl);
  margin-bottom: var(--space-lg);
}

.card h2 {
  font-size: 18px;
  margin-top: 0;
}

.card-section-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.card-section-icon {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-section-icon .material-symbols-outlined {
  font-size: 20px;
}

.card-section-header h2 {
  margin: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-icon {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon .material-symbols-outlined {
  font-size: 26px;
}

.stat-icon-families { background: var(--accent-soft); color: var(--accent); }
.stat-icon-payments { background: var(--employee-bg); color: var(--employee); }
.stat-icon-events { background: var(--owner-bg); color: var(--owner); }
.stat-icon-checkins { background: var(--ok-bg); color: var(--ok); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.stat-label {
  font-size: 13px;
  color: var(--ink2);
  margin-top: 2px;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

table.data-table th,
table.data-table td {
  text-align: left;
  padding: 16px var(--space-md);
  border-bottom: 1px solid var(--border);
}

table.data-table tbody tr:hover {
  background: var(--panel);
}

table.data-table tbody tr.clickable-row {
  cursor: pointer;
}

/* Paid rows: a barely-there tint plus a thin green accent on the left edge. */
table.data-table tbody tr.row-paid {
  background: var(--ok-tint);
}

table.data-table tbody tr.row-paid > td:first-child {
  box-shadow: inset 3px 0 0 var(--ok);
}

table.data-table tbody tr.row-paid:hover {
  background: var(--ok-tint-hover);
}

table.data-table th {
  color: var(--ink2);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.name-cell {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.avatar {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state {
  color: var(--ink2);
  font-size: 14px;
  padding: var(--space-lg) 0;
  text-align: center;
}

.empty-state .material-symbols-outlined {
  display: block;
  margin: 0 auto var(--space-sm);
  font-size: 32px;
  color: var(--border);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
}

.badge-active { background: var(--ok-bg); color: var(--ok); }
.badge-inactive { background: var(--panel); color: var(--ink2); border: 1px solid var(--border); }
.badge-owner { background: var(--owner-bg); color: var(--owner); }
.badge-employee { background: var(--employee-bg); color: var(--employee); }
.badge-current { background: var(--ok-bg); color: var(--ok); }
.badge-neutral { background: var(--panel); color: var(--ink2); }

.badge-paid {
  background: var(--ok-bg);
  color: var(--ok);
  font-weight: 600;
  font-size: 12.5px;
  padding: 3px 10px 3px 8px;
}

.badge-paid .mi {
  font-size: 15px;
  font-variation-settings: "FILL" 0, "wght" 700, "GRAD" 0, "opsz" 20;
}

.badge-notpaid {
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  font-size: 12.5px;
  padding: 2px 10px;
  border: 1px solid var(--border);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.btn .material-symbols-outlined {
  font-size: 20px;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(232, 115, 12, 0.28);
}

.btn-primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(232, 115, 12, 0.34);
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--ink);
}

.btn-secondary:hover {
  background: var(--panel);
  text-decoration: none;
}

.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
  border-radius: var(--radius-sm);
}

/* Login page — full split-screen */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--page);
}

.login-split {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

.login-brand-panel {
  position: relative;
  flex: 1 1 46%;
  max-width: 620px;
  background: var(--gradient-brand);
  color: #ffffff;
  padding: var(--space-2xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-xl);
  overflow: hidden;
}

.login-brand-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.login-brand-circle.c1 { width: 320px; height: 320px; top: -100px; right: -100px; }
.login-brand-circle.c2 { width: 220px; height: 220px; bottom: -80px; left: -60px; background: rgba(255, 255, 255, 0.06); }
.login-brand-circle.c3 { width: 140px; height: 140px; bottom: 15%; right: 8%; background: rgba(255, 255, 255, 0.07); }

.login-brand-content {
  position: relative;
  z-index: 1;
}

.login-brand-logo {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  backdrop-filter: blur(4px);
}

.login-brand-logo .material-symbols-outlined {
  font-size: 34px;
}

.login-brand-content h1 {
  color: #ffffff;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 var(--space-sm);
  letter-spacing: -0.01em;
}

.login-brand-tagline {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 var(--space-xl);
  max-width: 420px;
}

.login-feature-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.login-feature-icon {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-feature-icon .material-symbols-outlined {
  font-size: 22px;
}

.login-feature-text {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

.login-form-panel {
  flex: 1 1 54%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  background: var(--surface);
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.login-eyebrow {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 4px;
}

.login-card h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 var(--space-xs) 0;
  letter-spacing: -0.01em;
}

.login-subtitle {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink2);
  font-size: 14px;
  margin-bottom: var(--space-xl);
}

.login-subtitle .material-symbols-outlined {
  font-size: 18px;
}

.login-card form {
  text-align: left;
}

.login-card label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.input-group {
  position: relative;
  margin-bottom: var(--space-lg);
}

.input-group .material-symbols-outlined {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink2);
  font-size: 22px;
}

.login-card input[type="text"],
.login-card input[type="password"] {
  width: 100%;
  height: 60px;
  padding: 0 18px 0 52px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-family);
  background: var(--surface);
  color: var(--ink);
}

.login-card input[type="text"]:focus,
.login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.login-card .btn-primary {
  width: 100%;
  justify-content: center;
  height: 56px;
  font-size: 16px;
  margin-top: var(--space-sm);
  border: none;
}

.login-errors {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--danger-bg);
  color: var(--danger);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: var(--space-md);
  text-align: left;
}

.login-footer {
  margin-top: var(--space-xl);
  text-align: center;
  font-size: 13px;
  color: var(--ink2);
}

@media (max-width: 900px) {
  .login-brand-panel {
    display: none;
  }

  .login-form-panel {
    flex: 1 1 100%;
  }
}

/* Forms */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink2);
  margin-bottom: 4px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-family);
  background: var(--surface);
  color: var(--ink);
}

.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: var(--font-family);
  background: var(--surface);
  color: var(--ink);
  min-height: 110px;
}

/* Icon-inside-field wrapper, usable anywhere in the app */
.icon-field {
  position: relative;
}

.icon-field .field-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink2);
  font-size: 20px;
  pointer-events: none;
}

.icon-field input,
.icon-field select,
.icon-field textarea {
  padding-left: 48px;
}

.icon-field.icon-top .field-icon {
  top: 18px;
  transform: none;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23656d76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-card {
  max-width: 600px;
}

.form-with-preview {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--space-lg);
  align-items: start;
}

.form-with-preview .preview-col {
  position: sticky;
  top: var(--space-lg);
}

@media (max-width: 900px) {
  .form-with-preview {
    grid-template-columns: 1fr;
  }

  .form-with-preview .preview-col {
    position: static;
  }
}

.amount-field input {
  height: 60px;
  font-size: 26px;
  font-weight: 700;
  color: var(--accent-dark);
}

/* Toggle buttons (Cash / Check radios styled as a segmented control) */
.toggle-group {
  display: flex;
  gap: var(--space-sm);
}

.toggle-option {
  position: relative;
  flex: 1;
}

.toggle-option input[type="radio"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.toggle-option label {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink2);
  background: var(--surface);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.toggle-option input[type="radio"]:checked + label {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.toggle-option input[type="radio"]:focus-visible + label {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Switch toggle (e.g. "Record payment now") */
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--panel);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-lg);
}

.switch-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}

.switch-sublabel {
  font-size: 13px;
  color: var(--ink2);
  margin-top: 2px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 30px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.switch input:checked + .switch-slider {
  background: var(--accent);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* Membership type picker (selectable cards) */
.type-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.type-card {
  position: relative;
}

.type-card input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  z-index: 1;
  cursor: pointer;
}

.type-card label {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-lg);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.type-card-radio-dot {
  position: absolute;
  top: var(--space-lg);
  right: var(--space-lg);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: #ffffff;
}

.type-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.type-card-icon .material-symbols-outlined {
  font-size: 24px;
}

.type-card.owner .type-card-icon { background: var(--owner-bg); color: var(--owner); }
.type-card.employee .type-card-icon { background: var(--employee-bg); color: var(--employee); }

.type-card-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.type-card-sub {
  font-size: 13px;
  color: var(--ink2);
}

.type-card-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 4px;
}

.type-card input[type="radio"]:checked + label {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 3px rgba(232, 115, 12, 0.12);
}

.type-card input[type="radio"]:checked + label .type-card-radio-dot {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 4px #ffffff;
}

/* Live membership card preview */
.membership-card {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  color: #ffffff;
  padding: var(--space-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.membership-card::before {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  top: -70px;
  right: -70px;
}

.membership-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.membership-card-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.membership-card-logo .material-symbols-outlined {
  font-size: 20px;
}

.membership-card-org {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.9);
}

.membership-card-type {
  position: relative;
  z-index: 1;
  display: inline-flex;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: var(--space-md);
}

.membership-card-name {
  position: relative;
  z-index: 1;
  font-size: 22px;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  min-height: 28px;
  word-break: break-word;
}

.membership-card-footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.membership-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 2px;
}

.membership-card-value {
  font-size: 14px;
  font-weight: 600;
}

.membership-card-amount {
  font-size: 26px;
  font-weight: 700;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.form-errors {
  background: var(--danger-bg);
  color: var(--danger);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: var(--space-md);
}

.help-text {
  font-size: 12px;
  color: var(--ink2);
  margin-top: 4px;
}

.readonly-field {
  padding: 10px 12px;
  background: var(--panel);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--ink2);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid transparent;
}

.btn-danger:hover {
  background: var(--danger);
  color: #ffffff;
  text-decoration: none;
}

/* Search + filter chips */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-md);
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-box input {
  width: 100%;
  padding: 10px 12px 10px 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-family: var(--font-family);
  background: var(--surface);
  color: var(--ink);
}

.search-box input:focus {
  outline: none;
  border-color: var(--accent);
}

.search-box .material-symbols-outlined {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink2);
  font-size: 18px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink2);
}

.chip:hover {
  text-decoration: none;
  background: var(--panel);
}

.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

/* Family detail */
.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.detail-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.info-item .info-label {
  font-size: 12px;
  color: var(--ink2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.info-item .info-value {
  font-size: 15px;
  color: var(--ink);
}

.notes-box {
  white-space: pre-wrap;
  background: var(--panel);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  font-size: 14px;
  color: var(--ink);
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  background: var(--accent-soft);
  border: 1px solid var(--accent-soft);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink2);
  margin: var(--space-md) 0;
}

.total-row #total-display {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-dark);
}

/* Receipt */
.receipt-page {
  max-width: 520px;
  margin: 0 auto;
}

.receipt-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: var(--space-2xl) var(--space-xl);
}

.receipt-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.receipt-logo .material-symbols-outlined {
  font-size: 28px;
}

.receipt-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.receipt-title h1 {
  font-size: 21px;
  margin: 0 0 4px;
}

.receipt-title p {
  margin: 0;
  color: var(--ink2);
  font-size: 14px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 15px;
}

.receipt-row.total {
  font-weight: 700;
  font-size: 19px;
  border-bottom: none;
  border-top: 2px solid var(--ink);
  margin-top: 8px;
  padding-top: 14px;
  color: var(--accent-dark);
}

.receipt-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

@media print {
  .sidebar, .topbar, .page-header, .receipt-actions, .no-print {
    display: none !important;
  }

  .main {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  body {
    background: #ffffff;
  }

  .receipt-card {
    border: none;
    box-shadow: none;
  }

  .receipt-logo,
  .receipt-row.total {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  @page {
    size: A4;
    margin: 20mm;
  }
}

/* Mobile */
@media (max-width: 720px) {
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--nav);
    border-bottom: 1px solid var(--border);
    color: var(--ink);
    padding: var(--space-sm) var(--space-md);
    position: sticky;
    top: 0;
    z-index: 30;
  }

  .topbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    font-size: 15px;
    color: var(--ink);
  }

  .topbar-brand .material-symbols-outlined {
    color: var(--accent);
  }

  .sidebar-toggle {
    display: inline-flex;
    background: none;
    border: none;
    color: var(--ink);
    cursor: pointer;
    padding: var(--space-xs);
  }

  .sidebar-toggle .material-symbols-outlined {
    font-size: 26px;
  }

  .sidebar {
    transform: translateX(-100%);
    top: 52px;
    box-shadow: var(--shadow-md);
  }

  /* Drawer open (see base.html): slides in over the page, above the top bar */
  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
    padding: var(--space-md);
  }

  .type-picker {
    grid-template-columns: 1fr;
  }

  .page-header.detail-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   Hand-built premium form system (login, add/edit member,
   collect membership, record event payment)
   ============================================================ */

/* icon-in-field inputs */
.f{margin-bottom:18px}
.f label,.lbl{display:block;font-size:13.5px;font-weight:600;color:#5b636c;margin-bottom:9px}
.lbl .req{color:#b3261e}
.inp{display:flex;align-items:center;gap:12px;border:1.5px solid #e3e6ea;border-radius:12px;padding:0 16px;background:#fcfcfd}
.inp:focus-within{border-color:#e8730c;background:#fff;box-shadow:0 0 0 4px #fef0e5}
.inp .mi{font-size:22px;color:#9aa0a6}
.inp input,.inp select,.inp textarea{border:0;background:transparent;flex:1;height:52px;font-size:16px;font-family:inherit;color:#1a1d21;outline:0}
.inp.area{align-items:flex-start;padding-top:14px}
.inp.area textarea{height:88px;resize:vertical}
.inp.amt input{height:60px;font-size:26px;font-weight:800;color:#c85e00}
.hint{font-size:12.5px;color:#5b636c;margin-top:6px}

/* type picker cards */
.types{display:flex;flex-direction:column;gap:12px;margin-bottom:22px}
.typecard{border:2px solid #e3e6ea;border-radius:14px;padding:16px 18px;display:flex;align-items:center;gap:15px;cursor:pointer}
.typecard:hover{border-color:#d5b48c;background:#fffdf9}
.typecard.on{border-color:#e8730c;background:#fef0e5}
.typecard .ti{width:48px;height:48px;border-radius:13px;display:flex;align-items:center;justify-content:center;flex:none}
.typecard .ti .mi{font-size:26px}
.typecard .tt{flex:1}.typecard .tt b{font-size:16px;font-weight:700;display:block}.typecard .tt span{font-size:13px;color:#5b636c}
.typecard .price{font-size:21px;font-weight:800}
.typecard input[type=radio]{width:22px;height:22px;accent-color:#e8730c}

/* segmented toggle */
.seg{display:flex;border:1.5px solid #e3e6ea;border-radius:12px;overflow:hidden;width:100%}
.seg label{flex:1;height:50px;display:flex;align-items:center;justify-content:center;gap:8px;font-size:15px;font-weight:500;cursor:pointer;background:#fff}
.seg label+label{border-left:1.5px solid #e3e6ea}
.seg input{display:none}
.seg input:checked+span{color:#c85e00}
.seg label.on,.seg input:checked~label{background:#fef0e5}
.seg .mi{font-size:21px}

/* cards */
.card{background:#fff;border:1px solid #e3e6ea;border-radius:18px;padding:26px 24px;box-shadow:0 2px 8px rgba(0,0,0,.03);margin-bottom:20px}
.card h2{font-size:17px;font-weight:700;display:flex;align-items:center;gap:11px;margin-bottom:5px}
.card h2 .ci{width:34px;height:34px;border-radius:10px;background:#fef0e5;display:flex;align-items:center;justify-content:center}
.card h2 .ci .mi{font-size:21px;color:#e8730c}
.card .csub{font-size:13.5px;color:#5b636c;margin-bottom:20px}

/* live membership card */
.memcard{border-radius:18px;padding:24px;color:#fff;background:linear-gradient(135deg,#c33a1a,#a01e1e);box-shadow:0 14px 30px -14px rgba(160,30,30,.6)}
.memcard .mtop{display:flex;justify-content:space-between;align-items:center;margin-bottom:22px}
.memcard .mtype{font-size:12px;font-weight:700;background:rgba(255,255,255,.2);padding:6px 12px;border-radius:20px}
.memcard .mname{font-size:20px;font-weight:700;margin-bottom:6px}
.memcard .morg{font-size:12.5px;opacity:.85;margin-bottom:22px}
.memcard .mbot{display:flex;justify-content:space-between;align-items:flex-end}
.memcard .mamt{font-size:22px;font-weight:800}

/* big buttons */
.btn-lg{height:54px;padding:0 30px;border:0;border-radius:14px;font-size:16px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:10px}
.btn-lg.primary{background:#e8730c;color:#fff;box-shadow:0 10px 24px -10px rgba(232,115,12,.55)}
.btn-lg.ghost{background:#fff;border:1.5px solid #e3e6ea;color:#1a1d21}

/* LOGIN split */
.bigbtn{margin-top:6px;box-shadow:0 12px 24px -12px rgba(232,115,12,.65);transition:background .15s ease}
.bigbtn:hover{background:#c85e00}
.biginp{display:flex;align-items:center;gap:13px;border:2px solid #e3e6ea;border-radius:14px;padding:0 18px;background:#fcfcfd;margin-bottom:20px}
.biginp:focus-within{border-color:#e8730c;background:#fff;box-shadow:0 0 0 4px #fef0e5}
.biginp .mi{font-size:24px;color:#9aa0a6}
.biginp input{border:0;background:transparent;flex:1;height:58px;font-size:17px;font-family:inherit;outline:0}
.bigbtn{width:100%;height:58px;border:0;border-radius:14px;background:#e8730c;color:#fff;font-size:17px;font-weight:700;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:10px}

/* ============================================================
   Reports
   ============================================================ */
.report-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:20px}
.report-grid .card{margin-bottom:0}
.report-card{display:flex;flex-direction:column}
.report-card .csub{flex:1}
.report-card-actions,.report-filter-actions{display:flex;gap:10px;flex-wrap:wrap}
.report-card-actions .btn .mi,.report-filter-actions .btn .mi{font-size:20px}

.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch;margin:0 -24px;padding:0 24px}
.report-table{font-size:14px}
.report-table th,.report-table td{padding:12px 14px;white-space:nowrap}
.report-table .num{text-align:right;font-variant-numeric:tabular-nums}
.report-table tfoot td{font-weight:700;background:#f6f7f9;border-top:2px solid #1f2328;border-bottom:0}

.stat-card-link{color:inherit}
.stat-card-link:hover{text-decoration:none;border-color:#e8730c}
.stat-icon-notpaid{background:var(--danger-bg);color:var(--danger)}

@media(max-width:720px){
  .report-grid{grid-template-columns:1fr}
  .table-scroll{margin:0 -16px;padding:0 16px}
}

.summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin-bottom:20px}
.summary-card{background:#fff;border:1px solid #e3e6ea;border-radius:18px;padding:20px 22px;display:flex;align-items:center;gap:16px;box-shadow:0 2px 8px rgba(0,0,0,.03)}
.summary-icon{width:48px;height:48px;border-radius:14px;background:#fef0e5;color:#e8730c;display:flex;align-items:center;justify-content:center;flex:none}
.summary-icon .mi{font-size:26px}
.summary-value{font-size:26px;font-weight:700;color:#1a1d21;line-height:1.15;font-variant-numeric:tabular-nums}
.summary-label{font-size:13px;color:#5b636c;margin-top:2px}

.table-card{padding:8px 24px 16px}
.table-note{display:flex;align-items:center;gap:6px;font-size:12.5px;color:#5b636c;margin:12px 0 0}
.table-note .mi{font-size:16px}

/* Receipt row actions (Print / Edit / Void) */
.row-actions{display:flex;gap:6px;justify-content:flex-end;align-items:center}
.row-actions form{margin:0}
.act{display:inline-flex;align-items:center;gap:5px;height:34px;padding:0 12px;border-radius:10px;border:1px solid #e3e6ea;background:#fff;color:#1f2328;font:600 13px var(--font-family);cursor:pointer;white-space:nowrap}
.act .mi{font-size:18px;color:#5b636c}
.act:hover{background:#fef0e5;border-color:#e8730c;text-decoration:none}
.act:hover .mi{color:#e8730c}
.act-danger:hover{background:var(--danger-bg);border-color:var(--danger);color:var(--danger)}
.act-danger:hover .mi{color:var(--danger)}
.row-meta{font-size:12px;color:#8a9199;margin-top:3px;white-space:normal}
.badge-void{background:var(--danger-bg);color:var(--danger);font-size:11.5px;padding:3px 9px;margin-left:6px;text-transform:uppercase;letter-spacing:.04em}
table.data-table tbody tr.row-void td{color:#9aa0a6}
table.data-table tbody tr.row-void td:not(:first-child):not(:last-child){text-decoration:line-through}

/* Collect button on not-paid members */
.collect-cell{text-align:right;width:1%;white-space:nowrap}
.btn-collect{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 14px;border-radius:10px;background:#e8730c;color:#fff;font-size:13.5px;font-weight:600;box-shadow:0 6px 14px -8px rgba(232,115,12,.7)}
.btn-collect .mi{font-size:18px}
.btn-collect:hover{background:#c85e00;text-decoration:none}

/* Flash messages */
.flash{padding:14px 20px;font-weight:500}
.flash-success{background:#e6f4ea;border-color:#b7dfc2;color:#1a7a3c}
.flash-error{background:var(--danger-bg);border-color:#f3c3be;color:var(--danger)}

/* Receipt page extras */
.receipt-saved,.receipt-voided{display:flex;gap:14px;align-items:flex-start;border-radius:16px;padding:16px 20px;margin-bottom:16px}
.receipt-saved{background:#e6f4ea;color:#1a7a3c}
.receipt-voided{background:var(--danger-bg);color:var(--danger)}
.receipt-saved .mi,.receipt-voided .mi{font-size:28px}
.receipt-saved strong,.receipt-voided strong{display:block;font-size:16px}
.receipt-saved span,.receipt-voided span{font-size:14px}
.receipt-toolbar{display:flex;gap:10px;margin-bottom:18px}
.receipt-toolbar .btn-lg{flex:1;justify-content:center}
.receipt-print-btn{height:60px;font-size:17px}
.receipt-card{position:relative;overflow:hidden}
.receipt-thanks{text-align:center;color:#5b636c;font-size:13px;margin:22px 0 0}
.void-stamp{position:absolute;top:42%;left:50%;transform:translate(-50%,-50%) rotate(-18deg);font-size:88px;font-weight:800;letter-spacing:.12em;color:rgba(179,38,30,.16);border:6px solid rgba(179,38,30,.16);border-radius:18px;padding:0 24px;pointer-events:none}
@media print{
  .void-stamp{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .flash{display:none!important}
}
@media(max-width:720px){
  .summary-grid{grid-template-columns:1fr 1fr;gap:10px}
  .summary-card{padding:14px;gap:10px}
  .summary-icon{width:38px;height:38px;border-radius:11px}
  .summary-icon .mi{font-size:21px}
  .summary-value{font-size:19px}
  .table-card{padding:4px 16px 12px}
  .receipt-toolbar{flex-direction:column}
  /* In a column, flex:1 means a 0 height basis: keep the buttons their full 54px. */
  .receipt-toolbar .btn-lg{flex:none}
}

/* ============================================================
   Events + gate check-in
   ============================================================ */
.cell-strong{font-weight:600;color:#1f2328}
.event-avatar .mi{font-size:20px}
.badge-live{background:var(--ok-bg);color:var(--ok);font-weight:700}
.badge-upcoming{background:#e8f0fe;color:#1a56b8}
.badge-member{background:var(--owner-bg);color:var(--owner)}
.badge-guest{background:var(--employee-bg);color:var(--employee)}
.badge-waiting{background:#fff4d6;color:#8a5a00;font-size:12px}
.free-tag{color:var(--ok);font-weight:600}
h1 .badge{vertical-align:middle;margin-left:8px;font-size:13px}
table.data-table tbody tr.row-live{background:#f1faf3}
table.data-table tbody tr.row-live:hover{background:#e6f4ea}

.live-dot{display:inline-block;width:12px;height:12px;border-radius:50%;background:#1f9d4c;box-shadow:0 0 0 0 rgba(31,157,76,.6);animation:livepulse 1.6s infinite;flex:none}
.live-dot.small{width:8px;height:8px}
@keyframes livepulse{0%{box-shadow:0 0 0 0 rgba(31,157,76,.55)}70%{box-shadow:0 0 0 10px rgba(31,157,76,0)}100%{box-shadow:0 0 0 0 rgba(31,157,76,0)}}
@media (prefers-reduced-motion:reduce){.live-dot{animation:none}}
.live-banner{display:flex;align-items:center;gap:16px;padding:18px 22px;margin-bottom:16px;border-radius:18px;background:linear-gradient(135deg,#e6f4ea,#d4eedb);border:1px solid #b7dfc2;color:#14532d}
.live-banner:hover{text-decoration:none;box-shadow:0 10px 24px -14px rgba(26,122,60,.6)}
.live-text{flex:1}
.live-text strong{display:block;font-size:17px}
.live-text span{font-size:14px;color:#2f6b43}
.live-go{display:inline-flex;align-items:center;gap:6px;background:#1a7a3c;color:#fff;font-weight:600;font-size:14px;padding:10px 16px;border-radius:12px;white-space:nowrap}
.live-go .mi{font-size:18px}

/* People stepper */
.stepper{display:flex;align-items:stretch;border:1.5px solid #e3e6ea;border-radius:12px;overflow:hidden;background:#fff;height:54px}
.stepper input{width:100%;min-width:44px;border:0;text-align:center;font:700 20px var(--font-family);color:#1f2328;outline:0;-moz-appearance:textfield}
.stepper input::-webkit-inner-spin-button,.stepper input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.step-btn{flex:none;width:52px;border:0;background:#f6f7f9;color:#1f2328;cursor:pointer;display:flex;align-items:center;justify-content:center}
.step-btn:hover{background:#fef0e5;color:#c85e00}
.step-btn .mi{font-size:22px}
.stepper.small{height:44px;width:140px}
.stepper.small .step-btn{width:42px}
.stepper.small input{font-size:17px}

/* Gate counters */
.gate-counters{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.gate-counter{background:#fff;border:1px solid #e3e6ea;border-radius:18px;padding:18px 20px;box-shadow:0 2px 8px rgba(0,0,0,.03)}
.gate-counter.primary{background:var(--gradient-brand);border:0;color:#fff;box-shadow:0 14px 30px -16px rgba(160,30,30,.7)}
.gc-label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:#5b636c}
.gc-label .mi{font-size:20px;color:#e8730c}
.gate-counter.primary .gc-label,.gate-counter.primary .gc-label .mi{color:rgba(255,255,255,.92)}
.gc-value{font-size:40px;font-weight:800;line-height:1.1;margin-top:6px;font-variant-numeric:tabular-nums;color:#1f2328}
.gate-counter.primary .gc-value{color:#fff;font-size:48px}
.gc-sub{font-size:12.5px;color:#5b636c;margin-top:2px;min-height:16px}

/* Gate search + results */
.gate-search{position:sticky;top:0;z-index:6;display:flex;align-items:center;gap:12px;background:#fff;border:2px solid #e3e6ea;border-radius:16px;padding:0 10px 0 18px;margin-bottom:16px;box-shadow:0 8px 20px -14px rgba(0,0,0,.25)}
.gate-search:focus-within{border-color:#e8730c;box-shadow:0 0 0 4px #fef0e5}
.gate-search > .mi{font-size:28px;color:#9aa0a6}
.gate-search input{flex:1;height:64px;border:0;outline:0;font:500 20px var(--font-family);background:transparent;color:#1f2328;min-width:0}
.gate-search input::-webkit-search-cancel-button{display:none}
.gate-clear{border:0;background:#f1f2f4;height:44px;padding:0 14px;gap:4px;border-radius:12px;font:600 14px var(--font-family);cursor:pointer;display:flex;align-items:center;justify-content:center;visibility:hidden}
.gate-results{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.gate-results:empty{display:none}
.gate-card{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;background:#fff;border:1px solid #e3e6ea;border-radius:16px;padding:14px 16px}
.gate-card.is-in{background:var(--ok-tint);border-color:#e3efe6;box-shadow:inset 3px 0 0 var(--ok)}
.gate-card + .gate-card{margin-top:0}
#waiting-list .gate-card,#recent-list .recent-row{margin-top:10px}
.gate-who{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 240px}
.gate-who .cell-strong{font-size:16px}
.avatar.guest{background:var(--employee-bg);color:var(--employee)}
.avatar .mi{font-size:20px}
.gate-act{display:flex;align-items:center;gap:10px}
.btn-checkin{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 18px;border:0;border-radius:12px;background:#1a7a3c;color:#fff;font:700 15px var(--font-family);cursor:pointer;box-shadow:0 8px 18px -10px rgba(26,122,60,.8)}
.btn-checkin:hover{background:#156431}
.btn-checkin .mi{font-size:20px}
.gate-done{display:flex;align-items:center;gap:6px;color:var(--ok);font-weight:600;font-size:14px}
.gate-done .mi{font-size:20px}
.gate-unpaid{display:flex;flex-direction:column;gap:8px;align-items:flex-end}
.gate-unpaid-note{display:flex;align-items:center;gap:6px;background:#fff4d6;color:#8a5a00;font-size:13px;font-weight:600;padding:6px 12px;border-radius:10px}
.gate-unpaid-note .mi{font-size:18px}
.gate-unpaid-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.gate-new-guest{border-style:dashed;background:#fcfcfd}
.gate-idle{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.recent-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid #eef0f2}
.recent-row .row-meta{margin:0 0 0 auto;white-space:nowrap}
.empty-state.compact{padding:12px 0;text-align:left}

/* Walk-in dialog */
.gate-dialog{border:0;border-radius:22px;padding:24px;width:min(560px,calc(100vw - 24px));max-height:calc(100vh - 32px);overflow:auto;box-shadow:0 30px 70px -20px rgba(0,0,0,.45)}
.gate-dialog::backdrop{background:rgba(20,22,26,.45)}
.dialog-head{display:flex;align-items:center;justify-content:space-between}
.dialog-head h2{margin:0}
.dialog-close{border:0;background:#f1f2f4;height:44px;padding:0 14px;gap:4px;border-radius:12px;font:600 14px var(--font-family);cursor:pointer;display:flex;align-items:center;justify-content:center}

/* Toast */
.toast{position:fixed;left:50%;bottom:24px;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:50;max-width:calc(100vw - 32px);padding:14px 20px;border-radius:14px;font-weight:600;font-size:15px;color:#fff;background:#1f2328;box-shadow:0 14px 30px -10px rgba(0,0,0,.4);transition:opacity .2s,transform .2s}
.toast.show{opacity:1;transform:translate(-50%,0)}
.toast.ok{background:#1a7a3c}
.toast.err{background:#b3261e}

@media(max-width:900px){
  .gate-counters{grid-template-columns:1fr 1fr}
  .gate-idle{grid-template-columns:1fr}
}
@media(max-width:720px){
  .gc-value{font-size:30px}
  .gate-counter.primary .gc-value{font-size:36px}
  .gate-counter{padding:14px}
  .gate-search input{height:56px;font-size:18px}
  .gate-unpaid{align-items:stretch;width:100%}
  .gate-unpaid-actions{justify-content:flex-start}
  .gate-act{width:100%;justify-content:space-between}
  .live-banner{flex-wrap:wrap}
}

/* ============================================================
   Shared list toolbar + large, simple lists (iPhone friendly)
   ============================================================ */
.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}
.section-title{display:flex;align-items:center;gap:10px;font-size:20px;margin:28px 0 14px}
.section-title .mi{color:#e8730c}

.list-toolbar{background:#fff;border:1px solid #e3e6ea;border-radius:18px;padding:16px;margin-bottom:14px;box-shadow:0 2px 8px rgba(0,0,0,.03)}
.lt-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.lt-spacer{flex:1}
.lt-search{flex:1 1 320px;display:flex;align-items:center;gap:12px;border:2px solid #e3e6ea;border-radius:14px;padding:0 16px;background:#fcfcfd;cursor:text}
.lt-search:focus-within{border-color:#e8730c;background:#fff;box-shadow:0 0 0 4px #fef0e5}
.lt-search .mi{font-size:26px;color:#9aa0a6}
.lt-search input{flex:1;min-width:0;height:56px;border:0;outline:0;background:transparent;font:500 18px var(--font-family);color:#1f2328}
.lt-actions{display:flex;gap:10px;flex-wrap:wrap}
.lt-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;height:56px;padding:0 20px;border-radius:14px;border:1.5px solid #e3e6ea;background:#fff;color:#1f2328;font:600 16px var(--font-family);cursor:pointer;white-space:nowrap}
.lt-btn .mi{font-size:22px}
.lt-btn:hover{background:#f6f7f9;text-decoration:none}
.lt-btn.primary{background:#e8730c;border-color:#e8730c;color:#fff;box-shadow:0 10px 22px -12px rgba(232,115,12,.7)}
.lt-btn.primary:hover{background:#c85e00}
.lt-btn.disabled{opacity:.4;cursor:default}
.lt-filters{display:flex;flex-wrap:wrap;gap:12px 14px;align-items:flex-end;margin-top:14px}
.lt-field{flex:1 1 180px;max-width:260px}
.lt-field[hidden]{display:none}
.lt-field label{display:block;font-size:14px;font-weight:600;color:#5b636c;margin-bottom:6px}
.lt-control{display:flex;align-items:center;gap:8px;border:1.5px solid #e3e6ea;border-radius:12px;padding:0 12px;background:#fff}
.lt-control:focus-within{border-color:#e8730c;box-shadow:0 0 0 3px #fef0e5}
.lt-control .mi{font-size:20px;color:#9aa0a6}
.lt-control select,.lt-control input{flex:1;min-width:0;height:50px;border:0;outline:0;background:transparent;font:500 16px var(--font-family);color:#1f2328;cursor:pointer}
.lt-buttons{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.lt-quick,.lt-clear{display:inline-flex;align-items:center;gap:8px;height:50px;padding:0 16px;border-radius:12px;font:600 15px var(--font-family);white-space:nowrap}
.lt-quick{border:1.5px solid #f3c9a3;background:#fff8f1;color:#b4530a}
.lt-quick.on{background:#e8730c;border-color:#e8730c;color:#fff}
.lt-quick:hover,.lt-clear:hover{text-decoration:none;filter:brightness(.97)}
.lt-clear{border:1.5px solid #e3e6ea;background:#f6f7f9;color:#1f2328}
.lt-quick .mi,.lt-clear .mi{font-size:20px}
.lt-status{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;justify-content:space-between;font-size:15px;color:#5b636c;margin:0 4px 12px}
.lt-count strong{color:#1f2328}
.lt-filterline{display:inline-flex;align-items:center;gap:6px}
.lt-filterline .mi{font-size:18px}
body.lt-loading [data-swap="list-results"]{opacity:.55;transition:opacity .15s}

.list-table{font-size:16px}
.list-table th,.list-table td{padding:14px 14px;white-space:nowrap}
.list-table td .row-meta{font-size:13.5px}
.list-table .num{text-align:right;font-variant-numeric:tabular-nums}
.list-table tfoot td{font-weight:700;background:#f6f7f9;border-top:2px solid #1f2328;border-bottom:0}
.list-table .badge .mi{font-size:15px}
th.sortable{padding:0!important}
th.sortable a{display:flex;align-items:center;gap:4px;padding:14px;color:inherit;min-height:48px}
th.sortable.num a{justify-content:flex-end}
th.sortable a:hover{color:#c85e00;text-decoration:none}
.sort-icon{font-size:17px!important;color:#e8730c}
.sort-icon.idle{color:#c3c7cc}
.actions-cell{text-align:right;width:1%}
.act{height:44px;padding:0 14px;font-size:14.5px;border-radius:12px}
.act-primary{background:#e8730c;border-color:#e8730c;color:#fff}
.act-primary .mi{color:#fff}
.act-primary:hover{background:#c85e00;border-color:#c85e00;color:#fff}
.act-primary:hover .mi{color:#fff}

.pager{display:flex;align-items:center;justify-content:center;gap:14px;margin:4px 0 24px;flex-wrap:wrap}
.pager-info{font-size:16px;font-weight:600;color:#1f2328}

/* Reports index */
.report-card-main{color:inherit}
.report-card-main:hover{text-decoration:none}
.report-card-main:hover h2{color:#c85e00}
.report-card-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Receipt page: fix a mistake */
.receipt-fix{display:flex;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;margin:-4px 0 16px;color:#5b636c;font-size:14px}
.receipt-fix form{margin:0}

/* Dashboard */
.quick-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:20px}
.qa{display:flex;align-items:center;justify-content:center;gap:10px;height:64px;padding:0 16px;border-radius:16px;border:1.5px solid #e3e6ea;background:#fff;color:#1f2328;font:700 16px var(--font-family);text-align:center}
.qa .mi{font-size:24px;color:#e8730c}
.qa:hover{text-decoration:none;border-color:#e8730c;background:#fffaf5}
.qa.primary{background:#e8730c;border-color:#e8730c;color:#fff;box-shadow:0 12px 24px -14px rgba(232,115,12,.8)}
.qa.primary .mi{color:#fff}
.qa.primary:hover{background:#c85e00}
.dash-cards{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:20px}
.dash-card{display:flex;flex-direction:column;gap:4px;background:#fff;border:1px solid #e3e6ea;border-radius:20px;padding:22px;color:#1f2328;box-shadow:0 2px 8px rgba(0,0,0,.03);transition:box-shadow .15s,transform .15s}
.dash-card:hover{text-decoration:none;box-shadow:0 14px 30px -18px rgba(0,0,0,.35);transform:translateY(-1px)}
.dash-icon{width:52px;height:52px;border-radius:14px;background:#fef0e5;color:#e8730c;display:flex;align-items:center;justify-content:center;margin-bottom:8px}
.dash-icon .mi{font-size:28px}
.dash-card.ok .dash-icon{background:var(--ok-bg);color:var(--ok)}
.dash-card.warn .dash-icon{background:#fff4d6;color:#8a5a00}
.dash-value{font-size:36px;font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums}
.dash-label{font-size:16px;font-weight:600;color:#5b636c}
.dash-go{display:inline-flex;align-items:center;gap:4px;margin-top:10px;font-size:14.5px;font-weight:600;color:#c85e00}
.dash-go .mi{font-size:18px}
.dash-two{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.dash-two .card{margin-bottom:0}
.next-event{display:flex;flex-direction:column;gap:16px}
.next-event-name{font-size:22px;font-weight:700}
.next-event-when{font-size:16px;color:#5b636c;margin-top:4px}
.next-event-actions{display:flex;gap:10px;flex-wrap:wrap}
.recent-receipts{display:flex;flex-direction:column}
.recent-receipt{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 4px;border-bottom:1px solid #eef0f2;color:inherit;min-height:56px}
.recent-receipt:hover{text-decoration:none;background:#fafbfc}
.recent-amount{font-size:17px;font-weight:700;font-variant-numeric:tabular-nums}

/* Print pages (lists, reports, event summary) */
.print-body{background:#f4f5f7}
.print-toolbar{display:flex;gap:10px;justify-content:center;padding:16px}
.print-page{background:#fff;max-width:1100px;margin:0 auto 32px;padding:32px;border-radius:12px;box-shadow:0 10px 30px -20px rgba(0,0,0,.4)}
.print-portrait{max-width:760px}
.print-head{display:flex;align-items:center;gap:16px;border-bottom:3px solid #e8730c;padding-bottom:14px}
.print-logo{width:48px;height:48px;border-radius:12px;background:#e8730c;color:#fff;display:flex;align-items:center;justify-content:center;flex:none}
.print-logo .mi{font-size:28px}
.print-titles{flex:1}
.print-org{font-size:13px;font-weight:700;color:#c85e00;text-transform:uppercase;letter-spacing:.06em}
.print-head h1{margin:2px 0 0;font-size:24px}
.print-meta{font-size:12.5px;color:#5b636c;text-align:right}
.print-filters{font-size:13px;color:#3a3f45;margin:12px 0 16px}
.print-summary{display:flex;flex-wrap:wrap;gap:8px 24px;margin-bottom:16px;font-size:13px}
.print-summary div{display:flex;gap:8px;align-items:baseline}
.print-summary span{color:#5b636c}
.print-table{width:100%;border-collapse:collapse;font-size:12px}
.print-table th{background:#b4530a;color:#fff;text-align:left;padding:7px 8px;font-weight:700}
.print-table td{padding:6px 8px;border-bottom:1px solid #e3e6ea}
.print-table tbody tr:nth-child(even) td{background:#f7f8fa}
.print-table .num{text-align:right;font-variant-numeric:tabular-nums}
.print-table tfoot td{font-weight:700;border-top:2px solid #1f2328;border-bottom:0;background:#fef0e5}
.print-empty{color:#5b636c;font-style:italic}
.es-event h2{font-size:26px;margin:18px 0 4px}
.es-event p{margin:0 0 18px;color:#3a3f45}
.es-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin-bottom:22px}
.es-box{border:1.5px solid #e3e6ea;border-radius:12px;padding:14px}
.es-box span{display:block;font-size:12.5px;color:#5b636c;font-weight:600}
.es-box strong{display:block;font-size:30px;margin-top:4px}
.es-box em{display:block;font-style:normal;font-size:12px;color:#5b636c}
.es-money h3{margin:0 0 8px}
.es-money .print-table{font-size:15px}
.es-note{font-size:12px;color:#5b636c}
.es-sign{display:grid;grid-template-columns:1fr 1fr;gap:40px;margin-top:56px}
.es-sign div{border-top:1.5px solid #1f2328;padding-top:6px;font-size:12.5px;color:#5b636c}

@media print{
  .print-body{background:#fff}
  .print-page{box-shadow:none;border-radius:0;margin:0;padding:0;max-width:none}
  .print-head,.print-table th,.print-table tbody tr:nth-child(even) td,.print-table tfoot td,.print-logo{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .print-table thead{display:table-header-group}
  .print-table tr{page-break-inside:avoid}
  .list-toolbar,.lt-status,.pager{display:none!important}
}

@media(max-width:1100px){
  .dash-cards{grid-template-columns:1fr 1fr}
  .quick-actions{grid-template-columns:1fr 1fr}
}
@media(max-width:900px){
  .dash-two{grid-template-columns:1fr}
  .es-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:720px){
  .list-toolbar{padding:12px;border-radius:16px}
  .lt-search{flex-basis:100%}
  .lt-actions{width:100%}
  .lt-actions .lt-btn{flex:1}
  .lt-field{max-width:none;flex:1 1 calc(50% - 7px)}
  .lt-buttons{width:100%}
  .lt-quick,.lt-clear{flex:1;justify-content:center}
  .dash-value{font-size:30px}
  .dash-card{padding:16px}
  .qa{height:58px;font-size:15px}
  .print-page{padding:16px}
}
@media print{
  @page wide{size:A4 landscape;margin:12mm}
  .print-page:not(.print-portrait){page:wide}
}
.sidebar-toggle{align-items:center;gap:6px;font:600 15px var(--font-family)}

/* ============================================================
   Gate: empty-state guide, big result rows, live checked-in list
   ============================================================ */
.gate-help{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;padding:28px 20px;margin-bottom:16px;border:2px dashed #f3c9a3;border-radius:18px;background:#fffaf5;color:#3a3f45}
.gate-help[hidden]{display:none}
.gate-help > .mi{font-size:44px;color:#e8730c}
.gate-help p{margin:0;font-size:19px;line-height:1.5}
.gate-help-walkin{display:inline-flex;align-items:center;gap:6px;height:48px;padding:0 16px;margin-left:4px;border:0;border-radius:12px;background:#e8730c;color:#fff;font:700 17px var(--font-family);cursor:pointer;vertical-align:middle}
.gate-help-walkin .mi{font-size:22px}

.avatar.big{width:52px;height:52px;font-size:18px}
.gate-name{font-size:19px;font-weight:700;color:#1f2328;line-height:1.25}
.gate-badges{display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin-top:5px}
.gate-badges .row-meta{margin:0;font-size:14.5px}
.gate-badges .badge{font-size:13.5px}
.badge-mem-paid{background:var(--ok-bg);color:var(--ok);font-weight:600}
.badge-mem-unpaid{background:#fdf1f0;color:var(--danger);font-weight:600}
.gate-card{padding:16px 18px;gap:16px}
.gate-results .gate-card{min-height:84px}
.gate-act .stepper{width:170px;height:56px}
.gate-act .stepper .step-btn{width:54px}
.btn-checkin.big{height:56px;padding:0 22px;font-size:18px;border-radius:14px}
.btn-checkin.big .mi{font-size:24px}
.btn-gate-choice{display:inline-flex;align-items:center;gap:8px;height:52px;padding:0 18px;border-radius:14px;border:2px solid #e3e6ea;background:#fff;color:#1f2328;font:700 16px var(--font-family);cursor:pointer;white-space:nowrap}
.btn-gate-choice .mi{font-size:22px;color:#e8730c}
.btn-gate-choice:hover{border-color:#e8730c;background:#fffaf5;text-decoration:none}
.gate-nomatch{display:flex;align-items:center;gap:8px;font-size:17px;color:#5b636c;margin:4px 4px 0}
.gate-nomatch .mi{font-size:24px}

.gate-live h2,.gate-waiting h2{font-size:20px}
.gate-live-count{font-weight:600;color:#5b636c;font-size:16px}
.gate-waiting[hidden]{display:none}
.live-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid #eef0f2}
.live-row:last-child{border-bottom:0}
.live-who{flex:1;min-width:0}
.live-people,.live-time{display:inline-flex;align-items:center;gap:4px;font-size:15px;color:#3a3f45;font-weight:600}
.live-time{color:#5b636c;font-weight:500}
.live-people .mi,.live-time .mi{font-size:18px}
.live-money{font-size:15px;font-weight:700;color:#1f2328}
.free-tag{font-size:15px}
.btn-undo{display:inline-flex;align-items:center;gap:6px;height:50px;padding:0 18px;border-radius:14px;border:2px solid #e3e6ea;background:#fff;color:#1f2328;font:700 16px var(--font-family);cursor:pointer;flex:none}
.btn-undo .mi{font-size:22px;color:#5b636c}
.btn-undo:hover{border-color:var(--danger);background:var(--danger-bg);color:var(--danger)}
.btn-undo:hover .mi{color:var(--danger)}

@media(max-width:720px){
  .gate-help p{font-size:17px}
  .gate-act{flex-wrap:wrap}
  .gate-act .stepper{flex:1;width:auto}
  .btn-checkin.big{flex:1;justify-content:center}
  .gate-unpaid-actions{width:100%}
  .btn-gate-choice{flex:1;justify-content:center}
  .live-row{flex-wrap:wrap}
  .btn-undo{margin-left:66px}
}

/* ============================================================
   Settings
   ============================================================ */
.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;align-items:start}
.settings-grid .card{margin-bottom:0}
.settings-card h2{font-size:20px}
.settings-card .csub{font-size:15px}
.settings-divider{height:1px;background:#eef0f2;margin:22px 0}
.settings-sub{font-size:16px;margin:24px 0 8px;color:#3a3f45}
.btn-lg.wide{width:100%;justify-content:center}
.hint-error{color:#b3261e;font-weight:600}
.inp.inp-error{border-color:#b3261e}
.current-year{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;margin-bottom:18px;border-radius:14px;background:var(--ok-tint);border:1px solid #e3efe6;box-shadow:inset 3px 0 0 var(--ok)}
.current-year-label{font-size:24px;font-weight:800;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.current-year-label .badge .mi{font-size:16px}
.current-year-dates{font-size:15px;color:#3a3f45;margin-top:4px}
.past-years{display:flex;flex-direction:column}
.past-year{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid #eef0f2}
.past-year:last-child{border-bottom:0}

.method-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:64px;padding:8px 0;border-bottom:1px solid #eef0f2;cursor:pointer}
.method-row:last-of-type{border-bottom:0}
.method-name{display:flex;align-items:center;gap:12px;font-size:18px;font-weight:700}
.method-name .mi{font-size:26px;color:#e8730c}
.method-toggle{display:flex;align-items:center;gap:12px}
.method-state{font-size:14px;font-weight:700;color:#8a9199;min-width:28px;text-align:right}
.method-state.on{color:var(--ok)}
.method-row .switch{width:60px;height:36px}
.method-row .switch-slider::before{width:30px;height:30px}
.method-row .switch input:checked + .switch-slider::before{transform:translateX(24px)}

.data-actions{display:flex;flex-direction:column;gap:12px}
.data-action{display:flex;align-items:center;gap:16px;width:100%;min-height:72px;padding:12px 18px;border:1.5px solid #e3e6ea;border-radius:16px;background:#fff;color:#1f2328;text-align:left;font-family:var(--font-family);cursor:pointer}
.data-action:hover{border-color:#e8730c;background:#fffaf5;text-decoration:none}
.data-action > .mi{font-size:30px;color:#e8730c;flex:none}
.data-action strong{display:block;font-size:17px}
.data-action em{display:block;font-style:normal;font-size:14px;color:#5b636c;margin-top:2px}

.restore-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid #eef0f2}
.restore-row:last-child{border-bottom:0}
.restore-row form{margin:0}
.btn-restore{display:inline-flex;align-items:center;gap:8px;height:52px;padding:0 20px;border:0;border-radius:14px;background:#e8730c;color:#fff;font:700 16px var(--font-family);cursor:pointer;box-shadow:0 10px 22px -12px rgba(232,115,12,.7)}
.btn-restore .mi{font-size:22px}
.btn-restore:hover{background:#c85e00}

/* receipts: phone + signature */
.receipt-phone{display:inline-flex;align-items:center;gap:4px;font-weight:600}
.receipt-phone .mi{font-size:16px}
.receipt-sign{margin-top:36px;display:flex;flex-direction:column;align-items:flex-end}
.receipt-sign-line{width:220px;border-top:1.5px solid #1f2328}
.receipt-sign-label{font-size:13px;color:#3a3f45;margin-top:6px}

@media(max-width:1000px){
  .settings-grid{grid-template-columns:1fr}
}
@media(max-width:720px){
  .restore-row{flex-wrap:wrap}
  .restore-row form{width:100%}
  .btn-restore{width:100%;justify-content:center}
  .current-year-label{font-size:21px}
}

/* ============================================================
   Membership types: badge palette (first two keep Owner / Employee colours)
   ============================================================ */
.badge-type-0,.ti.badge-type-0{background:var(--owner-bg);color:var(--owner)}
.badge-type-1,.ti.badge-type-1{background:var(--employee-bg);color:var(--employee)}
.badge-type-2,.ti.badge-type-2{background:#e3f1fb;color:#0b5c8f}
.badge-type-3,.ti.badge-type-3{background:#e6f4f1;color:#0f6b5c}
.badge-type-4,.ti.badge-type-4{background:#fce8f1;color:#a4235f}
.badge-type-5,.ti.badge-type-5{background:#eef0f3;color:#3a4552}

.type-list{display:flex;flex-direction:column;margin-bottom:18px}
.type-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid #eef0f2}
.type-row:last-of-type{border-bottom:0}
.type-row .badge{min-width:96px;justify-content:center}
.type-info{flex:1;min-width:0}
.type-amount{font-size:18px;font-weight:700;font-variant-numeric:tabular-nums}
.type-row.is-off .badge{opacity:.55}
.type-row.is-off .type-amount{color:#8a9199}
.type-row .row-actions form{margin:0}
@media(max-width:720px){
  .type-row{flex-wrap:wrap}
  .type-row .row-actions{width:100%;justify-content:flex-start}
}

.login-user{display:flex;align-items:center;gap:12px;padding:14px 16px;margin-bottom:18px;border-radius:14px;background:var(--panel);border:1px solid var(--border)}

/* ============================================================
   Top bar: page title left, account pill pinned right
   ============================================================ */
.appbar{position:sticky;top:0;z-index:15;display:flex;align-items:center;justify-content:space-between;gap:16px;height:68px;margin:calc(-1 * var(--space-lg)) calc(-1 * var(--space-lg)) var(--space-lg);padding:0 var(--space-lg);background:rgba(255,255,255,.86);-webkit-backdrop-filter:saturate(180%) blur(12px);backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--border)}
.appbar-title{display:flex;align-items:center;gap:12px;min-width:0;font-size:18px;font-weight:700;color:var(--ink);letter-spacing:-.01em}
.appbar-title > span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.appbar-icon{width:36px;height:36px;border-radius:10px;flex:none;display:flex;align-items:center;justify-content:center;background:var(--accent-soft);color:var(--accent)}
.appbar-icon .mi{font-size:21px}

/* Account pill + dropdown card */
.user-menu{position:relative;flex:none}
.user-menu > summary{list-style:none}
.user-menu > summary::-webkit-details-marker{display:none}
.user-pill{display:flex;align-items:center;gap:10px;height:50px;padding:0 12px 0 6px;border-radius:999px;border:1px solid var(--border);background:#fff;cursor:pointer;user-select:none;-webkit-user-select:none;box-shadow:0 1px 2px rgba(31,35,40,.04),0 4px 14px -8px rgba(31,35,40,.18);transition:border-color .15s ease,box-shadow .15s ease}
.user-pill:hover{border-color:#f1cfb0;box-shadow:0 6px 18px -8px rgba(232,115,12,.35)}
.user-menu[open] .user-pill{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.user-pill:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
.user-avatar{width:38px;height:38px;border-radius:50%;flex:none;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#f08a24 0%,#d4451a 55%,#a01e1e 100%);color:#fff;font-size:14px;font-weight:700;letter-spacing:.03em;box-shadow:inset 0 0 0 2px rgba(255,255,255,.35)}
.user-avatar.lg{width:46px;height:46px;font-size:16px}
.user-pill-text{display:flex;flex-direction:column;line-height:1.2;text-align:left}
.user-pill-name{font-size:14.5px;font-weight:600;color:var(--ink);white-space:nowrap}
.user-pill-role{font-size:12px;color:var(--ink2);white-space:nowrap}
.user-pill-caret{font-size:20px;color:var(--ink2);transition:transform .15s ease}
.user-menu[open] .user-pill-caret{transform:rotate(180deg)}

.user-dropdown{position:absolute;right:0;top:calc(100% + 10px);z-index:60;width:290px;background:#fff;border:1px solid var(--border);border-radius:18px;box-shadow:0 24px 48px -16px rgba(31,35,40,.28),0 2px 6px rgba(31,35,40,.05);overflow:hidden;animation:user-drop .14s ease-out}
@keyframes user-drop{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.user-dropdown-head{display:flex;align-items:center;gap:12px;padding:18px 18px 16px;background:linear-gradient(180deg,#fff8f1 0%,#fff 100%);border-bottom:1px solid #f0f1f3}
.user-dropdown-who{min-width:0}
.user-dropdown-name{font-size:15.5px;font-weight:700;color:var(--ink)}
.user-dropdown-sub{font-size:12.5px;color:var(--ink2);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.user-dropdown-items{padding:8px}
.user-dropdown-foot{margin:0;padding:8px;border-top:1px solid #f0f1f3}
.user-dropdown-item{display:flex;align-items:center;gap:12px;width:100%;height:44px;padding:0 12px;border:0;border-radius:10px;background:none;color:var(--ink);font:500 14.5px var(--font-family);text-align:left;cursor:pointer}
.user-dropdown-item .mi{font-size:20px;color:var(--ink2)}
.user-dropdown-item:hover,.user-dropdown-item:focus-visible{background:var(--panel);text-decoration:none;outline:0}
.user-dropdown-item:hover .mi{color:var(--accent)}
.user-dropdown-item.danger,.user-dropdown-item.danger .mi{color:var(--danger)}
.user-dropdown-item.danger:hover{background:var(--danger-bg)}
.user-dropdown-item.danger:hover .mi{color:var(--danger)}

@media(max-width:720px){
  .appbar{display:none}
  .topbar{height:60px}
  .topbar .user-pill{height:42px;padding:0 6px 0 3px;gap:4px;box-shadow:none}
  .topbar .user-pill-text{display:none}
  .topbar .user-avatar{width:34px;height:34px;font-size:13px}
  .topbar .user-dropdown{position:fixed;top:68px;right:12px;left:auto;width:min(310px,calc(100vw - 24px))}
  .topbar-title{flex:1;min-width:0;padding:0 8px;font-size:16px;font-weight:700;color:var(--ink);text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .sidebar{top:0;z-index:50;width:min(300px,84vw);box-shadow:none;visibility:hidden;transition:transform .22s ease,visibility 0s linear .22s;overflow-y:auto;-webkit-overflow-scrolling:touch}
  body.nav-open .sidebar{visibility:visible;box-shadow:var(--shadow-lg);transition:transform .22s ease,visibility 0s}
  .nav-overlay{position:fixed;inset:0;z-index:45;background:rgba(20,22,26,.45);opacity:0;transition:opacity .2s ease;-webkit-tap-highlight-color:transparent}
  body.nav-open .nav-overlay{opacity:1}
  body.nav-open{overflow:hidden}  /* no page scroll behind the open drawer */
  .sidebar-toggle{min-height:44px;padding:0 10px 0 4px;border-radius:12px;font-family:var(--font-family)}
  .sidebar-toggle:active{background:var(--panel)}
}
@media print{.appbar,.user-menu{display:none!important}}

/* ============================================================
   Sign-in + password reset pages
   ============================================================ */
.auth-sub{font-size:15.5px;line-height:1.55;color:var(--ink2);margin:-16px 0 24px}
.auth-msg{display:flex;align-items:center;gap:8px;font-size:14.5px;font-weight:600;margin:-12px 0 20px}
.auth-msg.error{color:var(--danger)}
.auth-msg .mi{font-size:20px}
.auth-link{display:inline-flex;align-items:center;justify-content:center;gap:6px;align-self:center;margin-top:18px;padding:8px 12px;border-radius:10px;font-size:15px;font-weight:600;color:var(--accent-dark)}
.auth-link:hover{background:var(--accent-soft);text-decoration:none}
.auth-link .mi{font-size:18px}
.auth-icon{width:64px;height:64px;border-radius:18px;display:flex;align-items:center;justify-content:center;background:var(--ok-bg);color:var(--ok);margin-bottom:20px}
.auth-icon.warn{background:var(--danger-bg);color:var(--danger)}
.auth-icon .mi{font-size:36px}
a.bigbtn{text-decoration:none}
a.bigbtn:hover{background:var(--accent-dark)}


/* ============================================================
   Stat cards: values always stay inside the card
   ============================================================ */
.summary-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr))}
.summary-card{min-width:0;overflow:hidden}
.summary-text{flex:1;min-width:0}
.summary-value,.dash-value,.progress-v{display:block;max-width:100%;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:clip}
.summary-label{overflow-wrap:anywhere}
.dash-cards{grid-template-columns:repeat(4,minmax(0,1fr))}
.dash-card{min-width:0;overflow:hidden}
@media(max-width:1100px){.dash-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){
  .summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:380px){
  .summary-grid,.dash-cards{grid-template-columns:minmax(0,1fr)}
}

/* ============================================================
   Membership progress (dashboard + Collections report)
   ============================================================ */
.progress-card{margin-bottom:12px}
.progress-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.progress-head h2{margin:0}
.progress-line{font-size:17px;color:#3a3f45;margin:14px 0 12px;line-height:1.5}
.progress-line strong{color:var(--ink)}
.progress-line .dot{color:#b0b6bd;margin:0 4px}
.progress-bar{height:12px;border-radius:999px;background:#eef0f2;overflow:hidden}
.progress-bar span{display:block;height:100%;min-width:4px;border-radius:inherit;background:linear-gradient(90deg,#2a9152,#1a7a3c)}
.progress-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}
.progress-stats > div{min-width:0;padding:12px 14px;border:1px solid var(--border);border-radius:14px;background:#fcfcfd}
.progress-k{display:block;font-size:13px;color:#5b636c}
.progress-v{font-size:22px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums;margin-top:2px}
.progress-v.ok{color:var(--ok)}
.progress-v.warn{color:#8a5a00}
.progress-links{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 20px}
.report-detail-progress{margin-top:4px}
@media(max-width:720px){
  .progress-actions,.progress-actions .btn-lg{width:100%;justify-content:center}
  .progress-stats{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .progress-stats > div:first-child{grid-column:1 / -1}
  .progress-line{font-size:15.5px}
}

.print-note{font-size:13px;font-weight:600;color:#8a3d05;margin:0 0 14px;padding:8px 12px;border-left:3px solid #e8730c;background:#fff8f1}
@media print{.print-note{-webkit-print-color-adjust:exact;print-color-adjust:exact}}

/* ============================================================
   Community logo (sidebar, dashboard bar, receipts, prints, login)
   ============================================================ */
.logo-img{display:block;width:100%;height:100%;object-fit:contain}
.sidebar-logo.has-img,.appbar-icon.has-img,.receipt-logo.has-img,.print-logo.has-img{background:#fff;border:1px solid var(--border);padding:3px;overflow:hidden}
.appbar-icon.has-img{width:40px;height:40px;border-radius:11px}
.receipt-logo.has-img{padding:4px}

.logo-current{display:flex;align-items:center;gap:16px;padding:14px 16px;margin-bottom:16px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}
.logo-preview{width:72px;height:72px;flex:none;border-radius:16px;background:#fff;border:1px solid var(--border);display:flex;align-items:center;justify-content:center;overflow:hidden;padding:6px}
.logo-preview img{width:100%;height:100%;object-fit:contain}
.logo-preview.empty{background:var(--accent);border-color:var(--accent);color:#fff}
.logo-preview.empty .mi{font-size:36px}
.logo-drop{position:relative;display:flex;align-items:center;gap:14px;min-height:72px;padding:12px 18px;border:2px dashed #f0c9a6;border-radius:16px;background:#fffaf5;cursor:pointer}
.logo-drop:hover,.logo-drop:focus-within{border-color:var(--accent);background:#fff4ea}
.logo-drop.has-error{border-color:var(--danger)}
.logo-drop > .mi{font-size:30px;color:var(--accent);flex:none}
.logo-drop-text{min-width:0}
.logo-drop-text strong{display:block;font-size:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.logo-drop-text em{display:block;font-style:normal;font-size:13.5px;color:#5b636c;margin-top:2px}
/* The real file input covers the drop zone, so a tap anywhere opens the picker (iOS/Android too). */
.logo-drop input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
#logo .form-actions{margin-top:14px}
.logo-remove{margin-top:10px;color:var(--danger)}
.logo-remove .mi{color:var(--danger)}
.method-row.is-disabled{cursor:not-allowed;opacity:.55}
.cell-phone a{color:var(--ink);font-weight:500;white-space:nowrap}
.muted{color:#9aa0a6}

/* ============================================================
   Phones: wide tables become one card per row (label: value)
   ============================================================ */
@media (max-width:720px){
  .table-card:has(.stack-table){padding:4px 12px 12px;background:transparent;border:0;box-shadow:none}
  .table-scroll:has(.stack-table){overflow:visible;margin:0;padding:0}
  table.stack-table,.stack-table tbody,.stack-table tfoot,.stack-table tr,.stack-table td{display:block;width:100%}
  .stack-table thead{display:none}
  .stack-table tbody tr,.stack-table tfoot tr{position:relative;display:flex;flex-direction:column;margin:0 0 12px;padding:6px 16px 8px;background:#fff;border:1px solid var(--border);border-radius:16px;box-shadow:0 2px 8px rgba(31,35,40,.04)}
  .stack-table tbody tr:hover{background:#fff}
  .stack-table td{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:40px;padding:8px 0!important;border-bottom:1px solid #f0f1f3;text-align:right!important;white-space:normal!important;font-size:15px}
  .stack-table td::before{content:attr(data-label);flex:none;max-width:45%;text-align:left;font-size:12px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#7a828b}
  .stack-table td:last-child{border-bottom:0}
  .stack-table td.actions-cell{order:99}
  .stack-table td > *{min-width:0}
  /* Card title: the name (or first) column, full width, no label */
  .stack-table td.cell-head{order:-1;display:block;text-align:left!important;padding:10px 0 12px!important;font-size:16px}
  .stack-table td.cell-head::before{display:none}
  .stack-table td.cell-head .cell-strong{font-size:16.5px}
  /* Actions: a row of buttons at the bottom of the card */
  .stack-table td.actions-cell{display:block;padding:12px 0 6px!important;width:100%}
  .stack-table td.actions-cell::before{display:none}
  .stack-table td.actions-cell:empty,.stack-table td.actions-cell:not(:has(*)){display:none}
  .stack-table .row-actions{justify-content:flex-start;flex-wrap:wrap;gap:8px}
  .stack-table .row-actions .act,.stack-table .row-actions form{flex:1 1 auto}
  .stack-table .row-actions .act{justify-content:center;height:42px}
  /* Totals card */
  .stack-table tfoot tr{background:var(--panel);border-color:#d9dde2}
  .stack-table tfoot td{border-top:0!important;background:transparent!important;font-weight:700}
  .stack-table tfoot td:empty{display:none}
  /* Status accents move from the first cell to the card edge */
  table.stack-table tbody tr.row-paid{box-shadow:inset 3px 0 0 var(--ok),0 2px 8px rgba(31,35,40,.04);border-color:#dfeee4}
  table.data-table.stack-table tbody tr.row-paid > td:first-child{box-shadow:none}
  .stack-table tbody tr.row-void{opacity:.75}
  .stack-table tbody tr.row-void td{text-decoration:none!important}
  .stack-table td.cell-id{font-variant-numeric:tabular-nums;color:#5b636c}
}

/* Mobile drawer overlay: only exists at phone width (rules in the 720px block above) */
@media (min-width:721px){ .nav-overlay{display:none !important} }
@media print{ .nav-overlay{display:none !important} }

/* ------------------------------------------------ membership years, gate v2, volunteers */
.badge-lapsed{background:var(--danger-bg);color:var(--danger);font-weight:600}
.already-paid{display:flex;align-items:flex-start;gap:10px;font-weight:500}
.already-paid a{color:inherit;font-weight:700;text-decoration:underline}
.already-paid .mi{font-size:20px;flex:none}
button.is-sending{opacity:.65;cursor:progress}

.gate-renew{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:14px;font-weight:600;color:var(--accent-dark)}
.gate-renew .mi{font-size:18px}
.gate-ask-admin{width:100%;margin:4px 0 0}
.live-by{display:inline-flex;align-items:center;gap:4px;font-size:14px;color:var(--ink2)}
.live-by .mi{font-size:17px}

.year-list,.vol-list{display:flex;flex-direction:column}
.year-row,.vol-row{display:flex;align-items:center;gap:14px;padding:14px 0;border-bottom:1px solid #eef0f2}
.year-row:last-child,.vol-row:last-child{border-bottom:0}
.year-main,.vol-main{flex:1;min-width:0}
.year-main .badge,.vol-main .badge{margin-left:6px;vertical-align:middle}
.year-row .row-actions form,.vol-row .row-actions form{margin:0}
.vol-row.is-off .user-avatar{opacity:.5}
.act.is-disabled{color:var(--muted);cursor:default;pointer-events:none}
.vol-event{display:flex;align-items:center;gap:16px;margin-bottom:12px;color:inherit}
.vol-event:hover{text-decoration:none}
.vol-event .live-text{flex:1;display:flex;flex-direction:column}
.vol-event .live-go{color:var(--accent-dark);font-weight:600;display:inline-flex;align-items:center;gap:4px}
@media (max-width:720px){
  .year-row,.vol-row{flex-wrap:wrap}
  .year-row .row-actions,.vol-row .row-actions{width:100%;justify-content:flex-start;flex-wrap:wrap}
  .year-main .badge,.vol-main .badge{margin:4px 6px 0 0}
  .vol-event{flex-wrap:wrap}
}

/* ------------------------------------------------ dashboard overlap + year pickers */
.year-picker{min-width:200px}
.year-picker .f,.year-picker .inp{margin:0}
.year-picker .lbl{display:block;margin-bottom:6px}
.overlap{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-bottom:20px}
.overlap-card{display:flex;flex-direction:column;gap:6px;margin:0;color:inherit;border-left:4px solid var(--accent)}
.overlap-card.is-ending{border-left-color:var(--ok)}
.overlap-card:hover{text-decoration:none;box-shadow:0 10px 24px -16px rgba(31,35,40,.45)}
.overlap-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}
.overlap-label{font-weight:700;font-size:18px}
.overlap-value{font-size:30px;font-weight:700;line-height:1.1;white-space:nowrap;overflow:hidden}
.overlap-sub{color:var(--ink2);font-size:14px}
@media (max-width:720px){
  .year-picker{width:100%}
  .overlap{grid-template-columns:1fr}
}

/* ------------------------------------------------ iPhone home-screen app (viewport-fit=cover) */
/* Keep content clear of the notch / rounded corners in landscape and the home bar at the bottom. */
body{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.main{padding-bottom:calc(var(--space-lg) + env(safe-area-inset-bottom))}
.sidebar{padding-left:env(safe-area-inset-left);padding-bottom:env(safe-area-inset-bottom)}
.toast{bottom:calc(24px + env(safe-area-inset-bottom))}
@media (max-width:720px){
  .topbar{padding-top:max(var(--space-sm),env(safe-area-inset-top))}
}

/* ============================================================
   Brand fonts (self-hosted, Latin subset; OFL licences in static/fonts/)
   ============================================================ */
@font-face{font-family:"Fraunces";src:url("../fonts/Fraunces-Bold.ad77767a71b1.woff2") format("woff2");font-weight:700;font-style:normal;font-display:swap}
@font-face{font-family:"Plus Jakarta Sans";src:url("../fonts/PlusJakartaSans-Regular.aaa5b6752e8b.woff2") format("woff2");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Plus Jakarta Sans";src:url("../fonts/PlusJakartaSans-SemiBold.458c3dc63c7d.woff2") format("woff2");font-weight:600;font-style:normal;font-display:swap}
@font-face{font-family:"Plus Jakarta Sans";src:url("../fonts/PlusJakartaSans-ExtraBold.415f24b6b5b8.woff2") format("woff2");font-weight:800;font-style:normal;font-display:swap}
:root{
  --saffron:#FF9933;--maroon:#4A1208;--maroon-2:#7C1D0E;--cream:#FFF7ED;--brand-btn:#C2410C;
  --font-display:"Fraunces",Georgia,serif;--font-brand:"Plus Jakarta Sans","Segoe UI",Roboto,Arial,sans-serif;
}

/* ============================================================
   QR membership cards (admin)
   ============================================================ */
.qr-card-panel{margin-top:18px}
.breadcrumb + .no-print .receipt-toolbar{margin-top:14px}
.qr-card-img{display:block;width:100%;max-width:640px;height:auto;margin:6px auto 16px;border-radius:18px;box-shadow:var(--shadow-md)}
.qr-card-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}
.qr-card-actions .btn-lg{justify-content:center;text-decoration:none;padding:0 16px}
.receipt-with-card-btn{margin-top:14px}
.print-card{display:none}
.confirm-card{max-width:680px}
.confirm-list{margin:8px 0 18px;padding-left:22px;line-height:1.6}
.confirm-count{font-size:18px;margin:6px 0 10px}
.check-row{display:flex;gap:12px;align-items:flex-start;padding:14px;border:1.5px solid var(--border);border-radius:14px;margin-bottom:6px;cursor:pointer;line-height:1.45}
.check-row input{width:22px;height:22px;margin-top:1px;flex:none;accent-color:var(--accent)}
.btn-lg.primary.danger-btn{background:var(--danger);box-shadow:none}
.color-row{display:flex;align-items:center;gap:14px;margin-bottom:12px}
.color-row input[type=color]{width:64px;height:48px;padding:2px;border:1.5px solid var(--border);border-radius:12px;background:#fff;cursor:pointer}
.card-year-stats{margin:6px 0 12px;padding-left:20px;color:var(--ink2);line-height:1.7}
.bulk-cards-form select{border:0;background:transparent;font:inherit;width:100%;height:100%;outline:none}
.card-list{list-style:none;margin:0;padding:0}
.card-list li{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:12px 0;border-top:1px solid var(--border)}
.card-list li:first-child{border-top:0}
.card-list li a{display:inline-flex;align-items:center;gap:6px;color:var(--ink);text-decoration:none}
.card-list li.is-revoked a{color:var(--muted)}
.card-list .row-meta{margin:0}
.pass-link-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-bottom:8px}
.pass-link-url{word-break:break-all;font-size:14px}
.info-add{font-size:14px;margin-left:6px}
@media print{
  .print-card.always,body.print-with-card .print-card{display:block!important;margin:14mm auto 0;width:85.6mm;page-break-inside:avoid}
  .print-card img{display:block;width:85.6mm;height:auto;border:0.3mm dashed #9aa0a6;border-radius:3mm;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .breadcrumb{display:none!important}
}

/* ============================================================
   Public pass page (/pass/<token>/) — no sidebar, phone first
   ============================================================ */
.pass-body{min-height:100%;background:var(--cream);font-family:var(--font-brand);color:#2b1a14}
.pass-page{max-width:560px;margin:0 auto;padding:22px 16px 40px}
.pass-head{display:flex;align-items:center;gap:12px;margin-bottom:22px}
.pass-logo{width:56px;height:56px;border-radius:50%;background:#fff;display:grid;place-items:center;overflow:hidden;box-shadow:0 4px 14px rgba(74,18,8,.12);flex:none}
.pass-logo img{width:80%;height:80%;object-fit:contain}
.pass-logo span{font-family:var(--font-display);font-weight:700;color:var(--maroon);font-size:20px}
.pass-org{font-family:var(--font-display);font-weight:700;font-size:22px;color:var(--maroon)}
.pass-place{font-size:11px;font-weight:800;letter-spacing:.22em;color:var(--maroon-2)}
.pass-name{font-family:var(--font-display);font-weight:700;font-size:28px;line-height:1.15;margin:0;color:var(--maroon)}
.pass-mid{margin:4px 0 12px;font-weight:600;color:#6b4b40}
.pass-status{display:inline-flex;align-items:center;gap:8px;padding:8px 14px;border-radius:999px;font-weight:800;font-size:16px;margin:0 0 16px}
.pass-status .dot{width:10px;height:10px;border-radius:50%;background:currentColor}
.pass-status.ok{background:#e3f4e8;color:#13703a}
.pass-status.bad{background:#fde5e2;color:#b3261e}
.pass-status.soon{background:#fff1d6;color:#8a5a00}
.pass-card{display:block;width:100%;height:auto;border-radius:16px;box-shadow:0 18px 40px -16px rgba(74,18,8,.45)}
.pass-tip{text-align:center;color:#6b4b40;font-size:14px;margin:12px 0 16px}
.pass-actions{display:grid;gap:10px}
.pass-btn{display:flex;align-items:center;justify-content:center;height:54px;border-radius:14px;border:1.5px solid #e9d8c8;background:#fff;color:var(--maroon);font:inherit;font-weight:800;font-size:17px;text-decoration:none;cursor:pointer}
.pass-btn.primary{background:var(--brand-btn);border-color:var(--brand-btn);color:#fff}
.pass-howto{margin-top:26px;background:#fff;border-radius:16px;padding:18px 18px 8px;border:1px solid #f0e2d3}
.pass-howto h2{font-family:var(--font-display);font-size:19px;margin:0 0 6px;color:var(--maroon)}
.pass-howto h3{font-size:13px;letter-spacing:.14em;text-transform:uppercase;margin:14px 0 4px;color:var(--maroon-2)}
.pass-howto ul{margin:0 0 8px;padding-left:20px;line-height:1.55;font-size:15px}
.pass-empty{background:#fff;border-radius:14px;padding:16px;border:1px solid #f0e2d3;line-height:1.5}

/* ============================================================
   Gate: QR scanner + result sheet, lock banner, live gate view
   ============================================================ */
.gate-locked{display:flex;gap:12px;align-items:flex-start;background:#fff4d6;color:#6b4500;border:1px solid #f3d27a;border-radius:16px;padding:14px 16px;margin:0 0 16px;line-height:1.45}
.gate-locked[hidden]{display:none}
.gate-locked .mi{color:#8a5a00}
.badge-more{background:#fff1d6;color:#8a5a00}
.badge-entry{background:#eef1f4;color:#3a3f45;font-weight:600}
.badge-entry.entry-qr{background:#e6f4ea;color:#13703a}
.badge-entry.entry-manual{background:#fde8e6;color:#9b2c1f}
.badge-entry.entry-guest{background:var(--employee-bg);color:var(--employee)}
.gate-more{margin-top:10px}
body.scanning{overflow:hidden}
.scanner{position:fixed;inset:0;z-index:1000;background:#0b0b0c;color:#fff;display:flex;flex-direction:column}
.scanner[hidden]{display:none}
.scanner-top{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px}
.scanner-title{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:17px}
.scanner-close{display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 16px;border-radius:12px;border:0;background:rgba(255,255,255,.14);color:#fff;font:inherit;font-weight:600;cursor:pointer}
.scanner-view{position:relative;flex:1;min-height:0;overflow:hidden}
.scanner-view video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.scan-frame{position:absolute;left:50%;top:46%;width:min(68vw,320px);aspect-ratio:1;transform:translate(-50%,-50%);border-radius:24px;box-shadow:0 0 0 9999px rgba(0,0,0,.45);border:3px solid rgba(255,255,255,.9)}
.scanner-hint{margin:0;padding:12px 16px calc(14px + env(safe-area-inset-bottom));text-align:center;font-size:15px;color:#e8e8e8}
.scan-sheet{position:absolute;left:0;right:0;bottom:0;max-height:88%;overflow:auto;background:#fff;color:var(--ink);border-radius:22px 22px 0 0;padding:16px 16px calc(16px + env(safe-area-inset-bottom));box-shadow:0 -12px 40px rgba(0,0,0,.35);border-top:8px solid #999;animation:sheetup .18s ease-out;z-index:3}
.scan-sheet[hidden]{display:none}
@keyframes sheetup{from{transform:translateY(40px)}to{transform:none}}
.scanner-hint[hidden]{display:none}
.scan-sheet.green{border-top-color:#1f9d4c}
.scan-sheet.amber{border-top-color:#e8a10c}
.scan-sheet.red{border-top-color:#c62828}
.ss-head{display:flex;align-items:center;gap:8px;font-size:21px;font-weight:800;margin-bottom:8px}
.green .ss-head{color:#13703a}.amber .ss-head{color:#8a5a00}.red .ss-head{color:#b3261e}
.ss-head .mi{font-size:28px}
.ss-name{font-size:20px;font-weight:700;line-height:1.25}
.ss-meta{color:var(--ink2);font-size:14px;margin-top:2px}
.ss-who{margin-bottom:10px}
.ss-reason{margin:6px 0 10px;font-size:16px;line-height:1.4}
.ss-error{margin:0 0 8px;padding:10px 12px;border-radius:10px;background:var(--danger-bg);color:var(--danger);font-weight:600}
.hc{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin:10px 0}
.hc-chip{height:56px;border-radius:14px;border:2px solid #dfe3e8;background:#fff;font:inherit;font-size:20px;font-weight:800;color:var(--ink);cursor:pointer}
.hc-chip.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-dark)}
.hc-more{display:flex;align-items:center;gap:10px;margin:0 0 10px}
.hc-more[hidden]{display:none}
.hc-more input{width:96px;height:48px;border:2px solid #dfe3e8;border-radius:12px;font:inherit;font-size:20px;font-weight:700;text-align:center}
.ss-go,.ss-btn,.ss-next{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;border-radius:16px;font:inherit;font-weight:800;cursor:pointer;text-decoration:none;margin-top:10px}
.ss-go{height:64px;border:0;background:#1f9d4c;color:#fff;font-size:20px}
.ss-go.amber{background:#c77c00}
.ss-go:disabled{opacity:.5}
.ss-btn{height:54px;border:2px solid #dfe3e8;background:#fff;color:var(--ink);font-size:17px}
.ss-btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.ss-next{height:50px;border:0;background:#eef1f4;color:var(--ink);font-size:16px}
.lock-card.is-locked{border:1.5px solid #f3d27a;background:#fffaf0}
.lock-form{max-width:560px}
.lv-progress-card{padding-bottom:20px}
.lv-progress-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin-bottom:10px}
.lv-big{font-size:40px;font-weight:800;line-height:1}
.lv-of{color:var(--ink2);font-size:16px}
.lv-percent{font-size:22px;font-weight:800;color:var(--ok)}
.lv-bar{height:14px;border-radius:999px;background:#eef1f4;overflow:hidden}
.lv-bar span{display:block;height:100%;width:0;background:linear-gradient(90deg,#1f9d4c,#5cc27f);border-radius:999px;transition:width .4s}
.lv-stats{margin:16px 0}
.lv-methods{white-space:nowrap}
.lv-table-title{margin:14px 0 6px}
.audit-list{list-style:none;margin:0;padding:0}
.audit-list li{padding:10px 0;border-top:1px solid var(--border);line-height:1.45}
.audit-list li:first-child{border-top:0}
.audit-list .row-meta{display:block;margin:2px 0 0}
.inp select{min-width:0;width:100%;flex:1;text-overflow:ellipsis}
.inp input[type=time]{min-width:0;flex:1}
@media(max-width:720px){
  .scan-open{order:-1;width:100%;justify-content:center;height:60px;font-size:18px}
  .gate-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .gate-actions .btn-lg{width:100%;justify-content:center;padding:0 10px;height:50px;font-size:15px;gap:6px}
  .gate-actions .scan-open{grid-column:1/-1;height:60px;font-size:18px}
  .lv-big{font-size:34px}
}
@media (prefers-reduced-motion: reduce){.scan-sheet{animation:none}.lv-bar span{transition:none}}
@media(max-width:720px){
  .confirm-card .form-actions{flex-direction:column;align-items:stretch}
  .confirm-card .form-actions .btn-lg{width:100%;justify-content:center}
}

/* ============================================================
   Overflow guard (every page, 390px phone → desktop): text and numbers never leave
   their card, badge, label or cell. Long text wraps; "…" truncation shows the full text
   on hover (title) and on tap (.is-open) — see markTruncated() in base.html. Big numbers
   shrink to fit (fitValues() in base.html). Tables scroll inside their own box.
   ============================================================ */
/* Tables: the scroll box is also the containing block, so the hidden "Actions" header
   label (.sr-only, position:absolute) can't escape it and widen the page. */
.table-scroll{position:relative}
@media screen{.print-page{position:relative;overflow-x:auto}}

/* Long names and labels wrap onto the next line instead of spilling. */
.cell-strong,.gate-name,.ss-name,.ss-meta,.ss-reason,.row-meta,.summary-label,.gc-label,.info-value,
.receipt-row span,.live-who,.name-cell > div,.card-list li,.audit-list li,.vol-row,.year-row,
.gate-done,.lv-of,.pass-link-url{overflow-wrap:anywhere;min-width:0}
.gate-badges > *,.live-who .gate-badges > *{max-width:100%;min-width:0;overflow-wrap:anywhere}

/* Badges/pills: never broken mid-word; they move to the next line as a whole. */
.badge{max-width:100%;overflow-wrap:break-word;word-break:normal;vertical-align:middle}

/* Truncated with … : full text on hover and on tap. */
.is-truncated{cursor:pointer}
.is-truncated.is-open{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere}

/* Form controls shrink with their box (e.g. the big guest amount on a phone). */
.inp input,.inp select,.inp textarea,.stepper input{min-width:0}
.inp input,.inp select{width:100%}
.lt-field{min-width:0;max-width:100%}
.lt-field select,.lt-field input{min-width:0;max-width:100%}

/* Rows of buttons / cards wrap instead of squeezing. */
.vol-row,.year-row,.vol-row .row-actions,.year-row .row-actions,.gate-act,.row-actions{flex-wrap:wrap}
.detail-actions{flex-wrap:wrap}

/* Stat numbers: one line, sized to fit their card (fitValues shrinks long ones). */
.gate-counters{grid-template-columns:repeat(4,minmax(0,1fr))}
.gate-counter{min-width:0;overflow:hidden}
.gc-value,.lv-big,.lv-percent,.lv-methods{display:block;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:clip}
.lv-progress-top > div{min-width:0}
.lv-big{display:inline-block;vertical-align:baseline}
@media(max-width:1000px){.gate-counters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:340px){.gate-counters{grid-template-columns:minmax(0,1fr)}}
/* Stat card text column may shrink, so fitValues() can size the number to the card. */
.summary-card > :not(.summary-icon){flex:1 1 auto;min-width:0}
/* Account pill: a long display name shortens with … (full name on hover/tap and in the menu). */
.user-pill-name{display:block;max-width:180px;overflow:hidden;text-overflow:ellipsis}
.appbar-title{flex:1 1 auto}
/* Rows with a name + buttons: the name keeps at least ~240px, else the buttons wrap below. */
.year-main,.vol-main{flex:1 1 240px}
.type-info{flex:1 1 160px}
/* Add / edit member: the single phone column may shrink below its content's natural width. */
@media (max-width: 900px){.form-with-preview{grid-template-columns:minmax(0,1fr)}}
.form-actions{flex-wrap:wrap}

/* ============================================================
   Login + password reset (Settings > Branding > Login page)
   Rangoli Saffron (default) / Rangoli Cream / Rangoli Maroon: dotted panel with a 500px
   rangoli stage (dashed ring + 16 petals turning slowly, thick + thin rings, white logo
   circle ~256px), title BELOW the stage (normal flow: never over the rings), form on the right.
   Maroon Glow: dotted maroon page, ~380px logo with a slow glow, white form card.
   Phone: theme header with a ~210px logo on top, big fields below. Reduced motion: no animation.
   ============================================================ */
.auth-body{margin:0;min-height:100%;background:#fff;font-family:var(--font-brand);color:#2b1a14}
.auth{min-height:100vh;min-height:100dvh;display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
.auth-brand{
  --panel:var(--saffron);--dots:rgba(255,247,237,.42);--ring:#4A1208;--petal:#FFF7ED;--petal-edge:rgba(74,18,8,.5);
  --title:#4A1208;--sub:#7C1D0E;
  display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px 32px;min-width:0;overflow:hidden;
  background-color:var(--panel);background-image:radial-gradient(var(--dots) 1.6px,transparent 1.8px);background-size:22px 22px;
}
.auth-rangoli_cream .auth-brand{--panel:var(--cream);--dots:rgba(255,153,51,.5);--ring:#7C1D0E;--petal:#FF9933;--petal-edge:rgba(124,29,14,.45)}
.auth-rangoli_maroon .auth-brand{
  --dots:rgba(255,153,51,.32);--ring:#FF9933;--petal:#FF9933;--petal-edge:rgba(255,247,237,.55);--title:#FFF7ED;--sub:#FFB870;
  background-image:radial-gradient(var(--dots) 1.6px,transparent 1.8px),linear-gradient(160deg,#7C1D0E,#4A1208 70%);
  background-size:22px 22px,100% 100%;
}
.auth-stage{--stage:min(500px,40vw,64vh);position:relative;width:var(--stage);height:var(--stage);flex:none}
.rg{position:absolute;inset:0;width:100%;height:100%}
.rg-spin,.rg-petals{transform-origin:250px 250px}
.rg-spin{animation:rg-turn 90s linear infinite}
.rg-petals{animation:rg-turn 150s linear infinite reverse}
.rg-dash{fill:none;stroke:var(--ring);stroke-width:3;stroke-dasharray:10 12;opacity:.7}
.rg-petal{fill:var(--petal);stroke:var(--petal-edge);stroke-width:1.5}
.rg-thick{fill:none;stroke:var(--ring);stroke-width:12;opacity:.85}
.rg-thin{fill:none;stroke:var(--ring);stroke-width:2;opacity:.6}
@keyframes rg-turn{to{transform:rotate(360deg)}}
.auth-logo{position:absolute;left:50%;top:50%;width:51.2%;height:51.2%;transform:translate(-50%,-50%);border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden;box-shadow:0 18px 40px -18px rgba(74,18,8,.55)}
.auth-logo img{width:80%;height:80%;object-fit:contain}
.auth-logo-mark{display:none;font-family:var(--font-display);font-weight:700;color:var(--maroon);font-size:calc(var(--stage) * .17)}
.auth-logo.no-img .auth-logo-mark{display:block}
.auth-title{margin-top:32px;text-align:center;max-width:100%}
.auth-name{margin:0;font-family:var(--font-display);font-weight:700;font-size:clamp(30px,3.4vw,46px);line-height:1.1;color:var(--title);overflow-wrap:anywhere}
.auth-place{margin:12px 0 0;font-weight:800;font-size:13px;letter-spacing:.32em;color:var(--sub)}

.auth-side{display:flex;align-items:center;justify-content:center;padding:48px 32px;background:#fff;min-width:0}
.auth-card{width:100%;max-width:420px;min-width:0}
.auth-kicker{margin:0 0 10px;font-weight:800;font-size:12.5px;letter-spacing:.24em;color:var(--brand-btn)}
.auth-hello,.auth-card h2{font-family:var(--font-display);font-weight:700;font-size:clamp(28px,3vw,38px);line-height:1.15;margin:0 0 10px;color:var(--maroon)}
.auth-card .auth-sub{margin:0 0 24px}
.auth-card .auth-msg{margin:0 0 18px}
.auth-card .lbl{font-size:14px;font-weight:700;color:#4b3a33;margin-bottom:8px}
.auth .biginp{background:#fffdfb;border-color:#eadfd5}
.auth .biginp:focus-within{border-color:var(--brand-btn);box-shadow:0 0 0 4px #ffe8d6;background:#fff}
.auth .biginp input{font-size:17px;min-width:0}
.auth .bigbtn{background:var(--brand-btn);box-shadow:0 12px 24px -12px rgba(194,65,12,.6);font-family:inherit}
.auth .bigbtn:hover{background:#9A3412}
.auth .bigbtn:focus-visible,.auth .auth-link:focus-visible,.pw-toggle:focus-visible{outline:3px solid #9A3412;outline-offset:2px}
.auth .auth-link{color:#9A3412}
.auth .auth-icon{margin-bottom:16px}
.pw-toggle{flex:none;width:44px;height:44px;margin-right:-8px;border:0;border-radius:10px;background:transparent;color:#6b5a52;display:flex;align-items:center;justify-content:center;cursor:pointer}
.pw-toggle:hover{background:#fff1e6}
.auth .biginp .pw-toggle .mi{color:inherit}

/* Maroon Glow */
.auth-body.auth-maroon_glow{background-color:#4A1208;background-image:radial-gradient(rgba(255,153,51,.22) 1.6px,transparent 1.8px),linear-gradient(160deg,#5c1709,#3a0d05);background-size:22px 22px,100% 100%;background-attachment:fixed}
.auth-maroon_glow .auth-brand{background:none;--title:#FFF7ED;--sub:#FFB870}
.auth-maroon_glow .auth-side{background:none}
.auth-maroon_glow .auth-card{background:#fff;border-radius:24px;padding:40px 36px;box-shadow:0 30px 70px -20px rgba(0,0,0,.6)}
.auth-maroon_glow .auth-stage{--stage:min(380px,34vw,56vh)}
.auth-maroon_glow .auth-logo{width:100%;height:100%;animation:auth-glow 4.5s ease-in-out infinite}
.auth-maroon_glow .auth-logo-mark{font-size:calc(var(--stage) * .3)}
@keyframes auth-glow{
  0%,100%{box-shadow:0 0 34px 6px rgba(255,153,51,.32),0 0 0 10px rgba(255,153,51,.12)}
  50%{box-shadow:0 0 80px 22px rgba(255,153,51,.55),0 0 0 16px rgba(255,153,51,.2)}
}

/* Phone / narrow: theme header with the logo on top, the form below. */
@media(max-width:860px){
  .auth{grid-template-columns:minmax(0,1fr);min-height:0}
  .auth-brand{padding:26px 16px 24px}
  .auth-stage{--stage:250px}
  .auth-logo{width:210px;height:210px}
  .rg-petals,.rg-thick,.rg-thin{display:none}
  .auth-logo-mark{font-size:64px}
  .auth-title{margin-top:16px}
  .auth-name{font-size:30px}
  .auth-place{margin-top:8px;font-size:12px}
  .auth-side{align-items:flex-start;padding:28px 16px 40px}
  .auth-maroon_glow .auth-stage{--stage:210px}
  .auth-maroon_glow .auth-logo{width:210px;height:210px}
  .auth-maroon_glow .auth-side{padding-top:6px}
  .auth-maroon_glow .auth-card{padding:28px 20px;border-radius:20px}
  .auth .biginp input{height:60px}
}
@media (prefers-reduced-motion: reduce){
  .rg-spin,.rg-petals,.auth-maroon_glow .auth-logo{animation:none}
}

/* ============================================================
   Settings > Branding
   ============================================================ */
.logo-current-text{flex:1;min-width:0}
.logo-preview.small{width:52px;height:52px;padding:4px}
.logo-current.compact{padding:8px 10px;margin-bottom:10px}
.logo-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:10px}
.logo-actions form{margin:0}
.choice-list{display:grid;gap:8px;margin-bottom:12px}
.choice-row{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1.5px solid var(--border);border-radius:12px;cursor:pointer;font-weight:600}
.choice-row input{width:20px;height:20px;accent-color:var(--accent);flex:none}
.card-logo-upload[hidden]{display:none}
.layout-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,150px),1fr));gap:12px}
.layout-option{position:relative;display:flex;flex-direction:column;gap:8px;padding:10px;border:2px solid var(--border);border-radius:14px;cursor:pointer;min-width:0}
.layout-option.on,.layout-option:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.layout-option:focus-within{outline:3px solid var(--accent);outline-offset:2px}
.layout-option input{position:absolute;opacity:0;width:1px;height:1px}
.layout-name{font-weight:700;font-size:14.5px;overflow-wrap:anywhere}
.layout-thumb{--t-panel:#FF9933;--t-ring:#4A1208;--t-dots:rgba(255,247,237,.6);display:grid;grid-template-columns:1.1fr 1fr;height:84px;border-radius:10px;overflow:hidden;border:1px solid #eadfd5;background:#fff}
.lt-panel{position:relative;background-color:var(--t-panel);background-image:radial-gradient(var(--t-dots) 1px,transparent 1.2px);background-size:7px 7px}
.lt-ring{position:absolute;left:50%;top:50%;width:52px;height:52px;transform:translate(-50%,-50%);border:2px dashed var(--t-ring);border-radius:50%}
.lt-logo{position:absolute;left:50%;top:50%;width:28px;height:28px;transform:translate(-50%,-50%);border-radius:50%;background:#fff;box-shadow:0 0 0 3px var(--t-ring)}
.lt-form{display:flex;flex-direction:column;justify-content:center;gap:6px;padding:0 9px;background:#fff}
.lt-form i{display:block;height:6px;border-radius:3px;background:#ece4dc}
.lt-form i.lt-btn{background:#C2410C;height:8px}
.lt-rangoli_cream{--t-panel:#FFF7ED;--t-ring:#7C1D0E;--t-dots:rgba(255,153,51,.7)}
.lt-rangoli_maroon{--t-panel:#4A1208;--t-ring:#FF9933;--t-dots:rgba(255,153,51,.5)}
.lt-maroon_glow{--t-panel:#4A1208;--t-dots:rgba(255,153,51,.35);background:#4A1208;border-color:#4A1208;background-image:radial-gradient(rgba(255,153,51,.35) 1px,transparent 1.2px);background-size:7px 7px}
.lt-maroon_glow .lt-panel{background:none}
.lt-maroon_glow .lt-ring{display:none}
.lt-maroon_glow .lt-logo{width:34px;height:34px;box-shadow:0 0 12px 4px rgba(255,153,51,.7)}
.lt-maroon_glow .lt-form{margin:10px 8px 10px 0;border-radius:6px}
.lv-percent{flex:none}

/* ============================================================
   UI cleanup (Oct 2026): one page header, compact buttons, "⋯" menus, Export ▾,
   live search + chips, clean one-line tables (cards on phones), year selector,
   toasts, confirm box, status badges, tabs. Shared by every admin page.
   ============================================================ */

/* Page header: title left, at most one orange button right. */
.ph{display:flex;align-items:center;justify-content:space-between;gap:12px 16px;flex-wrap:wrap;margin:0 0 20px}
.ph h1{margin:0;font-size:26px;font-weight:700;letter-spacing:-.015em;line-height:1.2;min-width:0;overflow-wrap:anywhere}
.ph .ph-sub{display:block;margin-top:4px;font-size:14px;font-weight:500;color:var(--ink2)}
.ph-title{display:flex;align-items:center;gap:12px;min-width:0;flex:1 1 auto}
.ph-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.help{margin:-12px 0 16px;font-size:14px;color:var(--ink2)}

/* Buttons: md (44px) for page actions, sm (36px) for rows. Orange only for the main action. */
.btn-md,.btn-sm{display:inline-flex;align-items:center;justify-content:center;gap:8px;border-radius:12px;border:1.5px solid var(--border);background:#fff;color:var(--ink);font:600 15px var(--font-family);white-space:nowrap;cursor:pointer;text-decoration:none;-webkit-tap-highlight-color:transparent;list-style:none}
.btn-md{height:44px;padding:0 16px}
.btn-sm{height:36px;padding:0 12px;font-size:14px;border-radius:10px}
.btn-md .mi{font-size:20px}
.btn-sm .mi{font-size:18px}
.btn-md:hover,.btn-sm:hover{background:var(--panel);text-decoration:none}
.btn-md.primary,.btn-sm.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn-md.primary:hover,.btn-sm.primary:hover{background:var(--accent-dark);border-color:var(--accent-dark)}
.btn-md.danger,.btn-sm.danger{background:var(--danger);border-color:var(--danger);color:#fff}
.btn-md.danger:hover{filter:brightness(.92)}
.btn-md.ghost,.btn-sm.ghost{background:#fff}
.btn-md.text,.btn-sm.text{border-color:transparent;background:transparent;color:var(--ink2)}
.btn-md.text:hover,.btn-sm.text:hover{background:var(--panel);color:var(--ink)}
.btn-md:disabled,.btn-sm:disabled{opacity:.45;cursor:not-allowed}
.btn-md:focus-visible,.btn-sm:focus-visible,.icon-btn:focus-visible,.chip:focus-within,.menu-item:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
summary.btn-md::-webkit-details-marker,summary.btn-sm::-webkit-details-marker,summary.icon-btn::-webkit-details-marker{display:none}
.icon-btn{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:10px;border:1px solid transparent;background:transparent;color:var(--ink2);cursor:pointer;list-style:none}
.icon-btn:hover,.menu[open] > .icon-btn{background:var(--panel);border-color:var(--border);color:var(--ink)}
.icon-btn .mi{font-size:22px}

/* "⋯" / Export ▾ menus (<details class="menu">). */
.menu{position:relative;display:inline-block}
.menu > summary{list-style:none}
.menu > summary .caret{font-size:18px;margin-left:-2px;transition:transform .15s}
.menu[open] > summary .caret{transform:rotate(180deg)}
.menu-pop{position:absolute;right:0;top:calc(100% + 6px);z-index:40;min-width:200px;max-width:min(300px,calc(100vw - 32px));padding:6px;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow-md)}
.menu.up .menu-pop{top:auto;bottom:calc(100% + 6px)}
.menu.left .menu-pop{right:auto;left:0}
.menu-pop form{margin:0}
.menu-item{display:flex;align-items:center;gap:10px;width:100%;min-height:42px;padding:8px 12px;border:0;border-radius:10px;background:none;color:var(--ink);font:500 15px var(--font-family);text-align:left;cursor:pointer;text-decoration:none;white-space:normal}
.menu-item .mi{font-size:20px;color:var(--ink2)}
.menu-item:hover{background:var(--panel);text-decoration:none}
.menu-item.danger,.menu-item.danger .mi{color:var(--danger)}
.menu-item.danger:hover{background:var(--danger-bg)}
.menu-item.disabled{color:var(--muted);cursor:default}
.menu-item.disabled:hover{background:none}
.menu-sep{height:1px;margin:6px 4px;background:var(--border)}
.menu-note{padding:4px 12px 6px;font-size:12.5px;color:var(--ink2)}

/* Year selector (top bar; a slim row under the top bar on phones). */
.appbar-right{display:flex;align-items:center;gap:12px;flex:none}
.year-bar{display:flex;align-items:center;gap:8px;margin:0}
.year-bar-label{font-size:13px;font-weight:600;color:var(--ink2)}
.year-bar-control{position:relative;display:inline-flex;align-items:center}
.year-bar select{appearance:none;-webkit-appearance:none;height:38px;padding:0 34px 0 12px;border:1.5px solid var(--border);border-radius:10px;background:#fff;font:600 14.5px var(--font-family);color:var(--ink);cursor:pointer}
.year-bar select:focus-visible{outline:3px solid var(--accent);outline-offset:1px}
.year-bar-control .mi{position:absolute;right:8px;font-size:20px;color:var(--ink2);pointer-events:none}
.mobile-yearbar{display:none}
@media(max-width:720px){
  .mobile-yearbar{display:flex;justify-content:flex-end;margin:-4px 0 12px}
}

/* Toasts ("Saved ✓") */
.toasts{position:fixed;left:50%;bottom:24px;z-index:80;display:flex;flex-direction:column;gap:8px;transform:translateX(-50%);width:min(440px,calc(100vw - 32px));pointer-events:none}
.toast-msg{display:flex;align-items:center;gap:10px;padding:12px 8px 12px 16px;border-radius:14px;background:#1f2328;color:#fff;font-size:15px;font-weight:500;box-shadow:var(--shadow-lg);pointer-events:auto;animation:toast-in .2s ease-out;transition:opacity .3s,transform .3s}
.toast-msg > span:nth-child(2){flex:1;min-width:0;overflow-wrap:anywhere}
.toast-msg > .mi{color:#7ee2a1;font-size:22px}
.toast-msg.out{opacity:0;transform:translateY(8px)}
.toast-x{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:#cfd3d8;cursor:pointer}
.toast-x:hover{background:rgba(255,255,255,.1)}
.toast-x .mi{font-size:20px}
@keyframes toast-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.toast-msg{animation:none;transition:none}}
@media(max-width:720px){.toasts{bottom:max(16px,env(safe-area-inset-bottom))}}

/* Confirm box */
.confirm-dialog{width:min(440px,calc(100vw - 24px))}
.confirm-dialog h2{margin:0 0 8px;font-size:19px;overflow-wrap:anywhere}
.confirm-text{margin:0 0 12px;color:var(--ink2);font-size:15px;overflow-wrap:anywhere}
.confirm-text[hidden],.confirm-dialog .f[hidden]{display:none}
.confirm-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px;flex-wrap:wrap}
.confirm-dialog textarea{width:100%;min-height:64px;border:0;outline:0;resize:vertical;font:500 16px var(--font-family)}

/* List toolbar: search (live) + ✕ + Search, chips, More filters, Export ▾ */
.list-toolbar{margin:0 0 14px;padding:0;background:transparent;border:0;box-shadow:none;border-radius:0}
.list-toolbar .lt-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.list-toolbar .lt-search{flex:1 1 280px;display:flex;align-items:center;gap:8px;height:46px;padding:0 6px 0 14px;border:1.5px solid var(--border);border-radius:12px;background:#fff;min-width:0;max-width:560px}
.list-toolbar .lt-search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.list-toolbar .lt-search .mi{font-size:22px;color:#9aa0a6}
.list-toolbar .lt-search input{flex:1;min-width:0;height:42px;border:0;outline:0;background:transparent;font:500 16px var(--font-family);color:var(--ink)}
.list-toolbar .lt-search input::-webkit-search-cancel-button{display:none}
.lt-x{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:0;border-radius:9px;background:transparent;color:var(--ink2);cursor:pointer;flex:none}
.lt-x:hover{background:var(--panel)}
.lt-x[hidden]{display:none}
.lt-x .mi{font-size:20px!important;color:inherit!important}
.list-toolbar .lt-go{height:46px}
.list-toolbar .lt-spacer{flex:1 1 0;min-width:0}
.list-toolbar .export-menu > summary{height:46px}
.lt-chiprow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.chip-group{display:flex;gap:6px;flex-wrap:wrap}
.chip{position:relative;display:inline-flex;align-items:center;height:36px;padding:0 14px;border:1.5px solid var(--border);border-radius:999px;background:#fff;font:600 14px var(--font-family);color:var(--ink);cursor:pointer;white-space:nowrap;-webkit-tap-highlight-color:transparent}
.chip input{position:absolute;opacity:0;width:1px;height:1px}
.chip:hover{background:var(--panel)}
.chip.on{background:var(--ink);border-color:var(--ink);color:#fff}
.lt-more{position:relative}
.lt-more > summary{list-style:none}
.lt-more[open] > summary{background:var(--panel)}
.lt-more .lt-filters{display:flex;flex-wrap:wrap;gap:10px 12px;align-items:flex-end;margin-top:10px;padding:12px;border:1px solid var(--border);border-radius:14px;background:#fff;width:min(720px,calc(100vw - 40px))}
@media(min-width:721px){.lt-more .lt-filters{position:absolute;left:0;top:100%;z-index:30;box-shadow:var(--shadow-md)}}
.lt-more .lt-field{flex:1 1 180px;max-width:240px}
.lt-field label{display:block;font-size:13px;font-weight:600;color:var(--ink2);margin-bottom:4px}
.lt-field .lt-control{height:44px;padding:0 10px;border-radius:10px}
.lt-field .lt-control select,.lt-field .lt-control input{height:40px;font-size:15px}
.lt-field.inline{flex:0 1 240px}
.count-dot{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--accent);color:#fff;font-size:12px}
.lt-clear{height:36px;font-size:14px;border-radius:10px;padding:0 12px}
.lt-status{margin:0 2px 8px;font-size:14px}
.load-more{display:flex;justify-content:center;margin:14px 0 4px}
body.lt-loading [data-swap="list-results"]{opacity:.6;transition:opacity .15s}
@media(max-width:720px){
  .list-toolbar .lt-search{flex:1 1 0;max-width:none}
  .lt-go-label,.export-menu .export-label{display:none}
  .list-toolbar .lt-go{flex:none;width:46px;padding:0}
  .list-toolbar .lt-spacer{display:none}
  .list-toolbar .export-menu > summary{padding:0 10px}
  .lt-field.inline{flex:1 1 100%}
}

/* Clean tables: one line per row, header stays put, actions = one small button + "⋯".
   Fit the page (no sideways scroll); below 1000px (tablet, phone) each row is a card. */
.list-card{padding:0;overflow:visible}
.clean-table{width:100%;border-collapse:separate;border-spacing:0;font-size:15px}
.clean-table th{position:sticky;top:68px;z-index:5;background:#fafbfc;padding:10px 12px;border-bottom:1px solid var(--border);font-size:12.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--ink2);text-align:left;white-space:nowrap}
.clean-table th:first-child{border-top-left-radius:var(--radius-md)}
.clean-table th:last-child{border-top-right-radius:var(--radius-md)}
.clean-table th a{color:inherit;display:inline-flex;align-items:center;gap:2px}
.clean-table th .sort-icon{font-size:16px}
.clean-table th .sort-icon.idle{opacity:.35}
.clean-table td{padding:8px 12px;border-bottom:1px solid #eef0f2;vertical-align:middle;height:56px}
.clean-table tbody tr:last-child td{border-bottom:0}
.clean-table tbody tr[data-href]{cursor:pointer}
.clean-table tbody tr[data-href]:hover td{background:#fcfaf7}
.clean-table tbody tr[data-href]:focus-visible{outline:3px solid var(--accent);outline-offset:-3px}
.clean-table .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.clean-table .c-id{width:1%;white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--ink2)}
.clean-table .c-main{min-width:0}
.clean-table .c-main .cell-strong{font-weight:600;display:block;overflow-wrap:anywhere}
.clean-table .c-main .row-meta{font-size:13px;color:var(--ink2);overflow-wrap:anywhere}
.clean-table .c-tight{width:1%;white-space:nowrap}
.clean-table .c-act{width:1%;white-space:nowrap;text-align:right}
.clean-table .c-act > *{vertical-align:middle}
.clean-table .c-act .btn-sm{margin-right:2px}
.clean-table tfoot td{font-weight:700;background:var(--panel);height:auto;padding:10px 12px;border-top:1px solid var(--border)}
.clean-table tr.row-void td{color:var(--muted)}
.clean-table tr.row-void .cell-strong{text-decoration:line-through}
.clean-table .badge{white-space:nowrap}
.clean-table .badge + .badge{margin-left:4px}
/* The table turns into cards when ITS box is narrow (container query), not the window:
   with the sidebar showing, a 1100px window leaves the table only ~790px. */
.list-card,.sect{container:gpm-table / inline-size}
@media(max-width:1000px){.list-card{background:transparent;border:0;box-shadow:none}}
@container gpm-table (max-width: 900px){
  .clean-table,.clean-table tbody,.clean-table tfoot{display:block}
  .clean-table thead{display:none}
  .clean-table tr{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:6px 8px;margin:0 0 10px;padding:12px 14px;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 1px 4px rgba(31,35,40,.04)}
  .clean-table td{display:block;width:auto!important;height:auto;padding:0;border:0!important;background:transparent!important}
  .clean-table td.c-main{flex:1 1 100%;order:-2;padding-right:44px}
  .clean-table td.c-id{order:-1;width:auto;font-size:13px}
  .clean-table td.c-id::before{content:"#"}
  .clean-table td.c-act{position:absolute;top:8px;right:8px;width:auto;display:flex;align-items:center;gap:4px}
  .clean-table td.c-act .btn-sm{order:-1}
  .clean-table td.c-hide-sm{display:none}
  .clean-table td[data-label]:not(.c-main):not(.c-act):not(.num):not(.c-id)::before{content:attr(data-label) " ";color:var(--muted);font-size:12.5px}
  .clean-table td.num{margin-left:auto;font-weight:700}
  .clean-table tfoot tr{background:var(--panel)}
  .clean-table td.c-act:has(.btn-sm){position:static;order:9;margin-left:auto}
  .clean-table tr:has(td.c-act .btn-sm) td.c-main{padding-right:0}
}
@container gpm-table (max-width: 900px){
  /* The Collect button on a not-paid row sits bottom-right; the ⋯ stays top-right. */
  .clean-table td.c-act .menu{position:absolute;top:8px;right:8px}
  .show-sm{display:inline}
}

/* Status badge: "Active till Sep 30, 2027" + small "2025-26 + 2026-27 paid" */
.status{display:inline-flex;flex-direction:column;align-items:flex-start;gap:1px;min-width:0}
.status .badge{white-space:nowrap}
.status-detail{font-size:12px;color:var(--ink2);white-space:nowrap;padding-left:2px}
.badge-lapsed{background:#fdf1f0;color:var(--danger)}
.badge-test{background:#eef0f3;color:#3a4552;border:1px dashed #b8bfc8}

/* Tabs (Settings, the dashboard receipts card, Collections) */
.tab-bar{display:flex;gap:4px;border-bottom:1px solid var(--border);margin:0 0 18px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.tab-bar::-webkit-scrollbar{display:none}
.tab{display:inline-flex;align-items:center;gap:6px;height:44px;padding:0 14px;border:0;border-bottom:3px solid transparent;background:none;color:var(--ink2);font:600 15px var(--font-family);white-space:nowrap;cursor:pointer;text-decoration:none;margin-bottom:-1px}
.tab:hover{color:var(--ink);text-decoration:none}
.tab.on,.tab[aria-selected="true"]{color:var(--accent-dark);border-bottom-color:var(--accent)}
.tab .mi{font-size:19px}
.tab-bar.small .tab{height:38px;font-size:14px;padding:0 10px}
[role="tabpanel"][hidden]{display:none}

/* Section cards (Member page, Settings): small title row + content */
.sect{background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);padding:18px 20px;margin:0 0 16px;box-shadow:var(--shadow-sm)}
.sect-head{display:flex;align-items:center;justify-content:space-between;gap:8px 12px;flex-wrap:wrap;margin:0 0 10px}
.sect-head h2{margin:0;font-size:17px;font-weight:700}
.sect-head .row-meta{font-size:13px}

/* Label-left / value-right rows (Settings, member info) */
.srows{display:flex;flex-direction:column}
.srow{display:flex;align-items:center;gap:8px 16px;min-height:56px;padding:8px 0;border-bottom:1px solid #eef0f2;flex-wrap:wrap}
.srow:last-child{border-bottom:0}
.srow-label{flex:0 0 200px;font-size:14.5px;font-weight:600;color:var(--ink2)}
.srow-value{flex:1 1 200px;min-width:0;font-size:15.5px;overflow-wrap:anywhere}
.srow-value .row-meta{display:block;font-size:13px}
.srow-act{flex:none;display:flex;gap:6px;align-items:center}
@media(max-width:600px){.srow-label{flex-basis:100%}.srow{gap:2px 12px}}
.muted{color:var(--muted)}
.inline-form{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin:0}
.inline-form input{height:38px;padding:0 10px;border:1.5px solid var(--border);border-radius:10px;font:500 15px var(--font-family);min-width:0;flex:1 1 160px}
.inline-form input:focus{outline:0;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.changed-by{font-size:13px;color:var(--ink2);margin:-8px 0 16px}

/* Save bar: appears only when something changed */
.save-bar{position:sticky;bottom:12px;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 0;padding:10px 12px 10px 16px;border-radius:14px;background:#1f2328;color:#fff;box-shadow:var(--shadow-lg)}
.save-bar[hidden]{display:none}
.save-bar span{font-weight:600;font-size:15px}
.save-bar .btn-md.ghost{background:transparent;color:#fff;border-color:rgba(255,255,255,.3)}
.save-bar .btn-md.ghost:hover{background:rgba(255,255,255,.1)}
.btn-sm.soft{background:#fff8f1;border-color:#f3c9a3;color:var(--accent-dark)}
.btn-sm.soft:hover{background:var(--accent-soft);border-color:var(--accent)}
.btn-sm.soft .mi{color:var(--accent)}

/* Dashboard: one row of 4 stats (2×2 on phones), 2 actions, events | receipts */
.stat-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:0 0 16px}
.stat{display:flex;flex-direction:column;gap:2px;min-width:0;padding:16px 18px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);color:var(--ink);text-decoration:none}
.stat:hover{border-color:#f3c9a3;text-decoration:none}
.stat-label{font-size:13.5px;font-weight:600;color:var(--ink2);overflow-wrap:anywhere}
.stat-value{display:block;max-width:100%;font-size:30px;font-weight:700;line-height:1.15;letter-spacing:-.01em;font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:clip}
.stat-sub{font-size:12.5px;color:var(--ink2);overflow-wrap:anywhere}
.stat-bar{display:block;height:6px;margin:6px 0 2px;border-radius:99px;background:#eef0f2;overflow:hidden}
.stat-bar > span{display:block;height:100%;border-radius:99px;background:var(--ok)}
.dash-actions{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}
.dash-cols{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}
.ev-row{display:flex;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid #eef0f2}
.ev-row:last-child{border-bottom:0}
.ev-date{flex:none;width:46px;height:50px;border-radius:12px;background:var(--accent-soft);color:var(--accent-dark);display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.05}
.ev-date span{font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.ev-date strong{font-size:19px}
.ev-main{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:2px}
.ev-main .cell-strong{color:var(--ink)}
.ev-main .row-meta{font-size:13px}
.rcpt-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4px;border-bottom:1px solid #eef0f2;color:var(--ink);text-decoration:none}
.rcpt-row:hover{background:#fcfaf7;text-decoration:none}
.rcpt-main{display:flex;flex-direction:column;min-width:0}
.rcpt-main .row-meta{font-size:13px}
.rcpt-amt{flex:none;font-weight:700;font-variant-numeric:tabular-nums}
.rcpt-total{display:flex;justify-content:space-between;padding:10px 4px 0;font-size:14px;color:var(--ink2)}
.rcpt-total strong{color:var(--ink)}
@media(max-width:1100px){.dash-cols{grid-template-columns:minmax(0,1fr)}}
@media(max-width:900px){.stat-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat{padding:14px}.stat-value{font-size:26px}}
@media(max-width:720px){.dash-actions .btn-md{flex:1 1 auto}}
.dash-cols > .sect{margin:0}

/* Member page */
.ph .ph-sub .badge{margin-left:6px;font-size:12.5px;vertical-align:middle}
.notes-text{white-space:normal;color:var(--ink)}
.qr-mini{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.qr-mini-img{flex:none;display:block;width:160px;border-radius:10px;overflow:hidden;border:1px solid var(--border);line-height:0}
.qr-mini-img img{width:100%;height:auto}
.qr-mini-text{flex:1 1 240px;min-width:0;display:flex;flex-direction:column;gap:2px}
.qr-mini-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:8px}
.history{margin-top:12px;border-top:1px solid #eef0f2;padding-top:8px}
.history > summary{cursor:pointer;font-weight:600;font-size:14px;color:var(--ink2);padding:6px 0;list-style:none;display:inline-flex;align-items:center;gap:4px}
.history > summary::before{content:"expand_more";font-family:"Material Symbols Outlined";font-size:20px;transition:transform .15s}
.history[open] > summary::before{transform:rotate(180deg)}
.history > summary::-webkit-details-marker{display:none}
.sect .clean-table th{top:68px}
.clean-table td.c-main .cell-strong{overflow-wrap:normal;word-break:normal}
.show-sm{display:none}

.list-foot{display:flex;justify-content:center;margin:10px 0 0}
.lt-chiprow .lt-field.inline{flex:0 1 220px;max-width:240px}.lt-chiprow .lt-field.inline .lt-control{height:36px;border-radius:999px;padding:0 10px}.lt-chiprow .lt-field.inline .lt-control select,.lt-chiprow .lt-field.inline .lt-control input{height:32px;font-size:14px;font-weight:600}
.clean-table th{padding:10px 9px}.clean-table td{padding:8px 9px}.clean-table th:first-child,.clean-table td:first-child{padding-left:14px}.clean-table th:last-child,.clean-table td:last-child{padding-right:10px}

/* Add / edit member: one simple form */
.form-narrow{max-width:680px}
.form-narrow .f{margin-bottom:16px}
.type-choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));gap:10px}
.type-choice{position:relative;display:flex;flex-direction:column;gap:2px;padding:14px 16px;border:2px solid var(--border);border-radius:14px;cursor:pointer;background:#fff;min-width:0}
.type-choice input{position:absolute;opacity:0;width:1px;height:1px}
.type-choice:has(input:checked){border-color:var(--accent);background:var(--accent-soft)}
.type-choice:focus-within{outline:3px solid var(--accent);outline-offset:2px}
.type-choice-name{font-weight:700;font-size:16px;overflow-wrap:anywhere}
.type-choice-amt{font-size:20px;font-weight:700;color:var(--accent-dark);font-variant-numeric:tabular-nums}
.check-row{display:flex;align-items:flex-start;gap:12px;padding:12px 14px;margin:4px 0 8px;border:1px solid var(--border);border-radius:12px;cursor:pointer}
.check-row input{width:22px;height:22px;margin:1px 0 0;accent-color:var(--accent);flex:none}
.check-row > span{display:flex;flex-direction:column;min-width:0}
.form-narrow .form-actions{display:flex;gap:8px;align-items:center;margin-top:16px}
.f label.type-choice,.f label.check-row{display:flex;margin:0;font-size:15px;font-weight:500;color:var(--ink)}.f label.type-choice{flex-direction:column}.form-narrow .check-row{display:flex}
.qr-card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}.help-line{margin:10px 0 0;font-size:14px;color:var(--ink2)}.qr-card-panel .sect-head{margin-bottom:12px}@media(max-width:720px){.qr-card-actions > .btn-md.primary{flex:1 1 100%}.qr-card-actions > .btn-md,.qr-card-actions > .menu{flex:1 1 0}.qr-card-actions > .menu > summary{width:100%}}
.group-title{display:flex;align-items:center;gap:8px;margin:18px 2px 8px;font-size:15px;font-weight:700;color:var(--ink2);text-transform:uppercase;letter-spacing:.04em}.group-title span{font-size:13px;color:var(--muted)}.day-rows{display:flex;flex-direction:column;gap:8px;margin-bottom:8px}.day-row{display:grid;grid-template-columns:minmax(0,1fr) 170px 36px;gap:8px;align-items:center}.day-row .inp{margin:0}[data-days][hidden],[data-single-date][hidden]{display:none}@media(max-width:480px){.day-row{grid-template-columns:minmax(0,1fr) 36px}.day-row .inp:nth-child(2){grid-column:1}}

/* Reports: 5 tiles; inside, period left + Export right, max 3 stats, then the table */
.tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:14px}
.tile{display:flex;align-items:center;gap:14px;padding:18px;background:#fff;border:1px solid var(--border);border-radius:var(--radius-md);box-shadow:var(--shadow-sm);color:var(--ink);text-decoration:none;min-width:0}
.tile:hover{border-color:#f3c9a3;text-decoration:none}
.tile:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.tile-icon{flex:none;width:46px;height:46px;border-radius:12px;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center}
.tile-icon .mi{font-size:24px}
.tile-text{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.tile-text strong{font-size:16.5px;overflow-wrap:anywhere}
.tile-text span{font-size:14px;color:var(--ink2);overflow-wrap:anywhere}
.tile-go{color:var(--muted)}
.stat-row-3{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:600px){.stat-row-3{gap:8px}.stat-row-3 .stat{padding:10px 12px}.stat-row-3 .stat-value{font-size:22px}.stat-row-3 .stat-label{font-size:12.5px}}
.report-period{margin:0 2px 10px}
.list-toolbar .lt-row > .lt-field.inline{flex:0 1 280px;max-width:320px}
.list-toolbar .lt-row > .lt-field.inline .lt-control{height:46px}
.report-clean .c-act .btn-sm + .btn-sm{margin-left:4px}

/* Settings */
.toggle{position:relative;width:46px;height:28px;border:0;border-radius:99px;background:#d4d8dd;cursor:pointer;padding:0;flex:none}
.toggle span{position:absolute;top:3px;left:3px;width:22px;height:22px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.25);transition:transform .15s}
.toggle.on{background:var(--ok)}
.toggle.on span{transform:translateX(18px)}
.toggle:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.srow.switch,.srow .switch{cursor:pointer}
label.srow{cursor:pointer}
.brand-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;align-items:start}
@media(max-width:900px){.brand-grid{grid-template-columns:minmax(0,1fr)}}
.brand-preview{display:flex;flex-direction:column;gap:12px}
.brand-prev-login{display:flex;flex-direction:column;gap:6px;color:var(--ink);text-decoration:none}
.brand-prev-login .layout-thumb{height:130px}
.brand-prev-login .lt-logo img{width:100%;height:100%;object-fit:contain;border-radius:50%}
.brand-prev-login .row-meta .mi{font-size:15px;vertical-align:-2px}
.brand-prev-card{width:100%;max-width:420px;height:auto;border-radius:12px;box-shadow:var(--shadow-sm)}
.settings-sub{font-size:15px;margin:0 0 10px}
.history-sect > summary{cursor:pointer;list-style:none}
.history-sect > summary::-webkit-details-marker{display:none}
.history-sect > summary h2{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:16px}
.history-sect > summary h2::after{content:"expand_more";font-family:"Material Symbols Outlined";font-weight:400;font-size:20px;color:var(--ink2)}
.history-sect[open] > summary{margin-bottom:12px}
.card-cover{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.card-cover-text{display:flex;flex-direction:column;min-width:0}
.card-cover-text strong{font-size:24px;white-space:nowrap}
.card-cover-text span{font-size:14px;color:var(--ink2)}
.select-sm{appearance:none;-webkit-appearance:none;height:36px;padding:0 32px 0 10px;border:1.5px solid var(--border);border-radius:10px;background:#fff;font:600 14px var(--font-family);color:var(--ink)}
.color-row{display:flex;align-items:center;gap:10px}
.gate-dialog .dialog-close{width:38px;height:38px;padding:0;justify-content:center}
.gate-dialog .form-actions{display:flex;gap:8px;align-items:center;margin-top:14px}
.srow-act form{margin:0}
.clean-table .c-act .inline-form{display:inline-flex;vertical-align:middle}

/* Login (Oct 2026): left panel ~45%, soft saffron gradient, smaller cream petals + one thin
   maroon ring, logo ~10% bigger; the form in a centred white card; Remember me; 52px button;
   footer. Phone: ~180px logo header with the form right below, no scrolling needed. */
.auth{grid-template-columns:minmax(0,45fr) minmax(0,55fr)}
.auth-rangoli_saffron .auth-brand{
  --petal:#FFF3E0;--petal-edge:rgba(124,29,14,.18);--dots:rgba(255,247,237,.28);
  background-image:radial-gradient(var(--dots) 1.4px,transparent 1.6px),radial-gradient(120% 90% at 30% 20%,#FFC27A 0%,#FFA647 45%,#F28A2B 100%);
  background-size:22px 22px,100% 100%;
}
.auth-rangoli_cream .auth-brand{--petal:#FFD9AE;--petal-edge:rgba(124,29,14,.2)}
.rg-petal{stroke-width:1}
.rg-thin{stroke:#7C1D0E;stroke-width:1.6;opacity:.55}
.auth-rangoli_maroon .rg-thin{stroke:#FFB870}
.auth-logo{width:56.3%;height:56.3%}
.auth-side{flex-direction:column;gap:18px;background:#faf7f4}
.auth-card{max-width:440px;background:#fff;border:1px solid #f0e6dc;border-radius:22px;padding:36px 32px;box-shadow:0 24px 60px -28px rgba(74,18,8,.28),0 2px 6px rgba(74,18,8,.04)}
.auth .bigbtn{height:52px;min-height:52px;font-size:16.5px;border-radius:14px;justify-content:center}
.auth-row{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:6px 0 18px}
.auth-row .auth-link{margin:0;font-size:14.5px;font-weight:600}
.auth-check{display:inline-flex;align-items:center;gap:8px;font-size:14.5px;font-weight:600;color:#4b3a33;cursor:pointer}
.auth-check input{width:20px;height:20px;accent-color:var(--brand-btn);margin:0}
.auth-foot{margin:0;font-size:13px;color:#8a7a72;text-align:center}
.pw-toggle{visibility:visible!important}
.auth-maroon_glow .auth-side{background:none}
.auth-maroon_glow .auth-foot{color:#f3d9c4}
@media(max-width:860px){
  .auth{grid-template-columns:minmax(0,1fr)}
  .auth-brand{flex-direction:row;gap:14px;justify-content:center;padding:16px;min-height:0;height:180px;box-sizing:border-box}
  .auth-stage,.auth-maroon_glow .auth-stage{--stage:132px}
  .auth-logo,.auth-maroon_glow .auth-logo{width:104px;height:104px}
  .rg-petals{display:block}
  .rg-thin{display:block}
  .auth-logo-mark{font-size:36px}
  .auth-title{margin:0;text-align:left;max-width:52%}
  .auth-name{font-size:24px}
  .auth-side{padding:16px 16px 24px;gap:12px;justify-content:flex-start}
  .auth-card{padding:22px 18px;border-radius:18px}
  .auth-kicker{margin-bottom:4px}
  .auth-hello{font-size:24px;margin-bottom:4px}
  .auth-card .auth-sub{margin-bottom:14px;font-size:14px}
  .auth .biginp input{height:50px}
  .auth-card .lbl{margin-bottom:5px}
  .auth .biginp{margin-bottom:12px}
}
@media(max-width:860px){.auth-body{background:#faf7f4}.auth-foot{width:100%;text-align:center}}
.menu-pop{white-space:normal;text-align:left}.ph .ph-sub{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px}.ph .ph-sub .badge{margin:0;white-space:nowrap;line-height:1.5}
/* The hidden attribute always wins over a display rule (e.g. the "already paid" box on Collect). */
[hidden]{display:none!important}
.gp-mark{display:inline-flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:inherit;background:#4A1208;color:#FFF7ED;font-family:var(--font-display,Georgia,serif);font-weight:700;font-size:15px;letter-spacing:.02em;line-height:1}.receipt-logo .gp-mark,.print-logo .gp-mark{font-size:22px}.pass-next{margin:-8px 0 14px;font-size:14px;font-weight:600;color:#7a5a20}
.appbar{justify-content:flex-end}.topbar-mid{flex:1;min-width:0;display:flex;justify-content:center;padding:0 6px}.topbar-mid .year-bar-label{display:none}.topbar-mid .year-bar select{height:36px;font-size:14px}
.card-year{display:flex;align-items:center;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;padding:12px 0;border-bottom:1px solid #eef0f2}.card-year:last-of-type{border-bottom:0}.card-year-text{display:flex;flex-direction:column;min-width:0;flex:1 1 260px}.card-year-text strong{font-size:16px;overflow-wrap:anywhere}.card-year-text span{font-size:14px;color:var(--ink2);overflow-wrap:anywhere}.card-year-actions{display:flex;gap:6px;flex-wrap:wrap}
.card-next{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;font-size:14px}
.status-detail.paid{color:var(--ok);font-weight:600}
.link-btn{border:0;background:none;padding:4px 6px;font:600 14px var(--font-family);color:var(--accent-dark);cursor:pointer;text-decoration:underline;text-underline-offset:3px}.link-btn:hover{color:var(--accent)}.vol-row .srow-value{display:flex;flex-direction:column}.vol-row.is-off .cell-strong{color:var(--muted)}

/* Gate (phone first): Scan QR + search + Walk-in; the rest under More */
.gate-ph{flex-wrap:nowrap;align-items:flex-start}
.gate-ph .ph-sub{font-size:13.5px}
.gate-main-actions{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:10px;margin:0 0 12px}
.gate-main-actions .btn-lg{width:100%;justify-content:center;height:60px;font-size:18px}
.gate-main-actions .scan-open{font-size:19px}
@media(max-width:480px){.gate-main-actions{grid-template-columns:minmax(0,1fr)}.gate-main-actions .btn-lg{height:56px}}
.gate-search{margin-bottom:14px}
.gate-counter:first-child .gc-value{color:var(--accent)}
.gate-retry{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 12px;padding:12px 14px;border-radius:14px;background:var(--danger-bg);color:var(--danger);font-weight:600}
.gate-retry .mi{font-size:22px}
.gate-retry #gate-retry-text{flex:1 1 160px}
.lock-small{padding:18px 20px}.lock-small h2{font-size:16px}.lv-methods{font-size:18px!important}
.tile-grid{grid-auto-rows:1fr}
/* One icon style everywhere: outline, weight 500 (also the active sidebar item and badges). */
.sidebar-nav li.active a .material-symbols-outlined,.badge-paid .mi,.mi,.material-symbols-outlined{font-variation-settings:"FILL" 0,"wght" 500,"GRAD" 0,"opsz" 24}
/* Same corner radius family for every button size. */
.btn-lg{border-radius:12px}.act{border-radius:10px}

/* Toasts sit at the top (under the top bar) so they never cover buttons at the bottom of a phone. */
.toasts{top:76px;bottom:auto}
@media(max-width:720px){.toasts{top:70px;bottom:auto}}
.lv-methods{white-space:normal!important;overflow:visible!important;font-size:17px!important;line-height:1.3}
.auth-stage{--stage:min(500px,36vw,64vh)}
@media(max-width:860px){.auth-stage,.auth-maroon_glow .auth-stage{--stage:132px}}
