/* ============================================
   DROPLANE — Design System
   ============================================ */

:root {
  --bg:           #12121A;
  --surface:      #1E1E2A;
  --surface2:     #252535;
  --border:       #2A2A3A;
  --text:         #FFFFFF;
  --text-sub:     #8888AA;
  --text-muted:   #555570;
  --cyan:         #00E5CC;
  --purple:       #7B4FD4;
  --purple-deep:  #3D3060;
  --purple-thumb: #6B3FBF;
  --danger:       #FF4466;
  --success:      #00E5CC;
  --warning:      #FFB347;

  --radius-sm:    8px;
  --radius:       14px;
  --radius-lg:    20px;
  --radius-pill:  999px;

  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;

  --safe-top:    env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* ============ SCREENS ============ */
.screen {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: absolute;
  inset: 0;
}
.screen.active { display: flex; }

/* ============ TOP BAR ============ */
.topbar {
  display: flex;
  align-items: center;
  padding: calc(var(--safe-top) + 12px) 20px 12px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 12px;
  min-height: 60px;
}
.topbar-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  flex: 1;
}
.topbar-logo {
  font-size: 22px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}
.topbar-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  font-size: 20px;
  line-height: 1;
}
.topbar-btn:hover { background: var(--surface); }
.topbar-btn.back { color: var(--cyan); font-size: 18px; }

/* ============ SCROLLABLE CONTENT ============ */
.content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--safe-bottom) + 80px);
}
.content.no-pad { padding-bottom: 0; }

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 8px 16px calc(var(--safe-bottom) + 8px);
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 20px;
  border-radius: var(--radius);
  transition: color 0.15s;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.nav-btn .icon { font-size: 22px; line-height: 1; }
.nav-btn.active { color: var(--cyan); }
.nav-btn.new-lane {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  border-radius: var(--radius-pill);
  padding: 14px 24px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(0,229,204,0.3);
}

/* ============ LANE CARD ============ */
.lane-list { padding: 8px 0; }

.lane-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.lane-card:active { background: var(--surface); }

.lane-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
}

/* Activity gradient ring */
.lane-avatar::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: var(--radius-pill);
  background: conic-gradient(var(--activity-color, var(--border)) var(--activity-pct, 0%), transparent 0%);
  z-index: -1;
}

.lane-info { flex: 1; min-width: 0; }
.lane-label {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lane-label.hidden { letter-spacing: 3px; color: var(--text-sub); }
.lane-preview {
  font-size: 13px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Activity bar */
.lane-activity-bar {
  width: 3px;
  height: 40px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  background: var(--activity-gradient, var(--border));
}

.lane-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.lane-time {
  font-size: 11px;
  color: var(--text-muted);
}
.lane-badge {
  background: var(--cyan);
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}
.lane-tag {
  font-size: 10px;
  color: var(--warning);
  font-weight: 500;
}
.lane-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.lane-status-dot.active { background: var(--cyan); }
.lane-status-dot.pending { background: var(--warning); }

/* ============ FILTER / SORT BAR ============ */
.filter-bar {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-sub);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}
.filter-chip.active {
  background: var(--purple-deep);
  border-color: var(--purple);
  color: var(--text);
}

/* ============ MESSAGES ============ */
.message-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
}

.message-row {
  display: flex;
  flex-direction: column;
  max-width: 78%;
}
.message-row.sent { align-self: flex-end; align-items: flex-end; }
.message-row.received { align-self: flex-start; align-items: flex-start; }

.bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.5;
  word-break: break-word;
  position: relative;
}
.sent .bubble {
  background: linear-gradient(135deg, var(--cyan) 0%, var(--purple) 100%);
  color: white;
  border-bottom-right-radius: 4px;
}
.received .bubble {
  background: var(--surface2);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
  padding: 0 4px;
}
.delivery-tick { font-size: 12px; }
.delivery-tick.delivered { color: var(--cyan); }
.delivery-tick.expired { color: var(--danger); }

/* Message date separator */
.date-sep {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  padding: 12px 0 4px;
  font-weight: 500;
}

/* ============ MESSAGE INPUT ============ */
.message-bar {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 16px calc(var(--safe-bottom) + 10px);
  background: var(--bg);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.message-input-wrap {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  display: flex;
  align-items: flex-end;
  padding: 8px 14px;
  gap: 8px;
}
.message-input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 15px;
  font-family: var(--font);
  resize: none;
  outline: none;
  max-height: 120px;
  overflow-y: auto;
  line-height: 1.4;
}
.message-input::placeholder { color: var(--text-muted); }
.attach-btn {
  background: none;
  border: none;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 20px;
  padding: 2px;
  line-height: 1;
}
.send-btn {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-pill);
  border: none;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  transition: opacity 0.15s;
  box-shadow: 0 2px 12px rgba(0,229,204,0.3);
}
.send-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}

/* Greyed out lane input */
.message-bar.locked .message-input-wrap {
  opacity: 0.4;
  pointer-events: none;
}
.message-bar.locked .send-btn {
  opacity: 0.35;
  pointer-events: none;
}
.locked-notice {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 6px 16px 0;
}

/* ============ QR SCREEN ============ */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  gap: 24px;
  flex: 1;
}
.qr-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 0 60px rgba(0,229,204,0.2);
}
.qr-box canvas { display: block; }
.qr-label {
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}
.qr-sublabel {
  font-size: 13px;
  color: var(--text-sub);
  text-align: center;
  max-width: 280px;
}
.qr-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-sub);
}
.qr-timer-bar {
  width: 200px;
  height: 4px;
  background: var(--surface2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.qr-timer-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--purple));
  border-radius: var(--radius-pill);
  transition: width 1s linear;
}
.qr-store-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 10px 20px;
  color: var(--text-sub);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

/* ============ CAMERA / SCANNER ============ */
.scanner-container {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}
#scanner-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.scanner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.scanner-frame {
  width: 240px;
  height: 240px;
  position: relative;
}
.scanner-frame::before,
.scanner-frame::after,
.scanner-frame > span::before,
.scanner-frame > span::after {
  content: '';
  position: absolute;
  width: 30px;
  height: 30px;
  border-color: var(--cyan);
  border-style: solid;
}
.scanner-frame::before { top: 0; left: 0; border-width: 3px 0 0 3px; }
.scanner-frame::after  { top: 0; right: 0; border-width: 3px 3px 0 0; }
.scanner-frame > span::before { bottom: 0; left: 0; border-width: 0 0 3px 3px; }
.scanner-frame > span::after  { bottom: 0; right: 0; border-width: 0 3px 3px 0; }

.scanner-line {
  position: absolute;
  left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: scan-line 2s ease-in-out infinite;
}
@keyframes scan-line {
  0%   { top: 0; }
  50%  { top: calc(100% - 2px); }
  100% { top: 0; }
}
.scanner-hint {
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  margin-top: 32px;
  text-align: center;
  padding: 0 32px;
}
.camera-flip-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  pointer-events: all;
  background: rgba(0,0,0,0.5);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============ SETTINGS ============ */
.settings-section {
  padding: 20px 20px 4px;
}
.settings-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-sub);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 8px;
}
.settings-item {
  display: flex;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 8px;
  gap: 14px;
  cursor: pointer;
  transition: background 0.12s;
}
.settings-item:active { background: var(--surface2); }
.settings-item-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--purple-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.settings-item-text { flex: 1; }
.settings-item-label { font-size: 15px; font-weight: 500; }
.settings-item-sub { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.settings-item-right { color: var(--text-muted); font-size: 14px; }
.settings-chevron { color: var(--text-muted); font-size: 16px; }

/* Toggle */
.toggle {
  position: relative;
  width: 52px;
  height: 30px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-pill);
  background: var(--surface2);
  transition: background 0.2s;
  cursor: pointer;
}
.toggle input:checked + .toggle-track {
  background: linear-gradient(90deg, var(--cyan), var(--purple));
}
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--purple-thumb);
  transition: transform 0.2s;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(22px); }

/* Segmented control */
.segmented {
  display: flex;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 3px;
  gap: 2px;
}
.segmented-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-sub);
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}
.segmented-btn.active {
  background: var(--purple-deep);
  color: var(--text);
}

/* ============ ONBOARDING ============ */
.onboard-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: calc(var(--safe-top) + 48px) 32px calc(var(--safe-bottom) + 40px);
  gap: 24px;
  text-align: center;
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.onboard-logo {
  font-size: 64px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -3px;
  line-height: 1;
}
.onboard-tagline {
  font-size: 18px;
  font-weight: 600;
  max-width: 300px;
}
.onboard-sub {
  font-size: 14px;
  color: var(--text-sub);
  max-width: 300px;
  line-height: 1.6;
}
.onboard-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 320px;
  text-align: left;
}
.onboard-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px;
}
.onboard-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  color: white;
}
.onboard-step-text { font-size: 13px; color: var(--text-sub); line-height: 1.5; }
.onboard-step-text strong { color: var(--text); display: block; margin-bottom: 2px; }

/* ============ BUTTONS ============ */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  padding: 14px 28px;
  font-family: var(--font);
  transition: opacity 0.15s, transform 0.1s;
  letter-spacing: 0.2px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  color: white;
  box-shadow: 0 4px 20px rgba(0,229,204,0.25);
  width: 100%;
}
.btn-secondary {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 100%;
}
.btn-danger {
  background: rgba(255,68,102,0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
  width: 100%;
}
.btn-ghost {
  background: none;
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 500;
  padding: 10px;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ============ FORM ELEMENTS ============ */
.form-group { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.5px; }
.form-input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  font-family: var(--font);
  padding: 14px 16px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}
.form-input:focus { border-color: var(--cyan); }
.form-input::placeholder { color: var(--text-muted); }
.form-select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 16px;
  font-family: var(--font);
  padding: 14px 16px;
  outline: none;
  width: 100%;
  appearance: none;
  cursor: pointer;
}

/* ============ MODAL / SHEET ============ */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: none;
  align-items: flex-end;
  justify-content: center;
}
.overlay.active { display: flex; }
.sheet {
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 20px calc(var(--safe-bottom) + 20px);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slide-up 0.25s ease;
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-pill);
  margin: 0 auto 20px;
}
.sheet-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  top: calc(var(--safe-top) + 60px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 360px;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  animation: toast-in 0.2s ease, toast-out 0.2s ease 2.8s forwards;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}
.toast.success { border-color: var(--cyan); color: var(--cyan); }
.toast.error   { border-color: var(--danger); color: var(--danger); }
.toast.warning { border-color: var(--warning); color: var(--warning); }
@keyframes toast-in  { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }
@keyframes toast-out { from { opacity:1; } to { opacity:0; } }

/* ============ SUCCESS ANIMATION ============ */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 48px 32px;
  text-align: center;
  flex: 1;
}
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  animation: pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes pop-in {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.success-title { font-size: 22px; font-weight: 700; }
.success-sub { font-size: 14px; color: var(--text-sub); max-width: 280px; }

/* ============ EMPTY STATE ============ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 32px;
  text-align: center;
  color: var(--text-muted);
}
.empty-icon { font-size: 48px; opacity: 0.4; }
.empty-title { font-size: 17px; font-weight: 600; color: var(--text-sub); }
.empty-sub { font-size: 13px; max-width: 260px; line-height: 1.6; }

/* ============ LOCK SCREEN ============ */
.lock-screen {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 48px 32px;
}
.lock-logo {
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -2px;
}
.lock-title { font-size: 18px; font-weight: 600; color: var(--text-sub); }
.pin-dots {
  display: flex;
  gap: 16px;
}
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: transparent;
  transition: all 0.15s;
}
.pin-dot.filled {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px rgba(0,229,204,0.5);
}
.pin-dot.error {
  background: var(--danger);
  border-color: var(--danger);
  animation: shake 0.3s ease;
}
.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  grid-template-rows: repeat(4, 72px);
  gap: 12px;
}
.pin-key {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  transition: background 0.1s;
  -webkit-tap-highlight-color: transparent;
}
.pin-key:active { background: var(--surface2); }
.pin-key.empty { background: none; border: none; cursor: default; }
.pin-key.action { font-size: 16px; color: var(--text-sub); }
@keyframes shake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ============ LANE DETAIL HEADER ============ */
.lane-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 8px) 16px 8px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.lane-header-info { flex: 1; min-width: 0; }
.lane-header-name {
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lane-header-status { font-size: 12px; color: var(--text-sub); margin-top: 1px; }
.lane-header-status.active { color: var(--cyan); }
.lane-header-status.pending { color: var(--warning); }
.lane-header-status.expired { color: var(--danger); }

/* ============ MISC ============ */
.divider { height: 1px; background: var(--border); margin: 4px 0; }
.spacer { flex: 1; }
.text-cyan { color: var(--cyan); }
.text-danger { color: var(--danger); }
.text-sub { color: var(--text-sub); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.p-20 { padding: 20px; }
.gap-12 { gap: 12px; }
.w-full { width: 100%; }

/* Scrollbar */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* Timed message indicator */
.timed-badge {
  font-size: 11px;
  color: var(--warning);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Expired lane overlay */
.expired-banner {
  background: rgba(255,68,102,0.1);
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13px;
  color: var(--danger);
  text-align: center;
  margin: 12px 16px;
}
