/* ================================================================
   TRADEN — styles.css
   Fonts: Cormorant Garamond (serif) · Inter (sans)
   Palette: #070707 base · #CCFF00 lime · #00F5FF cyan · #FF1F6A magenta
   ================================================================ */

/* ── 1. CUSTOM PROPERTIES ───────────────────────────────────────── */
:root {
  /* Core */
  --black:      #070707;
  --off-black:  #0d0d0d;
  --card:       #111111;
  --card-hover: #161616;
  --border:     #1e1e1e;
  --border-lit: #2c2c2c;
  --white:      #F0EFE8;
  --white-60:   rgba(240,239,232,0.6);
  --white-70:   rgba(240,239,232,0.7);
  --white-65:   rgba(240,239,232,0.65);
  --white-55:   rgba(240,239,232,0.55);
  --white-52:   rgba(240,239,232,0.52);
  --white-50:   rgba(240,239,232,0.5);
  --white-48:   rgba(240,239,232,0.48);
  --white-45:   rgba(240,239,232,0.45);
  --white-30:   rgba(240,239,232,0.3);
  --grey:       #4a4a4a;

  /* Fluorescent accents — injected deliberately */
  --lime:       #CCFF00;   /* Primary CTA, numbers, underlines  */
  --lime-glow:  rgba(204,255,0,0.18);
  --lime-dim:   rgba(204,255,0,0.08);
  --cyan:       #00F5FF;   /* Feature icons, step 2             */
  --cyan-glow:  rgba(0,245,255,0.15);
  --magenta:    #FF1F6A;   /* AutoPilot badge, step 3 — sparingly */
  --magenta-glow: rgba(255,31,106,0.15);
  --wa-green:   #25D366;

  /* Fonts */
  --serif: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --sans:  'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Type scale (fluid) */
  --t-xs:   clamp(0.68rem, 1vw,    0.75rem);
  --t-sm:   clamp(0.82rem, 1.2vw,  0.9rem);
  --t-base: clamp(0.95rem, 1.4vw,  1rem);
  --t-lg:   clamp(1.05rem, 1.7vw,  1.2rem);
  --t-xl:   clamp(1.2rem,  2vw,    1.45rem);
  --t-2xl:  clamp(1.5rem,  2.6vw,  2rem);
  --t-3xl:  clamp(2rem,    4vw,    3.2rem);
  --t-hero: clamp(3.2rem,  7.5vw,  7rem);

  /* Spacing */
  --s1: 0.25rem;  --s2: 0.5rem;   --s3: 0.75rem;
  --s4: 1rem;     --s6: 1.5rem;   --s8: 2rem;
  --s10: 2.5rem;  --s12: 3rem;    --s16: 4rem;
  --s20: 5rem;    --s24: 6rem;    --s32: 8rem;

  /* Layout */
  --max: 1260px;
  --nav-h: 70px;

  /* Radius */
  --r-sm: 6px;    --r-md: 12px;
  --r-lg: 18px;   --r-xl: 28px;   --r-full: 9999px;

  /* Shadows */
  --sh-sm:   0 2px 10px rgba(0,0,0,0.5);
  --sh-md:   0 8px 32px rgba(0,0,0,0.55);
  --sh-lg:   0 24px 64px rgba(0,0,0,0.65);
  --sh-lime: 0 0 48px var(--lime-glow);
  --sh-cyan: 0 0 40px var(--cyan-glow);

  --ease:       cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:   cubic-bezier(0, 0, 0.2, 1);
  --ease-spring:cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur:        0.28s;
  --dur-slow:   0.55s;
}

/* ── 2. RESET ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--black);
  color: var(--white);
  font-family: var(--sans);
  font-size: var(--t-base);
  line-height: 1.72;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  cursor: none;
}

body:has(.workspace-shell) .nav,
body:has(.workspace-shell) .footer {
  display: none;
}

@media (hover: none), (pointer: coarse) {
  body { cursor: auto; }
  button { cursor: auto; }
  .c-dot, .c-ring { display: none !important; }
}

a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: none; border: none; background: none; font-family: inherit; }
img, svg { display: block; max-width: 100%; }

/* ── 3. CUSTOM CURSOR ───────────────────────────────────────────── */
.c-dot, .c-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 99999;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
}
.c-dot {
  width: 7px; height: 7px;
  background: var(--lime);
  transition: transform 0.03s var(--ease), background 0.2s;
}
.c-ring {
  width: 22px; height: 22px;
  border: 1.5px solid rgba(204,255,0,0.45);
  transition: width 0.22s var(--ease), height 0.22s var(--ease),
              border-color 0.22s, opacity 0.3s;
}
.c-ring.expanded {
  width: 62px; height: 62px;
  border-color: var(--lime);
  background: rgba(204,255,0,0.04);
}
.c-dot.hidden, .c-ring.hidden { opacity: 0; }

/* ── 4. LAYOUT UTILITIES ────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--s6);
}
@media (max-width: 640px) { .container { padding: 0 var(--s4); } }

.u-flex { display: flex; }
.u-inline-flex { display: inline-flex; }
.u-flex-col { display: flex; flex-direction: column; }
.u-items-center { align-items: center; }
.u-items-start { align-items: flex-start; }
.u-justify-center { justify-content: center; }
.u-justify-between { justify-content: space-between; }
.u-wrap { flex-wrap: wrap; }
.u-gap-1 { gap: 0.25rem; }
.u-gap-2 { gap: 0.5rem; }
.u-gap-3 { gap: 0.75rem; }
.u-gap-4 { gap: 1rem; }
.u-gap-6 { gap: 1.5rem; }
.u-mt-0 { margin-top: 0; }
.u-mt-1 { margin-top: 0.25rem; }
.u-mt-2 { margin-top: 0.5rem; }
.u-mt-3 { margin-top: 0.75rem; }
.u-mt-4 { margin-top: 1rem; }
.u-mt-6 { margin-top: 1.5rem; }
.u-mt-8 { margin-top: 2rem; }
.u-mb-0 { margin-bottom: 0; }
.u-mb-1 { margin-bottom: 0.25rem; }
.u-mb-2 { margin-bottom: 0.5rem; }
.u-mb-3 { margin-bottom: 0.75rem; }
.u-mb-4 { margin-bottom: 1rem; }
.u-mb-6 { margin-bottom: 1.5rem; }
.u-mb-8 { margin-bottom: 2rem; }
.u-m-0 { margin: 0; }
.u-p-0 { padding: 0; }
.u-px-0 { padding-left: 0; padding-right: 0; }
.u-px-4 { padding-left: 1rem; padding-right: 1rem; }
.u-px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.u-py-0 { padding-top: 0; padding-bottom: 0; }
.u-py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.u-py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.u-w-full { width: 100%; }
.u-text-center { text-align: center; }
.u-text-left { text-align: left; }
.u-text-right { text-align: right; }
.u-mx-auto { margin-left: auto; margin-right: auto; }
.u-ml-1 { margin-left: 0.35rem; }
.u-ml-2 { margin-left: 0.5rem; }
.u-d-block { display: block; }
.u-d-inline-block { display: inline-block; }
.u-no-border { border: 0 !important; }
.u-border-lime { border-color: rgba(204,255,0,0.22) !important; }
.u-border-magenta { border-color: rgba(255,31,106,0.18) !important; }
.u-text-grey { color: var(--grey); }
.u-text-lime { color: var(--lime); }
.u-text-magenta { color: var(--magenta); }
.u-opacity-60 { opacity: .6; }
.u-cursor-not-allowed { cursor: not-allowed; }

.workspace-hidden { display: none !important; }
.nav__plan-pill { margin-right: var(--s2); }
.btn--full { width: 100%; }
.footer__brand-link { margin-bottom: var(--s4); display: inline-flex; }
.mobile-nav__logout { margin-top: var(--s4); }
.workspace-section-label--spaced { margin-top: 1.5rem; }

.workspace-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

.workspace-card__body {
  padding: var(--s6);
}

.workspace-panel {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--s6);
  margin-top: var(--s6);
}

.workspace-panel__title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.workspace-panel__subtitle {
  font-size: 0.82rem;
  color: rgba(240,239,232,0.55);
}

.workspace-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.workspace-actions--top {
  margin-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
}

.workspace-actions--tight .btn-card {
  padding: 0.3rem 0.75rem;
}

.workspace-textarea {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  border: 1px solid rgba(255,255,255,0.12);
  background: #151515;
  color: #f0efe8;
  resize: vertical;
  font-family: inherit;
}

.workspace-select {
  padding: 0.25rem 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: #1a1a1a;
  color: #f0efe8;
  font-size: 0.82rem;
}

.workspace-label {
  color: rgba(240,239,232,0.6);
}

.workspace-list {
  margin: 1rem 0 0;
  padding-left: 1rem;
  font-size: 0.8rem;
}

.workspace-list li + li {
  margin-top: 0.4rem;
}

.workspace-subtitle {
  margin: 1rem 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
}

.workspace-title {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.metric-value--lg {
  font-size: 1.35rem;
  line-height: 1.15;
}

.align-right { text-align: right; }
.align-center { text-align: center; }
.card-max-w-860 { max-width: 860px; }
.panel--danger {
  border-color: rgba(255,31,106,0.18);
}
.panel__head--danger {
  border-color: rgba(255,31,106,0.12);
}
.panel__title--danger {
  color: var(--magenta);
}
.panel__title-dot--cyan {
  background: var(--cyan);
}
.panel__title-dot--magenta {
  background: var(--magenta);
}
.panel__content-stack {
  padding: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.panel__action-stack {
  padding: var(--s4) var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.panel__action-block {
  text-align: left;
  display: block;
}
.service-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}
.service-help {
  margin-top: 0;
}
.service-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.auth-social--spaced {
  margin-bottom: var(--s4);
}
.subscribe-note {
  color: var(--grey);
  margin-left: .35rem;
}
.pricing-grid--spaced {
  margin-bottom: var(--s4);
}
.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
}
.mini-summary {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.mini-summary__item {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--border);
}
.mini-summary__label {
  font-size: var(--t-xs);
  color: var(--grey);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.mini-summary__value {
  font-size: var(--t-sm);
  text-align: right;
}
.profile-actions {
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}
.profile-hero__title {
  font-size: var(--t-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--s3);
}
.profile-hero__sub {
  color: var(--white-60);
  line-height: 1.7;
  max-width: 760px;
}
.profile-stack,
.services-stack {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.calendar-empty__icon {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

.calendar-empty__title {
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.calendar-empty__copy {
  margin-bottom: 1.5rem;
  color: rgba(240,239,232,.6);
}

.calendar-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.calendar-week-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar-week-nav__btn,
.calendar-week-nav__today {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
}

.calendar-week-nav__btn {
  width: 34px;
}

.calendar-week-nav__today {
  padding: 0 10px;
  font-size: 0.76rem;
}

.calendar-week-nav__label {
  display: grid;
  gap: 1px;
  min-width: 118px;
  text-align: center;
}

.calendar-week-nav__label span {
  color: var(--white-45);
  font-size: 0.66rem;
  font-weight: 760;
  text-transform: uppercase;
}

.calendar-week-nav__label strong {
  color: var(--white);
  font-size: 0.84rem;
  line-height: 1.2;
}

.calendar-metric-grid {
  margin-top: 18px;
}

.calendar-sync-form {
  margin: 0;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.calendar-board,
.calendar-sync-card {
  min-width: 0;
}

.calendar-list {
  display: grid;
  gap: 14px;
}

.calendar-day {
  padding: 14px 14px 8px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
}

.calendar-day__head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.calendar-day__label {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 750;
  line-height: 1.25;
}

.calendar-day__meta {
  margin-top: 3px;
  color: var(--white-50);
  font-size: 0.76rem;
  line-height: 1.35;
}

.calendar-day__events {
  display: grid;
  gap: 8px;
}

.calendar-event {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.06);
}

.calendar-event--conflict {
  border-color: rgba(255,31,106,0.34);
  background: rgba(255,31,106,0.055);
}

.calendar-event__time {
  display: grid;
  gap: 2px;
  color: var(--lime);
  font-weight: 800;
  line-height: 1.2;
}

.calendar-event__start {
  font-size: 0.88rem;
}

.calendar-event__end {
  color: var(--white-45);
  font-size: 0.72rem;
}

.calendar-event__body {
  min-width: 0;
}

.calendar-event__title {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 720;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.calendar-event__meta {
  margin-top: 3px;
  color: var(--white-55);
  font-size: 0.76rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.calendar-event__badges {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.calendar-board--week .app-card__body {
  padding: 0;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--white-55);
  font-size: 0.76rem;
  font-weight: 700;
}

.calendar-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend__swatch {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

.calendar-legend__swatch--traden {
  background: var(--lime);
  box-shadow: 0 0 12px rgba(204,255,0,0.35);
}

.calendar-legend__swatch--external {
  background: var(--cyan);
}

.calendar-week {
  --time-col: 58px;
  --hour-height: 76px;
  --half-hour-height: 38px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calendar-week__head {
  display: grid;
  grid-template-columns: var(--time-col) repeat(7, minmax(104px, 1fr));
  min-width: 840px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(0,0,0,0.16);
}

.calendar-week__corner {
  border-right: 1px solid rgba(255,255,255,0.08);
}

.calendar-week__day {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 54px;
  padding: 10px 12px;
  border-right: 1px solid rgba(255,255,255,0.07);
  color: var(--white-55);
  font-size: 0.74rem;
  font-weight: 800;
}

.calendar-week__day strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--white);
  background: rgba(255,255,255,0.055);
}

.calendar-week__day--today strong {
  color: var(--black);
  background: var(--lime);
}

.calendar-week__body {
  display: grid;
  grid-template-columns: var(--time-col) minmax(782px, 1fr);
  min-width: 840px;
}

.calendar-week__times {
  display: grid;
  grid-template-rows: repeat(12, var(--hour-height));
  border-right: 1px solid rgba(255,255,255,0.08);
}

.calendar-week__time {
  padding: 8px 10px 0 0;
  color: var(--white-45);
  font-size: 0.7rem;
  font-weight: 750;
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.055);
}

.calendar-week__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  height: 912px;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px) 0 0 / calc(100% / 7) 100%,
    repeating-linear-gradient(0deg, rgba(255,255,255,0.055) 0 1px, transparent 1px 76px),
    rgba(255,255,255,0.012);
}

.calendar-week__column {
  min-width: 0;
}

.calendar-week__line {
  display: none;
}

.calendar-block {
  position: absolute;
  left: 5px;
  top: 0;
  width: calc((100% / 7) - 10px);
  min-height: 34px;
  height: 38px;
  overflow: hidden;
  padding: 8px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}

button.calendar-block {
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-block--day-0 { left: calc((100% / 7) * 0 + 5px); }
.calendar-block--day-1 { left: calc((100% / 7) * 1 + 5px); }
.calendar-block--day-2 { left: calc((100% / 7) * 2 + 5px); }
.calendar-block--day-3 { left: calc((100% / 7) * 3 + 5px); }
.calendar-block--day-4 { left: calc((100% / 7) * 4 + 5px); }
.calendar-block--day-5 { left: calc((100% / 7) * 5 + 5px); }
.calendar-block--day-6 { left: calc((100% / 7) * 6 + 5px); }

.calendar-block--slot-0 { top: calc(var(--half-hour-height) * 0); }
.calendar-block--slot-1 { top: calc(var(--half-hour-height) * 1); }
.calendar-block--slot-2 { top: calc(var(--half-hour-height) * 2); }
.calendar-block--slot-3 { top: calc(var(--half-hour-height) * 3); }
.calendar-block--slot-4 { top: calc(var(--half-hour-height) * 4); }
.calendar-block--slot-5 { top: calc(var(--half-hour-height) * 5); }
.calendar-block--slot-6 { top: calc(var(--half-hour-height) * 6); }
.calendar-block--slot-7 { top: calc(var(--half-hour-height) * 7); }
.calendar-block--slot-8 { top: calc(var(--half-hour-height) * 8); }
.calendar-block--slot-9 { top: calc(var(--half-hour-height) * 9); }
.calendar-block--slot-10 { top: calc(var(--half-hour-height) * 10); }
.calendar-block--slot-11 { top: calc(var(--half-hour-height) * 11); }
.calendar-block--slot-12 { top: calc(var(--half-hour-height) * 12); }
.calendar-block--slot-13 { top: calc(var(--half-hour-height) * 13); }
.calendar-block--slot-14 { top: calc(var(--half-hour-height) * 14); }
.calendar-block--slot-15 { top: calc(var(--half-hour-height) * 15); }
.calendar-block--slot-16 { top: calc(var(--half-hour-height) * 16); }
.calendar-block--slot-17 { top: calc(var(--half-hour-height) * 17); }
.calendar-block--slot-18 { top: calc(var(--half-hour-height) * 18); }
.calendar-block--slot-19 { top: calc(var(--half-hour-height) * 19); }
.calendar-block--slot-20 { top: calc(var(--half-hour-height) * 20); }
.calendar-block--slot-21 { top: calc(var(--half-hour-height) * 21); }
.calendar-block--slot-22 { top: calc(var(--half-hour-height) * 22); }
.calendar-block--slot-23 { top: calc(var(--half-hour-height) * 23); }

.calendar-block--span-1 { height: calc(var(--half-hour-height) * 1); }
.calendar-block--span-2 { height: calc(var(--half-hour-height) * 2); }
.calendar-block--span-3 { height: calc(var(--half-hour-height) * 3); }
.calendar-block--span-4 { height: calc(var(--half-hour-height) * 4); }
.calendar-block--span-5 { height: calc(var(--half-hour-height) * 5); }
.calendar-block--span-6 { height: calc(var(--half-hour-height) * 6); }
.calendar-block--span-7 { height: calc(var(--half-hour-height) * 7); }
.calendar-block--span-8 { height: calc(var(--half-hour-height) * 8); }
.calendar-block--span-9 { height: calc(var(--half-hour-height) * 9); }
.calendar-block--span-10 { height: calc(var(--half-hour-height) * 10); }
.calendar-block--span-11 { height: calc(var(--half-hour-height) * 11); }
.calendar-block--span-12 { height: calc(var(--half-hour-height) * 12); }
.calendar-block--span-13 { height: calc(var(--half-hour-height) * 13); }
.calendar-block--span-14 { height: calc(var(--half-hour-height) * 14); }
.calendar-block--span-15 { height: calc(var(--half-hour-height) * 15); }
.calendar-block--span-16 { height: calc(var(--half-hour-height) * 16); }
.calendar-block--span-17 { height: calc(var(--half-hour-height) * 17); }
.calendar-block--span-18 { height: calc(var(--half-hour-height) * 18); }
.calendar-block--span-19 { height: calc(var(--half-hour-height) * 19); }
.calendar-block--span-20 { height: calc(var(--half-hour-height) * 20); }
.calendar-block--span-21 { height: calc(var(--half-hour-height) * 21); }
.calendar-block--span-22 { height: calc(var(--half-hour-height) * 22); }
.calendar-block--span-23 { height: calc(var(--half-hour-height) * 23); }
.calendar-block--span-24 { height: calc(var(--half-hour-height) * 24); }

.calendar-block--traden {
  border-color: rgba(204,255,0,0.36);
  background: linear-gradient(135deg, rgba(204,255,0,0.22), rgba(204,255,0,0.08));
}

.calendar-block--external {
  border-color: rgba(0,245,255,0.24);
  background: linear-gradient(135deg, rgba(0,245,255,0.16), rgba(255,255,255,0.045));
}

.calendar-block--conflict {
  border-color: rgba(255,31,106,0.55);
  box-shadow: 0 0 0 1px rgba(255,31,106,0.22), 0 14px 28px rgba(0,0,0,0.26);
}

.calendar-block__time {
  color: var(--white-70);
  font-size: 0.64rem;
  font-weight: 800;
  line-height: 1.2;
}

.calendar-block__title {
  margin-top: 4px;
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.calendar-block__meta {
  margin-top: 3px;
  color: var(--white-60);
  font-size: 0.66rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.calendar-block__badges {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.calendar-block__badges span {
  display: inline-flex;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(0,0,0,0.22);
  color: var(--white-70);
  font-size: 0.58rem;
  font-weight: 800;
}

.calendar-mobile-list {
  display: none;
}

.calendar-mobile-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

button.calendar-mobile-event {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-mobile-event--traden {
  border-left: 3px solid var(--lime);
}

.calendar-mobile-event--external {
  border-left: 3px solid var(--cyan);
}

.calendar-mobile-event__time {
  color: var(--white-55);
  font-size: 0.7rem;
  font-weight: 800;
}

.calendar-mobile-event__title {
  margin-top: 4px;
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
}

.calendar-mobile-event__meta {
  margin-top: 3px;
  color: var(--white-55);
  font-size: 0.74rem;
}

.calendar-mobile-event > span {
  align-self: start;
  color: var(--white-60);
  font-size: 0.68rem;
  font-weight: 800;
}

.calendar-history {
  min-width: 0;
}

.calendar-history__list {
  display: grid;
}

.calendar-history__row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.065);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-history__row:first-child {
  border-top: 0;
}

.calendar-history__row:hover {
  background: rgba(255,255,255,0.03);
}

.calendar-history__row span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.calendar-history__row strong {
  color: var(--white);
  font-size: 0.82rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-history__row small {
  color: var(--white-45);
  font-size: 0.72rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-history__row time {
  flex: 0 0 auto;
  color: var(--white-45);
  font-size: 0.72rem;
  font-weight: 800;
}

.calendar-sync {
  display: grid;
  gap: 12px;
}

.calendar-sync__line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.calendar-sync__line:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.calendar-sync__label {
  color: var(--white-55);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.calendar-sync__value {
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
}

.error-code {
  background: var(--lime);
  color: var(--black);
}

.error-code--cyan {
  background: var(--cyan);
  color: var(--black);
}

.error-code--magenta {
  background: var(--magenta);
  color: white;
}
.service-table-wrap {
  overflow-x: auto;
}
.service-table {
  width: 100%;
  border-collapse: collapse;
}
.service-table th,
.service-table td {
  padding: var(--s3);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  vertical-align: top;
}

.workspace-muted {
  color: rgba(240,239,232,0.4);
  font-size: 0.82rem;
}

.workspace-feedback {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  min-height: 1rem;
}

.workspace-feedback--success { color: var(--lime); }
.workspace-feedback--error { color: var(--magenta); }

.btn-card--compact {
  padding: 0.3rem 0.75rem;
}

/* ── 5. TYPOGRAPHY ──────────────────────────────────────────────── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: var(--s4);
}
.section-label::before {
  content: '';
  display: block;
  width: 18px; height: 1.5px;
  background: var(--lime);
}

.section-title {
  font-size: var(--t-3xl);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin-bottom: var(--s4);
}
.section-title em {
  font-family: var(--serif);
  font-weight: 800;
  font-style: normal;
  font-size: 1em;
  letter-spacing: inherit;
  line-height: 1.15;
  display: inline-block;
  padding-bottom: 0.04em;
}

.section-sub {
  font-size: var(--t-lg);
  color: var(--white-60);
  max-width: 520px;
  line-height: 1.7;
  text-align: center;
  margin: 0 auto;
}

/* ── 6. NAVIGATION ──────────────────────────────────────────────── */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 900;
  transition: background var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform 0.4s var(--ease);
  border-bottom: 1px solid transparent;
  overflow: visible;
}
.nav.scrolled {
  background: rgba(7,7,7,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border);
}
.nav.hidden { transform: translateY(-100%); }

.nav__inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: var(--s8);
}

/* Logo */
.nav__logo {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-shrink: 0;
}
.nav__logo-mark {
  width: 34px; height: 34px;
  background: var(--lime);
  color: var(--black);
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  flex-shrink: 0;
}
.nav__logo-text {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.public-logo-mark {
  display: block;
  width: 34px;
  height: 34px;
  object-fit: contain;
  flex: 0 0 auto;
}

/* Links */
.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s6);
  margin-left: auto;
}
.nav__links a {
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--white-60);
  position: relative;
  transition: color var(--dur);
  /* NEW: Give the text box more vertical room */
  line-height: 1.5; 
  display: inline-block;
  padding: 5px 0;
}
.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--lime);
  transition: width var(--dur) var(--ease);
}
.nav__links a:hover { color: var(--white); }
.nav__links a:hover::after { width: 100%; }

/* Actions */
.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
}

.nav__actions--flush-right {
  margin-left: auto;
}

/* Burger */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--s2);
  margin-left: auto;
}
.nav__burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur);
}
.nav__burger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__burger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__burger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  background: var(--black);
  border-top: 1px solid var(--border);
  z-index: 899;
  padding: var(--s8) var(--s6);
  flex-direction: column;
  gap: 0;
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.mobile-nav.open {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.mobile-nav a {
  font-size: var(--t-xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  padding: var(--s4) 0;
  border-bottom: 1px solid var(--border);
  color: var(--white-60);
  transition: color var(--dur);
}
.mobile-nav a:hover { color: var(--white); }
.mobile-nav .btn { margin-top: var(--s6); width: 100%; justify-content: center; }
.mobile-nav .btn--primary { color: var(--black); }
.mobile-nav .btn--ghost { color: var(--white); }

@media (max-width: 900px) {
  .nav__links, .nav__actions { display: none; }
  .nav__burger { display: flex; }
}

/* ── 7. BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0.72em 1.6em;
  font-family: var(--sans);
  font-size: var(--t-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  border-radius: var(--r-sm);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  transition: background var(--dur) var(--ease),
              color var(--dur) var(--ease),
              transform var(--dur) var(--ease-spring),
              box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.btn--primary {
  background: var(--lime);
  color: var(--black);
  border: 1px solid transparent;
}
.btn--primary:hover {
  background: #d9ff1a;
  box-shadow: var(--sh-lime);
  transform: translateY(-2px);
}
.btn--ghost {
  background: transparent;
  color: var(--white-60);
  border: 1px solid var(--border-lit);
}
.btn--ghost:hover {
  color: var(--white);
  border-color: rgba(240,239,232,0.3);
  background: rgba(255,255,255,0.04);
}
.btn--outline-lime {
  background: transparent;
  color: var(--lime);
  border: 1px solid var(--lime);
}
.btn--outline-lime:hover {
  background: var(--lime-dim);
  box-shadow: var(--sh-lime);
}
.btn--dark {
  background: var(--black);
  color: var(--lime);
  border: 1px solid transparent;
}
.btn--dark:hover {
  background: #0f0f0f;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}
.btn--lg  { padding: 0.82em 2em;   font-size: var(--t-base); }
.btn--xl  { padding: 1em 2.5em;    font-size: var(--t-lg);   border-radius: var(--r-md); }
.btn .arr { transition: transform var(--dur) var(--ease); display: inline-block; }
.btn:hover .arr { transform: translateX(4px); }

/* ── 8. HERO ────────────────────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

/* Subtle grid texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(204,255,0,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,255,0,0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

/* Radial glow behind headline */
.hero::after {
  content: '';
  position: absolute;
  top: 10%; left: -15%;
  width: 70vw; height: 70vw;
  background: radial-gradient(ellipse at center, rgba(204,255,0,0.035) 0%, transparent 65%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  gap: var(--s12);
  align-items: start;
  justify-items: center;
  width: 100%;
  padding: var(--s20) 0 var(--s16);
  position: relative;
  z-index: 1;
}
.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  align-items: center;
  gap: var(--s14);
  width: min(1120px, 100%);
  justify-content: center;
}
.hero__copy {
  max-width: 640px;
  margin: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(760px, 100%);
  text-align: center;
}

.hero__badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: var(--s10);
}
.hero__badge {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--white);
  font-size: var(--t-sm);
  padding: 0.72em 1em;
  border-radius: var(--r-full);
  letter-spacing: 0.01em;
}

/* Eyebrow pill */
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  background: rgba(204,255,0,0.07);
  border: 1px solid rgba(204,255,0,0.18);
  border-radius: var(--r-full);
  padding: 0.38em 1.1em;
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: var(--s8);
}
.eyebrow-pulse {
  width: 6px; height: 6px;
  background: var(--lime);
  border-radius: 50%;
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); box-shadow: 0 0 0 0 rgba(204,255,0,0.5); }
  50% { opacity:0.7; transform:scale(0.75); box-shadow: 0 0 0 5px rgba(204,255,0,0); }
}

/* Headline */
.hero__headline {
  font-size: var(--t-hero);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
  margin-bottom: var(--s6);
  overflow-wrap: break-word;
}
.hero__headline .ln-serif {
  display: block;
  font-family: var(--serif);
  font-weight: 900;
  font-style: normal;
  font-size: 0.95em;
  letter-spacing: -0.045em;
  line-height: 1.08;
  padding-bottom: 0.06em;
  overflow: visible;
}
.hero__headline .lime { color: var(--lime); }

.hero__sub {
  font-size: var(--t-lg);
  color: var(--white-60);
  line-height: 1.72;
  max-width: 500px;
  margin-bottom: var(--s10);
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-bottom: var(--s10);
  justify-content: center;
}

.hero__social-proof {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font-size: var(--t-xs);
  color: var(--white-60);
}
.hero__social-proof strong {
  color: var(--white);
  font-weight: 600;
}
.stars { color: var(--lime); font-size: 0.75rem; letter-spacing: 2px; }

/* Stats */
.hero__stats {
  display: flex;
  justify-content: center;
  gap: var(--s10);
  flex-wrap: wrap;
  padding-top: var(--s8);
  border-top: 1px solid var(--border);
}
.stat__num {
  font-size: var(--t-2xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.stat__num .acc { color: var(--lime); }
.stat__lbl {
  font-size: var(--t-xs);
  color: var(--grey);
  font-weight: 500;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ── 9. PHONE MOCKUP ────────────────────────────────────────────── */
.phone-wrap { position: relative; flex-shrink: 0; }

.phone {
  width: 270px;
  background: #141414;
  border-radius: 38px;
  border: 1.5px solid #222;
  overflow: hidden;
  box-shadow: var(--sh-lg), var(--sh-lime);
  transform: perspective(900px) rotateY(-9deg) rotateX(4deg);
  animation: float-phone 7s ease-in-out infinite;
  position: relative;
}
.phone::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 24px;
  background: transparent;
  border-radius: 0 0 14px 14px;
  z-index: 5;
}
@keyframes float-phone {
  0%,100% { transform: perspective(900px) rotateY(-9deg) rotateX(4deg) translateY(0); }
  50%      { transform: perspective(900px) rotateY(-9deg) rotateX(4deg) translateY(-14px); }
}

.phone__header {
  background: #075E54;
  padding: var(--s3) var(--s4) var(--s3);
  display: flex;
  align-items: center;
  gap: var(--s3);
}
.ph-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #128C7E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.ph-name  { font-size: 0.78rem; font-weight: 600; color: #fff; line-height: 1; }
.ph-status{ font-size: 0.6rem;  color: rgba(255,255,255,0.65); margin-top: 2px; }

.phone-channel {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  min-height: 20px;
  padding: 0.14rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
}

.phone-channel__dot {
  width: 0.52rem;
  height: 0.52rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 8px color-mix(in srgb, currentColor 45%, transparent);
}

.phone-channel--whatsapp { color: #25d366; }
.phone-channel--gmail { color: #ff8a65; }
.phone-channel--outlook { color: #7cb8ff; }

.phone__body {
  background: #0d1f1e;
  padding: var(--s4) var(--s3);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.bubble {
  max-width: 86%;
  padding: 0.45em 0.75em;
  border-radius: 10px;
  font-size: 0.68rem;
  line-height: 1.55;
  animation: bbl-in 0.38s var(--ease-spring) both;
}

.bubble__channel {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1rem;
  text-align: center;
  color: #071110;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08), 0 0 8px rgba(255,255,255,0.08);
  vertical-align: -0.16em;
}

.bubble__channel--whatsapp { background: #25d366; }
.bubble__channel--gmail { background: #ff8a65; }
.bubble__channel--outlook { background: #7cb8ff; }

.bubble--in  {
  background: #1e2f2d;
  color: #dde9e8;
  align-self: flex-start;
  border-bottom-left-radius: 3px;
}
.bubble--out {
  background: #005c4b;
  color: #dde9e8;
  align-self: flex-end;
  border-bottom-right-radius: 3px;
}
.bubble--tag {
  align-self: center;
  background: rgba(204,255,0,0.1);
  border: 1px solid rgba(204,255,0,0.2);
  color: var(--lime);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2em 0.8em;
  border-radius: var(--r-full);
}

.bubble--tag-invoice {
  border-color: rgba(172, 92, 255, 0.42);
  background: rgba(172, 92, 255, 0.16);
  color: #b96cff;
  box-shadow: 0 0 18px rgba(172, 92, 255, 0.22);
}

.bubble__time {
  font-size: 0.52rem;
  color: rgba(255,255,255,0.35);
  margin-top: 3px;
  text-align: right;
}
.bubble:nth-child(1){animation-delay:0.25s} .bubble:nth-child(2){animation-delay:0.55s}
.bubble:nth-child(3){animation-delay:0.85s} .bubble:nth-child(4){animation-delay:1.15s}
.bubble:nth-child(5){animation-delay:1.45s} .bubble:nth-child(6){animation-delay:1.75s}
.bubble:nth-child(7){animation-delay:2.05s} .bubble:nth-child(8){animation-delay:2.35s}
@keyframes bbl-in {
  from { opacity:0; transform:translateY(10px) scale(0.93); }
  to   { opacity:1; transform:translateY(0)    scale(1);    }
}

.badge-auto {
  position: absolute;
  bottom: -10px; right: -18px;
  background: var(--lime);
  color: var(--black);
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.38em 0.9em;
  border-radius: var(--r-full);
  box-shadow: 0 0 28px rgba(204,255,0,0.45);
  white-space: nowrap;
}

.badge-auto--needs-you {
  background: #ff7a00;
  color: #1a0b00;
  box-shadow: 0 0 30px rgba(255, 122, 0, 0.48);
}

.badge-auto--ready-quote {
  background: #c7ff00;
  color: #172000;
  box-shadow: 0 0 30px rgba(199, 255, 0, 0.52);
}

.badge-auto--ready-invoice {
  background: #a855ff;
  color: #ffffff;
  box-shadow: 0 0 30px rgba(168, 85, 255, 0.48);
}

@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__row { grid-template-columns: 1fr; }
  .phone-wrap { display: none; }
  .hero__copy {
    text-align: center;
    align-items: center;
  }
}
@media (max-width: 600px) {
  .hero__stats { gap: var(--s6); }
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ── 10. TRUST BAR ──────────────────────────────────────────────── */
.trust-bar {
  padding: var(--s6) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.trust-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s8);
  flex-wrap: wrap;
}
.trust-bar__label {
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  flex-shrink: 0;
}
.trust-bar__logos {
  display: flex;
  align-items: center;
  gap: var(--s8);
  flex-wrap: wrap;
}
.trust-bar__logos span {
  font-size: var(--t-sm);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  opacity: 0.85;
  transition: opacity var(--dur);
}
.trust-bar__logos span:hover { opacity: 1; }

/* ── 11. FEATURES ───────────────────────────────────────────────── */
.features { background: var(--off-black); }

.features__grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--s4);
}

.feat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s8);
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease-spring),
              box-shadow var(--dur) var(--ease);
}
/* Top accent line */
.feat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--feat-color, var(--lime)), transparent);
  opacity: 0;
  transition: opacity var(--dur);
}
.feat-card:hover { transform: translateY(-5px); box-shadow: var(--sh-md); }
.feat-card:hover::before { opacity: 1; }

.feat-card--wa  { --feat-color: var(--wa-green); }
.feat-card--inv { --feat-color: var(--cyan);     }
.feat-card--cal { --feat-color: var(--magenta);  }

.feat-card__icon {
  width: 52px; height: 52px;
  border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--s6);
  background: var(--icon-bg);
  border: 1px solid var(--icon-bd);
  transition: box-shadow var(--dur);
}
.feat-card--wa  .feat-card__icon { --icon-bg: rgba(37,211,102,0.1); --icon-bd: rgba(37,211,102,0.18); }
.feat-card--inv .feat-card__icon { --icon-bg: rgba(0,245,255,0.1);  --icon-bd: rgba(0,245,255,0.18);  }
.feat-card--cal .feat-card__icon { --icon-bg: rgba(255,31,106,0.1); --icon-bd: rgba(255,31,106,0.18); }
.feat-card:hover .feat-card__icon { box-shadow: 0 0 24px var(--icon-bd); }

.feat-card__title {
  font-size: var(--t-xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--s3);
}
.feat-card__body {
  font-size: var(--t-base);
  color: var(--white-60);
  line-height: 1.7;
  margin-bottom: var(--s6);
}
.feat-card__list { display: flex; flex-direction: column; gap: var(--s2); }
.feat-card__list li {
  font-size: var(--t-sm);
  color: var(--white-60);
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
}
.feat-card__list li::before {
  content: '✓';
  color: var(--feat-color, var(--lime));
  font-size: 0.68rem;
  font-weight: 900;
  margin-top: 3px;
  flex-shrink: 0;
}

@media (max-width: 860px) { .features__grid { grid-template-columns: 1fr; } }

/* ── 12. HOW IT WORKS ───────────────────────────────────────────── */
.hiw__steps {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--s4);
  position: relative;
}
/* Connecting line */
.hiw__steps::after {
  content: '';
  position: absolute;
  top: 38px;
  left: calc(16.67% + var(--s8));
  right: calc(16.67% + var(--s8));
  height: 1px;
  background: linear-gradient(90deg, var(--lime) 0%, var(--cyan) 50%, var(--magenta) 100%);
  opacity: 0.25;
  pointer-events: none;
}

.step-card {
  background: var(--off-black);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s8);
  position: relative;
  transition: border-color var(--dur), transform var(--dur) var(--ease-spring);
}
.step-card:hover { transform: translateY(-4px); }
.step-card:nth-child(1):hover { border-color: rgba(204,255,0,0.25); }
.step-card:nth-child(2):hover { border-color: rgba(0,245,255,0.25); }
.step-card:nth-child(3):hover { border-color: rgba(255,31,106,0.25); }

.step-card__num {
  font-size: clamp(3.5rem,6vw,5rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.07em;
  position: absolute;
  top: var(--s4);
  right: var(--s6);
  color: var(--border);
}

.step-card__icon {
  width: 54px; height: 54px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--step-c);
  box-shadow: 0 0 22px var(--step-glow);
  background: var(--card);
  margin-bottom: var(--s5);
  position: relative;
  z-index: 1;
}
.step-card:nth-child(1) { --step-c: var(--lime);    --step-glow: var(--lime-glow); }
.step-card:nth-child(2) { --step-c: var(--cyan);    --step-glow: var(--cyan-glow); }
.step-card:nth-child(3) { --step-c: var(--magenta); --step-glow: var(--magenta-glow); }

.step-card__title {
  font-size: var(--t-xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: var(--s3);
}
.step-card__body {
  font-size: var(--t-base);
  color: var(--white-60);
  line-height: 1.7;
}

@media (max-width: 860px) {
  .hiw__steps { grid-template-columns: 1fr; }
  .hiw__steps::after { display: none; }
}

/* ── 13. TESTIMONIALS ───────────────────────────────────────────── */
.testimonials { background: var(--off-black); }

.testi__grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--s4);
}

.testi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--s8);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  transition: border-color var(--dur), transform var(--dur) var(--ease-spring);
}
.testi-card:hover {
  border-color: rgba(204,255,0,0.12);
  transform: translateY(-3px);
}
.testi-stars { color: var(--lime); letter-spacing: 3px; font-size: 0.85rem; }
.testi-quote {
  font-family: var(--serif);
  font-style: normal;
  font-weight: 650;
  font-size: calc(var(--t-lg) * 1.08);
  line-height: 1.68;
  color: var(--white);
  flex: 1;
  overflow: visible;
}
.testi-author {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding-top: var(--s4);
  border-top: 1px solid var(--border);
}
.testi-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--off-black);
  border: 2px solid var(--border-lit);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.testi-name  { font-size: var(--t-sm); font-weight: 700; letter-spacing: -0.01em; }
.testi-trade { font-size: var(--t-xs); color: var(--grey); }

@media (max-width: 860px) { .testi__grid { grid-template-columns: 1fr; } }

/* ── 14. PRICING ────────────────────────────────────────────────── */
.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
  align-items: start;
}

.pricing__grid--single {
  grid-template-columns: minmax(280px, 520px);
  justify-content: center;
}

.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--s8);
  position: relative;
  min-width: 0;
  transition: transform var(--dur) var(--ease-spring),
              border-color var(--dur),
              box-shadow var(--dur);
}
.price-card:hover { transform: translateY(-5px); }

/* Featured (AutoPilot) */
.price-card--featured {
  border-color: rgba(204,255,0,0.75);
  box-shadow: 0 24px 70px rgba(204,255,0,0.12);
  transform: scale(1.015);
}
.price-card--featured:hover {
  transform: scale(1.015) translateY(-5px);
  box-shadow: 0 30px 90px rgba(204,255,0,0.16);
}

/* Soft subtle glow behind featured card */
.price-card--featured::after {
  content: '';
  position: absolute;
  inset: -20px;
  border-radius: var(--r-xl);
  background: radial-gradient(circle at 50% 30%, rgba(204,255,0,0.24), transparent 45%);
  filter: blur(22px);
  opacity: 0.45;
  animation: glow-breathe 6s ease-in-out infinite;
  z-index: -1;
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.38; transform: scale(1); }
  50% { opacity: 0.52; transform: scale(1.02); }
}

.price-card__badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--lime);
  color: var(--black);
  font-size: var(--t-xs);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.36em 1.2em;
  border-radius: var(--r-full);
  white-space: nowrap;
}

.price-card__name {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: var(--s3);
}
.price-card--featured .price-card__name { color: var(--lime); }

.price-card__amount {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin-bottom: var(--s2);
}
.price-cur { font-size: var(--t-lg); font-weight: 700; color: var(--white-60); }
.price-num {
  font-size: clamp(2.4rem, 5vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
}
.price-per { font-size: var(--t-sm); color: var(--grey); }

.price-card__tagline {
  font-size: var(--t-sm);
  color: var(--white-60);
  line-height: 1.55;
  padding-bottom: var(--s6);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s6);
}

.price-card__features {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  margin-bottom: var(--s8);
}
.price-card__features li {
  font-size: var(--t-sm);
  color: var(--white-60);
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  line-height: 1.5;
}
.price-card__features li .ck {
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 900;
  margin-top: 2px;
  flex-shrink: 0;
}
.price-card--featured .price-card__features li { color: rgba(240,239,232,0.85); }

.price-card__cta { width: 100%; }

.price-card--single {
  width: 100%;
}

/* ── 15. CTA SECTION ────────────────────────────────────────────── */
.cta-band {
  background: var(--lime);
  color: var(--black);
  padding: var(--s24) 0;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: 'TRADEN';
  position: absolute;
  font-size: 18vw;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: rgba(0,0,0,0.055);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}
.cta-band__inner {
  text-align: center;
  position: relative;
  z-index: 1;
}
.cta-band__title {
  font-size: var(--t-3xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--black);
  margin-bottom: var(--s4);
}
.cta-band__title em {
  font-family: var(--serif);
  font-weight: 800;
  font-style: normal;
  font-size: 1em;
  display: inline-block;
  padding-bottom: 0.04em;
}
.cta-band__sub {
  font-size: var(--t-lg);
  color: rgba(7,7,7,0.6);
  max-width: 460px;
  margin: 0 auto var(--s8);
  line-height: 1.65;
}
.cta-band__actions {
  display: flex;
  justify-content: center;
  gap: var(--s4);
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}
.cta-band__note {
  margin-top: var(--s5);
  font-size: var(--t-xs);
  color: rgba(7,7,7,0.45);
  letter-spacing: 0.05em;
}

/* ── 16. FOOTER ─────────────────────────────────────────────────── */
.footer {
  background: var(--off-black);
  border-top: 1px solid var(--border);
  padding: var(--s16) 0 var(--s8);
}
.footer__top {
  display: grid;
  grid-template-columns: 1.6fr repeat(2, minmax(160px, 1fr));
  gap: var(--s12);
  padding-bottom: var(--s12);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s8);
}
.footer__brand p {
  font-size: var(--t-sm);
  color: var(--grey);
  line-height: 1.72;
  max-width: 270px;
  margin-top: var(--s4);
}
.footer__col-title {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--s4);
}
.footer__links { display: flex; flex-direction: column; gap: var(--s3); }
.footer__links a {
  font-size: var(--t-sm);
  color: var(--grey);
  transition: color var(--dur);
}
.footer__links a:hover { color: var(--white); }
.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s4);
}
.footer__copy  { font-size: var(--t-xs); color: var(--grey); }
.footer__legal { display: flex; gap: var(--s6); }
.footer__legal a { font-size: var(--t-xs); color: var(--grey); transition: color var(--dur); }
.footer__legal a:hover { color: var(--white); }

.cookie-consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 1200;
  padding: clamp(12px, 2vw, 22px);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.68));
}

.cookie-consent.is-hidden {
  display: none;
}

.cookie-consent__panel {
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s4) var(--s6);
  align-items: end;
  padding: clamp(18px, 2.4vw, 26px);
  border: 1px solid rgba(204,255,0,0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0%, rgba(204,255,0,0.12), transparent 28%),
    linear-gradient(180deg, rgba(17,17,17,0.98), rgba(7,7,7,0.98));
  box-shadow: 0 22px 80px rgba(0,0,0,0.52);
}

.cookie-consent__header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s4);
  align-items: start;
  min-width: 0;
}

.cookie-consent__brand {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--lime);
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  overflow: hidden;
}

.cookie-consent__copy {
  min-width: 0;
}

.cookie-consent__copy .section-label {
  margin-bottom: 4px;
}

.cookie-consent__copy h2 {
  margin: 0;
  color: var(--white);
  font-family: var(--sans);
  font-size: clamp(1.25rem, 2.3vw, 1.65rem);
  font-style: normal;
  font-weight: 850;
  line-height: 1.16;
  letter-spacing: 0;
}

.cookie-consent__copy p {
  margin: var(--s3) 0 0;
  max-width: 72ch;
  color: var(--white-60);
  font-size: 0.9rem;
  line-height: 1.6;
}

.cookie-consent__policy {
  display: inline-block;
  align-self: end;
  color: var(--lime);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-consent__actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: var(--s3);
}

.cookie-consent__actions .btn {
  min-height: 46px;
  min-width: min(220px, 100%);
  padding-inline: 18px;
  line-height: 1.2;
  white-space: nowrap;
}

.legal-page {
  padding-top: calc(var(--nav-h) + var(--s16));
  background:
    linear-gradient(180deg, rgba(204,255,0,0.035), transparent 280px),
    var(--black);
}

.legal-shell {
  width: min(860px, 100%);
  margin: 0 auto;
}

.legal-shell h1 {
  margin: 0;
  color: var(--white);
  font-family: var(--sans);
  font-size: clamp(2rem, 6vw, 3.25rem);
  font-style: normal;
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: 0;
}

.legal-lede {
  margin-top: var(--s5);
  max-width: 64ch;
  color: var(--white-60);
  font-size: 1rem;
  line-height: 1.7;
}

.legal-section {
  padding: var(--s8) 0;
  border-top: 1px solid var(--border);
}

.legal-section:first-of-type {
  margin-top: var(--s8);
}

.legal-section h2 {
  margin: 0 0 var(--s3);
  color: var(--white);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.legal-section p {
  max-width: 72ch;
  color: var(--white-60);
  font-size: 0.95rem;
  line-height: 1.72;
}

.legal-list {
  display: grid;
  gap: var(--s3);
  max-width: 72ch;
  margin-top: var(--s3);
}

.legal-list li {
  color: var(--white-60);
  font-size: 0.95rem;
  line-height: 1.72;
}

.legal-table {
  width: 100%;
  margin-top: var(--s4);
  border-collapse: collapse;
  border: 1px solid var(--border);
}

.legal-table th,
.legal-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--white-60);
  font-size: 0.88rem;
  line-height: 1.55;
  text-align: left;
  vertical-align: top;
}

.legal-table th {
  color: var(--white);
  font-weight: 800;
}

/* ── FAQ page ───────────────────────────────────────────────────── */
.faq-group {
  padding: var(--s8) 0;
  border-top: 1px solid var(--border);
}

.faq-group:first-of-type {
  margin-top: var(--s8);
}

.faq-group h2 {
  margin: 0 0 var(--s4);
  color: var(--white);
  font-size: var(--t-xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.faq-list {
  display: grid;
  gap: var(--s3);
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--card);
  overflow: hidden;
}

.faq-item + .faq-item {
  margin-top: 0;
}

.faq-item[open] {
  border-color: var(--border-lit);
}

.faq-item__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 56px;
  padding: 16px 20px;
  color: var(--white);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.4;
  cursor: pointer;
  list-style: none;
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__icon {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
}

.faq-item__icon::before,
.faq-item__icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--white-55);
  transform: translate(-50%, -50%);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}

.faq-item__icon::before {
  width: 14px;
  height: 2px;
}

.faq-item__icon::after {
  width: 2px;
  height: 14px;
}

.faq-item[open] .faq-item__icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-item__a {
  padding: 0 20px 20px;
}

.faq-item__a p {
  margin: 0;
  max-width: 68ch;
  color: var(--white-60);
  font-size: 0.95rem;
  line-height: 1.72;
}

.faq-item__a a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.faq-closing {
  padding: var(--s10) 0 var(--s8);
  margin-top: var(--s4);
  border-top: 1px solid var(--border);
  text-align: center;
}

.faq-closing h2 {
  margin: 0 0 var(--s2);
  color: var(--white);
  font-size: var(--t-2xl);
  font-weight: 800;
}

.faq-closing p {
  margin: 0 auto var(--s6);
  max-width: 48ch;
  color: var(--white-60);
}

.faq-closing__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s3);
}

@media (max-width: 640px) {
  .faq-item__q {
    padding: 14px 16px;
    font-size: 0.92rem;
  }

  .faq-item__a {
    padding: 0 16px 16px;
  }

  .faq-closing__actions .btn {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .cookie-consent__panel {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .cookie-consent__policy {
    align-self: start;
  }

  .cookie-consent__actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: stretch;
  }

  .cookie-consent__actions .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
}

@media (max-width: 620px) {
  .cookie-consent__header {
    grid-template-columns: 1fr;
  }

  .legal-table,
  .legal-table thead,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td {
    display: block;
  }

  .legal-table tr {
    border-bottom: 1px solid var(--border);
  }

  .legal-table th {
    border-bottom: 0;
    padding-bottom: 4px;
  }

  .legal-table td {
    padding-top: 4px;
  }
}

.footer__logo-mark {
  width: 30px; height: 30px;
  background: var(--lime);
  color: var(--black);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  vertical-align: middle;
  margin-right: var(--s2);
}

@media (max-width: 860px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .footer__top { grid-template-columns: 1fr; } }

/* ── 17. SECTION SPACING ────────────────────────────────────────── */
section { padding: var(--s24) 0; }
.section-header { margin-bottom: var(--s16); text-align: center; }

/* ── 18. SCROLL REVEAL ──────────────────────────────────────────── */
.nojs-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  margin-top: var(--nav-h, 80px);
  border-bottom: 1px solid var(--border);
}
.nojs-nav a { text-decoration: underline; }
.nojs-nav p { flex-basis: 100%; margin: 0; }

.reveal {
  opacity: 1;
  transition: opacity 0.72s var(--ease-out), transform 0.72s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-left {
  opacity: 1;
  transition: opacity 0.72s var(--ease-out), transform 0.72s var(--ease-out);
}
.reveal-left.in { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 1;
  transition: opacity 0.72s var(--ease-out), transform 0.72s var(--ease-out);
}
.reveal-scale.in { opacity: 1; transform: scale(1); }

/* Content stays visible if JavaScript is unavailable or fails before setup. */
.reveal.reveal-pending { opacity: 0; transform: translateY(28px); }
.reveal-left.reveal-pending { opacity: 0; transform: translateX(-28px); }
.reveal-scale.reveal-pending { opacity: 0; transform: scale(0.94); }

/* Stagger delays */
.d1{transition-delay:.08s} .d2{transition-delay:.16s} .d3{transition-delay:.24s}
.d4{transition-delay:.32s} .d5{transition-delay:.40s} .d6{transition-delay:.48s}

/* ── 19. MISC UTILITIES ─────────────────────────────────────────── */
.lime-text { color: var(--lime); }
.cyan-text { color: var(--cyan); }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}
/* ── 20. LOGIN PAGE ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-h) + var(--s8)) var(--s6) var(--s16);
  position: relative;
  overflow: hidden;
}

.auth-page--subscribe {
  align-items: flex-start;
  overflow-x: hidden;
  overflow-y: visible;
  padding-bottom: var(--s20);
}

.error-page {
  background:
    radial-gradient(circle at 18% 18%, rgba(204,255,0,0.1), transparent 28%),
    radial-gradient(circle at 82% 30%, rgba(255,31,106,0.08), transparent 24%),
    linear-gradient(180deg, rgba(11,11,11,1), rgba(6,6,6,1));
}

.error-page::before {
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 96px 96px;
}

.error-page::after {
  display: none;
}

.error-card {
  width: min(540px, 100%);
  padding: clamp(28px, 5vw, 44px);
  text-align: center;
}

.error-card__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin: 0 auto var(--s6);
  border-radius: 20px;
  background: rgba(204,255,0,0.1);
  color: var(--lime);
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.error-card__title {
  margin: 0;
  color: var(--white);
  font-family: var(--serif);
  font-size: clamp(2.35rem, 7vw, 4rem);
  font-weight: 500;
  font-style: italic;
  line-height: 0.96;
  letter-spacing: 0;
}

.error-card__sub {
  margin: var(--s5) 0 0;
  color: var(--white-60);
  font-size: 0.96rem;
  line-height: 1.65;
}

.error-card__actions {
  margin-top: var(--s8);
  display: flex;
  justify-content: center;
}

/* Background grid texture */
.auth-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(204,255,0,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(204,255,0,0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  pointer-events: none;
}

/* Radial glow */
.auth-page::after {
  content: '';
  position: absolute;
  top: -10%; right: -15%;
  width: 60vw; height: 60vw;
  background: radial-gradient(ellipse at center, rgba(204,255,0,0.04) 0%, transparent 65%);
  pointer-events: none;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border-lit);
  border-radius: var(--r-xl);
  padding: var(--s10) var(--s10);
  position: relative;
  z-index: 1;
  box-shadow: var(--sh-lg);
}

.auth-card--wide {
  max-width: 1180px;
}

.subscribe-page {
  position: relative;
}

.subscribe-shell {
  width: min(1120px, 100%);
  padding: clamp(22px, 3.2vw, 38px);
  border: 1px solid var(--border-lit);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 8%, rgba(204,255,0,0.08), transparent 28%),
    linear-gradient(180deg, rgba(17,17,17,0.98), rgba(8,8,8,0.98));
  box-shadow: var(--sh-lg);
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.subscribe-header {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  max-width: 700px;
}

.subscribe-page .auth-card__footer {
  margin-top: 22px;
  padding-top: 10px;
}

.subscribe-brand {
  margin-bottom: 4px;
}

.subscribe-title {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  line-height: 1.14;
  letter-spacing: 0;
}

.subscribe-lede {
  max-width: 58ch;
  color: var(--white-60);
  font-size: 0.95rem;
  line-height: 1.58;
}

.subscribe-alert {
  margin-bottom: 12px;
}

.subscribe-layout {
  display: grid;
  gap: 16px;
}

.subscribe-list {
  display: grid;
  grid-template-columns: minmax(0, 620px);
  justify-content: center;
  gap: 12px;
  min-width: 0;
}

.subscribe-option {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  min-width: 0;
  min-height: 285px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(255,255,255,0.015);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.subscribe-option.is-selected {
  border-color: rgba(204,255,0,0.62);
  background:
    linear-gradient(180deg, rgba(204,255,0,0.075), rgba(204,255,0,0.025)),
    rgba(255,255,255,0.015);
}

.subscribe-option__copy {
  min-width: 0;
}

.subscribe-option__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.subscribe-option__name {
  margin: 0;
  color: var(--white);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.18;
}

.subscribe-option__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: var(--r-full);
  background: var(--lime);
  color: var(--black);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.subscribe-option__desc {
  margin-top: 10px;
  color: var(--white-60);
  font-size: 0.82rem;
  line-height: 1.5;
}

.subscribe-option__features {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 0;
  color: var(--white-60);
  font-size: 0.76rem;
  line-height: 1.4;
  list-style: none;
}

.subscribe-option__features li {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 8px;
}

.subscribe-option__features li::before {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: 0.48em;
  border-radius: 999px;
  background: rgba(204,255,0,0.7);
}

.subscribe-option__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.subscribe-option__price {
  color: var(--white);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.subscribe-option__price span {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--grey);
  margin-left: 2px;
}

.subscribe-checkout {
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(0, 1.25fr) auto;
  align-items: center;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--border-lit);
  background:
    linear-gradient(90deg, rgba(204,255,0,0.075), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.018);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.subscribe-checkout__meta {
  min-width: 0;
}

.subscribe-checkout__label {
  color: var(--grey);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subscribe-checkout__plan {
  margin-top: 3px;
  color: var(--white);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.subscribe-checkout__hint {
  margin-top: 2px;
  font-size: 0.82rem;
  color: var(--white-60);
}

.subscribe-checkout__copy {
  min-width: 0;
  color: var(--white-70);
  font-size: 0.82rem;
  line-height: 1.5;
}

.subscribe-checkout__copy p {
  margin: 0;
}

.subscribe-checkout__button {
  min-width: 220px;
  min-height: 44px;
  padding-inline: 18px;
  white-space: nowrap;
}

.subscribe-core-card {
  display: grid;
  gap: 20px;
  width: min(720px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 2.8vw, 28px);
  border: 1px solid var(--border-lit);
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(204,255,0,0.09), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(255,255,255,0.015);
  box-shadow: var(--sh-lg), inset 0 1px 0 rgba(255,255,255,0.03);
}

.subscribe-core-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.subscribe-core-card__eyebrow {
  margin: 0 0 8px;
  color: var(--grey);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.subscribe-core-card__title {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-weight: 820;
  line-height: 1.1;
}

.subscribe-core-card__copy {
  margin: 10px 0 0;
  max-width: 54ch;
  color: var(--white-60);
  font-size: 0.9rem;
  line-height: 1.6;
}

.subscribe-core-card__price {
  color: var(--white);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.subscribe-core-card__price span {
  display: block;
  margin-top: 4px;
  color: var(--grey);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
}

.subscribe-core-card__features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin: 0;
  padding: 18px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  list-style: none;
}

.subscribe-core-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white-60);
  font-size: 0.86rem;
  line-height: 1.4;
}

.subscribe-core-card__features li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(204,255,0,0.12);
  flex: 0 0 auto;
}

.subscribe-core-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.subscribe-core-card__note {
  margin: 0;
  max-width: 44ch;
  color: var(--white-70);
  font-size: 0.84rem;
  line-height: 1.55;
}

.subscribe-core-card__button {
  min-width: 250px;
  min-height: 46px;
  white-space: nowrap;
}

[data-theme='light'] .auth-page--subscribe {
  background:
    radial-gradient(circle at 14% 16%, rgba(126,168,0,0.10), transparent 28%),
    radial-gradient(circle at 88% 14%, rgba(95,125,0,0.08), transparent 24%),
    linear-gradient(180deg, #f7f9f5 0%, #f2f5ef 100%);
}

[data-theme='light'] .auth-page--subscribe::before {
  background-image:
    linear-gradient(rgba(95,125,0,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(95,125,0,0.04) 1px, transparent 1px);
}

[data-theme='light'] .auth-page--subscribe::after {
  background: radial-gradient(ellipse at center, rgba(126,168,0,0.08) 0%, transparent 65%);
}

[data-theme='light'] .subscribe-shell {
  border-color: #d9dfd0;
  background:
    radial-gradient(circle at 92% 8%, rgba(126,168,0,0.12), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,249,245,0.98));
  box-shadow: 0 24px 60px rgba(39,47,28,0.10);
}

[data-theme='light'] .subscribe-title,
[data-theme='light'] .subscribe-option__name,
[data-theme='light'] .subscribe-option__price,
[data-theme='light'] .subscribe-checkout__plan {
  color: #11150d;
}

[data-theme='light'] .subscribe-lede,
[data-theme='light'] .subscribe-option__desc,
[data-theme='light'] .subscribe-option__features,
[data-theme='light'] .subscribe-checkout__hint,
[data-theme='light'] .subscribe-checkout__copy {
  color: rgba(17,21,13,0.68);
}

[data-theme='light'] .subscribe-option {
  border-color: #d9dfd0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(247,249,245,0.92)),
    #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 12px 28px rgba(39,47,28,0.05);
}

[data-theme='light'] .subscribe-option.is-selected {
  border-color: rgba(95,125,0,0.38);
  background:
    linear-gradient(180deg, rgba(126,168,0,0.10), rgba(255,255,255,0.96)),
    #ffffff;
}

[data-theme='light'] .subscribe-option__meta {
  border-top-color: #e3e8db;
}

[data-theme='light'] .subscribe-option__price span,
[data-theme='light'] .subscribe-checkout__label {
  color: #66715f;
}

[data-theme='light'] .subscribe-checkout {
  border-color: rgba(95,125,0,0.22);
  background:
    linear-gradient(90deg, rgba(126,168,0,0.12), rgba(255,255,255,0.92)),
    #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.96), 0 16px 34px rgba(39,47,28,0.06);
}

[data-theme='light'] .subscribe-core-card {
  border-color: #d9dfd0;
  background:
    radial-gradient(circle at 100% 0%, rgba(126,168,0,0.12), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,249,245,0.98));
  box-shadow: 0 24px 60px rgba(39,47,28,0.10), inset 0 1px 0 rgba(255,255,255,0.96);
}

[data-theme='light'] .subscribe-core-card__title,
[data-theme='light'] .subscribe-core-card__price {
  color: #11150d;
}

[data-theme='light'] .subscribe-core-card__eyebrow,
[data-theme='light'] .subscribe-core-card__price span {
  color: #66715f;
}

[data-theme='light'] .subscribe-core-card__copy,
[data-theme='light'] .subscribe-core-card__note,
[data-theme='light'] .subscribe-core-card__features li {
  color: rgba(17,21,13,0.68);
}

[data-theme='light'] .subscribe-core-card__features {
  border-top-color: #e3e8db;
  border-bottom-color: #e3e8db;
}

[data-theme='light'] body:has(.subscribe-page) .footer {
  background: #eef2ea;
  border-top-color: #d9dfd0;
}

[data-theme='light'] body:has(.subscribe-page) .footer__top {
  border-bottom-color: #d9dfd0;
}

[data-theme='light'] body:has(.subscribe-page) .footer__col-title,
[data-theme='light'] body:has(.subscribe-page) .footer__brand-link .nav__logo-text {
  color: #11150d;
}

[data-theme='light'] body:has(.subscribe-page) .footer__brand p,
[data-theme='light'] body:has(.subscribe-page) .footer__links a,
[data-theme='light'] body:has(.subscribe-page) .footer__copy,
[data-theme='light'] body:has(.subscribe-page) .footer__legal a {
  color: rgba(17,21,13,0.68);
}

[data-theme='light'] body:has(.subscribe-page) .footer__links a:hover,
[data-theme='light'] body:has(.subscribe-page) .footer__legal a:hover {
  color: #5f7d00;
}

@media (max-width: 900px) {
  .subscribe-shell {
    width: 100%;
    padding: 24px;
  }

  .subscribe-list {
    grid-template-columns: 1fr;
  }

  .subscribe-option {
    min-height: 0;
  }

  .subscribe-option__meta {
    width: auto;
  }

  .subscribe-checkout {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .subscribe-checkout__button {
    width: 100%;
    min-width: 0;
  }

  .subscribe-core-card__head,
  .subscribe-core-card__footer {
    display: grid;
    gap: 14px;
  }

  .subscribe-core-card__button {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .auth-page--subscribe {
    padding-left: var(--s4);
    padding-right: var(--s4);
    padding-bottom: var(--s12);
  }

  .subscribe-shell {
    padding: 18px;
    border-radius: 20px;
  }

  .subscribe-header {
    margin-bottom: 18px;
  }

  .subscribe-page .auth-card__footer {
    margin-top: 18px;
    padding-top: 8px;
  }

  .subscribe-title {
    font-size: clamp(1.55rem, 9vw, 2rem);
  }

  .subscribe-lede {
    font-size: 0.86rem;
  }

  .subscribe-layout {
    gap: 12px;
  }

  .subscribe-option {
    padding: 14px;
    border-radius: 16px;
  }

  .subscribe-option__name {
    font-size: 1rem;
  }

  .subscribe-option__meta {
    gap: 8px;
  }

  .subscribe-checkout {
    padding: 14px;
    border-radius: 16px;
  }

  .subscribe-checkout__button {
    white-space: normal;
  }

  .subscribe-core-card {
    padding: 18px;
    border-radius: 20px;
    gap: 18px;
  }

  .subscribe-core-card__features {
    grid-template-columns: 1fr;
    gap: 9px;
    padding: 16px 0;
  }

  .subscribe-core-card__button {
    white-space: normal;
  }

  .subscribe-alert {
    align-items: flex-start;
    white-space: normal;
  }

  .subscribe-alert span {
    margin-left: 0;
  }
}

.beta-card {
  max-width: 720px;
  padding: var(--s12) var(--s12);
}

.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--s2);
}
.weekday-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  padding: 0;
  border: 1px solid var(--border-lit);
  border-radius: 22px;
  background: #070707;
  color: var(--grey);
  font-size: var(--t-2xl);
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform 0.22s var(--ease), background var(--dur), border-color var(--dur), color var(--dur);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.weekday-card:hover {
  transform: translateY(-2px);
}
.weekday-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.weekday-card span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  z-index: 1;
  padding: 1rem 0;
  border-radius: inherit;
}
.weekday-card.active,
.weekday-card input:checked + span {
  border-color: transparent;
  background: var(--lime);
  color: var(--black);
}
.weekday-card.active {
  box-shadow: 0 18px 40px rgba(204,255,0,0.16);
}

@media (max-width: 900px) {
  .weekday-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .weekday-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.work-hours-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--s3);
  align-items: center;
}
.work-hours-row input {
  max-width: 100%;
  text-align: center;
}
.work-hours-separator {
  font-family: var(--serif);
  font-size: var(--t-lg);
  color: var(--white-60);
  padding: 0 0.5rem;
  white-space: nowrap;
}
.auth-card--wide .auth-input {
  min-width: 0;
}
.btn--sm {
  padding: 0.6em 1em;
  font-size: var(--t-xs);
}

/* Thin lime top-edge accent */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: var(--s8); right: var(--s8);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
  opacity: 0.5;
  border-radius: var(--r-full);
}

.auth-card__header {
  text-align: center;
  margin-bottom: var(--s8);
}

.auth-card__logo {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s6);
}

.auth-card__title {
  font-size: var(--t-2xl);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: var(--s2);
}

.auth-card__title em {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.05em;
  display: inline-block;
  padding-bottom: 0.04em;
}

.auth-card__sub {
  font-size: var(--t-sm);
  color: var(--white-60);
  line-height: 1.6;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.auth-label {
  font-size: var(--t-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-60);
}

.auth-input {
  background: var(--off-black);
  border: 1px solid var(--border-lit);
  border-radius: var(--r-sm);
  padding: 0.8em 1em;
  font-family: var(--sans);
  font-size: var(--t-base);
  color: var(--white);
  width: 100%;
  transition: border-color var(--dur), box-shadow var(--dur);
  outline: none;
  -webkit-appearance: none;
}

.auth-input::placeholder { color: var(--grey); }
.auth-input:focus {
  border-color: rgba(204,255,0,0.4);
  box-shadow: 0 0 0 3px rgba(204,255,0,0.08);
}

.auth-input--error {
  border-color: var(--magenta);
}
.auth-input--error:focus {
  box-shadow: 0 0 0 3px rgba(255,31,106,0.1);
}

.auth-field__hint {
  font-size: var(--t-xs);
  color: var(--magenta);
  margin-top: var(--s1);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
}

.auth-check {
  display: flex;
  align-items: center;
  gap: var(--s2);
  cursor: pointer;
  font-size: var(--t-xs);
  color: var(--white-60);
}

.auth-check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border: 1px solid var(--border-lit);
  border-radius: 4px;
  background: var(--off-black);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color var(--dur), background var(--dur);
  position: relative;
}

.auth-check input[type="checkbox"]:checked {
  background: var(--lime);
  border-color: var(--lime);
}

.auth-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px; left: 5px;
  width: 4px; height: 7px;
  border: 1.5px solid var(--black);
  border-top: none;
  border-left: none;
  transform: rotate(45deg);
}

.auth-forgot {
  font-size: var(--t-xs);
  color: var(--white-60);
  transition: color var(--dur);
}
.auth-forgot:hover { color: var(--lime); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: var(--s4);
  color: var(--grey);
  font-size: var(--t-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: var(--s2) 0;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-social {
  display: flex;
  gap: var(--s3);
}

.auth-social__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0.72em 1em;
  background: var(--off-black);
  border: 1px solid var(--border-lit);
  border-radius: var(--r-sm);
  font-family: var(--sans);
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--white-60);
  cursor: pointer;
  transition: border-color var(--dur), color var(--dur), background var(--dur);
}
.auth-social__btn:hover {
  border-color: rgba(240,239,232,0.25);
  color: var(--white);
  background: rgba(255,255,255,0.03);
}
.auth-social__btn svg {
  width: 16px; height: 16px;
  display: inline-block;
}

.auth-footer {
  text-align: center;
  margin-top: var(--s6);
  font-size: var(--t-xs);
  color: var(--grey);
}
.auth-footer a {
  color: var(--lime);
  font-weight: 600;
  transition: opacity var(--dur);
}
.auth-footer a:hover { opacity: 0.8; }

@media (max-width: 480px) {
  .auth-card { padding: var(--s8) var(--s6); }
  .auth-social { flex-direction: column; }
}

/* ----------------------------------------------------------------
   CRM APP SYSTEM
   Clean operational UI for dashboard, profile, services and setup.
   ---------------------------------------------------------------- */
body {
  cursor: auto;
}

button,
a,
input,
select,
textarea,
label {
  cursor: pointer;
}

input,
select,
textarea {
  cursor: text;
}

.c-dot,
.c-ring {
  display: none !important;
}

.app-shell {
  min-height: 100svh;
  padding: calc(var(--nav-h) + 28px) 0 56px;
  background:
    linear-gradient(180deg, rgba(204,255,0,0.035), transparent 240px),
    var(--black);
}

body:has(.app-shell) .footer,
body:has(.setup-shell) .footer {
  display: none;
}

.app-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 0 24px;
}

.app-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.app-kicker {
  margin-bottom: 8px;
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.app-title {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.85rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
}

.app-title em {
  display: inline-block;
  padding-bottom: 0.12em;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  line-height: 1.16;
}

.app-subtitle {
  max-width: 680px;
  margin-top: 10px;
  color: var(--white-60);
  font-size: 0.98rem;
  line-height: 1.68;
}

.app-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.app-grid--even {
  grid-template-columns: 0.85fr 1.15fr;
}

.profile-stack,
.services-stack {
  display: grid;
  gap: 18px;
  max-width: none;
}

.profile-hero {
  display: grid;
  gap: 8px;
}

.profile-hero__title {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.55rem, 3.2vw, 2.25rem);
  font-weight: 800;
  line-height: 1.08;
}

.profile-hero__sub {
  margin: 0;
  max-width: 720px;
  color: var(--white-60);
  font-size: 0.9rem;
  line-height: 1.6;
}

.profile-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ws-sidebar__alerts {
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ws-sidebar__alerts-head {
  color: rgba(240,239,232,0.35);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ws-alert-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--white-60);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
}

.ws-alert-pill span:last-child {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--black);
  font-size: 0.68rem;
  font-weight: 800;
}

.ws-alert-pill--muted span:last-child {
  background: rgba(255,255,255,0.08);
  color: var(--white-60);
}

.ws-alert-pill--setup {
  display: grid;
  grid-template-columns: 1fr auto;
  border-color: rgba(197,255,0,0.22);
  background: rgba(197,255,0,0.07);
  color: var(--white);
}

.ws-alert-pill--setup small {
  grid-column: 1 / -1;
  color: var(--white-52);
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.4;
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
}

.mini-summary {
  display: grid;
  gap: 12px;
}

.mini-summary__item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.mini-summary__item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.mini-summary__label {
  color: var(--white-60);
  font-size: 0.78rem;
  line-height: 1.4;
}

.mini-summary__value {
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.minimal-table-wrap {
  overflow: hidden;
  border-radius: 0 0 14px 14px;
}

.minimal-table {
  width: 100%;
  border-collapse: collapse;
}

.minimal-table th,
.minimal-table td {
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  vertical-align: top;
  text-align: left;
}

.minimal-table th {
  border-top: 0;
  color: var(--white-60);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.minimal-table td {
  color: var(--white);
  font-size: 0.85rem;
  line-height: 1.55;
}

.minimal-table td .soft-pill,
.minimal-table td .status-pill {
  margin: 2px 6px 2px 0;
}

.profile-stack .app-card__head,
.services-stack .app-card__head {
  padding: 16px 18px;
}

.profile-stack .app-card__body,
.services-stack .app-card__body {
  padding: 18px;
}

.service-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.service-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
}

.service-table th,
.service-table td {
  padding: 10px 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
  vertical-align: top;
  text-align: left;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.service-table thead th {
  border-top: 0;
  color: var(--white-60);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.service-table tbody tr:hover {
  background: rgba(255,255,255,0.02);
}

.service-table th:nth-child(1),
.service-table td:nth-child(1) { width: 44px; }

.service-table th:nth-child(2),
.service-table td:nth-child(2) { width: 17%; }

.service-table th:nth-child(3),
.service-table td:nth-child(3) { width: 11%; }

.service-table th:nth-child(4),
.service-table td:nth-child(4) { width: 13%; }

.service-table th:nth-child(5),
.service-table td:nth-child(5) { width: 11%; }

.service-table th:nth-child(6),
.service-table td:nth-child(6) { width: 21%; }

.service-table th:nth-child(7),
.service-table td:nth-child(7) { width: 20%; }

.service-table th:nth-child(8),
.service-table td:nth-child(8) { width: 52px; }

.service-table td {
  color: var(--white);
}

.service-table td[data-label="Price"] {
  color: var(--lime);
  font-weight: 800;
}

.service-table .auth-input,
.service-table .segment {
  width: 100%;
}

.service-row__num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(204,255,0,0.12);
  color: var(--lime);
  font-weight: 800;
  font-size: 0.72rem;
}

.service-row__remove {
  border: 0;
  background: transparent;
  color: var(--white-50);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.service-row__cell {
  min-width: 0;
}

.service-row__cell .field-help {
  margin-top: 6px;
}

.service-row__cell .segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-row__cell .segment {
  padding: 6px 10px;
  font-size: 0.72rem;
}

.crm-settings,
.crm-services {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 1120px;
}

.crm-billing {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 1120px;
}

.crm-panel {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.012)),
    rgba(17,17,17,0.86);
  box-shadow: 0 16px 45px rgba(0,0,0,0.2);
}

.crm-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.crm-panel__head h2 {
  margin: 0;
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 760;
  letter-spacing: 0;
}

.crm-panel__head p {
  margin: 3px 0 0;
  color: var(--white-50);
  font-size: 0.78rem;
  line-height: 1.45;
}

.crm-panel--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
}

.crm-panel--split > div,
.crm-panel--split > form {
  min-width: 0;
}

.crm-panel--split > form {
  padding: 14px 16px;
  border-left: 1px solid rgba(255,255,255,0.07);
}

.crm-data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.crm-data-grid--single {
  grid-template-columns: 1fr;
}

.crm-data-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 11px 16px;
  border-top: 1px solid rgba(255,255,255,0.065);
}

.crm-data-row:nth-child(1),
.crm-data-row:nth-child(2) {
  border-top: 0;
}

.crm-data-grid--single .crm-data-row:nth-child(2) {
  border-top: 1px solid rgba(255,255,255,0.065);
}

.crm-data-row span {
  color: var(--white-50);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.45;
}

.crm-data-row strong {
  color: var(--white);
  font-size: 0.83rem;
  font-weight: 650;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
}

.crm-review-form {
  display: grid;
  align-content: start;
  gap: 9px;
}

.crm-review-form .form-label {
  margin: 0;
}

.crm-review-form .auth-input {
  min-height: 40px;
  padding: 9px 11px;
  font-size: 0.83rem;
}

.crm-review-form .field-help {
  margin: 0;
  color: var(--white-45);
  font-size: 0.74rem;
  line-height: 1.5;
}

.billing-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-summary-card {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 13px 16px;
  border-top: 1px solid rgba(255,255,255,0.065);
}

.billing-summary-card:nth-child(1),
.billing-summary-card:nth-child(2) {
  border-top: 0;
}

.billing-summary-card__label {
  color: var(--white-50);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.35;
}

.billing-summary-card strong {
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.billing-summary-note {
  padding: 13px 16px 15px;
  border-top: 1px solid rgba(255,255,255,0.065);
  color: var(--white-60);
  font-size: 0.8rem;
  line-height: 1.55;
}

.billing-table-wrap {
  overflow-x: auto;
}

.billing-table {
  min-width: 860px;
}

.billing-table tbody tr.billing-table__current {
  background: rgba(204,255,0,0.05);
}

.billing-plan-pill {
  margin-top: 8px;
}

.billing-plan-action {
  width: 100%;
  justify-content: center;
}

.crm-services-panel {
  min-width: 0;
}

.service-table-wrap--crm {
  overflow-x: auto;
  scrollbar-color: rgba(204,255,0,0.42) rgba(255,255,255,0.05);
}

.service-table-wrap--crm::-webkit-scrollbar {
  height: 8px;
}

.service-table-wrap--crm::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.045);
}

.service-table-wrap--crm::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(204,255,0,0.38);
}

.service-table--crm {
  min-width: 980px;
}

.service-table--crm th,
.service-table--crm td {
  padding: 8px;
  font-size: 0.74rem;
}

.service-table--crm thead th {
  font-size: 0.66rem;
  letter-spacing: 0.06em;
}

.service-table--crm .auth-input {
  min-height: 38px;
  padding: 8px 9px;
  font-size: 0.77rem;
}

.service-table--crm .segment {
  padding: 5px 7px;
  font-size: 0.67rem;
}

.service-table--crm .service-row__num {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

@media (max-width: 960px) {
  .service-table th:nth-child(2),
  .service-table td:nth-child(2),
  .service-table th:nth-child(3),
  .service-table td:nth-child(3),
  .service-table th:nth-child(4),
  .service-table td:nth-child(4),
  .service-table th:nth-child(5),
  .service-table td:nth-child(5),
  .service-table th:nth-child(6),
  .service-table td:nth-child(6),
  .service-table th:nth-child(7),
  .service-table td:nth-child(7) {
    width: auto;
  }
}

.app-stack {
  display: grid;
  gap: 18px;
}

.app-card {
  background: rgba(17,17,17,0.88);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  box-shadow: 0 16px 45px rgba(0,0,0,0.24);
}

.app-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.app-card__title {
  margin: 0;
  color: var(--white);
  font-size: 0.98rem;
  font-weight: 750;
  letter-spacing: 0;
  line-height: 1.35;
}

.app-card__note {
  margin-top: 4px;
  color: var(--white-60);
  font-size: 0.82rem;
  line-height: 1.5;
}

.app-card__body {
  padding: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric-card {
  min-width: 0;
  padding: 16px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 12px;
}

.metric-label {
  color: var(--white-60);
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.4;
}

.metric-value {
  margin-top: 12px;
  color: var(--white);
  font-size: clamp(1.55rem, 4vw, 2.25rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  line-height: 1;
}

.metric-hint {
  margin-top: 8px;
  color: var(--grey);
  font-size: 0.74rem;
  line-height: 1.35;
}

.status-pill,
.soft-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.045);
  color: var(--white-60);
  font-size: 0.74rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
}

.status-pill--lime,
.soft-pill--lime {
  border-color: rgba(204,255,0,0.78);
  background: rgba(204,255,0,0.24);
  color: #cfff00;
  box-shadow: 0 0 16px rgba(204,255,0,0.24);
}

.soft-pill--success {
  border-color: rgba(204,255,0,0.35);
}

.soft-pill--danger {
  border-color: rgba(255,96,96,0.35);
  color: var(--magenta);
}

.soft-pill--subtle {
  border-color: rgba(204,255,0,0.22);
}

.status-pill--cyan {
  border-color: rgba(0,209,255,0.82);
  background: rgba(0,209,255,0.20);
  color: #29e7ff;
  box-shadow: 0 0 16px rgba(0,209,255,0.24);
}

.status-pill--warn {
  border-color: rgba(255,128,0,0.84);
  background: rgba(255,128,0,0.22);
  color: #ff9a1f;
  box-shadow: 0 0 16px rgba(255,128,0,0.24);
}

.status-pill--danger {
  border-color: rgba(255,31,106,0.22);
  background: rgba(255,31,106,0.08);
  color: var(--magenta);
}

.data-list {
  display: grid;
}

.data-row {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.data-row:first-child {
  border-top: 0;
}

.data-main {
  min-width: 0;
}

.data-title {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.data-meta {
  margin-top: 4px;
  color: var(--white-60);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.data-side {
  color: var(--white-60);
  font-size: 0.82rem;
  font-weight: 650;
  text-align: right;
  white-space: nowrap;
}

.empty-box {
  padding: 38px 20px;
  color: var(--white-60);
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.55;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.info-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.info-label {
  color: var(--white-60);
  font-size: 0.78rem;
  line-height: 1.4;
  text-transform: none;
  letter-spacing: 0;
}

.info-value {
  min-width: 0;
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-tile {
  min-height: 82px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
  color: var(--white);
  text-align: left;
  transition: border-color var(--dur), background var(--dur), transform var(--dur);
}

.quick-tile:hover {
  border-color: rgba(204,255,0,0.22);
  background: rgba(204,255,0,0.055);
  transform: translateY(-1px);
}

.quick-tile strong {
  display: block;
  font-size: 0.88rem;
  line-height: 1.35;
}

.quick-tile span {
  display: block;
  margin-top: 6px;
  color: var(--white-60);
  font-size: 0.76rem;
  line-height: 1.4;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.form-field--full {
  grid-column: 1 / -1;
}

.location-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);
  gap: 14px;
  align-items: end;
}

.input-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--border-lit);
  border-radius: 10px;
  background: var(--off-black);
  overflow: hidden;
}

.input-with-suffix:focus-within {
  border-color: var(--lime);
  box-shadow: var(--sh-lime);
}

.input-with-suffix .auth-input {
  min-height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.input-with-suffix span {
  padding: 0 12px;
  color: var(--white-60);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1;
}

.form-label {
  color: var(--white-60);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
}

.auth-input,
.crm-input {
  min-height: 44px;
  border-radius: 10px;
  font-size: 0.95rem;
  line-height: 1.35;
}

.field-help {
  color: var(--grey);
  font-size: 0.76rem;
  line-height: 1.45;
}

.service-editor {
  display: grid;
  gap: 14px;
}

.service-card {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
}

.service-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.service-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 9px;
  background: var(--lime);
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 900;
}

.svc-title-input {
  flex: 1 1 auto;
  min-width: 0;
}

.remove-link {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  color: var(--white-60);
  font-size: 0.78rem;
  font-weight: 700;
}

.remove-link:hover {
  border-color: rgba(255,31,106,0.3);
  color: var(--magenta);
}

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

.segment {
  position: relative;
}

.segment input {
  position: absolute;
  opacity: 0;
}

.segment span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  color: var(--white-60);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.2;
}

.segment input:checked + span {
  border-color: rgba(204,255,0,0.32);
  background: rgba(204,255,0,0.1);
  color: var(--lime);
}

.setup-shell {
  min-height: 100svh;
  padding: calc(var(--nav-h) + 26px) 0 48px;
  background:
    radial-gradient(circle at 72% 0%, rgba(204,255,0,0.08), transparent 28rem),
    radial-gradient(circle at 0% 100%, rgba(112,200,255,0.05), transparent 26rem),
    #f5f8ef;
}

.setup-card {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px;
  border: 1px solid #dfe8d1;
  border-radius: 16px;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 18px 60px rgba(17,21,13,0.08);
}

.setup-card--wide {
  width: min(980px, calc(100% - 32px));
}

.setup-header {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.setup-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.step-track {
  display: flex;
  gap: 6px;
}

.step-dot {
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: #d5dfc5;
}

.step-dot--done,
.step-dot--active {
  background: var(--lime);
}

.setup-title {
  margin: 0;
  color: #11150d;
  font-size: clamp(1.65rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.12;
}

.setup-copy {
  max-width: 620px;
  color: #334155;
  font-size: 0.94rem;
  line-height: 1.65;
}

.integration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.integration-card {
  display: grid;
  gap: 16px;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}

.integration-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.integration-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.integration-brand h2 {
  margin: 0;
  color: var(--white);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
}

.integration-logo {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.integration-logo--google {
  background:
    conic-gradient(from -45deg, #4285f4 0 25%, #34a853 0 50%, #fbbc05 0 75%, #ea4335 0 100%);
  color: #fff;
}

.integration-logo--whatsapp {
  background: #25d366;
  color: #061108;
}

.integration-logo--facebook {
  margin-left: -14px;
  background: #1877f2;
  font-family: var(--sans);
  font-size: 1rem;
}

.integration-card__action {
  margin-top: auto;
}

.weekday-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.weekday-card {
  min-height: 64px;
  border-radius: 12px;
  font-size: 1rem;
}

.work-hours-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
}

.crm-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.crm-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.crm-table th,
.crm-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-align: left;
  font-size: 0.84rem;
  line-height: 1.45;
}

.crm-table th {
  color: var(--white-60);
  font-size: 0.76rem;
  font-weight: 750;
}

.crm-table td {
  color: var(--white-60);
}

.crm-table td:first-child {
  color: var(--white);
  font-weight: 700;
}

@media (max-width: 960px) {
  .app-topbar {
    flex-direction: column;
  }

  .app-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .app-grid,
  .app-grid--even {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .billing-summary-grid {
    grid-template-columns: 1fr;
  }

  .billing-summary-card:nth-child(2) {
    border-top: 1px solid rgba(255,255,255,0.065);
  }

  .profile-stack,
  .services-stack {
    max-width: 100%;
  }

  .calendar-hero {
    flex-direction: column;
  }

  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-board--week .app-card__head {
    align-items: flex-start;
    gap: 12px;
  }

  .calendar-legend {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding-top: calc(var(--nav-h) + 18px);
  }

  .app-wrap {
    padding: 0 14px;
  }

  .app-card__head,
  .app-card__body,
  .data-row {
    padding-left: 14px;
    padding-right: 14px;
  }

  .metric-grid,
  .quick-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .data-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .data-side {
    text-align: left;
    white-space: normal;
  }

  .info-item {
    display: grid;
    gap: 4px;
  }

  .info-value {
    text-align: left;
  }

  .service-card__head {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .service-card__head .auth-input {
    flex-basis: calc(100% - 42px);
  }

  .remove-link {
    width: 100%;
  }

  .profile-stack,
  .services-stack {
    max-width: 100%;
  }

  .calendar-week {
    display: none;
  }

  .calendar-mobile-list {
    display: grid;
  }

  .service-table-wrap {
    overflow: visible;
  }

  .service-table,
  .service-table thead,
  .service-table tbody,
  .service-table tr,
  .service-table th,
  .service-table td {
    display: block;
    width: 100%;
  }

  .service-table thead {
    display: none;
  }

  .service-table tbody tr {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    background: rgba(255,255,255,0.015);
  }

  .service-table tbody tr:hover {
    background: rgba(255,255,255,0.015);
  }

  .service-table td {
    display: grid;
    gap: 8px;
    padding: 10px 0;
    border-top: 0;
  }

  .service-table td::before {
    content: attr(data-label);
    color: var(--white-50);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .service-table td:last-child {
    padding-bottom: 0;
  }

  .billing-table-wrap {
    overflow: visible;
  }

  .billing-table,
  .billing-table thead,
  .billing-table tbody,
  .billing-table th,
  .billing-table td,
  .billing-table tr {
    display: block;
    width: 100%;
  }

  .billing-table thead {
    display: none;
  }

  .billing-table tbody tr {
    margin-bottom: 12px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    background: rgba(255,255,255,0.015);
  }

  .billing-table td {
    display: grid;
    gap: 8px;
    padding: 10px 0;
    border-top: 0;
  }

  .billing-table td::before {
    content: attr(data-label);
    color: var(--white-50);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .billing-plan-action {
    min-height: 42px;
  }

  .service-row__num {
    width: 100%;
    border-radius: 10px;
  }

  .service-row__cell .segmented {
    gap: 8px;
  }

  .setup-card,
  .setup-card--wide {
    width: min(100% - 24px, 980px);
    padding: 16px;
  }

  .setup-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .step-dot {
    width: 18px;
  }

  .weekday-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* ================================================================
   WORKSPACE SHELL — Sidebar + Main layout
   ================================================================ */

/* Workspace shell: full-viewport two-column layout */
.workspace-shell {
  display: flex;
  min-height: 100svh;
  background: var(--black);
}

/* Hide top nav and footer when workspace-shell is present */
body:has(.workspace-shell) .nav,
body:has(.workspace-shell) .footer {
  display: none !important;
}

/* ── Sidebar ── */
.ws-sidebar {
  width: 240px;
  flex: 0 0 240px;
  display: flex;
  flex-direction: column;
  background: #0a0a0a;
  border-right: 1px solid rgba(255,255,255,0.07);
  min-height: 100svh;
  position: sticky;
  top: 0;
  height: 100svh;
  overflow-y: auto;
}

.ws-sidebar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ws-sidebar__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ws-user-avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--black);
  font-size: 0.82rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.ws-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.ws-user-name {
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-user-biz {
  color: rgba(240,239,232,0.4);
  font-size: 0.72rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-nav {
  flex: 1;
  padding: 12px 10px;
}

.ws-nav__section-label {
  padding: 8px 10px 4px;
  color: rgba(240,239,232,0.35);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ws-nav__item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  color: rgba(240,239,232,0.6);
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  width: 100%;
  text-align: left;
  margin-bottom: 2px;
}

.ws-nav__item:hover {
  background: rgba(255,255,255,0.05);
  color: var(--white);
}

.ws-nav__item--active {
  background: rgba(204,255,0,0.1);
  color: var(--lime) !important;
}

.ws-nav__item--logout {
  color: rgba(240,239,232,0.35);
}

.ws-nav__item--logout:hover {
  color: #ff1f6a;
  background: rgba(255,31,106,0.08);
}

.ws-nav__badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.6;
}

.ws-nav__badge--warn {
  background: #f59e0b;
  color: #000;
}

.ws-nav__badge--lime {
  background: var(--lime);
  color: var(--black);
}

.ws-sidebar__footer {
  padding: 10px 10px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── Main content ── */
.ws-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  height: 100svh;
}

.ws-content {
  padding: 28px 28px 40px;
  width: 100%;
  max-width: none;
  min-width: 0;
}

.ws-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 24px;
}

.ws-page-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--white);
  margin: 0;
  line-height: 1.1;
}

.ws-page-sub {
  color: rgba(240,239,232,0.5);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* ── Stats row ── */
.ws-stats-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.ws-stat {
  background: rgba(17,17,17,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 110px;
  text-align: center;
}

.ws-stat__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--lime);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.ws-stat__label {
  display: block;
  font-size: 0.7rem;
  color: rgba(240,239,232,0.5);
  margin-top: 4px;
}

/* ── Section titles ── */
.ws-section {
  margin-bottom: 32px;
}

.ws-section__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 14px;
  letter-spacing: 0;
}

.ws-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
}

/* ── Action cards — FIXED ── */
.action-card {
  background: rgba(17,17,17,0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 10px;
  transition: opacity 0.3s, transform 0.3s;
}

.action-card.risk-high   { border-left: 3px solid #ef4444; }
.action-card.risk-medium { border-left: 3px solid #f59e0b; }
.action-card.risk-low    { border-left: 3px solid #10b981; }
.card-resolving          { opacity: 0; transform: translateX(20px); }

.card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.card-type-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.08);
  color: rgba(240,239,232,0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.risk-badge {
  font-size: 0.72rem;
  color: #ef4444;
  font-weight: 700;
}

.risk-badge--warn { color: #f59e0b; }

.card-time {
  margin-left: auto;
  font-size: 0.68rem;
  color: rgba(240,239,232,0.35);
}

.card-summary {
  font-size: 0.85rem;
  color: rgba(240,239,232,0.8);
  margin-bottom: 10px;
  white-space: pre-line;
  line-height: 1.55;
}

.card-flags,
.card-missing {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
  align-items: center;
}

.missing-label {
  font-size: 0.7rem;
  color: rgba(240,239,232,0.4);
  margin-right: 4px;
}

.flag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255,255,255,0.07);
  color: rgba(240,239,232,0.6);
  border: 1px solid rgba(255,255,255,0.1);
}

.flag-pill--warn {
  background: rgba(255,31,106,0.1);
  color: #ff6b8a;
  border-color: rgba(255,31,106,0.25);
}

.missing-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(245,158,11,0.1);
  color: #ffd166;
  border: 1px solid rgba(245,158,11,0.25);
}

.card-message-wrap {
  margin-bottom: 10px;
}

.msg-label {
  display: block;
  font-size: 0.68rem;
  color: rgba(240,239,232,0.4);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card-message {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  color: var(--white);
  padding: 8px 10px;
  font-size: 0.84rem;
  resize: vertical;
  font-family: inherit;
  line-height: 1.5;
}

.card-message:focus {
  outline: none;
  border-color: rgba(204,255,0,0.4);
  box-shadow: 0 0 0 2px rgba(204,255,0,0.1);
}

.card-slot {
  font-size: 0.82rem;
  color: rgba(240,239,232,0.7);
  margin-bottom: 10px;
}

.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* btn-card: replaces the old mixed .btn styles */
.btn-card {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn-card:hover:not(:disabled) { opacity: 0.85; transform: translateY(-1px); }
.btn-card:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-approve  { background: var(--lime); color: var(--black); }
.btn-edit     { background: rgba(99,102,241,0.9); color: #fff; }
.btn-reject   { background: rgba(255,255,255,0.08); color: rgba(240,239,232,0.7); border: 1px solid rgba(255,255,255,0.1); }
.btn-takeover { background: rgba(255,255,255,0.08); color: rgba(240,239,232,0.7); border: 1px solid rgba(255,255,255,0.1); }

.card-feedback { font-size: 0.76rem; margin-top: 8px; min-height: 1rem; }
.feedback-ok    { color: var(--lime); }
.feedback-error { color: #ff1f6a; }

.ws-empty {
  text-align: center;
  color: rgba(240,239,232,0.35);
  padding: 2.5rem;
  font-size: 0.88rem;
  background: rgba(255,255,255,0.02);
  border-radius: 12px;
  border: 1px dashed rgba(255,255,255,0.08);
}

/* ── Modal ── */
.ws-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.ws-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
}

.ws-modal__box {
  position: relative;
  background: #111;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  padding: 22px;
  width: min(580px, 95vw);
  max-height: 88vh;
  overflow-y: auto;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
}

.ws-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.08);
  border: none;
  border-radius: 6px;
  color: rgba(240,239,232,0.6);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  cursor: pointer;
}

.detail-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; margin-bottom: 1rem; }
.detail-table td { padding: 7px 8px; border-bottom: 1px solid rgba(255,255,255,0.06); color: rgba(240,239,232,0.8); }
.detail-table td:first-child { color: rgba(240,239,232,0.4); width: 38%; }

/* ── Inbox shell ── */
.inbox-shell {
  display: flex;
  min-height: 100svh;
  overflow: hidden;
}

.inbox-shell__inner {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  width: 100%;
  min-height: 100%;
}

.inbox-list {
  width: auto;
  flex: none;
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inbox-list__head {
  padding: 18px 16px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.inbox-list__title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin: 0 0 10px;
}

.inbox-search {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--white);
  padding: 7px 10px;
  font-size: 0.82rem;
  font-family: inherit;
}

.inbox-search:focus { outline: none; border-color: rgba(204,255,0,0.4); }

.inbox-tabs {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow-x: auto;
  scrollbar-width: none;
}

.inbox-tabs::-webkit-scrollbar { display: none; }

.inbox-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  line-height: 1;
  font-weight: 700;
  color: rgba(240,239,232,0.45);
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.inbox-tab--active {
  background: rgba(204,255,0,0.1);
  color: var(--lime);
}

.inbox-items {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.inbox-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}

.inbox-item:hover  { background: rgba(255,255,255,0.03); }
.inbox-item--active { background: rgba(204,255,0,0.06); border-left: 2px solid var(--lime); }
.inbox-item[data-state~="needs_you"] {
  box-shadow: inset 3px 0 0 rgba(204,255,0,0.78);
}

.inbox-item[data-state~="needs_you"] .inbox-item__preview::before {
  content: "Needs your reply";
  display: inline-flex;
  margin-right: 6px;
  color: var(--lime);
  font-weight: 800;
}

.inbox-item__avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
}

.inbox-item__avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.inbox-item__channel-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: inline-flex;
}

.inbox-item__channel-badge .channel-icon {
  width: 19px;
  height: 19px;
  min-width: 19px;
  padding: 0;
  box-shadow: 0 0 0 2px var(--workspace-panel, #10120f);
}

.inbox-item__body  { flex: 1; min-width: 0; }

.inbox-item__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.inbox-item__name {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--white);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item__time {
  font-size: 0.7rem;
  color: rgba(240,239,232,0.35);
  white-space: nowrap;
  flex: 0 0 auto;
}

.inbox-item__service {
  font-size: 0.76rem;
  color: rgba(240,239,232,0.45);
  margin: 2px 0 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item__meta { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }

.state-pill {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  color: rgba(240,239,232,0.45);
}

.risk-dot { font-size: 0.8rem; }

/* ── Inbox detail pane ── */
.inbox-detail {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.inbox-detail__body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 320px);
  align-items: stretch;
  gap: 0;
}

.inbox-detail__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.inbox-detail__name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
  margin: 0;
}

.inbox-detail__sub {
  font-size: 0.78rem;
  color: rgba(240,239,232,0.45);
  margin: 2px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.inbox-detail__actions { flex: 0 0 auto; }

/* Conversation + AI panel side by side */
.conversation-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.conversation-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

.msg__bubble {
  padding: 10px 14px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--white);
  max-width: min(80%, 560px);
  overflow-wrap: anywhere;
}

.msg--in .msg__bubble {
  align-self: flex-start;
  margin-right: auto;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px 10px 10px 2px;
}

.msg--out .msg__bubble {
  background: rgba(204,255,0,0.1);
  border: 1px solid rgba(204,255,0,0.2);
  border-radius: 10px 10px 2px 10px;
  align-self: flex-end;
  margin-left: auto;
}

.msg--system {
  text-align: center;
  font-size: 0.72rem;
  color: rgba(240,239,232,0.3);
}

.msg__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: rgba(240,239,232,0.3);
  margin-top: 3px;
}

.msg--in .msg__meta {
  justify-content: flex-start;
}

.msg--out .msg__meta {
  justify-content: flex-end;
}

.channel-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  min-width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 999px;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: var(--black);
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(17,24,39,0.12);
  overflow: hidden;
}

.channel-icon--sms {
  background: rgba(114,173,255,0.88);
}

.channel-icon--email {
  background: rgba(255,255,255,0.82);
}

.channel-icon--gmail,
.channel-icon--outlook,
.channel-icon--microsoft {
  background: #fff;
  border-color: rgba(17,24,39,0.14);
}

.channel-icon__svg {
  width: 0.82rem;
  height: 0.82rem;
  display: block;
}

.channel-icon__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.channel-icon--whatsapp {
  background: rgba(37,211,102,0.88);
}

.channel-logo-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.channel-logo-lockup__img {
  display: block;
  width: 0.82rem;
  height: 0.82rem;
  object-fit: contain;
}

.channel-logo-lockup__img--light-ui {
  display: none;
}

html[data-theme="light"] .channel-logo-lockup__img--dark-ui {
  display: none;
}

html[data-theme="light"] .channel-logo-lockup__img--light-ui {
  display: block;
}

/* ── AI Analysis panel ── */
.ai-panel {
  width: auto;
  min-width: 0;
  border-left: 1px solid rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  background: rgba(255,255,255,0.01);
}

.ai-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.ai-panel__label {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.action-more {
  position: relative;
}

.action-more > summary {
  cursor: pointer;
  list-style: none;
}

.action-more > summary::-webkit-details-marker {
  display: none;
}

.action-more[open] {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.ai-confidence {
  font-size: 0.68rem;
  color: rgba(240,239,232,0.4);
}

.ai-panel__body {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.ai-row__label {
  font-size: 0.72rem;
  color: rgba(240,239,232,0.4);
  white-space: nowrap;
  flex: 0 0 auto;
}

.ai-row__value {
  font-size: 0.78rem;
  color: var(--white);
  font-weight: 600;
  text-align: right;
}

.ai-section { display: flex; flex-direction: column; gap: 7px; }

.ai-section__label {
  font-size: 0.68rem;
  font-weight: 800;
  color: rgba(240,239,232,0.4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.ai-flags { display: flex; flex-wrap: wrap; gap: 5px; }

.snapshot-attention-note,
.snapshot-waiting-line {
  margin: 0.35rem 0 0;
  font-size: 0.76rem;
  line-height: 1.45;
  color: rgba(240,239,232,0.7);
}

.snapshot-attention-note {
  color: var(--lime);
  font-weight: 800;
}

.snapshot-waiting-line {
  color: rgba(240,239,232,0.58);
}

.ai-suggested { display: flex; flex-direction: column; gap: 8px; }

.suggested-message {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--white);
  line-height: 1.5;
  white-space: pre-line;
}

.suggested-actions { display: flex; gap: 5px; flex-wrap: wrap; }

.ai-score-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 2px;
}

.ai-score-bar__fill {
  height: 100%;
  background: var(--lime);
  border-radius: 999px;
  transition: width 0.4s ease;
}

.ai-score-label {
  font-size: 0.72rem;
  color: rgba(240,239,232,0.5);
  margin-top: 4px;
}

.inbox-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: rgba(240,239,232,0.35);
  text-align: center;
  padding: 3rem;
}

.inbox-empty-state__icon { font-size: 2.5rem; }
.inbox-empty-state h3 { color: var(--white); font-size: 1rem; }
.inbox-empty-state p { font-size: 0.85rem; max-width: 320px; line-height: 1.6; }

/* ── Responsive adjustments ── */
@media (max-width: 900px) {
  .ws-sidebar { width: 200px; flex: 0 0 200px; }
  .inbox-shell__inner { grid-template-columns: 340px minmax(0, 1fr); }
  .inbox-detail__body { grid-template-columns: minmax(0, 1fr) minmax(240px, 280px); }
  .profile-summary-grid { grid-template-columns: 1fr; }
  .crm-panel--split { grid-template-columns: 1fr; }
  .crm-panel--split > form {
    border-top: 1px solid rgba(255,255,255,0.07);
    border-left: 0;
  }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minimal-table th,
  .minimal-table td { padding: 12px 14px; }
}

@media (max-width: 700px) {
  .workspace-shell { flex-direction: column; min-height: auto; }
  .ws-sidebar { width: 100%; flex: 0 0 auto; min-height: 0; height: auto; position: static; overflow: visible; }
  .ws-sidebar__logo, .ws-sidebar__user, .ws-sidebar__footer { display: none; }
  .inbox-shell__inner { grid-template-columns: 1fr; }
  .ws-main {
    width: 100%;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  .ws-content,
  .inbox-shell__inner,
  .crm-settings,
  .crm-services,
  .crm-billing {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
  }
  .ws-content {
    padding: 16px 14px 28px;
  }
  .ws-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
    flex: none;
    align-content: start;
  }
  .ws-nav__section-label { display: none; }
  .ws-nav__item {
    gap: 5px;
    padding: 8px 8px;
    font-size: 0.68rem;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
  }
  .ws-stats-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
  }
  .ws-stat {
    min-width: 0;
    padding: 14px 12px;
  }
  .ws-stat:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .ws-section {
    margin-bottom: 24px;
  }
  .ws-section__title {
    justify-content: center;
    text-align: center;
    flex-wrap: wrap;
  }
  .inbox-shell { flex-direction: column; height: auto; }
  .inbox-list,
  .inbox-detail {
    width: 100%;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 12px;
    background: rgba(17,17,17,0.72);
  }
  .inbox-list {
    flex: 0 0 auto;
    max-height: 320px;
    margin-bottom: 12px;
  }
  .inbox-list__head,
  .inbox-detail__head {
    padding-left: 14px;
    padding-right: 14px;
  }
  .inbox-tabs {
    padding: 8px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .inbox-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .inbox-detail__body { grid-template-columns: 1fr; }
  .inbox-detail__head {
    align-items: flex-start;
    flex-direction: column;
  }
  .inbox-detail__actions {
    width: 100%;
  }
  .inbox-detail__actions .btn-card {
    width: 100%;
    justify-content: center;
  }
  .ai-panel { width: 100%; border-left: none; border-top: 1px solid rgba(255,255,255,0.07); }
  .conversation-area { height: auto; }
  .conversation-messages {
    padding: 14px;
  }
  .msg__bubble {
    max-width: 92%;
  }
  .ai-panel__head,
  .ai-panel__body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .form-grid { grid-template-columns: 1fr; }
  .location-field-row,
  .integration-grid {
    grid-template-columns: 1fr;
  }
  .integration-card__top {
    align-items: flex-start;
    flex-direction: column;
  }
  .crm-settings,
  .crm-services {
    gap: 12px;
  }
  .crm-billing {
    gap: 12px;
  }
  .crm-panel__head {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 14px;
  }
  .crm-panel__head .btn,
  .crm-panel__head .status-pill {
    align-self: flex-start;
  }
  .crm-data-grid { grid-template-columns: 1fr; }
  .crm-data-row,
  .crm-data-row:nth-child(2) {
    border-top: 1px solid rgba(255,255,255,0.065);
    padding: 10px 14px;
  }
  .crm-data-row:first-child { border-top: 0; }
  .crm-data-row strong { text-align: left; }
  .crm-review-form { padding: 12px 14px; }
  .service-table-wrap--crm { overflow: visible; }
  .service-table--crm { min-width: 0; }
  .service-table--crm .service-row__cell {
    min-height: 0;
  }
  .service-card__head { grid-template-columns: 32px minmax(0, 1fr); }
  .service-card__head .remove-link { grid-column: 1 / -1; justify-self: end; }
  .minimal-table,
  .minimal-table thead,
  .minimal-table tbody,
  .minimal-table th,
  .minimal-table td,
  .minimal-table tr { display: block; width: 100%; }
  .minimal-table thead { display: none; }
  .minimal-table tr { border-top: 1px solid rgba(255,255,255,0.07); padding: 10px 0; }
  .minimal-table td { border-top: 0; padding: 6px 0; }
  .minimal-table td::before {
    content: attr(data-label);
    display: block;
    color: var(--white-50);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
  }
}

/* ================================================================
   CRM SETUP ACCOUNT PAGES
   ================================================================ */

.setup-account {
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  min-width: 0;
}

.setup-account--wide {
  max-width: 1360px;
}

.account-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.account-hero--dense {
  padding-bottom: 14px;
}

.account-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.account-avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255,255,255,0.34), transparent 32%),
    var(--lime);
  color: var(--black);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.account-identity__copy {
  min-width: 0;
}

.account-eyebrow {
  color: var(--lime);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  line-height: 1.35;
  text-transform: uppercase;
}

.account-identity__copy h1 {
  margin: 2px 0 0;
  color: var(--white);
  font-size: 1.48rem;
  font-weight: 820;
  letter-spacing: 0;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.account-identity__copy p {
  margin: 5px 0 0;
  color: var(--white-50);
  font-size: 0.84rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.account-status-strip,
.account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.account-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.035);
  color: var(--white-60);
  font-size: 0.74rem;
  font-weight: 760;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.account-status--active {
  border-color: rgba(204,255,0,0.28);
  background: rgba(204,255,0,0.08);
  color: var(--lime);
}

.account-status-strip--stacked {
  justify-content: flex-start;
  align-items: flex-start;
}

.account-status--warn {
  border-color: rgba(255,200,0,0.24);
  color: #ffd166;
}

.account-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 3px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.account-tab {
  flex: 0 0 auto;
  padding: 8px 11px;
  border-radius: 6px;
  color: var(--white-55);
  font-size: 0.78rem;
  font-weight: 740;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.account-tab:hover {
  color: var(--white);
  background: rgba(255,255,255,0.045);
}

.account-tab--active {
  color: var(--black);
  background: var(--lime);
}

.setup-alert {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--white-70);
  font-size: 0.82rem;
  line-height: 1.4;
}

.setup-alert--success {
  border-color: rgba(204,255,0,0.28);
  color: var(--lime);
}

.setup-alert--danger {
  border-color: rgba(255,96,96,0.35);
  color: var(--magenta);
}

.setup-alert--warn {
  border-color: rgba(197,255,0,0.28);
  background: rgba(197,255,0,0.08);
  color: var(--white);
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 16px;
  align-items: start;
}

.account-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.account-section {
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(14,14,14,0.72);
  overflow: hidden;
}

.account-section--main {
  min-height: 0;
}

.account-section--flush {
  overflow: visible;
}

.account-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.account-section__head h2 {
  margin: 0;
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 790;
  letter-spacing: 0;
  line-height: 1.25;
}

.account-section__head p {
  margin: 4px 0 0;
  color: var(--white-45);
  font-size: 0.76rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.account-list {
  display: grid;
}

.account-list--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.065);
}

.account-row:first-child,
.account-list--grid .account-row:nth-child(2) {
  border-top: 0;
}

.account-row span {
  color: var(--white-48);
  font-size: 0.76rem;
  font-weight: 710;
  line-height: 1.45;
}

.account-row strong {
  color: var(--white);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
  overflow-wrap: anywhere;
}

.account-list--compact .account-row {
  padding-top: 10px;
  padding-bottom: 10px;
}

.account-row--stacked {
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 4px;
}

.account-row--stacked small {
  grid-column: 1 / -1;
  color: var(--white-52);
  font-size: 0.72rem;
  line-height: 1.45;
}

.account-form {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.account-form--inline {
  padding-top: 6px;
}

.account-form .auth-input {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.82rem;
}

.account-form .field-help {
  margin: -2px 0 1px;
  font-size: 0.73rem;
}

.account-empty {
  padding: 22px 14px;
  color: var(--white-50);
  font-size: 0.84rem;
  line-height: 1.5;
}

.account-table-wrap {
  min-width: 0;
  overflow-x: auto;
  scrollbar-color: rgba(204,255,0,0.38) rgba(255,255,255,0.05);
}

.account-table-wrap--scroll {
  border-radius: 0 0 8px 8px;
}

.account-editor-form,
.account-editor-form .account-section,
.account-editor-form .account-table-wrap,
.account-editor-form .service-table-wrap {
  min-width: 0;
}

.account-editor-form .account-table-wrap,
.account-editor-form .service-table-wrap {
  overflow-x: hidden;
}

.account-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.account-table th,
.account-table td {
  padding: 11px 14px;
  border-top: 1px solid rgba(255,255,255,0.065);
  color: var(--white-65);
  font-size: 0.8rem;
  line-height: 1.45;
  text-align: left;
  vertical-align: middle;
}

.account-table th {
  border-top: 0;
  color: var(--white-45);
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-table td strong {
  color: var(--white);
  font-weight: 760;
}

.account-table__current {
  background: rgba(204,255,0,0.045);
}

.account-mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin-left: 8px;
  padding: 3px 8px;
  border: 1px solid rgba(204,255,0,0.26);
  border-radius: 999px;
  color: var(--lime);
  font-size: 0.66rem;
  font-weight: 820;
  line-height: 1.2;
}

.account-row-action {
  min-width: 96px;
  justify-content: center;
}

.account-service-table {
  min-width: 0;
  table-layout: fixed;
}

.account-service-table th,
.account-service-table td {
  padding: 9px 8px;
}

.account-service-table input,
.account-service-table select,
.account-service-table .segmented {
  min-width: 0;
}

.account-service-table .segment span {
  white-space: normal;
}

.account-service-table .auth-input {
  min-height: 36px;
  border-radius: 7px;
  padding: 7px 8px;
  font-size: 0.74rem;
}

.account-service-table .segment span {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 7px;
  font-size: 0.68rem;
}

.account-service-table .service-row__num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.68rem;
}

.account-service-table .service-row__remove {
  font-size: 0.72rem;
}

@media (max-width: 980px) {
  .account-layout {
    grid-template-columns: 1fr;
  }

  .account-list--grid {
    grid-template-columns: 1fr;
  }

  .account-list--grid .account-row:nth-child(2) {
    border-top: 1px solid rgba(255,255,255,0.065);
  }
}

@media (max-width: 700px) {
  .setup-account {
    gap: 12px;
  }

  .setup-account,
  .account-layout,
  .account-side {
    width: 100%;
    margin: 0 auto;
  }

  .account-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .account-avatar {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    font-size: 1rem;
  }

  .account-identity__copy h1 {
    font-size: 1.22rem;
  }

  .account-status-strip,
  .account-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .account-actions .btn {
    width: auto;
    min-height: 40px;
  }

  .account-tabs {
    width: 100%;
    overflow: hidden;
  }

  .account-tab {
    flex: 1 1 0;
    min-width: 0;
    padding-inline: 7px;
    font-size: 0.72rem;
    text-align: center;
    white-space: normal;
  }

  .account-section__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .account-section {
    border-radius: 12px;
  }

  .account-row {
    display: grid;
    gap: 4px;
  }

  .account-row strong {
    text-align: left;
  }

  .account-form,
  .account-empty {
    padding-left: 12px;
    padding-right: 12px;
  }

  .account-table,
  .account-table thead,
  .account-table tbody,
  .account-table th,
  .account-table td,
  .account-table tr,
  .account-service-table,
  .account-service-table thead,
  .account-service-table tbody,
  .account-service-table th,
  .account-service-table td,
  .account-service-table tr {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .account-table thead,
  .account-service-table thead {
    display: none;
  }

  .account-table tr,
  .account-service-table tr {
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,0.07);
  }

  .account-table td,
  .account-service-table td {
    display: grid;
    gap: 7px;
    padding: 8px 0;
    border-top: 0;
  }

  .account-table td::before,
  .account-service-table td::before {
    content: attr(data-label);
    color: var(--white-45);
    font-size: 0.63rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .account-service-table .service-row__num {
    width: 100%;
  }

  .account-row-action {
    width: 100%;
  }
}
[hidden] {
  display: none !important;
}

/* ----------------------------------------------------------------
   MOBILE-FIRST CRM IA REFACTOR
   ---------------------------------------------------------------- */
body:has(.workspace-shell) {
  letter-spacing: 0;
}

.ws-mobile-topbar {
  display: none;
}

.mobile-page-head,
.today-section__head,
.inbox-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mobile-page-head {
  margin-bottom: 12px;
}

.mobile-page-title {
  margin: 2px 0 0;
  color: var(--white);
  font-size: 1.35rem;
  font-weight: 820;
  line-height: 1.12;
}

.crm-today,
.settings-hub,
.services-mobile,
.billing-mobile {
  display: grid;
  gap: 12px;
  width: min(100%, 1040px);
  margin: 0 auto;
}

.today-section {
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(14,14,14,0.72);
}

.today-section__head {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.today-section__head h2 {
  margin: 0;
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 790;
  line-height: 1.25;
}

.today-section__head p {
  margin: 4px 0 0;
  color: var(--white-45);
  font-size: 0.76rem;
  line-height: 1.45;
}

.today-action-list {
  padding: 10px;
}

.today-action-list .action-card {
  margin-bottom: 8px;
  border-radius: 8px;
  padding: 12px;
}

.card-summary {
  display: grid;
  gap: 4px;
}

.card-summary strong {
  color: var(--white);
  font-size: 0.95rem;
  line-height: 1.25;
}

.card-summary span,
.card-summary small,
.card-summary__meta {
  color: var(--white-55);
  font-size: 0.78rem;
  line-height: 1.4;
}

.compact-metric-list,
.crm-row-list,
.quick-action-list,
.settings-row-list {
  display: grid;
}

.compact-metric-row,
.crm-row,
.quick-action-row,
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 14px;
  border-top: 1px solid rgba(255,255,255,0.065);
  color: inherit;
  text-decoration: none;
}

.compact-metric-row:first-child,
.crm-row:first-child,
.quick-action-row:first-child,
.settings-row:first-child {
  border-top: 0;
}

.compact-metric-row span,
.quick-action-row span,
.settings-row small,
.crm-row__main small {
  color: var(--white-50);
  font-size: 0.76rem;
  line-height: 1.35;
}

.compact-metric-row strong,
.quick-action-row strong,
.settings-row strong,
.crm-row__main strong {
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.compact-metric-row strong {
  color: var(--lime);
  font-variant-numeric: tabular-nums;
}

.crm-row--button {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
}

.crm-row--button:hover,
.quick-action-row:hover,
.settings-row:hover {
  background: rgba(255,255,255,0.035);
}

.crm-row__avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 820;
}

.crm-row__main,
.settings-row__main {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin-right: auto;
}

.crm-row__main strong,
.crm-row__main small,
.settings-row__main strong,
.settings-row__main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-row__meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  color: var(--white-45);
  font-size: 0.72rem;
}

.today-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  gap: 12px;
  align-items: start;
}

.settings-grid--diagnostics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px;
}

.account-form--compact {
  border-top: 1px solid rgba(255,255,255,0.065);
}

.account-actions--padded {
  padding: 12px;
}

.account-disclosure {
  display: block;
}

.account-disclosure > summary {
  cursor: pointer;
  list-style: none;
}

.account-disclosure > summary::-webkit-details-marker,
.ai-drawer > summary::-webkit-details-marker,
.service-config > summary::-webkit-details-marker,
.mobile-accordion > summary::-webkit-details-marker {
  display: none;
}

.mobile-accordion__chevron,
.mobile-sheet-head,
.mobile-service-save {
  display: none;
}

.account-section--nested {
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  box-shadow: none;
}

.service-config-list {
  display: grid;
}

.service-config {
  border-top: 1px solid rgba(255,255,255,0.065);
}

.service-config:first-child {
  border-top: 0;
}

.service-config__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.service-config__summary .service-row__num {
  width: 28px;
  flex: 0 0 28px;
}

.service-config__summary .account-status {
  flex: 0 0 auto;
}

.service-config__summary:hover {
  background: rgba(255,255,255,0.03);
}

.service-config__main {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin-right: auto;
}

.service-config__main strong,
.service-config__main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-config__main strong {
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 780;
}

.service-config__main small {
  color: var(--white-50);
  font-size: 0.74rem;
  line-height: 1.35;
}

.service-config__body {
  padding: 0 14px 14px 58px;
}

.service-config__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.form-grid--compact {
  gap: 10px;
}

.form-grid--compact .auth-input {
  min-height: 40px;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 0.82rem;
}

.form-grid--compact .segment span {
  min-height: 32px;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.72rem;
}

.billing-mobile {
  max-width: 760px;
}

.inbox-title-row {
  margin-bottom: 10px;
}

.inbox-list__sub {
  margin: 2px 0 0;
  color: var(--white-45);
  font-size: 0.74rem;
  line-height: 1.25;
}

.inbox-setup-alert {
  margin: 8px 12px 0;
}

button.inbox-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: transparent;
  font-family: inherit;
  text-align: left;
}

.inbox-item.inbox-item--active {
  border-left: 2px solid var(--lime);
}

.inbox-item__preview {
  display: block;
  margin-top: 2px;
  padding-left: 4px;
  color: rgba(240,239,232,0.45);
  font-size: 0.76rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item__badge {
  align-self: center;
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--lime);
  color: var(--black);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
}

.inbox-detail__identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin-right: auto;
}

.inbox-detail__back {
  display: none;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--white);
  font-size: 1rem;
}

.ai-drawer {
  list-style: none;
}

.ai-drawer .ai-panel__head {
  cursor: pointer;
  list-style: none;
}

.ai-drawer:not([open]) .ai-panel__head {
  border-bottom: 0;
}

.ai-drawer:not([open]) .ai-panel__head::after {
  content: "+";
  color: var(--white-45);
  font-size: 0.7rem;
  font-weight: 750;
}

.ai-drawer[open] .ai-panel__head::after {
  content: "-";
  color: var(--white-45);
  font-size: 0.7rem;
  font-weight: 750;
}

@media (max-width: 980px) {
  .today-grid,
  .settings-grid,
  .settings-grid--diagnostics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .workspace-shell {
    min-height: 100svh;
  }

  .ws-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: #0a0a0a;
  }

  .ws-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px 6px;
  }

  .ws-mobile-topbar__title,
  .ws-mobile-topbar__sub {
    display: block;
    line-height: 1.25;
  }

  .ws-mobile-topbar__title {
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 800;
  }

  .ws-mobile-topbar__sub {
    color: var(--white-45);
    font-size: 0.72rem;
  }

  .ws-sidebar__alerts {
    display: flex;
    gap: 6px;
    padding: 6px 12px;
    border-bottom: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .ws-sidebar__alerts::-webkit-scrollbar,
  .ws-nav::-webkit-scrollbar,
  .inbox-tabs::-webkit-scrollbar {
    display: none;
  }

  .ws-sidebar__alerts-head,
  .ws-alert-pill--muted {
    display: none;
  }

  .ws-alert-pill {
    flex: 0 0 auto;
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .ws-alert-pill small {
    display: none;
  }

  .ws-nav {
    display: flex;
    grid-template-columns: none;
    gap: 6px;
    padding: 6px 10px 10px;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .ws-nav__section-label {
    display: none;
  }

  .ws-nav__item {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 36px;
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 0.74rem;
    justify-content: center;
    white-space: nowrap;
  }

  .ws-nav__item[href="/documents"] {
    display: none;
  }

  .ws-sidebar__footer {
    display: none;
  }

  .ws-nav__item svg {
    width: 14px;
    height: 14px;
  }

  .ws-nav__badge {
    margin-left: 2px;
  }

  .ws-main {
    min-height: 0;
  }

  .ws-content {
    padding: 12px 12px 24px;
  }

  .mobile-page-head {
    align-items: center;
  }

  .mobile-page-title {
    font-size: 1.18rem;
  }

  .today-action-list {
    padding: 8px;
  }

  .card-actions,
  .workspace-actions {
    gap: 6px;
  }

  .btn-card {
    min-height: 34px;
    padding: 7px 10px;
  }

  .inbox-shell {
    overflow: visible;
  }

  .inbox-shell__inner {
    width: 100%;
    max-width: none;
    min-height: calc(100svh - 118px);
  }

  .inbox-list {
    height: calc(100svh - 118px);
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .inbox-detail {
    display: none;
    height: calc(100svh - 118px);
    border: 0;
    border-radius: 0;
  }

  .inbox-shell--conversation-open .inbox-list {
    display: none;
  }

  .inbox-shell--conversation-open .inbox-detail {
    display: flex;
  }

  .inbox-detail__back {
    display: inline-flex;
  }

  .inbox-detail__head {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .inbox-detail__actions {
    width: auto;
  }

  .inbox-detail__actions .btn-card {
    width: auto;
  }

  .inbox-detail__body {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  .conversation-area {
    flex: 1 1 auto;
    min-height: 0;
  }

  .conversation-messages {
    padding: 12px;
  }

  .msg__bubble {
    max-width: 88%;
  }

  .ai-panel {
    flex: 0 0 auto;
    width: 100%;
    max-height: 42svh;
    border-left: 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    background: rgba(14,14,14,0.95);
  }

  .ai-drawer:not([open]) {
    max-height: none;
  }

  .ai-panel__body {
    overflow-y: auto;
  }

  .service-config__summary {
    padding: 11px 12px;
  }

  .service-config__body {
    padding: 0 12px 12px;
  }

  .service-config__summary .account-status {
    display: none;
  }

  .form-grid--compact {
    grid-template-columns: 1fr;
  }

  .settings-row,
  .crm-row,
  .quick-action-row,
  .compact-metric-row {
    padding: 11px 12px;
  }

  .billing-mobile .account-row:not(.account-row--stacked),
  .settings-hub .account-row:not(.account-row--stacked) {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
  }

  .billing-mobile .account-row span,
  .settings-hub .account-row span {
    min-width: 0;
  }

  .billing-mobile .account-row strong,
  .settings-hub .account-row strong {
    max-width: 62%;
    text-align: right;
    overflow-wrap: anywhere;
  }

  .settings-mobile-logout {
    display: block;
  }

  .settings-hub,
  .services-mobile {
    gap: 8px;
  }

  .settings-hub .account-hero,
  .services-mobile .account-hero {
    padding: 12px;
    border-radius: 10px;
  }

  .settings-hub .account-hero h1,
  .services-mobile .account-hero h1 {
    font-size: 1.05rem;
    line-height: 1.2;
  }

  .settings-hub .account-hero p,
  .services-mobile .account-hero p {
    font-size: 0.75rem;
    line-height: 1.35;
  }

  .settings-hub .settings-grid,
  .services-mobile .account-editor-form {
    gap: 8px;
  }

  .mobile-accordion {
    overflow: hidden;
    padding: 0;
    border-radius: 10px;
    background: rgba(17,17,17,0.92);
    box-shadow: none;
  }

  .mobile-accordion__summary {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 10px;
    min-height: 48px;
    padding: 10px 14px;
    cursor: pointer;
    list-style: none;
  }

  .mobile-accordion__summary h2 {
    font-size: 0.9rem;
    line-height: 1.2;
  }

  .mobile-accordion__summary p {
    display: none;
  }

  .mobile-accordion__summary .btn,
  .mobile-accordion__summary .btn-card--compact {
    display: none;
  }

  .mobile-accordion__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-left: auto;
    color: var(--white-45);
    font-size: 1rem;
    transform: rotate(-90deg);
    transition: transform var(--dur) var(--ease);
  }

  .mobile-accordion[open] > .mobile-accordion__summary .mobile-accordion__chevron {
    transform: rotate(0deg);
  }

  .mobile-accordion:not([open]) > :not(summary) {
    display: none !important;
  }

  .settings-hub .account-list,
  .services-mobile .account-list,
  .settings-hub .settings-row-list {
    border-top: 1px solid rgba(255,255,255,0.065);
  }

  .settings-hub .account-form,
  .services-mobile .account-form {
    padding: 10px 12px 12px;
  }

  .settings-hub .document-field,
  .services-mobile .document-field {
    margin-top: 8px;
  }

  .settings-hub .form-grid--compact,
  .services-mobile .form-grid--compact {
    gap: 8px;
  }

  .settings-hub .form-grid--compact label,
  .services-mobile .form-grid--compact label {
    display: grid;
    gap: 5px;
  }

  .settings-hub .auth-input,
  .services-mobile .auth-input {
    min-height: 40px;
    font-size: 0.84rem;
  }

  .settings-mobile-logout {
    position: sticky;
    bottom: 10px;
    z-index: 8;
    background: rgba(10,10,10,0.96);
    border-color: rgba(255,31,106,0.16);
  }

  .settings-mobile-logout .account-section__head {
    display: none;
  }

  .settings-mobile-logout .account-form {
    border-top: 0;
    padding: 10px;
  }

  .services-mobile .account-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .services-mobile .account-actions .btn {
    width: 100%;
    min-height: 38px;
  }

  .mobile-service-category > .service-config-list {
    border-top: 1px solid rgba(255,255,255,0.065);
  }

  .service-config {
    position: static;
  }

  .service-config__summary {
    min-height: 50px;
    padding: 10px 12px;
  }

  .service-config__summary .service-row__num {
    display: none;
  }

  .service-config__summary::after {
    content: "Edit";
    margin-left: auto;
    color: var(--lime);
    font-size: 0.72rem;
    font-weight: 800;
  }

  .service-config__body {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 90;
    max-height: 82svh;
    overflow-y: auto;
    padding: 0 14px 16px;
    border: 1px solid rgba(255,255,255,0.09);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    background: #0d0d0d;
    box-shadow: 0 -20px 60px rgba(0,0,0,0.5);
    transform: translateY(105%);
    transition: transform var(--dur) var(--ease);
  }

  .service-config[open] > .service-config__body {
    transform: translateY(0);
  }

  .service-config:not([open]) > .service-config__body {
    display: block !important;
    pointer-events: none;
  }

  .mobile-sheet-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 -14px 12px;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: #0d0d0d;
  }

  .mobile-sheet-head strong {
    display: block;
    color: var(--white);
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .mobile-sheet-close {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 8px;
    color: var(--white);
    background: rgba(255,255,255,0.04);
    font-size: 0.76rem;
    font-weight: 750;
  }

  .service-config__actions {
    position: sticky;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 12px -14px -16px;
    padding: 12px 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: #0d0d0d;
  }

  .service-row__remove,
  .mobile-service-save {
    width: 100%;
  }

  .mobile-service-save {
    display: inline-flex;
  }

  body.mobile-sheet-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(0,0,0,0.55);
  }

  .account-disclosure > summary {
    display: flex;
  }
}

/* ----------------------------------------------------------------
   SIMPLIFIED PRODUCT NAV + INBOX AI PANEL
   ---------------------------------------------------------------- */
.notification-row-list {
  display: grid;
}

.notification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.065);
  color: inherit;
  text-decoration: none;
}

.notification-row:first-child {
  border-top: 0;
}

.notification-row:hover {
  background: rgba(255,255,255,0.03);
}

.notification-row--muted {
  opacity: 0.72;
}

.notification-row--warn {
  background: rgba(255,176,0,0.035);
}

.settings-mobile-logout {
  display: none;
}

.notification-row__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notification-row__main strong {
  color: var(--white);
  font-size: 0.85rem;
  line-height: 1.3;
}

.notification-row__main small {
  color: var(--white-48);
  font-size: 0.74rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.notification-row__badge {
  min-width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--lime);
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 850;
}

.notification-row__badge--warn {
  background: #ffb000;
}

.inbox-detail__body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.job-ticket {
  display: grid;
  gap: 14px;
}

.job-ticket__head {
  display: grid;
  gap: 4px;
}

.job-ticket__head p {
  margin: 0;
  color: var(--white-55);
  font-size: 0.84rem;
  line-height: 1.45;
}

.job-ticket__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.job-ticket__rows {
  display: grid;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
}

.job-ticket__rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 12px;
  border-top: 1px solid rgba(255,255,255,0.065);
}

.job-ticket__rows > div:first-child {
  border-top: 0;
}

.job-ticket__rows span,
.job-ticket__summary span {
  flex: 0 0 auto;
  color: var(--white-45);
  font-size: 0.72rem;
  font-weight: 780;
}

.job-ticket__rows strong {
  min-width: 0;
  color: var(--white);
  font-size: 0.82rem;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.job-ticket__summary {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
}

.job-ticket__summary p {
  margin: 0;
  color: var(--white-70);
  font-size: 0.82rem;
  line-height: 1.5;
}

.document-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px) minmax(140px, 180px) auto;
  gap: var(--s3);
  margin-bottom: var(--s4);
}

.document-list {
  display: flex;
  flex-direction: column;
}

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: var(--s3);
  align-items: center;
  padding: var(--s4);
  border-bottom: 1px solid var(--border);
}

.document-row:last-child { border-bottom: 0; }

.document-row__main,
.document-row__meta,
.document-row__actions {
  display: flex;
  gap: var(--s2);
}

.document-row__main,
.document-row__meta {
  flex-direction: column;
}

.document-row__main strong,
.document-row__meta strong {
  color: var(--white);
  font-size: var(--t-sm);
}

.document-row__main small,
.document-row__meta span,
.document-row__meta small {
  color: var(--white-55);
  font-size: var(--t-xs);
}

.document-row__actions {
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.document-hero-actions,
.document-sticky-actions {
  display: flex;
  gap: var(--s2);
  align-items: center;
  flex-wrap: wrap;
}

.document-editor {
  display: grid;
  gap: var(--s4);
}

.document-field {
  display: grid;
  gap: var(--s2);
  margin-top: var(--s3);
}

.document-field span,
.form-grid label span {
  color: var(--white-60);
  font-size: var(--t-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.document-line-items {
  display: grid;
  gap: var(--s2);
}

.document-line-item {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 88px 130px;
  gap: var(--s2);
  align-items: center;
}

.document-sticky-actions {
  position: sticky;
  bottom: var(--s4);
  z-index: 5;
  justify-content: flex-end;
  padding: var(--s3);
  background: rgba(13,13,13,.88);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  backdrop-filter: blur(14px);
}

.job-ticket__actions form {
  display: contents;
}

@media (max-width: 780px) {
  .document-toolbar,
  .document-row,
  .document-line-item {
    grid-template-columns: 1fr;
  }

  .document-row__actions,
  .document-hero-actions,
  .document-sticky-actions {
    justify-content: stretch;
  }

  .document-row__actions .btn-card,
  .document-row__actions form,
  .document-sticky-actions .btn,
  .document-hero-actions .btn {
    width: 100%;
  }
}

.inbox-list,
.inbox-detail {
  padding: 0;
}

.conversation-area {
  flex: 1 1 auto;
  min-height: 0;
}

.conversation-messages {
  min-height: 0;
  overscroll-behavior: contain;
}

.ai-analysis-panel {
  flex: 0 0 auto;
  width: 100%;
  max-height: min(40svh, 360px);
  border-left: 0;
  border-top: 1px solid rgba(255,255,255,0.07);
  background: rgba(14,14,14,0.96);
  overflow: hidden;
}

.ai-analysis-panel .ai-panel__head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(14,14,14,0.98);
}

.ai-analysis-body {
  overflow-y: auto;
  display: grid;
  gap: 12px;
}

.ai-analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ai-analysis-block {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(255,255,255,0.065);
  border-radius: 8px;
  background: rgba(255,255,255,0.025);
}

.ai-analysis-block p {
  margin: 0;
  color: var(--white-70);
  font-size: 0.78rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.ai-row--compact {
  padding-bottom: 6px;
}

.ai-row--compact:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

@media (min-width: 901px) {
  .inbox-shell__inner {
    grid-template-columns: minmax(380px, 400px) minmax(0, 1fr);
  }

  .inbox-detail__body {
    height: 100%;
  }

  .conversation-messages {
    padding: 22px 28px;
  }
}

@media (max-width: 900px) {
  .inbox-detail__body {
    grid-template-columns: none;
  }

  .ai-analysis-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .settings-mobile-logout {
    display: block;
  }

  .calendar-week-nav {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-week-nav__label {
    flex: 1 1 auto;
  }

  .job-ticket__actions .btn-card {
    flex: 1 1 100%;
  }

  .job-ticket__rows > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .job-ticket__rows strong {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .ws-sidebar {
    padding-bottom: 0;
  }

  .ws-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,0.09);
    background: rgba(10,10,10,0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 -12px 28px rgba(0,0,0,0.32);
  }

  .ws-nav__section-label,
  .ws-nav__item--admin {
    display: none;
  }

  .ws-nav__item {
    position: relative;
    min-height: 48px;
    flex-direction: column;
    gap: 3px;
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 0.62rem;
    line-height: 1.1;
  }

  .ws-nav__item svg {
    width: 15px;
    height: 15px;
  }

  .ws-nav__badge {
    position: absolute;
    top: 3px;
    right: 6px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 0.58rem;
  }

  .ws-main,
  .ws-content {
    padding-bottom: calc(82px + env(safe-area-inset-bottom));
  }

  .inbox-shell__inner {
    min-height: calc(100svh - 64px - 72px);
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .inbox-list,
  .inbox-detail {
    height: calc(100svh - 64px - 72px);
  }

  .conversation-messages {
    padding: 14px 12px 18px;
  }

  .ai-analysis-panel {
    max-height: 38svh;
  }

  .ai-analysis-body {
    padding: 12px;
  }

  .notification-row {
    padding: 11px 12px;
  }
}

/* CRM directory/admin pages */
.crm-kpi-strip--centered {
  max-width: 980px;
  margin-inline: auto;
  width: 100%;
}

.crm-dashboard-grid--single {
  grid-template-columns: minmax(0, 920px);
  justify-content: center;
}

.crm-directory-page,
.admin-crm-page {
  width: min(100%, 1240px);
}

.crm-list-panel {
  overflow: visible;
}

.crm-table {
  display: grid;
  min-width: 0;
}

.crm-table__head,
.crm-table__row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--crm-border);
}

.crm-table__head {
  color: var(--crm-muted);
  font-size: 0.7rem;
  font-weight: 760;
  text-transform: uppercase;
}

.crm-table__row {
  color: var(--crm-text);
  background: var(--crm-surface);
}

.crm-table__row:last-child {
  border-bottom: 0;
}

.crm-table__row:hover {
  background: var(--crm-surface-2);
}

.crm-table--jobs .crm-table__head,
.crm-table--jobs .crm-table__row {
  grid-template-columns: minmax(180px, 1.1fr) minmax(150px, 1fr) minmax(190px, 1.2fr) minmax(120px, .7fr) minmax(120px, .7fr) minmax(76px, auto);
}

.crm-table--clients .crm-table__head,
.crm-table--clients .crm-table__row {
  grid-template-columns: minmax(180px, 1.1fr) minmax(170px, 1fr) minmax(220px, 1.2fr) minmax(130px, .7fr) minmax(76px, auto);
}

.admin-user-table .crm-table__head,
.admin-user-table .crm-table__row {
  grid-template-columns: minmax(190px, 1.25fr) minmax(150px, 1fr) minmax(120px, .7fr) minmax(90px, .5fr) minmax(110px, .6fr) minmax(150px, auto);
}

.crm-cell {
  min-width: 0;
  display: grid;
  gap: 2px;
  color: var(--crm-text-soft);
  font-size: 0.82rem;
}

.crm-cell strong {
  min-width: 0;
  color: var(--crm-text);
  font-size: 0.86rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.crm-cell span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.crm-cell small {
  color: var(--crm-muted);
  font-size: 0.72rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.crm-cell--identity {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.crm-cell--actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-crm-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr);
  gap: 16px;
  align-items: start;
}

.admin-crm-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.crm-form-stack {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.admin-filter-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}

.admin-filter-form label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.admin-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-log-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.admin-log-row {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface-2);
}

.admin-log-row strong {
  color: var(--crm-text);
  font-size: 0.78rem;
  font-weight: 720;
  overflow-wrap: anywhere;
}

.admin-log-row span {
  color: var(--crm-muted);
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.crm-data-row--stack {
  align-items: flex-start;
}

.admin-danger-panel {
  border-color: color-mix(in srgb, var(--crm-danger) 26%, var(--crm-border));
}

.admin-danger-actions {
  padding: 12px;
}

html[data-theme="light"] .crm-table__row,
html[data-theme="light"] .admin-log-row {
  background: #ffffff;
}

html[data-theme="light"] .crm-table__row:hover {
  background: #f5f7fa;
}

html[data-theme="light"] .status-pill {
  color: var(--crm-text);
}

@media (max-width: 1100px) {
  .crm-table--jobs .crm-table__head,
  .crm-table--clients .crm-table__head,
  .admin-user-table .crm-table__head {
    display: none;
  }

  .crm-table--jobs .crm-table__row,
  .crm-table--clients .crm-table__row,
  .admin-user-table .crm-table__row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
  }

  .crm-cell--actions {
    justify-content: flex-start;
  }

  .admin-crm-grid,
  .admin-crm-grid--three {
    grid-template-columns: 1fr;
  }

  .admin-filter-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .crm-kpi-strip--centered {
    max-width: none;
  }

  .crm-table--jobs .crm-table__row,
  .crm-table--clients .crm-table__row,
  .admin-user-table .crm-table__row,
  .admin-filter-form {
    grid-template-columns: 1fr;
  }

  .crm-cell--actions,
  .crm-cell--actions form,
  .crm-cell--actions .btn-card,
  .admin-danger-actions .btn-card {
    width: 100%;
  }
}

/* -----------------------------------------------------------------
   Traden CRM Design System Refactor
   Scope: authenticated workspace only.
   ----------------------------------------------------------------- */

body:has(.workspace-shell) {
  min-height: 100svh;
  overflow: hidden;
  cursor: auto;
  letter-spacing: 0;
  background: #07090d;
}

body:has(.workspace-shell) button,
body:has(.workspace-shell) a,
body:has(.workspace-shell) input,
body:has(.workspace-shell) select,
body:has(.workspace-shell) textarea,
body:has(.workspace-shell) label,
body:has(.workspace-shell) summary {
  cursor: pointer;
}

body:has(.workspace-shell) input,
body:has(.workspace-shell) select,
body:has(.workspace-shell) textarea {
  cursor: text;
}

body:has(.workspace-shell) .c-dot,
body:has(.workspace-shell) .c-ring {
  display: none !important;
}

.workspace-shell {
  --crm-bg: #07090d;
  --crm-bg-soft: #0a0d12;
  --crm-sidebar: #090c11;
  --crm-surface: #10141b;
  --crm-surface-2: #141922;
  --crm-surface-3: #1a202a;
  --crm-elevated: #181e28;
  --crm-border: #252c38;
  --crm-border-soft: rgba(255,255,255,0.07);
  --crm-border-strong: #343c49;
  --crm-text: #f4f7f2;
  --crm-text-soft: #d9dfd2;
  --crm-muted: #98a2b3;
  --crm-muted-2: #6f7a89;
  --crm-primary: #ccff00;
  --crm-primary-soft: rgba(204,255,0,0.12);
  --crm-primary-border: rgba(204,255,0,0.34);
  --crm-success: #79d98a;
  --crm-warning: #f8c04e;
  --crm-danger: #ff6b7a;
  --crm-info: #70c7ff;
  --crm-radius-sm: 6px;
  --crm-radius: 8px;
  --crm-radius-lg: 10px;
  --crm-shadow: 0 18px 48px rgba(0,0,0,0.34);
  --crm-focus: 0 0 0 3px rgba(204,255,0,0.18);
  --crm-sidebar-w: 232px;
  display: flex;
  min-height: 100svh;
  background: var(--crm-bg);
  color: var(--crm-text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}

html[data-theme="light"] body:has(.workspace-shell) {
  background: #f6f7f9;
}

html[data-theme="light"] .workspace-shell {
  --crm-bg: #f6f7f9;
  --crm-bg-soft: #eef1f5;
  --crm-sidebar: #ffffff;
  --crm-surface: #ffffff;
  --crm-surface-2: #f7f8fb;
  --crm-surface-3: #eef2f6;
  --crm-elevated: #ffffff;
  --crm-border: #d9e0ea;
  --crm-border-soft: rgba(15,23,42,0.09);
  --crm-border-strong: #c6cfdb;
  --crm-text: #101828;
  --crm-text-soft: #27364a;
  --crm-muted: #667085;
  --crm-muted-2: #8893a4;
  --crm-primary: #5d7f00;
  --crm-primary-soft: rgba(121,169,0,0.12);
  --crm-primary-border: rgba(93,127,0,0.32);
  --crm-success: #1b8550;
  --crm-warning: #a15c00;
  --crm-danger: #c03645;
  --crm-info: #1267a8;
  --crm-shadow: 0 16px 40px rgba(16,24,40,0.10);
  --crm-focus: 0 0 0 3px rgba(93,127,0,0.18);
}

.workspace-shell *,
.workspace-shell *::before,
.workspace-shell *::after {
  letter-spacing: 0;
}

.workspace-shell section {
  padding: 0;
}

.workspace-shell :focus-visible {
  outline: none;
  box-shadow: var(--crm-focus);
}

.ws-sidebar {
  width: var(--crm-sidebar-w);
  flex: 0 0 var(--crm-sidebar-w);
  min-height: 100svh;
  height: 100svh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--crm-sidebar);
  border-right: 1px solid var(--crm-border);
}

.ws-sidebar__logo {
  min-height: 56px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--crm-border);
}

.workspace-shell .nav__logo-mark,
.workspace-shell .footer__logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--crm-primary);
  color: #101300;
  font-size: 0.75rem;
  box-shadow: none;
}

.workspace-shell .nav__logo-text {
  color: var(--crm-text);
  font-size: 0.93rem;
  font-weight: 760;
}

.ws-sidebar__user {
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--crm-border);
}

.ws-user-avatar,
.account-avatar,
.inbox-item__avatar,
.crm-row__avatar {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: var(--crm-radius);
  display: grid;
  place-items: center;
  background: var(--crm-surface-3);
  color: var(--crm-text);
  border: 1px solid var(--crm-border);
  font-size: 0.78rem;
  font-weight: 760;
}

.ws-user-name {
  color: var(--crm-text);
  font-size: 0.82rem;
  font-weight: 690;
}

.ws-user-biz {
  color: var(--crm-muted);
  font-size: 0.72rem;
}

.ws-nav {
  padding: 10px 8px;
}

.ws-nav__section-label {
  padding: 12px 10px 6px;
  color: var(--crm-muted-2);
  font-size: 0.66rem;
  font-weight: 760;
  letter-spacing: .08em;
}

.ws-nav__item {
  min-height: 34px;
  margin: 0 0 2px;
  padding: 7px 10px;
  border-radius: var(--crm-radius);
  color: var(--crm-muted);
  font-size: 0.83rem;
  font-weight: 600;
  line-height: 1.2;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.ws-nav__item svg {
  width: 16px;
  height: 16px;
  color: currentColor;
  opacity: .85;
}

.ws-nav__item:hover {
  background: var(--crm-surface-2);
  color: var(--crm-text);
}

.ws-nav__item--active {
  background: var(--crm-primary-soft);
  color: var(--crm-primary) !important;
  box-shadow: inset 0 0 0 1px var(--crm-primary-border);
}

.ws-nav__badge {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--crm-danger);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 760;
}

.ws-nav__badge--warn {
  background: var(--crm-warning);
  color: #1b1300;
}

.ws-nav__badge--lime {
  background: var(--crm-primary);
  color: #101300;
}

.ws-sidebar__footer {
  padding: 10px 8px 14px;
  border-top: 1px solid var(--crm-border);
}

.ws-main {
  flex: 1;
  min-width: 0;
  height: 100svh;
  overflow-y: auto;
  background: var(--crm-bg);
}

.ws-content {
  width: 100%;
  min-width: 0;
  padding: 24px 28px 40px;
}

.crm-page {
  display: grid;
  gap: 16px;
  width: min(100%, 1160px);
  margin: 0 auto;
}

.calendar-page {
  width: min(100%, 1320px);
}

.crm-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 4px;
}

.crm-page-header h1,
.account-hero h1,
.profile-hero__title {
  margin: 0;
  color: var(--crm-text);
  font-size: 1.5rem;
  font-weight: 760;
  line-height: 1.16;
}

.crm-page-header p,
.account-identity__copy p,
.profile-hero__sub {
  max-width: 720px;
  margin: 5px 0 0;
  color: var(--crm-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.account-eyebrow {
  color: var(--crm-muted-2);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.crm-page-actions,
.account-actions,
.document-hero-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.workspace-shell .btn,
.workspace-shell .btn-card {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: var(--crm-radius);
  border: 1px solid var(--crm-border);
  background: var(--crm-surface-2);
  color: var(--crm-text);
  font-size: 0.8rem;
  font-weight: 680;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: none;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.workspace-shell .btn:hover,
.workspace-shell .btn-card:hover {
  transform: translateY(-1px);
  border-color: var(--crm-border-strong);
  background: var(--crm-surface-3);
  color: var(--crm-text);
  opacity: 1;
}

.workspace-shell .btn--primary,
.workspace-shell .btn-approve {
  border-color: var(--crm-primary-border);
  background: var(--crm-primary);
  color: #101300;
}

.workspace-shell .btn--primary:hover,
.workspace-shell .btn-approve:hover {
  background: var(--crm-primary);
  color: #101300;
}

.workspace-shell .btn--ghost,
.workspace-shell .btn-edit,
.workspace-shell .btn-takeover {
  background: transparent;
  color: var(--crm-text-soft);
}

.workspace-shell .btn-reject {
  border-color: rgba(255,107,122,0.28);
  background: rgba(255,107,122,0.08);
  color: var(--crm-danger);
}

.workspace-shell .auth-input,
.workspace-shell .workspace-textarea,
.workspace-shell select.auth-input,
.workspace-shell textarea.auth-input {
  min-height: 36px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-bg-soft);
  color: var(--crm-text);
  font-size: 0.82rem;
  line-height: 1.35;
  box-shadow: none;
}

.workspace-shell .auth-input::placeholder,
.workspace-shell .workspace-textarea::placeholder {
  color: var(--crm-muted-2);
}

.workspace-shell .auth-input:focus,
.workspace-shell .workspace-textarea:focus {
  border-color: var(--crm-primary-border);
  box-shadow: var(--crm-focus);
}

.form-label,
.document-field span,
.form-grid label span {
  color: var(--crm-muted);
  font-size: 0.72rem;
  font-weight: 680;
  text-transform: none;
  letter-spacing: 0;
}

.field-help,
.workspace-muted {
  color: var(--crm-muted);
}

.crm-panel,
.today-section,
.account-section,
.app-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface);
  box-shadow: none;
}

.crm-panel__head,
.today-section__head,
.account-section__head,
.app-card__head,
.inbox-list__head,
.ai-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--crm-border);
  background: transparent;
}

.crm-panel__head h2,
.today-section__head h2,
.account-section__head h2,
.app-card__title,
.inbox-list__title {
  margin: 0;
  color: var(--crm-text);
  font-size: 0.93rem;
  font-weight: 730;
  line-height: 1.25;
}

.crm-panel__head p,
.today-section__head p,
.account-section__head p,
.app-card__note,
.inbox-list__sub {
  margin: 3px 0 0;
  color: var(--crm-muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.crm-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.crm-kpi {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface);
}

.crm-kpi span,
.crm-kpi small {
  display: block;
  color: var(--crm-muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.crm-kpi strong {
  display: block;
  margin: 4px 0;
  color: var(--crm-text);
  font-size: 1.35rem;
  font-weight: 760;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.crm-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.crm-sidebar-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.today-action-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.action-card {
  margin: 0 !important;
  padding: 12px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface-2);
  box-shadow: none;
}

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

.card-header {
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-type-badge,
.account-status,
.status-pill,
.class-pill,
.flag-pill,
.missing-pill,
.ws-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--crm-border);
  background: var(--crm-surface-2);
  color: var(--crm-muted);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.card-type-badge,
.status-pill--lime,
.account-status--active {
  border-color: rgba(197,255,0,0.78);
  background: rgba(197,255,0,0.24);
  color: #c5ff00;
  box-shadow: 0 0 14px rgba(197,255,0,0.24);
}

.account-status--warn,
.status-pill--warn,
.flag-pill--warn {
  border-color: rgba(255,128,0,0.84);
  background: rgba(255,128,0,0.22);
  color: #ff9a1f;
  box-shadow: 0 0 14px rgba(255,128,0,0.24);
}

.card-time {
  color: var(--crm-muted);
  font-size: 0.72rem;
  font-weight: 650;
}

.card-summary {
  display: grid;
  gap: 3px;
}

.card-summary strong {
  color: var(--crm-text);
  font-size: 0.94rem;
  font-weight: 730;
}

.card-summary span,
.card-summary small,
.card-summary__meta,
.card-note,
.card-slot {
  color: var(--crm-muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.card-message-wrap {
  margin-top: 10px;
  border-top: 1px solid var(--crm-border);
  padding-top: 10px;
}

.card-message-wrap summary {
  color: var(--crm-text-soft);
  font-size: 0.78rem;
  font-weight: 680;
}

.card-message {
  margin-top: 8px;
  width: 100%;
  border-radius: var(--crm-radius);
  border: 1px solid var(--crm-border);
  background: var(--crm-bg-soft);
  color: var(--crm-text);
}

.card-actions {
  margin-top: 10px;
}

.notification-row-list,
.crm-row-list,
.compact-metric-list,
.settings-row-list,
.account-list,
.document-list {
  display: grid;
}

.notification-row,
.crm-data-row,
.compact-metric-row,
.settings-row,
.account-row,
.document-row,
.calendar-history__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 11px 14px;
  border-top: 1px solid var(--crm-border);
  color: var(--crm-text);
  text-decoration: none;
}

.notification-row:first-child,
.crm-data-row:first-child,
.compact-metric-row:first-child,
.settings-row:first-child,
.account-row:first-child,
.document-row:first-child,
.calendar-history__row:first-child {
  border-top: 0;
}

.notification-row:hover,
.crm-data-row:hover,
.settings-row:hover,
.calendar-history__row:hover {
  background: var(--crm-surface-2);
}

.notification-row__main,
.crm-row__main,
.settings-row__main,
.document-row__main,
.document-row__meta {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin-right: auto;
}

.notification-row__main strong,
.crm-row__main strong,
.settings-row__main strong,
.document-row__main strong,
.document-row__meta strong,
.calendar-history__row strong,
.compact-metric-row strong,
.account-row strong {
  color: var(--crm-text);
  font-size: 0.84rem;
  font-weight: 680;
  line-height: 1.35;
}

.notification-row__main small,
.crm-row__main small,
.settings-row__main small,
.document-row__main small,
.document-row__meta span,
.document-row__meta small,
.calendar-history__row small,
.compact-metric-row span,
.account-row span,
.account-row small {
  color: var(--crm-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.notification-row__main strong,
.notification-row__main small,
.crm-row__main strong,
.crm-row__main small,
.settings-row__main strong,
.settings-row__main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-row__badge,
.compact-metric-row strong {
  color: var(--crm-primary);
  font-variant-numeric: tabular-nums;
}

.notification-row--muted {
  opacity: .76;
}

.notification-row--warn {
  background: rgba(248,192,78,0.05);
}

.crm-row__meta {
  color: var(--crm-muted);
  font-size: 0.72rem;
  white-space: nowrap;
}

.ws-empty,
.crm-empty-state,
.empty-box {
  display: grid;
  gap: 8px;
  place-items: start;
  padding: 18px 14px;
  color: var(--crm-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.crm-empty-state {
  place-items: center;
  text-align: center;
  min-height: 180px;
}

.crm-empty-state strong {
  color: var(--crm-text);
  font-size: 0.94rem;
}

.setup-alert {
  padding: 10px 12px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface);
  color: var(--crm-text-soft);
  font-size: 0.82rem;
}

.setup-alert--success {
  border-color: rgba(121,217,138,0.34);
  background: rgba(121,217,138,0.08);
  color: var(--crm-success);
}

.setup-alert--danger {
  border-color: rgba(255,107,122,0.34);
  background: rgba(255,107,122,0.08);
  color: var(--crm-danger);
}

.setup-alert--warn {
  border-color: rgba(248,192,78,0.34);
  background: rgba(248,192,78,0.08);
  color: var(--crm-warning);
}

.crm-toolbar,
.document-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(140px, 180px) minmax(140px, 180px) auto;
  gap: 8px;
  align-items: center;
}

.document-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 250px;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--crm-border);
  color: var(--crm-muted);
  font-size: 0.68rem;
  font-weight: 760;
  text-transform: uppercase;
}

.document-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 250px;
  align-items: center;
  padding: 12px 14px;
}

.document-row__actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.document-row__actions form {
  margin: 0;
}

.settings-layout {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.settings-rail {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 2px;
  padding: 6px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface);
}

.settings-rail a {
  min-height: 32px;
  display: flex;
  align-items: center;
  padding: 7px 9px;
  border-radius: 6px;
  color: var(--crm-muted);
  font-size: 0.8rem;
  font-weight: 620;
}

.settings-rail a:hover {
  background: var(--crm-surface-2);
  color: var(--crm-text);
}

.settings-grid,
.settings-grid--diagnostics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0;
}

.theme-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
}

.theme-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface-2);
}

.theme-choice:hover {
  border-color: var(--crm-border-strong);
}

.theme-choice:has(input:checked) {
  border-color: var(--crm-primary-border);
  background: var(--crm-primary-soft);
}

.theme-choice input {
  margin-top: 2px;
  accent-color: var(--crm-primary);
}

.theme-choice span {
  display: grid;
  gap: 3px;
}

.theme-choice strong {
  color: var(--crm-text);
  font-size: 0.84rem;
}

.theme-choice small {
  color: var(--crm-muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.service-config-list {
  display: grid;
}

.service-config {
  border-top: 1px solid var(--crm-border);
  background: transparent;
}

.service-config:first-child {
  border-top: 0;
}

.service-config__summary {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  min-width: 0;
}

.service-config__summary:hover {
  background: var(--crm-surface-2);
}

.service-row__num {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--crm-border);
  border-radius: 6px;
  color: var(--crm-muted);
  font-size: 0.72rem;
  font-weight: 720;
}

.service-config__main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.service-config__main strong,
.service-config__main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-config__main strong {
  color: var(--crm-text);
  font-size: 0.85rem;
}

.service-config__main small {
  color: var(--crm-muted);
  font-size: 0.74rem;
}

.service-config__body {
  padding: 0 14px 14px 56px;
}

.service-config__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.service-row__remove,
.remove-link {
  color: var(--crm-danger);
  font-size: 0.78rem;
  font-weight: 680;
}

.form-grid,
.form-grid--compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-field,
.form-grid label,
.document-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.form-field--full,
.document-field {
  grid-column: 1 / -1;
}

.segmented,
.crm-segmented {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-bg-soft);
}

.segment {
  display: inline-flex;
}

.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment span,
.crm-segmented__item {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border-radius: 6px;
  color: var(--crm-muted);
  font-size: 0.76rem;
  font-weight: 680;
}

.segment input:checked + span,
.crm-segmented__item--active {
  background: var(--crm-surface-3);
  color: var(--crm-text);
  box-shadow: inset 0 0 0 1px var(--crm-border);
}

.account-form {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-top: 1px solid var(--crm-border);
}

.account-form--inline {
  padding-top: 8px;
}

.account-row {
  align-items: flex-start;
}

.account-row--stacked {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  row-gap: 4px;
}

.account-row--stacked small {
  grid-column: 1 / -1;
}

.account-disclosure {
  margin-top: 12px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-week-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.calendar-week-nav__btn,
.calendar-week-nav__today {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface);
  color: var(--crm-text);
  font-size: 0.8rem;
  font-weight: 720;
}

.calendar-week-nav__btn {
  width: 32px;
}

.calendar-week-nav__today {
  padding: 0 10px;
}

.calendar-week-nav__label {
  display: grid;
  min-width: 116px;
  text-align: center;
}

.calendar-week-nav__label span {
  color: var(--crm-muted);
  font-size: 0.66rem;
  font-weight: 720;
  text-transform: uppercase;
}

.calendar-week-nav__label strong {
  color: var(--crm-text);
  font-size: 0.82rem;
}

.calendar-kpis {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 16px;
  align-items: start;
}

.calendar-board__body {
  padding: 0;
}

.calendar-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--crm-muted);
  font-size: 0.74rem;
  font-weight: 650;
}

.calendar-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-legend__swatch {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.calendar-legend__swatch--traden { background: var(--crm-primary); }
.calendar-legend__swatch--external { background: var(--crm-info); }
.calendar-legend__swatch--conflict { background: var(--crm-danger); }

.calendar-week {
  --time-col: 56px;
  --hour-height: 76px;
  --half-hour-height: 38px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.calendar-week__head {
  display: grid;
  grid-template-columns: var(--time-col) repeat(7, minmax(104px, 1fr));
  min-width: 840px;
  border-bottom: 1px solid var(--crm-border);
  background: var(--crm-surface-2);
}

.calendar-week__corner {
  border-right: 1px solid var(--crm-border);
}

.calendar-week__day {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-right: 1px solid var(--crm-border);
  color: var(--crm-muted);
  font-size: 0.74rem;
  font-weight: 720;
}

.calendar-week__day strong {
  min-width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--crm-text);
  background: var(--crm-surface-3);
}

.calendar-week__day--today strong {
  background: var(--crm-primary);
  color: #101300;
}

.calendar-week__body {
  display: grid;
  grid-template-columns: var(--time-col) minmax(784px, 1fr);
  min-width: 840px;
}

.calendar-week__times {
  display: grid;
  grid-template-rows: repeat(12, var(--hour-height));
  border-right: 1px solid var(--crm-border);
  background: var(--crm-surface);
}

.calendar-week__time {
  padding: 8px 9px 0 0;
  border-bottom: 1px solid var(--crm-border);
  color: var(--crm-muted);
  font-size: 0.68rem;
  font-weight: 680;
  text-align: right;
}

.calendar-week__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(7, minmax(104px, 1fr));
  height: 912px;
  background:
    linear-gradient(90deg, var(--crm-border) 1px, transparent 1px) 0 0 / calc(100% / 7) 100%,
    repeating-linear-gradient(0deg, var(--crm-border-soft) 0 1px, transparent 1px 38px),
    var(--crm-bg-soft);
}

.calendar-block {
  position: absolute;
  z-index: 2;
  left: 5px;
  width: calc((100% / 7) - 10px);
  min-height: 34px;
  overflow: hidden;
  display: grid;
  gap: 2px;
  align-content: start;
  padding: 7px 8px;
  border-radius: var(--crm-radius);
  border: 1px solid var(--crm-border);
  background: var(--crm-elevated);
  color: var(--crm-text);
  box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}

.calendar-block:hover {
  z-index: 5;
  border-color: var(--crm-border-strong);
}

.calendar-block--traden {
  border-left: 3px solid var(--crm-primary);
  background: linear-gradient(90deg, var(--crm-primary-soft), var(--crm-elevated) 38%);
}

.calendar-block--external {
  border-left: 3px solid var(--crm-info);
}

.calendar-block--conflict {
  border-color: rgba(255,107,122,0.45);
  border-left-color: var(--crm-danger);
}

.calendar-block__time {
  color: var(--crm-muted);
  font-size: 0.66rem;
  font-weight: 720;
}

.calendar-block__title {
  color: var(--crm-text);
  font-size: 0.76rem;
  font-weight: 730;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-block__meta,
.calendar-block__badges {
  color: var(--crm-muted);
  font-size: 0.68rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-block__badges {
  display: flex;
  gap: 4px;
}

.calendar-block__badges span {
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--crm-surface-3);
}

.calendar-now-line {
  position: absolute;
  z-index: 4;
  height: 2px;
  width: calc(100% / 7);
  background: var(--crm-danger);
  pointer-events: none;
}

.calendar-now-line::before {
  content: "";
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--crm-danger);
}

.calendar-now-line span {
  position: absolute;
  right: 4px;
  top: -16px;
  color: var(--crm-danger);
  font-size: 0.64rem;
  font-weight: 760;
}

.calendar-now-line--day-0 { left: calc((100% / 7) * 0); }
.calendar-now-line--day-1 { left: calc((100% / 7) * 1); }
.calendar-now-line--day-2 { left: calc((100% / 7) * 2); }
.calendar-now-line--day-3 { left: calc((100% / 7) * 3); }
.calendar-now-line--day-4 { left: calc((100% / 7) * 4); }
.calendar-now-line--day-5 { left: calc((100% / 7) * 5); }
.calendar-now-line--day-6 { left: calc((100% / 7) * 6); }

.calendar-mobile-list {
  display: none;
}

.calendar-history__list {
  display: grid;
}

.calendar-history__row {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  text-align: left;
}

.calendar-history__row time {
  color: var(--crm-muted);
  font-size: 0.74rem;
}

.calendar-unscheduled-panel .crm-data-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: center;
  gap: 16px;
  min-height: 58px;
  padding: 10px 14px;
}

.calendar-unscheduled-panel .crm-data-row:nth-child(n) {
  grid-column: auto;
}

.calendar-unscheduled-panel .crm-row__main {
  min-width: 0;
  margin: 0;
}

.calendar-unscheduled-panel .crm-row__main strong,
.calendar-unscheduled-panel .crm-row__main small {
  display: block;
  max-width: 100%;
  text-align: left;
}

.calendar-unscheduled-panel .status-pill {
  justify-self: end;
  white-space: nowrap;
}

.inbox-shell {
  height: 100svh;
}

.inbox-shell__inner {
  display: grid;
  grid-template-columns: 400px minmax(0, 1fr);
  height: 100svh;
  background: var(--crm-bg);
}

.inbox-list,
.inbox-detail {
  min-width: 0;
  background: var(--crm-surface);
  border-right: 1px solid var(--crm-border);
}

.inbox-detail {
  display: flex;
  flex-direction: column;
  border-right: 0;
}

.inbox-list__head {
  display: grid;
  gap: 10px;
}

.inbox-search {
  min-height: 36px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-bg-soft);
  color: var(--crm-text);
}

.inbox-tabs {
  align-items: center;
  gap: 3px;
  padding: 8px;
  border-bottom: 1px solid var(--crm-border);
  background: var(--crm-surface);
  overflow-x: auto;
  scrollbar-width: none;
}

.inbox-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--crm-muted);
  font-size: 0.74rem;
  line-height: 1;
  font-weight: 680;
  white-space: nowrap;
}

.inbox-tab--active {
  background: var(--crm-primary-soft);
  color: var(--crm-primary);
}

.inbox-item {
  min-height: 66px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--crm-border);
  background: transparent;
}

.inbox-item:hover,
.inbox-item--active {
  background: var(--crm-surface-2);
}

.inbox-item__name,
.inbox-detail__name {
  color: var(--crm-text);
}

.inbox-item__preview,
.inbox-item__time,
.inbox-detail__sub,
.msg__meta,
.ai-section__label,
.snapshot-waiting-line {
  color: var(--crm-muted);
}

.snapshot-attention-note {
  color: var(--crm-primary);
}

.inbox-detail__head {
  min-height: 62px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--crm-border);
  background: var(--crm-surface);
}

.inbox-detail__body {
  min-height: 0;
  background: var(--crm-bg-soft);
}

.conversation-messages {
  padding: 16px;
}

.msg__bubble {
  border-radius: var(--crm-radius);
  background: var(--crm-surface);
  border: 1px solid var(--crm-border);
  color: var(--crm-text);
}

.msg--out .msg__bubble {
  background: var(--crm-primary-soft);
  border-color: var(--crm-primary-border);
}

.ai-analysis-panel {
  border-top: 1px solid var(--crm-border);
  background: var(--crm-surface);
}

.ai-analysis-panel .ai-panel__head {
  background: var(--crm-surface);
}

.ai-analysis-block {
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface-2);
}

.ws-modal__box {
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  background: var(--crm-surface);
  box-shadow: var(--crm-shadow);
}

.ws-modal__close {
  color: var(--crm-muted);
}

.document-sticky-actions {
  background: rgba(16,20,27,0.9);
  border-color: var(--crm-border);
  border-radius: var(--crm-radius);
}

html[data-theme="light"] .document-sticky-actions {
  background: rgba(255,255,255,0.92);
}

@media (max-width: 1120px) {
  .crm-dashboard-grid,
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-side-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-rail {
    position: static;
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
  }
}

@media (max-width: 900px) {
  body:has(.workspace-shell) {
    overflow: auto;
  }

  .workspace-shell {
    flex-direction: column;
    min-height: auto;
  }

  .ws-sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    width: 100%;
    height: auto;
    min-height: 0;
    flex: 0 0 auto;
    overflow: visible;
  }

  .ws-sidebar__logo,
  .ws-sidebar__user,
  .ws-sidebar__footer {
    display: none;
  }

  .ws-mobile-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--crm-border);
  }

  .ws-mobile-topbar__title {
    display: block;
    color: var(--crm-text);
    font-size: 0.88rem;
    font-weight: 720;
    line-height: 1.2;
  }

  .ws-mobile-topbar__sub {
    display: block;
    color: var(--crm-muted);
    font-size: 0.72rem;
    line-height: 1.2;
  }

  .ws-nav {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    display: flex;
    grid-template-columns: none;
    gap: 4px;
    padding: 8px;
    overflow-x: auto;
    background: transparent;
    border-bottom: 1px solid var(--crm-border);
    border-top: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .ws-nav__section-label {
    display: none;
  }

  .ws-nav__item {
    flex: 0 0 auto;
    flex-direction: row;
    min-height: 34px;
    width: auto;
    margin: 0;
    padding: 7px 10px;
    font-size: 0.8rem;
  }

  .ws-nav__item svg {
    display: none;
  }

  .ws-nav__badge {
    position: static;
    min-width: auto;
    height: auto;
    margin-left: 2px;
    padding: 1px 6px;
    font-size: 0.66rem;
   }

  .ws-main {
    height: auto;
    min-height: calc(100svh - 96px);
    overflow: visible;
    padding-bottom: 0;
  }

  .ws-content {
    padding: 16px;
  }

  .crm-page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .crm-page-actions,
  .account-actions,
  .document-hero-actions {
    justify-content: flex-start;
  }

  .crm-kpi-strip,
  .calendar-kpis,
  .theme-choice-grid,
  .calendar-side-rail {
    grid-template-columns: 1fr;
  }

  .crm-toolbar,
  .document-toolbar,
  .document-table-head,
  .document-row {
    grid-template-columns: 1fr;
  }

  .document-table-head {
    display: none;
  }

  .document-row__actions {
    justify-content: stretch;
  }

  .document-row__actions .btn-card,
  .document-row__actions form {
    width: 100%;
  }

  .form-grid,
  .form-grid--compact {
    grid-template-columns: 1fr;
  }

  .service-config__summary {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .service-config__summary .account-status {
    grid-column: 2;
    justify-self: start;
  }

  .service-config__body {
    padding: 0 12px 12px;
  }

  .calendar-toolbar {
    justify-content: flex-start;
  }

  .calendar-week {
    display: none;
  }

  .calendar-mobile-list {
    display: grid;
    gap: 8px;
    padding: 10px;
  }

  .calendar-mobile-event {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 11px;
    border: 1px solid var(--crm-border);
    border-radius: var(--crm-radius);
    background: var(--crm-surface-2);
    color: var(--crm-text);
    text-align: left;
  }

  .calendar-mobile-event__body {
    display: grid;
    gap: 2px;
    min-width: 0;
  }

  .calendar-mobile-event__time,
  .calendar-mobile-event__meta,
  .calendar-mobile-event > span:last-child {
    color: var(--crm-muted);
    font-size: 0.72rem;
  }

  .calendar-mobile-event__title {
    color: var(--crm-text);
    font-size: 0.84rem;
  }

  .inbox-shell,
  .inbox-shell__inner {
    height: auto;
    min-height: calc(100svh - 96px);
    padding-bottom: 0;
  }

  .inbox-shell__inner {
    grid-template-columns: 1fr;
  }

  .inbox-tabs {
    display: flex;
    width: calc(100dvw - 2rem);
    max-width: calc(100dvw - 2rem);
    margin-left: 0;
    margin-right: 0;
    padding: 8px 10px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .inbox-tab {
    flex: 1 1 0;
    min-width: 0;
  }

  .inbox-list,
  .inbox-detail {
    height: auto;
  }
}

@media (max-width: 560px) {
  .ws-content {
    padding: 12px;
  }

  .crm-page {
    gap: 12px;
  }

  .crm-page-header h1,
  .account-hero h1,
  .profile-hero__title {
    font-size: 1.28rem;
  }

  .crm-kpi {
    padding: 10px;
  }

  .notification-row,
  .crm-data-row,
  .compact-metric-row,
  .settings-row,
  .account-row,
  .document-row,
  .calendar-history__row {
    padding: 10px 12px;
  }

  .workspace-shell .btn,
  .workspace-shell .btn-card {
    min-height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-shell *,
  .workspace-shell *::before,
  .workspace-shell *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* CRM structural cleanup: compact ticket, services, documents and settings. */
.ws-modal__box {
  width: min(720px, calc(100vw - 32px));
  max-height: min(88vh, 920px);
  padding: 40px 10px 10px;
  background: #0f141b;
  border: 1px solid color-mix(in srgb, var(--crm-border) 78%, var(--crm-text) 22%);
  box-shadow: 0 24px 80px rgba(0,0,0,0.72);
  backdrop-filter: none;
}

html[data-theme="light"] .ws-modal__box {
  background: #ffffff;
}

.ws-modal__backdrop {
  background: rgba(2, 5, 10, 0.78);
  backdrop-filter: blur(2px);
}

.ws-modal__close {
  top: 8px;
  right: 8px;
  z-index: 3;
}

.job-ticket {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  background: #0f141b;
}

html[data-theme="light"] .job-ticket {
  background: #ffffff;
}

.job-ticket__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--crm-border);
  background: #121923;
}

html[data-theme="light"] .job-ticket__head {
  background: #f8fafc;
}

.job-ticket__head h3 {
  margin: 2px 0 0;
  color: var(--crm-text);
  font-size: 1rem;
  line-height: 1.25;
}

.job-ticket__head p {
  margin: 4px 0 0;
  color: var(--crm-muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.job-ticket__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--crm-border);
}

.job-ticket__actions form {
  display: contents;
}

.job-ticket__actions .btn-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--crm-border);
  background: #171f2a !important;
  color: var(--crm-text) !important;
  box-shadow: none;
  text-decoration: none;
}

.job-ticket__actions .btn-card:hover {
  border-color: var(--crm-border-strong);
  transform: translateY(-1px);
}

.job-ticket__actions .btn-approve {
  border-color: var(--crm-primary);
  background: var(--crm-primary) !important;
  color: #10140c !important;
}

.job-ticket__rows {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 0;
  border-radius: 0;
  background: transparent;
}

.job-ticket__rows > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 14px;
  border-top: 1px solid var(--crm-border);
  border-right: 1px solid var(--crm-border);
}

.job-ticket__rows > div:nth-child(2n) {
  border-right: 0;
}

.job-ticket__rows span,
.job-ticket__summary span,
.job-ticket__mini-row span {
  color: var(--crm-muted);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.job-ticket__rows strong,
.job-ticket__mini-row strong {
  min-width: 0;
  color: var(--crm-text);
  font-size: 0.8rem;
  line-height: 1.35;
  text-align: right;
  overflow-wrap: anywhere;
}

.job-ticket__accordion {
  display: grid;
  border-top: 1px solid var(--crm-border);
}

.job-ticket__section {
  border-top: 1px solid var(--crm-border);
}

.job-ticket__section:first-child {
  border-top: 0;
}

.job-ticket__section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  color: var(--crm-text);
  font-size: 0.82rem;
  font-weight: 720;
  cursor: pointer;
  list-style: none;
}

.job-ticket__section > summary::-webkit-details-marker,
.document-review-section > summary::-webkit-details-marker,
.service-config__summary::-webkit-details-marker {
  display: none;
}

.job-ticket__section > summary::after,
.document-review-section > summary::after,
.service-config__summary::after {
  content: "v";
  color: var(--crm-muted);
  font-size: 0.7rem;
  transition: transform 160ms ease;
}

.job-ticket__section[open] > summary::after,
.document-review-section[open] > summary::after,
.service-config[open] > .service-config__summary::after {
  transform: rotate(180deg);
}

.job-ticket__section[open] > summary {
  background: var(--crm-surface-2);
}

.job-ticket__summary {
  display: grid;
  gap: 5px;
  padding: 0 14px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.job-ticket__summary p {
  margin: 0;
  color: var(--crm-text);
  font-size: 0.82rem;
  line-height: 1.45;
}

.job-ticket__mini-list {
  display: grid;
  padding: 0 14px 12px;
}

.job-ticket__mini-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 8px 0;
  border-top: 1px solid var(--crm-border);
}

.job-ticket__mini-row:first-child {
  border-top: 0;
}

.service-config__summary {
  grid-template-columns: 30px minmax(0, 1fr);
  cursor: pointer;
}

.service-config__summary .account-status,
.service-row__cell--hidden {
  display: none;
}

.service-config__body {
  padding: 0 14px 14px 56px;
}

.document-review-compact {
  max-width: 1180px;
  gap: 14px;
}

.document-review-header {
  margin-bottom: 0;
}

.document-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  background: var(--crm-surface);
}

.document-summary-strip > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 11px 13px;
  border-left: 1px solid var(--crm-border);
}

.document-summary-strip > div:first-child {
  border-left: 0;
}

.document-summary-strip span {
  color: var(--crm-muted);
  font-size: 0.68rem;
  font-weight: 760;
  text-transform: uppercase;
}

.document-summary-strip strong {
  min-width: 0;
  color: var(--crm-text);
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-review-compact .document-editor {
  display: grid;
  gap: 10px;
}

.document-review-section {
  overflow: hidden;
  border-radius: var(--crm-radius);
}

.document-review-section > summary {
  cursor: pointer;
}

.document-review-section .account-section__head {
  min-height: 52px;
  padding: 11px 14px;
}

.document-review-section .account-section__head h2 {
  font-size: 0.9rem;
}

.document-review-section .account-section__head p {
  font-size: 0.74rem;
}

.document-review-section .form-grid,
.document-review-section .document-field,
.document-review-section .document-line-items,
.document-review-section .account-list {
  padding: 0 14px 14px;
}

.document-review-section .document-field {
  margin-top: 0;
}

.document-review-compact .auth-input {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 0.82rem;
}

.document-review-compact textarea.auth-input {
  min-height: 72px;
}

.document-line-items {
  gap: 0;
}

.document-line-item {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 72px 110px;
  gap: 8px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--crm-border);
}

.document-line-item:first-child {
  border-top: 0;
}

.document-adjustments {
  margin-top: 4px;
}

.document-total-list {
  margin: 0 14px 14px;
  padding: 0;
  overflow: hidden;
}

.document-sticky-actions {
  bottom: 12px;
  justify-content: flex-end;
  padding: 8px;
  background: color-mix(in srgb, var(--crm-surface) 92%, transparent);
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius);
  box-shadow: var(--crm-shadow);
  backdrop-filter: blur(12px);
}

html[data-theme="light"] .document-sticky-actions {
  background: color-mix(in srgb, var(--crm-surface) 94%, transparent);
}

@media (max-width: 780px) {
  .job-ticket__head,
  .job-ticket__actions {
    padding-inline: 12px;
  }

  .job-ticket__rows,
  .document-summary-strip,
  .document-line-item {
    grid-template-columns: 1fr;
  }

  .job-ticket__rows > div,
  .document-summary-strip > div {
    border-right: 0;
    border-left: 0;
  }

  .document-sticky-actions,
  .document-review-header .crm-page-actions {
    justify-content: stretch;
  }

  .document-sticky-actions .btn,
  .document-sticky-actions a,
  .document-review-header .btn {
    width: 100%;
  }

  .service-config__body {
    padding: 0 12px 12px;
  }
}

/* Mobile CRM refinements: denser dashboard, plus disclosures, chat-first inbox. */
.action-card__compact,
.service-config__toggle,
.calendar-month-mobile,
.inbox-composer {
  display: none;
}

.job-ticket__section > summary::after,
.document-review-section > summary::after {
  content: "+";
  color: var(--crm-muted);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1;
  transform: none;
}

.job-ticket__section[open] > summary::after,
.document-review-section[open] > summary::after {
  content: "-";
  transform: none;
}

.service-config__summary::after,
.service-config[open] > .service-config__summary::after {
  content: none;
  display: none;
}

.service-config__toggle {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  color: var(--crm-muted);
  font-size: 1rem;
  font-weight: 760;
  line-height: 1;
}

.service-config[open] > .service-config__summary .service-config__toggle {
  color: var(--crm-primary);
  border-color: var(--crm-primary-border);
}

.service-config[open] > .service-config__summary .service-config__toggle::before {
  content: "-";
}

.service-config[open] > .service-config__summary .service-config__toggle {
  font-size: 0;
}

.service-config[open] > .service-config__summary .service-config__toggle::before {
  font-size: 1rem;
}

@media (max-width: 720px) {
  .crm-kpi--mobile-hidden {
    display: none;
  }

  .crm-page .crm-kpi-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .crm-kpi {
    padding: 9px 8px;
  }

  .crm-kpi span {
    min-height: 2.35em;
    font-size: 0.62rem;
    font-weight: 720;
  }

  .crm-kpi strong {
    margin: 3px 0;
    font-size: 1.08rem;
  }

  .crm-kpi small {
    font-size: 0.64rem;
  }

  .today-action-list {
    padding: 6px;
    gap: 7px;
  }

  .action-card--expandable {
    padding: 0;
    overflow: hidden;
  }

  .action-card__compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 58px;
    padding: 10px 12px;
    cursor: pointer;
    list-style: none;
  }

  .action-card__compact::-webkit-details-marker {
    display: none;
  }

  .action-card__compact-main {
    display: grid;
    gap: 4px;
    min-width: 0;
  }

  .action-card__compact-main strong {
    color: var(--crm-text);
    font-size: 0.86rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .action-card__compact-main small {
    color: var(--crm-muted);
    font-size: 0.72rem;
    line-height: 1.3;
  }

  .action-card__plus {
    display: inline-flex;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    color: var(--crm-muted);
    font-size: 1rem;
    font-weight: 760;
  }

  .action-card--expandable[open] .action-card__plus {
    font-size: 0;
    color: var(--crm-primary);
    border-color: var(--crm-primary-border);
  }

  .action-card--expandable[open] .action-card__plus::before {
    content: "-";
    font-size: 1rem;
  }

  .action-card__detail {
    padding: 0 12px 12px;
  }

  .inbox-detail__actions,
  .ai-analysis-panel {
    display: none;
  }

  .inbox-detail__body,
  .conversation-area {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
  }

  .conversation-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 8px;
  }

  .inbox-composer {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px 10px 10px;
    border-top: 1px solid var(--crm-border);
    background: var(--crm-surface);
  }

  .inbox-composer__input {
    min-height: 38px;
    max-height: 118px;
    flex: 1 1 auto;
    resize: vertical;
    padding: 9px 10px;
    border: 1px solid var(--crm-border);
    border-radius: 10px;
    background: var(--crm-bg-soft);
    color: var(--crm-text);
    font: inherit;
    font-size: 0.86rem;
  }

  .inbox-composer__send {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--crm-primary-border);
    border-radius: 10px;
    background: var(--crm-primary);
    color: #10140c;
    font-size: 0.82rem;
    font-weight: 760;
  }

  .inbox-composer__feedback {
    margin: 0;
    border-radius: 0;
  }

  .calendar-mobile-list[hidden],
  .calendar-month-mobile[hidden] {
    display: none !important;
  }

  .calendar-month-mobile {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    padding: 10px;
  }

  .calendar-month-mobile__day {
    display: grid;
    gap: 3px;
    min-height: 66px;
    padding: 7px 5px;
    border: 1px solid var(--crm-border);
    border-radius: 8px;
    background: var(--crm-surface-2);
  }

  .calendar-month-mobile__day span,
  .calendar-month-mobile__day small {
    color: var(--crm-muted);
    font-size: 0.62rem;
    line-height: 1.15;
  }

  .calendar-month-mobile__day strong {
    color: var(--crm-text);
    font-size: 0.92rem;
    line-height: 1;
  }

  .calendar-month-mobile__day--today {
    border-color: var(--crm-primary-border);
    background: var(--crm-primary-soft);
  }

  .mobile-accordion__chevron {
    display: inline-flex;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--crm-border);
    border-radius: 999px;
    color: var(--crm-muted);
    font-size: 0;
    transform: none;
  }

  .mobile-accordion__chevron::before {
    content: "+";
    font-size: 1rem;
    font-weight: 760;
    line-height: 1;
  }

  .mobile-accordion[open] > .mobile-accordion__summary .mobile-accordion__chevron {
    color: var(--crm-primary);
    border-color: var(--crm-primary-border);
    transform: none;
  }

  .mobile-accordion[open] > .mobile-accordion__summary .mobile-accordion__chevron::before {
    content: "-";
  }

  .services-mobile .service-config__summary {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 26px;
    align-items: center;
    gap: 10px;
  }

  .services-mobile .service-config__main strong,
  .services-mobile .service-config__main small {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  .services-mobile .service-config__main strong {
    line-height: 1.25;
  }

  .services-mobile .service-config__toggle {
    display: inline-flex;
  }

  .settings-hub .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-hub .settings-rail {
    display: none;
  }
}

/* Workspace composition pass: wide operational layouts with deliberate grouping. */
.crm-page.crm-today,
.crm-page.crm-directory-page,
.crm-page.admin-crm-page {
  width: min(100%, 1440px);
}

.crm-kpi-strip--centered {
  max-width: none;
  margin-inline: 0;
}

.crm-dashboard-grid--single {
  grid-template-columns: minmax(0, 1fr);
  justify-content: stretch;
}

.crm-today .crm-panel--attention {
  min-height: 300px;
}

.crm-directory-page .crm-list-panel {
  width: 100%;
}

.crm-table--jobs .crm-table__head,
.crm-table--jobs .crm-table__row {
  grid-template-columns: minmax(200px, 1.25fr) minmax(180px, 1.05fr) minmax(240px, 1.45fr) minmax(125px, .75fr) minmax(130px, .75fr) minmax(76px, auto);
}

.crm-table--clients .crm-table__head,
.crm-table--clients .crm-table__row {
  grid-template-columns: minmax(210px, 1.1fr) minmax(190px, 1fr) minmax(260px, 1.45fr) minmax(150px, .75fr) minmax(76px, auto);
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: minmax(280px, .75fr) minmax(360px, 1.25fr);
  gap: 16px;
}

.admin-health-panel__body {
  display: grid;
  gap: 5px;
  min-height: 96px;
  align-content: center;
  padding: 16px;
}

.admin-health-panel__body strong {
  color: var(--crm-text);
  font-size: .9rem;
}

.admin-health-panel__body span {
  color: var(--crm-muted);
  font-size: .8rem;
  line-height: 1.45;
}

.admin-priority-list {
  display: grid;
  padding: 6px 14px;
}

.admin-priority-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  border-top: 1px solid var(--crm-border);
  color: var(--crm-text-soft);
  font-size: .8rem;
}

.admin-priority-row:first-child {
  border-top: 0;
}

.admin-priority-row:hover {
  color: var(--crm-primary);
}

.admin-priority-row strong {
  color: var(--crm-text);
  font-variant-numeric: tabular-nums;
}

.admin-recovery-panel {
  scroll-margin-top: 20px;
}

.admin-recovery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--crm-border);
}

.admin-queue {
  min-width: 0;
  border-left: 1px solid var(--crm-border);
}

.admin-queue:first-child {
  border-left: 0;
}

.admin-queue__head,
.admin-subsection__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--crm-border);
}

.admin-queue__head h3,
.admin-subsection__head h3 {
  margin: 0;
  color: var(--crm-text);
  font-size: .82rem;
  font-weight: 730;
}

.admin-subsection__head span {
  color: var(--crm-muted);
  font-size: .72rem;
}

.admin-section {
  overflow: hidden;
}

.admin-section__summary {
  cursor: pointer;
  list-style: none;
}

.admin-section__summary::-webkit-details-marker {
  display: none;
}

.admin-section__summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  border: 1px solid var(--crm-border);
  border-radius: 50%;
  color: var(--crm-muted);
  font-size: 1rem;
  font-weight: 700;
}

.admin-section[open] > .admin-section__summary::after {
  content: "-";
  color: var(--crm-primary);
  border-color: var(--crm-primary-border);
}

.admin-access-grid {
  display: grid;
  grid-template-columns: 1fr;
}

.admin-records-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-access-grid > .admin-subsection + .admin-subsection,
.admin-records-grid > .admin-subsection + .admin-subsection {
  border-left: 1px solid var(--crm-border);
}

.admin-access-grid > .admin-subsection + .admin-subsection {
  border-top: 1px solid var(--crm-border);
  border-left: 0;
}

.admin-access-grid .crm-form-stack {
  border-bottom: 1px solid var(--crm-border);
}

.operator-diagnostics .account-section__head {
  cursor: pointer;
}

.operator-diagnostics__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--crm-border);
}

.operator-diagnostics__panel {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.operator-diagnostics__panel + .operator-diagnostics__panel {
  border-left: 1px solid var(--crm-border);
}

.operator-diagnostics__panel--assets {
  grid-column: 1 / -1;
  border-top: 1px solid var(--crm-border);
  border-left: 0 !important;
}

.operator-diagnostics .account-row--stacked {
  grid-template-columns: minmax(0, 1fr) max-content;
}

.operator-diagnostics .account-row--stacked strong {
  max-width: none;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .crm-page.crm-today,
  .crm-page.crm-directory-page,
  .crm-page.admin-crm-page {
    width: 100%;
  }

  .admin-overview-grid {
    grid-template-columns: 1fr;
  }

  .admin-access-grid > .admin-subsection + .admin-subsection {
    border-top: 1px solid var(--crm-border);
    border-left: 0;
  }
}

@media (max-width: 980px) {
  .crm-table--jobs .crm-table__head,
  .crm-table--clients .crm-table__head,
  .admin-user-table .crm-table__head {
    display: none;
  }

  .crm-table--jobs .crm-table__row,
  .crm-table--clients .crm-table__row,
  .admin-user-table .crm-table__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .admin-recovery-grid {
    grid-template-columns: 1fr;
  }

  .admin-queue + .admin-queue {
    border-top: 1px solid var(--crm-border);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .crm-today .crm-panel--attention {
    min-height: 0;
  }

  .crm-table--jobs .crm-table__row,
  .crm-table--clients .crm-table__row,
  .admin-user-table .crm-table__row {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
  }

  .crm-table--jobs .crm-cell:not(.crm-cell--identity):not(.crm-cell--actions),
  .crm-table--clients .crm-cell:not(.crm-cell--identity):not(.crm-cell--actions),
  .admin-user-table .crm-cell:not(.crm-cell--identity):not(.crm-cell--actions) {
    grid-template-columns: minmax(96px, .55fr) minmax(0, 1fr);
    gap: 10px;
  }

  .crm-table--jobs .crm-cell[data-label]::before,
  .crm-table--clients .crm-cell[data-label]::before,
  .admin-user-table .crm-cell[data-label]::before {
    content: attr(data-label);
    color: var(--crm-muted-2);
    font-size: .67rem;
    font-weight: 760;
    text-transform: uppercase;
  }

  .crm-cell--identity::before,
  .crm-cell--actions::before {
    display: none;
  }

  .admin-records-grid,
  .operator-diagnostics__grid {
    grid-template-columns: 1fr;
  }

  .admin-records-grid > .admin-subsection + .admin-subsection,
  .operator-diagnostics__panel + .operator-diagnostics__panel {
    border-top: 1px solid var(--crm-border);
    border-left: 0;
  }

  .operator-diagnostics__panel--assets {
    grid-column: auto;
  }
}

.bot-sandbox-inner {
  grid-template-columns: 320px minmax(0, 1fr);
}

.bot-sandbox-shell.inbox-shell {
  overflow: hidden;
}

.bot-sandbox {
  height: 100svh;
  overflow-y: auto;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.bot-sandbox .bot-sandbox-inner {
  height: min(760px, 100svh);
  min-height: 620px;
}

.bot-sandbox-detail .inbox-detail__body {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  min-height: 0;
  overflow: hidden;
}

.bot-sandbox-reset {
  width: 100%;
  justify-content: center;
}

.bot-sandbox-readiness {
  width: 100%;
  justify-content: center;
  border-color: rgba(197, 255, 0, .28);
  color: var(--crm-primary);
  background: rgba(197, 255, 0, .08);
}

.bot-sandbox-composer {
  display: flex !important;
  flex: 0 0 auto;
  position: relative;
  z-index: 10;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
  border-top: 1px solid var(--crm-border);
  background: var(--crm-surface);
}

.bot-sandbox-composer .inbox-composer__input {
  display: block;
  flex: 1 1 auto;
  min-height: 44px;
  max-height: 130px;
  pointer-events: auto;
  user-select: text;
}

.bot-sandbox-composer .inbox-composer__send {
  flex: 0 0 auto;
  pointer-events: auto;
}

.bot-sandbox-detail .conversation-area {
  min-height: 0;
  position: relative;
}

.bot-sandbox-detail .conversation-messages {
  flex: 1 1 0;
}

.bot-sandbox-panel {
  min-height: 0;
}

.inbox-detail .ai-analysis-body,
.bot-sandbox-detail .ai-analysis-body {
  padding: 10px 12px;
  gap: 8px;
}

.inbox-detail .ai-analysis-grid,
.bot-sandbox-detail .ai-analysis-grid {
  gap: 8px;
}

.inbox-detail .ai-analysis-block,
.bot-sandbox-detail .ai-analysis-block {
  padding: 10px 12px;
  gap: 8px;
  overflow: hidden;
}

.inbox-detail .ai-section__label,
.bot-sandbox-detail .ai-section__label {
  display: block;
  margin-bottom: 4px;
  line-height: 1.25;
}

.inbox-detail .ai-row,
.bot-sandbox-detail .ai-row,
.inbox-detail .ai-row--compact,
.bot-sandbox-detail .ai-row--compact,
.inbox-detail .info-item,
.bot-sandbox-detail .info-item {
  padding: 6px 0;
  gap: 10px;
}

.inbox-detail .ai-row:first-of-type,
.bot-sandbox-detail .ai-row:first-of-type,
.inbox-detail .info-item:first-child,
.bot-sandbox-detail .info-item:first-child {
  padding-top: 2px;
}

.inbox-detail .ai-row__value,
.bot-sandbox-detail .ai-row__value,
.inbox-detail .info-value,
.bot-sandbox-detail .info-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.inbox-detail .ai-score-bar,
.bot-sandbox-detail .ai-score-bar {
  margin: 5px 0 3px;
}

.inbox-detail .ai-analysis-block p,
.bot-sandbox-detail .ai-analysis-block p {
  line-height: 1.35;
}

.inbox-detail .ai-analysis-panel,
.bot-sandbox-detail .ai-analysis-panel {
  overflow-y: auto;
}

@media (max-width: 1080px) {
  .bot-sandbox-inner,
  .bot-sandbox-detail .inbox-detail__body {
    grid-template-columns: 1fr;
  }

  .bot-sandbox .bot-sandbox-inner {
    height: auto;
    min-height: 0;
  }
}

/* Tradesperson workspace clarity pass — plain-English metadata and native mobile layout. */
.crm-table--jobs .crm-table__head,
.crm-table--jobs .crm-table__row {
  grid-template-columns:
    minmax(170px, 1.05fr)
    minmax(190px, 1.15fr)
    minmax(140px, .85fr)
    minmax(112px, .68fr)
    minmax(150px, .9fr)
    minmax(130px, .78fr)
    minmax(88px, auto);
}

.crm-table--clients .crm-table__head,
.crm-table--clients .crm-table__row {
  grid-template-columns:
    minmax(190px, 1.05fr)
    minmax(175px, .9fr)
    minmax(210px, 1.15fr)
    minmax(170px, .9fr)
    minmax(190px, 1fr)
    minmax(100px, auto);
}

.job-next-action {
  color: var(--crm-text-soft) !important;
  line-height: 1.4 !important;
}

.job-priority,
.service-traits span {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid var(--crm-border);
  border-radius: 999px;
  color: var(--crm-text-soft);
  background: var(--crm-surface-2);
  font-size: .68rem;
  font-weight: 720;
  line-height: 1.1;
}

.job-priority--emergency,
.job-priority--today {
  color: var(--crm-warn);
  border-color: color-mix(in srgb, var(--crm-warn) 38%, var(--crm-border));
  background: color-mix(in srgb, var(--crm-warn) 8%, var(--crm-surface-2));
}

.crm-cell-link {
  color: var(--crm-primary);
  font-size: .73rem;
  font-weight: 680;
  line-height: 1.35;
}

.service-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.service-traits--onboarding {
  margin: 0 0 14px 52px;
}

.document-group + .document-group {
  border-top: 1px solid var(--crm-border);
}

.document-group__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 11px 14px;
  background: var(--crm-surface-2);
  border-bottom: 1px solid var(--crm-border);
}

.document-group__head strong {
  color: var(--crm-text);
  font-size: .83rem;
}

.document-group__head span {
  color: var(--crm-muted);
  font-size: .75rem;
}

.document-empty {
  grid-template-columns: 1fr;
  align-items: start;
}

@media (max-width: 980px) {
  .crm-table--jobs .crm-table__row,
  .crm-table--clients .crm-table__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .ws-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    overflow-x: visible;
  }

  .ws-nav__item {
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    padding: 7px 5px;
    text-align: center;
  }

  .ws-nav__item[href="/documents"] {
    display: flex;
  }

  .ws-nav__badge {
    padding-inline: 4px;
  }

  .workspace-shell .btn,
  .workspace-shell .btn-card,
  .workspace-shell summary,
  .document-toolbar .auth-input {
    min-height: 44px;
  }

  .workspace-shell .document-toolbar select.auth-input {
    min-height: 44px;
    height: 44px;
  }

  .crm-cell small,
  .crm-row__main small,
  .settings-row__main small,
  .document-row__main small,
  .document-row__meta span,
  .document-row__meta small {
    font-size: .75rem;
  }
}

@media (max-width: 720px) {
  .crm-table--jobs .crm-table__row,
  .crm-table--clients .crm-table__row {
    grid-template-columns: 1fr;
  }

  .services-mobile .service-config__summary {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  .services-mobile .service-config__main {
    grid-column: 1;
    width: auto;
  }

  .services-mobile .service-config__toggle {
    grid-column: 2;
    justify-self: end;
  }

  .services-mobile .service-row__num {
    display: none;
  }

  .service-traits--onboarding {
    margin-left: 0;
  }

  .document-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .document-kpis .crm-kpi {
    min-width: 0;
  }

  .document-kpis .crm-kpi small {
    display: none;
  }

  .document-group__head {
    display: grid;
    gap: 2px;
  }
}

@media (max-width: 390px) {
  .ws-nav__item {
    font-size: .75rem;
  }
}

.nav__logo .nav__logo-mark,
.auth-card__logo .nav__logo-mark,
.ws-sidebar__logo .nav__logo-mark,
.ws-mobile-topbar .nav__logo-mark,
.footer__brand-link .footer__logo-mark,
.workspace-shell .nav__logo .nav__logo-mark,
.workspace-shell .auth-card__logo .nav__logo-mark,
.workspace-shell .ws-sidebar__logo .nav__logo-mark,
.workspace-shell .ws-mobile-topbar .nav__logo-mark,
.workspace-shell .footer__brand-link .footer__logo-mark {
  background: transparent url("../img/traden-logo-dark.svg") center / contain no-repeat;
  color: transparent;
  font-size: 0;
  letter-spacing: 0;
  overflow: hidden;
}

.customers-page .crm-page-header {
  margin-bottom: 18px;
}

.customers-list-panel .crm-panel__head,
.customers-page .crm-kpi-strip {
  display: none;
}

.crm-table--customers .crm-table__head,
.crm-table--customers .crm-table__row {
  grid-template-columns: minmax(0, 1.2fr) minmax(180px, .9fr) auto;
}

.crm-table--customers .crm-table__row {
  min-height: 64px;
}

.customer-name-cell strong,
.customer-contact-cell span {
  overflow-wrap: anywhere;
}

.crm-muted-text {
  color: var(--crm-muted);
  font-size: .78rem;
}

.customer-profile-page {
  max-width: 1280px;
}

.customer-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--crm-border);
}

.customer-overview-item {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--crm-border);
  border-bottom: 1px solid var(--crm-border);
}

.customer-overview-item:nth-child(3n) {
  border-right: 0;
}

.customer-overview-item span,
.customer-notes span,
.job-ticket__field span,
.job-ticket__notes span,
.job-ticket__document-card span,
.job-ticket__secondary span,
.job-ticket__detail-block > span {
  color: var(--crm-muted);
  font-size: .68rem;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: uppercase;
}

.customer-overview-item strong {
  color: var(--crm-text);
  font-size: .88rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.customer-notes {
  display: grid;
  gap: 8px;
  padding: 16px;
}

.customer-notes p,
.job-ticket__detail-block p {
  margin: 0;
  color: var(--crm-text);
  font-size: .84rem;
  line-height: 1.5;
}

.customer-contact-list {
  display: grid;
}

.customer-contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, .8fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-top: 1px solid var(--crm-border);
}

.customer-contact-card strong,
.customer-contact-card span {
  color: var(--crm-text);
  overflow-wrap: anywhere;
}

.customer-contact-card small {
  display: block;
  margin-top: 3px;
  color: var(--crm-muted);
  font-size: .76rem;
}

.customer-job-group {
  display: grid;
  gap: 10px;
  padding: 14px 0 0;
  border-top: 1px solid var(--crm-border);
}

.customer-job-group:first-of-type {
  border-top: 0;
}

.customer-job-group h3 {
  margin: 0;
  padding: 0 16px;
  color: var(--crm-text);
  font-size: .86rem;
}

.crm-table--profile-jobs .crm-table__head,
.crm-table--profile-jobs .crm-table__row {
  grid-template-columns: 96px minmax(0, 1.2fr) minmax(130px, .7fr) minmax(150px, .8fr) minmax(140px, .75fr) auto;
}

.job-ticket {
  position: relative;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  background: #0f141b;
}

.job-ticket::after {
  content: "";
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 74px;
  height: 74px;
  background: linear-gradient(135deg, transparent 0 49%, var(--crm-border) 50% 51%, #090d13 52%);
  pointer-events: none;
}

html[data-theme="light"] .job-ticket {
  background: #fff;
}

html[data-theme="light"] .job-ticket::after {
  background: linear-gradient(135deg, transparent 0 49%, var(--crm-border) 50% 51%, #f8fafc 52%);
}

.job-ticket__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 10px;
  border-bottom: 0;
  background: transparent;
}

.job-ticket__head h3 {
  margin: 0;
  min-width: 0;
  max-width: 430px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--crm-surface-2);
  color: var(--crm-text);
  font-size: 1rem;
  line-height: 1.2;
}

.job-ticket__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 230px);
  gap: 22px;
  padding: 4px 18px 14px;
}

.job-ticket__main {
  display: grid;
  gap: 14px;
}

.job-ticket__field,
.job-ticket__notes,
.job-ticket__document-card,
.job-ticket__detail-block {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.job-ticket__field strong {
  color: var(--crm-text);
  font-size: .94rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.job-ticket__field small {
  color: var(--crm-muted);
  font-size: .78rem;
  line-height: 1.4;
}

.job-ticket__notes {
  min-height: 142px;
  padding: 14px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-lg);
  background: var(--crm-surface-2);
}

.job-ticket__notes p {
  margin: 0;
  color: var(--crm-text);
  font-size: .86rem;
  line-height: 1.55;
}

.job-ticket__document-rail {
  display: grid;
  align-content: start;
  gap: 18px;
}

.job-ticket__document-card {
  min-height: 120px;
  padding: 14px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md);
  background: var(--crm-surface-2);
}

.job-ticket__document-card strong {
  color: var(--crm-text);
  font-size: .84rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.job-ticket__document-card form {
  margin-top: auto;
}

.job-ticket__document-card .btn-card,
.job-ticket__actions .btn-card {
  min-height: 36px;
}

.job-ticket__document-card .btn-card:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.job-ticket__summary {
  margin: 0 18px 14px;
  padding: 12px 14px;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md);
  background: transparent;
}

.job-ticket__secondary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0 18px 14px;
  overflow: hidden;
  border: 1px solid var(--crm-border);
  border-radius: var(--crm-radius-md);
}

.job-ticket__secondary > div {
  display: grid;
  gap: 6px;
  padding: 12px;
  border-right: 1px solid var(--crm-border);
}

.job-ticket__secondary > div:last-child {
  border-right: 0;
}

.job-ticket__secondary strong {
  color: var(--crm-text);
  font-size: .82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.job-ticket__details {
  display: grid;
  gap: 12px;
  padding: 0 18px 14px;
}

.job-ticket__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 18px 18px;
  border-bottom: 0;
}

@media (max-width: 920px) {
  .customer-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-overview-item:nth-child(3n) {
    border-right: 1px solid var(--crm-border);
  }

  .customer-overview-item:nth-child(2n) {
    border-right: 0;
  }

  .crm-table--profile-jobs .crm-table__head,
  .crm-table--profile-jobs .crm-table__row {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .crm-table--customers .crm-table__head {
    display: none;
  }

  .crm-table--customers .crm-table__row,
  .customer-contact-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-overview-grid,
  .job-ticket__body,
  .job-ticket__secondary {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-overview-item,
  .customer-overview-item:nth-child(2n),
  .customer-overview-item:nth-child(3n),
  .job-ticket__secondary > div {
    border-right: 0;
  }

  .job-ticket__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .job-ticket__head h3 {
    max-width: 100%;
  }
}

/* Premium job ticket redesign — hierarchy-first, layered SaaS surface */
.job-ticket {
  position: relative;
  display: grid;
  gap: 18px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 14% -12%, rgba(204, 255, 0, .11), transparent 34%),
    linear-gradient(145deg, #111821 0%, #0a0f15 48%, #070a0f 100%);
  box-shadow:
    0 28px 70px rgba(0, 0, 0, .34),
    inset 0 1px 0 rgba(255, 255, 255, .045);
}

.job-ticket::after {
  content: none;
}

html[data-theme="light"] .job-ticket {
  border-color: rgba(15, 23, 42, .1);
  background:
    radial-gradient(circle at 14% -12%, rgba(204, 255, 0, .24), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, #f7f8f4 58%, #eef1ec 100%);
  box-shadow:
    0 24px 60px rgba(15, 23, 42, .12),
    inset 0 1px 0 rgba(255, 255, 255, .9);
}

.job-ticket__hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(176px, 230px);
  gap: 16px;
  align-items: stretch;
}

.job-ticket__hero-copy,
.job-ticket__value-card,
.job-ticket__quick-card,
.job-ticket__panel {
  border: 1px solid rgba(148, 163, 184, .14);
  background: rgba(17, 24, 33, .76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(16px);
}

html[data-theme="light"] .job-ticket__hero-copy,
html[data-theme="light"] .job-ticket__value-card,
html[data-theme="light"] .job-ticket__quick-card,
html[data-theme="light"] .job-ticket__panel {
  border-color: rgba(15, 23, 42, .09);
  background: rgba(255, 255, 255, .76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .75),
    0 12px 24px rgba(15, 23, 42, .055);
}

.job-ticket__hero-copy {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 22px;
  border-radius: 24px;
}

.job-ticket__eyebrow,
.job-ticket__section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.job-ticket__eyebrow > span:first-child,
.job-ticket__section-head span,
.job-ticket__value-card span,
.job-ticket__quick-card span,
.job-ticket__document-card span,
.job-ticket__detail-block > span,
.job-ticket__message span {
  color: var(--crm-muted);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.job-ticket__status {
  flex: 0 0 auto;
  padding: 7px 10px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 999px;
  background: rgba(148, 163, 184, .1);
  color: var(--crm-text);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: none;
}

.job-ticket__status--active,
.job-ticket__status--done {
  border-color: rgba(204, 255, 0, .35);
  background: rgba(204, 255, 0, .14);
  color: var(--crm-lime);
}

.job-ticket__status--warn {
  border-color: rgba(255, 31, 106, .35);
  background: rgba(255, 31, 106, .12);
  color: #ff7a9f;
}

.job-ticket__hero h3 {
  margin: 0;
  color: var(--crm-text);
  font-size: clamp(1.38rem, 3vw, 2.35rem);
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: .98;
  overflow-wrap: anywhere;
}

.job-ticket__hero p,
.job-ticket__panel p,
.job-ticket__empty {
  margin: 0;
  color: var(--crm-muted);
  font-size: .92rem;
  line-height: 1.55;
}

.job-ticket__hero-copy > p {
  max-width: 62ch;
  color: color-mix(in srgb, var(--crm-text) 78%, var(--crm-muted));
}

.job-ticket__value-card {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(160deg, rgba(204, 255, 0, .13), transparent 42%),
    rgba(18, 26, 35, .82);
}

.job-ticket__value-card strong {
  color: var(--crm-text);
  font-size: clamp(1.25rem, 2.4vw, 1.85rem);
  font-weight: 900;
  letter-spacing: -.045em;
}

.job-ticket__value-card small,
.job-ticket__quick-card small,
.job-ticket__section-head small,
.job-ticket__document-card small {
  color: var(--crm-muted);
  font-size: .78rem;
  line-height: 1.45;
}

.job-ticket__quick-grid {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(160px, .85fr) minmax(220px, 1.25fr) minmax(160px, .8fr);
  gap: 12px;
}

.job-ticket__quick-card {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  min-height: 116px;
  padding: 16px;
  border-radius: 20px;
}

.job-ticket__quick-card strong {
  color: var(--crm-text);
  font-size: .98rem;
  font-weight: 850;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.job-ticket__quick-card--customer strong {
  font-size: 1.08rem;
}

.job-ticket__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 14px;
  align-items: start;
}

.job-ticket__primary-column,
.job-ticket__side-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.job-ticket__panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border-radius: 22px;
}

.job-ticket__panel--notes {
  min-height: 160px;
}

.job-ticket__panel--notes p {
  color: var(--crm-text);
  font-size: .98rem;
}

.job-ticket__document-rail {
  align-content: start;
}

.job-ticket__document-card {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 0;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 17px;
  background: rgba(255, 255, 255, .035);
}

html[data-theme="light"] .job-ticket__document-card {
  border-color: rgba(15, 23, 42, .08);
  background: rgba(15, 23, 42, .025);
}

.job-ticket__document-card strong {
  color: var(--crm-text);
  font-size: .92rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.job-ticket__document-card form {
  margin: 0;
}

.job-ticket__document-card .btn-card,
.job-ticket__actions .btn-card {
  min-height: 38px;
}

.job-ticket__document-card .btn-card:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.job-ticket__details {
  display: grid;
  gap: 12px;
  padding: 0;
}

.job-ticket__detail-block {
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.job-ticket__detail-block + .job-ticket__detail-block {
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, .12);
}

.job-ticket__detail-block p,
.job-ticket__detail-block li {
  margin: 0;
  color: var(--crm-muted);
  font-size: .84rem;
  line-height: 1.52;
}

.job-ticket__mini-list {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 15px;
}

.job-ticket__mini-row {
  display: grid;
  grid-template-columns: minmax(80px, .65fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid rgba(148, 163, 184, .1);
}

.job-ticket__mini-row:first-child {
  border-top: 0;
}

.job-ticket__mini-row strong {
  color: var(--crm-text);
  font-size: .83rem;
  line-height: 1.35;
}

.job-ticket__attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.job-ticket__attachment {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 999px;
  background: rgba(148, 163, 184, .08);
  color: var(--crm-text);
  font-size: .78rem;
  font-weight: 750;
}

.job-ticket__messages {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.job-ticket__message {
  display: grid;
  gap: 5px;
  max-width: 86%;
  padding: 11px 13px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 16px;
  background: rgba(255, 255, 255, .04);
}

.job-ticket__message--out {
  justify-self: end;
  border-color: rgba(204, 255, 0, .22);
  background: rgba(204, 255, 0, .08);
}

.job-ticket__message p {
  color: var(--crm-text);
  font-size: .86rem;
}

.job-ticket__actions {
  position: sticky;
  bottom: -18px;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 -18px -18px;
  padding: 14px 18px;
  border-top: 1px solid rgba(148, 163, 184, .14);
  background: rgba(7, 10, 15, .86);
  backdrop-filter: blur(16px);
}

html[data-theme="light"] .job-ticket__actions {
  background: rgba(247, 248, 244, .88);
}

@media (max-width: 1040px) {
  .job-ticket__quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .job-ticket__quick-card--customer,
  .job-ticket__quick-card:nth-child(3) {
    grid-column: span 2;
  }

  .job-ticket__workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-ticket__side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .job-ticket {
    gap: 12px;
    padding: 12px;
    border-radius: 22px;
  }

  .job-ticket__hero {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-ticket__hero-copy,
  .job-ticket__value-card,
  .job-ticket__panel {
    border-radius: 19px;
    padding: 16px;
  }

  .job-ticket__eyebrow,
  .job-ticket__section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .job-ticket__quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .job-ticket__quick-card {
    min-height: 98px;
    padding: 13px;
    border-radius: 16px;
  }

  .job-ticket__quick-card--customer,
  .job-ticket__quick-card:nth-child(3) {
    grid-column: span 2;
  }

  .job-ticket__side-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .job-ticket__message {
    max-width: 94%;
  }

  .job-ticket__actions {
    bottom: -12px;
    margin: 0 -12px -12px;
    padding: 12px;
  }

  .job-ticket__actions .btn-card {
    flex: 1 1 145px;
  }
}

/* Premium Jobs page redesign — fast-scanning operational board */
.jobs-page {
  gap: 18px;
}

.jobs-hero {
  position: relative;
  overflow: hidden;
  align-items: end;
  margin-bottom: 0;
  padding: 22px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 28px;
  background:
    radial-gradient(circle at 10% -25%, rgba(204, 255, 0, .12), transparent 34%),
    linear-gradient(145deg, rgba(19, 26, 35, .94), rgba(9, 13, 19, .96));
  box-shadow:
    0 24px 58px rgba(0, 0, 0, .28),
    inset 0 1px 0 rgba(255, 255, 255, .045);
}

html[data-theme="light"] .jobs-hero {
  border-color: rgba(15, 23, 42, .1);
  background:
    radial-gradient(circle at 10% -25%, rgba(204, 255, 0, .28), transparent 34%),
    linear-gradient(145deg, #ffffff, #f4f6f0);
  box-shadow:
    0 18px 44px rgba(15, 23, 42, .1),
    inset 0 1px 0 rgba(255, 255, 255, .85);
}

.jobs-hero h1 {
  letter-spacing: -.055em;
}

.jobs-hero p {
  max-width: 58ch;
}

.jobs-hero__actions {
  align-items: center;
}

.jobs-summary-grid {
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.jobs-stat {
  display: grid;
  align-content: center;
  gap: 7px;
  min-height: 122px;
  padding: 18px;
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .045), transparent),
    rgba(16, 22, 30, .78);
  box-shadow:
    0 16px 38px rgba(0, 0, 0, .18),
    inset 0 1px 0 rgba(255, 255, 255, .04);
}

html[data-theme="light"] .jobs-stat {
  border-color: rgba(15, 23, 42, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .8), rgba(255, 255, 255, .48)),
    #f7f8f4;
  box-shadow:
    0 14px 34px rgba(15, 23, 42, .075),
    inset 0 1px 0 rgba(255, 255, 255, .86);
}

.jobs-stat--primary {
  background:
    radial-gradient(circle at 88% 12%, rgba(204, 255, 0, .14), transparent 38%),
    rgba(18, 26, 35, .86);
}

.jobs-stat--attention {
  border-color: color-mix(in srgb, var(--crm-primary) 28%, rgba(148, 163, 184, .16));
}

.jobs-stat span,
.jobs-board__count {
  color: var(--crm-muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .12em;
  line-height: 1.2;
  text-transform: uppercase;
}

.jobs-stat strong {
  color: var(--crm-text);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  font-weight: 900;
  letter-spacing: -.06em;
  line-height: .95;
}

.jobs-stat small {
  max-width: 18ch;
  color: var(--crm-muted);
  font-size: .78rem;
  line-height: 1.35;
}

.jobs-board {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 120px),
    rgba(8, 12, 18, .76);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, .25),
    inset 0 1px 0 rgba(255, 255, 255, .035);
}

html[data-theme="light"] .jobs-board {
  border-color: rgba(15, 23, 42, .09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .92), rgba(255, 255, 255, .52) 120px),
    #f3f5ef;
  box-shadow:
    0 20px 48px rgba(15, 23, 42, .095),
    inset 0 1px 0 rgba(255, 255, 255, .88);
}

.jobs-board__head {
  align-items: center;
  padding: 20px 22px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}

.jobs-board__head h2 {
  letter-spacing: -.03em;
}

.jobs-board__head p {
  max-width: 66ch;
}

.jobs-board__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(148, 163, 184, .15);
  border-radius: 999px;
  background: rgba(148, 163, 184, .07);
}

.jobs-table {
  gap: 8px;
  padding: 12px;
}

.jobs-table .crm-table__head,
.jobs-table .crm-table__row {
  grid-template-columns:
    minmax(150px, .92fr)
    minmax(220px, 1.42fr)
    minmax(138px, .82fr)
    minmax(180px, 1.05fr)
    minmax(118px, .7fr)
    minmax(132px, .78fr)
    minmax(112px, .72fr);
  gap: 18px;
}

.jobs-table .crm-table__head {
  align-items: center;
  padding: 6px 16px 8px;
  border: 0;
  background: transparent;
  color: color-mix(in srgb, var(--crm-muted) 92%, var(--crm-text));
  font-size: .66rem;
  font-weight: 900;
  letter-spacing: .13em;
}

.jobs-table .crm-table__head span:nth-child(5),
.jobs-table .crm-table__head span:nth-child(7) {
  text-align: center;
}

.jobs-table .crm-table__row {
  min-height: 94px;
  padding: 17px 16px;
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .038), rgba(255, 255, 255, .012)),
    rgba(16, 22, 30, .7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
  transition:
    border-color .18s ease,
    background .18s ease,
    transform .18s ease;
}

.jobs-table .crm-table__row:hover {
  border-color: rgba(204, 255, 0, .2);
  background:
    linear-gradient(180deg, rgba(204, 255, 0, .045), rgba(255, 255, 255, .018)),
    rgba(18, 26, 35, .82);
  transform: translateY(-1px);
}

html[data-theme="light"] .jobs-table .crm-table__row {
  border-color: rgba(15, 23, 42, .08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(255, 255, 255, .58)),
    #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .045);
}

html[data-theme="light"] .jobs-table .crm-table__row:hover {
  border-color: rgba(124, 155, 0, .24);
  background: #ffffff;
}

.jobs-row--attention {
  border-color: color-mix(in srgb, var(--crm-primary) 22%, rgba(148, 163, 184, .14)) !important;
}

.jobs-table .crm-cell {
  align-self: center;
  justify-content: center;
  gap: 5px;
  min-height: 44px;
  color: var(--crm-text-soft);
}

.jobs-table .crm-cell strong {
  color: var(--crm-text);
  font-size: .9rem;
  font-weight: 820;
  letter-spacing: -.012em;
  line-height: 1.25;
}

.jobs-table .crm-cell small,
.jobs-table .crm-cell span {
  line-height: 1.38;
}

.jobs-customer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
}

.jobs-customer strong {
  font-size: .98rem !important;
}

.jobs-customer small {
  color: var(--crm-muted);
  font-size: .76rem;
}

.jobs-work {
  align-content: center;
}

.jobs-work__title-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.jobs-work__title-line strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jobs-table .job-next-action {
  display: -webkit-box;
  max-width: 38ch;
  overflow: hidden;
  color: color-mix(in srgb, var(--crm-muted) 92%, var(--crm-text)) !important;
  font-size: .76rem;
  line-height: 1.35 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.jobs-table .job-priority {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 3px 7px;
  font-size: .66rem;
}

.jobs-when strong {
  font-size: .86rem !important;
  font-variant-numeric: tabular-nums;
}

.jobs-when small {
  color: color-mix(in srgb, var(--crm-muted) 84%, var(--crm-text));
}

.jobs-location span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--crm-text-soft);
  font-size: .8rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.jobs-status {
  align-items: center;
  justify-items: center;
  text-align: center;
}

.jobs-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 112px);
  min-width: 102px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .055em;
}

.jobs-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding: 0 7px;
  border: 1px solid rgba(204, 255, 0, .24);
  border-radius: 999px;
  color: var(--crm-primary) !important;
  background: rgba(204, 255, 0, .08);
  font-size: .65rem !important;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.owner-attention-note {
  color: var(--crm-primary) !important;
  font-size: .68rem !important;
  font-weight: 850;
  letter-spacing: .02em;
}

.jobs-value {
  align-content: center;
}

.jobs-value strong {
  font-size: .95rem !important;
  font-variant-numeric: tabular-nums;
}

.jobs-table .crm-cell-link {
  width: fit-content;
  color: color-mix(in srgb, var(--crm-primary) 80%, var(--crm-text));
  font-size: .74rem;
  font-weight: 760;
  text-decoration: none;
}

.jobs-table .crm-cell-link:hover {
  color: var(--crm-primary);
}

.jobs-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  justify-items: stretch;
}

.jobs-action {
  justify-content: center;
  width: 100%;
  min-height: 38px;
  padding-inline: 12px;
  border-radius: 13px;
  font-size: .75rem;
  font-weight: 850;
}

.jobs-action--primary {
  box-shadow: 0 8px 20px rgba(204, 255, 0, .12);
}

.jobs-action--secondary {
  opacity: .86;
}

@media (max-width: 1240px) {
  .jobs-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .jobs-table .crm-table__head {
    display: none;
  }

  .jobs-table .crm-table__row {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr);
    gap: 14px;
    align-items: start;
    min-height: 0;
    padding: 16px;
  }

  .jobs-customer,
  .jobs-work,
  .jobs-actions {
    grid-column: 1 / -1;
  }

  .jobs-table .crm-cell {
    justify-content: start;
    min-height: 0;
  }

  .jobs-table .crm-cell[data-label]::before {
    content: attr(data-label);
    margin-bottom: 2px;
    color: var(--crm-muted);
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
  }

  .jobs-customer[data-label]::before,
  .jobs-work[data-label]::before,
  .jobs-actions[data-label]::before {
    display: none;
  }

  .jobs-status {
    align-items: start;
    justify-items: start;
    text-align: left;
  }

  .jobs-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .jobs-page {
    gap: 14px;
  }

  .jobs-hero {
    align-items: start;
    padding: 18px;
    border-radius: 22px;
  }

  .jobs-hero__actions {
    width: 100%;
  }

  .jobs-hero__actions .btn {
    flex: 1 1 140px;
  }

  .jobs-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .jobs-stat {
    min-height: 104px;
    padding: 14px;
    border-radius: 18px;
  }

  .jobs-stat strong {
    font-size: 1.75rem;
  }

  .jobs-board {
    border-radius: 22px;
  }

  .jobs-board__head {
    align-items: start;
    padding: 16px;
  }

  .jobs-board__count {
    display: none;
  }

  .jobs-table {
    padding: 10px;
  }

  .jobs-table .crm-table__row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border-radius: 18px;
  }

  .jobs-customer,
  .jobs-work,
  .jobs-location,
  .jobs-actions {
    grid-column: 1 / -1;
  }

  .jobs-work__title-line strong {
    white-space: normal;
  }

  .jobs-table .job-next-action {
    max-width: none;
  }

  .jobs-status-pill {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 430px) {
  .jobs-summary-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Conversation QA workbench */
.bot-sandbox { overflow-y: auto; }

.sandbox-evaluation {
  display: flex;
  flex-direction: column;
  margin: 24px;
  min-height: calc(100svh - 48px);
  padding: clamp(20px, 2.4vw, 32px);
  border: 1px solid color-mix(in srgb, var(--crm-border) 78%, transparent);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .035), transparent 42%), var(--crm-surface);
  box-shadow: 0 18px 54px rgba(0, 0, 0, .18);
}

.sandbox-evaluation__head,
.sandbox-report-footer,
.sandbox-batch-progress > div:first-child,
.sandbox-transcript__head,
.sandbox-outcome-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sandbox-evaluation__head h2 { margin: 5px 0 6px; font-size: clamp(22px, 2vw, 30px); letter-spacing: -.035em; }
.sandbox-evaluation__head p { max-width: 700px; margin: 0; color: var(--crm-text-soft); line-height: 1.5; }
.sandbox-evaluation__actions,
.sandbox-report-footer > div { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }

.sandbox-batch-progress {
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid rgba(197, 255, 0, .18);
  border-radius: 14px;
  background: rgba(197, 255, 0, .045);
}

.sandbox-batch-progress span { color: var(--crm-text-soft); font-size: 13px; }
.sandbox-progress-track { height: 5px; margin-top: 11px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.sandbox-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent, #c5ff00); transition: width .25s ease; }

.sandbox-report-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(130px, .7fr));
  gap: 10px;
  margin: 22px 0 14px;
}

.sandbox-report-toolbar label { display: grid; gap: 6px; min-width: 0; }
.sandbox-report-toolbar label > span { color: var(--crm-text-soft); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sandbox-report-toolbar .auth-input { width: 100%; min-width: 0; height: 42px; }

.sandbox-report-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.sandbox-metric { min-height: 92px; padding: 16px 18px; border: 1px solid rgba(255, 255, 255, .065); border-radius: 15px; background: rgba(255, 255, 255, .025); }
.sandbox-metric > span { display: block; margin-bottom: 10px; color: var(--crm-text-soft); font-size: 12px; }
.sandbox-metric strong { font-size: 26px; letter-spacing: -.04em; }
.sandbox-metric strong small { margin-left: 2px; color: var(--crm-text-soft); font-size: 13px; letter-spacing: 0; }
.sandbox-metric--safe strong { color: var(--accent, #c5ff00); }
.sandbox-metric--danger strong { color: #ff6b6b; }
.sandbox-metric .sandbox-metric__recommendation { font-size: 17px; letter-spacing: -.015em; }

.sandbox-report-layout {
  display: grid;
  grid-template-columns: minmax(320px, .76fr) minmax(0, 1.45fr);
  flex: 1 1 560px;
  min-height: 420px;
  height: clamp(420px, 58svh, 820px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 17px;
  background: rgba(0, 0, 0, .14);
}

.sandbox-result-list,
.sandbox-transcript {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.sandbox-result-list { border-right: 1px solid rgba(255, 255, 255, .07); background: rgba(0, 0, 0, .08); }

.sandbox-result {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  color: var(--crm-text);
  text-align: left;
  background: transparent;
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease;
}

.sandbox-result:hover,
.sandbox-result--active { background: rgba(255, 255, 255, .04); }
.sandbox-result--active { box-shadow: inset 3px 0 var(--accent, #c5ff00); }
.sandbox-result__body { display: grid; min-width: 0; gap: 3px; }
.sandbox-result__body strong,
.sandbox-result__body small,
.sandbox-result__body em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sandbox-result__body strong { font-size: 13px; }
.sandbox-result__body small { color: var(--crm-text-soft); font-size: 11px; }
.sandbox-result__body em { color: var(--crm-text-soft); font-size: 11px; font-style: normal; }
.sandbox-result__score { font-weight: 750; font-variant-numeric: tabular-nums; }

.sandbox-status,
.sandbox-severity { display: inline-flex; align-items: center; justify-content: center; min-height: 25px; padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.sandbox-status--passed,
.sandbox-severity--none { color: #d8ff66; background: rgba(197, 255, 0, .1); }
.sandbox-status--failed,
.sandbox-severity--critical { color: #ffb1b1; background: rgba(255, 83, 83, .13); }
.sandbox-severity--major { color: #ffc985; background: rgba(255, 164, 54, .12); }
.sandbox-severity--minor { color: #bcd6ff; background: rgba(86, 153, 255, .12); }
.sandbox-severity--cosmetic { color: var(--crm-text-soft); background: rgba(255, 255, 255, .07); }

.sandbox-transcript { padding: clamp(18px, 2vw, 28px); }
.sandbox-transcript__head { align-items: flex-start; margin-bottom: 13px; }
.sandbox-transcript__head > div:first-child span { color: var(--crm-text-soft); font-size: 12px; }
.sandbox-transcript__head h3 { margin: 5px 0 0; font-size: 22px; letter-spacing: -.03em; }
.sandbox-transcript__score { display: flex; align-items: baseline; gap: 3px; }
.sandbox-transcript__score strong { font-size: 28px; letter-spacing: -.04em; }
.sandbox-transcript__score span { color: var(--crm-text-soft); font-size: 12px; }
.sandbox-outcome-row { justify-content: flex-start; flex-wrap: wrap; margin-bottom: 16px; color: var(--crm-text-soft); font-size: 12px; }
.sandbox-outcome-row .sandbox-rerun { margin-left: auto; }

.sandbox-findings { display: grid; gap: 8px; margin-bottom: 16px; }
.sandbox-finding { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 11px; background: rgba(255, 255, 255, .025); }
.sandbox-finding strong { font-size: 12px; }
.sandbox-finding span { color: var(--crm-text-soft); font-size: 12px; line-height: 1.45; }
.sandbox-finding--critical { border-color: rgba(255, 83, 83, .25); }
.sandbox-finding--major { border-color: rgba(255, 164, 54, .2); }
.sandbox-finding--safe { border-color: rgba(197, 255, 0, .16); }

.sandbox-turns { display: grid; gap: 14px; }
.sandbox-turn { overflow: hidden; border: 1px solid rgba(255, 255, 255, .07); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.sandbox-turn__number { padding: 10px 14px; border-bottom: 1px solid rgba(255, 255, 255, .06); color: var(--crm-text-soft); font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.sandbox-turn__messages { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.sandbox-turn__messages > div { padding: 12px; border-radius: 11px; background: rgba(0, 0, 0, .18); }
.sandbox-turn__messages > div:last-child { background: rgba(197, 255, 0, .045); }
.sandbox-turn__messages span { color: var(--crm-text-soft); font-size: 10px; font-weight: 750; text-transform: uppercase; }
.sandbox-turn__messages p { margin: 7px 0 0; font-size: 13px; line-height: 1.5; }
.sandbox-turn__state { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border-top: 1px solid rgba(255, 255, 255, .055); background: rgba(255, 255, 255, .055); }
.sandbox-turn__state > span { min-width: 0; padding: 10px 12px; overflow-wrap: anywhere; background: var(--crm-surface); font-size: 11px; }
.sandbox-turn__state small { display: block; margin-bottom: 4px; color: var(--crm-text-soft); font-size: 9px; font-weight: 750; letter-spacing: .075em; text-transform: uppercase; }
.sandbox-state-json { border-top: 1px solid rgba(255, 255, 255, .055); }
.sandbox-state-json summary { padding: 11px 14px; color: var(--crm-text-soft); font-size: 11px; cursor: pointer; }
.sandbox-state-json pre { max-height: 320px; margin: 0; padding: 14px; overflow: auto; border-top: 1px solid rgba(255, 255, 255, .055); color: #c7ccd5; background: rgba(0, 0, 0, .22); font: 11px/1.55 ui-monospace, SFMono-Regular, Consolas, monospace; }
.sandbox-report-footer { margin-top: 12px; }

@media (max-width: 1180px) {
  .sandbox-report-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sandbox-report-toolbar label:first-child { grid-column: span 2; }
  .sandbox-turn__state { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .sandbox-evaluation { margin: 14px; min-height: auto; padding: 16px; border-radius: 17px; }
  .sandbox-evaluation__head { align-items: flex-start; flex-direction: column; }
  .sandbox-evaluation__actions { width: 100%; }
  .sandbox-evaluation__actions > * { flex: 1; }
  .sandbox-report-summary { grid-template-columns: 1fr 1fr; }
  .sandbox-report-toolbar { grid-template-columns: 1fr 1fr; }
  .sandbox-report-toolbar label:first-child { grid-column: 1 / -1; }
  .sandbox-report-layout { grid-template-columns: 1fr; height: auto; max-height: none; }
  .sandbox-result-list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(285px, 78vw); overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .sandbox-result { border-right: 1px solid rgba(255, 255, 255, .055); border-bottom: 0; }
  .sandbox-result--active { box-shadow: inset 0 -3px var(--accent, #c5ff00); }
  .sandbox-transcript { overflow: visible; }
  .sandbox-turn__messages { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .sandbox-metric { min-height: 80px; padding: 13px; }
  .sandbox-metric strong { font-size: 22px; }
  .sandbox-report-toolbar { grid-template-columns: 1fr; }
  .sandbox-report-toolbar label:first-child { grid-column: auto; }
  .sandbox-evaluation__actions { flex-direction: column-reverse; }
  .sandbox-evaluation__actions > * { width: 100%; }
  .sandbox-outcome-row .sandbox-rerun { width: 100%; margin-left: 0; }
  .sandbox-turn__state { grid-template-columns: 1fr 1fr; }
  .sandbox-report-footer { align-items: flex-start; flex-direction: column; }
}

/* Public and authentication alignment with the operational product system. */
.auth-field__helper {
  margin-top: var(--s1);
  color: var(--white-60);
  font-size: var(--t-xs);
  line-height: 1.45;
}

.setup-effort {
  width: max-content;
  margin: -0.25rem auto 0.65rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--white-60);
  font-size: 0.75rem;
  font-weight: 600;
}

.auth-page,
.auth-wrap {
  min-height: 100svh;
  padding-top: calc(var(--nav-h) + 1.5rem);
  padding-bottom: 2rem;
  background: #07090c;
}

.auth-page::before,
.auth-page::after,
.auth-wrap::before,
.auth-wrap::after {
  display: none;
}

.auth-card {
  border-radius: 12px;
  box-shadow: none;
}

.auth-card::before { display: none; }
.auth-card__header { margin-bottom: 1.25rem; }
.auth-card__title { font-family: var(--sans); font-size: clamp(1.75rem, 4vw, 2.25rem); }
.auth-card__title em { font-family: inherit; font-style: normal; font-weight: inherit; }

.auth-card--verify {
  max-width: 480px;
}

.auth-form--verify {
  margin-top: 1.25rem;
}

.auth-form--resend {
  margin-top: 0.75rem;
}

.auth-input--code {
  min-height: 64px;
  text-align: center;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.auth-card__footer-form {
  display: block;
  margin-top: 1rem;
  text-align: center;
}

.auth-card__footer-form button {
  display: inline;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.hero::before,
.hero::after { display: none; }

.hero__inner {
  min-height: calc(100svh - var(--nav-h));
  padding: clamp(2rem, 5vh, 3.5rem) 0;
  gap: 0;
  justify-items: stretch;
}

.hero__row {
  width: min(1160px, 100%);
  grid-template-columns: minmax(0, 1fr) minmax(280px, 370px);
  gap: clamp(2rem, 6vw, 5rem);
}

.hero__copy { max-width: 700px; }
.hero__headline { margin-bottom: 1.25rem; font-size: clamp(3.25rem, 5.3vw, 5rem); }
.hero__body { width: 100%; align-items: flex-start; text-align: left; }
.hero__sub { max-width: 650px; margin-bottom: 1.25rem; font-size: 1rem; line-height: 1.6; }
.hero__actions { margin-bottom: 1rem; justify-content: flex-start; }
.hero__badges { margin-bottom: 1rem; justify-content: flex-start; gap: 0.4rem; }
.hero__badge { padding: 0.55em 0.75em; border-radius: 8px; font-size: 0.75rem; }
.hero__stats { width: 100%; margin-top: 0.25rem; }
.hero__stats .stat { text-align: left; }
.hero__stats .stat__num { font-size: 1rem; }
.hero__stats .stat__lbl {
  color: rgba(240, 239, 232, 0.72);
  font-size: 0.8rem;
  line-height: 1.45;
}

@media (max-width: 780px) {
  .auth-page,
  .auth-wrap {
    align-items: flex-start;
    padding: calc(var(--nav-h) + 1rem) 1rem calc(1.5rem + env(safe-area-inset-bottom));
  }

  .auth-card { padding: 1.5rem; }
  .hero__inner { min-height: auto; padding: 2rem 0 3rem; }
  .hero__row { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .hero__copy,
  .hero__body,
  .hero__headline { min-width: 0; width: 100%; max-width: 100%; }
  .hero__headline { font-size: 1.85rem; line-height: 1.08; overflow-wrap: anywhere; }
  .hero__headline br { display: none; }
  .hero__headline .ln-serif { font-size: 0.9em; }
  .hero__actions { display: grid; width: 100%; }
  .hero__actions .btn { width: 100%; }
  .hero__badges { overflow-x: auto; flex-wrap: nowrap; justify-content: flex-start; }
  .hero__stats { grid-template-columns: 1fr; }
}

/* Inbox polish: quieter scroll, wider composer, and safer right drawer sizing. */
.inbox-shell {
  overflow: hidden;
}

.inbox-shell__inner {
  grid-template-columns: minmax(340px, 360px) minmax(0, 1fr);
}

.inbox-list,
.inbox-detail,
.inbox-items,
.conversation-messages,
.ai-analysis-panel,
.ai-analysis-body,
.inbox-tabs {
  scrollbar-width: none;
}

.inbox-list::-webkit-scrollbar,
.inbox-detail::-webkit-scrollbar,
.inbox-items::-webkit-scrollbar,
.conversation-messages::-webkit-scrollbar,
.ai-analysis-panel::-webkit-scrollbar,
.ai-analysis-body::-webkit-scrollbar,
.inbox-tabs::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.inbox-detail__body {
  grid-template-columns: minmax(460px, 1fr) clamp(300px, 20vw, 360px);
  align-items: stretch;
  min-width: 0;
  overflow: hidden;
}

.conversation-area {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
}

.conversation-messages {
  flex: 1 1 auto;
  min-height: 0;
  padding-bottom: 18px;
}

.inbox-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--crm-border);
  background: var(--crm-bg-soft);
}

.inbox-composer__input {
  min-height: 46px;
  max-height: 124px;
  flex: 1 1 auto;
  resize: vertical;
}

.inbox-composer__send {
  min-height: 46px;
  padding: 0 20px;
  flex: 0 0 auto;
}

.inbox-composer__feedback {
  margin: 0;
}

.ai-analysis-panel {
  min-width: 0;
  height: calc(100svh - 68px);
  min-height: calc(100svh - 68px);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-analysis-panel .ai-panel__head {
  align-items: flex-start;
  gap: 10px;
  padding: 14px 14px 12px;
}

.ai-analysis-panel .ai-panel__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ai-analysis-panel #owner-work-state {
  margin-left: auto;
  flex: 0 0 auto;
  padding: 0.34rem 0.68rem;
  font-size: 0.7rem;
  line-height: 1;
}

.ai-analysis-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 10px 12px 14px;
}

.ai-analysis-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-analysis-block {
  min-width: 0;
  padding: 12px;
}

.inbox-item {
  position: relative;
  overflow: visible;
  padding: 10px 14px 34px 12px;
}

.inbox-item__body {
  min-width: 0;
  padding-right: 34px;
}

.inbox-item__preview {
  max-width: calc(100% - 34px);
}

.inbox-item__context {
  display: block;
  min-width: 0;
}

.inbox-item__context > span:first-child {
  display: block;
  padding-left: 4px;
  max-width: calc(100% - 148px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item__context .status-pill {
  position: absolute;
  right: 14px;
  bottom: 10px;
  max-width: 136px;
  min-width: 0;
  padding: 0.26rem 0.46rem;
  font-size: 0.58rem;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item__badge {
  position: absolute;
  top: 32px;
  right: 14px;
  transform: none;
}

.inbox-item[data-state~="ready_to_quote_book"] .inbox-item__context .status-pill {
  border-color: rgba(204,255,0,0.45);
  background: rgba(204,255,0,0.13);
  color: var(--crm-primary);
}

@media (max-width: 1180px) {
  .inbox-detail__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .ai-analysis-panel {
    display: none;
  }
}

/* Landing refresh - August 2026 */

.home-refresh {
  background:
    radial-gradient(circle at 78% 8%, rgba(204,255,0,0.1), transparent 24rem),
    radial-gradient(circle at 5% 32%, rgba(0,245,255,0.06), transparent 22rem),
    var(--black);
  color: var(--white);
}

.home-refresh .nav {
  background: rgba(7,7,7,0.72);
  backdrop-filter: blur(18px);
}

.home-refresh .mobile-nav {
  background:
    linear-gradient(180deg, rgba(7, 7, 7, 0.98), rgba(11, 14, 9, 0.98)),
    var(--black);
  border-top: 1px solid rgba(240, 239, 232, 0.1);
  backdrop-filter: blur(18px);
}

.home-refresh .mobile-nav a {
  color: rgba(240, 239, 232, 0.9);
  border-bottom-color: rgba(240, 239, 232, 0.1);
}

.home-refresh .mobile-nav a:hover {
  color: var(--white);
}

.theme-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px;
  padding: 3px;
  border: 1px solid rgba(240,239,232,0.12);
  border-radius: 999px;
  background: rgba(240,239,232,0.055);
}

.theme-switch label {
  min-width: 0;
}

.theme-switch input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.theme-switch span {
  display: grid;
  place-items: center;
  min-height: 32px;
  padding: 0 0.75rem;
  border-radius: 999px;
  color: var(--white-60);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
}

.theme-switch input:checked + span {
  background: var(--lime);
  color: #11150d;
}

.theme-switch--mobile {
  width: 100%;
  margin: 0.25rem 0 0.5rem;
}

.theme-switch--compact {
  display: none;
  margin-left: auto;
}

.landing-hero {
  min-height: min(860px, 96svh);
  padding: calc(var(--nav-h) + clamp(2.5rem, 7vw, 5.5rem)) 0 clamp(3rem, 8vw, 6rem);
  overflow: hidden;
  isolation: isolate;
}

.landing-pattern {
  position: absolute;
  inset: var(--nav-h) 0 auto 0;
  height: min(680px, 76svh);
  pointer-events: none;
  opacity: 0.34;
  background:
    linear-gradient(90deg, rgba(204,255,0,0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(204,255,0,0.05) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 46%, rgba(204,255,0,0.08) 46% 46.5%, transparent 46.5% 100%);
  background-size: 72px 72px, 72px 72px, 180px 180px;
  mask-image: linear-gradient(180deg, #000, transparent 88%);
  animation: landing-grid-drift 18s linear infinite;
  z-index: -1;
}

@keyframes landing-grid-drift {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 72px 72px, 72px 72px, 180px 180px; }
}

.landing-hero__row {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}

.landing-hero .hero__headline {
  max-width: 900px;
}

.landing-hero .hero__sub {
  max-width: 720px;
}

.landing-visual {
  display: grid;
  gap: 1rem;
  justify-items: center;
  min-width: 0;
}

.landing-hero .phone-wrap {
  display: block;
}

.hero__trust {
  margin: -0.2rem 0 0.9rem;
  color: var(--white-60);
  font-size: 0.86rem;
  line-height: 1.55;
}

.landing-strip {
  border-block: 1px solid var(--border);
  background: var(--off-black);
  overflow: hidden;
}

.landing-ticker {
  position: relative;
  display: flex;
  min-height: clamp(76px, 9vw, 112px);
  align-items: center;
  overflow: hidden;
}

.landing-ticker::before,
.landing-ticker::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: min(12vw, 120px);
  pointer-events: none;
}

.landing-ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--off-black), transparent);
}

.landing-ticker::after {
  right: 0;
  background: linear-gradient(270deg, var(--off-black), transparent);
}

.landing-ticker__track {
  display: flex;
  align-items: center;
  gap: clamp(1.4rem, 4vw, 3rem);
  width: max-content;
  padding-inline: clamp(1rem, 3vw, 2rem);
  color: var(--white);
  font-size: clamp(1.35rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  white-space: nowrap;
  animation: ticker-scroll 34s linear infinite;
  will-change: transform;
}

.landing-ticker__track span {
  display: inline-flex;
  align-items: center;
  gap: clamp(1.4rem, 4vw, 3rem);
}

.landing-ticker__track span::after {
  content: "";
  width: 0.38em;
  height: 0.38em;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 0 18px rgba(204,255,0,0.4);
}

.landing-ticker__label {
  color: var(--lime);
  font-size: clamp(0.92rem, 2vw, 1.25rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.landing-section {
  padding: clamp(4rem, 9vw, 7rem) 0;
}

.home-refresh .reveal,
.home-refresh .reveal-left,
.home-refresh .reveal-scale {
  opacity: 1;
  transform: none;
  animation: landing-rise 0.58s ease-out both;
}

.home-refresh .d1 { animation-delay: 0.06s; }
.home-refresh .d2 { animation-delay: 0.12s; }
.home-refresh .d3 { animation-delay: 0.18s; }
.home-refresh .d4 { animation-delay: 0.24s; }

@keyframes landing-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.landing-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(204,255,0,0.035), transparent 40%),
    var(--black);
}

.landing-demo::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(240,239,232,0.045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(240,239,232,0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 72%, transparent);
}

.demo-board {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: clamp(1rem, 3vw, 1.75rem);
  align-items: stretch;
}

.demo-board__screen,
.demo-board__context,
.before-after > div {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(240,239,232,0.045);
  box-shadow: 0 24px 70px rgba(0,0,0,0.26);
}

.demo-board__screen {
  padding: clamp(1rem, 3vw, 1.6rem);
}

.demo-board__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--white-60);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.demo-board__topline strong,
.demo-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 28px;
  padding: 0.35rem 0.7rem;
  border: 1px solid rgba(204,255,0,0.32);
  border-radius: 999px;
  background: rgba(204,255,0,0.12);
  color: var(--lime);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-pill--muted {
  border-color: rgba(240,239,232,0.14);
  background: rgba(240,239,232,0.06);
  color: var(--white-60);
}

.demo-chat {
  display: grid;
  gap: 0.8rem;
}

.demo-chat__bubble {
  max-width: min(500px, 92%);
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  color: var(--white);
  font-size: clamp(0.9rem, 2vw, 1rem);
  line-height: 1.55;
}

.demo-chat__bubble--in {
  justify-self: start;
  background: rgba(240,239,232,0.08);
  border-bottom-left-radius: 4px;
}

.demo-chat__bubble--out {
  justify-self: end;
  background: rgba(204,255,0,0.13);
  border: 1px solid rgba(204,255,0,0.18);
  border-bottom-right-radius: 4px;
}

.demo-board__context {
  display: grid;
  align-content: center;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 1.6rem);
  background:
    linear-gradient(180deg, rgba(204,255,0,0.06), transparent),
    var(--card);
}

.demo-board__context h3 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.demo-board__context ul {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
}

.demo-board__context li {
  position: relative;
  padding-left: 1.05rem;
  color: var(--white-60);
  font-size: 0.94rem;
  line-height: 1.55;
}

.demo-board__context li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--lime);
}

.landing-feature-grid .feat-card__icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(204,255,0,0.24);
  border-radius: 8px;
  background: rgba(204,255,0,0.08);
  color: var(--lime);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
}

.landing-proof-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: clamp(1rem, 3vw, 1.5rem);
}

.landing-proof-row span {
  min-width: 0;
  padding: 0.85rem 0.9rem;
  border: 1px solid rgba(204,255,0,0.18);
  border-radius: 8px;
  background: rgba(204,255,0,0.06);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 820;
  text-align: center;
}

.landing-product-strip {
  background:
    linear-gradient(180deg, rgba(240,239,232,0.02), rgba(240,239,232,0.045)),
    var(--off-black);
  border-block: 1px solid var(--border);
}

.product-strip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}

.product-strip-card {
  min-width: 0;
  display: grid;
  gap: 1rem;
  padding: clamp(1rem, 2.4vw, 1.45rem);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 18px 58px rgba(0,0,0,0.22);
}

.product-strip-card__preview {
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid rgba(204,255,0,0.14);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(204,255,0,0.05), transparent),
    rgba(240,239,232,0.035);
}

.product-strip-card__eyebrow {
  margin: 0;
  color: var(--lime);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.product-strip-card h3 {
  margin: 0;
  color: var(--white);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  line-height: 1.15;
}

.product-strip-card p:last-child {
  margin: 0;
  color: var(--white-60);
  font-size: 0.92rem;
  line-height: 1.6;
}

.inbox-preview,
.doc-preview,
.cal-preview {
  display: grid;
  gap: 0.72rem;
}

.inbox-preview__row,
.doc-preview__line,
.cal-preview__slot {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.inbox-preview__row div,
.cal-preview__slot div {
  min-width: 0;
}

.inbox-preview__row strong,
.doc-preview__head strong,
.doc-preview__line strong,
.cal-preview__slot b {
  display: block;
  color: var(--white);
  font-size: 0.88rem;
  line-height: 1.25;
}

.inbox-preview__row small,
.doc-preview__line span,
.cal-preview__slot small {
  display: block;
  color: var(--white-60);
  font-size: 0.74rem;
  line-height: 1.35;
}

.channel-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 28px;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.channel-chip--whatsapp {
  background: rgba(37,211,102,0.16);
  border-color: rgba(37,211,102,0.28);
  color: #89f3af;
}

.channel-chip--gmail {
  background: rgba(255,138,101,0.14);
  border-color: rgba(255,138,101,0.26);
  color: #ffc2a8;
}

.channel-chip--outlook {
  background: rgba(124,184,255,0.14);
  border-color: rgba(124,184,255,0.24);
  color: #d2e7ff;
}

.doc-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.doc-preview__head span,
.doc-preview__cta,
.cal-preview__tabs span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 850;
}

.doc-preview__head span {
  padding: 0.25rem 0.55rem;
  background: rgba(204,255,0,0.12);
  border: 1px solid rgba(204,255,0,0.24);
  color: var(--lime);
}

.doc-preview__cta {
  padding: 0.45rem 0.7rem;
  background: var(--lime);
  color: var(--black);
}

.cal-preview__tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.cal-preview__tabs span {
  padding: 0.26rem 0.6rem;
  border: 1px solid rgba(240,239,232,0.12);
  background: rgba(240,239,232,0.05);
  color: var(--white-60);
}

.cal-preview__tabs span:first-child {
  border-color: rgba(204,255,0,0.28);
  background: rgba(204,255,0,0.12);
  color: var(--lime);
}

.cal-preview__slot strong {
  color: var(--lime);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.landing-workflow {
  background:
    linear-gradient(180deg, rgba(240,239,232,0.02), rgba(240,239,232,0.04)),
    var(--off-black);
  border-block: 1px solid var(--border);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s4);
}

.workflow-card,
.sample-card,
.insight-card,
.control-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 18px 58px rgba(0,0,0,0.22);
}

.workflow-card {
  min-width: 0;
  padding: clamp(1.1rem, 2.2vw, 1.65rem);
}

.workflow-card span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: var(--s5);
  border-radius: 8px;
  background: var(--lime);
  color: var(--black);
  font-size: 0.78rem;
  font-weight: 900;
}

.workflow-card h3,
.sample-card__label,
.insight-card span {
  color: var(--white);
  font-weight: 820;
  letter-spacing: 0;
}

.workflow-card h3 {
  margin-bottom: var(--s3);
  font-size: 1rem;
  line-height: 1.25;
}

.workflow-card p,
.sample-card p,
.insight-card p,
.control-panel p {
  color: var(--white-60);
  font-size: 0.94rem;
  line-height: 1.65;
}

.sample-zone {
  background:
    radial-gradient(circle at 18% 8%, rgba(204,255,0,0.07), transparent 22rem),
    var(--black);
}

.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
}

.sample-card {
  min-width: 0;
  padding: clamp(1.1rem, 2.2vw, 1.65rem);
  display: grid;
  gap: var(--s3);
}

.sample-card__label {
  color: var(--lime);
  font-size: var(--t-xs);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.before-after {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
  margin-top: var(--s4);
}

.before-after > div {
  display: grid;
  gap: 0.85rem;
  padding: clamp(1rem, 2.4vw, 1.5rem);
}

.before-after p {
  margin: 0;
  color: var(--white-60);
  font-size: 0.96rem;
  line-height: 1.6;
}

.insight-section {
  border-top: 1px solid var(--border);
}

.insight-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}

.insight-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s4);
}

.insight-card {
  min-width: 0;
  padding: clamp(1rem, 2vw, 1.35rem);
  background:
    linear-gradient(180deg, rgba(204,255,0,0.045), transparent),
    var(--card);
}

.insight-card span {
  display: block;
  margin-bottom: var(--s2);
  color: var(--lime);
  font-size: 0.82rem;
}

.control-section {
  padding-top: 0;
}

.control-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.25rem, 5vw, 3rem);
  align-items: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  background:
    radial-gradient(circle at 100% 0%, rgba(204,255,0,0.12), transparent 28rem),
    var(--card);
}

.control-panel__title {
  margin: 0 0 var(--s3);
  color: var(--white);
  font-size: clamp(1.6rem, 4vw, 2.65rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.state-stack {
  min-width: min(320px, 100%);
  display: grid;
  gap: var(--s3);
}

.state-stack span {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(204,255,0,0.28);
  border-radius: 8px;
  background: rgba(204,255,0,0.08);
  color: var(--white);
  font-size: 0.92rem;
  font-weight: 850;
}

.home-refresh .cta-band__note {
  text-transform: none;
  letter-spacing: 0;
}

.home-refresh .footer__top {
  grid-template-columns: 1.4fr repeat(2, minmax(160px, 1fr));
}

[data-theme='light'] .home-refresh {
  --black: #f6f7f2;
  --off-black: #ecefe6;
  --card: #ffffff;
  --card-hover: #f5f7ef;
  --border: #dfe4d4;
  --border-lit: #cfd8bf;
  --white: #11150d;
  --white-60: rgba(17,21,13,0.66);
  --white-70: rgba(17,21,13,0.74);
  --white-65: rgba(17,21,13,0.68);
  --grey: #5e6855;
  --lime-glow: rgba(126,168,0,0.16);
  --lime-dim: rgba(126,168,0,0.1);
  background:
    radial-gradient(circle at 78% 8%, rgba(126,168,0,0.12), transparent 24rem),
    radial-gradient(circle at 5% 32%, rgba(0,126,150,0.08), transparent 22rem),
    var(--black);
}

[data-theme='light'] .home-refresh .cta-band__title,
[data-theme='light'] .home-refresh .cta-band__sub,
[data-theme='light'] .home-refresh .cta-band__note {
  color: #fff;
}

[data-theme='light'] .home-refresh .nav,
[data-theme='light'] .home-refresh .mobile-nav {
  background: rgba(255,255,255,0.84);
  border-color: rgba(17,21,13,0.12);
  box-shadow: 0 10px 34px rgba(39,47,28,0.08);
}

[data-theme='light'] .home-refresh .mobile-nav {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(247, 249, 242, 0.98)),
    #ffffff;
  border-top-color: rgba(17, 21, 13, 0.12);
}

[data-theme='light'] .home-refresh .landing-pattern {
  opacity: 0.38;
  background:
    linear-gradient(90deg, rgba(126,168,0,0.13) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17,21,13,0.055) 1px, transparent 1px),
    linear-gradient(135deg, transparent 0 46%, rgba(126,168,0,0.14) 46% 46.5%, transparent 46.5% 100%);
  background-size: 72px 72px, 72px 72px, 180px 180px;
}

[data-theme='light'] .home-refresh .theme-switch {
  border-color: rgba(17,21,13,0.12);
  background: rgba(17,21,13,0.055);
}

[data-theme='light'] .home-refresh .btn--ghost {
  color: #11150d;
  border-color: rgba(17,21,13,0.16);
  background: rgba(255,255,255,0.62);
}

[data-theme='light'] .home-refresh .hero__badge,
[data-theme='light'] .home-refresh .workflow-card,
[data-theme='light'] .home-refresh .sample-card,
[data-theme='light'] .home-refresh .insight-card,
[data-theme='light'] .home-refresh .control-panel,
[data-theme='light'] .home-refresh .demo-board__screen,
[data-theme='light'] .home-refresh .demo-board__context,
[data-theme='light'] .home-refresh .before-after > div,
[data-theme='light'] .home-refresh .phone {
  border-color: rgba(17,21,13,0.12);
  background-color: #ffffff;
  box-shadow: 0 20px 60px rgba(39,47,28,0.1);
}

[data-theme='light'] .home-refresh .landing-proof-row span,
[data-theme='light'] .home-refresh .demo-chat__bubble--in {
  border-color: rgba(17,21,13,0.1);
  background: rgba(255,255,255,0.72);
}

[data-theme='light'] .home-refresh .product-strip-card,
[data-theme='light'] .home-refresh .product-strip-card__preview {
  border-color: rgba(17,21,13,0.12);
  background-color: #ffffff;
}

[data-theme='light'] .home-refresh .product-strip-card__preview {
  background:
    linear-gradient(180deg, rgba(126,168,0,0.06), transparent),
    rgba(248,250,244,0.95);
}

[data-theme='light'] .home-refresh .demo-chat__bubble--out {
  background: rgba(126,168,0,0.14);
  border-color: rgba(126,168,0,0.22);
}

[data-theme='light'] .home-refresh .landing-strip {
  background: #e5ebdc;
}

[data-theme='light'] .home-refresh .landing-ticker::before {
  background: linear-gradient(90deg, #e5ebdc, transparent);
}

[data-theme='light'] .home-refresh .landing-ticker::after {
  background: linear-gradient(270deg, #e5ebdc, transparent);
}

[data-theme='light'] .home-refresh .landing-ticker__track {
  color: #11150d;
}

[data-theme='light'] .home-refresh .landing-ticker__label {
  color: #5f7d00;
}

[data-theme='light'] .home-refresh .bubble--in {
  background: #eef2e8;
  color: #11150d;
}

[data-theme='light'] .home-refresh .phone-channel {
  border-color: rgba(17,21,13,0.08);
  background: rgba(255,255,255,0.56);
}

[data-theme='light'] .home-refresh .bubble--out {
  background: #d8f870;
  color: #11150d;
}

[data-theme='light'] .home-refresh .bubble--tag,
[data-theme='light'] .home-refresh .badge-auto,
[data-theme='light'] .home-refresh .state-stack span {
  background: rgba(126,168,0,0.18);
  border-color: rgba(126,168,0,0.36);
  color: #243000;
}

[data-theme='light'] .home-refresh .phone-wrap {
  filter: drop-shadow(0 28px 55px rgba(58,72,38,0.18));
}

[data-theme='light'] .home-refresh .phone {
  border: 1px solid rgba(17,21,13,0.12);
  background:
    linear-gradient(180deg, #f8faf4, #e6eddb);
  box-shadow:
    0 24px 70px rgba(39,47,28,0.14),
    inset 0 0 0 7px rgba(255,255,255,0.86);
}

[data-theme='light'] .home-refresh .phone::before {
  top: 7px;
  width: 74px;
  height: 18px;
  background: rgba(17,21,13,0.12);
}

[data-theme='light'] .home-refresh .phone__header {
  margin: 8px 8px 0;
  border-radius: 30px 30px 12px 12px;
  background:
    linear-gradient(135deg, #d7fb62, #68a000);
  box-shadow: inset 0 -1px 0 rgba(17,21,13,0.08);
}

[data-theme='light'] .home-refresh .ph-avatar {
  background: rgba(17,21,13,0.12);
  color: #11150d;
}

[data-theme='light'] .home-refresh .ph-name {
  color: #11150d;
}

[data-theme='light'] .home-refresh .ph-status {
  color: rgba(17,21,13,0.58);
}

[data-theme='light'] .home-refresh .phone__body {
  margin: 0 8px 8px;
  border-radius: 0 0 30px 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.74), rgba(237,244,226,0.9)),
    linear-gradient(135deg, rgba(126,168,0,0.08) 25%, transparent 25% 50%, rgba(126,168,0,0.08) 50% 75%, transparent 75%);
  background-size: auto, 28px 28px;
}

[data-theme='light'] .home-refresh .phone .bubble--in {
  background: #ffffff;
  color: #11150d;
  border: 1px solid rgba(17,21,13,0.08);
  box-shadow: 0 8px 20px rgba(39,47,28,0.07);
}

[data-theme='light'] .home-refresh .phone .bubble--out {
  background: #c7fb39;
  color: #11150d;
  box-shadow: 0 10px 22px rgba(98,132,0,0.18);
}

[data-theme='light'] .home-refresh .phone .bubble__time {
  color: rgba(17,21,13,0.36);
}

[data-theme='light'] .home-refresh .channel-chip--whatsapp {
  color: #146d37;
}

[data-theme='light'] .home-refresh .channel-chip--gmail {
  color: #9b3f1c;
}

[data-theme='light'] .home-refresh .channel-chip--outlook {
  color: #134f8f;
}

[data-theme='light'] .home-refresh .phone .bubble--tag {
  background: rgba(88,122,0,0.1);
  border-color: rgba(88,122,0,0.2);
  color: #4f6c00;
  box-shadow: none;
}

[data-theme='light'] .home-refresh .phone-wrap .badge-auto {
  right: -8px;
  background: #11150d;
  color: #d7fb62;
  box-shadow: 0 16px 34px rgba(39,47,28,0.2);
}

[data-theme='light'] .home-refresh .phone-wrap .badge-auto--needs-you {
  background: #ff7a00;
  color: #1f0d00;
  box-shadow: 0 16px 34px rgba(255, 122, 0, 0.28), 0 0 24px rgba(255, 122, 0, 0.32);
}

[data-theme='light'] .home-refresh .phone-wrap .badge-auto--ready-quote {
  background: #c7ff00;
  color: #172000;
  box-shadow: 0 16px 34px rgba(98,132,0,0.2), 0 0 24px rgba(199,255,0,0.42);
}

[data-theme='light'] .home-refresh .phone-wrap .badge-auto--ready-invoice {
  background: #a855ff;
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(105, 45, 190, 0.26), 0 0 24px rgba(168, 85, 255, 0.36);
}

[data-theme='light'] .legal-page {
  background:
    linear-gradient(180deg, rgba(126,168,0,0.08), transparent 280px),
    #f6f7f2;
}

[data-theme='light'] .legal-shell h1,
[data-theme='light'] .legal-section h2,
[data-theme='light'] .legal-table th {
  color: #11150d;
}

[data-theme='light'] .legal-lede,
[data-theme='light'] .legal-section p,
[data-theme='light'] .legal-list li,
[data-theme='light'] .legal-table td {
  color: rgba(17,21,13,0.68);
}

[data-theme='light'] .legal-section,
[data-theme='light'] .legal-table,
[data-theme='light'] .legal-table th,
[data-theme='light'] .legal-table td,
[data-theme='light'] .legal-table tr {
  border-color: #dfe4d4;
}

[data-theme='light'] .faq-group,
[data-theme='light'] .faq-closing {
  border-color: #dfe4d4;
}

[data-theme='light'] .faq-group h2,
[data-theme='light'] .faq-closing h2 {
  color: #11150d;
}

[data-theme='light'] .faq-closing p {
  color: rgba(17,21,13,0.68);
}

[data-theme='light'] .faq-item {
  background: #ffffff;
  border-color: #dfe4d4;
}

[data-theme='light'] .faq-item[open] {
  border-color: #c7cfb8;
}

[data-theme='light'] .faq-item__q {
  color: #11150d;
}

[data-theme='light'] .faq-item__icon::before,
[data-theme='light'] .faq-item__icon::after {
  background: rgba(17,21,13,0.55);
}

[data-theme='light'] .faq-item__a p {
  color: rgba(17,21,13,0.68);
}

[data-theme='light'] .faq-item__a a {
  color: #5c7a00;
}

[data-theme='light'] .cookie-consent {
  background: linear-gradient(180deg, transparent, rgba(17,21,13,0.18));
}

[data-theme='light'] .cookie-consent__panel {
  border-color: rgba(126,168,0,0.26);
  background:
    radial-gradient(circle at 100% 0%, rgba(126,168,0,0.13), transparent 28%),
    rgba(255,255,255,0.98);
  box-shadow: 0 22px 80px rgba(39,47,28,0.18);
}

[data-theme='light'] .cookie-consent__copy h2 {
  color: #11150d;
}

[data-theme='light'] .cookie-consent__copy p {
  color: rgba(17,21,13,0.68);
}

[data-theme='light'] .cookie-consent__policy {
  color: #5f7d00;
}

@media (max-width: 980px) {
  .landing-hero__row,
  .insight-layout,
  .demo-board,
  .control-panel {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    min-height: auto;
    padding-top: calc(var(--nav-h) + 2.25rem);
  }

  .landing-hero__copy,
  .landing-hero .hero__body {
    align-items: center;
    text-align: center;
  }

  .landing-hero .hero__sub,
  .hero__trust {
    margin-inline: auto;
  }

  .landing-hero .hero__actions,
  .landing-hero .hero__badges {
    justify-content: center;
  }

  .landing-hero .phone-wrap {
    justify-self: center;
    display: block;
  }

  .landing-ticker__track {
    animation-duration: 28s;
  }

  .workflow-grid,
  .sample-grid,
  .product-strip-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .landing-hero__row,
  .workflow-grid,
  .sample-grid,
  .product-strip-grid,
  .landing-proof-row,
  .before-after,
  .insight-list {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    padding-top: calc(var(--nav-h) + 1.3rem);
  }

  .landing-hero .hero__headline {
    font-size: clamp(2.05rem, 11.5vw, 3.2rem);
    line-height: 1.03;
  }

  .landing-hero .hero__actions {
    width: 100%;
  }

  .landing-hero .hero__actions .btn {
    width: 100%;
  }

  .landing-visual {
    gap: 0.8rem;
  }

  .landing-hero .phone-wrap {
    width: min(292px, 100%);
    transform: none;
  }

  .landing-hero .phone {
    width: min(292px, 100%);
    border-radius: 24px;
    transform: none;
    animation: phone-mobile-rise 6s ease-in-out infinite;
  }

  .landing-hero .phone__body {
    min-height: 286px;
  }

  .landing-hero .badge-auto {
    right: 12px;
    bottom: -12px;
  }

  .home-refresh .hero__badges {
    display: none;
  }

  .landing-section {
    padding: 3.5rem 0;
  }

  .section-header,
  .sample-zone .section-header,
  .landing-demo .section-header {
    margin-bottom: 2rem;
  }

  .demo-board__topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .demo-board__context .btn {
    width: 100%;
  }

  .product-strip-card__preview {
    padding: 0.8rem;
  }

  .inbox-preview__row,
  .doc-preview__line,
  .cal-preview__slot {
    gap: 0.6rem;
  }

  .landing-ticker {
    min-height: 74px;
  }

  .theme-switch span {
    min-height: 36px;
  }

  .home-refresh .footer__top {
    grid-template-columns: 1fr;
  }

  .home-refresh .footer__legal {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.85rem 1.25rem;
  }
}

@media (max-width: 1080px) {
  .home-refresh .theme-switch--compact {
    display: inline-grid;
  }

  .home-refresh .nav__inner {
    gap: 0.6rem;
  }

  .theme-switch--compact span {
    min-height: 30px;
    padding-inline: 0.55rem;
    font-size: 0.66rem;
  }
}

@media (max-width: 400px) {
  .theme-switch--compact span {
    padding-inline: 0.45rem;
    font-size: 0.62rem;
  }
}

@keyframes phone-mobile-rise {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-ticker__track,
  .phone,
  .landing-hero .phone,
  .home-refresh .reveal,
  .home-refresh .reveal-left,
  .home-refresh .reveal-scale {
    animation: none !important;
  }
}

/* Vivid semantic pills: stage and attention colours remain independent. */
.workspace-shell .status-pill--info,
.workspace-shell .status-pill--cyan,
.app-shell .status-pill--info,
.app-shell .status-pill--cyan {
  border-color: rgba(0, 209, 255, 0.88) !important;
  background: rgba(0, 209, 255, 0.22) !important;
  color: #2eeaff !important;
  box-shadow: 0 0 16px rgba(0, 209, 255, 0.28) !important;
}

.workspace-shell .status-pill--attention,
.workspace-shell .status-pill--warn,
.app-shell .status-pill--attention,
.app-shell .status-pill--warn {
  border-color: rgba(255, 122, 0, 0.92) !important;
  background: rgba(255, 122, 0, 0.24) !important;
  color: #ff9a1f !important;
  box-shadow: 0 0 16px rgba(255, 122, 0, 0.30) !important;
}

.workspace-shell .status-pill--success,
.workspace-shell .status-pill--lime,
.app-shell .status-pill--success,
.app-shell .status-pill--lime {
  border-color: rgba(197, 255, 0, 0.92) !important;
  background: rgba(197, 255, 0, 0.28) !important;
  color: #c5ff00 !important;
  box-shadow: 0 0 16px rgba(197, 255, 0, 0.32) !important;
}

html[data-theme="light"] .workspace-shell .status-pill--info,
html[data-theme="light"] .workspace-shell .status-pill--cyan,
html[data-theme="light"] .app-shell .status-pill--info,
html[data-theme="light"] .app-shell .status-pill--cyan {
  border-color: rgba(0, 174, 255, 0.68) !important;
  background: rgba(0, 209, 255, 0.28) !important;
  color: #005f86 !important;
}

html[data-theme="light"] .workspace-shell .status-pill--attention,
html[data-theme="light"] .workspace-shell .status-pill--warn,
html[data-theme="light"] .app-shell .status-pill--attention,
html[data-theme="light"] .app-shell .status-pill--warn {
  border-color: rgba(255, 111, 0, 0.70) !important;
  background: rgba(255, 122, 0, 0.32) !important;
  color: #8a3900 !important;
}

html[data-theme="light"] .workspace-shell .status-pill--success,
html[data-theme="light"] .workspace-shell .status-pill--lime,
html[data-theme="light"] .app-shell .status-pill--success,
html[data-theme="light"] .app-shell .status-pill--lime {
  border-color: rgba(115, 155, 0, 0.62) !important;
  background: rgba(197, 255, 0, 0.38) !important;
  color: #405900 !important;
}
/* Structured job brief: shared by inbox and the job record. */
.evolving-brief { color: var(--text-primary, #172b3a); line-height: 1.5; overflow-wrap: anywhere; }
.brief-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brief-status, .brief-origin { font-size: .75rem; background: #edf3f3; border-radius: 5px; padding: 3px 7px; }
.brief-next { border-left: 3px solid #167467; padding: 8px 12px; margin: 14px 0; background: #f1f8f6; }
.brief-next p { margin: 4px 0; }
.brief-work { border-top: 1px solid #dce6e9; padding-top: 12px; margin-top: 16px; }
.brief-work h3 { font-size: .95rem; margin: 0 0 8px; }
.brief-match { font-size: .82rem; color: #445b65; }
.brief-fact { margin-bottom: 12px; }
.brief-fact dt { font-weight: 600; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.brief-fact dd { margin: 4px 0 0; }
.brief-note, .brief-evidence small { display: block; color: #536975; font-size: .8rem; }
.brief-evidence { margin-top: 5px; font-size: .8rem; }
.brief-evidence summary { cursor: pointer; color: #246d66; }
.brief-evidence blockquote { margin: 8px 0; border-left: 2px solid #ccdada; padding-left: 10px; }
.brief-evidence pre { white-space: pre-wrap; }

/* The brief shares the available conversation width; long evidence must wrap. */
.inbox-detail__identity, .inbox-detail__identity > div, .ai-analysis-panel,
.ai-analysis-body, .evolving-brief, .brief-work, .brief-fact { min-width: 0; max-width: 100%; }
.inbox-detail__name, .inbox-detail__sub, .msg__bubble, .brief-fact dd { overflow-wrap: anywhere; }

/* Customer reply handling stays visible beside the Inbox composer. */
.inbox-reply-control { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 16px; font-size: 12px; }
.inbox-reply-control .btn-card { width: auto; flex: 0 0 auto; margin: 0; }

/* Optional purpose choices use the native, keyboard-accessible disclosure. */
.cookie-consent__preferences { grid-column: 1 / -1; }
.cookie-consent__preferences > summary { width: fit-content; cursor: pointer; list-style: none; }
.cookie-consent__preferences > summary::-webkit-details-marker { display: none; }
.cookie-consent__preferences > summary::after { content: ' +'; margin-left: 0.6em; }
.cookie-consent__preferences[open] > summary::after { content: ' −'; }
.cookie-consent__options { margin-top: 16px; max-height: 35vh; overflow-y: auto; }
.cookie-consent__options p { color: var(--white-60); font-size: 0.9rem; line-height: 1.6; margin-bottom: 12px; }
[data-theme='light'] .cookie-consent__options p { color: #475569; }
@media (max-width: 860px) {
  .cookie-consent__preferences > summary { width: 100%; }
  .cookie-consent__panel { max-height: calc(100dvh - 24px); overflow-y: auto; }
}
