/* =========================
BASE
========================= */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  color: #e5e7eb;
  background: radial-gradient(circle at 20% 20%, #0f172a, #020617 65%);
  overflow-x: hidden;
}

/* ambient glow */
body::before {
  content: "";
  position: fixed;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(124,58,237,0.25), transparent 70%);
  top: -250px;
  right: -250px;
  filter: blur(100px);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }

/* =========================
INPUTS
========================= */
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: #fff;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #7c3aed;
}

select {
  appearance: none;
}

select option {
  background: #0f172a;
  color: #fff;
}

/* =========================
HEADER
========================= */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 32px;
}

.brand {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -0.02em;

  background: linear-gradient(135deg, #ffffff 0%, #ddd6fe 35%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  text-shadow:
    0 8px 24px rgba(124, 58, 237, 0.35),
    0 2px 6px rgba(255, 255, 255, 0.15);
}

.top-nav {
  display: flex;
  gap: 12px;
}

.nav-pill {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  font-size: 13px;
  transition: 0.2s;
}

.nav-pill:hover {
  background: rgba(255,255,255,0.12);
}

/* =========================
PANELS / CARDS
========================= */
.panel {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 20px;
}

.engine-card {
  padding: 18px;
}

.card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 12px 14px;
  transition: 0.15s;
}

.card:hover {
  background: rgba(255,255,255,0.06);
}

/* =========================
LAYOUT
========================= */
.stack > * + * {
  margin-top: 14px;
}

.engine-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

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

/* full-width cards */
.full-width {
  grid-column: 1 / -1;
}

/* =========================
CREATE JOB CARD FIX
========================= */
#createJobCard {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#createJobCard textarea {
  flex: 1;
  min-height: 160px;
}

/* =========================
BUTTONS
========================= */
.btn {
  border: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  box-shadow: 0 6px 24px rgba(124,58,237,0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: #e5e7eb;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.14);
}

/* =========================
TEXT
========================= */
.muted {
  opacity: 0.6;
  font-size: 13px;
}

/* =========================
PRINT CLEAN
========================= */
@media print {
  .nav-pill,
  button {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .panel, .card {
    border: none;
    background: none;
  }
}
.engine-card .panel + .panel {
  margin-top: 12px;
}
#jobList {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* =========================
HOMEPAGE LAYOUT RESTORE
========================= */

.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 60px 32px;
  align-items: center;
}

.hero-copy {
  width: 100%;
}

.hero h1 {
  font-size: 32px;
  margin: 12px 0;
}

.hero .lead {
  opacity: 0.8;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.hero-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.engine-panel {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 20px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.engine-panel:hover {
  transform: scale(1.02);
  background: rgba(255,255,255,0.06);
  border-color: rgba(167, 139, 250, 0.24);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.22), 0 0 26px rgba(74, 222, 128, 0.08);
}

.engine-panel-head h3 {
  margin: 8px 0 10px;
  font-size: 1.25rem;
  line-height: 1.2;
}

.engine-panel-head p {
  margin: 0;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.6;
}

.engine-panel-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.68);
}

.engine-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.engine-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.engine-panel:hover .engine-tile {
  background: rgba(255,255,255,0.05);
}

.engine-tile:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.07);
  border-color: rgba(124, 58, 237, 0.22);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
}

.engine-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(74, 222, 128, 0.14));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02) inset;
}

.engine-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.engine-icon svg path,
.engine-icon svg rect,
.engine-icon svg circle {
  stroke: #b7a7ff;
}

.engine-tile:nth-child(even) .engine-icon svg path,
.engine-tile:nth-child(even) .engine-icon svg rect,
.engine-tile:nth-child(even) .engine-icon svg circle {
  stroke: #86efac;
}

.engine-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.35;
}

.engine-panel-cta {
  margin-top: 18px;
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(248, 250, 252, 0.9);
}

.cta-hint {
  margin-left: 6px;
  color: #a78bfa;
  font-weight: 600;
  opacity: 0.9;
}

.cta-hint:hover {
  opacity: 1;
  text-decoration: underline;
}

.engine-icon-spin svg {
  animation: engine-spin 32s linear infinite;
}

.engine-panel:hover .engine-icon {
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.12), 0 0 22px rgba(74, 222, 128, 0.08);
}

@keyframes engine-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
  .engine-panel-grid {
    grid-template-columns: 1fr;
  }
}

.mini-stat {
  background: rgba(255,255,255,0.04);
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
}

.section {
  padding: 60px 32px;
}

.section-head {
  margin-bottom: 24px;
}

.role-grid,
.pricing-grid,
.step-grid {
  display: grid;
  gap: 20px;
}

.role-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.pricing-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.role-card,
.price-card,
.step-card {
  background: rgba(255,255,255,0.04);
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  transition: 0.15s;
}

.role-card:hover,
.price-card:hover,
.step-card:hover {
  background: rgba(255,255,255,0.08);
}

.price {
  font-size: 28px;
  margin: 10px 0;
}

.price span {
  font-size: 14px;
  opacity: 0.7;
}

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

/* =========================
LANDING PAGE POLISH
Additive premium conversion pass
========================= */

:root {
  --accent-green: #22c55e;
  --accent-green-soft: rgba(34, 197, 94, 0.12);
  --accent-purple-soft: rgba(124, 58, 237, 0.24);
  --surface-strong: rgba(255,255,255,0.06);
  --surface-hover: rgba(255,255,255,0.09);
  --border-soft: rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --shadow-soft: 0 18px 40px rgba(2, 6, 23, 0.32);
  --shadow-strong: 0 24px 60px rgba(2, 6, 23, 0.5);
}

body::after {
  content: "";
  position: fixed;
  inset: auto auto -180px -180px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(124,58,237,0.16), transparent 72%);
  filter: blur(110px);
  pointer-events: none;
  z-index: 0;
}

.site-header,
main {
  position: relative;
  z-index: 1;
}

.top-nav {
  align-items: center;
}

.nav-link,
.nav-pill,
.btn,
.role-card,
.price-card,
.step-card,
.mini-stat {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease,
    background-color 0.25s ease,
    color 0.25s ease,
    opacity 0.25s ease;
}

.hero {
  padding-top: 72px;
  padding-bottom: 72px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 14px;
  border: 1px solid rgba(124,58,237,0.22);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: #ddd6fe;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(124, 58, 237, 0.10);
}

.hero h1 {
  max-width: 28ch;
  font-size: clamp(32px, 5.2vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  color: #f8fafc;
  text-wrap: balance;
  text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.hero h1::first-line {
  color: #ffffff;
}

.hero .lead {
  max-width: 68ch;
  margin-bottom: 24px;
  font-size: 18px;
  line-height: 1.75;
  color: rgba(226, 232, 240, 0.88);
}

.trial-note {
  color: rgba(226, 232, 240, 0.72);
}

.btn {
  position: relative;
  overflow: hidden;
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 46%, var(--accent-green) 100%);
  color: #f8fafc;
  box-shadow:
    0 14px 34px rgba(124, 58, 237, 0.28),
    0 10px 24px rgba(34, 197, 94, 0.14);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(255,255,255,0));
  opacity: 0.45;
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 18px 40px rgba(124, 58, 237, 0.30),
    0 14px 30px rgba(34, 197, 94, 0.18);
  filter: saturate(1.06);
}

.btn-secondary {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.20);
  background: rgba(255,255,255,0.10);
}

.hero-card,
.panel {
  position: relative;
}

.mini-stat,
.role-card,
.price-card,
.step-card {
  box-shadow: var(--shadow-soft);
}

.mini-stat {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--border-soft);
}

.mini-stat:hover {
  transform: translateY(-3px);
  border-color: rgba(124,58,237,0.24);
  box-shadow:
    0 20px 46px rgba(2, 6, 23, 0.4),
    0 0 0 1px rgba(124,58,237,0.10);
}

.mini-label {
  display: block;
  margin-bottom: 6px;
  color: rgba(226, 232, 240, 0.65);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mini-stat strong {
  color: #f8fafc;
  font-size: 17px;
  line-height: 1.45;
}

.section-head h2 {
  margin: 0 0 8px;
  font-size: clamp(30px, 3vw, 40px);
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.section-head p {
  max-width: 60ch;
  color: rgba(226, 232, 240, 0.74);
  line-height: 1.7;
}

.role-card,
.price-card,
.step-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.03));
  border-color: var(--border-soft);
}

.role-card:hover,
.price-card:hover,
.step-card:hover {
  transform: translateY(-4px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.045));
  border-color: var(--border-strong);
  box-shadow:
    var(--shadow-strong),
    0 0 0 1px rgba(124,58,237,0.08);
}

.role-card h3,
.price-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: #f8fafc;
}

.role-card p,
.price-card li,
.step-card span {
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.65;
}

.price-card {
  overflow: hidden;
}

.price-card.featured {
  border-color: rgba(124,58,237,0.24);
  background:
    linear-gradient(180deg, rgba(124,58,237,0.16), rgba(91,33,182,0.10) 24%, rgba(255,255,255,0.04) 100%);
  box-shadow:
    0 22px 52px rgba(2, 6, 23, 0.42),
    0 0 0 1px rgba(124,58,237,0.10);
}

.price-card.featured::before {
  content: "Popular";
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124,58,237,0.16);
  border: 1px solid rgba(124,58,237,0.24);
  color: #e9d5ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.price {
  margin: 14px 0 16px;
  font-size: clamp(42px, 4.8vw, 56px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: #f8fafc;
}

.price-card.featured .price {
  color: #dcfce7;
  text-shadow: 0 0 22px rgba(34, 197, 94, 0.18);
}

.price span {
  margin-left: 6px;
  font-size: 16px;
  opacity: 0.8;
  color: rgba(226, 232, 240, 0.72);
}

.price-card ul {
  padding-left: 18px;
}

.price-card li::marker,
.step-card strong {
  color: var(--accent-green);
}

.steps .section-head {
  margin-bottom: 28px;
}

.step-grid {
  position: relative;
  isolation: isolate;
  align-items: center;
  gap: 28px;
}

.step-grid::before {
  content: "";
  position: absolute;
  left: 3%;
  right: 3%;
  top: 50%;
  height: 1px;
  background: linear-gradient(90deg, rgba(124,58,237,0), rgba(124,58,237,0.42) 22%, rgba(34,197,94,0.4) 50%, rgba(124,58,237,0.42) 78%, rgba(124,58,237,0));
  transform: translateY(-50%);
  opacity: 0.7;
  pointer-events: none;
  z-index: 0;
}

.step-card {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.18);
}

.step-card:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.03);
  border-color: rgba(124,58,237,0.22);
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.2);
}

.step-card strong {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #22c55e);
  color: #fff;
  text-shadow: none;
}

.step-card span {
  display: inline-block;
  font-size: 15px;
  line-height: 1.3;
  color: rgba(226, 232, 240, 0.72);
  white-space: nowrap;
}

@media (max-width: 768px) {
  .hero {
    padding-top: 52px;
    padding-bottom: 56px;
    gap: 24px;
  }

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

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .price-card.featured::before {
    top: 12px;
    right: 12px;
  }

  .step-grid::before {
    display: none;
  }

  .step-card {
    transform: none;
  }
}
/* HERO FINAL OVERRIDE */
.hero h1 {
  white-space: normal !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
}

/* UNDER THE HOOD PAGE */
.system-page {
  max-width: 1100px;
  margin: 0 auto;
  padding-bottom: 64px;
}

.system-hero {
  padding-top: 40px;
  padding-bottom: 20px;
}

.system-head h1 {
  margin: 0 0 10px;
  font-size: clamp(38px, 4.4vw, 54px);
  letter-spacing: -0.04em;
  color: #f8fafc;
}

.system-head p {
  margin: 0;
  max-width: 64ch;
  color: rgba(226, 232, 240, 0.8);
  line-height: 1.65;
}

.system-section {
  padding-top: 20px;
  padding-bottom: 20px;
}

.system-section .section-head {
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.system-section .section-head h2 {
  margin: 0;
  font-size: clamp(26px, 2.7vw, 33px);
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.pipeline-view {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.pipeline-step {
  color: #f8fafc;
  font-size: 16px;
  line-height: 1.65;
}

.pipeline-arrow {
  color: rgba(226, 232, 240, 0.5);
  font-size: 15px;
  line-height: 1;
}

.engine-block {
  position: relative;
  margin-bottom: 14px;
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
}

.engine-block:first-of-type {
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.engine-block::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10%;
  bottom: 10%;
  width: 2px;
  background: linear-gradient(#7c3aed, #22c55e);
  opacity: 0.6;
}

.engine-block:hover {
  border-color: rgba(124,58,237,0.3);
  box-shadow: 0 10px 30px rgba(124,58,237,0.08);
}

.engine-block h3 {
  margin: 0 0 8px;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.engine-function {
  margin: 0 0 14px;
  color: rgba(226, 232, 240, 0.68);
  font-size: 16px;
  line-height: 1.7;
}

.engine-outputs {
  margin-top: 14px;
  margin-bottom: 12px;
}

.engine-outputs strong {
  display: inline-block;
  margin-bottom: 4px;
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.engine-outputs ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.engine-outputs li {
  margin: 6px 0;
  color: rgba(226, 232, 240, 0.88);
  font-size: 17px;
  line-height: 1.55;
}

.engine-toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: #c4b5fd;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.engine-toggle:hover {
  color: #ddd6fe;
}

.engine-detail {
  margin-top: 12px;
  padding: 14px;
  background: rgba(0,0,0,0.25);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  color: rgba(226, 232, 240, 0.74);
  font-size: 17px;
  line-height: 1.85;
}

.engine-detail > div + div {
  margin-top: 10px;
}

.engine-detail strong {
  color: #f8fafc;
}

.hidden {
  display: none;
}

.system-cta {
  padding-top: 28px;
}

.system-cta-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.system-return-link {
  color: rgba(226, 232, 240, 0.74);
}

.system-return-link:hover {
  color: #f8fafc;
}

@media (max-width: 768px) {
  .system-page {
    padding-bottom: 48px;
  }

  .system-hero {
    padding-top: 24px;
  }

  .pipeline-view {
    padding: 16px;
  }

  .system-cta-actions {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* LOGIN PAGE */
.auth-page {
  background:
    radial-gradient(circle at 20% 30%, rgba(124,58,237,0.12), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(34,197,94,0.10), transparent 40%),
    #020617;
}

.auth-wrap {
  min-height: 100vh;
  padding: 32px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.login-panel {
  width: 100%;
  max-width: 420px;
  margin: 120px auto;
  padding: 28px 26px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  box-shadow:
    0 30px 80px rgba(2,6,23,0.7),
    0 0 40px rgba(124,58,237,0.10);
}

.auth-brand {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #ddd6fe 35%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow:
    0 8px 24px rgba(124, 58, 237, 0.35),
    0 2px 6px rgba(255, 255, 255, 0.15);
}

.login-panel h1 {
  margin: 0 0 10px;
  font-size: 30px;
  color: #f8fafc;
}

.login-panel .muted {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(226, 232, 240, 0.72);
  opacity: 1;
}

.login-panel label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #e5e7eb;
}

.login-panel input {
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  margin-bottom: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  color: #e5e7eb;
}

.login-panel input:focus {
  border-color: rgba(124,58,237,0.6);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.4);
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #7c3aed, #22c55e);
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(124,58,237,0.3);
}

.btn-login:hover {
  transform: translateY(-1px);
}

.auth-foot {
  margin: 18px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(226, 232, 240, 0.72);
  text-align: center;
}

.auth-foot a {
  color: #a78bfa;
}

.auth-foot a:hover {
  text-decoration: underline;
}

.login-panel .message {
  margin-top: 16px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .auth-wrap {
    padding: 24px 16px;
  }

  .login-panel {
    margin: 72px auto;
    padding: 24px 20px;
  }

  .auth-brand {
    font-size: 30px;
  }
}

/* SIGNUP PAGE */
.signup-page {
  background:
    radial-gradient(circle at 20% 30%, rgba(124,58,237,0.12), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(34,197,94,0.10), transparent 40%),
    #020617;
}

.page-wrap.narrow {
  max-width: 980px;
  margin: 0 auto;
  padding: 32px 20px 56px;
}

.trial-panel {
  max-width: 720px;
  margin: 80px auto;
  padding: 32px 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  box-shadow:
    0 30px 80px rgba(2,6,23,0.7),
    0 0 40px rgba(124,58,237,0.10);
}

.trial-head {
  margin-bottom: 26px;
}

.trial-head h1 {
  margin: 0 0 10px;
  font-size: 34px;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.trial-head p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: rgba(226,232,240,0.72);
}

.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 20px 0 26px;
}

.tier-card {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.03);
  color: #e5e7eb;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.tier-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
}

.tier-card.active {
  border-color: rgba(124,58,237,0.6);
  box-shadow: 0 0 20px rgba(124,58,237,0.25);
  background: rgba(255,255,255,0.05);
}

.signup-form.panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
  backdrop-filter: none;
}

.form-section {
  margin-bottom: 22px;
}

.form-section h3 {
  margin: 0 0 10px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226,232,240,0.6);
}

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

.signup-form label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #e5e7eb;
}

.signup-form input,
.signup-form select {
  width: 100%;
  padding: 12px 14px;
  margin-top: 8px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  color: #e5e7eb;
}

.signup-form input:focus,
.signup-form select:focus {
  border-color: rgba(124,58,237,0.6);
  box-shadow: 0 0 0 1px rgba(124,58,237,0.4);
}

.signup-form .check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.signup-form .check input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  flex: 0 0 16px;
}

.signup-form .muted {
  color: rgba(226,232,240,0.68);
  opacity: 1;
  line-height: 1.6;
}

.signup-form .btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #7c3aed, #22c55e);
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(124,58,237,0.3);
}

.trial-note {
  margin-top: 14px;
  font-size: 13px;
  color: rgba(226,232,240,0.6);
  text-align: center;
}

.signup-form .message {
  margin-top: 14px;
  font-size: 14px;
}

@media (max-width: 768px) {
  .trial-panel {
    margin: 56px auto;
    padding: 24px 20px;
  }

  .tier-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* CONTRACTOR DASHBOARD HIERARCHY */
.collapsible-block {
  margin-top: 2px;
}

.collapsible-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0 10px;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background-color 0.18s ease, filter 0.18s ease;
}

.collapsible-toggle:hover {
  background: rgba(124,58,237,0.08);
  filter: brightness(1.04);
}

.collapsible-chevron {
  color: #c4b5fd;
  flex: 0 0 auto;
  font-size: 18px;
}

.collapsible-title {
  flex: 1 1 auto;
}

.collapsible-meta {
  color: rgba(226, 232, 240, 0.68);
  font-size: 13px;
  font-weight: 600;
}

.collapsible-summary {
  padding: 8px 0 10px;
  color: rgba(226, 232, 240, 0.72);
  font-size: 13px;
  line-height: 1.45;
}

.collapsible-content {
  display: grid;
  grid-template-rows: 1fr;
  overflow: hidden;
  transition: grid-template-rows 0.2s ease, opacity 0.2s ease;
  opacity: 1;
}

.collapsible-content.is-collapsed {
  grid-template-rows: 0fr;
  opacity: 0.85;
}

.collapsible-content > * {
  min-height: 0;
}

.collapsible-block:has(.collapsible-content.is-collapsed) .panel {
  box-shadow: 0 8px 18px rgba(2, 6, 23, 0.18);
}

.collapsible-block:has(.collapsible-content.is-collapsed) .collapsible-inner .panel {
  padding-top: 12px;
  padding-bottom: 12px;
}

.estimator-actions-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.estimator-actions .btn {
  flex: 1 1 180px;
}

.estimator-override-btn {
  border-color: rgba(124,58,237,0.32);
  background: rgba(124,58,237,0.12);
  color: #e9d5ff;
}

.dashboard-secondary-btn,
.estimator-override-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(124,58,237,0.3);
  color: #e2e8f0;
  box-shadow: 0 8px 18px rgba(15,23,42,0.14);
}

.dashboard-secondary-btn:hover,
.estimator-override-btn:hover {
  border-color: rgba(124,58,237,0.6);
  background: rgba(255,255,255,0.06);
  box-shadow:
    0 10px 22px rgba(15,23,42,0.18),
    0 0 14px rgba(124,58,237,0.12);
}

.estimator-override-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.estimator-override-row input {
  flex: 1 1 220px;
  margin: 0;
}

.bom-list-panel {
  padding-top: 6px;
  padding-bottom: 6px;
}

.bom-item-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

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

.bom-item-row span {
  color: rgba(226, 232, 240, 0.74);
  white-space: nowrap;
}

.load-diagram-panel,
.load-calc-panel {
  padding: 12px 16px;
}

.diagram-stage {
  width: 100%;
  display: flex;
  justify-content: center;
  overflow: hidden;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  border-radius: 10px;
}

.load-diagram {
  overflow: hidden;
  height: 100%;
}

.diagram-stage svg {
  width: 100%;
  height: auto;
  display: block;
}

.diagram-surface {
  width: 100%;
  background: rgba(248, 250, 252, 0.96);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.diagram-surface svg,
.diagram-surface img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  color: #0f172a;
}

.diagram-surface canvas {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
}

.load-diagram svg,
.load-diagram img,
.load-diagram canvas {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.load-status {
  margin-bottom: 10px;
  font-weight: 700;
}

.load-status-ok {
  color: #86efac;
}

.load-status-warning {
  color: #fca5a5;
}

.load-status-neutral {
  color: #fcd34d;
}

.load-summary-block,
.load-breakdown-block {
  margin-top: 10px;
}

.load-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.load-summary-item {
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}

.load-summary-item span {
  display: block;
  margin-bottom: 4px;
  color: rgba(226, 232, 240, 0.7);
  font-size: 12px;
}

.load-summary-item strong {
  color: #f8fafc;
}

.load-breakdown-list {
  margin-top: 8px;
}

.load-breakdown-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
}

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

.load-breakdown-row span {
  color: rgba(226, 232, 240, 0.78);
}

.engine-card > h3 {
  position: relative;
  margin: 0 0 12px;
  padding-left: 14px;
  color: #e0e7ff;
  letter-spacing: 0.02em;
}

.engine-card > h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7c3aed, #22c55e);
}

.dashboard-section-title {
  position: relative;
  margin: 0 0 12px;
  padding-left: 14px;
  color: #e0e7ff;
  letter-spacing: 0.02em;
}

.dashboard-section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #7c3aed, #22c55e);
}

.job-action-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.job-action-bar .btn {
  flex: 0 1 auto;
}

@media (max-width: 768px) {
  .estimator-actions,
  .estimator-override-row,
  .bom-item-row {
    flex-direction: column;
  }

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

  .bom-item-row span {
    white-space: normal;
  }
}
