:root {
  --bg-darker: #07131c;
  --bg-dark: #0e1626;
  --bg-card: rgba(14, 22, 38, 0.92);
  --border-muted: rgba(148, 163, 184, 0.16);
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-cyan: rgba(76, 166, 216, 0.38);
  --border-amber: rgba(217, 142, 43, 0.42);
  --neon-cyan: #4ca6d8;
  --neon-amber: #d98e2b;
  --neon-green: #2eb872;
  --neon-red: #e5484d;
  --color-text: #e6edf6;
  --color-text-muted: #8fa3bc;
  --font-main: 'Fira Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-digital: 'Fira Code', 'Consolas', monospace;
  --transition-smooth: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.taker-body {
  background-color: var(--bg-darker);
  color: var(--color-text);
  font-family: var(--font-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image: radial-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
}

button {
  font-family: var(--font-main);
}

:focus-visible {
  outline: 2px solid var(--neon-cyan);
  outline-offset: 2px;
}

/* Toast Container */
#taker-toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 90%;
  max-width: 400px;
  pointer-events: none;
}

.taker-toast {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(3, 8, 18, 0.55);
  backdrop-filter: blur(12px);
  animation: slideDown 0.25s ease;
  pointer-events: auto;
  text-align: center;
}

.toast-success { background: rgba(46, 184, 114, 0.18); border: 1px solid var(--neon-green); color: #fff; }
.toast-info { background: rgba(76, 166, 216, 0.18); border: 1px solid var(--neon-cyan); color: #fff; }
.toast-warning { background: rgba(217, 142, 43, 0.18); border: 1px solid var(--neon-amber); color: #fff; }

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   AUTH SCREEN (Login)
   ========================================================================== */
.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 12px 40px rgba(3, 8, 18, 0.55);
  backdrop-filter: blur(16px);
}

.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 12px;
  border: 1px solid var(--border-muted);
  overflow: hidden;
}

.auth-logo img { width: 100%; height: 100%; object-fit: cover; }

.auth-title {
  font-family: var(--font-digital);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--color-text);
}

.auth-subtitle {
  font-size: 10px;
  color: var(--color-text-muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 600;
  margin-top: 6px;
}

.auth-guide-box {
  background: rgba(76, 166, 216, 0.06);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 20px;
  font-size: 11px;
  line-height: 1.5;
}

.auth-guide-icon { font-size: 20px; flex-shrink: 0; }
.auth-guide-box strong { color: var(--neon-cyan); display: block; margin-bottom: 2px; }

.btn-google-auth {
  width: 100%;
  background: #ffffff;
  color: #1f2937;
  border: none;
  padding: 12px 16px;
  min-height: 44px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(3, 8, 18, 0.3);
  transition: var(--transition-smooth);
}

.btn-google-auth:hover {
  background: #f8fafc;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0 16px;
  font-size: 10px;
  color: var(--color-text-muted);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-muted);
}
.auth-divider span { padding: 0 10px; }

.demo-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.btn-demo-account {
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--color-text);
  transition: var(--transition-smooth);
  width: 100%;
  text-align: left;
  min-height: 44px;
}

.btn-demo-account:hover {
  background: rgba(148, 163, 184, 0.1);
  border-color: var(--border-cyan);
}

.demo-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--neon-cyan);
  color: #07131c;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.demo-info { flex: 1; display: flex; flex-direction: column; }
.demo-info strong { font-size: 12px; color: #fff; }
.demo-info span { font-size: 10px; color: var(--color-text-muted); }

.badge-role {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(76, 166, 216, 0.15);
  color: var(--neon-cyan);
  border: 1px solid rgba(76, 166, 216, 0.3);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.custom-login-wrap {
  display: flex;
  gap: 6px;
}

.form-input {
  flex: 1;
  background: rgba(7, 19, 28, 0.6);
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 16px;
  outline: none;
}
.form-input:focus { border-color: var(--neon-cyan); }

.btn-primary-taker {
  background: var(--neon-green);
  color: #07131c;
  font-weight: 700;
  font-size: 12px;
  padding: 0 16px;
  min-height: 44px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary-taker:hover { filter: brightness(1.08); }

.auth-footer-nav {
  margin-top: 24px;
  text-align: center;
  font-size: 11px;
  color: var(--color-text-muted);
  display: flex;
  justify-content: center;
  gap: 12px;
}
.auth-footer-nav a { color: var(--color-text-muted); text-decoration: none; }
.auth-footer-nav a:hover { color: var(--neon-cyan); }

/* ==========================================================================
   MAIN SHIFT SCREEN (Authenticated)
   ========================================================================== */
.shift-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.shift-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(7, 19, 28, 0.95);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--border-muted);
  padding: 12px 16px;
  padding-top: max(12px, env(safe-area-inset-top));
}

.user-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 600px;
  margin: 0 auto;
  width: 100%;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--neon-cyan);
  color: #07131c;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.user-meta { display: flex; flex-direction: column; }
.user-meta strong { font-size: 13px; color: #fff; }
.user-meta span { font-size: 10px; color: var(--color-text-muted); }

.header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.live-indicator-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(46, 184, 114, 0.1);
  border: 1px solid rgba(46, 184, 114, 0.3);
  font-size: 10px;
  font-weight: 700;
  color: var(--neon-green);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon-green);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.btn-logout {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(229, 72, 77, 0.1);
  border: 1px solid rgba(229, 72, 77, 0.3);
  color: var(--neon-red);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-logout:hover { background: rgba(229, 72, 77, 0.2); }

/* Shift Container */
.shift-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 90px;
  padding-bottom: calc(90px + env(safe-area-inset-bottom));
}

/* Hero Post Card */
.card-hero-post {
  background: var(--bg-dark);
  border: 1px solid var(--border-cyan);
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 12px 32px rgba(3, 8, 18, 0.5), 0 0 0 1px rgba(76, 166, 216, 0.12);
  position: relative;
  overflow: hidden;
}

.hero-post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.post-tag-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-seq-badge {
  font-family: var(--font-digital);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--neon-cyan);
  color: #07131c;
  font-variant-numeric: tabular-nums;
}

.post-status-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--neon-cyan);
  letter-spacing: 0.5px;
}

.duty-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
}
.badge-active { background: rgba(46, 184, 114, 0.2); color: var(--neon-green); border: 1px solid rgba(46, 184, 114, 0.4); }

.hero-post-main {
  text-align: center;
  padding: 10px 0 16px;
}

.hero-post-title {
  font-family: var(--font-digital);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--color-text);
  margin-bottom: 4px;
}

.hero-post-subtitle {
  font-size: 12px;
  color: var(--color-text-muted);
}

/* Timer Box */
.timer-box {
  background: rgba(7, 19, 28, 0.5);
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}

.timer-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

.sync-text { color: var(--neon-cyan); font-weight: 600; }

.timer-digits-row {
  text-align: center;
  margin-bottom: 10px;
}

.timer-digits {
  font-family: var(--font-digital);
  font-size: 44px;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

.timer-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 4px;
  overflow: hidden;
}

.timer-progress-bar {
  height: 100%;
  background: var(--neon-cyan);
  border-radius: 4px;
  transition: width 0.5s ease;
}

/* Post Actions */
.post-actions-row {
  display: flex;
  gap: 8px;
}

.btn-action-post {
  flex: 1;
  padding: 10px 12px;
  min-height: 44px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  background: rgba(148, 163, 184, 0.06);
  border: 1px solid var(--border-muted);
  color: var(--color-text);
  transition: var(--transition-smooth);
}

.btn-action-post:hover { background: rgba(148, 163, 184, 0.12); }

.btn-action-post.btn-checked {
  background: rgba(46, 184, 114, 0.15);
  border-color: rgba(46, 184, 114, 0.4);
  color: var(--neon-green);
}

/* Patrol Mission Banner */
.patrol-alert-box {
  margin-top: 14px;
  background: rgba(229, 72, 77, 0.08);
  border: 1px solid rgba(229, 72, 77, 0.4);
  border-radius: 10px;
  padding: 12px 14px;
  animation: alertPulse 2s infinite alternate;
}

@keyframes alertPulse {
  0% { border-color: rgba(229, 72, 77, 0.35); }
  100% { border-color: rgba(229, 72, 77, 0.8); }
}

.patrol-alert-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.patrol-alert-header span { font-size: 20px; }
.patrol-alert-header strong { font-size: 12px; color: var(--neon-red); display: block; }
.patrol-alert-header p { font-size: 10px; color: var(--color-text-muted); }

.patrol-confirm-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  cursor: pointer;
  color: #fff;
}

/* Secondary Cards (Next up & Timeline) */
.card-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  padding: 16px 18px;
}

.card-sec-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-muted);
}
.sec-icon { font-size: 16px; }
.card-sec-header h3 { font-family: var(--font-digital); font-size: 11px; font-weight: 600; color: var(--color-text-muted); letter-spacing: 1.2px; text-transform: uppercase; }

.next-post-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.next-post-title { font-size: 18px; font-weight: 700; color: var(--neon-amber); font-family: var(--font-digital); }
.next-post-time { font-size: 11px; color: var(--color-text-muted); }
.next-post-guide { font-size: 11px; color: var(--color-text-muted); line-height: 1.5; }

/* Timeline List */
.timeline-track {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
}

.timeline-item.active {
  background: rgba(76, 166, 216, 0.08);
  border-color: var(--border-cyan);
}

.timeline-time {
  font-family: var(--font-digital);
  font-size: 10px;
  color: var(--color-text-muted);
  min-width: 70px;
  font-variant-numeric: tabular-nums;
}
.timeline-item.active .timeline-time { color: var(--neon-cyan); font-weight: 700; }

.timeline-station {
  flex: 1;
  font-weight: 600;
  color: #fff;
}

.timeline-tag {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.08);
  color: var(--color-text-muted);
}
.timeline-item.active .timeline-tag {
  background: var(--neon-cyan);
  color: #07131c;
  font-weight: 800;
}

/* Session Info Card */
.session-info-card {
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  padding: 10px 14px;
}

.btn-refresh {
  background: rgba(76, 166, 216, 0.1);
  border: 1px solid rgba(76, 166, 216, 0.3);
  color: var(--neon-cyan);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-refresh:hover { background: rgba(76, 166, 216, 0.2); }

/* Bottom Shift Change Alert Banner */
.shift-alert-banner {
  position: fixed;
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 16px;
  right: 16px;
  max-width: 568px;
  margin: 0 auto;
  background: var(--bg-dark);
  border: 1px solid var(--neon-amber);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 12px 32px rgba(3, 8, 18, 0.6);
  animation: slideUpAlert 0.3s cubic-bezier(0.2, 0, 0, 1);
  z-index: 1000;
}

@keyframes slideUpAlert {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.alert-content { display: flex; align-items: center; gap: 10px; }
.alert-bell { font-size: 24px; animation: ring 1s infinite alternate; }

@keyframes ring {
  0% { transform: rotate(-10deg); }
  100% { transform: rotate(10deg); }
}

.alert-content strong { font-size: 13px; color: var(--neon-amber); display: block; }
.alert-content p { font-size: 11px; color: var(--color-text); }

.btn-dismiss {
  background: var(--neon-amber);
  color: #07131c;
  border: none;
  font-weight: 800;
  font-size: 11px;
  padding: 8px 12px;
  min-height: 36px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-smooth);
}

.btn-dismiss:hover { filter: brightness(1.08); }

/* In-App Direct Update Modal Overlay */
.inapp-update-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(3, 8, 18, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: fadeInModal 0.25s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.inapp-update-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-dark);
  border: 1px solid var(--border-amber);
  box-shadow: 0 18px 48px rgba(3, 8, 18, 0.7);
  border-radius: 14px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: scaleUpModal 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.update-modal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.update-modal-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(217, 142, 43, 0.12);
  border: 1px solid var(--border-amber);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.update-modal-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.5px;
  line-height: 1.3;
}

.update-modal-subtitle {
  font-size: 11px;
  color: var(--neon-amber);
  font-family: var(--font-digital);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.update-modal-body {
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

.update-modal-body strong {
  color: #fff;
}

.update-progress-track {
  width: 100%;
  height: 12px;
  background: rgba(148, 163, 184, 0.12);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  margin-top: 10px;
}

.update-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--neon-amber);
  border-radius: 8px;
  transition: width 0.15s ease;
}

.update-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
}

.update-progress-percent {
  font-family: var(--font-digital);
  font-size: 16px;
  font-weight: 700;
  color: var(--neon-amber);
  font-variant-numeric: tabular-nums;
}

.update-progress-bytes {
  color: var(--color-text-muted);
  font-family: var(--font-digital);
  font-size: 11px;
}

.update-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 6px;
}

.btn-update-cancel {
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--color-text-muted);
  padding: 10px 16px;
  min-height: 40px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-update-cancel:hover {
  background: rgba(148, 163, 184, 0.16);
  color: #fff;
}

.btn-update-confirm {
  background: var(--neon-amber);
  border: none;
  color: #07131c;
  padding: 10px 18px;
  min-height: 40px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-update-confirm:active {
  transform: scale(0.97);
}

.taker-env-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--neon-amber);
  background: rgba(217, 142, 43, 0.12);
  border: 1px solid rgba(217, 142, 43, 0.35);
  border-radius: 6px;
  padding: 4px 10px;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.taker-env-chip {
  font-size: 9px;
  font-weight: 700;
  color: var(--neon-amber);
  background: rgba(217, 142, 43, 0.15);
  border: 1px solid rgba(217, 142, 43, 0.4);
  border-radius: 4px;
  padding: 2px 6px;
  text-transform: uppercase;
}

/* ==========================================================================
   TAB SYSTEM & MULTI-VIEW NAVIGATION
   ========================================================================== */
.tab-pane {
  display: none;
  animation: fadeInTab 0.25s ease-out;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
}

.tab-header-icon {
  font-size: 24px;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(76, 166, 216, 0.1);
  border: 1px solid var(--border-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tab-header-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.tab-header-subtitle {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Next Station Teaser Card on Tab 1 */
.next-station-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(76, 166, 216, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.next-station-teaser:hover {
  background: rgba(76, 166, 216, 0.1);
  border-color: var(--neon-cyan);
}

.teaser-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.teaser-badge {
  font-size: 9px;
  font-weight: 700;
  color: var(--neon-cyan);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.teaser-left strong {
  font-size: 14px;
  color: #fff;
}

.teaser-left span {
  font-size: 11px;
  color: var(--color-text-muted);
}

.btn-teaser-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  min-height: 36px;
  border-radius: 8px;
  background: rgba(76, 166, 216, 0.12);
  border: 1px solid rgba(76, 166, 216, 0.3);
  color: var(--neon-cyan);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-teaser-action:hover { background: rgba(76, 166, 216, 0.22); }

/* Visual Rotation Flow on Tab 2 */
.rotation-flow-box {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 6px 14px;
  scrollbar-width: thin;
}

.rotation-step-card {
  flex-shrink: 0;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-muted);
  text-align: center;
  min-width: 110px;
  transition: var(--transition-smooth);
}

.rotation-step-card.current {
  background: rgba(76, 166, 216, 0.1);
  border: 1px solid var(--neon-cyan);
}

.rotation-step-card.next {
  background: rgba(217, 142, 43, 0.08);
  border: 1px solid var(--neon-amber);
}

.step-seq-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.rotation-step-card.current .step-seq-label { color: var(--neon-cyan); }
.rotation-step-card.next .step-seq-label { color: var(--neon-amber); }

.step-station-name {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.rotation-flow-arrow {
  color: var(--color-text-muted);
  font-size: 14px;
  flex-shrink: 0;
}

/* Sound Settings & Controls on Tab 3 */
.sound-settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border-muted);
  border-radius: 12px;
  padding: 18px;
}

.setting-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.setting-title-row h4 {
  font-family: var(--font-digital);
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.sound-picker-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.sound-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.sound-option-card:hover {
  background: rgba(148, 163, 184, 0.1);
}

.sound-option-card.selected {
  background: rgba(76, 166, 216, 0.1);
  border: 1px solid var(--neon-cyan);
}

.sound-option-info strong {
  font-size: 12px;
  color: #fff;
  display: block;
}

.sound-option-info p {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

.btn-preview-inline {
  background: rgba(76, 166, 216, 0.12);
  border: 1px solid rgba(76, 166, 216, 0.35);
  border-radius: 6px;
  color: var(--neon-cyan);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  min-height: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition-smooth);
}

.btn-preview-inline:hover {
  background: var(--neon-cyan);
  color: #07131c;
}

.setting-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--border-muted);
}

.setting-toggle-label strong {
  font-size: 12px;
  color: #fff;
  display: block;
}

.setting-toggle-label p {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* Switch toggle */
.switch-input-wrap {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(148, 163, 184, 0.2);
  transition: .2s;
  border-radius: 24px;
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}

input:checked + .switch-slider {
  background-color: var(--neon-green);
}

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

/* ==========================================================================
   BOTTOM NAVIGATION BAR
   ========================================================================== */
.taker-bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(7, 19, 28, 0.96);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-muted);
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 100;
  max-width: 600px;
  margin: 0 auto;
  box-shadow: 0 -4px 20px rgba(3, 8, 18, 0.5);
  padding-left: 8px;
  padding-right: 8px;
}

.nav-tab-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  border-radius: 10px;
  color: var(--color-text-muted);
  transition: var(--transition-smooth);
  position: relative;
}

.nav-tab-btn.active {
  color: var(--neon-cyan);
}

.nav-tab-btn.active .nav-tab-icon {
  transform: scale(1.15);
}

.nav-tab-btn.active::after {
  content: '';
  position: absolute;
  top: 0;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: var(--neon-cyan);
}

.nav-tab-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.nav-tab-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* ==========================================================================
   SESSION JOIN SCREEN & 4-DIGIT PIN & QR SCANNER
   ========================================================================== */
.session-guard-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(148, 163, 184, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

.session-connect-header {
  text-align: center;
  margin-bottom: 18px;
}

.session-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(76, 166, 216, 0.1);
  border: 1px solid var(--border-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto;
}

.pin-entry-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(148, 163, 184, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
}

.pin-inputs-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 10px 0;
}

.pin-digit {
  width: 56px;
  height: 64px;
  background: rgba(76, 166, 216, 0.06);
  border: 1px solid var(--border-cyan);
  border-radius: 10px;
  font-family: var(--font-digital);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  text-align: center;
  outline: none;
  transition: var(--transition-smooth);
}

.pin-digit:focus {
  border-color: var(--neon-cyan);
  background: rgba(76, 166, 216, 0.14);
  box-shadow: 0 0 0 3px rgba(76, 166, 216, 0.25);
}

.btn-scan-camera {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  min-height: 44px;
  border-radius: 10px;
  background: rgba(217, 142, 43, 0.08);
  border: 1px dashed var(--border-amber);
  color: var(--neon-amber);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-scan-camera:hover {
  background: rgba(217, 142, 43, 0.16);
  border-style: solid;
}

.btn-recent-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  min-height: 36px;
  border-radius: 8px;
  background: rgba(46, 184, 114, 0.1);
  border: 1px solid rgba(46, 184, 114, 0.35);
  color: var(--neon-green);
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-recent-chip:hover {
  background: rgba(46, 184, 114, 0.2);
}

.qr-target-reticle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 190px;
  height: 190px;
  border: 2px dashed rgba(76, 166, 216, 0.85);
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  animation: pulseReticle 2s infinite ease-in-out;
}

@keyframes pulseReticle {
  0%, 100% { border-color: rgba(76, 166, 216, 0.85); }
  50% { border-color: rgba(217, 142, 43, 0.85); }
}

/* ==========================================================================
   DIRECT ASSIGNMENT CARD & PLAN MODE STYLES (OPTION 1)
   ========================================================================== */
.direct-assignment-card {
  background: var(--bg-dark);
  border: 1px solid var(--neon-green);
  border-radius: 14px;
  padding: 16px 14px;
  text-align: center;
  box-shadow: 0 12px 32px rgba(3, 8, 18, 0.5), 0 0 0 1px rgba(46, 184, 114, 0.15);
  animation: directCardGlow 2.5s infinite alternate;
}

@keyframes directCardGlow {
  0% { border-color: rgba(46, 184, 114, 0.5); }
  100% { border-color: rgba(46, 184, 114, 1); }
}

.direct-badge-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(46, 184, 114, 0.15);
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid rgba(46, 184, 114, 0.4);
  margin-bottom: 10px;
}

.direct-badge-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--neon-green);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.live-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  display: inline-block;
  animation: pulse 1.2s infinite;
}

.direct-card-subtitle {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0;
}

.direct-station-glow {
  font-family: var(--font-digital);
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin: 10px 0 6px;
  letter-spacing: 1px;
}

.direct-card-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--neon-cyan);
  margin-bottom: 14px;
}

.btn-direct-join-pulse {
  width: 100%;
  background: var(--neon-green);
  color: #07131c;
  font-weight: 800;
  font-size: 13px;
  padding: 12px;
  min-height: 48px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  box-shadow: 0 4px 16px rgba(46, 184, 114, 0.3);
  transition: var(--transition-smooth);
}

.btn-direct-join-pulse:hover {
  filter: brightness(1.08);
}

.btn-direct-join-pulse:active {
  transform: scale(0.98);
}

.plan-mode-alert-card {
  background: rgba(217, 142, 43, 0.08);
  border: 1px solid var(--border-amber);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}

.live-active-card {
  background: rgba(46, 184, 114, 0.08);
  border: 1px solid rgba(46, 184, 114, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
}

/* ==========================================================================
   STATION SYNC BAR & REFRESH ACTIONS (v2.5.7)
   ========================================================================== */
.station-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(7, 19, 28, 0.5);
  border: 1px solid var(--border-muted);
  border-radius: 10px;
  padding: 8px 12px;
  margin: 10px 0 14px 0;
  gap: 8px;
}

.sync-info-group {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.sync-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon-green);
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.sync-text-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}

.sync-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text-muted);
}

.sync-time-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-cyan);
  font-family: var(--font-digital);
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-refresh-station {
  background: rgba(76, 166, 216, 0.12);
  border: 1px solid rgba(76, 166, 216, 0.4);
  color: var(--neon-cyan);
  border-radius: 8px;
  padding: 6px 12px;
  min-height: 36px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-refresh-station:hover {
  background: rgba(76, 166, 216, 0.22);
}

.btn-refresh-station:active {
  transform: scale(0.96);
}

@keyframes spinFast {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.spinning {
  display: inline-block !important;
  animation: spinFast 0.65s linear infinite !important;
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
