:root {
  /* Default Theme Variables (Dark) */
  --bg-primary: #0c0a17;
  --bg-gradient-1: rgba(168, 85, 247, 0.15);
  --bg-gradient-2: rgba(255, 94, 126, 0.15);
  --bg-surface: rgba(26, 21, 46, 0.75);
  --bg-surface-hover: rgba(38, 30, 68, 0.88);
  --bg-card: rgba(30, 24, 54, 0.65);
  --bg-input: rgba(0, 0, 0, 0.35);
  --bg-chip: rgba(255, 255, 255, 0.05);
  --bg-modal: #161226;
  
  --border-subtle: rgba(168, 85, 247, 0.18);
  --border-active: rgba(255, 94, 126, 0.45);
  
  --primary: #ff5e7e;
  --primary-glow: rgba(255, 94, 126, 0.45);
  --accent: #a855f7;
  --accent-glow: rgba(168, 85, 247, 0.35);
  --cyan: #38bdf8;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --battery-good: #34d399;
  --battery-mid: #fbbf24;
  --battery-low: #f87171;

  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --modal-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-full: 9999px;

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

/* Light Theme Variables */
[data-theme="light"] {
  --bg-primary: #f7f4fb;
  --bg-gradient-1: rgba(168, 85, 247, 0.12);
  --bg-gradient-2: rgba(255, 94, 126, 0.12);
  --bg-surface: rgba(255, 255, 255, 0.88);
  --bg-surface-hover: rgba(255, 255, 255, 0.98);
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-input: rgba(240, 235, 248, 0.8);
  --bg-chip: rgba(168, 85, 247, 0.08);
  --bg-modal: #ffffff;
  
  --border-subtle: rgba(168, 85, 247, 0.22);
  --border-active: rgba(255, 94, 126, 0.6);
  
  --text-main: #1f1433;
  --text-muted: #5e5070;
  --text-dim: #8b7d9e;
  
  --card-shadow: 0 8px 24px rgba(120, 60, 180, 0.08);
  --modal-shadow: 0 16px 40px rgba(80, 30, 120, 0.18);
}

/* System preference when set to system */
@media (prefers-color-scheme: light) {
  [data-theme="system"] {
    --bg-primary: #f7f4fb;
    --bg-gradient-1: rgba(168, 85, 247, 0.12);
    --bg-gradient-2: rgba(255, 94, 126, 0.12);
    --bg-surface: rgba(255, 255, 255, 0.88);
    --bg-surface-hover: rgba(255, 255, 255, 0.98);
    --bg-card: rgba(255, 255, 255, 0.8);
    --bg-input: rgba(240, 235, 248, 0.8);
    --bg-chip: rgba(168, 85, 247, 0.08);
    --bg-modal: #ffffff;
    
    --border-subtle: rgba(168, 85, 247, 0.22);
    --border-active: rgba(255, 94, 126, 0.6);
    
    --text-main: #1f1433;
    --text-muted: #5e5070;
    --text-dim: #8b7d9e;
    
    --card-shadow: 0 8px 24px rgba(120, 60, 180, 0.08);
    --modal-shadow: 0 16px 40px rgba(80, 30, 120, 0.18);
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, sans-serif;
  background: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, var(--bg-gradient-1) 0px, transparent 55%),
    radial-gradient(at 100% 100%, var(--bg-gradient-2) 0px, transparent 55%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  padding: calc(var(--safe-top) + 12px) 16px calc(var(--safe-bottom) + 24px) 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* App Container */
.app-container {
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  width: 28px;
  height: 28px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.connection-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--text-dim);
  background: var(--bg-chip);
  padding: 4px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.conn-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--battery-good);
  box-shadow: 0 0 6px var(--battery-good);
}

.conn-dot.offline {
  background: var(--battery-low);
  box-shadow: 0 0 6px var(--battery-low);
}

.icon-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.icon-btn:hover, .icon-btn:active {
  background: var(--bg-surface-hover);
  color: var(--text-main);
  border-color: var(--border-active);
  transform: scale(1.05);
}

/* Notification status dot on bell */
.notif-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px var(--primary);
}

.notif-dot.granted {
  background: var(--battery-good);
  box-shadow: 0 0 6px var(--battery-good);
}

/* Ambient Partner Dashboard Card */
.partner-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.partner-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  opacity: 0.12;
  pointer-events: none;
  animation: subtleSpin 20s linear infinite;
}

@keyframes subtleSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.partner-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.partner-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar-halo {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 0 16px var(--primary-glow);
}

.online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--battery-good);
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 8px var(--battery-good);
}

.partner-info h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.partner-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.partner-clock {
  background: var(--bg-input);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  text-align: right;
}

.clock-time {
  font-size: 0.95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
}

.clock-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.partner-status-box {
  background: var(--bg-input);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.status-quote {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
  word-break: break-word;
}

.partner-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.battery-display {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-chip);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.battery-icon-wrap {
  position: relative;
  width: 22px;
  height: 12px;
  border: 1.5px solid var(--text-muted);
  border-radius: 3px;
  padding: 1px;
  display: flex;
  align-items: center;
}

.battery-icon-wrap::after {
  content: '';
  position: absolute;
  right: -3.5px;
  top: 2.5px;
  width: 2px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 0 1px 1px 0;
}

.battery-fill {
  height: 100%;
  border-radius: 1px;
  transition: width 0.4s ease, background 0.4s ease;
}

.battery-good { background: var(--battery-good); }
.battery-mid { background: var(--battery-mid); }
.battery-low { background: var(--battery-low); }

/* Unpaired Dashboard View */
.unpaired-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  padding: 6px 0;
}

.unpaired-badge-row {
  background: var(--bg-input);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.code-display {
  font-family: 'SF Mono', Consolas, Monaco, monospace;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--primary);
  background: rgba(255, 94, 126, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 94, 126, 0.3);
}

.pair-action-btns {
  display: flex;
  gap: 8px;
  width: 100%;
  justify-content: center;
}

.btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-active);
}

.connect-partner-form {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.connect-partner-form input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  font-size: 0.85rem;
  color: var(--text-main);
  text-transform: uppercase;
  outline: none;
  font-family: monospace;
}

.connect-partner-form input:focus {
  border-color: var(--primary);
}

/* Central Haptic Pulse Trigger */
.pulse-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px 0 10px 0;
  position: relative;
}

.pulse-button-wrapper {
  position: relative;
  width: 170px;
  height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pulse-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--primary-glow);
  pointer-events: none;
  animation: pulseWave 3s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.ring-1 {
  width: 170px;
  height: 170px;
  animation-delay: 0s;
}

.ring-2 {
  width: 195px;
  height: 195px;
  animation-delay: 0.9s;
  border-color: var(--accent-glow);
}

.ring-3 {
  width: 220px;
  height: 220px;
  animation-delay: 1.8s;
  border-color: rgba(56, 189, 248, 0.25);
}

@keyframes pulseWave {
  0% {
    transform: scale(0.7);
    opacity: 0.8;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    transform: scale(1.15);
    opacity: 0;
  }
}

.pulse-trigger-btn {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ff7597 0%, #d946ef 50%, #7c3aed 100%);
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  box-shadow: 
    0 10px 30px rgba(217, 70, 239, 0.45),
    inset 0 2px 4px rgba(255, 255, 255, 0.4),
    inset 0 -4px 8px rgba(0, 0, 0, 0.3);
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.pulse-trigger-btn:hover {
  transform: scale(1.04);
  box-shadow: 
    0 12px 36px rgba(217, 70, 239, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.5);
}

.pulse-trigger-btn:active, .pulse-trigger-btn.pressed {
  transform: scale(0.92);
  box-shadow: 
    0 4px 15px rgba(217, 70, 239, 0.5),
    inset 0 4px 10px rgba(0, 0, 0, 0.5);
}

.pulse-heart-icon {
  width: 42px;
  height: 42px;
  fill: #ffffff;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
  transition: transform 0.2s ease;
}

.pulse-trigger-btn:hover .pulse-heart-icon {
  transform: scale(1.1);
}

.pulse-btn-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.pulse-status-hint {
  margin-top: 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
  min-height: 20px;
  transition: all 0.3s ease;
}

/* User's Own Presence Quick Controls */
.self-presence-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--card-shadow);
}

.presence-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.user-tag {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.quick-status-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.quick-status-chips::-webkit-scrollbar {
  display: none;
}

.status-chip {
  background: var(--bg-chip);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.status-chip:hover {
  background: var(--bg-surface-hover);
  color: var(--text-main);
}

.status-chip.active {
  background: rgba(168, 85, 247, 0.2);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.status-input-row {
  display: flex;
  gap: 8px;
}

.status-input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-main);
  outline: none;
  user-select: text;
  transition: border-color 0.2s ease;
}

.status-input:focus {
  border-color: var(--accent);
}

.btn-sm {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-sm:hover {
  opacity: 0.9;
}

.battery-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.battery-slider-row input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

/* Micro-Stream Feed */
.microstream-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}

.section-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
}

.vibe-input-card {
  display: flex;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 8px;
  box-shadow: var(--card-shadow);
}

.vibe-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 0.88rem;
  padding: 6px 8px;
  outline: none;
  user-select: text;
}

.vibe-input::placeholder {
  color: var(--text-dim);
}

.vibe-send-btn {
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.vibe-send-btn:hover {
  background: #ff476e;
  transform: scale(1.05);
}

.vibes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 280px;
  overflow-y: auto;
  padding-right: 2px;
}

.vibe-bubble {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  animation: slideDown 0.25s ease-out;
}

.vibe-bubble.mine {
  background: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.3);
}

.vibe-content {
  font-size: 0.88rem;
  color: var(--text-main);
  line-height: 1.35;
  word-break: break-word;
}

.vibe-author {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 2px;
}

.vibe-bubble.mine .vibe-author {
  color: var(--primary);
}

.vibe-meta {
  font-size: 0.68rem;
  color: var(--text-dim);
  white-space: nowrap;
  margin-top: 2px;
}

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

.empty-vibes {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 20px 0;
}

/* Flash and Haptic UI Notification */
.incoming-flash-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(255, 94, 126, 0.5) 0%, rgba(168, 85, 247, 0.3) 50%, transparent 80%);
  pointer-events: none;
  opacity: 0;
  z-index: 100;
  transition: opacity 0.3s ease;
}

.incoming-flash-overlay.active {
  animation: pulseFlash 1.6s ease-out;
}

@keyframes pulseFlash {
  0% { opacity: 0; transform: scale(0.9); }
  20% { opacity: 1; transform: scale(1.02); }
  50% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.05); }
}

/* Modal Dialogs */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-modal);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  width: 100%;
  max-width: 390px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--modal-shadow);
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-backdrop.open .modal-card {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Theme Selector segmented control */
.theme-switch-row, .setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.theme-options {
  display: flex;
  gap: 4px;
  background: var(--bg-chip);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.theme-btn {
  background: transparent;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-btn.active {
  background: var(--accent);
  color: #ffffff;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.auth-tab-btn {
  flex: 1;
  padding: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tab-btn.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.auth-input {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.92rem;
  color: var(--text-main);
  outline: none;
}

.auth-input:focus {
  border-color: var(--primary);
}

.btn-full {
  width: 100%;
  padding: 11px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--primary-glow);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn-full:active {
  transform: scale(0.98);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.4);
  color: #f87171;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.25);
}

/* User Switcher list in modal */
.user-switch-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.user-switch-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-switch-btn:hover, .user-switch-btn.selected {
  border-color: var(--accent);
  background: rgba(168, 85, 247, 0.15);
}

.user-switch-btn .badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-chip);
}

.user-switch-btn.selected .badge {
  background: var(--accent);
  color: #fff;
}

/* iOS Add to Home Screen Prompt Modal */
.ios-modal-card {
  position: relative;
  text-align: center;
}

.ios-step-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  margin: 8px 0;
}

.ios-step {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-input);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.ios-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ios-step-text {
  font-size: 0.84rem;
  color: var(--text-main);
  line-height: 1.3;
}

.ios-icon-highlight {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  padding: 2px 5px;
  background: rgba(168, 85, 247, 0.2);
  border-radius: 4px;
  color: var(--accent);
  font-weight: 600;
}

.ios-pointer-arrow {
  margin-top: 6px;
  font-size: 1.5rem;
  animation: bounceDown 1.5s infinite ease-in-out;
  color: var(--primary);
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* Notification banner */
.toast-notice {
  position: fixed;
  top: calc(var(--safe-top) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(-60px);
  background: var(--bg-modal);
  border: 1px solid var(--accent);
  color: var(--text-main);
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--modal-shadow);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-notice.visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
