@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

/* Lightning Developments — modern dark UI inspired by Pulse design */
:root {
  --bg: #0a0a0a;
  --bg-soft: #121212;
  --surface: rgba(20, 20, 20, 0.92);
  --surface-2: rgba(18, 18, 18, 0.88);
  --surface-3: rgba(15, 15, 15, 0.78);
  --text: #f5f6ff;
  --muted: #a7adc9;
  --line: rgba(142, 140, 200, 0.28);

  --primary: #8b5cf6;
  --secondary: #6366f1;
  --accent: #c084fc;
  --gradient: linear-gradient(135deg, #c084fc 0%, #8b5cf6 38%, #4338ca 100%);
  --gradient-soft: #0a0a0a;

  --radius: 16px;
  --shadow: 0 30px 80px rgba(3, 6, 18, 0.7);
  --shadow-soft: 0 12px 40px rgba(28, 21, 63, 0.5);
  --ring: rgba(168, 85, 247, 0.35);
  --glow: 0 0 40px rgba(129, 140, 248, 0.45);
  --chip-bg: rgba(129, 140, 248, 0.18);
  --chip-border: rgba(196, 181, 253, 0.5);
  --danger: #fb7185;
  --warning: #facc15;
  --success: #34d399;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--gradient-soft);
  color: var(--text);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.55em;
}

h1 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.1;
}

h3 {
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  line-height: 1.15;
}

/* Public page headings without diffuse glow */
body.public-page h1,
body.public-page .section-title {
  display: block;
  margin-bottom: clamp(0.9em, 1.8vw, 1.2em);
}

p {
  margin-top: 0;
  margin-bottom: 1em;
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.row { display: flex; gap: 18px; }
.row.center { align-items: center; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }

.grid { display: grid; }

.grid-split {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(18px, 3vw, 26px);
  align-items: flex-start;
}

.grid-split--compact {
  gap: clamp(12px, 2.5vw, 18px);
}

.grid-sidebar {
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: clamp(18px, 3.5vw, 28px);
  align-items: flex-start;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.row.gap-sm { gap: 12px; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: #c4b5fd;
}

strong {
  color: #ffffff;
  font-weight: 600;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(16px) saturate(150%);
  background: linear-gradient(180deg, rgba(10, 10, 10, 0.94), rgba(10, 10, 10, 0.72) 55%, rgba(10, 10, 10, 0));
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.site-header .container {
  align-items: center;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--text);
}

.brand .logo-spark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(147, 197, 253, 0.4), rgba(168, 85, 247, 0.85));
  box-shadow: 0 8px 28px rgba(124, 58, 237, 0.5);
  filter: saturate(140%);
}

.brand .brand-text {
  display: inline-flex;
  flex-direction: column;
  gap: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.1;
}

.brand-subtext {
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(196, 181, 253, 0.72);
}

.nav {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-left: auto;
  position: relative;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.nav-menu {
  display: flex;
  gap: 14px;
  align-items: center;
}

.nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 12px;
  color: rgba(226, 232, 255, 0.85);
  border: 1px solid transparent;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
  border-color: rgba(196, 181, 253, 0.35);
  background: rgba(129, 140, 248, 0.12);
  color: #ffffff;
  transform: translateY(-1px);
}

.nav a[aria-current="page"] {
  border-color: rgba(196, 181, 253, 0.55);
  background: rgba(129, 140, 248, 0.2);
  color: #ffffff;
}

/* Portal shell */
.portal-shell {
  min-height: 100vh;
}

.portal-shell .site-header {
  position: sticky;
  width: 100%;
  border-right: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: linear-gradient(180deg, rgba(6, 8, 24, 0.92), rgba(6, 8, 24, 0.7));
}

.portal-shell .site-header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.portal-shell .portal-brand .brand-text {
  font-size: 0.95rem;
}

.portal-shell .portal-brand .brand-subtext {
  margin-top: 2px;
  font-size: 0.78rem;
  letter-spacing: 0.22px;
}

.portal-shell main,
.portal-shell .site-footer {
  margin-left: 0;
}

.portal-shell .nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.portal-shell #global-timer {
  width: auto;
  margin: 0;
}

.portal-shell .nav-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.portal-shell .nav .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  color: rgba(228, 232, 255, 0.82);
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.portal-shell .nav .nav-link:hover {
  background: rgba(129, 140, 248, 0.18);
  color: #ffffff;
  border-color: rgba(196, 181, 253, 0.4);
  transform: translateY(-1px);
}

.portal-shell .nav .nav-link.nav-link--root {
  background: rgba(88, 28, 135, 0.16);
  border-color: rgba(192, 132, 252, 0.35);
  color: #f5f3ff;
}

.portal-shell .nav button.nav-link {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
}

.portal-shell .nav .nav-link.is-current {
  border-color: rgba(196, 181, 253, 0.6);
  background: rgba(129, 140, 248, 0.28);
  color: #ffffff;
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.28);
}

.portal-shell .nav .nav-link[aria-disabled="true"] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.portal-shell .nav .nav-link.nav-logout {
  border-color: rgba(248, 113, 113, 0.32);
  color: #fecaca;
  background: rgba(127, 29, 29, 0.24);
}

.portal-shell .nav .nav-link.nav-logout:hover {
  background: rgba(127, 29, 29, 0.36);
}

.portal-shell .nav .nav-link.nav-preview-toggle--has-preview {
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

/* Hamburger menu styles */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 980px) {
  .hamburger {
    display: flex;
  }

  .portal-shell .site-header .container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
  }

  .portal-shell .nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: rgba(6, 8, 24, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  }

  .portal-shell .nav.active {
    transform: translateX(0);
  }

  .portal-shell .nav-group {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .portal-shell .nav .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 16px;
  }

  .nav-preview {
    position: relative;
    top: 0;
    margin-top: 20px;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(120px, 16vw, 180px) 0 clamp(90px, 12vw, 140px);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% 0 10% 0;
  background: radial-gradient(1000px 600px at 70% -5%, rgba(139, 92, 246, 0.24), transparent 70%),
    radial-gradient(800px 450px at 18% -12%, rgba(96, 165, 250, 0.18), transparent 72%);
  filter: blur(40px) saturate(140%);
  pointer-events: none;
  z-index: 0;
}

.lightning-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.9;
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero-grid {
  display: grid;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(196, 181, 253, 0.3);
  background: rgba(129, 140, 248, 0.1);
  font-size: 0.85rem;
  letter-spacing: 0.24px;
  text-transform: uppercase;
  color: rgba(228, 232, 255, 0.9);
}

.hero .hero-title {
  margin-top: 18px;
  margin-bottom: clamp(1rem, 2vw, 1.4rem);
  padding-bottom: 0;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  max-width: 100%;
}

body.public-page .hero-title::after {
  content: none;
}

.hero-title__line {
  display: inline-block;
  align-self: flex-start;
  line-height: 1.05;
}

.hero-title__line--accent {
  position: relative;
  padding-bottom: clamp(0.35em, 1.2vw, 0.55em);
  margin-bottom: clamp(0.2em, 1vw, 0.45em);
  isolation: isolate;
  z-index: 0;
  --hero-title-diffuse: linear-gradient(
    90deg,
    rgba(192, 132, 252, 0.82) 0%,
    rgba(129, 140, 248, 0.72) 48%,
    rgba(56, 189, 248, 0.68) 100%
  );
}

.hero-title__line--accent::after {
  content: none;
}

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  color: rgba(209, 213, 250, 0.86);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 620px;
}

.hero-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--chip-border);
  background: var(--chip-bg);
  color: rgba(228, 232, 255, 0.9);
  font-size: 0.95rem;
}

.hero-chip__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--warning);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 36px;
}

.hero-visual {
  position: relative;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.hero-orb-group {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  width: min(340px, 100%);
}

.hero-orb {
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.28), transparent 60%),
    linear-gradient(135deg, rgba(129, 140, 248, 0.85), rgba(56, 189, 248, 0.4));
  filter: saturate(160%);
  box-shadow: 0 20px 50px rgba(37, 99, 235, 0.42);
  opacity: 0.9;
}

.hero-card-stack {
  position: relative;
  display: grid;
  gap: 14px;
  width: min(360px, 90%);
}

.hero-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15, 15, 15, 0.9), rgba(20, 20, 20, 0.9));
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.hero-card h3 {
  margin: 0 0 6px;
  font-size: 1rem;
}

.hero-card p {
  margin: 0;
  color: rgba(203, 213, 233, 0.85);
  font-size: 0.9rem;
}

.hero-ambient {
  position: absolute;
  inset: -12% -8% auto -8%;
  height: 460px;
  background: radial-gradient(1300px 380px at 42% 10%, rgba(129, 140, 248, 0.20), transparent 68%),
    radial-gradient(1000px 360px at 68% -5%, rgba(56, 189, 248, 0.16), transparent 70%);
  filter: blur(45px) saturate(150%);
  pointer-events: none;
  z-index: 0;
}

.lead {
  color: rgba(209, 213, 250, 0.82);
  font-size: clamp(1.02rem, 2vw, 1.22rem);
  max-width: 720px;
}

/* Sections */
.section {
  position: relative;
  padding: clamp(70px, 12vw, 110px) 0;
}

.section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(1000px 420px at 12% -2%, rgba(139, 92, 246, 0.06), transparent 72%);
  opacity: 0.6;
  pointer-events: none;
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section-header {
  display: grid;
  gap: 12px;
  max-width: 780px;
  margin: 0 0 clamp(36px, 6vw, 56px);
}

.section-header .lead {
  margin-bottom: 0;
}

.section-alt {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(12, 12, 12, 0.5);
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}

body.public-page .section-title {
  margin-bottom: clamp(0.9em, 1.8vw, 1.15em);
  --headline-diffuse-fill: radial-gradient(
    120% 200% at 50% 100%,
    rgba(223, 223, 255, 0.7) 0%,
    rgba(168, 196, 255, 0.36) 42%,
    transparent 74%
  );
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(196, 181, 253, 0.25);
  background: rgba(129, 140, 248, 0.12);
  font-size: 0.8rem;
  letter-spacing: 0.28px;
  text-transform: uppercase;
  color: rgba(226, 232, 255, 0.82);
}

.muted {
  color: rgba(203, 213, 225, 0.68);
}

/* Features */
.grid.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(18px, 4vw, 28px);
}

.card {
  position: relative;
  background: linear-gradient(145deg, rgba(18, 18, 18, 0.94), rgba(15, 15, 15, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}


.card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.card p {
  margin: 0;
  color: rgba(203, 213, 233, 0.78);
}

.pricing-card {
  position: relative;
  padding-top: 32px;
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow: 0 30px 70px rgba(14, 11, 40, 0.5);
}

.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(140deg, rgba(168, 85, 247, 0.22), rgba(59, 130, 246, 0.18));
  opacity: 0.22;
  pointer-events: none;
}

.pricing-rate {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
  font-weight: 700;
  color: var(--text);
}

.pricing-amount {
  font-size: clamp(2.2rem, 4vw, 2.8rem);
  line-height: 1;
  letter-spacing: 0.6px;
}

.pricing-unit {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2.4px;
  color: rgba(196, 210, 255, 0.7);
}

/* Portal menu */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(16px, 3vw, 24px);
}

.menu-card {
  position: relative;
  display: block;
  color: inherit;
  border-radius: var(--radius);
  border: 1px solid rgba(137, 143, 200, 0.24);
  background: linear-gradient(150deg, rgba(15, 16, 36, 0.92), rgba(9, 10, 24, 0.9));
  padding: 22px;
  box-shadow: 0 18px 50px rgba(3, 5, 25, 0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}


.menu-card h3 {
  margin: 0 0 10px;
}

.menu-card p {
  margin: 0;
  color: rgba(203, 213, 233, 0.78);
}

.menu-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px rgba(12, 15, 50, 0.6);
  border-color: rgba(196, 181, 253, 0.4);
}

/* Steps */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: s;
  display: grid;
  gap: clamp(14px, 3vw, 22px);
}

.steps li {
  position: relative;
  padding: 20px 20px 20px 60px;
  border-radius: var(--radius);
  border: 1px solid rgba(151, 151, 227, 0.28);
  background: linear-gradient(140deg, rgba(13, 14, 32, 0.95), rgba(7, 9, 24, 0.9));
  box-shadow: 0 24px 60px rgba(8, 8, 26, 0.6);
}

.steps li::before {
  counter-increment: s;
  content: counter(s);
  position: absolute;
  top: 20px;
  left: 20px;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.9), rgba(79, 70, 229, 0.8));
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.5);
}

.steps .step-title {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.steps .step-desc {
  color: rgba(203, 213, 233, 0.75);
}

/* Contact */
.contact {
  text-align: center;
  display: grid;
  gap: 12px;
  justify-items: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 22px 0;
  background: rgba(5, 6, 18, 0.85);
  backdrop-filter: blur(12px);
}

.site-footer a {
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.25px;
  line-height: 1;
  transition: transform 0.06s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  color: #0f022c;
  background: linear-gradient(135deg, #f8fafc 0%, #c084fc 45%, #8b5cf6 100%);
  border-color: rgba(192, 132, 252, 0.65);
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.45);
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 22px 54px rgba(129, 140, 248, 0.55);
}

.btn-outline {
  color: rgba(226, 232, 255, 0.9);
  border-color: rgba(196, 181, 253, 0.4);
  background: rgba(15, 17, 36, 0.55);
}

.btn-outline:hover {
  border-color: rgba(196, 181, 253, 0.75);
  background: rgba(129, 140, 248, 0.18);
}

.btn-ghost {
  color: rgba(226, 232, 255, 0.78);
  background: rgba(11, 12, 28, 0.5);
  border-color: rgba(148, 163, 184, 0.35);
}

.btn-ghost:hover {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.55);
}

/* Forms (login page) */
.form-card {
  max-width: 460px;
  margin: 48px auto;
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgba(18, 18, 18, 0.95), rgba(12, 12, 12, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.6);
}

.form-card h1 {
  margin: 0 0 12px;
  font-size: 1.6rem;
}
.field { display: grid; gap: 8px; margin: 12px 0; }
.field label { color: var(--muted); font-size: 0.95rem; }
.input {
  height: 44px;
  background: rgba(12, 13, 30, 0.85);
  color: var(--text);
  border: 1px solid rgba(137, 143, 200, 0.32);
  border-radius: 12px;
  padding: 0 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.input:focus {
  border-color: rgba(196, 181, 253, 0.7);
  box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.28);
  background: rgba(16, 18, 38, 0.92);
}

.input::placeholder {
  color: rgba(226, 229, 255, 0.45);
}

textarea.input {
  height: auto;
  min-height: 120px;
  padding: 14px;
  line-height: 1.5;
  resize: vertical;
}
.helper { color: var(--muted); font-size: 0.9rem; }
.actions { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 16px; }

.participant-options { display: grid; gap: 8px; padding: 0; margin: 4px 0; color: var(--muted); }
.participant-option { display: inline-flex; align-items: center; gap: 8px; }
.participant-option input[type="checkbox"] { accent-color: var(--secondary); }

.task-row { position: relative; }
.subtask-row { background: rgba(255,255,255,0.01); border-left: 1px solid var(--line); border-radius: 0 8px 8px 0; }
.subtask-row .task-content { align-items: flex-start; }

.input-pair { display: flex; gap: 8px; align-items: center; }
.input-pair .input:first-child { flex: 1; min-width: 0; }
.input-compact { width: auto; min-width: 110px; }

.btn-emoji { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; padding: 0 10px; font-size: 1rem; }
.btn-emoji span { font-size: 1.1rem; }
.icon-plus { color: #fff; font-weight: 600; font-size: 1.1rem; line-height: 1; display: inline-flex; }

.stack-sm { display: flex; flex-direction: column; gap: 12px; }

.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row .field { min-width: 0; }

.divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}

.card-subheading {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.temp-password {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(30,64,175,0.16);
  border: 1px solid rgba(147,197,253,0.4);
  color: #e0e7ff;
  font-size: 0.95rem;
}
.temp-password code {
  display: inline-block;
  margin-top: 6px;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  background: rgba(15,23,42,0.5);
  color: #f8fafc;
  padding: 4px 8px;
  border-radius: 6px;
}

.idea-list .idea-card {
  border: 1px solid rgba(148,163,184,0.3);
  border-radius: var(--radius);
  padding: 16px;
  background: linear-gradient(180deg, rgba(17,24,39,0.85), rgba(13,17,28,0.75));
  display: grid;
  gap: 10px;
}

.idea-list .idea-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.idea-list .idea-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.idea-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  border: 1px solid rgba(96,165,250,0.4);
  background: rgba(59,130,246,0.16);
  text-transform: capitalize;
}

.idea-status.status-accepted { border-color: rgba(74,222,128,0.5); background: rgba(34,197,94,0.16); color: #bbf7d0; }
.idea-status.status-reviewed { border-color: rgba(251,191,36,0.5); background: rgba(245,158,11,0.16); color: #fde68a; }

.idea-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.nav-preview {
  display: grid;
  gap: 10px;
  padding: 14px;
  margin-top: 14px;
  border: 1px solid rgba(137, 143, 200, 0.35);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(13, 16, 36, 0.95), rgba(9, 11, 26, 0.88));
  box-shadow: 0 20px 40px rgba(6, 7, 26, 0.55);
  width: min(100%, 420px);
}

.nav-preview[hidden] {
  display: none !important;
}

.nav-preview label {
  font-size: 0.82rem;
  color: rgba(203, 213, 233, 0.72);
}

.nav-preview select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(137, 143, 200, 0.35);
  background: rgba(13, 16, 36, 0.88);
  color: var(--text);
  height: 38px;
  padding: 0 12px;
}

.nav-preview button {
  width: 100%;
  height: 38px;
}

.portal-shell .preview-banner {
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(59,130,246,0.45);
  background: rgba(59,130,246,0.18);
  color: #e0e7ff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.portal-shell .preview-banner button {
  height: 32px;
}

.filter-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow);
}

.filter-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 18px;
  cursor: pointer;
}

.filter-toggle:focus-visible {
  outline: 2px solid rgba(96,165,250,0.6);
  outline-offset: 2px;
}

.filter-toggle-icon {
  transition: transform 0.2s ease;
}

.filter-panel.is-collapsed .filter-toggle-icon {
  transform: rotate(0deg);
}

.filter-panel:not(.is-collapsed) .filter-toggle-icon {
  transform: rotate(180deg);
}

.filter-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 0 18px 18px;
}

.filter-panel.is-collapsed .filter-body {
  display: none;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-label {
  font-size: 0.9rem;
  color: var(--muted);
  letter-spacing: 0.3px;
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
}

.filter-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.filter-options .filter-chip,
.filter-options button {
  border: 1px solid rgba(147,197,253,0.35);
  background: rgba(59,130,246,0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 12px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.filter-options .filter-chip.active,
.filter-options button.active {
  background: rgba(250,204,21,0.28);
  border-color: rgba(250,204,21,0.6);
  color: #fef3c7;
}

.filter-options button {
  background: rgba(59,130,246,0.08);
}

.filter-options button:hover {
  background: rgba(59,130,246,0.18);
}

.tag-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-2); min-height: 40px; align-items: center; }
.tag-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(59,130,246,0.16); color: var(--text); font-size: 0.85rem; }
.tag-chip button { background: none; border: none; color: inherit; cursor: pointer; padding: 0; font-size: 0.85rem; }
.tag-input input { background: transparent; border: none; outline: none; color: var(--text); min-width: 120px; flex: 1; padding: 4px 0; }
.tag-suggestions { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag-suggestions button { background: rgba(59,130,246,0.1); color: var(--text); border: 1px solid rgba(59,130,246,0.3); border-radius: 999px; padding: 2px 8px; cursor: pointer; font-size: 0.8rem; }
.filter-chip { cursor: pointer; border: 1px solid rgba(147,197,253,0.4); background: rgba(59,130,246,0.12); transition: background 0.2s ease, border 0.2s ease; }
.filter-chip.active { background: rgba(250,204,21,0.2); border-color: rgba(250,204,21,0.6); }

#global-timer {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1500;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 16px;
  max-width: min(360px, calc(100% - 32px));
  border: 1px solid rgba(147,197,253,0.55);
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(30,64,175,0.36);
  background: linear-gradient(135deg, rgba(30,58,138,0.85), rgba(17,24,39,0.92));
  color: #e0e7ff;
  animation: lightningPulse 6s infinite;
  overflow: hidden;
  backdrop-filter: blur(12px);
}
#global-timer::before {
  content: "";
  position: absolute;
  inset: -2px;
  background: linear-gradient(120deg, rgba(96,165,250,0.1), rgba(59,130,246,0.6), rgba(147,197,253,0.18));
  mix-blend-mode: screen;
  opacity: 0;
  animation: lightningFlash 12s infinite;
  pointer-events: none;
}

.global-timer-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.global-timer-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.global-timer-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.global-timer-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.global-timer-primary {
  font-weight: 700;
  font-size: 1rem;
}

.global-timer-context {
  font-size: 0.85rem;
  color: rgba(224,231,255,0.78);
}

.global-timer-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.global-timer-display {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.4px;
}

.global-timer-stop {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: rgba(248,113,113,0.2);
  border: 1px solid rgba(248,113,113,0.5);
  color: #fecaca;
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}

.global-timer-stop:hover {
  background: rgba(248,113,113,0.32);
  border-color: rgba(248,113,113,0.65);
  transform: translateY(-1px);
}

.global-timer-stop-icon {
  font-size: 1rem;
  line-height: 1;
}

.global-timer-minimize {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(96,165,250,0.35);
  background: rgba(37,99,235,0.25);
  color: #c7d2fe;
  cursor: pointer;
  transition: background 0.2s ease, border 0.2s ease, transform 0.2s ease;
}

.global-timer-minimize:hover {
  background: rgba(59,130,246,0.38);
  border-color: rgba(147,197,253,0.6);
  transform: translateY(-1px);
}

.global-timer-minimize:focus-visible {
  outline: 2px solid rgba(191,219,254,0.8);
  outline-offset: 2px;
}

.global-timer-minimize-icon {
  font-size: 1rem;
  line-height: 1;
}

#global-timer.is-minimized {
  gap: 8px;
  padding: 10px 12px;
  max-width: min(260px, calc(100% - 24px));
}

#global-timer.is-minimized .global-timer-body {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding-right: 36px;
}

#global-timer.is-minimized .global-timer-line {
  display: none;
}

#global-timer.is-minimized .global-timer-controls {
  flex-wrap: nowrap;
  gap: 10px;
}

#global-timer.is-minimized .global-timer-stop {
  padding: 4px 6px;
}

#global-timer.is-minimized .global-timer-stop-text {
  display: none;
}

#global-timer.is-minimized .global-timer-minimize {
  top: 6px;
  right: 6px;
}

@media (max-width: 768px) {
  #global-timer {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 16px;
    max-width: none;
  }

  #global-timer.is-minimized {
    max-width: none;
    width: auto;
  }
}

.timer-form.lightning-active, .task-row.lightning-active { border: 1px solid rgba(129,140,248,0.6) !important; box-shadow: 0 0 20px rgba(96,165,250,0.4); background: rgba(15,23,42,0.75); animation: lightningPulse 8s infinite; }
.timer-form.lightning-active::before { content:""; position:absolute; inset:-4px; border-radius: inherit; background: radial-gradient(circle at top, rgba(147,197,253,0.4), transparent 60%); pointer-events:none; }

.subtask-holder { margin-bottom: 4px; }
.subtask-holder form { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }

.article-container { max-width: 1000px; }
#articles-root.article-container { max-width: 1180px; }
.article-meta { display: grid; gap: 8px; margin-bottom: 20px; padding: 16px; border-radius: 12px; border: 1px solid rgba(148,163,184,0.35); background: rgba(15,23,42,0.35); }
.article-categories { display: flex; flex-wrap: wrap; gap: 6px; }
.article-category { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: rgba(59,130,246,0.2); border: 1px solid rgba(96,165,250,0.4); font-size: 0.8rem; letter-spacing: 0.2px; text-transform: uppercase; color: rgba(191,219,254,0.85); }
.article-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.article-tag { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; background: rgba(59,130,246,0.2); border: 1px solid rgba(96,165,250,0.4); font-size: 0.8rem; letter-spacing: 0.2px; }
.article-excerpt { margin: 0; color: var(--muted); }

/* Article h2 spacing */
article h2 { margin-top: 48px; margin-bottom: 16px; }
article h2:first-child { margin-top: 0; }

/* Convert interactive-list checkboxes to bullet points */
.interactive-list { list-style: disc; padding-left: 24px; margin: 12px 0 20px; border: 1px solid rgba(148,163,184,0.35); border-radius: 10px; background: rgba(30,41,59,0.35); padding: 16px 16px 16px 40px; }
.interactive-list li { border-bottom: 1px solid rgba(148,163,184,0.2); padding: 10px 0; }
.interactive-list li:last-child { border-bottom: none; }
.interactive-list li::marker { color: rgba(96,165,250,0.8); }
.interactive-list label { display: block; cursor: default; }
.interactive-list input[type="checkbox"] { display: none; }
.interactive-list span { display: inline; }

.article-hero { margin: 18px 0; border-radius: 14px; overflow: hidden; }
.article-hero img { width: 100%; height: auto; display: block; }

.article-listing-header { margin-bottom: 24px; display: grid; gap: 6px; }
.article-list { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .article-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .article-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.article-card { border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 16px; background: rgba(15,15,15,0.5); display: flex; flex-direction: column; gap: 12px; }
.article-card-hero { margin: -16px -16px 0; border-radius: 14px 14px 0 0; overflow: hidden; }
.article-card-hero img { width: 100%; height: auto; display: block; }
.article-card-header { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.article-card-header h2 { margin: 0; font-size: 1.2rem; }
.article-card-header a { color: inherit; text-decoration: none; }
.article-card-header a:hover { text-decoration: underline; }
.article-card-categories { display: flex; flex-wrap: wrap; gap: 6px; }
.article-card-category { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.3px; color: rgba(191,219,254,0.8); border: 1px solid rgba(147,197,253,0.4); border-radius: 999px; padding: 2px 8px; cursor: pointer; background: rgba(59,130,246,0.18); }
.article-card-category:hover { border-color: rgba(191,219,254,0.8); }
.article-card-excerpt { margin: 0; color: var(--muted); }
.article-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.article-card-footer { display: flex; justify-content: flex-start; }

.article-table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.article-table th,
.article-table td { border: 1px solid rgba(148,163,184,0.35); padding: 10px 12px; text-align: left; }
.article-table th { background: rgba(30,41,59,0.45); font-weight: 600; }
.article-table tbody tr:nth-child(odd) { background: rgba(15,23,42,0.2); }

.article-filter { display: grid; gap: 4px; max-width: 240px; }
.article-category-filter { width: 100%; }

.invoice-breakdown-list { display: grid; gap: 12px; }
.invoice-breakdown-item {
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15,23,42,0.28);
}
.invoice-breakdown-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.invoice-breakdown-details {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}
.invoice-breakdown-details li { margin: 0; }

.projected-cost-summary p { margin: 0 0 6px; }
.projected-cost-breakdown { display: grid; gap: 10px; }
.projected-cost-item {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(15,23,42,0.22);
  padding: 10px 12px;
}

.staging-list { display: grid; gap: 12px; }
.staging-item {
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 12px;
  background: rgba(15,23,42,0.3);
}
.staging-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.staging-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.staging-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: inline-block;
}

/* Modal Styles */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 20px;
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(4px);
  z-index: 1000;
}

.modal-content {
  background: rgba(15,15,15,0.96);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: min(600px, 94vw);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.1);
}

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

.preview-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 30px 20px;
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(4px);
  z-index: 1000;
}
.preview-modal {
  background: rgba(17,24,39,0.94);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: min(1000px, 94vw);
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
}
.preview-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.preview-modal-header strong { font-size: 1.1rem; }
.preview-modal .btn { flex-shrink: 0; }
.preview-frame {
  flex: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(15,23,42,0.8);
  min-height: 60vh;
}
.preview-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}

@keyframes lightningPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(96,165,250,0.25); }
  45% { box-shadow: 0 0 22px rgba(147,197,253,0.45); }
  55% { box-shadow: 0 0 16px rgba(129,140,248,0.35); }
}

@keyframes lightningFlash {
  0%, 12%, 100% { opacity: 0; }
  6% { opacity: 0.9; }
  7% { opacity: 0.2; }
  8% { opacity: 0.7; }
}

.btn-lightning {
  animation: lightningPulse 3s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(96,165,250,0.2), rgba(129,140,248,0.2));
  border-color: rgba(96,165,250,0.4);
  position: relative;
  overflow: hidden;
}

.btn-lightning::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(147,197,253,0.3), rgba(129,140,248,0.3));
  animation: lightningFlash 4s ease-in-out infinite;
  pointer-events: none;
}

.btn-lightning:hover {
  box-shadow: 0 0 25px rgba(96,165,250,0.5);
  border-color: rgba(96,165,250,0.6);
}

/* Rating buttons */
.rating-buttons {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.rating-btn {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.6;
  font-size: 1rem;
  color: inherit;
}

.rating-btn:hover {
  opacity: 0.9;
  border-color: rgba(255,255,255,0.3);
  transform: scale(1.05);
  background: rgba(0,0,0,0.4);
}

.rating-btn.selected {
  opacity: 1;
  transform: scale(1.1);
  border-color: rgba(96,165,250,0.6);
  background: rgba(96,165,250,0.15);
  box-shadow: 0 0 12px rgba(96,165,250,0.4);
}

@media (max-width: 720px) {
  .task-row .task-content { flex-direction: column; align-items: flex-start; gap: 10px; }
  .task-row .task-content > div:last-child { width: 100%; display: flex; flex-wrap: wrap; gap: 6px; }
  .task-row .task-content button { flex: 1; min-width: 70px; }
  .row.between { flex-direction: column; align-items: flex-start; gap: 12px; }
  .input { width: 100%; }
  .input-compact { min-width: 100px; }
  .input-pair { flex-wrap: wrap; }
  .input-pair .input:first-child { flex: 1 1 100%; }
  .input-pair .input-compact { flex: 0 0 auto; margin-top: 8px; }
  .grid.features { grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); }
  table.responsive-table,
  table.responsive-table thead,
  table.responsive-table tbody,
  table.responsive-table th,
  table.responsive-table td,
  table.responsive-table tr { display: block; width: 100%; }
  table.responsive-table thead { display: none; }
  table.responsive-table tr { border-bottom: 1px solid var(--line); margin-bottom: 12px; padding-bottom: 12px; }
  table.responsive-table td { padding: 6px 0 !important; text-align: left !important; }
}

/* Notices */
.notice { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.notice-success { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.35); color: #b7f7da; }
.notice-success .muted { color: #d1fae5; }

/* Chips / meta */
.meta { color: var(--muted); font-size: 0.9rem; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); font-size: 0.85rem; }
.chip-deadline { border-color: #4b4e6b; }
.chip-ok { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.35); color: #b7f7da; }
.chip-warn { background: rgba(245,158,11,0.12); border-color: rgba(245,158,11,0.35); color: #fde68a; }
.chip-danger { background: rgba(239,68,68,0.14); border-color: rgba(239,68,68,0.35); color: #fecaca; }
.team-chip { cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease; }
.team-chip[disabled] { opacity: 0.55; cursor: not-allowed; }
.team-chip--active { background: rgba(139,92,246,0.18); border-color: rgba(139,92,246,0.55); color: #c4b5fd; }

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

.toggle-switch input[type="checkbox"] {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-label {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #374151;
  border-radius: 24px;
  transition: background-color 0.2s;
}

.toggle-label:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle-switch input:checked + .toggle-label {
  background-color: #10b981;
}

.toggle-switch input:checked + .toggle-label:before {
  transform: translateX(26px);
}

.toggle-switch input:focus + .toggle-label {
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Responsive */
@media (max-width: 960px) {
  .grid.features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-grid { grid-template-columns: 1fr; }
  .grid-split,
  .grid-sidebar { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  /* Owner portal header responsive */
  .row.between.center {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .row.between.center .btn {
    align-self: center;
  }
}
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 8px;
    margin-top: 12px;
    min-width: 200px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
  }

  .nav-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-menu a {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
  }
}

@media (max-width: 560px) {
  .site-header .row { flex-wrap: wrap; gap: 8px; }
  .brand .brand-text { font-size: 0.95rem; }
  .hero { padding: 72px 0 40px; }
  .grid.features { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: stretch; }

  /* Container padding for mobile */
  .container {
    padding: 0 16px;
  }

  /* Cards on mobile */
  .card {
    padding: 16px;
  }

  /* KPI cards on mobile */
  .card h3 {
    font-size: 1.1rem;
  }

  /* Forms responsive */
  .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .row[style*="gap"] {
    flex-direction: column;
  }

  /* Tables on mobile */
  table {
    font-size: 0.9rem;
  }

  /* Buttons stack on mobile */
  .btn {
    width: 100%;
    justify-content: center;
  }

  /* Timer responsive */
  .toggle-switch {
    width: 40px;
    height: 20px;
  }
  .toggle-label:before {
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
  }
  .toggle-switch input:checked + .toggle-label:before {
    transform: translateX(20px);
  }

  /* Charts on mobile */
  canvas {
    max-height: 250px !important;
  }

  /* Hide long text on mobile, show ... */
  .menu-card h3 {
    font-size: 1.2rem;
  }
  .menu-card p {
    font-size: 0.9rem;
  }
}

/* Chat-style FAQ interface */
.chat-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  border-radius: 16px;
  background: rgba(13, 16, 36, 0.6);
  border: 1px solid rgba(147, 197, 253, 0.2);
}

.chat-message {
  margin-bottom: 24px;
  display: flex;
  animation: slideIn 0.6s ease-out;
}

.chat-message.user-message {
  justify-content: flex-end;
}

.chat-message.bot-message {
  justify-content: flex-start;
}

.message-content {
  max-width: 70%;
  padding: 16px 20px;
  border-radius: 20px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.user-message .message-content {
  background: linear-gradient(135deg, rgba(129, 140, 248, 0.9), rgba(96, 165, 250, 0.8));
  color: white;
  border-bottom-right-radius: 6px;
}

.user-message .message-content:hover {
  background: linear-gradient(135deg, rgba(129, 140, 248, 1), rgba(96, 165, 250, 0.9));
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(129, 140, 248, 0.4);
}

.bot-message .message-content {
  background: rgba(30, 41, 59, 0.8);
  color: var(--text);
  border: 1px solid rgba(147, 197, 253, 0.3);
  border-bottom-left-radius: 6px;
}

.message-text {
  display: block;
  font-size: 16px;
  line-height: 1.5;
}

.bot-message .message-text {
  opacity: 0;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin: 0 12px;
  flex-shrink: 0;
}

.user-message .message-avatar {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(168, 85, 247, 0.6));
  order: 2;
}

.bot-message .message-avatar {
  background: linear-gradient(135deg, rgba(147, 197, 253, 0.8), rgba(129, 140, 248, 0.6));
}

.typing-indicator {
  display: none;
  align-items: center;
  gap: 6px;
  color: rgba(203, 213, 233, 0.6);
  font-style: italic;
}

.typing-indicator.active {
  display: flex;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(129, 140, 248, 0.6);
  animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

.cursor {
  display: inline-block;
  width: 2px;
  height: 20px;
  background: var(--text);
  margin-left: 2px;
  animation: blink 1s infinite;
}

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

@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-8px); }
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.typewriter {
  overflow: hidden;
}

/* Hide original FAQ sections during chat mode */
.chat-active .faq-group {
  display: none;
}

/* Google Calendar Button Override */
.calendar-scheduling-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  height: 46px !important;
  padding: 0 20px !important;
  border-radius: 14px !important;
  border: 1px solid transparent !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  letter-spacing: 0.25px !important;
  font-size: 16px !important;
  transition: transform 0.06s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;

  /* Primary button styling */
  color: #ffffff !important;
  background: linear-gradient(135deg, #8b5cf6 0%, #c084fc 50%, #8b5cf6 100%) !important;
  border-color: rgba(192, 132, 252, 0.65) !important;
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.45) !important;

  /* Override any Google defaults */
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif !important;
}

/* Ensure text inside the button is also white */
.calendar-scheduling-button span,
.calendar-scheduling-button div {
  color: #ffffff !important;
}

.calendar-scheduling-button:hover {
  filter: brightness(1.05) !important;
  box-shadow: 0 22px 54px rgba(129, 140, 248, 0.55) !important;
  transform: translateY(-1px) !important;
}

.calendar-scheduling-button:active {
  transform: translateY(0) !important;
}

/* Reusable Calendar Button Component */
.ld-calendar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.25px;
  font-size: 16px;
  transition: transform 0.06s ease, filter 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;

  /* Primary button styling */
  color: #0f022c;
  background: linear-gradient(135deg, #f8fafc 0%, #c084fc 45%, #8b5cf6 100%);
  border-color: rgba(192, 132, 252, 0.65);
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.45);

  /* Font */
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

.ld-calendar-button:hover {
  filter: brightness(1.05);
  box-shadow: 0 22px 54px rgba(129, 140, 248, 0.55);
  transform: translateY(-1px);
}

.ld-calendar-button:active {
  transform: translateY(0);
}
