/* ==========================================================================
   Solarhringr CSS - ADHD-Optimized Sunsama Planner
   Clean Centered Layout, Focus Rail, Matte Surfaces, Sage/Slate Accents, Anchors
   ========================================================================== */

:root {
  /* Color Palette - Sunsama Vibe Default (Charcoal) */
  --bg-dark: #121214;          /* Soothing matte black */
  --bg-surface: #1c1c1f;       /* Muted slate panels */
  --bg-card: #252529;          /* Slightly lighter card surface */
  --border-mute: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(141, 169, 196, 0.3);
  
  --text-main: #e2e2e6;        /* Crisp silver-white */
  --text-sub: #a1a1aa;         /* Cool gray */
  --text-muted: #52525b;       /* Dark gray for hints */
  
  /* ADHD Calming Accents (Low-saturation pastels) */
  --color-sage: #9ebb7a;       /* Soft sage green */
  --color-slate-blue: #8da9c4; /* Soft slate blue */
  --color-teal: #6b9080;       /* Muted calm teal */
  --color-indigo-mute: #8a94bc;/* Soft muted indigo */
  --color-danger-soft: #c27a7a;/* Soft desaturated red for destructive actions */
  --color-warning-soft: #c29a7a;/* Soft desaturated copper/amber for conflicts */
  --color-gold: #e9c46a;       /* Calming pastel gold */
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, var(--color-slate-blue) 0%, var(--color-teal) 100%);
  --grad-teal: linear-gradient(135deg, var(--color-teal) 0%, var(--color-sage) 100%);
  --grad-surface: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-dark) 100%);

  /* Typography & Layout spacing */
  --font-title: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  
  /* Transitions */
  --trans-smooth: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
  --trans-spring: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.15);
}

[data-theme="charcoal"] {
  --bg-dark: #121214;
  --bg-surface: #1c1c1f;
  --bg-card: #252529;
  --border-mute: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(141, 169, 196, 0.3);
  --text-main: #e2e2e6;
  --text-sub: #a1a1aa;
  --text-muted: #52525b;
  --color-sage: #9ebb7a;
  --color-slate-blue: #8da9c4;
  --color-teal: #6b9080;
  --color-indigo-mute: #8a94bc;
  --color-danger-soft: #c27a7a;
  --color-warning-soft: #c29a7a;
  --color-gold: #e9c46a;
}

[data-theme="sapphire"] {
  --bg-dark: #0b1120;
  --bg-surface: #14213d;
  --bg-card: #1f325c;
  --border-mute: rgba(255, 255, 255, 0.05);
  --border-focus: rgba(100, 180, 240, 0.4);
  --text-main: #f1f5f9;
  --text-sub: #94a3b8;
  --text-muted: #475569;
  --color-sage: #8ab8e6;
  --color-slate-blue: #60a5fa;
  --color-teal: #3b82f6;
  --color-indigo-mute: #818cf8;
  --color-danger-soft: #f87171;
  --color-warning-soft: #fb923c;
  --color-gold: #f4d35e;
}

[data-theme="moss"] {
  --bg-dark: #0f1c13;
  --bg-surface: #172a1e;
  --bg-card: #23402d;
  --border-mute: rgba(255, 255, 255, 0.04);
  --border-focus: rgba(167, 243, 208, 0.4);
  --text-main: #f0fdf4;
  --text-sub: #86efac;
  --text-muted: #4b6b55;
  --color-sage: #a7f3d0;
  --color-slate-blue: #55a670;
  --color-teal: #2d6a4f;
  --color-indigo-mute: #74c69d;
  --color-danger-soft: #ff8b8b;
  --color-warning-soft: #ffd166;
  --color-gold: #ffd166;
}

/* Reset & Base Setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

*, *:before, *:after {
  box-sizing: border-box !important;
}

html, body {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

body, header, section, div, button, input, select, textarea, span, h1, h2, h3 {
  transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.05) 0, transparent 55%),
    radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.03) 0, transparent 55%);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 2rem 1.5rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
}

/* Background Particle Canvas */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  pointer-events: none;
}

/* Layout Wrapper - Center column layout */
.app-wrapper {
  width: 100%;
  max-width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  min-height: calc(100vh - 4rem);
}

/* Main Header */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-mute);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo Image Icon Integration */
.logo-icon-svg {
  height: 30px;
  width: 30px;
  filter: brightness(0.95) sepia(0.2) hue-rotate(100deg); /* Adjust mint tint to fit slate scheme */
  opacity: 0.95;
}

.logo {
  font-family: var(--font-title);
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-main);
}

.date-label {
  font-size: 0.9rem;
  color: var(--text-sub);
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-left: 0.5rem;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

/* Day Arc in Header */
.header-day-arc {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-mute);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-lg);
}

.arc-svg-header {
  width: 36px;
  height: 18px;
}

.arc-bg-header {
  stroke: rgba(255, 255, 255, 0.03);
  stroke-width: 8;
  stroke-linecap: round;
}

.arc-fill-header {
  stroke-width: 9;
  stroke-linecap: round;
  stroke-dasharray: 126;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s ease;
}

.arc-percent-label {
  font-family: var(--font-title);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-sub);
  font-weight: 600;
}

/* Three-Column Workspace Layout */
.workspace-grid {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .workspace-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* COLUMN 1: Left Pane (Inbox / Backlog) */
.left-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-mute);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 4px 25px rgba(0,0,0,0.25);
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.inbox-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
}

.inbox-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.15rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.inbox-title-bar h2 {
  font-family: var(--font-title);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: -0.01em;
}

.badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-mute);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  color: var(--text-sub);
}

.task-list-flow {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.15rem;
  transition: var(--trans-smooth);
}

.task-list-flow.backlog-hover {
  background: rgba(141, 169, 196, 0.04) !important;
  border: 1px dashed var(--color-slate-blue) !important;
  border-radius: var(--radius-sm);
  padding: 0.5rem;
}

/* Calendar Sync Button layout placement */
.calendar-sync-action-wrapper {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

/* Custom scrollbar */
.task-list-flow::-webkit-scrollbar,
.timeline-hours-scroll::-webkit-scrollbar {
  width: 4px;
}

.task-list-flow::-webkit-scrollbar-thumb,
.timeline-hours-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 99px;
}

.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mute);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: var(--trans-smooth);
  cursor: pointer;
}
.task-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-1px);
}

.task-card:active {
  cursor: grabbing;
}

.task-card.dragging {
  opacity: 0.3;
  border: 1px dashed var(--color-slate-blue);
  transform: scale(0.97);
}

.task-card.rolled-over {
  background: rgba(141, 169, 196, 0.02);
  border-left: 3.5px solid rgba(141, 169, 196, 0.25);
  border-color: rgba(141, 169, 196, 0.12);
}

.task-card.rolled-over .task-text {
  color: var(--text-sub);
}

.badge-pill.slate-rolled {
  background: rgba(141, 169, 196, 0.08);
  color: var(--color-slate-blue);
  border: 1px solid rgba(141, 169, 196, 0.15);
  font-size: 0.65rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border-radius: 4px;
  padding: 0.12rem 0.4rem;
  text-transform: uppercase;
}

.task-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.task-text {
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-main);
}

/* Badges row */
.card-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.badge-pill {
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-pill.indigo {
  background: rgba(141, 169, 196, 0.07);
  color: var(--color-slate-blue);
}

.badge-pill.slate {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-sub);
}

.duration-badge-minimal {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

/* Target Due Badge on Task Card */
.badge-due {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  background: rgba(141, 169, 196, 0.1);
  color: var(--color-slate-blue);
  border: 1px solid rgba(141, 169, 196, 0.15);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Buffer Deficit Warning State for Target Due Badge */
.badge-due.warn {
  background: rgba(194, 154, 122, 0.08);
  color: var(--color-warning-soft);
  border-color: rgba(194, 154, 122, 0.22);
  filter: drop-shadow(0 0 2px rgba(194, 154, 122, 0.25));
  animation: soft-pulse 2s infinite ease-in-out;
}

@keyframes soft-pulse {
  0%, 100% { opacity: 0.9; }
  50% { opacity: 1; filter: drop-shadow(0 0 4px rgba(194, 154, 122, 0.4)); }
}

/* Sizing controller in step 2 */
.sizing-bubble-bar {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.4rem;
}

.bubble-btn {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-mute);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--trans-smooth);
}

.bubble-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.bubble-btn.active {
  background: var(--color-slate-blue);
  border-color: var(--color-slate-blue);
  color: var(--bg-dark);
}

/* Card Control triggers */
.task-card-actions {
  display: flex;
  gap: 0.2rem;
  opacity: 0;
  transition: var(--trans-smooth);
}

.task-card:hover .task-card-actions {
  opacity: 1;
}

.btn-card-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.btn-card-action:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.btn-card-action.btn-del:hover {
  color: var(--color-danger-soft);
  background: rgba(194, 122, 122, 0.1);
}

/* Clean Custom Checkbox */
.cb-wrapper {
  position: relative;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.cb-wrapper input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.cb-custom {
  position: absolute;
  top: 0;
  left: 0;
  height: 18px;
  width: 18px;
  background: rgba(255, 255, 255, 0.01);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: var(--trans-spring);
}

.cb-wrapper:hover .cb-custom {
  border-color: var(--color-teal);
  background: rgba(107, 144, 128, 0.05);
  transform: scale(1.08);
}

.cb-wrapper input:checked ~ .cb-custom {
  background: var(--color-teal);
  border-color: var(--color-teal);
  transform: scale(0.9);
}

.cb-custom::after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2.5px;
  width: 4px;
  height: 8px;
  border: solid var(--bg-dark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cb-wrapper input:checked ~ .cb-custom::after {
  display: block;
}

/* Empty sun state */
.empty-state-small {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  border: 1px dashed rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-muted);
  gap: 0.75rem;
}

.empty-sun-icon {
  color: var(--text-muted);
  opacity: 0.4;
  animation: spin-slow 24s linear infinite;
}

@keyframes spin-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.empty-state-small p {
  font-size: 0.8rem;
  color: var(--text-muted);
}


/* COLUMN 2: Center Pane (The Focus Pipeline Rail Timeline) */
.center-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-mute);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: 0 4px 25px rgba(0,0,0,0.25);
  min-height: 500px;
}

.timeline-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.02);
}

.timeline-header h2 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: -0.01em;
}

/* Focus Rail Scroll Area */
.timeline-hours-scroll {
  display: flex;
  flex-direction: column;
  max-height: 600px;
  overflow-y: auto;
  position: relative;
  padding-left: 2rem; /* Buffer to accommodate visual rail line */
  gap: 0.5rem;
}

/* Visual Focus Rail Track Line */
.timeline-hours-scroll::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 9px;
  width: 2px;
  background: rgba(255, 255, 255, 0.03);
  z-index: 1;
}

/* Hour Node row with rail indicator dot */
.hour-row {
  display: grid;
  grid-template-columns: 85px 1fr;
  align-items: center;
  position: relative;
  min-height: 72px;
}

/* Rail Node Indicator Dot */
.hour-row::before {
  content: "";
  position: absolute;
  left: -27px; /* Position directly onto the track line */
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-dark);
  border: 2px solid var(--text-muted);
  z-index: 3;
  transition: var(--trans-smooth);
}

/* Light up node if it has a scheduled item inside */
.hour-row:has(.scheduled-card)::before,
.hour-row:has(.calendar-meeting-block)::before,
.hour-row:has(.calendar-anchor-card)::before {
  background: var(--color-sage);
  border-color: var(--color-sage);
  box-shadow: 0 0 6px rgba(158, 187, 122, 0.5);
}

.hour-label {
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-title);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Placeholder Slots */
.hour-dropzone {
  position: relative;
  padding: 0.5rem;
  min-height: 60px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  justify-content: center;
  transition: var(--trans-smooth);
}

.hour-dropzone:hover {
  background: rgba(255, 255, 255, 0.015);
  border-color: rgba(255, 255, 255, 0.05);
}

.hour-dropzone.hovered {
  background: rgba(141, 169, 196, 0.04);
  border-style: solid;
  border-color: var(--color-slate-blue);
  box-shadow: 0 0 12px rgba(141, 169, 196, 0.15);
}

.hour-dropzone.slot-hover {
  background: rgba(141, 169, 196, 0.06) !important;
  border: 1px dashed var(--color-slate-blue) !important;
  box-shadow: 0 0 12px rgba(141, 169, 196, 0.2) !important;
}

.hour-dropzone::before {
  content: "Empty Slot";
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  opacity: 0.25;
  pointer-events: none;
  transition: var(--trans-smooth);
}

.hour-dropzone:empty::before {
  opacity: 0.25;
}

.hour-dropzone.hovered::before {
  opacity: 0;
}

.hour-dropzone.slot-hover::before {
  opacity: 0 !important;
}

/* Scheduled task cards along the rail track */
.scheduled-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mute);
  border-left: 3px solid var(--color-slate-blue);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--trans-smooth);
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 5;
}

.scheduled-card:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.07);
}

/* Warn state when task overshoots deadline or clashes with anchors */
.scheduled-card.warn-clash {
  border-left-color: var(--color-warning-soft);
  background: rgba(194, 154, 122, 0.03);
  box-shadow: 0 2px 10px rgba(194, 154, 122, 0.1);
}

/* Dynamic height mappings matching timeline tracks */
.scheduled-card.duration-15 {
  border-left-color: var(--color-teal);
}
.scheduled-card.duration-30 {
  border-left-color: var(--color-slate-blue);
}
.scheduled-card.duration-60 {
  border-left-color: var(--color-sage);
}

/* Re-assert warn color border overrides for layout heights */
.scheduled-card.warn-clash.duration-15,
.scheduled-card.warn-clash.duration-30,
.scheduled-card.warn-clash.duration-60 {
  border-left-color: var(--color-warning-soft);
}

.scheduled-card-title {
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 75%;
}

.scheduled-card-actions {
  display: flex;
  gap: 0.25rem;
}

.btn-sched-action {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: var(--trans-smooth);
}

.btn-sched-action:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.btn-sched-action.btn-complete-sched:hover {
  color: var(--color-teal);
}

.btn-sched-action.btn-return-sched:hover {
  color: var(--color-slate-blue);
}

/* Mock meetings (block out inside timeline rail) */
.calendar-meeting-block {
  background: rgba(255, 255, 255, 0.005);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.95rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.15rem;
  min-height: 56px;
  opacity: 0.55;
  width: 100%;
}

.meeting-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
}

.meeting-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Locked Anchor Cards UI (Simulated Device Calendar Sync events) */
.calendar-anchor-card {
  background: rgba(141, 169, 196, 0.015);
  border: 1px solid rgba(141, 169, 196, 0.06);
  border-left: 3.5px solid var(--color-slate-blue);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  pointer-events: none; /* Immovable anchor protection */
  cursor: not-allowed;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
  position: relative;
}

.anchor-title-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.anchor-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-sub);
}

.anchor-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.anchor-lock-icon {
  color: var(--text-muted);
  opacity: 0.6;
}


/* COLUMN 3: Right Pane - Distraction Buffer (Wizard & Capture Distraction) */
.right-column {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Daily Onboarding steppers */
.ritual-wizard-card {
  background: var(--grad-surface);
  border: 1px solid var(--border-mute);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 4px 25px rgba(0,0,0,0.25);
  backdrop-filter: var(--blur-glass);
}

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

.wizard-tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--color-slate-blue);
}

.wizard-steps-indicator {
  display: flex;
  gap: 0.5rem;
}

.step-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  transition: var(--trans-smooth);
}

.step-dot.active {
  background: var(--color-slate-blue);
  transform: scale(1.25);
}

.wizard-body {
  min-height: 155px; /* Slight height increase to prevent shifts with dropdown */
}

.wizard-body h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.wizard-desc {
  font-size: 0.88rem;
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* Brain Dump Input Focal point */
.capture-box {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#task-input {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.15rem;
  font-size: 1.1rem;
  color: var(--text-main);
  font-family: var(--font-body);
  transition: var(--trans-smooth);
}

#task-input:focus {
  outline: none;
  border-color: var(--color-slate-blue);
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 0 15px rgba(141, 169, 196, 0.15);
}

.task-time-selector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-sub);
}

#task-due-time {
  background: var(--bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-radius: 6px;
  padding: 0.25rem 0.5rem;
  font-family: var(--font-body);
  outline: none;
}

#task-due-time:focus {
  border-color: var(--color-slate-blue);
}

.capture-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  padding-left: 0.25rem;
}

.nudge-box {
  background: rgba(245, 158, 11, 0.02);
  border: 1px solid rgba(245, 158, 11, 0.15);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
}

.nudge-text {
  font-size: 0.82rem;
  color: var(--color-amber);
  line-height: 1.4;
}

.wizard-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Distraction Card (Permanent Capture Distraction panel) */
.support-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-mute);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 4px 25px rgba(0,0,0,0.25);
}

.support-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.support-card h3 {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-sub);
}

.loophole-tag {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-sage);
  background: rgba(158, 187, 122, 0.06);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid rgba(158, 187, 122, 0.15);
}

.support-card-desc {
  font-size: 0.8rem;
  color: var(--text-sub);
  line-height: 1.45;
}

/* Capture Distraction Input Row */
.distraction-input-row {
  display: flex;
  gap: 0.5rem;
}

#distraction-input {
  flex-grow: 1;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--trans-smooth);
}

#distraction-input:focus {
  outline: none;
  border-color: var(--color-slate-blue);
  background: rgba(255, 255, 255, 0.02);
}

.distraction-log-container {
  max-height: 90px;
  overflow-y: auto;
}

.distraction-log-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.distraction-log-list li {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.005);
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.01);
  animation: slide-up-distr 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Ambient Audio row sliders inside right column */
.ambient-mixes {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.ambient-sound-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sound-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-sub);
}

.sound-slider-wrapper {
  width: 130px;
}

.sound-slider-wrapper input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.sound-slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-slate-blue);
  cursor: pointer;
  transition: var(--trans-smooth);
}

.sound-slider-wrapper input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}


/* Fullscreen Focus Overlay Screen (Deep ADHD state) */
.focus-overlay-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 18, 20, 0.98);
  backdrop-filter: blur(40px);
  z-index: 5000;
  display: flex;
  flex-direction: column;
  animation: fade-in-focus 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.focus-exit-btn {
  position: absolute;
  top: 2rem;
  left: 2rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-mute);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--trans-smooth);
}

.focus-exit-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.focus-overlay-content {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 4rem;
  max-width: 1000px;
  width: 100%;
  margin: 0 auto;
  padding: 6rem 2rem 2rem 2rem;
  align-items: center;
}

.focus-timer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2rem;
}

.focus-task-title {
  font-family: var(--font-title);
  font-size: 2.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 480px;
  line-height: 1.3;
}

.focus-timer-circle-container {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-ring-large {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring-bg-large {
  stroke: rgba(255, 255, 255, 0.01);
  stroke-width: 4;
}

.timer-ring-fill-large {
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 452.39; /* 2 * PI * 72 */
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s linear;
  filter: drop-shadow(0 0 10px rgba(141, 169, 196, 0.4));
}

.timer-digits-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-digits-large {
  font-family: var(--font-title);
  font-size: 3.85rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.timer-status-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-sub);
  font-weight: 600;
  margin-top: 0.2rem;
}

.focus-timer-buttons {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 320px;
}

.focus-timer-buttons button {
  flex: 1;
}

.focus-calm-box {
  background: rgba(255, 255, 255, 0.005);
  border-radius: var(--radius-md);
  padding: 2rem;
}

.calm-reminder {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-sage);
  margin-top: 1.25rem;
  border-left: 2px solid var(--color-sage);
  padding-left: 0.85rem;
}


/* Simulated Modal Popups styling */
.modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 5, 8, 0.85);
  backdrop-filter: blur(14px);
  z-index: 25000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: modal-fade 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-mute);
  border-radius: var(--radius-md);
  padding: 2.25rem 2rem;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  animation: modal-pop 0.4s cubic-bezier(0.25, 0.8, 0.25, 1.15) forwards;
}

@keyframes modal-pop {
  from { transform: scale(0.92) translateY(20px); }
  to { transform: scale(1) translateY(0); }
}

.modal-illustration {
  background: rgba(141, 169, 196, 0.05);
  padding: 1rem;
  border-radius: 50%;
  border: 1px solid rgba(141, 169, 196, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.modal-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-sub);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.65rem;
  margin-top: 0.5rem;
}


/* Slide Settings Drawer */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 350px;
  height: 100vh;
  background: var(--bg-surface);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

.drawer.open {
  transform: translateX(0);
}

/* Placeholder Box Styles */
.placeholder-box {
  background: var(--bg-card);
  border: 1px dashed var(--border-mute);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text-sub);
  font-size: 0.8rem;
  cursor: not-allowed;
  opacity: 0.7;
  transition: var(--trans-smooth);
}

.placeholder-box:hover {
  opacity: 0.9;
  border-color: var(--color-slate-blue);
}

.placeholder-icon {
  font-size: 1.1rem;
}

.drawer-header {
  padding: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.drawer-header h3 {
  font-family: var(--font-title);
  font-size: 1.1rem;
}

.drawer-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  overflow-y: auto;
  flex-grow: 1;
}

.drawer-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.drawer-section h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-sub);
}

.section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.setting-item.flex-between {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
}

#focus-duration-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  outline: none;
}

#focus-duration-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-slate-blue);
  cursor: pointer;
}

/* Switch UI toggle slider */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 18px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}

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

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

/* Drawer overlays */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.hidden {
  display: none !important;
}

/* Animations transitions */
.card-animate-enter {
  animation: card-in-anim 0.35s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

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

.card-animate-complete {
  animation: card-complete-anim 0.45s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

@keyframes card-complete-anim {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: translateY(-15px) scale(0.8); opacity: 0; }
}
}

/* --- Macro Views & Switcher Segmented Tabs --- */
.view-switch-tabs {
  display: flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 20px;
  padding: 0.18rem;
  gap: 0.1rem;
}

.view-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.view-tab:hover {
  color: var(--text-main);
}

.view-tab.active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* --- Voice Microphone Button & Pulsing --- */
.task-input-wrapper {
  position: relative;
  display: flex;
  width: 100%;
}

#task-input {
  width: 100%;
  padding-right: 2.75rem; /* Allow space for microphone button */
}

.voice-btn {
  position: absolute;
  right: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans-smooth);
  z-index: 10;
}

.voice-btn:hover {
  color: var(--color-slate-blue);
  background: rgba(255, 255, 255, 0.05);
}

.voice-btn.recording {
  color: var(--color-warning-soft);
  animation: pulse-recording 1.5s infinite;
}

@keyframes pulse-recording {
  0% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 0 0 rgba(194, 154, 122, 0.4);
  }
  70% {
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 0 0 8px rgba(194, 154, 122, 0);
  }
  100% {
    transform: translateY(-50%) scale(1);
    box-shadow: 0 0 0 0 rgba(194, 154, 122, 0);
  }
}

/* --- Week View Assemblies --- */
.view-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem 0;
  animation: card-in-anim 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.view-header {
  margin-bottom: 0.5rem;
}

.view-header h2 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.view-description {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
}

.week-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-mute);
  border-radius: var(--radius-md);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.week-day-card:hover {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  transform: translateY(-2px);
}

.week-day-card.today {
  border-color: var(--color-slate-blue);
  background: rgba(141, 169, 196, 0.03);
}

.week-day-header {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.week-day-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.week-day-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stacked-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 99px;
  display: flex;
  overflow: hidden;
}

.bar-segment {
  height: 100%;
}

.bar-segment.anchor-segment {
  background: rgba(255, 255, 255, 0.15);
}

.bar-segment.teal-segment {
  background: var(--color-teal);
}

.bar-segment.slate-blue-segment {
  background: var(--color-slate-blue);
}

.bar-segment.sage-segment {
  background: var(--color-sage);
}

.bar-segment.other-task-segment {
  background: var(--color-warning-soft);
}

.bar-empty {
  height: 100%;
  background: rgba(255, 255, 255, 0.02);
}

.week-day-load {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Month View Assemblies --- */
.month-grid-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-mute);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.month-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-auto-rows: minmax(110px, auto);
  gap: 0.5rem;
}

.month-day-cell {
  background: rgba(255, 255, 255, 0.005);
  border: 1px solid rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--trans-smooth);
}

.month-day-cell:hover {
  background: rgba(255, 255, 255, 0.015);
  border-color: rgba(255, 255, 255, 0.05);
}

.month-day-cell.today {
  border-color: var(--color-slate-blue);
  background: rgba(141, 169, 196, 0.02);
}

.month-day-cell.empty {
  visibility: hidden;
  cursor: default;
}

.month-day-num {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
}

.month-day-cell.today .month-day-num {
  color: var(--color-slate-blue);
}

.month-cell-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex-grow: 1;
}

.month-cell-anchor-pill {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-left: 2px solid var(--color-slate-blue);
}

.month-cell-task-summary {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: auto;
  font-weight: 500;
}

/* --- "Right Now" Active Task Panel --- */
.right-now-card {
  background: rgba(28, 28, 31, 0.95);
  border: 2px solid #ffb703; /* Amber accent */
  box-shadow: 0 0 20px rgba(255, 183, 3, 0.25), 0 0 10px rgba(141, 169, 196, 0.25), 0 4px 24px rgba(0, 0, 0, 0.4);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  animation: card-in-anim 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) forwards;
}

.rn-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rn-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-slate-blue);
  background: rgba(141, 169, 196, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  letter-spacing: 0.05em;
}

.rn-timer-digits {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: 0.02em;
}

.rn-task-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

.rn-progress-container {
  height: 4px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 2px;
  overflow: hidden;
  width: 100%;
}

.rn-progress-bar-fill {
  height: 100%;
  background: var(--color-slate-blue);
  width: 100%;
  transition: width 1s linear;
}

.rn-controls-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.rn-control-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- AI Sparkle Decompose Buttons --- */
.btn-decompose {
  color: var(--text-muted);
}

.btn-decompose:hover {
  color: var(--color-teal) !important;
  background: rgba(158, 187, 122, 0.08) !important;
}

.btn-decompose-sched {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: var(--trans-smooth);
}

.btn-decompose-sched:hover {
  color: var(--color-teal);
  background: rgba(255, 255, 255, 0.05);
}

/* Active Focus Timer Status Label */
.rn-status-label {
  font-family: var(--font-title);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-slate-blue);
  letter-spacing: 0.08em;
  margin-top: -0.25rem;
  margin-bottom: -0.25rem;
}

/* Theme Dropdown Selector Styles */
.theme-dropdown {
  background: var(--bg-card);
  border: 1px solid var(--border-mute);
  color: var(--text-main);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  margin-right: 0.75rem;
  transition: var(--trans-smooth);
}

.theme-dropdown:focus {
  border-color: var(--color-slate-blue);
}

/* Shared cross-account tasks visual styling */
.scheduled-card.shared-task {
  border: 1.5px dashed var(--color-warning-soft) !important;
  background: rgba(194, 154, 122, 0.05) !important;
  box-shadow: inset 0 0 10px rgba(194, 154, 122, 0.05);
}

.resource-tag-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-warning-soft);
  background: rgba(194, 154, 122, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 99px;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
}

/* Grounding Canvas Stuck Overlay */
.stuck-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(18, 18, 20, 0.95);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
  animation: fade-in-anim 0.4s ease forwards;
}

.stuck-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 450px;
  padding: 2rem;
  gap: 1.5rem;
}

.stuck-title {
  font-family: var(--font-title);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
}

.stuck-subtitle {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.5;
}

.breathing-area {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
}

/* Breathing Orb */
.breathing-orb {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--color-gold) 0%, var(--color-slate-blue) 100%);
  box-shadow: 0 0 30px rgba(141, 169, 196, 0.3), 0 0 60px rgba(233, 196, 106, 0.2);
  transition: transform 4s cubic-bezier(0.4, 0, 0.2, 1), background 1s ease;
  z-index: 1;
}

.breathing-text {
  position: relative;
  z-index: 2;
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  pointer-events: none;
}

.stuck-progress-text {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-slate-blue);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.breathing-orb.inhale {
  transform: scale(2.2);
  box-shadow: 0 0 45px rgba(233, 196, 106, 0.65), 0 0 90px rgba(141, 169, 196, 0.45);
}

.breathing-orb.hold {
  transform: scale(2.2);
  box-shadow: 0 0 55px rgba(233, 196, 106, 0.8), 0 0 110px rgba(141, 169, 196, 0.55);
}

.breathing-orb.exhale {
  transform: scale(1.0);
  box-shadow: 0 0 30px rgba(141, 169, 196, 0.3), 0 0 60px rgba(233, 196, 106, 0.2);
}

.breathing-orb.rest {
  transform: scale(1.0);
  box-shadow: 0 0 20px rgba(141, 169, 196, 0.2), 0 0 40px rgba(233, 196, 106, 0.1);
}

@keyframes fade-in-anim {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Landing Page & Instructions --- */
.landing-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  width: 100%;
  padding: 2rem;
  background: var(--bg-app);
  color: var(--text-main);
  box-sizing: border-box;
  z-index: 1000;
  position: relative;
}

.landing-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 4rem;
  max-width: 1100px;
  width: 100%;
  align-items: center;
}

@media (max-width: 768px) {
  .landing-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

.landing-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.landing-logo {
  width: 54px;
  height: 54px;
}

.landing-brand h2 {
  font-family: var(--font-title);
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
}

.landing-title {
  font-family: var(--font-title);
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--color-slate-blue) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-tagline {
  font-size: 1.1rem;
  color: var(--text-sub);
  line-height: 1.6;
  margin: 0;
}

.landing-features {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.feature-icon {
  font-size: 1.5rem;
  background: rgba(141, 169, 196, 0.1);
  color: var(--color-slate-blue);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.feature-item h4 {
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--text-main);
}

.feature-item p {
  font-size: 0.85rem;
  color: var(--text-sub);
  line-height: 1.5;
  margin: 0;
}

/* Auth Card */
.auth-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.auth-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0.75rem;
  color: var(--text-sub);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease;
}

.auth-tab.active {
  color: var(--text-main);
  border-bottom-color: var(--color-slate-blue);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-sub);
  letter-spacing: 0.05em;
}

.form-group input {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(0,0,0,0.2);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus {
  outline: none;
  border-color: var(--color-slate-blue);
}

.auth-error-msg {
  margin-top: 1rem;
  padding: 0.75rem;
  background: rgba(239, 71, 111, 0.1);
  border: 1px solid #ef476f;
  color: #ef476f;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  line-height: 1.4;
  text-align: left;
}

/* System Admin Token Generator styles */
.token-display-container {
  display: flex;
  gap: 0.35rem;
  margin-top: 0.5rem;
  align-items: center;
}

.token-input-field {
  flex-grow: 1;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-main);
  font-family: monospace;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-align: center;
}

/* Help & Feedback Section Styling */
.feedback-select {
  width: 100%;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.2s ease;
}

.feedback-select:focus {
  border-color: var(--color-slate-blue);
}

.feedback-textarea {
  width: 100%;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  font-family: var(--font-body);
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color 0.2s ease;
}

.feedback-textarea:focus {
  border-color: var(--color-slate-blue);
}

.feedback-success-msg {
  font-size: 0.8rem;
  color: var(--color-gold);
  line-height: 1.4;
  margin-top: 0.25rem;
}

.feedback-error-msg {
  font-size: 0.8rem;
  color: #ef476f;
  line-height: 1.4;
  margin-top: 0.25rem;
}

/* Beta Warning Notice Box Styling */
.beta-warning-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.03);
  margin-bottom: 1.25rem;
  box-sizing: border-box;
  width: 100%;
}

.beta-warning-icon {
  font-size: 1rem;
  line-height: 1.4;
  margin-top: 0.1rem;
}

.beta-warning-text {
  font-size: 0.8rem;
  color: var(--text-sub);
  line-height: 1.45;
  margin: 0;
  text-align: left;
}

.beta-warning-text strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Remember Me Checkbox Styling */
.form-remember-me {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
}

.remember-me-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-sub);
  user-select: none;
}

.remember-me-label input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--border-focus);
  border-radius: 4px;
  background: var(--bg-card);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: var(--trans-smooth);
}

.remember-me-label input[type="checkbox"]:hover {
  border-color: var(--color-slate-blue);
}

.remember-me-label input[type="checkbox"]:checked {
  background: var(--color-slate-blue);
  border-color: var(--color-slate-blue);
}

.remember-me-label input[type="checkbox"]:checked::before {
  content: "";
  width: 8px;
  height: 8px;
  background-color: var(--bg-dark);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(1);
}

.remember-me-label span {
  line-height: 1;
}

/* ==========================================================================
   Mobile Voice-Capture HUD (Solarhringr Satellite) Styles
   ========================================================================== */
/* If landing page is visible (not hidden), always hide the mobile satellite view */
#landing-page:not(.hidden) ~ #satellite-view {
  display: none !important;
}

#satellite-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  padding: 1.5rem;
  box-sizing: border-box;
  background: var(--bg-dark);
  color: var(--text-main);
}

#satellite-view .satellite-content {
  display: flex !important;
  opacity: 1 !important;
}

#satellite-view .record-btn {
  display: flex !important;
  opacity: 1 !important;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 4px solid var(--color-sage);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(158, 187, 122, 0.1);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

#satellite-view .voice-status {
  display: block !important;
  opacity: 1 !important;
}

#satellite-view .preview-container {
  display: flex !important;
  opacity: 1 !important;
}

#satellite-view .voice-preview {
  display: block !important;
  opacity: 1 !important;
}

@media (max-width: 768px) {
  body {
    padding: 0 !important;
    overflow-x: hidden;
  }

  /* Establish mobile-first root typography and micro-scaling prevention */
  html, body {
    font-size: 16px !important;
  }

  body, p, span, li, button, input, select, textarea, div {
    font-size: 16px;
  }

  h1 { font-size: 1.8rem !important; font-weight: 700 !important; }
  h2 { font-size: 1.5rem !important; font-weight: 600 !important; }
  h3 { font-size: 1.25rem !important; font-weight: 600 !important; }
  h4 { font-size: 1.15rem !important; }
  h5 { font-size: 1.05rem !important; }
  h6 { font-size: 1rem !important; }

  /* Force dashboard container of desktop view to be a vertical stack */
  .workspace-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 1.5rem !important;
  }

  /* Ensure every child panel inside it takes up 100% width, min 16px font, and clean vertical spacing */
  .workspace-grid .left-column,
  .workspace-grid .center-column,
  .workspace-grid .right-column,
  .workspace-grid > section,
  .workspace-grid .card,
  .workspace-grid .column {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    font-size: 16px !important;
    margin-bottom: 1.5rem !important;
    box-sizing: border-box !important;
  }

  .workspace-grid .left-column:last-child,
  .workspace-grid .center-column:last-child,
  .workspace-grid .right-column:last-child,
  .workspace-grid > section:last-child {
    margin-bottom: 0 !important;
  }

  /* Stacking header elements on mobile to prevent horizontal overflow */
  .main-header {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.25rem !important;
    width: 100% !important;
    padding-bottom: 1.25rem !important;
  }

  .header-left {
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: center !important;
    width: 100% !important;
  }
  
  .header-left .logo-icon-svg {
    margin: 0 !important;
  }
  
  .header-left .date-label {
    margin: 0 !important;
  }

  .header-right {
    flex-direction: column !important;
    gap: 1rem !important;
    align-items: center !important;
    width: 100% !important;
  }

  .view-switch-tabs {
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }

  .view-mode-tabs {
    width: 100% !important;
    justify-content: center !important;
    display: flex !important;
    gap: 0.5rem !important;
  }

  .satellite-header {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1.25rem !important;
    width: 100% !important;
    padding-bottom: 1.25rem !important;
  }

  /* Strict container clamping on mobile */
  #satellite-view, #desktop-view {
    width: 100% !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 15px !important;
    box-sizing: border-box !important;
  }

  /* Fluid widths for child elements */
  .column, .card, .support-card, #brain-dump-form, #distraction-capture-form, #calendar-ics-form, input, textarea, button, select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

.satellite-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-mute);
  padding-bottom: 1rem;
}

.satellite-header h1 {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.satellite-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding-bottom: 3rem;
  width: 100%;
  box-sizing: border-box;
}

.record-btn {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 4px solid var(--color-sage);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 20px rgba(158, 187, 122, 0.1);
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.record-btn:active {
  transform: scale(0.95);
}

.record-btn .record-icon {
  font-size: 3rem;
  transition: transform 0.3s ease;
  line-height: 1;
  display: inline-block;
}

/* Pulsing effect when recording */
.record-btn.recording {
  background: rgba(194, 122, 122, 0.15);
  border-color: var(--color-danger-soft);
  box-shadow: 0 0 30px rgba(194, 122, 122, 0.4);
  animation: pulse-recording 1.5s infinite alternate;
}

.record-btn.recording .record-icon {
  color: var(--color-danger-soft);
  transform: scale(1.1);
}

@keyframes pulse-recording {
  0% {
    box-shadow: 0 0 15px rgba(194, 122, 122, 0.3);
    border-color: rgba(194, 122, 122, 0.6);
  }
  100% {
    box-shadow: 0 0 35px rgba(194, 122, 122, 0.7);
    border-color: rgba(194, 122, 122, 1);
  }
}

.voice-status {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-sub);
  min-height: 1.5rem;
  transition: color 0.3s ease;
}

.voice-status.listening {
  color: var(--color-danger-soft);
}

.voice-status.saving {
  color: var(--color-gold);
}

.voice-status.success {
  color: var(--color-sage);
}

.voice-status.error {
  color: var(--color-danger-soft);
}

.preview-container {
  width: 100%;
  max-width: 500px;
  flex: 1;
  max-height: 250px;
  display: flex;
}

.voice-preview {
  width: 100%;
  height: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-mute);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  color: var(--text-main);
  font-size: 1rem;
  line-height: 1.5;
  resize: none;
  font-family: inherit;
  box-sizing: border-box;
  text-align: center;
}

.voice-preview:focus {
  outline: none;
  border-color: var(--color-sage);
}

/* High-priority View State Utility Class */
.hidden-view {
  display: none !important;
}

/* Mobile Navigation & View Switcher Buttons Upgrade */
.view-state-btn {
  min-height: 48px !important;
  min-width: 120px !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--color-slate-blue) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text-main) !important;
  padding: 0 1.25rem !important;
  cursor: pointer !important;
  transition: var(--trans-smooth) !important;
}

.view-state-btn:hover {
  background: var(--color-slate-blue) !important;
  color: var(--bg-dark) !important;
}

.view-state-btn.active {
  background: var(--color-sage) !important;
  color: var(--bg-dark) !important;
  border-color: var(--color-sage) !important;
}

.view-mode-tabs {
  background: transparent !important;
  border: none !important;
  gap: 0.75rem !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}

@media (min-width: 769px) {
  /* Scale body font size slightly on desktop for massive readability */
  body {
    font-size: 17px !important;
  }

  /* Scale up desktop logo and branding by 20-30% */
  .logo-icon-svg {
    height: 38px !important;
    width: 38px !important;
  }

  .logo {
    font-size: 2.3rem !important;
  }

  /* Scale up component headers proportionally */
  .inbox-title-bar h2 {
    font-size: 1.35rem !important;
  }

  .timeline-header h2 {
    font-size: 1.55rem !important;
  }

  .wizard-body h3 {
    font-size: 1.55rem !important;
  }

  .support-card h3 {
    font-size: 1.35rem !important;
  }
}
