@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Barlow:wght@400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; touch-action: manipulation; }

:root {
  --bg:      #29353C;
  --surface: #344550;
  --card:    #3D5166;
  --border:  #768A96;
  --accent:  #AAC7D8;
  --green:   #5BAD8F;
  --yellow:  #D4A843;
  --red:     #C0544A;
  --text:    #E6E6E6;
  --muted:   #AAC7D8;
  --radius:  16px;
}

html, body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
}

.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
}
.screen.active { display: flex; }

/* ── AUTH SCREEN ── */
#authScreen {
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  gap: 0;
  text-align: center;
  overflow-y: auto;
}

.auth-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.auth-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 64px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.auth-title span { color: var(--accent); }

.auth-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 300px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 320px;
  text-align: left;
}

.auth-error {
  font-size: 13px;
  color: #ff6b6b;
  background: rgba(255,107,107,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  line-height: 1.4;
}

.btn-link {
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  text-align: center;
  text-decoration: underline;
  -webkit-tap-highlight-color: transparent;
}
.btn-link:hover { color: var(--text); }

/* ── ONBOARDING SCREEN ── */
#onboardingScreen {
  padding: 60px 24px 60px;
  justify-content: flex-start;
  gap: 20px;
}

.onboard-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 4px;
}

.onboard-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.onboard-cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.onboard-card {
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s;
}
.onboard-card.selected,
.onboard-card:active {
  border-color: var(--accent);
}

.onboard-card-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 4px;
}

.onboard-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.onboard-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.join-code-input {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: 14px;
  color: var(--text);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 36px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.25em;
  padding: 16px;
  outline: none;
  width: 100%;
  text-transform: uppercase;
  -webkit-appearance: none;
  appearance: none;
}

/* ── SETUP / WELCOME (kept for structural parity) ── */
.welcome-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.welcome-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 52px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.welcome-title span { color: var(--accent); }

.welcome-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
  max-width: 340px;
}

.welcome-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 8px 0 24px;
}

.welcome-setup-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ── ADMIN SCREEN ── */
#adminScreen {
  padding: 52px 24px 60px;
  gap: 18px;
  justify-content: flex-start;
}

.setup-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}

.setup-back {
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.setup-title-text {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px;
  font-weight: 800;
}

.admin-shop-name {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
  margin-top: 1px;
}

.setup-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setup-card h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Join code display */
.join-code-display {
  font-family: 'Courier New', monospace;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: 0.3em;
  color: var(--accent);
  text-align: center;
  padding: 12px 0 4px;
}

/* Paper management list */
.paper-admin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.paper-admin-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.paper-admin-name { flex: 1; font-size: 14px; font-weight: 600; }
.paper-admin-meta { font-size: 11px; color: var(--muted); }

.icon-action-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s;
}
.icon-action-btn:hover { color: var(--text); }
.icon-action-btn.delete:hover { color: var(--red); }

.paper-admin-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.paper-edit-form {
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 10px 10px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paper-admin-wrapper .paper-admin-item {
  border-radius: 10px;
}
.paper-admin-wrapper:has(.paper-edit-form[style*="flex"]) .paper-admin-item {
  border-radius: 10px 10px 0 0;
}

.paper-add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

/* Audit log */
/* ── INVENTORY SNAPSHOT ── */
.snapshot-list { display: flex; flex-direction: column; gap: 4px; }

.snapshot-divider {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted);
  padding: 8px 0 2px;
}

.snapshot-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(118,138,150,0.15);
}
.snapshot-row:last-child { border-bottom: none; }

.snapshot-name { flex: 1; font-size: 13px; font-weight: 600; }

.snapshot-bar-wrap {
  width: 60px; height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px; overflow: hidden;
}
.snapshot-bar { height: 100%; border-radius: 3px; transition: width 0.3s; }

.snapshot-qty { font-size: 12px; color: var(--muted); width: 32px; text-align: right; }

.snapshot-badge {
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  padding: 2px 7px; border-radius: 20px; color: white; width: 52px;
  text-align: center; flex-shrink: 0;
}

.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
}

.log-item {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
}

.log-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.log-item-paper { font-weight: 600; }
.log-item-time  { font-size: 11px; color: var(--muted); }
.log-item-sub   { font-size: 12px; color: var(--muted); }

/* Workers list */
.workers-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.worker-item {
  background: var(--surface);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.worker-name { flex: 1; font-size: 14px; font-weight: 600; }
.worker-meta { font-size: 11px; color: var(--muted); }

.barcode-list { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow-y: auto; }

.barcode-item {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 8px;
}
.barcode-item-code { font-family: 'Courier New', monospace; font-size: 12px; color: var(--accent); flex: 1; }
.barcode-item-paper { font-size: 12px; color: var(--muted); flex: 1; }

/* ── INPUT UTILITIES ── */
.input-group { display: flex; flex-direction: column; gap: 6px; }

.input-group label {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input-group input,
.input-group select {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 13px;
  padding: 12px 14px;
  outline: none;
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
}

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

.hint {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.app-version {
  text-align: center;
  font-size: 11px;
  color: var(--border);
  padding: 16px 0 8px;
  letter-spacing: 0.05em;
}

/* ── ACCORDION ── */
.accordion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.accordion-header {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  font-size: 14px;
  font-weight: 600;
}

.accordion-arrow { transition: transform 0.2s; font-size: 12px; color: var(--muted); }
.accordion.open .accordion-arrow { transform: rotate(180deg); }
.accordion-body { display: none; padding: 0 16px 16px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.accordion.open .accordion-body { display: block; }

.step { display: flex; gap: 10px; margin-bottom: 10px; }
.step-num {
  background: var(--accent); color: white; border-radius: 50%;
  width: 22px; height: 22px; display: flex; align-items: center;
  justify-content: center; font-size: 11px; font-weight: 700;
  flex-shrink: 0; margin-top: 1px;
}

.code-block {
  background: #AAC7D810; border: 1px solid #AAC7D822;
  border-radius: 8px; padding: 10px 12px;
  font-family: 'Courier New', monospace; font-size: 11px;
  color: #AAC7D8; margin: 8px 0; white-space: pre-wrap; word-break: break-all;
}

/* ── BUTTONS ── */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 14px;
  font-family: 'Barlow Condensed', sans-serif; font-size: 17px;
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 16px 20px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s, transform 0.1s; width: 100%;
}
.btn:active { opacity: 0.8; transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #29353C; }
.btn-green   { background: var(--green);  color: #29353C; }
.btn-ghost   { background: var(--card);   color: var(--text); border: 1.5px solid var(--border); }
.btn-danger  { background: var(--red);    color: white; }

/* ── SCANNER SCREEN ── */
#scanScreen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 10;
  background: var(--bg);
}

#cameraView { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#cameraVideo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.scan-overlay {
  position: absolute; inset: 0; display: flex;
  flex-direction: column; align-items: center;
  justify-content: center; pointer-events: none;
}

.scan-frame { width: 260px; height: 160px; position: relative; }

.scan-frame::before, .scan-frame::after,
.scan-frame .c3, .scan-frame .c4 {
  content: ''; position: absolute; width: 28px; height: 28px;
  border-color: white; border-style: solid;
}
.scan-frame::before { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.scan-frame::after  { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.scan-frame .c3     { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.scan-frame .c4     { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.scan-line {
  position: absolute; left: 8px; right: 8px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: scanline 2s ease-in-out infinite;
}

@keyframes scanline {
  0%   { top: 10px; opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 148px; opacity: 0; }
}

.scan-hint-text {
  color: white; font-size: 14px; font-weight: 600;
  margin-top: 24px; text-shadow: 0 1px 6px rgba(0,0,0,0.8);
  letter-spacing: 0.03em;
}

.scan-top-bar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 52px 20px 16px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent);
  display: flex; align-items: center; justify-content: space-between; z-index: 10;
}

.scan-title-bar {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px; font-weight: 800; color: white; letter-spacing: 0.04em;
}

.scan-title-bar span { color: var(--accent); }

.icon-btn {
  background: rgba(255,255,255,0.15); backdrop-filter: blur(6px);
  border: none; border-radius: 50%; width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.scan-bottom-bar {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 16px 20px 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  display: flex; flex-direction: column; gap: 10px; z-index: 10;
}

.scan-user-info {
  font-size: 12px; color: rgba(255,255,255,0.6);
  text-align: center; letter-spacing: 0.02em;
}

.manual-btn {
  background: rgba(255,255,255,0.12); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2); border-radius: 14px;
  color: white; font-family: 'Barlow Condensed', sans-serif;
  font-size: 15px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 14px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; text-align: center;
}

/* Scanner loading state */
.scan-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); z-index: 5;
  font-size: 14px; color: var(--muted);
  flex-direction: column; gap: 12px;
}

.scan-loading.hidden { display: none; }

/* ── CONFIRM SCREEN ── */
#confirmScreen { padding: 52px 20px 60px; gap: 16px; }

/* Auto-submit progress bar */
.auto-submit-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--surface);
  z-index: 100;
  display: none;
}

.auto-submit-bar.active { display: block; }

.auto-submit-bar-fill {
  height: 100%;
  background: var(--green);
  width: 0%;
  animation: fillBar 1.5s linear forwards;
}

@keyframes fillBar {
  from { width: 0%; }
  to   { width: 100%; }
}

.confirm-back {
  display: flex; align-items: center; gap: 8px;
  color: var(--accent); font-size: 15px; font-weight: 600;
  cursor: pointer; -webkit-tap-highlight-color: transparent; margin-bottom: 4px;
}

.confirm-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}

.confirm-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 4px;
}

.confirm-paper {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px; font-weight: 800; line-height: 1.1; margin-bottom: 6px;
}

.confirm-barcode { font-size: 12px; color: var(--muted); font-family: monospace; }

.confirm-section-tag {
  display: inline-block; font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 20px; margin-top: 10px;
}

.tag-24 { background: #44576D55; color: #AAC7D8; border: 1px solid #768A96; }
.tag-36 { background: #3D6655; color: #5BAD8F; border: 1px solid #4A8A70; }
.tag-bp { background: #6B571E44; color: #D4A843; border: 1px solid #8A7230; }

.qty-section {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}

.qty-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
}

.qty-controls { display: flex; align-items: center; gap: 16px; }

.qty-stepper {
  background: var(--surface); border: none; border-radius: 12px;
  width: 52px; height: 52px; font-size: 26px; color: var(--text);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; flex-shrink: 0;
}

.qty-input {
  flex: 1; background: var(--surface); border: 2px solid var(--accent);
  border-radius: 14px; color: var(--text);
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 42px; font-weight: 800; text-align: center;
  padding: 10px; outline: none;
  -webkit-appearance: none; appearance: none;
}

.max-hint { font-size: 12px; color: var(--muted); text-align: center; }

.status-preview {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px; border-radius: 10px;
  font-size: 14px; font-weight: 600; transition: all 0.3s;
}
.status-ok    { background: #2A5C4422; color: var(--green); border: 1px solid #3D7A5A44; }
.status-low   { background: #5C481A22; color: var(--yellow); border: 1px solid #8A703044; }
.status-empty { background: #5C2A2A22; color: var(--red); border: 1px solid #8A404044; }
.status-none  { background: var(--surface); color: var(--muted); }

/* ── SUCCESS SCREEN ── */
#successScreen {
  align-items: center; justify-content: center;
  gap: 20px; padding: 40px 24px; text-align: center;
}

.success-icon {
  width: 80px; height: 80px; background: var(--green);
  border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 36px;
  animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.success-title { font-family: 'Barlow Condensed', sans-serif; font-size: 32px; font-weight: 800; }
.success-detail { font-size: 15px; color: var(--muted); line-height: 1.6; }

/* ── MANUAL SCREEN ── */
#manualScreen { padding: 52px 20px 60px; gap: 16px; }

.paper-list { display: flex; flex-direction: column; gap: 8px; }

.paper-item {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s;
}
.paper-item:active { border-color: var(--accent); }

.paper-item-name { font-size: 14px; font-weight: 600; line-height: 1.2; flex: 1; }

.paper-item-tag {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 2px 8px; border-radius: 20px; flex-shrink: 0;
}

.section-divider {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); padding: 4px 0;
}

/* ── UNKNOWN BARCODE ── */
.unknown-card {
  background: #C0544A18; border: 1px solid #C0544A66;
  border-radius: var(--radius); padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}

.unknown-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px; font-weight: 800; color: var(--red);
}

.unknown-code {
  font-family: monospace; font-size: 13px; color: var(--muted);
  background: var(--surface); padding: 8px 12px;
  border-radius: 8px; text-align: center;
}

.register-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}

.register-select {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 10px; color: var(--text);
  font-family: 'Barlow', sans-serif; font-size: 15px;
  padding: 13px 14px; outline: none; width: 100%;
  -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B6355' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; cursor: pointer;
}
.register-select:focus { border-color: var(--accent); }
.register-select option { background: #344550; color: #E6E6E6; }

.btn-register {
  background: var(--accent); color: #29353C; border: none;
  border-radius: 12px; font-family: 'Barlow Condensed', sans-serif;
  font-size: 16px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 14px; cursor: pointer;
  -webkit-tap-highlight-color: transparent; transition: opacity 0.15s; width: 100%;
}
.btn-register:active { opacity: 0.8; }
.btn-register:disabled { opacity: 0.4; }

/* ── TOAST ── */
/* ── LAUNCH COUNTDOWN ── */
.countdown-overlay {
  position: fixed; inset: 0;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.8s ease;
}
.countdown-overlay.fade-out { opacity: 0; pointer-events: none; }

.countdown-content {
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 32px 24px;
  background: radial-gradient(ellipse at 50% 40%, rgba(91,173,143,0.1) 0%, transparent 70%);
}

.countdown-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; font-weight: 700; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--green);
  margin-bottom: 16px;
}

.countdown-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(64px, 16vw, 96px);
  font-weight: 800; letter-spacing: 0.02em;
  color: var(--text); line-height: 1;
  margin-bottom: 10px;
}
.countdown-logo span { color: var(--accent); }

.countdown-tagline {
  font-size: 15px; color: var(--muted);
  margin-bottom: 48px; letter-spacing: 0.02em;
}

.countdown-timer {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 28px;
}

.countdown-unit {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}

.countdown-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(48px, 12vw, 72px);
  font-weight: 800; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: clamp(72px, 18vw, 96px);
  text-align: center;
  line-height: 1.1;
  padding: 10px 0;
  letter-spacing: 0.02em;
}

.countdown-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--muted);
}

.countdown-sep {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 48px; font-weight: 800;
  color: var(--border); margin-bottom: 20px;
}

.countdown-date {
  font-size: 13px; color: var(--border);
  letter-spacing: 0.04em;
}

/* ── WELCOME MODAL ── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 1100; padding: 24px;
}
.modal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  width: 100%; max-width: 360px;
  display: flex; flex-direction: column; gap: 12px;
  text-align: center;
}
.modal-icon { font-size: 40px; }
.modal-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 26px; font-weight: 800; color: var(--text);
}
.modal-desc { font-size: 14px; color: var(--muted); line-height: 1.6; }
.modal-join-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-top: 4px;
}
.modal-join-code {
  font-family: 'Courier New', monospace;
  font-size: 38px; font-weight: 800;
  letter-spacing: 0.3em; color: var(--accent);
  padding: 8px 0;
}

.offline-banner {
  position: fixed; top: 0; left: 0; right: 0;
  background: #C0544A; color: white;
  text-align: center; padding: 8px 16px;
  font-size: 13px; font-weight: 600;
  z-index: 1000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}
.offline-banner.visible { transform: translateY(0); }

.toast {
  position: fixed; bottom: 30px; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #44576D; color: #E6E6E6; border: 1px solid #768A96;
  padding: 12px 20px;
  border-radius: 30px; font-size: 14px; font-weight: 600;
  z-index: 999; transition: transform 0.3s ease;
  white-space: nowrap; pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); }
