.portal {
  --portal-navy: #172333;
  --portal-deep: #111b2d;
  --portal-muted: #526176;
  --portal-bg: #f2f5f8;
  --portal-panel: #ffffff;
  --portal-rule: #dce3eb;
  --portal-soft: #eff3f7;
  --portal-red-soft: #faeee9;
  --portal-radius: 10px;
  background: var(--portal-bg);
}
.portal-main { min-height: 74vh; padding-block: 21px 65px; }
.portal-crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; color: var(--portal-muted); font-size: .78rem; margin-bottom: 22px; }
.portal-crumb a:hover, .signin-help a:hover { text-decoration: underline; }
.portal-crumb span[aria-current] { color: var(--ink); font-weight: 700; }
.portal-load, .portal-empty { border: 1px solid var(--portal-rule); border-radius: var(--portal-radius); background: var(--portal-panel); padding: 26px; color: var(--portal-muted); }
.portal-load .button { margin-left: 14px; }
.portal-signin { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(295px, .75fr); max-width: 1070px; margin: clamp(14px, 4vw, 43px) auto; border: 1px solid var(--portal-rule); border-radius: 15px; overflow: hidden; background: var(--portal-panel); box-shadow: 0 12px 35px #1826380d; }
.signin-photo {
  min-height: 460px;
  display: grid;
  align-items: end;
  background: linear-gradient(180deg, #17233315 6%, #111b2de8 82%), url('/assets/vitrine/comptoir-omnitec.jpg') center / cover;
  color: #fff;
}
.signin-copy { padding: clamp(24px, 5vw, 60px); }
.signin-label { margin-bottom: 12px; color: #ffd3cb; font-size: .75rem; font-weight: 700; letter-spacing: .12em; }
.signin-copy h1 { font: 700 clamp(2.25rem, 5vw, 4.4rem)/1.02 var(--display); letter-spacing: -.05em; max-width: 12ch; margin-bottom: 12px; }
.signin-copy > p:last-child { color: #edf2f8; max-width: 35ch; }
.signin-card { align-self: center; padding: clamp(24px, 4vw, 45px); }
.signin-card h2 { margin-bottom: 16px; font-size: 1.75rem; letter-spacing: -.035em; }
.signin-card form > .button { margin-top: 14px; }
.signin-help { color: var(--portal-muted); font-size: .84rem; margin-top: 10px; }
.signin-help a { display: inline-block; color: var(--red-dark); font-weight: 700; }
.signin-demo { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--portal-rule); }
.portal-layout { display: grid; align-items: start; grid-template-columns: minmax(181px, 222px) minmax(0, 1fr); gap: clamp(16px, 3vw, 35px); }
.portal-sidebar, .portal-card, .portal-metric { border: 1px solid var(--portal-rule); background: var(--portal-panel); border-radius: var(--portal-radius); }
.portal-sidebar { overflow: hidden; }
.company-mark { display: flex; align-items: center; gap: 10px; padding: 15px 13px; border-bottom: 1px solid var(--portal-rule); }
.company-monogram { display: grid; place-items: center; flex: 0 0 35px; height: 35px; background: var(--portal-navy); color: #fff; font-weight: 700; border-radius: 7px; }
.company-mark strong { font-size: .87rem; display: block; line-height: 1.25; overflow-wrap: anywhere; }
.company-mark small { font-size: .74rem; color: var(--portal-muted); display: block; }
.portal-nav { display: grid; gap: 3px; padding: 10px 8px; }
.portal-nav a, .portal-logout { padding: 9px 10px; font-size: .88rem; font-weight: 700; border-radius: 6px; }
.portal-nav a:hover { background: var(--portal-soft); }
.portal-nav a[aria-current="page"] { background: var(--portal-red-soft); color: var(--red-dark); }
.portal-logout { width: calc(100% - 16px); margin: 0 8px 8px; border: 0; background: transparent; text-align: left; color: var(--portal-muted); }
.portal-logout:hover { background: var(--portal-soft); color: var(--ink); }
.portal-logout span { margin-left: 3px; }
.portal-pane { min-width: 0; display: grid; gap: 19px; }
.portal-pane h1 { font-size: clamp(2rem, 4.7vw, 3.6rem); letter-spacing: -.052em; line-height: 1.04; overflow-wrap: anywhere; }
.portal-pane h1:focus { outline: none; }
.portal-pane h2, .portal-dialog h2 { font-size: clamp(1.25rem, 2.8vw, 1.7rem); letter-spacing: -.03em; line-height: 1.2; }
.portal-pane h3 { font-size: 1.05rem; overflow-wrap: anywhere; line-height: 1.25; }
.portal-pane > .portal-error { margin: 0; }
.portal-heading, .card-heading, .portal-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.portal-heading { padding: 7px 0 2px; }
.portal-heading p, .portal-empty p, .portal-card > p { color: var(--portal-muted); margin-top: 4px; }
.portal-banner { min-height: 205px; padding: clamp(23px, 4vw, 39px); border-radius: var(--portal-radius); color: #fff; background: var(--portal-navy) radial-gradient(ellipse at 90% 0%, #2d3c50 0%, transparent 62%); }
.portal-banner p { color: #e0e7f1; margin-block: 10px 19px; }
.portal-banner .portal-discount { width: fit-content; color: #fff; border: 1px solid #75859a; border-radius: 6px; padding: 5px 10px; font-size: .88rem; }
.portal-discount strong { margin-inline-start: 4px; }
.portal-banner .button.secondary { border-color: #75859a; color: #fff; }
.portal-banner .button.secondary:hover { background: #ffffff1c; border-color: #fffc; }
.portal-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.portal-metric { padding: clamp(13px, 2vw, 20px); display: grid; gap: 5px; align-content: start; }
.portal-metric:hover { border-color: #ae7c74; }
.portal-metric strong { font: 700 clamp(1.7rem, 3vw, 2.35rem)/1 var(--display); }
.portal-metric span { color: var(--portal-muted); font-size: .84rem; font-weight: 700; }
.portal-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.portal-card { padding: clamp(14px, 2.4vw, 22px); min-width: 0; }
.card-heading { margin-bottom: 10px; }
.portal-list { display: grid; gap: 10px; }
.portal-row { border-top: 1px solid var(--portal-rule); padding-block: 11px; min-width: 0; justify-content: space-between; }
.portal-row:last-child { padding-bottom: 0; }
.portal-row-copy { flex: 1 1 166px; min-width: 0; overflow-wrap: anywhere; }
.portal-row-copy p, .portal-meta { color: var(--portal-muted); font-size: .84rem; margin-top: 3px; overflow-wrap: anywhere; }
.portal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.portal .portal-pane .button, .portal .portal-dialog .button, .portal .portal-signin .button { border-radius: 6px; gap: 8px; }
.portal .portal-pane .button.secondary, .portal .portal-dialog .button.secondary, .portal .portal-signin .button.secondary { border-color: #c8d2dd; }
.portal-pane .portal-banner .button.secondary { border-color: #75859a; }
.portal-pane .portal-banner .button.secondary:hover { border-color: #fff; }
.portal .button.secondary:hover { background: var(--portal-soft); border-color: #a9bacd; }
.portal .portal-banner .button.secondary:hover { background: #ffffff1c; }
.portal-text-action { color: var(--red-dark); font-size: .84rem; font-weight: 700; border: 0; background: transparent; padding: 0; }
.portal-text-action:hover { text-decoration: underline; }
.portal-chip { display: inline-flex; align-items: center; max-width: 100%; min-height: 25px; padding: 2px 8px; border-radius: 5px; color: var(--portal-muted); background: var(--portal-soft); font-size: .74rem; font-weight: 700; overflow-wrap: anywhere; }
.portal-chip[data-tone="success"] { background: #e5f2e9; color: #22583d; }
.portal-chip[data-tone="warning"] { background: #fbecd5; color: #71480c; }
.portal-chip[data-tone="alert"] { background: var(--portal-red-soft); color: var(--red-dark); }
.portal-empty { display: grid; justify-items: start; gap: 8px; }
.portal-empty strong { color: var(--ink); }
.portal-card .portal-empty { border: 0; background: var(--portal-soft); padding: 15px; }
.portal-filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.portal-filterbar .portal-field { flex: 1 1 135px; margin: 0; }
.portal-field { display: grid; gap: 5px; margin-block: 10px; color: var(--ink); font-size: .88rem; font-weight: 700; min-width: 0; }
.portal-field :is(input, select, textarea) { width: 100%; border: 1px solid #bfcad7; border-radius: 6px; background: #fbfcfe; color: var(--ink); font: 500 .93rem/1.5 var(--text); min-height: 43px; padding: 8px 10px; min-width: 0; }
.portal-field textarea { min-height: 85px; resize: vertical; }
.portal-field textarea:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.portal-field input[type="file"] { padding: 5px; }
.portal-field input::file-selector-button { margin-right: 8px; border: 1px solid #bfcad7; border-radius: 4px; padding: 5px 9px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.portal-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 14px; }
.portal-form-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; padding-top: 12px; margin-top: 10px; border-top: 1px solid var(--portal-rule); }
.portal-error { color: #8d241e; background: #fbebe7; border: 1px solid #eec4bb; border-radius: 6px; padding: 7px 10px; font-size: .87rem; margin-block: 8px; }
.portal-selection { display: grid; gap: 7px; margin-block: 10px; }
.portal-selection .portal-row { display: grid; grid-template-columns: minmax(0, 1fr) 78px minmax(31px, auto); }
.portal-selection .portal-field { margin: 0; }
.portal-selection .portal-field input { padding-inline: 7px; }
.portal-product-search { min-width: 0; padding: 12px; background: var(--portal-soft); border: 1px solid var(--portal-rule); border-radius: 7px; margin-block: 13px; }
.portal-product-search .portal-field { margin-top: 0; }
.portal-search-results:empty { display: none; }
.portal-search-results .portal-row:first-child { border: 0; }
.portal-dialog { border: 1px solid var(--portal-rule); border-radius: 11px; width: min(610px, calc(100% - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 0; color: var(--ink); }
.portal-dialog::backdrop { background: #111b2da0; }
.portal-dialog-inner { position: relative; padding: clamp(17px, 4.2vw, 28px); }
.portal-dialog h2 { margin: 0 35px 12px 0; }
.portal-dialog-close { position: absolute; top: 11px; right: 11px; }
.portal-dialog-close button, .portal-icon-button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 1px solid var(--portal-rule); border-radius: 6px; background: var(--portal-soft); font-size: 1.2rem; line-height: 1; }
.portal-dialog-close button:hover, .portal-icon-button:hover { border-color: #9aabba; }
.portal-details { border-top: 1px solid var(--portal-rule); padding-top: 9px; margin-top: 12px; }
.portal-details > summary { cursor: pointer; color: var(--ink); font-weight: 700; }
.portal-details > summary:hover { color: var(--red-dark); }
.portal-line { display: grid; gap: 4px; padding-block: 10px; border-bottom: 1px solid var(--portal-rule); }
.portal-line:last-child { border: 0; }
.portal-line p { color: var(--portal-muted); font-size: .84rem; overflow-wrap: anywhere; }
.portal-line progress { appearance: none; width: 100%; max-width: 320px; height: 6px; overflow: hidden; border-radius: 10px; border: 0; color: #317753; background: #e0e9f2; }
.portal-line progress::-webkit-progress-bar { background: #e0e9f2; }
.portal-line progress::-webkit-progress-value { background: #317753; }
.portal-line progress::-moz-progress-bar { background: #317753; }
.portal-toast { position: fixed; z-index: 10; inset: auto 16px 16px auto; width: fit-content; max-width: min(390px, calc(100% - 32px)); background: var(--portal-deep); color: #fff; border: 1px solid #617088; border-radius: 7px; padding: 12px 16px; font-size: .89rem; box-shadow: 0 8px 15px #111b2d33; }
.portal-footer { background: var(--portal-deep); border-color: var(--portal-deep); color: #d6e0ed; }
@media (max-width: 790px) {
  .portal-layout { grid-template-columns: 1fr; gap: 16px; }
  .portal-sidebar { display: grid; grid-template-columns: minmax(0,1fr) auto; }
  .company-mark { border-bottom: 0; order: 0; }
  .portal-logout { margin: 0 10px 0 0; width: auto; align-self: center; }
  .portal-nav { display: flex; overflow-x: auto; grid-column: 1 / -1; order: 3; padding-block: 5px 7px; border-top: 1px solid var(--portal-rule); scrollbar-width: thin; }
  .portal-nav a { white-space: nowrap; padding: 8px 10px; }
  .portal-nav a:focus-visible { outline-offset: -2px; }
}
@media (max-width: 620px) {
  .portal-signin { grid-template-columns: 1fr; }
  .signin-photo { min-height: 225px; }
  .portal-columns, .portal-form-grid { grid-template-columns: 1fr; }
  .portal-metrics { gap: 6px; }
  .portal-metric { padding: 11px 8px; }
  .portal-metric span { font-size: .74rem; }
  .portal .portal-pane .button.compact, .portal .portal-dialog .button.compact { padding-inline: 10px; }
}
.portal-list-footer { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 12px; }
.portal-properties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; margin: 0; }
.portal-properties > div { border-top: 1px solid var(--portal-rule); padding-top: 9px; min-width: 0; }
.portal-properties dt { font-weight: 700; }
.portal-properties dd { color: var(--portal-muted); margin: 2px 0 0; overflow-wrap: anywhere; white-space: pre-line; }
@media (max-width: 440px) { .portal-properties { grid-template-columns: 1fr; } }

.cashback-balance { display: block; font: 700 clamp(2rem, 5vw, 3.1rem)/1.15 var(--display); color: var(--portal-navy); }
.cashback-amount { white-space: nowrap; }
.cashback-amount[data-credit] { color: #22583d; }
