:root {
  --bg: #04060f;
  --bg-deep: #020309;
  --bg-surface: rgba(8, 12, 26, 0.62);
  --line: rgba(94, 126, 190, 0.2);
  --line-strong: rgba(169, 192, 238, 0.42);
  --text: #eef4ff;
  --muted: #98a9cd;
  --cyan: #5dd7ff;
  --pulse: #7f6dff;
  --ember: #f58c63;
  --gold: #f2b460;
  --gold-strong: #ea7754;
  --success: #7df3a5;
  --error: #ff8f8f;
  --radius: 20px;
  --shadow: 0 28px 64px rgba(2, 4, 12, 0.56);
  --rail-width: clamp(214px, 20vw, 272px);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
a { color: inherit; }

body.site-body {
  color: var(--text);
  font-family: 'Manrope', sans-serif;
  background:
    radial-gradient(1300px 980px at 8% 6%, rgba(110, 92, 232, 0.15), transparent 58%),
    radial-gradient(1200px 860px at 98% 12%, rgba(242, 180, 96, 0.09), transparent 56%),
    radial-gradient(980px 700px at 52% 110%, rgba(62, 110, 198, 0.12), transparent 60%),
    linear-gradient(180deg, #050814, #020308);
  line-height: 1.62;
  overflow-x: hidden;
}

.marketing-body {
  padding-left: calc(var(--rail-width) + 34px);
  position: relative;
}

.marketing-body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -4;
  opacity: 0.34;
  background-image:
    radial-gradient(2px 2px at 12% 22%, rgba(245, 247, 255, 0.58), transparent 60%),
    radial-gradient(2px 2px at 79% 16%, rgba(236, 229, 255, 0.54), transparent 60%),
    radial-gradient(1.5px 1.5px at 28% 76%, rgba(232, 244, 255, 0.38), transparent 60%),
    radial-gradient(1.5px 1.5px at 70% 66%, rgba(233, 226, 255, 0.34), transparent 60%);
}

.ambient-glow {
  position: fixed;
  filter: blur(120px);
  pointer-events: none;
  z-index: -3;
  opacity: 0.54;
  animation: nebulaPulse 12s ease-in-out infinite;
}

.ambient-glow-1 {
  width: 560px;
  height: 560px;
  top: -140px;
  left: -200px;
  background: rgba(133, 110, 255, 0.34);
}

.ambient-glow-2 {
  width: 620px;
  height: 620px;
  right: -220px;
  bottom: -220px;
  background: rgba(247, 126, 86, 0.24);
  animation-delay: -4s;
}

@keyframes nebulaPulse {
  0%, 100% { transform: scale(1); opacity: 0.48; }
  50% { transform: scale(1.08); opacity: 0.68; }
}

.site-rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail-width);
  padding: 26px 14px;
  border-right: 1px solid rgba(138, 167, 232, 0.26);
  background: linear-gradient(180deg, rgba(10, 14, 31, 0.9), rgba(7, 10, 21, 0.92));
  backdrop-filter: blur(14px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 60;
}

.site-rail::after {
  content: '';
  position: absolute;
  top: 10px;
  bottom: 10px;
  right: -1px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(164, 188, 247, 0.56), transparent);
}

.rail-home {
  text-decoration: none;
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rail-nav a {
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.rail-nav a:hover {
  color: var(--text);
  border-color: rgba(158, 180, 229, 0.45);
  background: rgba(117, 102, 204, 0.18);
}

.rail-nav a.is-active {
  color: var(--text);
  border-color: var(--line-strong);
  background: linear-gradient(120deg, rgba(128, 111, 221, 0.32), rgba(87, 149, 230, 0.24));
}

.rail-nav-expandable {
  display: flex;
  flex-direction: column;
}

.rail-nav-heading {
  padding: 4px 11px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.rail-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 11px;
  border: none;
  border-radius: 11px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.rail-nav-toggle:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.rail-nav-toggle.is-active {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: linear-gradient(120deg, rgba(128, 111, 221, 0.32), rgba(87, 149, 230, 0.24));
}

.rail-nav-dropdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 12px;
  margin-top: 2px;
}

.rail-nav-dropdown a {
  padding: 6px 11px;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
}

.rail-nav-dropdown a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.rail-nav-dropdown a.is-active {
  color: var(--text);
  background: linear-gradient(120deg, rgba(128, 111, 221, 0.32), rgba(87, 149, 230, 0.24));
  border: 1px solid var(--line-strong);
  border-radius: 8px;
}

.product-listing {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-listing a {
  display: block;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 11px;
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 600;
  transition: border-color 0.2s, background 0.2s;
}

.product-listing a:hover {
  border-color: rgba(158, 180, 229, 0.45);
  background: rgba(117, 102, 204, 0.18);
}

.product-price-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 8px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  background: linear-gradient(120deg, rgba(128, 111, 221, 0.28), rgba(87, 149, 230, 0.2));
  border: 1px solid rgba(128, 111, 221, 0.35);
  margin-top: 8px;
}

.product-price-badge:empty {
  display: none;
}

.product-cta-section {
  text-align: center;
}

.product-cta-box {
  max-width: 520px;
  margin: 0 auto;
  padding: 32px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(128, 111, 221, 0.12), rgba(87, 149, 230, 0.08));
  border: 1px solid var(--line);
}

.product-cta-box h2 {
  margin: 0 0 8px;
}

.product-cta-box .product-price-badge {
  margin-bottom: 16px;
}

.product-cta-box .hero-actions {
  justify-content: center;
}

.admin-nav-label {
  padding: 9px 11px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  color: var(--text);
  font-weight: 600;
  background: linear-gradient(120deg, rgba(128, 111, 221, 0.32), rgba(87, 149, 230, 0.24));
  display: block;
}


.site-main {
  padding-top: 28px;
}

.section-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 20px auto;
  padding: 40px;
  border-radius: var(--radius);
  border: 0;
  background:
    radial-gradient(130% 120% at 0% 0%, rgba(99, 92, 193, 0.12), transparent 58%),
    var(--bg-surface);
  box-shadow: 0 26px 62px rgba(2, 4, 12, 0.44);
  position: relative;
  overflow: hidden;
}

.section-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(105, 218, 255, 0.07), transparent 44%, rgba(255, 145, 105, 0.07));
  pointer-events: none;
}

.section-shell::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: calc(var(--radius) - 2px);
  border: 1px solid rgba(150, 170, 214, 0.08);
  pointer-events: none;
}

.page-hero h1 {
  margin: 0;
  padding: 0 0 0.4em;
  font-family: 'Syne', sans-serif;
  line-height: 1.5;
  font-size: clamp(1.4rem, 3.3vw, 2.8rem);
  max-width: 17ch;
  text-wrap: balance;
  overflow: visible;
  display: block;
}

.hero-kicker,
.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cyan);
}

.hero-copy,
.about-copy,
.offer-card p,
.portal-muted {
  margin: 0;
  color: var(--muted);
}

.download-notice {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(255, 180, 50, 0.3);
  border-radius: 8px;
  background: rgba(255, 180, 50, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.download-notice strong {
  color: #ffb432;
}

.home-hero .hero-copy {
  max-width: 72ch;
  margin-top: 20px;
  font-size: 1.05rem;
}

.home-hero .hero-actions {
  margin-top: 24px;
}

.home-page .home-hero {
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 10px 0 14px;
}

.home-page .home-hero::before,
.home-page .home-hero::after {
  display: none;
}

.hero-signals {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-signals span {
  display: inline-flex;
  align-items: center;
  padding: 7px 0;
  border-radius: 0;
  border: 0;
  background: transparent;
  border-bottom: 1px solid rgba(100, 132, 192, 0.34);
  font-size: 0.92rem;
  color: #cad9f4;
}

h2,
h3 {
  margin: 0 0 12px;
  padding: 0 0 0.36em;
  font-family: 'Syne', sans-serif;
  line-height: 1.48;
  overflow: visible;
  display: block;
}

h2 {
  font-size: clamp(1.24rem, 2.35vw, 1.96rem);
}

h3 {
  font-size: clamp(1.02rem, 1.62vw, 1.28rem);
}

.page-hero {
  width: min(1120px, calc(100% - 28px));
  margin: 26px auto 18px;
  padding: 0;
}

.page-hero .hero-copy {
  max-width: 72ch;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 24px;
  align-items: end;
}

.plain-section {
  width: min(1120px, calc(100% - 28px));
  margin: 28px auto;
  padding: 10px 0;
}

.hero-brand-plaque {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.brand-title-image {
  max-width: min(680px, 100%);
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.38));
}

.home-title-image {
  max-width: min(780px, 100%);
  margin-bottom: 12px;
  background: transparent;
  filter: brightness(1.12) contrast(1.08) saturate(1.06) drop-shadow(0 16px 24px rgba(5, 7, 16, 0.5));
  mix-blend-mode: screen;
  opacity: 0.92;
  -webkit-mask-image: radial-gradient(ellipse 78% 74% at 50% 50%, #000 66%, transparent 100%);
  mask-image: radial-gradient(ellipse 78% 74% at 50% 50%, #000 66%, transparent 100%);
}

.hero-actions,
.about-actions,
.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.gift-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.gift-form input,
.gift-form select {
  background: rgba(16, 21, 50, 0.9);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-size: inherit;
}

.gift-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2398a9cd' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.gift-form select option {
  background: #0c1029;
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  padding: 11px 16px;
  font-family: inherit;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  color: #25130a;
  background: linear-gradient(120deg, var(--gold), var(--gold-strong));
  box-shadow: 0 12px 24px rgba(238, 119, 77, 0.32);
}

.btn-secondary {
  color: #0e1533;
  background: linear-gradient(120deg, rgba(130, 149, 255, 0.98), rgba(105, 218, 255, 0.96));
  box-shadow: 0 12px 22px rgba(112, 151, 255, 0.24);
}

.btn-ghost {
  color: var(--text);
  background: rgba(15, 21, 46, 0.74);
  border-color: var(--line);
}

.hero-stats,
.offer-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 12px;
}

.stat-card,
.offer-card {
  border-radius: 0;
  border: 0;
  border-left: 2px solid rgba(120, 148, 210, 0.45);
  padding: 10px 0 10px 14px;
  background: transparent;
}

.stat-card strong {
  display: block;
  margin-bottom: 5px;
}

.product-panel {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
  border: 0;
  border-radius: 0;
  padding: 8px 0;
  background: transparent;
}

.product-panel ul {
  margin: 10px 0 0 18px;
  padding: 0;
}

.note {
  color: var(--cyan);
  font-weight: 600;
}

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

.quote-shell {
  width: min(1120px, calc(100% - 28px));
  margin: 20px auto;
  padding: 40px;
  border-radius: var(--radius);
  background:
    radial-gradient(130% 120% at 0% 0%, rgba(99, 92, 193, 0.12), transparent 58%),
    var(--bg-surface);
  box-shadow: 0 26px 62px rgba(2, 4, 12, 0.44);
}

.quote-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18, 23, 51, 0.9);
  color: var(--text);
  padding: 11px 12px;
  font-family: inherit;
}

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

.status-text {
  min-height: 22px;
  margin-top: 10px;
  font-weight: 600;
}

.status-text[data-state="error"] { color: var(--error); }
.status-text[data-state="success"] { color: var(--success); }
.status-text[data-state="info"] { color: var(--cyan); }

.site-footer {
  width: min(1120px, calc(100% - 28px));
  margin: 0 auto 24px;
  padding: 16px 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--muted);
}

.site-footer a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.site-footer a:hover {
  color: var(--text);
}

.admin-page .site-main,
.admin-page .site-footer {
  visibility: visible;
  transition: visibility 0s linear;
}

.admin-page.is-locked .site-main,
.admin-page.is-locked .site-footer {
  visibility: hidden;
  pointer-events: none;
  user-select: none;
}

.admin-gate {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 5, 14, 0.72);
}

.admin-gate.is-active {
  display: flex;
}

.admin-gate-card {
  width: min(520px, 100%);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(12, 18, 43, 0.95);
  padding: 20px;
  box-shadow: var(--shadow);
}

.admin-gate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.site-header {
  position: sticky;
  top: 14px;
  z-index: 40;
  width: min(1120px, calc(100% - 28px));
  margin: 16px auto;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  background: rgba(12, 18, 43, 0.84);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(240, 165, 77, 0.62);
  display: grid;
  place-items: center;
  text-decoration: none;
  color: var(--gold);
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, rgba(240, 165, 77, 0.24), rgba(106, 216, 255, 0.14));
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--text);
}

.portal-wrap {
  width: min(1120px, calc(100% - 28px));
  margin: 28px auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.auth-only-card {
  width: min(700px, 100%);
  margin: 28px auto;
}

.portal-account-wrap {
  grid-template-columns: 1fr;
}

.card {
  border-radius: var(--radius);
  border: 0;
  background: rgba(14, 19, 46, 0.9);
  padding: 22px;
  box-shadow: 0 26px 62px rgba(2, 4, 12, 0.44);
}

.auth-tabs { display: flex; gap: 8px; margin: 16px 0; }

.auth-tab {
  background: rgba(22, 31, 66, 0.76);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
}

.auth-tab.active {
  border-color: var(--gold);
  color: var(--gold);
}

.auth-form {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.auth-form.active { display: flex; }

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
  background: rgba(16, 21, 50, 0.9);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
  font-family: inherit;
  font-size: inherit;
}

.auth-form select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2398a9cd' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.auth-form select option {
  background: #0c1029;
  color: var(--text);
}

.admin-otp-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(20, 28, 62, 0.58);
}

.admin-otp-panel h3 {
  margin-bottom: 8px;
}

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

.account-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.product-row {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-top: 14px;
  background: rgba(20, 28, 62, 0.68);
}

.admin-launch-row {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed rgba(125, 243, 165, 0.45);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(10, 26, 24, 0.45);
}

.promo-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
  font-weight: 600;
}

.promo-field input {
  background: rgba(16, 21, 50, 0.9);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px;
}

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

.portal-admin-wrap .card:last-child {
  grid-column: 1 / -1;
}

.portal-admin-wrap > .card:nth-child(1),
.portal-admin-wrap > .card:nth-child(2),
.portal-admin-wrap > .card:nth-child(6) {
  grid-column: 1 / -1;
}

.admin-builder-form {
  display: grid;
  gap: 14px;
}

.builder-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: rgba(16, 23, 53, 0.62);
  display: grid;
  gap: 10px;
}

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

.builder-row-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-builder-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
}

.admin-builder-form input,
.admin-builder-form select,
.admin-builder-form textarea {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18, 23, 51, 0.9);
  color: var(--text);
  padding: 10px 11px;
  font-family: inherit;
}

.line-items-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid rgba(122, 154, 216, 0.24);
  border-radius: 12px;
  overflow: hidden;
}

.line-items-table thead {
  background: rgba(28, 36, 75, 0.9);
}

.line-items-table th,
.line-items-table td {
  border-bottom: 1px solid rgba(122, 154, 216, 0.22);
  padding: 8px;
  vertical-align: middle;
  text-align: left;
}

.line-items-table tbody tr:last-child td {
  border-bottom: 0;
}

.line-items-table th {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d7e4ff;
}

.line-items-table td input[type="text"],
.line-items-table td input[type="number"] {
  width: 100%;
  margin: 0;
}

.line-items-table .col-desc { width: 38%; }
.line-items-table .col-qty { width: 10%; }
.line-items-table .col-price { width: 16%; }
.line-items-table .col-total { width: 16%; }
.line-items-table .col-recurring { width: 10%; }
.line-items-table .col-action { width: 10%; }

.row-center {
  text-align: center;
}

.btn-sm {
  padding: 7px 10px;
  font-size: 0.84rem;
}

.gst-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.totals-section {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.totals-box {
  width: min(360px, 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(9, 14, 34, 0.72);
  display: grid;
  gap: 6px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.totals-row.total-final {
  margin-top: 5px;
  padding-top: 6px;
  border-top: 1px solid rgba(128, 160, 220, 0.3);
  font-size: 1.02rem;
}

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

.admin-history-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 14px;
}

.bank-match-panel {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(16, 23, 53, 0.62);
}

.bank-match-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

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

.admin-quote-form label,
.admin-invoice-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-weight: 600;
}

.admin-quote-form input,
.admin-quote-form select,
.admin-quote-form textarea,
.admin-invoice-form input,
.admin-invoice-form select,
.admin-invoice-form textarea {
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18, 23, 51, 0.9);
  color: var(--text);
  padding: 11px 12px;
  font-family: inherit;
}

.admin-item-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: rgba(20, 28, 62, 0.58);
}

.admin-item h3 {
  margin-bottom: 8px;
}

.admin-item p {
  margin: 4px 0;
  color: var(--muted);
}

.admin-item select {
  margin-top: 6px;
  width: 100%;
  background: rgba(16, 21, 50, 0.9);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 9px;
}

.admin-alert {
  color: var(--gold);
  font-weight: 700;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-invoices-block {
  margin-top: 18px;
}

.client-invoice-list {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.client-invoice-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(20, 28, 62, 0.58);
}

.client-invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.client-invoice-header strong {
  font-size: 1.02rem;
}

.client-invoice-total {
  font-weight: 700;
  font-size: 1.06rem;
}

.client-invoice-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-left: 8px;
  vertical-align: middle;
}

.client-invoice-badge--draft { background: rgba(100, 132, 192, 0.22); color: #b0c4f0; }
.client-invoice-badge--sent { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }
.client-invoice-badge--paid { background: rgba(74, 222, 128, 0.18); color: #86efac; }
.client-invoice-badge--overdue { background: rgba(251, 146, 60, 0.22); color: #fdba74; }

.client-invoice-dates {
  margin-top: 4px;
  font-size: 0.88rem;
}

.client-invoice-items {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 0.92rem;
  color: var(--muted);
}

.client-invoice-items li {
  margin: 2px 0;
}

.client-invoice-actions {
  margin-top: 10px;
}

.client-invoice-paid-note {
  margin-top: 8px;
  font-size: 0.88rem;
}

.product-scope-fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0;
}

.product-scope-fieldset legend {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0 6px;
}

.btn-danger-action {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.btn-danger-action:hover {
  background: rgba(239, 68, 68, 0.3);
}

.entitlement-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.entitlement-list li { color: var(--text); }
.entitlement-list li span { display: block; color: var(--muted); }
.portal-footnote { color: var(--muted); font-size: 0.92rem; margin-top: 12px; }

[data-animate] {
  opacity: 1;
  transform: none;
}

.js-ready [data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.js-ready [data-animate].in-view {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .marketing-body {
    padding-left: 0;
  }

  .site-main {
    padding-top: 14px;
  }

  .site-rail {
    position: sticky;
    inset: 0 0 auto 0;
    width: 100%;
    height: auto;
    padding: 10px 12px;
    border-right: 0;
    border-bottom: 1px solid rgba(141, 168, 219, 0.24);
    display: grid;
    gap: 10px;
  }

  .site-rail::after {
    display: none;
  }

  .rail-brand {
    padding: 10px;
  }

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

  .rail-nav a {
    text-align: center;
  }

  .hero-grid,
  .product-panel,
  .portal-wrap,
  .quote-form {
    grid-template-columns: 1fr;
  }

  .admin-quote-form,
  .admin-invoice-form {
    grid-template-columns: 1fr;
  }

  .builder-row,
  .builder-row-3 {
    grid-template-columns: 1fr;
  }

  .line-items-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .section-shell {
    padding: 22px;
  }

  .quote-shell {
    padding: 22px;
  }

  .hero-signals {
    gap: 8px;
  }

  .hero-signals span {
    font-size: 0.83rem;
    padding: 7px 0;
  }

  .site-footer {
    justify-content: center;
  }

  .admin-launch-row {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header {
    flex-wrap: wrap;
    justify-content: center;
  }
}

.plain-section::before {
  display: none;
}


.plain-section::after {
  display: none;
}


.portal-body .site-main {
  padding-top: 28px;
}

.quote-reply-dialog {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: var(--bg-card, #0e1127);
  color: inherit;
  max-width: 560px;
  width: 90vw;
  padding: 0;
}
.quote-reply-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.quote-reply-dialog .builder-card {
  margin: 0;
}
