/* ============================================================
   DWELLSCAPES ENTERPRISE WELLNESS SUITE - COMPONENTS
   ============================================================ */

/* TOP APP BAR */
.header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 20;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  object-fit: cover;
  box-shadow: 0 0 16px var(--accent-glow-subtle);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.brand-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
}
.brand-sub {
  font-size: 10.5px;
  color: var(--text-sub);
  letter-spacing: 0.8px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.glass-btn {
  background: var(--card-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 8px 15px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s ease;
  touch-action: manipulation;
  text-decoration: none;
}
.glass-btn:hover {
  border-color: var(--accent-glow);
  box-shadow: 0 0 14px var(--accent-glow-subtle);
  transform: translateY(-1px);
}
.glass-btn.active {
  background: var(--accent-glow-subtle);
  border-color: var(--accent-glow);
  color: #fff;
  box-shadow: 0 0 16px var(--accent-glow-subtle);
}

/* ============================================================
   CENTER TIMER & SOMATIC HORIZON
   ============================================================ */
.center-timer-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto 0;
  text-align: center;
  pointer-events: auto;
  gap: 14px;
}

.timer-ring-wrap {
  position: relative;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  overflow: visible;
}
.timer-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  overflow: visible;
}
.timer-circle-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 4;
}
.timer-circle-progress {
  fill: none;
  stroke: var(--accent-glow);
  stroke-width: 4.5;
  stroke-linecap: round;
  stroke-dasharray: 628;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.5s ease, stroke 0.8s ease;
  animation: coherentBreathingPulse 8.5s infinite ease-in-out;
}

@keyframes coherentBreathingPulse {
  0%, 100% {
    filter: drop-shadow(0 0 7px var(--accent-glow));
    opacity: 0.65;
  }
  50% {
    filter: drop-shadow(0 0 18px var(--accent-glow)) drop-shadow(0 0 32px var(--accent-glow-subtle));
    opacity: 1;
  }
}
.timer-circle-hold {
  fill: none;
  stroke: #f43f5e;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 628;
  stroke-dashoffset: 628;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.timer-circle-hold.holding {
  opacity: 1;
}

.timer-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 5;
}
.timer-digits {
  font-size: 46px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -1px;
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.7);
}
.timer-status-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--accent-glow);
  margin-top: 4px;
}
.timer-hint {
  font-size: 10px;
  color: var(--text-sub);
  margin-top: 5px;
  opacity: 0.85;
  line-height: 1.35;
}

/* SOMATIC ERGONOMIC PROMPTS */
.somatic-banner {
  background: rgba(14, 23, 42, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  padding: 8px 16px;
  font-size: 11.5px;
  color: #bae6fd;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  max-width: 480px;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.4s ease;
  pointer-events: none;
}
.somatic-banner.show {
  opacity: 1;
  transform: translateY(0);
}

/* INTERVAL PRESETS STRIP */
.preset-strip {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.preset-pill {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-sub);
  font-size: 10.5px;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}
.preset-pill:hover {
  color: #fff;
}
.preset-pill.active {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* ============================================================
   BOTTOM UNIFIED CONTROL DECK
   ============================================================ */
.dock-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 920px;
  margin: 0 auto;
  position: relative;
  z-index: 25;
}

.unified-console-panel {
  width: 100%;
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.75);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  overflow-y: auto;
  max-height: 60vh;
  -webkit-overflow-scrolling: touch;
}
.unified-console-panel.minimized {
  display: none !important;
}

.panel-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.panel-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.panel-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
}
.panel-subtitle {
  font-size: 10.5px;
  color: var(--text-sub);
}

.panel-section-label {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

/* THEMES */
.theme-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.theme-pill-btn {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  transition: all 0.2s ease;
}
.theme-pill-btn:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}
.theme-pill-btn.active {
  border-color: var(--accent-glow);
  background: var(--accent-glow-subtle);
  box-shadow: 0 0 14px var(--accent-glow-subtle);
}
.theme-pill-name {
  font-size: 11px;
  font-weight: 700;
  color: #fff;
}
.theme-pill-tag {
  font-size: 8.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
}
.tag-free { background: rgba(52, 211, 153, 0.16); color: #34d399; }
.tag-lock { background: rgba(245, 158, 11, 0.16); color: #f59e0b; }

/* SOUND CARDS & VOLUME SLIDERS */
.sound-buttons-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}
.sound-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}
.sound-card.active {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--accent-glow);
  box-shadow: 0 0 16px var(--accent-glow-subtle);
}
.sound-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.sound-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.sound-icon { font-size: 16px; }
.sound-title { font-size: 11.5px; font-weight: 700; color: #fff; }
.sound-subtitle { font-size: 9.5px; color: var(--text-sub); }

.vol-slider-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
  transition: background 0.2s ease;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-glow);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
}
.vol-slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-glow);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
  border: none;
}

/* BINAURAL SECTION */
.binaural-box {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.binaural-ctrl-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.switch-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-sub);
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.25s ease;
}
.switch-toggle-btn.active {
  background: rgba(0, 229, 255, 0.16);
  border-color: #00E5FF;
  color: #00E5FF;
  box-shadow: 0 0 16px rgba(0, 229, 255, 0.25);
}

.freq-subselector { display: flex; gap: 6px; flex-wrap: wrap; }
.freq-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.freq-pill:hover { border-color: rgba(255, 255, 255, 0.2); color: #fff; }
.freq-pill.active {
  background: var(--accent-glow-subtle);
  border-color: var(--accent-glow);
  color: #fff;
  box-shadow: 0 0 10px var(--accent-glow-subtle);
}

/* PAYWALL RIBBON */
.paywall-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, rgba(245, 158, 11, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  padding: 10px 14px;
  gap: 10px;
  flex-wrap: wrap;
}
.paywall-ribbon-text { font-size: 11px; color: #fde68a; line-height: 1.4; flex: 1; min-width: 200px; }
.paywall-ribbon-text strong { color: #fff; }
.paywall-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stripe-btn {
  background: #f59e0b;
  border: none;
  color: #0b0e17;
  font-size: 11px;
  font-weight: 900;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  transition: transform 0.2s ease;
}
.stripe-btn:hover { transform: scale(1.03); }
.member-restore-btn {
  background: none;
  border: none;
  color: #00E5FF;
  font-size: 11px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

/* FOOTER DOCK */
.dock-persistent-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 8px 14px;
  gap: 10px;
}
.dock-meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-sub);
}
.dock-hotkey-legend {
  font-size: 10px;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.dock-hotkey-legend kbd {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 1px 4px;
  font-family: ui-monospace, monospace;
  font-size: 9px;
  color: #e2e8f0;
}

.dock-meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
}
.dock-meta-right a {
  color: var(--accent-glow);
  text-decoration: none;
  font-weight: 700;
}
.dock-meta-right a:hover { text-decoration: underline; }

/* MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.modal-card {
  background: #0d131f;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.85);
  color: #fff;
}
.modal-card h3 {
  font-size: 17px;
  margin-bottom: 6px;
}
.modal-card p {
  font-size: 12.5px;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 14px;
}
.email-input {
  width: 100%;
  padding: 11px 14px;
  background: #070a12;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  margin-bottom: 14px;
  outline: none;
}
.email-input:focus {
  border-color: #00E5FF;
}

/* PWA INSTALL PILL & TOOLTIP */
.install-pill {
  position: fixed;
  bottom: 68px;
  right: 18px;
  background: rgba(14, 23, 38, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
  display: none;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  z-index: 90;
  backdrop-filter: blur(12px);
}
.install-tooltip {
  position: fixed;
  bottom: 110px;
  right: 18px;
  background: #0f172a;
  border: 1px solid #38bdf8;
  color: #e2e8f0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 11.5px;
  max-width: 260px;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0,0,0,0.7);
  z-index: 91;
  display: none;
}
.install-tooltip.show { display: block; }

#toast-msg {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-30px);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--accent-glow);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10000;
}
#toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

#start-gate {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 50%, #111827 0%, #06090e 100%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  cursor: pointer;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
#start-gate.dismissed {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

@media (max-width: 768px) {
  .theme-strip-grid { grid-template-columns: repeat(2, 1fr); }
  .sound-buttons-grid { grid-template-columns: repeat(2, 1fr); }
  .binaural-ctrl-row { flex-direction: column; align-items: stretch; }
  .freq-subselector { justify-content: flex-start; }
  .unified-console-panel { max-height: 54vh; padding: 14px; }
  .timer-ring-wrap { width: 190px; height: 190px; }
  .timer-digits { font-size: 40px; }
  .dock-hotkey-legend { display: none; }
}