:root {
  --bg: #f6faf8;
  --bg-alt: #eef6f2;
  --surface: #ffffff;
  --border: #dfe9e4;
  --text: #1c2b27;
  --text-muted: #5a6d67;
  --accent: #2f9e8e;
  --accent-dark: #237e71;
  --accent-soft: #d7f0ea;
  --coral: #ef8354;
  --coral-soft: #fde9dd;
  --shadow: 0 4px 24px rgba(31, 61, 55, 0.08);
  --shadow-lg: 0 12px 40px rgba(31, 61, 55, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --max-width: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 250, 248, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 2px 16px rgba(31, 61, 55, 0.06);
}

/* App pages (dashboard, home): fit within the viewport, no page-level scroll.
   Individual panels may still scroll internally if their own content overflows.
   Desktop only — on narrow screens the two-panel grid stacks, so normal page
   scrolling is kept (forcing a fixed height there would clip content). */

@media (min-width: 901px) {
  body.app-no-scroll {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  body.app-no-scroll .nav,
  body.app-no-scroll .app-footer {
    flex-shrink: 0;
  }

  body.app-no-scroll .dashboard-main,
  body.app-no-scroll .app-shell {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
  }

  body.app-no-scroll .dashboard-main {
    display: flex;
    flex-direction: column;
    padding-top: 24px;
    padding-bottom: 24px;
  }

  body.app-no-scroll .dashboard-main > .container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
  }

  body.app-no-scroll .dashboard-grid {
    flex: 1;
    min-height: 0;
    align-items: stretch;
  }

  body.app-no-scroll .chat-panel,
  body.app-no-scroll .timetable-panel {
    height: 100%;
    min-height: 0;
  }

  body.app-no-scroll .timetable-panel {
    overflow-y: auto;
  }

  body.app-no-scroll .app-shell {
    height: 100%;
  }

  body.app-no-scroll .app-main {
    height: 100%;
    overflow-y: auto;
  }
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.2s ease;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--accent-dark);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* App shell nav: true 3-column layout so the brand stays centered
   regardless of what's in the left slot (hamburger or nothing). */

.nav-inner-app {
  max-width: none;
  width: 100%;
  padding-left: 16px;
  padding-right: 28px;
}

.nav-inner-app .nav-col {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  min-width: 0;
}

.nav-inner-app .nav-col-left {
  justify-content: flex-start;
}

.nav-inner-app .nav-col-right {
  justify-content: flex-end;
}

.nav-inner-app .brand.nav-col-center {
  flex: 0 0 auto;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 5px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 20px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 158, 142, 0.28);
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 8px 22px rgba(47, 158, 142, 0.34);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn[disabled],
.btn.is-stub {
  position: relative;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* ---------- Toast (for stub buttons) ---------- */

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 999;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 100px 0 90px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 620px;
  background:
    radial-gradient(circle at 20% 20%, rgba(47, 158, 142, 0.18), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(239, 131, 84, 0.14), transparent 50%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
  letter-spacing: 0.01em;
}

.eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 20px;
}

.hero h1 .accent {
  color: var(--accent-dark);
  position: relative;
}

.hero-sub {
  font-size: 1.12rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 0 34px;
}

.hero-taglines {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 36px;
  min-height: 34px;
}

.tagline-chip {
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 7px 14px;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(6px);
  animation: chipIn 0.5s ease forwards;
}

.tagline-chip:nth-child(1) { animation-delay: 0.15s; }
.tagline-chip:nth-child(2) { animation-delay: 0.32s; }
.tagline-chip:nth-child(3) { animation-delay: 0.49s; }

@keyframes chipIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: 34px;
  margin-top: 44px;
  flex-wrap: wrap;
}

.stat-num {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.84rem;
  color: var(--text-muted);
}

/* ---------- Watch visual ---------- */

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.watch-mock {
  width: 250px;
  height: 300px;
  position: relative;
  filter: drop-shadow(0 30px 40px rgba(31, 61, 55, 0.18));
}

.watch-strap-top,
.watch-strap-bottom {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 60px;
  background: #cfe3dc;
  border: 1px solid #b9d3ca;
}

.watch-strap-top {
  top: -40px;
  border-radius: 14px 14px 0 0;
}

.watch-strap-bottom {
  bottom: -40px;
  border-radius: 0 0 14px 14px;
}

.watch-body {
  position: absolute;
  inset: 0;
  border-radius: 46px;
  background: linear-gradient(160deg, #24352f, #1a2622);
  padding: 14px;
  box-shadow: inset 0 0 0 6px #0f1815, inset 0 2px 10px rgba(255,255,255,0.05);
}

.watch-screen {
  width: 100%;
  height: 100%;
  border-radius: 32px;
  background: linear-gradient(160deg, #f6faf8, #e4f2ec);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  text-align: center;
}

.watch-time {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.watch-period {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
}

.watch-next {
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.watch-nowave {
  position: absolute;
  top: -14px;
  right: -14px;
  background: var(--coral);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(239, 131, 84, 0.35);
  transform: rotate(8deg);
}

/* ---------- Section basics ---------- */

section {
  padding: 88px 0;
}

.section-head {
  max-width: 640px;
  margin: 0 0 48px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-eyebrow {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.04rem;
  margin: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Problem ---------- */

.problem {
  background: var(--bg-alt);
}

.problem-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.problem-text p {
  color: var(--text-muted);
  font-size: 1.04rem;
  margin-bottom: 18px;
}

.problem-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--coral);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  font-size: 0.95rem;
  color: var(--text);
}

.problem-callout strong {
  color: var(--coral);
}

.problem-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.problem-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.problem-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.icon-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--coral-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--coral);
}

.problem-card h4 {
  margin: 0 0 4px;
  font-size: 0.98rem;
}

.problem-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Solution / principles ---------- */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.principle-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.principle-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.principle-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.principle-card h3 {
  font-size: 1.08rem;
  margin: 0 0 8px;
}

.principle-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Feature tabs ---------- */

.features-tabs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.tab-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 11px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tab-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(47, 158, 142, 0.28);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px;
  box-shadow: var(--shadow);
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card .icon-badge {
  background: var(--accent-soft);
  color: var(--accent-dark);
  margin-bottom: 16px;
}

.feature-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Breathing demo embedded in feature card */

.breathing-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  height: 90px;
}

.breathing-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  border: 2px solid var(--accent);
  animation: breathe 6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(1.9); opacity: 1; }
}

/* ---------- How it works ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  position: relative;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 24px;
  box-shadow: var(--shadow);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.step-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.step-card h3 {
  margin: 0 0 8px;
  font-size: 1.08rem;
}

.step-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ---------- Validation ---------- */

.validation {
  background: var(--bg-alt);
}

.validation-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.validation-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  box-shadow: var(--shadow);
}

.validation-stat .big-num {
  font-size: 3.2rem;
  font-weight: 800;
  color: var(--accent-dark);
  letter-spacing: -0.02em;
  line-height: 1;
}

.validation-stat .big-label {
  color: var(--text-muted);
  margin-top: 10px;
  font-size: 0.95rem;
}

.validation-bar {
  margin-top: 24px;
  height: 8px;
  border-radius: 999px;
  background: var(--bg-alt);
  overflow: hidden;
}

.validation-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  border-radius: 999px;
  transition: width 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.validation-text h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.validation-text p {
  color: var(--text-muted);
  margin-bottom: 14px;
}

.validation-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.validation-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.94rem;
  color: var(--text);
}

#openSurveyBtn {
  margin-top: 28px;
}

.check-icon {
  color: var(--accent-dark);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---------- Final CTA ---------- */

.final-cta {
  text-align: center;
}

.final-cta-box {
  background: linear-gradient(135deg, var(--accent-dark), var(--accent));
  border-radius: 28px;
  padding: 64px 40px;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.final-cta-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 0%, rgba(255,255,255,0.14), transparent 60%);
}

.final-cta-box h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 0 0 14px;
  position: relative;
}

.final-cta-box p {
  color: rgba(255,255,255,0.88);
  max-width: 520px;
  margin: 0 auto 30px;
  position: relative;
}

.final-cta-box .hero-ctas {
  justify-content: center;
  position: relative;
}

.final-cta-box .btn-ghost {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border-color: rgba(255,255,255,0.4);
}

.final-cta-box .btn-ghost:hover {
  background: rgba(255,255,255,0.18);
  border-color: #fff;
}

.final-cta-box .btn-primary {
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.final-cta-box .btn-primary:hover {
  background: #f2fbf9;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--border);
  padding: 36px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-note {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.footer-copyright {
  display: block;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.app-footer {
  border-top: 1px solid var(--border);
  padding: 20px 28px;
  text-align: center;
}

.app-footer .footer-copyright {
  margin: 0;
  padding: 0;
  border-top: none;
}

body:has(.app-sidebar) .app-footer {
  margin-left: var(--app-sidebar-width);
}

@media (max-width: 900px) {
  body:has(.app-sidebar) .app-footer {
    margin-left: 0;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero-inner,
  .problem-grid,
  .validation-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .principles-grid,
  .feature-grid,
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: none;
    gap: 16px;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .principles-grid,
  .feature-grid,
  .steps {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 70px 0 60px;
  }

  section {
    padding: 60px 0;
  }

  .nav-actions {
    gap: 8px;
  }

  .nav-actions .btn {
    padding: 9px 14px;
    font-size: 0.8rem;
  }
}

@media (max-width: 380px) {
  .nav-actions .nav-login-btn {
    display: none;
  }
}

/* ---------- Auth pages ---------- */

.auth-page {
  min-height: calc(100vh - 220px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
}

.auth-page .hero-glow {
  height: 480px;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 620px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 44px 44px 40px;
}

.auth-card.auth-card-narrow {
  max-width: 440px;
}

.auth-card-head {
  text-align: center;
  margin-bottom: 32px;
}

.auth-card-head .eyebrow {
  margin-bottom: 18px;
}

.auth-card-head h1 {
  font-size: 1.6rem;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.auth-card-head p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

.form-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 28px 0 14px;
}

.form-section-label:first-child {
  margin-top: 0;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 7px;
}

.form-label-row label {
  margin-bottom: 0;
}

.forgot-password-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-dark);
  padding: 0;
}

.forgot-password-link:hover {
  text-decoration: underline;
}

.form-group .field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 5px;
}

.form-control {
  width: 100%;
  font-family: inherit;
  font-size: 0.94rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(47, 158, 142, 0.14);
}

.form-control[disabled] {
  background: var(--bg-alt);
  color: var(--text-muted);
  cursor: not-allowed;
}

input[type="file"].form-control {
  border: none;
  background: transparent;
  padding: 8px 0;
}

input[type="file"].form-control:focus {
  border: none;
  box-shadow: none;
  background: transparent;
}

select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%235a6d67' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.field-error {
  display: none;
  font-size: 0.78rem;
  color: var(--coral);
  margin-top: 6px;
}

.form-group.has-error .form-control {
  border-color: var(--coral);
}

.form-group.has-error .field-error {
  display: block;
}

.conditional-field {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
}

.conditional-field.is-visible {
  max-height: 140px;
  opacity: 1;
}

.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}

.btn.is-loading {
  opacity: 0.75;
  pointer-events: none;
}

.auth-switch {
  text-align: center;
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.alert-error {
  background: var(--coral-soft);
  color: #8a3d1e;
  border: 1px solid rgba(239, 131, 84, 0.35);
}

.alert-success {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border: 1px solid rgba(47, 158, 142, 0.35);
}

.alert svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---------- Modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 43, 39, 0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 420px;
  width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 32px 30px 26px;
  transform: translateY(16px) scale(0.98);
  transition: transform 0.22s ease;
  text-align: center;
}

.modal-overlay.show .modal-box {
  transform: translateY(0) scale(1);
}

.modal-actions-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-actions-row .btn {
  flex: 1;
}

.modal-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.modal-icon.modal-icon-error {
  background: var(--coral-soft);
  color: var(--coral);
}

.modal-icon.modal-icon-warning {
  background: #fdf3d9;
  color: #b8860b;
}

.modal-icon.modal-icon-success {
  background: var(--accent-soft);
  color: var(--accent-dark);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.modal-box h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}

.modal-box p {
  margin: 0 0 22px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.modal-box .btn {
  width: 100%;
  justify-content: center;
}

.modal-box-wide {
  max-width: 620px;
  text-align: left;
}

.modal-box-wide h3 {
  text-align: left;
}

.intake-sub {
  text-align: left;
}

.intake-textarea {
  width: 100%;
  resize: vertical;
  min-height: 140px;
  line-height: 1.55;
  margin-bottom: 18px;
}


@media (max-width: 720px) {
  .auth-card {
    padding: 32px 24px 30px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Dashboard ---------- */

.mode-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: 10px;
}

.dashboard-main {
  padding: 40px 0 80px;
}

.dashboard-head {
  margin-bottom: 28px;
}

.dashboard-head h1 {
  font-size: 1.6rem;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.dashboard-head p {
  color: var(--text-muted);
  margin: 0;
  font-size: 0.95rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 28px;
  align-items: start;
}

/* Chat panel */

.chat-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 560px;
}

.chat-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.chat-panel-title {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text);
}

.btn-small {
  padding: 7px 14px;
  font-size: 0.8rem;
}

.chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.chat-bubble {
  max-width: 85%;
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.55;
}

.chat-bubble.from-ai {
  align-self: flex-start;
  background: var(--bg-alt);
  color: var(--text);
  border-bottom-left-radius: 4px;
}

.chat-bubble.from-user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.chat-bubble.system-note {
  align-self: center;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-style: italic;
}

.planning-indicator {
  align-self: flex-start;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--bg-alt);
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 600;
}

.planning-indicator.show {
  display: flex;
}

.planning-dots {
  display: flex;
  gap: 4px;
}

.planning-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotPulse 1.1s ease-in-out infinite;
}

.planning-dots span:nth-child(2) { animation-delay: 0.15s; }
.planning-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotPulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.15); }
}

.chat-capsule {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding: 14px 16px;
}

.chat-capsule input {
  flex: 1;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 999px;
  padding: 12px 18px;
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.chat-capsule input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47, 158, 142, 0.14);
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.18s ease, transform 0.15s ease;
}

.chat-send-btn:hover {
  background: var(--accent-dark);
}

.chat-send-btn:active {
  transform: scale(0.94);
}

.chat-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.chat-hint {
  padding: 0 24px 16px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Timetable panel */

.timetable-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  min-height: 560px;
}

.timetable-panel h2 {
  font-size: 1.1rem;
  margin: 0 0 4px;
}

.timetable-panel .panel-sub {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin: 0;
}

.timetable-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.timetable-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.day-selector {
  width: auto;
  min-width: 140px;
  font-weight: 600;
}

.timetable-empty,
.timetable-empty-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  gap: 10px;
}

.timetable-empty .icon-badge,
.timetable-empty-day .icon-badge {
  background: var(--accent-soft);
  color: var(--accent-dark);
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin-bottom: 6px;
}

.timetable-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.timetable-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.timetable-table thead th {
  text-align: left;
  background: var(--bg-alt);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.timetable-table tbody tr {
  transition: background 0.15s ease;
}

.timetable-table tbody tr:hover {
  background: var(--bg-alt);
}

.timetable-table tbody tr:not(:last-child) td {
  border-bottom: 1px solid var(--border);
}

.timetable-table td {
  padding: 12px 16px;
  vertical-align: middle;
}

.timetable-table td.col-time {
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  width: 1%;
}

.timetable-table td.col-activity {
  font-weight: 600;
  color: var(--text);
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.type-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.type-pill.type-school::before { background: var(--accent); }
.type-pill.type-tuition::before { background: var(--coral); }
.type-pill.type-homework::before { background: #6c8ee0; }
.type-pill.type-break::before { background: #e0b34a; }
.type-pill.type-sleep::before { background: #8a6fd6; }
.type-pill.type-free::before { background: #9aa8a2; }
.type-pill.type-travel::before { background: #4aa3c7; }
.type-pill.type-meal::before { background: #d67ab8; }

.timetable-table tr.type-row-break td.col-activity,
.timetable-table tr.type-row-break td.col-time {
  color: #b8860b;
}

/* Finalize panel */

.finalize-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.finalize-field {
  margin-bottom: 18px;
}

.finalize-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.finalize-label-row label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

.finalize-value {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 999px;
  min-width: 56px;
  text-align: center;
}

.finalize-field input[type="range"] {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  height: 6px;
  border-radius: 999px;
  background: var(--bg-alt);
  outline: none;
  margin: 8px 0 10px;
}

.finalize-field input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
  cursor: pointer;
}

.finalize-field input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
  cursor: pointer;
}

.finalize-field .field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.finalize-status {
  margin-top: 14px;
  margin-bottom: 14px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-dark);
}

@media (max-width: 480px) {
  .timetable-panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .timetable-header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .day-selector {
    width: 100%;
  }
}

/* ---------- App shell (home page: left menu + right content) ---------- */

:root {
  --nav-height: 65px;
  --app-sidebar-width: 232px;
}

.app-shell {
  min-height: calc(100vh - var(--nav-height));
}

.app-sidebar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  bottom: 0;
  width: var(--app-sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 10px;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 60;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.app-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-start;
  text-align: left;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: none;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.app-nav-item svg {
  flex-shrink: 0;
}

.app-nav-item:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.app-nav-item.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-left-color: var(--accent);
}

.app-main {
  margin-left: var(--app-sidebar-width);
  padding: 28px 32px 60px;
}

/* Edit Timetable toolbar */

.edit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.edit-day-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.edit-day-tab {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.84rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.edit-day-tab:hover {
  border-color: var(--accent);
  color: var(--text);
}

.edit-day-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.edit-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.break-mini-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.break-mini-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.break-mini-control input[type="range"] {
  width: 110px;
  appearance: none;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 999px;
  background: var(--bg-alt);
  outline: none;
}

.break-mini-control input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
}

.break-mini-control input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--accent);
  cursor: pointer;
}

.break-mini-value {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-soft);
  padding: 3px 9px;
  border-radius: 999px;
  min-width: 52px;
  text-align: center;
}

.edit-editor-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

#addBlockBtn {
  margin-top: 6px;
}

.edit-empty,
.view-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  padding: 50px 20px;
  gap: 10px;
}

.edit-empty .icon-badge,
.view-empty .icon-badge {
  background: var(--accent-soft);
  color: var(--accent-dark);
  width: 52px;
  height: 52px;
  border-radius: 16px;
  margin-bottom: 6px;
}

.edit-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.edit-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  flex-wrap: wrap;
}

.edit-row .form-control {
  padding: 9px 12px;
  font-size: 0.86rem;
}

.edit-row-label {
  flex: 1 1 160px;
  min-width: 120px;
}

.edit-row-type {
  flex: 0 0 130px;
}

.edit-row-time {
  flex: 0 0 108px;
}

.edit-row-delete {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.edit-row-delete:hover {
  background: #f8d3c0;
}

.review-issue-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.review-issue-list li {
  padding: 12px 14px;
  background: var(--coral-soft);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: #8a3d1e;
  line-height: 1.5;
}

/* ---------- Survey modal ---------- */

.survey-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 8px;
}

.survey-choice-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  padding: 26px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.survey-choice-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.survey-choice-btn svg {
  color: var(--accent-dark);
  margin-bottom: 4px;
}

.survey-choice-btn span:nth-child(2) {
  font-weight: 700;
  font-size: 0.98rem;
}

.survey-choice-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.survey-view-list {
  text-align: left;
  margin: 0 0 22px;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text);
  font-size: 0.92rem;
  max-height: 360px;
  overflow-y: auto;
}

.survey-view-list li span {
  display: block;
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.survey-anon-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}

.export-option-list {
  text-align: left;
  margin-bottom: 4px;
}

.export-option-list .survey-anon-toggle {
  margin-bottom: 10px;
}

.survey-anon-toggle input {
  width: 17px;
  height: 17px;
  accent-color: var(--accent);
  cursor: pointer;
}

.survey-question-block {
  text-align: left;
  margin-bottom: 20px;
}

.survey-question-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.survey-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.survey-option {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.survey-option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 700;
}

.survey-option input {
  accent-color: var(--accent);
  cursor: pointer;
}

@media (max-width: 560px) {
  .survey-choice-row {
    grid-template-columns: 1fr;
  }
}

/* ---------- Manage Smartwatch ---------- */

.sw-status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.sw-status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sw-status-label {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.sw-status-value {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.sw-actions {
  display: flex;
  gap: 12px;
}

.survey-manage-list {
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.survey-manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.survey-manage-row:last-child {
  border-bottom: none;
}

.survey-manage-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.survey-manage-type {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--accent-dark);
  background: rgba(47, 158, 142, 0.12);
  border-radius: 999px;
  padding: 2px 9px;
}

.survey-manage-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.survey-manage-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.survey-manage-delete {
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid var(--coral);
  color: var(--coral);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.survey-manage-delete:hover {
  background: var(--coral);
  color: #fff;
}

.admin-promote-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-promote-row .form-control {
  flex: 1;
  min-width: 220px;
}

.port-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.port-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.port-item:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.port-item svg {
  flex-shrink: 0;
  color: var(--accent-dark);
}

.port-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.port-item-title {
  font-weight: 600;
  color: var(--text);
}

.port-item-subtitle {
  font-weight: 500;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.port-unsupported {
  text-align: center;
  color: var(--coral);
  font-size: 0.86rem;
  margin: 14px 0 0;
}

@media (max-width: 720px) {
  .sw-status-grid {
    grid-template-columns: 1fr;
  }

  .sw-actions {
    flex-direction: column;
  }
}

/* Question modal (reuses .modal-overlay / .modal-box) */

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .chat-panel {
    height: 460px;
  }

  .app-sidebar {
    position: static;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .app-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .app-nav-item {
    justify-content: flex-start;
    padding: 11px 14px;
  }

  .app-nav-label {
    display: inline;
  }

  .app-main {
    margin-left: 0;
    padding: 24px 20px 60px;
  }
}
