@font-face {
  font-family: "Aptos";
  src: url("../fonts/aptos/Aptos.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aptos";
  src: url("../fonts/aptos/Aptos-SemiBold.ttf") format("truetype");
  font-weight: 500 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aptos";
  src: url("../fonts/aptos/Aptos-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Aptos";
  src: url("../fonts/aptos/Aptos-ExtraBold.ttf") format("truetype");
  font-weight: 800 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-family: "Aptos", sans-serif;
  --bs-font-sans-serif: var(--font-family);
  --bs-body-font-family: var(--font-family);
  --bg: #f4f7fb;
  --bg-soft: #f8fbff;
  --panel: #ffffff;
  --panel-soft: #f8fbff;
  --panel-muted: #f3f7fd;
  --line: #dbe5f2;
  --line-strong: #c8d7eb;
  --ink: #0f172a;
  --muted: #64748b;
  --navy: #10233f;
  --blue: #3381ff;
  --blue-deep: #1f5fd8;
  --blue-soft: rgba(51, 129, 255, 0.1);
  --success: #16a34a;
  --danger: #dc2626;
  --warning: #d97706;
  --shadow-sm: 0 12px 24px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 28px 60px rgba(15, 23, 42, 0.08);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
  --container: 1460px;
  --portal-bg: #f5f7fb;
  --portal-surface: #ffffff;
  --portal-surface-muted: #f1f5f9;
  --portal-line: #dbe4f0;
  --portal-text: #253246;
  --portal-text-soft: #5f7085;
  --portal-heading: #111827;
  --portal-primary: #0c6bdc;
  --portal-primary-strong: #094ca6;
  --portal-primary-soft: rgba(12, 107, 220, 0.12);
  --portal-success: #1f9d68;
  --portal-success-soft: rgba(31, 157, 104, 0.12);
  --portal-warning: #d28a16;
  --portal-warning-soft: rgba(210, 138, 22, 0.14);
  --portal-info: #3974e9;
  --portal-info-soft: rgba(57, 116, 233, 0.12);
  --portal-shadow-md: 0 18px 40px rgba(16, 24, 40, 0.05);
  --portal-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-family);
  background:
    radial-gradient(circle at top left, rgba(51, 129, 255, 0.1), transparent 18%),
    radial-gradient(circle at 90% 0%, rgba(16, 35, 63, 0.06), transparent 22%),
    linear-gradient(180deg, #f9fbfe 0%, var(--bg) 100%);
}

h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--navy);
  font-family: var(--font-family);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.05;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

body,
button,
input,
select,
textarea,
table,
.calculator-page,
.expediente-page,
.client-portal-shell,
.client-auth-card,
.client-portal-card,
.portal-card,
.data-table,
.primary-btn,
.secondary-btn {
  font-family: var(--font-family);
}

input::placeholder,
textarea::placeholder {
  font-family: var(--font-family);
}

.calculator-page,
.expediente-page,
.client-portal-shell,
.client-portal-shell *,
.calculator-page *,
.expediente-page * {
  font-family: var(--font-family);
}

button {
  cursor: pointer;
}

button[disabled] {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none !important;
}

svg {
  display: block;
  width: 100%;
  height: 100%;
}

.suite-shell {
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
  padding: 0 0 42px;
}

.suite-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 70px;
  padding: 12px 20px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: none;
  overflow: visible;
}

.suite-header::before,
.client-topbar::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--portal-primary), color-mix(in srgb, var(--portal-primary) 45%, white));
}

.suite-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.suite-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  background: linear-gradient(145deg, var(--portal-primary), var(--portal-primary-strong));
  box-shadow: 0 16px 26px rgba(12, 107, 220, 0.18);
}

.suite-brand-copy {
  display: grid;
  gap: 2px;
}

.suite-brand-copy strong {
  color: var(--portal-heading);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
}

.suite-brand-copy small {
  color: var(--portal-text-soft);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.suite-brand-copy small,
.note-text,
.feature-list li,
.activity-feed li,
.review-stack li,
.metric-line span,
.chip-card span,
.mini-stat span,
.table-row-shell span,
.table-header-row span,
.stack-form label,
.field-row label,
.filter-row label,
.dynamic-section-header p,
.menu-link small,
.text-muted {
  color: var(--muted);
}

.suite-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.suite-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  background: #ffffff;
  color: var(--portal-heading);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: var(--portal-shadow-sm);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.suite-nav svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.suite-nav a:hover,
.suite-nav a:focus-visible,
.suite-nav .active-link {
  color: var(--portal-primary-strong);
  border-color: rgba(12, 107, 220, 0.2);
  background: #ffffff;
  box-shadow: var(--portal-shadow-sm);
  transform: translateY(-1px);
}

.hub-main,
.calculator-main,
.workspace-layout,
.expediente-layout {
  padding-top: 28px;
}

.glass-panel,
.stage-panel,
.insight-card,
.table-card,
.side-panel,
.sticky-actions,
.product-card,
.journey-rail,
.workspace-hero,
.quote-result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.glass-panel,
.stage-panel,
.insight-card,
.table-card,
.side-panel,
.sticky-actions,
.product-card,
.journey-rail,
.workspace-hero {
  padding: 28px;
}

.eyebrow,
.card-kicker {
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 600;
}

.text-link {
  color: var(--blue);
  font-weight: 700;
}

.hub-copy p:not(.eyebrow),
.rail-copy p:not(.eyebrow),
.workspace-hero p:not(.eyebrow),
.section-copy p:not(.eyebrow) {
  margin-top: 14px;
  color: var(--muted);
  line-height: 1.7;
}

.hub-copy h1,
.section-copy h1 {
  margin-top: 12px;
  font-size: clamp(2.4rem, 4.8vw, 4.75rem);
}

.calculator-page .section-copy h1 {
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  font-weight: 600;
  line-height: 1.08;
}

.calculator-page .section-copy p:not(.eyebrow) {  
  font-size: 1rem;
}

.workspace-hero h2,
.panel-head h2,
.product-card h2,
.quote-result-card h2,
.rail-copy h1 {
  margin-top: 10px;
  font-size: clamp(1.8rem, 2.6vw, 2.95rem);
}

.panel-heading h2,
.panel-head h2,
.quote-result-card h2,
.client-panel-head h2,
.auth-heading h2 {
  color: var(--portal-heading);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.25;
}

.cta-row,
.button-row,
.filter-row,
.rail-utility {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #d8e8ff;
  background: #f4f8ff;
  color: var(--blue-deep);
  font-size: 0.9rem;
  font-weight: 700;
}

.primary-btn,
.secondary-btn,
.ghost-btn,
.segment-button,
.step-button,
.menu-link {
  min-height: 48px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease,
    color 180ms ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.ghost-btn:hover,
.segment-button:hover,
.step-button:hover,
.menu-link:hover,
.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.ghost-btn:focus-visible,
.segment-button:focus-visible,
.step-button:focus-visible,
.menu-link:focus-visible {
  transform: translateY(-1px);
}

.primary-btn {
  color: #ffffff;
  font-weight: 700;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 14px 28px rgba(51, 129, 255, 0.22);
}

.secondary-btn {
  color: var(--navy);
  font-weight: 700;
  border-color: #d7e6fb;
  background: #f7fbff;
}

.ghost-btn {
  color: var(--muted);
  font-weight: 700;
  border-color: var(--line);
  background: #ffffff;
}

.wide-btn {
  width: 100%;
}

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #eff6ff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px #d8e8ff;
}

.icon-badge.small-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
}

.icon-badge svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.panel-heading,
.product-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hub-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  gap: 22px;
}

.hub-status {
  display: grid;
  gap: 14px;
  align-content: start;
}

.mini-stat,
.chip-card,
.metric-line,
.review-item,
.distribution-item,
.mail-item,
.metric-card {
  padding: 18px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius-md);
  background: var(--panel-soft);
}

.mini-stat strong,
.chip-card strong,
.metric-line strong,
.review-item strong,
.distribution-item strong,
.metric-card strong {
  display: block;
  margin-top: 6px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.product-card {
  display: grid;
  gap: 18px;
}

.feature-list,
.activity-feed,
.review-stack,
.document-files {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.calculator-stage,
.expediente-main,
.workspace-main,
.workspace-side {
  display: grid;
  gap: 20px;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.stack-form,
.dynamic-form-stack,
.pricing-card,
.table-shell,
.destination-card {
  display: grid;
  gap: 16px;
}

.stack-form label,
.field-row,
.filter-row label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}

.stack-form label,
.field-row label,
.filter-row label {
  color: var(--navy);
}

.required-asterisk {
  color: #dc2626;
  font-weight: 800;
}

.required-fields-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(220, 38, 38, 0.16);
  border-radius: var(--radius-sm);
  background: #fff7f7;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.required-status-pill {
  border-color: rgba(220, 38, 38, 0.16);
  background: #fff7f7;
  color: var(--muted);
}

.stack-form input,
.stack-form select,
.stack-form textarea,
.field-row input,
.field-row select,
.field-row textarea,
.filter-row input,
.filter-row select,
.pricing-editor-row input {
  width: 100%;
  min-height: 52px;
  padding: 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
}

.stack-form textarea,
.field-row textarea {
  min-height: 112px;
  resize: vertical;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus,
.field-row input:focus,
.field-row select:focus,
.field-row textarea:focus,
.filter-row input:focus,
.filter-row select:focus,
.pricing-editor-row input:focus {
  outline: 0;
  border-color: rgba(51, 129, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(51, 129, 255, 0.12);
}

.intl-phone-control {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.intl-phone-control:focus-within {
  border-color: rgba(51, 129, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(51, 129, 255, 0.12);
}

.iti {
  width: 100%;
  font-family: var(--font-family);
}

.iti .iti__tel-input,
.stack-form .iti input,
.field-row .iti input {
  width: 100%;
  min-height: 52px;
  padding-right: 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #ffffff;
  color: var(--ink);
}

.iti .iti__tel-input:focus,
.stack-form .iti input:focus,
.field-row .iti input:focus {
  outline: 0;
  border-color: rgba(51, 129, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(51, 129, 255, 0.12);
}

.iti .iti__selected-country {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: #f8fbff;
  border-right: 1px solid var(--line);
  gap: 8px;
  padding-right: 12px;
  transition: background 0.2s ease;
}

.iti .iti__selected-country:hover,
.iti .iti__selected-country:focus {
  background: #eef5ff;
}

.iti .iti__country-container {
  z-index: 45;
}

.iti .iti__dropdown-content {
  z-index: 9999;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  font-family: var(--font-family);
}

.iti .iti__search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.iti .iti__search-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: var(--blue-deep);
}

.iti .iti__search-icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.iti .iti__search-input {
  min-height: 44px;
  padding: 0 12px;
  border-color: var(--line-strong);
  border-radius: 10px;
  background: #ffffff;
  color: var(--ink);
}

.iti .iti__country {
  min-height: 40px;
  padding: 8px 12px;
}

.iti .iti__country.iti__highlight {
  background: #eff6ff;
}

.stack-form .intl-phone-control select,
.field-row .intl-phone-control select {
  flex: 0 0 126px;
  width: 126px;
  min-height: 50px;
  padding: 0 10px 0 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #f8fbff;
  color: var(--navy);
  box-shadow: none;
}

.stack-form .intl-phone-control input,
.field-row .intl-phone-control input {
  min-height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.stack-form .intl-phone-control select:focus,
.field-row .intl-phone-control select:focus,
.stack-form .intl-phone-control input:focus,
.field-row .intl-phone-control input:focus {
  outline: 0;
  border-color: transparent;
  box-shadow: none;
}

.info-box,
.notice-strip,
.support-strip,
.status-pill,
.document-chip,
.badge-line {
  border: 1px solid #d7e7ff;
  background: #f4f8ff;
}

.info-box,
.notice-strip,
.support-strip {
  padding: 18px;
  border-radius: var(--radius-md);
}

.info-box legend {
  padding: 0 8px;
  color: var(--navy);
  font-weight: 700;
}

.notice-strip,
.support-strip {
  color: var(--blue-deep);
  line-height: 1.65;
}

.checkbox-line {
  display: flex !important;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500 !important;
  margin: 0;
}

.checkbox-line input {
  width: auto;
  min-height: 0;
  margin-top: 4px;
}

.delivery-consent-line {
  align-items: flex-start;
  cursor: pointer;
  line-height: 1.5;
}

.delivery-consent-line input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: var(--blue-deep);
  cursor: pointer;
}

.delivery-consent-line input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.privacy-choice-line span {
  display: grid;
  gap: 5px;
}

.privacy-choice-line {
  padding: 10px 12px;
  border: 1px solid #d7e7ff;
  border-radius: 12px;
  background: #ffffff;
}

.privacy-choice-line input[type="radio"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--blue-deep);
}

.privacy-choice-line strong {
  color: var(--navy);
  font-size: 0.92rem;
  line-height: 1.2;
}

.privacy-choice-line small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.45;
}

.privacy-choice-line small strong {
  display: inline;
  margin-right: 2px;
}

.privacy-read-more {
  font-size: inherit;
}

.form-feedback {
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  line-height: 1.45;
}

.form-feedback.is-danger {
  color: #8a1f24;
  background: #fff1f2;
  border: 1px solid #ffd3d8;
}

.quote-result-card {
  display: grid;
  align-content: start;
  gap: 16px;
  padding: 28px;
}

.metric-stack {
  display: grid;
  gap: 12px;
}

.compact {
  gap: 10px;
}

.highlight-line {
  border-color: #cfe0ff;
  background: #eef5ff;
}

.email-preview {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.email-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.email-preview textarea {
  width: 100%;
  min-height: 150px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  resize: vertical;
}

.expediente-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 22px;
}

.expediente-page:not(.is-authenticated) .suite-header,
.expediente-page:not(.is-authenticated) .journey-rail,
.expediente-page:not(.is-authenticated) .stage-panel:not([data-stage="account"]) {
  display: none;
}

.expediente-page:not(.is-authenticated) .suite-shell {
  min-height: 100vh;
}

.expediente-page:not(.is-authenticated) .expediente-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 460px);
  place-content: center;
  padding: 24px;
}

.expediente-page:not(.is-authenticated) .expediente-main {
  width: 100%;
}

.expediente-page:not(.is-authenticated) .stage-panel[data-stage="account"] {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.expediente-page:not(.is-authenticated) .stage-panel[data-stage="account"] .panel-head {
  display: none;
}

.expediente-page:not(.is-authenticated) .auth-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 32px;
  border: 1px solid rgba(12, 107, 220, 0.1);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98));
  box-shadow: 0 26px 60px rgba(16, 24, 40, 0.08);
}

.expediente-page:not(.is-authenticated) .auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #0c6bdc, #4fa6ff);
}

.client-auth-card {
  gap: 0;
}

.client-auth-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.client-auth-brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: linear-gradient(145deg, #0c6bdc, #094ca6);
  color: #ffffff;
  font-size: 1.3rem;
  font-weight: 600;
  box-shadow: 0 18px 30px rgba(12, 107, 220, 0.22);
}

.client-auth-brand-copy {
  display: grid;
  gap: 6px;
}

.client-auth-brand-copy span {
  color: #5f7085;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.client-auth-brand-copy h2 {
  margin: 0;
  color: #111827;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.15;
}

.expediente-page:not(.is-authenticated) .client-login-form {
  gap: 18px;
}

.client-auth-field {
  display: grid;
  gap: 8px;
  color: #111827;
  font-size: 0.96rem;
  font-weight: 500;
}

.client-field-control {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  background: #ffffff;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.client-field-control:focus-within {
  border-color: rgba(12, 107, 220, 0.45);
  box-shadow: 0 0 0 4px rgba(12, 107, 220, 0.08);
  transform: translateY(-1px);
}

.client-field-control svg {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: var(--portal-primary);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-field-control svg path {
  stroke: currentColor !important;
}

.client-field-control input {
  width: 100%;
  min-width: 0;
  min-height: 54px;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #253246;
}

.client-field-control input::placeholder {
  color: #8b9ab0;
}

.password-toggle-control {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #ffffff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.password-toggle-control:focus-within {
  border-color: rgba(12, 107, 220, 0.45);
  box-shadow: 0 0 0 4px rgba(12, 107, 220, 0.08);
}

.password-toggle-control input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.stack-form .password-toggle-control input {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.client-field-control.has-password-toggle input,
.password-toggle-control input {
  padding-right: 0;
}

.password-toggle-button {
  display: inline-grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--portal-primary);
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.password-toggle-button:hover,
.password-toggle-button:focus-visible {
  background: rgba(12, 107, 220, 0.1);
  color: var(--blue-deep);
  outline: none;
}

.password-toggle-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.expediente-page:not(.is-authenticated) .auth-card .primary-btn {
  min-height: 44px;
  margin-top: 8px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #0c6bdc, #094ca6);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 18px 28px rgba(12, 107, 220, 0.2);
}

.expediente-page:not(.is-authenticated) .auth-card .primary-btn:hover,
.expediente-page:not(.is-authenticated) .auth-card .primary-btn:focus-visible {
  box-shadow: 0 22px 32px rgba(12, 107, 220, 0.24);
}

.auth-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 4px;
}

.auth-heading h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.45rem;
}

.password-policy {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
}

.auth-link-button,
.inline-action-button {
  border: 0;
  background: transparent;
  color: var(--blue-deep);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.auth-link-button {
  justify-self: center;
  padding: 0;
  color: #0c6bdc;
  font-size: 0.9rem;
  font-weight: 600;
}

.auth-switch-copy {
  margin: 0;
  color: #5f7085;
  text-align: center;
  font-size: 0.92rem;
}

.activation-resend-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #cfe0ff;
  border-radius: var(--radius-md);
  background: #eef5ff;
  color: var(--blue-deep);
  text-align: center;
}

.activation-resend-panel[hidden] {
  display: none;
}

.activation-resend-panel p {
  margin: 0;
  line-height: 1.5;
}

.inline-action-button {
  padding: 0 0 2px;
  color: #0c6bdc;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(9, 22, 40, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid #dfe8f3;
  border-radius: var(--radius-lg);
  background: #ffffff;
  box-shadow: var(--shadow-lg);
}

.privacy-modal-box {
  width: min(780px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
}

.privacy-modal-box .auth-heading h2 {
  max-width: calc(100% - 42px);
  font-size: 1.35rem;
  line-height: 1.25;
}

.privacy-modal-content {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.privacy-modal-section {
  display: grid;
  gap: 9px;
}

.privacy-modal-section h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.privacy-modal-section p {
  margin: 0;
  color: var(--portal-text);
  font-size: 0.9rem;
  line-height: 1.6;
  text-align: justify;
}

.privacy-modal-note {
  padding: 12px 14px;
  border: 1px solid #f0d59a;
  border-radius: var(--radius-sm);
  background: #fff9ea;
  color: #66501f;
  font-size: 0.88rem;
  line-height: 1.55;
}

.privacy-modal-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--portal-text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.privacy-declaration-copy {
  margin: 16px 0 0;
  color: var(--navy);
  font-weight: 700;
}

.privacy-policy-line {
  margin: 18px 0 0;
  color: var(--navy);
  line-height: 1.5;
}

.privacy-policy-line a {
  color: #0c6bdc;
  text-decoration: none;
}

.modal-close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #dfe8f3;
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.modal-helper-copy {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.55;
}

.activation-email-mask {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #dfe8f3;
  border-radius: var(--radius-md);
  background: #f8fbff;
  color: var(--navy);
  font-weight: 700;
  text-align: center;
}

.activation-email-mask[hidden] {
  display: none;
}

.recovery-result {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid #cfe0ff;
  border-radius: var(--radius-md);
  background: #eef5ff;
  color: var(--blue-deep);
  line-height: 1.55;
}

.recovery-result-error {
  border-color: #ffd7d7;
  background: #fff5f5;
  color: #b42318;
}

.reset-password-page {
  min-height: 100vh;
  background: var(--surface);
}

.reset-password-page .expediente-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 460px);
  place-content: center;
  padding: 24px;
}

.reset-password-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 32px;
  border: 1px solid rgba(12, 107, 220, 0.1);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 252, 255, 0.98));
  box-shadow: 0 26px 60px rgba(16, 24, 40, 0.08);
}

.reset-password-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #0c6bdc, #4fa6ff);
}

.reset-password-card .client-auth-brand-copy h1 {
  margin: 0;
  color: #111827;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1.15;
}

.reset-password-link {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  margin-top: 18px;
  text-decoration: none;
}

.workspace-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr) 300px;
  gap: 22px;
}

.journey-rail {
  display: grid;
  gap: 18px;
  align-content: start;
}

.step-list,
.backoffice-menu {
  display: grid;
  gap: 10px;
}

.step-button,
.menu-link {
  width: 100%;
  text-align: left;
  color: var(--muted);
  border-color: #e3ebf6;
  background: #ffffff;
  box-shadow: var(--shadow-sm);
}

.step-button.is-current,
.menu-link.is-current,
.segment-button.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
  box-shadow: 0 18px 36px rgba(51, 129, 255, 0.18);
}

.menu-link.is-current small {
  color: rgba(255, 255, 255, 0.8);
}

.step-button strong,
.menu-link-main {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.menu-link small {
  display: block;
  margin-top: 4px;
}

.step-meta {
  display: block;
  margin-bottom: 5px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.86;
}

.workspace-hero {
  display: grid;
  gap: 18px;
}

.summary-chips,
.metric-grid {
  display: grid;
  gap: 16px;
}

.summary-chips {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  display: grid;
  gap: 8px;
}

.metric-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #eff6ff;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px #d8e8ff;
}

.metric-card-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}

.metric-card strong {
  font-size: 2rem;
  color: var(--navy);
}

.stage-panel {
  display: none;
  gap: 20px;
}

.stage-panel.is-active {
  display: grid;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.status-pill,
.document-chip,
.badge-line {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--blue-deep);
  font-size: 0.85rem;
  font-weight: 700;
  width: fit-content;
}

.auth-card,
.contract-summary,
.destination-card,
.review-grid,
.pricing-table {
  display: grid;
  gap: 16px;
}

.contract-layout {
  gap: 18px;
}

.contract-form-tight {
  gap: 12px;
  align-content: start;
}

.contract-form-tight .checkbox-line {
  gap: 10px;
}

.segmented-tabs {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7fbff;
}

.segment-button {
  color: var(--muted);
  font-weight: 700;
  background: transparent;
}

.auth-form {
  display: none;
}

.auth-form.is-visible {
  display: grid;
}

.panel-action-row {
  justify-content: flex-end;
}

.stage-action-row {
  justify-content: flex-end;
  margin-top: 6px;
}

.dynamic-section {
  padding: 22px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.dynamic-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dynamic-section-header h3 {
  font-size: 1.3rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.reference-groups {
  display: grid;
  gap: 18px;
}

.reference-group {
  display: grid;
  gap: 10px;
}

.reference-group h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.reference-lines {
  display: grid;
  gap: 8px;
}

.reference-line {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e5edf7;
  border-radius: 14px;
  background: #fff;
}

.reference-line-label {
  align-self: center;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
}

.reference-line-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.reference-line.is-card-row .reference-line-fields {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
}

.reference-field {
  gap: 4px;
  min-width: 0;
}

.reference-field label {
  font-size: 0.78rem;
  line-height: 1.2;
}

.reference-financial-grid {
  margin-top: 16px;
}

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

.system-config-field .system-config-select:disabled {
  cursor: not-allowed;
  color: var(--ink);
  opacity: 1;
  background-color: #f3f6fa;
  border-color: #c8d3e1;
  -webkit-text-fill-color: var(--ink);
}

.field-row[hidden] {
  display: none !important;
}

.portal-expediente-mount .stack-form label,
.portal-expediente-mount .field-row {
  gap: 6px;
}

.portal-expediente-mount .stack-form input,
.portal-expediente-mount .stack-form select,
.portal-expediente-mount .stack-form textarea,
.portal-expediente-mount .field-row input,
.portal-expediente-mount .field-row select,
.portal-expediente-mount .field-row textarea {
  min-height: 42px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.portal-expediente-mount .field-row textarea,
.portal-expediente-mount .stack-form textarea {
  min-height: 72px;
}

.field-status {
  display: none;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-chip {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-weight: 700;
}

.choice-chip.is-selected {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
}

.document-item {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.document-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.document-files {
  margin: 0;
}

.document-checklist-table {
  overflow: hidden;
  border: 1px solid #e5edf7;
  border-radius: var(--radius-lg);
  background: #fff;
}

.document-table-head,
.document-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.35fr) minmax(260px, 1fr) minmax(140px, 0.45fr);
  align-items: center;
  gap: 14px;
}

.document-table-head {
  padding: 12px 16px;
  background: #f4f8fd;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-table-body {
  display: grid;
}

.document-row {
  padding: 12px 16px;
  border-top: 1px solid #e5edf7;
}

.document-required-cell {
  display: grid;
  gap: 4px;
}

.document-required-cell strong {
  color: var(--navy);
  font-size: 0.93rem;
  line-height: 1.3;
}

.document-index {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.document-upload-cell {
  display: grid;
  gap: 6px;
}

.document-upload-control {
  display: grid;
  gap: 6px;
  color: var(--navy);
  font-size: 0.83rem;
  font-weight: 700;
}

.document-upload-control input[type="file"] {
  width: 100%;
  min-height: 38px;
}

.document-files-compact {
  gap: 4px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.document-status-cell {
  display: flex;
  justify-content: flex-end;
}

.document-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.document-status-badge.is-pending {
  color: #9a5b05;
  background: rgba(210, 138, 22, 0.14);
  border: 1px solid rgba(210, 138, 22, 0.24);
}

.document-status-badge.is-loaded {
  color: #14724c;
  background: rgba(31, 157, 104, 0.13);
  border: 1px solid rgba(31, 157, 104, 0.24);
}

@media (max-width: 760px) {
  .document-table-head {
    display: none;
  }

  .document-row {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 10px;
    padding: 14px;
  }

  .document-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .document-status-cell {
    justify-content: flex-start;
  }
}

.profile-file-evidence {
  margin-top: -6px;
  padding: 10px 12px 10px 28px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--muted);
  font-size: 0.88rem;
}

.stage-panel.is-profile-locked input,
.stage-panel.is-profile-locked select,
.stage-panel.is-profile-locked textarea {
  background: #f4f7fb;
  color: var(--muted);
}

.stage-panel.is-profile-locked .profile-file-evidence {
  border-color: #d6e4f3;
  background: #f8fbff;
  color: var(--ink);
}

.review-grid {
  grid-template-columns: 1fr;
}

.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.review-item,
.distribution-item,
.mail-item {
  display: grid;
  gap: 6px;
}

.compact-review-item {
  gap: 10px;
}

.review-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-item-head strong {
  margin-top: 0;
}

.review-item-head .badge-line {
  flex-shrink: 0;
}

.badge-line.badge-success {
  border-color: rgba(22, 163, 74, 0.16);
  background: rgba(22, 163, 74, 0.08);
  color: var(--success);
}

.badge-line.badge-danger {
  border-color: rgba(220, 38, 38, 0.14);
  background: rgba(220, 38, 38, 0.08);
  color: var(--danger);
}

.sticky-actions {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 18px;
  z-index: 15;
}

.table-shell {
  gap: 12px;
}

.table-header-row,
.table-row-shell {
  display: grid;
  grid-template-columns: 0.85fr 1.2fr 1fr 0.72fr;
  gap: 12px;
  align-items: center;
}

.table-header-row {
  padding: 0 6px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  font-weight: 700;
}

.table-row-shell {
  width: 100%;
  margin-top: 10px;
  padding: 14px 12px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--ink);
  text-align: left;
}

.table-row-shell.is-selected {
  border-color: #bfd7ff;
  background: #eff6ff;
}

.pricing-card {
  padding: 22px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius-lg);
  background: var(--panel-soft);
}

.pricing-editor-row {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.mail-item,
.distribution-item {
  border: 1px solid #e5edf7;
  border-radius: var(--radius-md);
  background: var(--panel-soft);
  padding: 16px;
}

.activity-feed {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.activity-feed li {
  padding: 14px 16px;
  border: 1px solid #e5edf7;
  border-radius: var(--radius-md);
  background: var(--panel-soft);
  line-height: 1.55;
}

.compact-feed li {
  padding: 12px 14px;
}

.hidden-support,
.expediente-page .expediente-chips,
.expediente-page .auth-summary-card,
.expediente-page .contract-notes-row,
.expediente-page .compliance-email-card {
  display: none !important;
}

.toast-shell {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 70;
  max-width: 360px;
  padding: 14px 16px;
  border: 1px solid #d8e8ff;
  border-radius: 16px;
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

.toast-shell.is-success {
  border-color: rgba(22, 163, 74, 0.18);
  background: #f0fdf4;
}

.toast-shell.is-info {
  border-color: rgba(51, 129, 255, 0.2);
  background: #eff6ff;
}

.toast-shell.is-error,
.toast-shell.is-danger {
  border-color: rgba(220, 38, 38, 0.18);
  background: #fef2f2;
}

.expediente-page.is-portal .suite-header {
  display: none;
}

.expediente-page.is-client-booting .suite-shell,
.expediente-page.is-client-booting .expediente-layout,
.expediente-page.is-client-booting .client-portal-shell {
  visibility: hidden;
}

.expediente-page.is-portal {
  --portal-bg: #f5f7fb;
  --portal-surface: #ffffff;
  --portal-surface-muted: #f1f5f9;
  --portal-line: #dbe4f0;
  --portal-text: #253246;
  --portal-text-soft: #5f7085;
  --portal-heading: #111827;
  --portal-primary: #0c6bdc;
  --portal-primary-strong: #094ca6;
  --portal-primary-soft: rgba(12, 107, 220, 0.12);
  --portal-success: #1f9d68;
  --portal-success-soft: rgba(31, 157, 104, 0.12);
  --portal-warning: #d28a16;
  --portal-warning-soft: rgba(210, 138, 22, 0.14);
  --portal-info: #3974e9;
  --portal-info-soft: rgba(57, 116, 233, 0.12);
  --portal-shadow-md: 0 18px 40px rgba(16, 24, 40, 0.05);
  --portal-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.04);
  background:
    radial-gradient(circle at top left, rgba(12, 107, 220, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.06), transparent 18%),
    var(--portal-bg);
}

.expediente-page.is-portal .suite-shell {
  width: 100%;
  max-width: none;
  padding: 0;
}

.client-portal-shell {
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: 100vh;
}

.client-portal-shell[hidden],
.expediente-layout[hidden] {
  display: none !important;
}

.client-sidebar,
.client-topbar,
.client-panel,
.client-stat-card {
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--portal-shadow-sm);
}

.client-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 88px;
  min-width: 88px;
  height: 100vh;
  padding: 16px 12px 14px;
  overflow: hidden;
  border-width: 0 1px 0 0;
  border-color: rgba(148, 163, 184, 0.15);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(12, 107, 220, 0.05), rgba(255, 255, 255, 0.96) 16%, rgba(255, 255, 255, 0.98));
  backdrop-filter: blur(16px);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.5);
  transition: width 220ms ease, min-width 220ms ease, box-shadow 220ms ease;
}

.client-sidebar:hover {
  width: 286px;
  min-width: 286px;
  box-shadow: var(--portal-shadow-md);
}

.client-portal-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 260px;
  padding: 6px 8px 2px;
}

.client-portal-brand .suite-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--portal-primary), var(--portal-primary-strong));
  font-size: 1.1rem;
  font-weight: 600;
  box-shadow: 0 16px 26px rgba(12, 107, 220, 0.18);
}

.client-portal-brand .suite-brand-copy {
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.client-sidebar:hover .client-portal-brand .suite-brand-copy {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.client-portal-brand .suite-brand-copy strong {
  color: var(--portal-heading);
  font-size: 1rem;
  font-weight: 600;
}

.client-portal-brand .suite-brand-copy small {
  color: var(--portal-text-soft);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  margin-right: -6px;
  padding: 4px 6px 12px 2px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: none;
}

.client-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.client-nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  color: var(--portal-text-soft);
  text-align: left;
  cursor: pointer;
  overflow: visible;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.client-nav-link > span:last-child {
  min-width: 0;
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.client-sidebar:hover .client-nav-link > span:last-child {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.client-nav-link small,
.client-panel .muted-copy,
.client-data-table small {
  color: var(--muted);
}

.client-nav-link.is-active,
.client-nav-link:hover {
  color: var(--portal-primary-strong);
  border-color: color-mix(in srgb, var(--portal-primary) 18%, white);
  background: linear-gradient(135deg, var(--portal-primary-soft), rgba(255, 255, 255, 0.94));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--portal-primary) 8%, white);
}

.client-nav-link:hover {
  color: var(--portal-heading);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(12, 107, 220, 0.12);
  transform: translateX(2px);
}

.client-nav-link.is-active {
  color: var(--portal-primary-strong);
  border-color: color-mix(in srgb, var(--portal-primary) 18%, white);
  background: linear-gradient(135deg, var(--portal-primary-soft), rgba(255, 255, 255, 0.94));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--portal-primary) 8%, white);
  transform: none;
}

.client-nav-link.is-active::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 10px;
  bottom: 10px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--portal-primary), color-mix(in srgb, var(--portal-primary) 65%, white));
}

.client-nav-icon,
.icon-action-button,
.user-chip-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.client-nav-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  color: currentColor;
  font-weight: 800;
  line-height: 0;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.client-nav-icon svg,
.icon-action-button svg,
.client-icon-row-action svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-portal-main {
  display: grid;
  align-content: start;
  gap: 0;
  flex: 1;
  min-width: 0;
  padding: 0;
}

.client-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  align-self: start;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 12px 20px;
  border: 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  box-shadow: none;
  overflow: visible;
}

.client-topbar h1 {
  margin: 0;
  color: var(--portal-heading);
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.2;
}

.client-topbar .eyebrow {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  margin: 0 0 2px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--portal-primary-soft);
  color: var(--portal-primary-strong);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.client-topbar-actions,
.client-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-menu-wrap {
  position: relative;
  z-index: 70;
}

.icon-action-button,
.user-chip-button {
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: #ffffff;
  color: var(--portal-heading);
  cursor: pointer;
  box-shadow: var(--portal-shadow-sm);
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.icon-action-button:hover,
.icon-action-button:focus-visible,
.user-chip-button:hover,
.user-chip-button:focus-visible {
  border-color: rgba(12, 107, 220, 0.2);
  transform: translateY(-1px);
}

.icon-action-button {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
}

.icon-action-button em {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--portal-primary);
  color: #ffffff;
  font-size: 0.72rem;
  font-style: normal;
  line-height: 20px;
}

.user-chip-button {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px 0 6px;
  border-radius: 16px;
}

.user-chip-button span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--portal-primary), #59abff);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
}

.user-chip-button strong {
  font-size: 0.94rem;
  font-weight: 600;
}

.portal-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 90;
  min-width: 260px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--portal-shadow-md);
}

.portal-dropdown button,
.portal-dropdown a {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--portal-text);
  font-size: 0.92rem;
  font-weight: 500;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.portal-dropdown button:hover,
.portal-dropdown a:hover {
  background: var(--portal-surface-muted);
  color: var(--portal-heading);
}

.client-view {
  display: none;
}

.client-view.is-active {
  display: grid;
  gap: 22px;
  padding: 20px;
}

.client-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.client-stat-card,
.client-panel {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--portal-shadow-sm);
}

.client-stat-card {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
}

.client-panel {
  padding: 16px;
}

.client-stat-card > span,
.client-data-table th {
  color: var(--portal-text-soft);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0;
}

.client-stat-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.client-stat-card-head > span:first-child {
  color: var(--portal-text-soft);
  font-size: 0.84rem;
  font-weight: 500;
  text-transform: none;
}

.client-stat-icon {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: var(--portal-surface-muted);
  color: var(--portal-primary);
  box-shadow: none;
  line-height: 0;
  overflow: visible;
}

.client-stat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-stat-card strong {
  color: var(--portal-heading);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.1;
}

.client-stat-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 0;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
}

.client-stat-badge.info {
  background: var(--portal-info-soft);
  color: var(--portal-info);
}

.client-stat-badge.warning {
  background: var(--portal-warning-soft);
  color: var(--portal-warning);
}

.client-stat-badge.positive {
  background: var(--portal-success-soft);
  color: var(--portal-success);
}

.client-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr);
  gap: 18px;
  align-items: start;
}

.client-table-scroll {
  overflow-x: auto;
}

.client-data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.client-data-table th,
.client-data-table td {
  padding: 13px 10px;
  border-bottom: 1px solid #edf2f8;
  text-align: left;
  vertical-align: middle;
}

.client-data-table td {
  font-size: 0.94rem;
}

.client-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef6ff;
  color: #155eb9;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.client-status.is-warning {
  background: #fff7ed;
  color: #b45309;
}

.client-status.is-success {
  background: #ecfdf5;
  color: #15803d;
}

.client-status.is-danger {
  background: #fef2f2;
  color: #b91c1c;
}

.client-status.is-pending-completion {
  min-height: 28px;
  padding: 5px 10px;
  background: #fff7ed;
  color: var(--portal-warning);
  border: 1px solid rgba(210, 138, 22, 0.28);
  font-size: 0.82rem;
  animation: pending-status-pulse 1.35s ease-in-out infinite;
}

@keyframes pending-status-pulse {
  0%,
  100% {
    background: #fff7ed;
    box-shadow: 0 0 0 0 rgba(210, 138, 22, 0.1), 0 0 0 rgba(210, 138, 22, 0);
    transform: scale(1);
  }
  50% {
    background: rgba(210, 138, 22, 0.16);
    box-shadow: 0 0 0 3px rgba(210, 138, 22, 0.1), 0 0 10px rgba(210, 138, 22, 0.28);
    transform: scale(1.01);
  }
}

@media (prefers-reduced-motion: reduce) {
  .client-status.is-pending-completion {
    animation: none;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
  }
}

.client-row-action,
.compact-client-button {
  width: auto;
  min-height: 38px;
  padding: 9px 12px;
  font-size: 0.88rem;
}

.client-action-cluster {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  white-space: nowrap;
}

.client-icon-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid #dbe8f8;
  border-radius: 10px;
  background: #ffffff;
  color: #155eb9;
  cursor: pointer;
}

.client-icon-row-action:hover {
  background: #eef6ff;
  border-color: #b9d7ff;
}

.client-icon-row-action.is-warning {
  color: #b45309;
  background: #fff7ed;
  border-color: #fed7aa;
}

.client-row-action-button,
.client-action-static,
.client-cancel-request-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 118px;
  min-height: 38px;
  border-radius: 12px;
  padding: 8px 7px;
  border: 1px solid transparent;
  font-family: var(--font-family);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.client-row-action-button svg,
.client-action-static svg,
.client-cancel-request-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.client-row-action-button:hover,
.client-cancel-request-button:hover {
  transform: translateY(-1px);
}

.client-action-static {
  color: #166534;
  background: #ecfdf3;
  border-color: #bbf7d0;
  cursor: default;
}

.client-row-action-button,
.client-row-action-button.is-primary,
.client-row-action-button.is-success,
.client-row-action-button.is-warning,
.client-row-action-button.is-neutral {
  color: #ffffff;
  background: linear-gradient(135deg, #0d4f9e, #176ac7);
  box-shadow: 0 8px 16px rgba(13, 79, 158, 0.18);
}

.client-row-action-button:hover {
  background: linear-gradient(135deg, #0a3e82, #145ab0);
  box-shadow: 0 10px 20px rgba(13, 79, 158, 0.24);
}

.client-cancel-request-button {
  color: #155eb9;
  background: #ffffff;
  border-color: #2b68c8;
  box-shadow: 0 6px 14px rgba(21, 94, 185, 0.06);
}

.client-cancel-request-button:hover {
  color: #0d4f9e;
  background: #f4f8ff;
  border-color: #155eb9;
  box-shadow: 0 8px 16px rgba(21, 94, 185, 0.1);
}

.danger-client-button {
  background: linear-gradient(135deg, #b42318, #d92d20);
  box-shadow: 0 8px 16px rgba(180, 35, 24, 0.18);
}

.modal-action-row {
  justify-content: flex-end;
  margin-top: 18px;
}

@media (max-width: 760px) {
  .client-action-cluster {
    flex-direction: column;
    align-items: stretch;
    white-space: normal;
  }

  .client-row-action-button,
  .client-action-static,
  .client-cancel-request-button {
    width: 100%;
  }
}

.portal-expediente-panel {
  display: grid;
  gap: 16px;
}

.is-contract-onboarding .portal-expediente-panel > .client-panel-head,
.is-contract-onboarding .portal-stage-actions {
  display: none;
}

.is-contract-onboarding .portal-expediente-panel {
  max-width: 980px;
  margin: 0 auto;
}

.is-contract-onboarding .portal-expediente-mount .stage-panel:not([data-stage="contract"]) {
  display: none !important;
}

.is-contract-onboarding .portal-expediente-mount .stage-panel[data-stage="contract"] {
  display: grid !important;
}

.portal-stage-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.portal-stage-button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid #dbe8f8;
  border-radius: 12px;
  background: #ffffff;
  color: #516174;
  cursor: pointer;
}

.portal-stage-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #eef6ff;
  color: #155eb9;
  font-size: 0.78rem;
  font-weight: 800;
}

.portal-stage-button strong {
  color: inherit;
  font-size: 0.84rem;
}

.portal-stage-button.is-active {
  color: #155eb9;
  border-color: #b9d7ff;
  background: #f4f8ff;
}

.portal-expediente-mount .expediente-main {
  display: grid;
  gap: 18px;
}

.portal-expediente-mount .stage-panel {
  box-shadow: none;
}

.client-notice-list,
.client-notification-list,
.contact-stack {
  display: grid;
  gap: 10px;
}

.client-notice-item,
.client-notification-item {
  padding: 12px;
  border: 1px solid #e6eef8;
  border-radius: 14px;
  background: #f8fbff;
}

.client-notice-item strong,
.client-notification-item strong {
  display: block;
  margin-bottom: 4px;
}

.client-notification-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 4px;
}

.client-notification-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid #cfe0f6;
  border-radius: 999px;
  background: #eef5ff;
  color: #155eb9;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

.client-empty {
  color: var(--muted);
  text-align: center;
}

.support-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 24px;
}

.narrow-client-panel {
  width: min(720px, 100%);
}

.portal-back-button {
  display: none;
  margin-top: 4px;
}

.expediente-page.is-authenticated .portal-back-button {
  display: inline-flex;
}

@media (max-width: 1320px) {
  .workspace-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .workspace-side {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1160px) {
  .hub-hero,
  .hub-grid,
  .two-column,
  .expediente-layout,
  .workspace-layout,
  .client-portal-shell,
  .client-dashboard-grid,
  .support-grid,
  .summary-chips,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .client-sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: auto;
    border-width: 1px;
    border-radius: 18px;
    margin: 12px;
  }

  .client-sidebar:hover {
    width: 100%;
    min-width: 0;
  }

  .client-portal-brand .suite-brand-copy,
  .client-nav-link > span:last-child {
    opacity: 1;
  }

  .client-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(160px, 1fr));
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .client-portal-shell {
    display: grid;
    min-height: 0;
  }

  .client-portal-main {
    padding: 12px;
  }

  .workspace-side {
    grid-template-columns: 1fr;
  }

  .field-grid,
    .pricing-editor-row,
    .table-header-row,
    .table-row-shell,
    .client-stat-grid,
    .review-summary-grid {
    grid-template-columns: 1fr;
  }

  .reference-line {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .reference-line-fields,
  .reference-line.is-card-row .reference-line-fields {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 840px) {
  .suite-shell {
    width: min(100% - 18px, 100%);
  }

  .suite-header,
  .panel-head,
  .client-topbar,
  .client-panel-head,
  .email-preview-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .client-topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .suite-header {
    gap: 14px;
    top: 10px;
    padding: 14px 16px;
  }

  .suite-nav {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .suite-nav::-webkit-scrollbar {
    display: none;
  }

  .suite-nav a {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.95rem;
  }

  .glass-panel,
  .stage-panel,
  .insight-card,
  .table-card,
  .side-panel,
  .sticky-actions,
  .product-card,
  .journey-rail,
  .workspace-hero,
  .quote-result-card {
    padding: 22px;
  }

  .sticky-actions {
    justify-content: stretch;
  }

  .sticky-actions .ghost-btn,
  .sticky-actions .secondary-btn {
    flex: 1 1 100%;
  }

  .journey-rail {
    padding: 18px;
  }

  .step-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(176px, 82%);
    overflow-x: auto;
    padding: 0 2px 6px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-snap-type: x proximity;
  }

  .step-list::-webkit-scrollbar {
    display: none;
  }

  .step-button {
    min-height: 108px;
    scroll-snap-align: start;
  }
}

@media (max-width: 600px) {
  .suite-brand-copy small {
    font-size: 0.78rem;
  }

  .suite-brand {
    gap: 12px;
  }

  .suite-brand-mark {
    width: 42px;
    height: 42px;
    font-size: 1.15rem;
  }

  .hub-copy h1,
  .section-copy h1 {
    font-size: 2.25rem;
  }

  .workspace-hero h2,
  .panel-head h2,
  .product-card h2,
  .quote-result-card h2,
  .rail-copy h1 {
    font-size: 1.65rem;
  }

  .panel-action-row,
  .cta-row,
  .button-row,
  .filter-row {
    flex-direction: column;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    width: 100%;
  }

  .tag-row {
    gap: 8px;
  }

  .suite-shell {
    padding-top: 14px;
  }

  .suite-header {
    border-radius: 20px;
  }

  .suite-nav a {
    font-size: 0.9rem;
  }

  .quote-result-card {
    padding: 22px;
  }

  .step-list {
    grid-auto-columns: minmax(158px, 86%);
  }

  .step-button strong {
    font-size: 0.95rem;
  }
}

.client-data-table .client-status.is-action-state,
.client-dashboard-grid .client-status.is-action-state {
  min-height: 28px !important;
  padding: 5px 10px !important;
  border-radius: 999px !important;
  background: #fff7ed !important;
  color: var(--portal-warning) !important;
  border: 1px solid rgba(210, 138, 22, 0.28) !important;
  font-size: 0.82rem !important;
  line-height: 1.1 !important;
  box-shadow: 0 0 0 0 rgba(210, 138, 22, 0.1);
  animation: pending-status-pulse 1.35s ease-in-out infinite !important;
}

/* Responsive hardening: frontend, calculadora y portal cliente */
html {
  max-width: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
}

.suite-shell,
.workspace,
.workspace-layout,
.expediente-layout,
.client-portal-shell,
.client-portal-main,
.client-view,
.client-panel,
.stage-panel,
.glass-panel,
.quote-result-card,
.client-table-scroll,
.portal-expediente-mount {
  max-width: 100%;
  min-width: 0;
}

.portal-sidebar-toggle {
  display: none;
  flex: 0 0 auto;
}

.portal-dropdown,
.iti .iti__dropdown-content {
  max-width: min(360px, calc(100vw - 24px));
  max-height: min(520px, calc(100dvh - 96px));
  overflow: auto;
  overscroll-behavior: contain;
}

.client-table-scroll,
.portal-stage-actions,
.step-list,
.suite-nav {
  -webkit-overflow-scrolling: touch;
}

.client-data-table {
  max-width: 100%;
}

.field-grid,
.pricing-editor-row,
.summary-chips,
.review-summary-grid,
.client-stat-grid,
.client-dashboard-grid,
.support-grid {
  min-width: 0;
}

.field-row,
.stack-form label,
.compact-form label,
.form-grid label,
.field-row input,
.field-row select,
.field-row textarea,
.stack-form input,
.stack-form select,
.stack-form textarea {
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 980px) {
  .client-portal-shell {
    display: block;
    min-height: 100dvh;
  }

  .portal-sidebar-toggle {
    display: inline-flex;
  }

  .client-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 120;
    width: min(84vw, 320px);
    min-width: 0;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px));
    border-width: 0 1px 0 0;
    border-radius: 0 22px 22px 0;
    transform: translateX(-105%);
    transition: transform 220ms ease, box-shadow 220ms ease;
    box-shadow: none;
  }

  .client-sidebar:hover,
  .client-sidebar.is-open {
    width: min(84vw, 320px);
    min-width: 0;
  }

  .client-sidebar.is-open {
    transform: translateX(0);
    box-shadow: 0 0 0 999px rgba(15, 23, 42, 0.32), var(--portal-shadow-md);
  }

  .client-portal-brand {
    min-width: 0;
  }

  .client-portal-brand .suite-brand-copy,
  .client-nav-link > span:last-child {
    opacity: 1;
    transform: none;
    pointer-events: auto;
  }

  .client-nav {
    display: flex;
    grid-template-columns: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding-right: 2px;
  }

  .client-nav-link {
    min-height: 48px;
  }

  .client-topbar {
    position: sticky;
    grid-template-columns: auto minmax(0, 1fr) auto;
    display: grid;
    align-items: center;
    gap: 10px;
    min-height: 62px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  }

  .client-topbar-title {
    min-width: 0;
  }

  .client-topbar h1 {
    font-size: 1.22rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .client-topbar .eyebrow {
    min-height: 24px;
    padding-inline: 9px;
    font-size: 0.66rem;
  }

  .client-topbar-actions {
    width: auto;
    justify-content: flex-end;
    gap: 8px;
  }

  .user-chip-button {
    min-height: 44px;
    padding: 0 8px 0 4px;
  }

  .user-chip-button strong {
    display: none;
  }

  .icon-action-button {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .portal-dropdown {
    position: fixed;
    top: calc(62px + env(safe-area-inset-top, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));
    left: auto;
    width: min(360px, calc(100vw - 24px));
  }

  .client-view.is-active {
    padding: 14px;
  }

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

  .client-dashboard-grid,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .client-panel,
  .client-stat-card {
    border-radius: 18px;
  }
}

@media (max-width: 720px) {
  .suite-shell {
    width: 100%;
    padding: 10px;
  }

  .suite-header {
    position: sticky;
    top: 8px;
    z-index: 50;
  }

  .client-stat-grid,
  .metric-grid,
  .summary-chips,
  .review-summary-grid,
  .field-grid,
  .pricing-editor-row {
    grid-template-columns: 1fr !important;
  }

  .client-table-scroll {
    margin-inline: -4px;
    padding-bottom: 8px;
  }

  .client-data-table {
    min-width: 680px;
  }

  .client-data-table th,
  .client-data-table td {
    padding: 10px 8px;
    font-size: 0.86rem;
  }

  .client-action-cluster {
    flex-direction: row;
    align-items: center;
    min-width: max-content;
  }

  .client-row-action-button,
  .client-action-static,
  .client-cancel-request-button {
    width: 116px;
    min-height: 34px;
    padding-inline: 9px;
    font-size: 0.78rem;
  }

  .portal-expediente-panel,
  .stage-panel,
  .glass-panel,
  .client-panel {
    padding: 14px;
  }

  .modal-box {
    width: min(100%, calc(100vw - 24px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
    border-radius: 18px;
  }

  .modal-action-row {
    flex-direction: column-reverse;
  }

  .modal-action-row .primary-btn,
  .modal-action-row .secondary-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .client-topbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    padding-inline: 10px;
  }

  .client-topbar-actions {
    gap: 6px;
  }

  .portal-dropdown {
    right: 8px;
    width: calc(100vw - 16px);
  }

  .client-view.is-active {
    padding: 10px;
    gap: 14px;
  }

  .client-stat-card,
  .client-panel {
    padding: 12px;
  }

  .client-action-cluster {
    gap: 8px;
  }

  .client-row-action-button,
  .client-action-static,
  .client-cancel-request-button {
    width: 112px;
  }

  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    min-height: 42px;
  }
}

.status-pill.required-status-pill {
  border-color: rgba(220, 38, 38, 0.16);
  background: #fff7f7;
  color: var(--muted);
}

