:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #dbe3ef;
  --paper: #ffffff;
  --surface: #f5f8fc;
  --navy: #182078;
  --navy-2: #11175f;
  --blue: #182078;
  --teal: #5c65ad;
  --cyan-soft: #eef0ff;
  --gold: #f59e0b;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --shadow: 0 24px 70px rgba(15, 23, 42, .12);
  --radius: 24px;
  --radius-sm: 14px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}

body:has(.staff-shell) {
  background: #eef4fb;
}

img {
  max-width: 100%;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 32px));
  margin: 16px auto 0;
  padding: 14px 16px;
  border: 1px solid rgba(219, 227, 239, .8);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 20px 50px rgba(15, 23, 42, .08);
  backdrop-filter: blur(18px);
}

.brand,
.staff-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand small,
.staff-logo small {
  display: block;
  margin-top: -5px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: white;
  font-size: .9rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 12px 30px rgba(24, 32, 120, .25);
}

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

.site-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: #334155;
  font-weight: 700;
  font-size: .92rem;
}

.site-nav a:hover {
  background: #eef4fb;
  color: var(--navy);
}

.nav-pill {
  background: var(--navy) !important;
  color: white !important;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: white;
  color: var(--navy);
  cursor: pointer;
}

.section-pad {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
  padding: 86px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 48px;
  min-height: calc(100vh - 90px);
  padding-top: 64px;
}

.hero h1,
.section-heading h2,
.split-section h2,
.request-copy h2,
.staff-header-row h1,
.login-card h1 {
  margin: 0;
  color: var(--navy-2);
  font-size: clamp(2.35rem, 6vw, 5.5rem);
  line-height: .98;
  letter-spacing: -.06em;
}

.hero-copy {
  max-width: 670px;
  margin: 24px 0 0;
  color: #45566e;
  font-size: 1.16rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}

.eyebrow.light {
  color: #dfe2ff;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

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

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--blue), #4b54a5);
  box-shadow: 0 14px 32px rgba(24, 32, 120, .25);
}

.btn-soft {
  color: var(--navy);
  background: white;
  border-color: var(--line);
}

.btn-soft-light {
  color: white;
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .18);
}

.btn-danger {
  color: white;
  background: var(--danger);
}

.btn-full {
  width: 100%;
}

.trust-row,
.logo-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trust-row {
  margin-top: 34px;
}

.trust-row span,
.logo-strip span {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #42526c;
  background: white;
  font-size: .88rem;
  font-weight: 700;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 34px;
  color: white;
  background:
    radial-gradient(circle at 14% 12%, rgba(92, 101, 173, .68), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(92, 101, 173, .72), transparent 38%),
    linear-gradient(145deg, #182078, #0c123f);
  box-shadow: var(--shadow);
}

.device-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 26px;
}

.device-bar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
}

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

.metric-grid div,
.workflow-card {
  padding: 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 20px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(16px);
}

.metric-grid small {
  display: block;
  color: #b6c7da;
  font-weight: 700;
}

.metric-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 1.45rem;
}

.workflow-card {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.workflow-card p {
  margin: 4px 0 0;
  color: #c8d8e8;
}

.workflow-card.muted {
  opacity: .82;
}

.status-dot {
  width: 12px;
  min-width: 12px;
  height: 12px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(245, 158, 11, .15);
}

.status-dot.teal {
  background: var(--teal);
  box-shadow: 0 0 0 8px rgba(92, 101, 173, .18);
}

.workflow-line {
  width: 2px;
  height: 38px;
  margin-left: 23px;
  background: rgba(255,255,255,.24);
}

.logo-strip {
  justify-content: center;
  padding-top: 0;
  padding-bottom: 54px;
}

.logo-strip span {
  color: #65758d;
  background: transparent;
}

.split-section {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 42px;
}

.split-section h2,
.section-heading h2,
.request-copy h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
}

.split-section p,
.section-heading p,
.request-copy p,
.staff-header-row p {
  color: var(--muted);
  font-size: 1.02rem;
}

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

.service-card,
.contact-card,
.staff-card,
.login-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .06);
}

.service-card {
  padding: 26px;
}

.service-card h3,
.package-card h3,
.process-grid h3 {
  margin: 16px 0 8px;
  color: var(--navy-2);
  font-size: 1.24rem;
}

.service-card p,
.package-card p,
.process-grid p {
  margin: 0;
  color: var(--muted);
}

.icon-box,
.process-grid span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: var(--navy);
  background: var(--cyan-soft);
  font-weight: 900;
}

.dark-section {
  width: 100%;
  max-width: none;
  padding: 92px max(16px, calc((100vw - var(--max)) / 2));
  color: white;
  background:
    radial-gradient(circle at 12% 0%, rgba(92, 101, 173, .25), transparent 34%),
    linear-gradient(135deg, var(--navy-2), #090d35 72%);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.section-heading.compact {
  display: block;
  max-width: 760px;
}

.dark-section .section-heading h2,
.dark-section .package-card h3 {
  color: white;
}

.dark-section .section-heading p {
  max-width: 420px;
  color: #bdd1e5;
}

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

.package-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 26px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  background: rgba(255,255,255,.07);
}

.package-card.featured {
  border-color: rgba(132, 141, 211, .7);
  background: linear-gradient(180deg, rgba(92,101,173,.25), rgba(255,255,255,.07));
}

.package-card small {
  color: #dfe2ff;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.package-card p,
.package-card li {
  color: #c8d8e8;
}

.badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #11175f;
  background: #dfe2ff;
  font-size: .75rem;
  font-weight: 900;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 22px 0;
}

.price-row strong {
  color: white;
  font-size: 2.2rem;
  letter-spacing: -.04em;
}

.price-row span {
  color: #bdd1e5;
}

.package-card ul {
  flex: 1;
  display: grid;
  gap: 9px;
  margin: 0 0 24px;
  padding-left: 18px;
}

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

.process-grid div {
  padding: 24px;
  border-radius: var(--radius);
  background: white;
  border: 1px solid var(--line);
}

.request-section {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 38px;
  align-items: start;
}

.contact-card {
  padding: 22px;
  margin-top: 26px;
}

.contact-card p {
  margin-bottom: 0;
}

.request-form,
.admin-form,
.login-card {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow);
}

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

label {
  display: grid;
  gap: 7px;
  color: #334155;
  font-size: .88rem;
  font-weight: 800;
}

label small {
  color: var(--muted);
  font-weight: 600;
}

.form-control,
.form-select,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  min-height: 45px;
  padding: 12px 13px;
  border: 1px solid #cad6e5;
  border-radius: 14px;
  color: var(--ink);
  background: white;
  outline: none;
}

textarea {
  resize: vertical;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(24, 32, 120, .12);
}

.errorlist {
  margin: 0;
  padding-left: 18px;
  color: var(--danger);
  font-size: .82rem;
}

.messages {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(420px, calc(100% - 36px));
}

.message {
  padding: 14px 16px;
  border-radius: 16px;
  color: #064e3b;
  background: #d1fae5;
  box-shadow: 0 16px 40px rgba(15,23,42,.15);
  font-weight: 700;
}

.message.error {
  color: #7f1d1d;
  background: #fee2e2;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 28px;
  width: min(var(--max), calc(100% - 32px));
  margin: 20px auto 30px;
  padding: 26px;
  border-radius: var(--radius);
  color: #c8d8e8;
  background: var(--navy-2);
}

.site-footer p {
  max-width: 560px;
  margin: 6px 0 0;
}

.site-footer a {
  display: block;
  margin-top: 8px;
  color: #dfe2ff;
  font-weight: 800;
}

.staff-shell {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 20px;
  width: min(1460px, calc(100% - 28px));
  margin: 22px auto 42px;
}

.staff-shell + * {
  display: none;
}

.staff-sidebar {
  position: sticky;
  top: 100px;
  height: calc(100vh - 120px);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: white;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
}

.staff-sidebar nav {
  display: grid;
  gap: 8px;
  margin-top: 26px;
}

.staff-sidebar nav a,
.link-button {
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  color: #334155;
  background: transparent;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.staff-sidebar nav a:hover,
.link-button:hover {
  color: var(--navy);
  background: #eef4fb;
}

.staff-main {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.staff-header-row,
.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.staff-header-row h1 {
  font-size: clamp(2rem, 4vw, 3.4rem);
}

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

.stats-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
}

.stats-grid small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.stats-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--navy-2);
  font-size: 2.1rem;
  line-height: 1;
}

.staff-card {
  padding: 22px;
}

.staff-card h2,
.staff-card h3 {
  margin: 0 0 6px;
}

.staff-card p {
  margin: 0;
  color: var(--muted);
}

.toolbar-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 170px auto;
  gap: 10px;
  align-items: center;
  width: min(620px, 100%);
}

.table-wrap {
  overflow-x: auto;
  margin-top: 18px;
}

.staff-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
}

.staff-table th,
.staff-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.staff-table th {
  color: #475569;
  font-size: .78rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.staff-table small {
  color: var(--muted);
}

.table-action {
  color: var(--blue);
  font-weight: 900;
}

.empty-state {
  color: var(--muted);
  text-align: center !important;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-new { color: #92400e; background: #fef3c7; }
.status-contacted { color: #075985; background: #e0f2fe; }
.status-quoted { color: #3730a3; background: #e0e7ff; }
.status-in_progress { color: #0f766e; background: #ccfbf1; }
.status-closed { color: #166534; background: #dcfce7; }
.status-lost { color: #991b1b; background: #fee2e2; }

.checkbox-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.checkbox-row label {
  display: inline-flex;
  align-items: center;
  grid-template-columns: auto 1fr;
}

.form-check-input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

.danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  background: var(--danger-soft);
}

.danger-zone p {
  margin: 4px 0 0;
  color: #7f1d1d;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 20px;
  align-items: start;
}

.request-profile dl {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.request-profile dl div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.request-profile dt {
  color: var(--muted);
  font-weight: 800;
}

.request-profile dd {
  margin: 0;
}

.request-profile a {
  color: var(--blue);
  font-weight: 800;
}

.message-box {
  margin-top: 12px !important;
  padding: 16px;
  border-radius: 16px;
  background: #f8fafc;
}

.login-section {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 220px);
}

.login-card {
  width: min(520px, 100%);
}

.login-card h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.form-error {
  padding: 12px;
  border-radius: 14px;
  color: #7f1d1d;
  background: #fee2e2;
  font-weight: 700;
}

@media (max-width: 980px) {
  .hero,
  .split-section,
  .request-section,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .section-heading,
  .staff-header-row,
  .card-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-form {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .staff-shell {
    grid-template-columns: 1fr;
  }

  .staff-sidebar {
    position: static;
    height: auto;
  }

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

@media (max-width: 720px) {
  .site-header {
    align-items: flex-start;
    border-radius: 24px;
  }

  .nav-toggle {
    display: grid;
    place-items: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: white;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

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

  .hero h1 {
    font-size: clamp(2.3rem, 14vw, 4.2rem);
  }

  .section-pad {
    padding: 58px 0;
  }

  .form-grid,
  .service-grid,
  .package-grid,
  .process-grid,
  .stats-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .request-form,
  .admin-form,
  .login-card,
  .staff-card {
    padding: 20px;
  }

  .site-footer,
  .danger-zone {
    flex-direction: column;
    align-items: flex-start;
  }

  .staff-sidebar nav {
    grid-template-columns: 1fr;
  }

  .request-profile dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Helix Dynamics brand and account portal enhancements */
.brand-logo {
  display: block;
  width: auto;
  height: 64px;
  object-fit: contain;
  object-position: left center;
  border-radius: 10px;
}

.staff-logo {
  display: grid;
  gap: 8px;
}

.staff-logo img {
  width: auto;
  height: 70px;
  object-fit: contain;
  object-position: left center;
  border-radius: 12px;
}

.staff-logo strong {
  color: var(--navy-2);
  font-size: .82rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.nav-form {
  margin: 0;
}

.nav-link-button {
  padding: 10px 14px;
  border: 0;
  border-radius: 999px;
  color: #334155;
  background: transparent;
  font: inherit;
  font-size: .92rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-link-button:hover {
  color: var(--navy);
  background: #eef0ff;
}

.btn-light {
  color: var(--navy-2);
  background: white;
}

.btn-outline-light {
  color: white;
  border-color: rgba(255,255,255,.45);
  background: transparent;
}

.portal-section {
  padding-top: 24px;
}

.portal-panel {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 36px;
  padding: 46px;
  border-radius: 34px;
  color: white;
  background:
    radial-gradient(circle at 88% 10%, rgba(223, 226, 255, .18), transparent 35%),
    linear-gradient(135deg, #182078, #11175f);
  box-shadow: var(--shadow);
}

.portal-panel h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.portal-panel p {
  max-width: 760px;
  margin: 18px 0 0;
  color: #dfe2ff;
}

.portal-actions,
.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.account-note {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #cfd3ff;
  border-radius: 14px;
  color: var(--navy-2);
  background: #f1f2ff;
  font-weight: 700;
}

.footer-secondary {
  color: #bfc4f4 !important;
  font-size: .88rem;
}

.form-switch {
  margin: 0;
  color: var(--muted);
  text-align: center;
}

.form-switch a {
  color: var(--blue);
  font-weight: 800;
}

.account-auth {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: 48px;
  min-height: calc(100vh - 170px);
}

.auth-copy h1,
.account-heading h1 {
  margin: 0;
  color: var(--navy-2);
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1;
  letter-spacing: -.06em;
}

.auth-copy > p,
.account-heading p {
  color: var(--muted);
  font-size: 1.05rem;
}

.auth-benefits {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.auth-benefits div {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.auth-benefits span {
  color: var(--muted);
}

.signup-card {
  width: 100%;
}

.signup-card h2 {
  margin: -6px 0 0;
  color: var(--navy-2);
  font-size: 1.7rem;
}

.account-shell {
  display: grid;
  gap: 22px;
}

.account-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.account-heading h1 {
  font-size: clamp(2.2rem, 5vw, 4rem);
}

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

.account-summary-grid article {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
}

.account-summary-grid small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.account-summary-grid strong {
  display: block;
  margin-top: 7px;
  color: var(--navy-2);
  font-size: 1.8rem;
}

.account-grid {
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  gap: 20px;
  align-items: start;
}

.account-profile-card {
  position: sticky;
  top: 100px;
}

.embedded-form {
  margin-top: 18px;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.account-table {
  min-width: 680px;
}

.stats-grid-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.client-search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  width: min(520px, 100%);
}

.compact-table {
  min-width: 700px;
}

.check-label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 10px;
}

.check-label small {
  grid-column: 2;
}

@media (max-width: 1180px) {
  .stats-grid-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .account-profile-card {
    position: static;
  }
}

@media (max-width: 980px) {
  .portal-panel,
  .account-auth {
    grid-template-columns: 1fr;
  }

  .portal-actions {
    justify-content: flex-start;
  }

  .account-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .brand-logo {
    width: auto;
    height: 52px;
  }

  .portal-panel {
    padding: 28px 22px;
  }

  .account-summary-grid,
  .stats-grid-five {
    grid-template-columns: 1fr;
  }

  .client-search-form {
    grid-template-columns: 1fr;
  }

  .header-actions {
    justify-content: flex-start;
  }
}

/* Database-managed client logo carousel */
.client-showcase {
  padding-top: 34px;
  padding-bottom: 58px;
}

.client-showcase-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.client-showcase-heading h2 {
  max-width: 760px;
  margin: 0;
  color: var(--navy-2);
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: -.05em;
}

.carousel-controls {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.carousel-button {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy-2);
  background: white;
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.carousel-button:hover,
.carousel-button:focus-visible {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 14px 30px rgba(24, 32, 120, .14);
  outline: none;
}

.client-carousel-viewport {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 26px;
}

.client-carousel-viewport::-webkit-scrollbar {
  display: none;
}

.client-carousel-viewport:focus-visible {
  outline: 3px solid rgba(24, 32, 120, .25);
  outline-offset: 5px;
}

.client-carousel-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(190px, 1fr);
  gap: 16px;
  width: max-content;
  min-width: 100%;
  padding: 5px 3px 18px;
}

.client-logo-card {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  min-width: 210px;
  min-height: 150px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: white;
  box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
  scroll-snap-align: start;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

a.client-logo-card:hover,
a.client-logo-card:focus-visible {
  transform: translateY(-4px);
  border-color: #b9bfe8;
  box-shadow: 0 20px 44px rgba(24, 32, 120, .13);
  outline: none;
}

.client-logo-card img {
  width: 100%;
  max-width: 170px;
  height: 72px;
  object-fit: contain;
}

.client-logo-card span {
  color: #475569;
  font-size: .84rem;
  font-weight: 800;
  text-align: center;
}

.staff-logo-preview {
  display: grid;
  place-items: center;
  width: 96px;
  height: 62px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.staff-logo-preview.large {
  width: 180px;
  height: 110px;
  padding: 14px;
}

.staff-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.client-logo-table {
  min-width: 920px;
}

.current-logo-panel {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #f8fafc;
}

.current-logo-panel p {
  margin: 4px 0 0;
  color: var(--muted);
}

.stats-grid-six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stat-total {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .stats-grid-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .client-showcase-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .client-carousel-track {
    grid-auto-columns: minmax(175px, 76vw);
  }

  .client-logo-card {
    min-width: 0;
  }

  .current-logo-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .stats-grid-six {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .client-carousel-viewport {
    scroll-behavior: auto;
  }
}
