/* ==========================================================================
   Cyntra Technologies — navigation, mega menu, footer, portal chrome,
   Get Access dropdown, cart drawer, modals, toasts
   ========================================================================== */

/* --------------------------------------------------------------- navbar */
.nav {
  position: sticky; top: 0; z-index: 90;
  height: var(--nav-h);
  background: rgba(4, 7, 13, 0.86);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.24s ease, border-color 0.24s ease;
}
.nav.solid { background: rgba(4, 7, 13, 0.97); }
.nav-inner {
  height: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
@media (max-width: 640px) { .nav-inner { padding-inline: 18px; } }

.brand { display: inline-flex; align-items: center; gap: 11px; flex: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 15.5px; font-weight: 720;
  letter-spacing: -0.028em; color: #FFFFFF;
}
.brand-sub {
  font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.19em; text-transform: uppercase;
  color: var(--cyan-400); margin-top: 1px;
}
@media (max-width: 420px) { .brand-sub { display: none; } }

.nav-links { display: flex; align-items: center; gap: 2px; }
@media (max-width: 1100px) { .nav-links { display: none; } }

.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 13px; border-radius: 8px;
  font-size: 13.5px; font-weight: 560;
  color: var(--steel-200);
  transition: color 0.16s ease, background 0.16s ease;
  background: none; border: none;
}
.nav-link:hover, .nav-link[aria-expanded='true'] {
  color: #FFFFFF; background: rgba(255, 255, 255, 0.07);
}
.nav-link.current { color: var(--cyan-400); }
.nav-link svg.caret {
  width: 13px; height: 13px; opacity: 0.65;
  transition: transform 0.2s ease;
}
.nav-link[aria-expanded='true'] svg.caret { transform: rotate(180deg); }

.nav-actions { display: flex; align-items: center; gap: 9px; flex: none; }
@media (max-width: 860px) { .nav-actions .desk-only { display: none; } }

.cart-btn { position: relative; }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px;
  background: var(--cyan-500); color: #02181D;
  font-size: 10px; font-weight: 750;
  display: grid; place-items: center; line-height: 1;
}
.cart-count[hidden] { display: none; }

.burger {
  display: none;
  width: 40px; height: 40px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.13);
  color: #FFFFFF; place-items: center;
}
@media (max-width: 1100px) { .burger { display: grid; } }
.burger svg { width: 19px; height: 19px; }

/* ------------------------------------------------------------ mega menu */
.mega {
  position: absolute; left: 0; right: 0; top: var(--nav-h);
  background: linear-gradient(180deg, #070B14 0%, #0B1220 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 89;
}
.mega.open { opacity: 1; visibility: visible; transform: none; }
.mega-inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 34px 24px 30px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px;
}
.mega-inner.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .mega { display: none; } }

.mega-col-title {
  font-size: 10.5px; font-weight: 680;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--cyan-400); margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mega-list { display: grid; gap: 2px; }
.mega-item {
  display: block; padding: 8px 10px; margin-inline: -10px;
  border-radius: 8px;
  transition: background 0.14s ease;
}
.mega-item:hover { background: rgba(255, 255, 255, 0.055); }
.mega-item-name {
  font-size: 13.5px; font-weight: 580; color: #E4EAF2;
  display: flex; align-items: center; gap: 7px;
}
.mega-item-desc {
  font-size: 11.5px; color: var(--steel-400);
  margin-top: 2px; line-height: 1.45;
}
.mega-item:hover .mega-item-name { color: var(--cyan-400); }

.mega-feature {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: linear-gradient(158deg, rgba(18, 195, 214, 0.1), rgba(18, 195, 214, 0.02));
  border: 1px solid rgba(55, 227, 240, 0.2);
}
.mega-feature h4 { font-size: 15px; margin-bottom: 8px; letter-spacing: -0.018em; }
.mega-feature p { font-size: 12.5px; color: var(--steel-300); line-height: 1.6; margin: 0 0 16px; }

.mega-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.28);
}
.mega-foot-inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--steel-300);
}

/* ---------------------------------------------------------- mobile menu */
.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 88;
  background: #070B14;
  overflow-y: auto;
  padding: 24px 20px 48px;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
  visibility: hidden;
}
.mobile-menu.open { transform: none; visibility: visible; }
.mm-group { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.mm-group summary {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 15.5px; font-weight: 620;
  color: #FFFFFF; letter-spacing: -0.015em;
}
.mm-group summary::-webkit-details-marker { display: none; }
.mm-group summary::after {
  content: ''; width: 16px; height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237C8AA3' stroke-width='2.4' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-size: contain; transition: transform 0.2s ease;
}
.mm-group[open] summary::after { transform: rotate(180deg); }
.mm-list { display: grid; gap: 1px; padding-bottom: 14px; }
.mm-list a {
  padding: 10px 12px; border-radius: 8px;
  font-size: 14px; color: var(--steel-200);
}
.mm-list a:hover { background: rgba(255, 255, 255, 0.06); color: #FFFFFF; }
.mm-direct {
  display: block; padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-display); font-size: 15.5px; font-weight: 620;
  color: #FFFFFF; letter-spacing: -0.015em;
}
.mm-cta { display: grid; gap: 10px; margin-top: 26px; }

/* --------------------------------------------------------------- footer */
.foot { background: #04070D; color: var(--steel-300); }
.foot-top {
  padding: 64px 0 44px;
  display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: 40px;
}
@media (max-width: 1040px) { .foot-top { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 680px) { .foot-top { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px; } }

.foot h5 {
  font-size: 10.5px; font-weight: 680;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--steel-200); margin-bottom: 15px;
}
.foot-list { display: grid; gap: 9px; }
.foot-list a { font-size: 13px; color: var(--steel-400); transition: color 0.14s ease; }
.foot-list a:hover { color: var(--cyan-400); }

.foot-brand-copy {
  font-size: 13px; line-height: 1.7;
  color: var(--steel-400); max-width: 34ch; margin: 16px 0 20px;
}
.foot-contact { display: grid; gap: 8px; font-size: 12.5px; color: var(--steel-400); }
.foot-contact a:hover { color: var(--cyan-400); }

.foot-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 22px 0 34px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  font-size: 12px; color: var(--steel-400);
}
.foot-legal-row { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.foot-legal-row a { color: var(--steel-400); }
.foot-legal-row a:hover { color: var(--cyan-400); }

.motion-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.11);
  color: var(--steel-200); font-size: 12px; font-weight: 560;
}
.motion-toggle:hover { background: rgba(255, 255, 255, 0.09); color: #FFFFFF; }
.motion-toggle svg { width: 14px; height: 14px; }

/* ------------------------------------------- Get Access service dropdown */
.picker { position: relative; }
.picker-trigger {
  width: 100%;
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px;
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius);
  background: var(--white); text-align: left;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
.picker-trigger:hover { border-color: var(--steel-200); }
.picker-trigger[aria-expanded='true'] {
  border-color: var(--cyan-500);
  box-shadow: 0 0 0 3px rgba(18, 195, 214, 0.14);
}
.picker-trigger-body { flex: 1; min-width: 0; }
.picker-trigger-name {
  font-size: 14.5px; font-weight: 620; color: var(--ink-900);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.picker-trigger-meta {
  font-size: 12.5px; color: var(--steel-300);
  margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.picker-trigger-price {
  font-family: var(--font-display); font-size: 15px; font-weight: 700;
  letter-spacing: -0.024em; color: var(--ink-900); flex: none; text-align: right;
}
.picker-trigger-price small { display: block; font-size: 10.5px; font-weight: 500; color: var(--steel-300); letter-spacing: 0; }
.picker-caret { width: 17px; height: 17px; color: var(--steel-300); flex: none; transition: transform 0.2s ease; }
.picker-trigger[aria-expanded='true'] .picker-caret { transform: rotate(180deg); }
.picker-placeholder { color: var(--steel-300); font-weight: 500; }

.picker-pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 60;
  background: var(--white);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: none;
}
.picker-pop.open { display: block; }

.picker-search {
  position: relative;
  padding: 13px; border-bottom: 1px solid var(--hairline-light);
  background: var(--pearl-25);
}
.picker-search input {
  width: 100%; padding: 10px 12px 10px 36px;
  border: 1px solid var(--hairline-light); border-radius: 8px;
  background: var(--white); font-size: 14px;
}
.picker-search input:focus { outline: none; border-color: var(--cyan-500); box-shadow: 0 0 0 3px rgba(18, 195, 214, 0.13); }
.picker-search svg {
  position: absolute; left: 25px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--steel-300); pointer-events: none;
}

.picker-filters {
  display: flex; gap: 6px; padding: 11px 13px 0;
  flex-wrap: wrap;
}
.picker-filter {
  padding: 5px 11px; border-radius: 999px;
  font-size: 11.5px; font-weight: 620;
  border: 1px solid var(--hairline-light);
  background: var(--white); color: var(--steel-400);
  transition: all 0.14s ease;
}
.picker-filter:hover { border-color: var(--steel-200); }
.picker-filter[aria-pressed='true'] {
  background: var(--ink-900); border-color: var(--ink-900); color: #FFFFFF;
}

.picker-scroll { max-height: 380px; overflow-y: auto; padding: 8px 0 10px; }
.picker-scroll::-webkit-scrollbar { width: 8px; }
.picker-scroll::-webkit-scrollbar-thumb { background: var(--steel-100); border-radius: 4px; }

.picker-group-label {
  padding: 12px 16px 6px;
  font-size: 10.5px; font-weight: 680;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--cyan-700);
  display: flex; align-items: center; gap: 9px;
}
.picker-group-label::after { content: ''; flex: 1; height: 1px; background: var(--hairline-light); }

.picker-option {
  width: 100%;
  display: flex; align-items: flex-start; gap: 12px;
  padding: 11px 16px; text-align: left;
  background: none; border: none;
  transition: background 0.12s ease;
}
.picker-option:hover, .picker-option.active { background: rgba(18, 195, 214, 0.07); }
.picker-option[aria-disabled='true'] { opacity: 0.45; cursor: not-allowed; }
.picker-option[aria-selected='true'] { background: rgba(18, 195, 214, 0.1); }

.picker-option-icon {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  display: grid; place-items: center;
  background: linear-gradient(150deg, rgba(18, 195, 214, 0.14), rgba(18, 195, 214, 0.04));
  border: 1px solid rgba(18, 195, 214, 0.2);
  color: var(--cyan-700);
}
.picker-option-icon svg { width: 16px; height: 16px; }
.picker-option-body { flex: 1; min-width: 0; }
.picker-option-name {
  font-size: 14px; font-weight: 620; color: var(--ink-900);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  line-height: 1.35;
}
.picker-option-desc {
  font-size: 12px; color: var(--steel-400);
  margin-top: 3px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.picker-option-tail { flex: none; text-align: right; padding-top: 1px; }
.picker-option-price {
  font-family: var(--font-display); font-size: 14px; font-weight: 700;
  letter-spacing: -0.022em; color: var(--ink-900); white-space: nowrap;
}
.picker-option-timeline { font-size: 10.5px; color: var(--steel-300); margin-top: 2px; white-space: nowrap; }

.picker-tag {
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase;
  padding: 2px 6px; border-radius: 4px; flex: none;
}
.picker-tag.popular { background: rgba(18, 195, 214, 0.15); color: var(--cyan-700); }
.picker-tag.recommended { background: rgba(35, 184, 147, 0.15); color: #158768; }
.picker-tag.enterprise { background: rgba(138, 107, 212, 0.15); color: var(--violet-500); }
.picker-tag.new { background: rgba(224, 154, 51, 0.16); color: var(--amber-600); }
.picker-tag.quote { background: var(--pearl-50); color: var(--steel-400); }

.picker-none { padding: 34px 20px; text-align: center; color: var(--steel-300); font-size: 13.5px; }

/* --------------------------------------------------------- order summary */
.summary-card {
  position: sticky; top: calc(var(--nav-h) + 20px);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
@media (max-width: 960px) { .summary-card { position: static; } }

.summary-head {
  padding: 20px 22px;
  background: linear-gradient(158deg, var(--ink-900) 0%, var(--ink-850) 100%);
  color: #FFFFFF;
}
.summary-head h3 { color: #FFFFFF; font-size: 15px; letter-spacing: -0.016em; }
.summary-head p { font-size: 12px; color: var(--steel-300); margin: 4px 0 0; }

.summary-body { padding: 20px 22px; }
.summary-line {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; padding: 8px 0; font-size: 13.5px;
}
.summary-line span:first-child { color: var(--steel-400); }
.summary-line span:last-child { font-weight: 620; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.summary-line.discount span:last-child { color: #1B8560; }
.summary-line.total {
  border-top: 1px solid var(--hairline-light);
  margin-top: 10px; padding-top: 15px;
}
.summary-line.total span:first-child { font-size: 14px; font-weight: 620; color: var(--ink-900); }
.summary-line.total span:last-child {
  font-family: var(--font-display); font-size: 1.42rem; font-weight: 730;
  letter-spacing: -0.03em;
}
.summary-note {
  font-size: 12px; color: var(--steel-300);
  line-height: 1.6; margin-top: 12px;
  padding-top: 12px; border-top: 1px dashed var(--hairline-light);
}

/* Mobile sticky summary bar */
.summary-dock {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 70;
  background: var(--white);
  border-top: 1px solid var(--hairline-light);
  box-shadow: 0 -8px 28px rgba(4, 7, 13, 0.12);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
}
@media (max-width: 960px) { .summary-dock { display: block; } }
.summary-dock-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.summary-dock-label { font-size: 11px; color: var(--steel-300); letter-spacing: 0.04em; text-transform: uppercase; font-weight: 620; }
.summary-dock-value { font-family: var(--font-display); font-size: 1.2rem; font-weight: 730; letter-spacing: -0.028em; color: var(--ink-950); }

/* -------------------------------------------------------------- stepper */
.stepper { display: flex; align-items: center; gap: 0; margin-bottom: 30px; }
.step {
  display: flex; align-items: center; gap: 10px;
  flex: 1; min-width: 0;
}
.step-dot {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700;
  background: var(--pearl-50); color: var(--steel-300);
  border: 1px solid var(--hairline-light);
  transition: all 0.22s ease;
}
.step-label {
  font-size: 12.5px; font-weight: 600; color: var(--steel-300);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.step-line { flex: 1; height: 1px; background: var(--hairline-light); min-width: 12px; }
.step.done .step-dot { background: var(--cyan-600); border-color: var(--cyan-600); color: #FFFFFF; }
.step.done .step-label { color: var(--ink-800); }
.step.active .step-dot {
  background: var(--ink-900); border-color: var(--ink-900); color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(18, 195, 214, 0.14);
}
.step.active .step-label { color: var(--ink-950); font-weight: 660; }
@media (max-width: 760px) { .step-label { display: none; } .step { flex: 0 0 auto; } .step-line { min-width: 20px; } }

/* ---------------------------------------------------------- cart drawer */
.scrim {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(4, 7, 13, 0.6);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.24s ease, visibility 0.24s;
}
.scrim.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed; top: 0 ; right: 0; bottom: 0; z-index: 96;
  width: min(420px, 100vw);
  background: var(--white);
  box-shadow: -20px 0 60px rgba(4, 7, 13, 0.3);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head {
  padding: 20px 22px; border-bottom: 1px solid var(--hairline-light);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.drawer-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer-foot { padding: 18px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--hairline-light); background: var(--pearl-25); }

.cart-item {
  display: flex; gap: 13px; padding: 14px 0;
  border-bottom: 1px solid var(--hairline-light);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 620; color: var(--ink-900); line-height: 1.4; }
.cart-item-meta { font-size: 12px; color: var(--steel-300); margin-top: 3px; }
.cart-item-price { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; letter-spacing: -0.022em; white-space: nowrap; }
.cart-remove {
  background: none; border: none; padding: 4px;
  color: var(--steel-300); border-radius: 6px;
}
.cart-remove:hover { color: #B83B3B; background: rgba(222, 92, 92, 0.08); }
.cart-remove svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------- modal */
.modal {
  position: fixed; inset: 0; z-index: 97;
  display: none; place-items: center;
  padding: 24px;
  overflow-y: auto;
}
.modal.open { display: grid; }
.modal-card {
  position: relative; z-index: 2;
  width: min(560px, 100%);
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  animation: modal-in 0.24s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.modal-card-lg { width: min(760px, 100%); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  padding: 24px 26px 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.modal-body { padding: 18px 26px 26px; }
.modal-close {
  width: 34px; height: 34px; flex: none; border-radius: 8px;
  background: var(--pearl-50); border: none; color: var(--steel-400);
  display: grid; place-items: center;
}
.modal-close:hover { background: var(--pearl-25); color: var(--ink-900); }
.modal-close svg { width: 17px; height: 17px; }

/* --------------------------------------------------------------- toasts */
.toast-zone {
  position: fixed; bottom: 24px; right: 24px; z-index: 99;
  display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
  max-width: min(380px, calc(100vw - 32px));
}
@media (max-width: 640px) { .toast-zone { bottom: 16px; right: 16px; left: 16px; max-width: none; } }
.toast {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--ink-900); color: #FFFFFF;
  box-shadow: var(--shadow-xl);
  font-size: 13.5px; line-height: 1.55;
  pointer-events: auto;
  animation: toast-in 0.26s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.toast.leaving { animation: toast-out 0.22s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.toast.ok svg { color: #63D8AC; }
.toast.err svg { color: #F08A8A; }
.toast.info svg { color: var(--cyan-400); }

/* ------------------------------------------------------- sticky page CTA */
.sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 72;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--hairline-light);
  box-shadow: 0 -6px 24px rgba(4, 7, 13, 0.09);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
  padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
}
.sticky-cta.show { transform: none; }
.sticky-cta-inner {
  max-width: var(--maxw); margin-inline: auto; padding-inline: 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
}
.sticky-cta-copy { min-width: 0; }
.sticky-cta-name {
  font-family: var(--font-display); font-size: 14.5px; font-weight: 660;
  letter-spacing: -0.016em; color: var(--ink-950);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sticky-cta-price { font-size: 12.5px; color: var(--steel-400); margin-top: 1px; }
@media (max-width: 640px) {
  .sticky-cta-inner { padding-inline: 18px; }
  .sticky-cta-copy { display: none; }
  .sticky-cta .btn-row { width: 100%; }
  .sticky-cta .btn { flex: 1; }
}

/* --------------------------------------------------------- portal chrome */
.portal-wrap {
  display: grid; grid-template-columns: 244px minmax(0, 1fr);
  gap: 32px; align-items: start;
  padding-block: 36px 72px;
}
@media (max-width: 940px) { .portal-wrap { grid-template-columns: minmax(0, 1fr); gap: 22px; } }

.portal-nav {
  position: sticky; top: calc(var(--nav-h) + 24px);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-lg);
  background: var(--white);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 940px) {
  .portal-nav {
    position: static; padding: 10px;
    display: flex; gap: 6px; overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
.portal-nav-group { margin-bottom: 14px; }
.portal-nav-group:last-child { margin-bottom: 0; }
.portal-nav-title {
  font-size: 10px; font-weight: 680;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--steel-300); padding: 6px 10px 8px;
}
@media (max-width: 940px) {
  .portal-nav-group { margin: 0; display: flex; gap: 6px; }
  .portal-nav-title { display: none; }
}
.portal-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px; border-radius: 8px;
  font-size: 13.5px; font-weight: 560; color: var(--steel-400);
  transition: background 0.14s ease, color 0.14s ease;
  white-space: nowrap;
}
.portal-link:hover { background: var(--pearl-25); color: var(--ink-900); }
.portal-link.current { background: var(--ink-900); color: #FFFFFF; font-weight: 620; }
.portal-link svg { width: 16px; height: 16px; flex: none; opacity: 0.75; }
.portal-link.current svg { opacity: 1; }
.portal-link-count {
  margin-left: auto; font-size: 11px; font-weight: 680;
  background: var(--pearl-50); color: var(--steel-400);
  padding: 1px 7px; border-radius: 10px;
}
.portal-link.current .portal-link-count { background: rgba(255, 255, 255, 0.18); color: #FFFFFF; }

.portal-head { margin-bottom: 26px; }
.portal-head h1 { font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -0.028em; }
.portal-head p { color: var(--steel-400); margin: 7px 0 0; font-size: 14.5px; }

/* --------------------------------------------------- document (invoice) */
.doc {
  background: var(--white);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  max-width: 860px; margin-inline: auto;
}
.doc-head {
  padding: 34px 38px;
  background: linear-gradient(150deg, var(--ink-900) 0%, var(--ink-850) 100%);
  color: #FFFFFF;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.doc-title {
  font-family: var(--font-display); font-size: 1.65rem; font-weight: 730;
  letter-spacing: -0.03em; color: #FFFFFF; margin: 0;
}
.doc-num { font-family: var(--font-mono); font-size: 13px; color: var(--cyan-400); margin-top: 5px; letter-spacing: 0.01em; }
.doc-body { padding: 34px 38px; }
@media (max-width: 640px) { .doc-head, .doc-body { padding: 22px; } }

.doc-parties {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px; margin-bottom: 30px;
}
@media (max-width: 620px) { .doc-parties { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
.doc-party-label {
  font-size: 10px; font-weight: 680; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--steel-300); margin-bottom: 9px;
}
.doc-party-name { font-size: 15px; font-weight: 660; color: var(--ink-950); margin-bottom: 4px; }
.doc-party-lines { font-size: 13px; line-height: 1.65; color: var(--steel-400); }

.doc-meta-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px; background: var(--hairline-light);
  border: 1px solid var(--hairline-light);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 28px;
}
.doc-meta-grid > div { background: var(--white); padding: 14px 16px; }
@media (max-width: 680px) { .doc-meta-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc-meta-label { font-size: 9.5px; font-weight: 680; letter-spacing: 0.13em; text-transform: uppercase; color: var(--steel-300); }
.doc-meta-value { font-size: 13.5px; font-weight: 620; color: var(--ink-900); margin-top: 4px; }

.doc-totals { margin-left: auto; max-width: 340px; margin-top: 22px; }
.doc-total-line {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 18px; padding: 7px 0; font-size: 13.5px;
}
.doc-total-line span:first-child { color: var(--steel-400); }
.doc-total-line span:last-child { font-weight: 620; font-variant-numeric: tabular-nums; color: var(--ink-900); }
.doc-total-line.grand {
  border-top: 2px solid var(--ink-900); margin-top: 9px; padding-top: 13px;
}
.doc-total-line.grand span:first-child { font-weight: 660; color: var(--ink-950); font-size: 14.5px; }
.doc-total-line.grand span:last-child {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 730; letter-spacing: -0.03em;
}
.doc-foot {
  border-top: 1px solid var(--hairline-light);
  padding: 24px 38px 30px;
  background: var(--pearl-25);
  font-size: 12px; line-height: 1.7; color: var(--steel-400);
}
@media (max-width: 640px) { .doc-foot { padding: 20px 22px; } }

.paid-stamp {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 8px;
  border: 2px solid #1B8560; color: #1B8560;
  font-family: var(--font-display); font-size: 13px; font-weight: 730;
  letter-spacing: 0.1em; text-transform: uppercase;
  transform: rotate(-2deg);
}
.paid-stamp.overdue { border-color: #B83B3B; color: #B83B3B; }
.paid-stamp.pending { border-color: #A9741B; color: #A9741B; }

@media print {
  .doc { border: none; box-shadow: none; max-width: none; border-radius: 0; }
  .doc-head { background: var(--ink-900) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .nav, .foot, .sticky-cta, .summary-dock, .toast-zone { display: none !important; }
}
