@font-face {
    font-family: "Portal NRT";
    src: url("../../fonts/nrt.woff2") format("woff2"), url("../../fonts/nrt.woff") format("woff");
    font-display: swap;
}

:root {
    color-scheme: light;
    --portal-bg: #f3f5f9;
    --portal-surface: #ffffff;
    --portal-surface-soft: #f8fafc;
    --portal-surface-raised: #ffffff;
    --portal-ink: #121a2b;
    --portal-muted: #6d788d;
    --portal-faint: #98a1b1;
    --portal-border: #e2e7ef;
    --portal-border-strong: #d5dce7;
    --portal-primary: #c5242d;
    --portal-primary-dark: #9f1821;
    --portal-primary-soft: #fff0f1;
    --portal-blue: #3165d4;
    --portal-blue-soft: #edf3ff;
    --portal-green: #118557;
    --portal-green-soft: #e9f8f1;
    --portal-amber: #c8760a;
    --portal-amber-soft: #fff6e7;
    --portal-danger: #bd1e2d;
    --portal-danger-soft: #fff0f2;
    --portal-header: rgba(255, 255, 255, .84);
    --portal-shadow-sm: 0 8px 24px rgba(18, 26, 43, .06);
    --portal-shadow: 0 22px 60px rgba(18, 26, 43, .09);
    --portal-shadow-lg: 0 32px 90px rgba(18, 26, 43, .15);
    --portal-radius-sm: 12px;
    --portal-radius: 18px;
    --portal-radius-lg: 26px;
    --portal-mobile-nav-item-height: 52px;
    --portal-mobile-nav-shell-height: 68px;
    --portal-mobile-nav-offset: 10px;
    --portal-mobile-nav-clearance: calc(var(--portal-mobile-nav-shell-height) + var(--portal-mobile-nav-offset) + 18px);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --portal-bg: #090e18;
    --portal-surface: #111827;
    --portal-surface-soft: #161f30;
    --portal-surface-raised: #182235;
    --portal-ink: #edf2f8;
    --portal-muted: #a0acc0;
    --portal-faint: #738096;
    --portal-border: #273247;
    --portal-border-strong: #354159;
    --portal-primary: #f0525b;
    --portal-primary-dark: #d43b45;
    --portal-primary-soft: rgba(240, 82, 91, .13);
    --portal-blue: #73a0ff;
    --portal-blue-soft: rgba(76, 126, 236, .14);
    --portal-green: #48c894;
    --portal-green-soft: rgba(30, 177, 118, .13);
    --portal-amber: #f2ad4d;
    --portal-amber-soft: rgba(230, 155, 50, .14);
    --portal-danger: #ff7782;
    --portal-danger-soft: rgba(240, 82, 91, .13);
    --portal-header: rgba(9, 14, 24, .84);
    --portal-shadow-sm: 0 8px 24px rgba(0, 0, 0, .18);
    --portal-shadow: 0 22px 60px rgba(0, 0, 0, .24);
    --portal-shadow-lg: 0 32px 90px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--portal-bg); }

body.customer-portal-body {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow-x: hidden;
    color: var(--portal-ink);
    background: var(--portal-bg);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
    transition: color .22s ease, background-color .22s ease;
}

html[dir="rtl"] body.customer-portal-body {
    font-family: "Portal NRT", "Noto Sans Arabic", Tahoma, sans-serif;
}

a, button, input, select { -webkit-tap-highlight-color: transparent; }
a, button { touch-action: manipulation; }
button, input, select { font: inherit; }

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--portal-blue) 45%, transparent);
    outline-offset: 2px;
}

.portal-icon {
    display: inline-block;
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    vertical-align: -.2em;
}

.portal-ambient {
    position: fixed;
    z-index: -1;
    width: 34rem;
    height: 34rem;
    border-radius: 50%;
    filter: blur(3px);
    pointer-events: none;
    opacity: .75;
}
.portal-ambient-one { top: -22rem; inset-inline-end: -12rem; background: radial-gradient(circle, rgba(197, 36, 45, .17), transparent 67%); }
.portal-ambient-two { bottom: -23rem; inset-inline-start: -13rem; background: radial-gradient(circle, rgba(49, 101, 212, .13), transparent 67%); }
html[data-theme="dark"] .portal-ambient { opacity: .48; }

.portal-container { width: min(1220px, calc(100% - 32px)); margin-inline: auto; }
.portal-main { position: relative; flex: 1 0 auto; padding: 34px 0 104px; }
.portal-main.portal-auth-main { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 88px 20px 40px; }

.portal-header {
    position: sticky;
    z-index: 1020;
    top: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--portal-border) 82%, transparent);
    background: var(--portal-header);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .3);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.portal-header-inner { min-height: 78px; display: flex; align-items: center; gap: 18px; }
.portal-brand { min-width: 190px; display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.portal-brand:hover { color: inherit; }
.portal-brand-logo-wrap { width: 46px; height: 46px; display: grid; place-items: center; overflow: hidden; padding: 4px; border: 1px solid var(--portal-border); border-radius: 15px; background: #fff; box-shadow: var(--portal-shadow-sm); }
.portal-brand-logo { width: 100%; height: 100%; object-fit: contain; }
.portal-brand-copy { min-width: 0; }
.portal-brand-name { display: block; max-width: 190px; overflow: hidden; color: var(--portal-ink); font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.portal-brand-caption { display: block; margin-top: -1px; color: var(--portal-muted); font-size: .7rem; font-weight: 650; }

.portal-desktop-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; padding: 5px; border: 1px solid var(--portal-border); border-radius: 16px; background: color-mix(in srgb, var(--portal-surface) 80%, transparent); }
.portal-nav-link { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 12px; color: var(--portal-muted); border-radius: 11px; text-decoration: none; font-size: .84rem; font-weight: 800; transition: .18s ease; }
.portal-nav-link:hover { color: var(--portal-ink); background: var(--portal-surface-soft); }
.portal-nav-link.active { color: var(--portal-primary); background: var(--portal-primary-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--portal-primary) 13%, transparent); }

.portal-header-actions { display: flex; align-items: center; gap: 8px; }
.portal-language-form { position: relative; height: 42px; display: inline-flex; align-items: center; color: var(--portal-muted); border: 1px solid var(--portal-border); border-radius: 13px; background: var(--portal-surface); }
.portal-control-icon { position: absolute; inset-inline-start: 11px; z-index: 1; display: grid; place-items: center; pointer-events: none; }
.portal-control-icon .portal-icon { width: 1rem; height: 1rem; }
.portal-language-select { height: 100%; min-width: 102px; padding: 0 31px 0 34px; color: var(--portal-ink); border: 0; outline: 0; border-radius: inherit; background: transparent; cursor: pointer; font-size: .78rem; font-weight: 800; }
html[dir="rtl"] .portal-language-select { padding: 0 34px 0 31px; }
.portal-language-select option { color: var(--portal-ink); background: var(--portal-surface); }

.portal-icon-button { width: 42px; height: 42px; display: grid; place-items: center; padding: 0; color: var(--portal-muted); border: 1px solid var(--portal-border); border-radius: 13px; background: var(--portal-surface); cursor: pointer; transition: .18s ease; }
.portal-icon-button:hover { color: var(--portal-primary); border-color: color-mix(in srgb, var(--portal-primary) 30%, var(--portal-border)); transform: translateY(-1px); }
.portal-theme-toggle .portal-theme-light, .portal-theme-toggle .portal-theme-dark { display: grid; place-items: center; }
html[data-theme="light"] .portal-theme-dark, html[data-theme="dark"] .portal-theme-light { display: none; }

.portal-account-menu { position: relative; }
.portal-account-button { width: 43px; height: 43px; display: grid; place-items: center; padding: 0; color: #fff; border: 0; border-radius: 14px; background: linear-gradient(145deg, #df3943, #a91821); box-shadow: 0 9px 24px rgba(185, 28, 28, .22); font-weight: 900; cursor: pointer; }
.portal-account-dropdown { min-width: 238px; padding: 10px; color: var(--portal-ink); border: 1px solid var(--portal-border); border-radius: 16px; background: var(--portal-surface-raised); box-shadow: var(--portal-shadow); }
.portal-account-summary { display: grid; gap: 2px; margin-bottom: 7px; padding: 9px 10px 12px; border-bottom: 1px solid var(--portal-border); }
.portal-account-summary small { color: var(--portal-muted); }
.portal-account-language { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 7px; padding: 7px 9px 10px; border-bottom: 1px solid var(--portal-border); }
.portal-account-language-label { display: inline-flex; align-items: center; gap: 6px; color: var(--portal-muted); font-size: .72rem; font-weight: 800; }
.portal-account-language-label .portal-icon { width: .94rem; height: .94rem; }
.portal-language-options { display: inline-flex; gap: 3px; }
.portal-language-options button { min-width: 31px; min-height: 29px; padding: 3px 6px; color: var(--portal-muted); border: 1px solid var(--portal-border); border-radius: 8px; background: var(--portal-surface-soft); font-size: .65rem; font-weight: 900; cursor: pointer; }
.portal-language-options button.active { color: var(--portal-primary); border-color: color-mix(in srgb, var(--portal-primary) 24%, var(--portal-border)); background: var(--portal-primary-soft); }
.portal-account-dropdown .dropdown-item { display: flex; align-items: center; gap: 9px; padding: 10px 11px; color: var(--portal-ink); border: 0; border-radius: 10px; background: transparent; font-size: .84rem; font-weight: 700; }
.portal-account-dropdown .dropdown-item:hover { background: var(--portal-surface-soft); }
.portal-account-dropdown .dropdown-item.text-danger { color: var(--portal-danger) !important; }

.portal-mobile-nav {
    display: none;
    position: fixed;
    z-index: 1030;
    inset-inline: var(--portal-mobile-nav-offset);
    bottom: var(--portal-mobile-nav-offset);
    inset-inline-start: max(var(--portal-mobile-nav-offset), env(safe-area-inset-left, 0px));
    inset-inline-end: max(var(--portal-mobile-nav-offset), env(safe-area-inset-right, 0px));
    bottom: max(var(--portal-mobile-nav-offset), env(safe-area-inset-bottom, 0px));
    min-height: var(--portal-mobile-nav-shell-height);
    padding: 7px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--portal-border);
    border-radius: 20px;
    background: color-mix(in srgb, var(--portal-surface) 94%, transparent);
    box-shadow: var(--portal-shadow-lg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    isolation: isolate;
}
.portal-mobile-nav a { min-height: var(--portal-mobile-nav-item-height); display: grid; place-items: center; align-content: center; gap: 3px; padding: 5px 2px; color: var(--portal-muted); border-radius: 13px; text-decoration: none; font-size: .67rem; font-weight: 800; }
.portal-mobile-nav a .portal-icon { width: 1.18rem; height: 1.18rem; }
.portal-mobile-nav a.active { color: var(--portal-primary); background: var(--portal-primary-soft); }

.portal-page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.portal-page-title { margin: 0; color: var(--portal-ink); font-size: clamp(1.45rem, 3vw, 2.12rem); font-weight: 950; letter-spacing: -.035em; }
html[dir="rtl"] .portal-page-title { letter-spacing: 0; }
.portal-page-subtitle { max-width: 680px; margin: 7px 0 0; color: var(--portal-muted); font-size: .9rem; }
.portal-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.portal-back-link { min-height: auto; justify-content: flex-start; }
html[dir="rtl"] .portal-back-link .portal-icon { transform: rotate(180deg); }

.portal-card { color: var(--portal-ink); border: 1px solid var(--portal-border); border-radius: var(--portal-radius); background: var(--portal-surface); box-shadow: var(--portal-shadow-sm); }
.portal-card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 21px 22px 0; }
.portal-card-body { padding: 22px; }
.portal-card-title { margin: 0; color: var(--portal-ink); font-size: 1.04rem; font-weight: 900; }

.portal-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.portal-stat { position: relative; min-height: 148px; padding: 20px; overflow: hidden; isolation: isolate; }
.portal-stat::before { content: ""; position: absolute; z-index: -1; width: 120px; height: 120px; inset-inline-end: -52px; top: -54px; border-radius: 50%; background: currentColor; opacity: .07; }
.portal-stat::after { content: ""; position: absolute; z-index: -1; inset-inline: 0; bottom: 0; height: 3px; background: currentColor; opacity: .75; }
.portal-stat-icon { width: 43px; height: 43px; display: grid; place-items: center; margin-bottom: 18px; color: currentColor; border: 1px solid color-mix(in srgb, currentColor 15%, transparent); border-radius: 13px; background: color-mix(in srgb, currentColor 9%, var(--portal-surface)); }
.portal-stat-icon .portal-icon { width: 1.25rem; height: 1.25rem; }
.portal-stat-label { display: block; color: var(--portal-muted); font-size: .78rem; font-weight: 750; }
.portal-stat-value { display: block; margin-top: 4px; color: var(--portal-ink); font-size: clamp(1.15rem, 2.3vw, 1.58rem); font-weight: 950; direction: ltr; unicode-bidi: isolate; text-align: start; }
.portal-stat.debt { color: var(--portal-primary); }
.portal-stat.paid { color: var(--portal-green); }
.portal-stat.invoices { color: var(--portal-blue); }
.portal-stat.credit { color: var(--portal-amber); }

.portal-grid-2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .82fr); gap: 18px; }
.portal-list { display: grid; gap: 10px; }
.portal-list-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 14px 15px; color: inherit; border: 1px solid var(--portal-border); border-radius: 14px; background: var(--portal-surface-soft); text-decoration: none; transition: .18s ease; }
.portal-list-item:hover { color: inherit; border-color: color-mix(in srgb, var(--portal-primary) 27%, var(--portal-border)); background: var(--portal-surface); box-shadow: var(--portal-shadow-sm); transform: translateY(-1px); }
.portal-list-title { color: var(--portal-ink); font-weight: 850; }
.portal-list-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; margin-top: 3px; color: var(--portal-muted); font-size: .77rem; }
.portal-list-meta .portal-icon { width: .95rem; height: .95rem; }
.portal-amount { direction: ltr; unicode-bidi: isolate; white-space: nowrap; font-weight: 900; }

.portal-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border: 1px solid transparent; border-radius: 999px; font-size: .7rem; font-weight: 850; }
.portal-badge .portal-icon { width: .88rem; height: .88rem; }
.portal-badge.paid { color: var(--portal-green); border-color: color-mix(in srgb, var(--portal-green) 16%, transparent); background: var(--portal-green-soft); }
.portal-badge.due { color: var(--portal-danger); border-color: color-mix(in srgb, var(--portal-danger) 16%, transparent); background: var(--portal-danger-soft); }
.portal-badge.neutral { color: var(--portal-muted); border-color: var(--portal-border); background: var(--portal-surface-soft); }

.portal-filter { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr) auto; gap: 10px; padding: 15px; margin-bottom: 18px; }
.portal-page-eyebrow { display: inline-flex; margin-bottom: 6px; color: var(--portal-primary); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
html[dir="rtl"] .portal-page-eyebrow { letter-spacing: 0; }
.portal-invoice-page-heading { margin-bottom: 18px; }
.portal-invoice-filter-card { margin-bottom: 18px; overflow: hidden; }
.portal-invoice-filter-heading { display: flex; align-items: center; gap: 13px; padding: 18px 20px; border-bottom: 1px solid var(--portal-border); background: linear-gradient(135deg, color-mix(in srgb, var(--portal-blue-soft) 62%, var(--portal-surface)), var(--portal-surface)); }
.portal-invoice-filter-heading > div { min-width: 0; }
.portal-invoice-filter-heading h2 { margin: 0; color: var(--portal-ink); font-size: 1rem; font-weight: 900; }
.portal-invoice-filter-heading p { margin: 3px 0 0; color: var(--portal-muted); font-size: .76rem; }
.portal-invoice-filter-icon { width: 42px; height: 42px; display: grid; flex: 0 0 auto; place-items: center; color: var(--portal-blue); border: 1px solid color-mix(in srgb, var(--portal-blue) 17%, transparent); border-radius: 13px; background: var(--portal-blue-soft); }
.portal-invoice-filter-icon .portal-icon { width: 1.2rem; height: 1.2rem; }
.portal-filter-clear-link { margin-inline-start: auto; padding: 7px 1px; color: var(--portal-primary); font-size: .75rem; font-weight: 850; text-decoration: none; white-space: nowrap; }
.portal-filter-clear-link:hover { color: var(--portal-primary-dark); text-decoration: underline; }
.portal-invoice-filter { padding: 18px 20px 20px; }
.portal-period-fieldset { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; }
.portal-period-fieldset legend { margin-bottom: 9px; color: var(--portal-ink); font-size: .77rem; font-weight: 900; }
.portal-period-options { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 7px; padding: 5px; border: 1px solid var(--portal-border); border-radius: 14px; background: var(--portal-surface-soft); }
.portal-period-option { position: relative; min-width: 0; margin: 0; cursor: pointer; }
.portal-period-option input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.portal-period-option span { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 8px; overflow: hidden; color: var(--portal-muted); border: 1px solid transparent; border-radius: 10px; font-size: .72rem; font-weight: 850; text-align: center; text-overflow: ellipsis; white-space: nowrap; transition: color .17s ease, border-color .17s ease, background-color .17s ease, box-shadow .17s ease; }
.portal-period-option span .portal-icon { width: .9rem; height: .9rem; }
.portal-period-option:hover span { color: var(--portal-ink); background: var(--portal-surface); }
.portal-period-option input:checked + span { color: #fff; border-color: var(--portal-primary); background: linear-gradient(135deg, #df3943, #ab1923); box-shadow: 0 7px 18px rgba(185, 28, 28, .18); }
.portal-period-option input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--portal-blue) 45%, transparent); outline-offset: 2px; }
.portal-invoice-filter-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; align-items: start; }
.portal-filter-control { min-width: 0; }
.portal-filter-control > label { display: block; margin-bottom: 7px; color: var(--portal-ink); font-size: .75rem; font-weight: 850; }
.portal-filter-control > small { display: block; margin-top: 5px; color: var(--portal-muted); font-size: .65rem; }
.portal-filter-control-product { grid-column: span 5; }
.portal-filter-control-invoice { grid-column: span 4; }
.portal-filter-control-status { grid-column: span 3; }
.portal-filter-control .portal-form-control { min-height: 46px; }
.portal-filter-control select.portal-form-control { cursor: pointer; }
.portal-custom-dates { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; padding: 14px; border: 1px solid color-mix(in srgb, var(--portal-blue) 17%, var(--portal-border)); border-radius: 14px; background: var(--portal-blue-soft); }
.portal-custom-dates[hidden] { display: none !important; }
.portal-custom-date-note { grid-column: 1 / -1; margin: -4px 0 0; color: var(--portal-muted); font-size: .68rem; }
.portal-filter-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; padding-top: 2px; }
.portal-filter-actions .portal-btn-primary { min-width: 148px; }
.portal-filter-errors { display: flex; align-items: flex-start; gap: 9px; margin-top: 15px; padding: 12px 14px; color: var(--portal-danger); border: 1px solid color-mix(in srgb, var(--portal-danger) 18%, transparent); border-radius: 12px; background: var(--portal-danger-soft); font-size: .75rem; }
.portal-filter-errors > .portal-icon { margin-top: 2px; }
.portal-filter-errors ul { margin: 4px 0 0; padding-inline-start: 18px; }
.portal-active-filters { display: flex; align-items: center; gap: 11px; padding: 12px 20px; border-top: 1px solid var(--portal-border); background: color-mix(in srgb, var(--portal-surface-soft) 78%, var(--portal-surface)); }
.portal-active-filters > strong { flex: 0 0 auto; color: var(--portal-muted); font-size: .69rem; font-weight: 900; }
.portal-active-filter-list { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.portal-active-filter-chip { min-width: 0; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; color: var(--portal-blue); border: 1px solid color-mix(in srgb, var(--portal-blue) 15%, transparent); border-radius: 999px; background: var(--portal-blue-soft); font-size: .68rem; font-weight: 800; overflow-wrap: anywhere; }
.portal-active-filter-chip .portal-icon { width: .8rem; height: .8rem; }
.portal-active-filter-chip bdi { font-weight: 900; }
.portal-invoice-results-card { overflow: hidden; }
.portal-invoice-results-header { padding: 17px 20px; border-bottom: 1px solid var(--portal-border); }
.portal-invoice-results-header p { margin: 3px 0 0; color: var(--portal-muted); font-size: .72rem; }
.portal-results-count { min-width: 34px; height: 34px; display: inline-grid; place-items: center; padding: 0 9px; color: var(--portal-blue); border: 1px solid color-mix(in srgb, var(--portal-blue) 16%, transparent); border-radius: 11px; background: var(--portal-blue-soft); font-size: .76rem; font-weight: 900; }
.portal-invoice-table-wrap { width: 100%; }
.portal-invoice-table { min-width: 720px; }
.portal-invoice-number-cell strong { color: var(--portal-ink); font-size: .84rem; }
.portal-invoice-date-cell time { color: var(--portal-muted); font-size: .79rem; font-weight: 750; white-space: nowrap; }
.portal-invoice-action-cell { width: 1%; white-space: nowrap; }
.portal-invoice-action-cell .portal-btn { min-height: 38px; padding: 7px 11px; }
.portal-empty-reset { margin-top: 16px; }
.portal-pagination-wrap { max-width: 100%; margin-top: 18px; overflow: hidden; }
.portal-pagination-wrap .pagination { flex-wrap: wrap; gap: 4px; }
.portal-pagination-wrap .page-link { border-radius: 9px !important; }
.portal-field { margin-bottom: 17px; }
.portal-field label { display: block; margin-bottom: 7px; color: var(--portal-ink); font-size: .82rem; font-weight: 850; }
.portal-input-wrap { position: relative; }
.portal-input-icon { position: absolute; top: 50%; inset-inline-start: 13px; display: grid; place-items: center; color: var(--portal-muted); transform: translateY(-50%); pointer-events: none; }
.portal-input-wrap .portal-form-control { padding-inline-start: 43px; }
.portal-form-control { width: 100%; min-height: 47px; padding: 10px 13px; color: var(--portal-ink); border: 1px solid var(--portal-border-strong); border-radius: 12px; outline: none; background: var(--portal-surface-soft); transition: .17s ease; }
.portal-form-control::placeholder { color: var(--portal-faint); }
.portal-form-control:focus { border-color: color-mix(in srgb, var(--portal-primary) 58%, var(--portal-border)); background: var(--portal-surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--portal-primary) 10%, transparent); }
.portal-field-hint { margin-top: 6px; color: var(--portal-muted); font-size: .73rem; }
.portal-invalid { margin-top: 6px; color: var(--portal-danger); font-size: .76rem; }

.portal-btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; color: var(--portal-ink); border: 1px solid transparent; border-radius: 12px; background: transparent; text-decoration: none; font-size: .83rem; font-weight: 850; cursor: pointer; transition: .18s ease; }
.portal-btn:hover { color: inherit; transform: translateY(-1px); }
.portal-btn-lg { min-height: 50px; border-radius: 14px; }
.portal-btn-primary { color: #fff; background: linear-gradient(135deg, #df3943, #ab1923); box-shadow: 0 11px 26px rgba(185, 28, 28, .2); }
.portal-btn-primary:hover { color: #fff; background: linear-gradient(135deg, #cb2b35, #95141d); box-shadow: 0 14px 30px rgba(185, 28, 28, .27); }
.portal-btn-light { color: var(--portal-ink); border-color: var(--portal-border); background: var(--portal-surface-soft); }
.portal-btn-light:hover { color: var(--portal-primary); border-color: color-mix(in srgb, var(--portal-primary) 25%, var(--portal-border)); background: var(--portal-surface); }

.portal-table-wrap { overflow-x: auto; scrollbar-color: var(--portal-border-strong) transparent; }
.portal-table { width: 100%; min-width: 720px; margin: 0; color: var(--portal-ink); border-collapse: separate; border-spacing: 0; }
.portal-table th { padding: 13px 14px; color: var(--portal-muted); border-bottom: 1px solid var(--portal-border); background: var(--portal-surface-soft); font-size: .74rem; font-weight: 850; white-space: nowrap; }
.portal-table td { padding: 14px; color: var(--portal-ink); border-bottom: 1px solid var(--portal-border); vertical-align: middle; }
.portal-table tbody tr { transition: background-color .15s ease; }
.portal-table tbody tr:hover { background: color-mix(in srgb, var(--portal-primary) 2.5%, var(--portal-surface)); }
.portal-table tr:last-child td { border-bottom: 0; }
.portal-product-name { display: block; color: var(--portal-ink); }
.portal-category-chip { display: inline-flex; margin-top: 5px; padding: 3px 8px; color: var(--portal-blue); border-radius: 999px; background: var(--portal-blue-soft); font-size: .68rem; font-weight: 800; }
.portal-quantity { color: var(--portal-ink); font-weight: 900; }

.portal-empty { padding: 50px 20px; color: var(--portal-muted); text-align: center; }
.portal-empty-icon { width: 60px; height: 60px; display: grid; place-items: center; margin: 0 auto 13px; color: var(--portal-primary); border: 1px solid color-mix(in srgb, var(--portal-primary) 13%, transparent); border-radius: 19px; background: var(--portal-primary-soft); }
.portal-empty-icon .portal-icon { width: 1.55rem; height: 1.55rem; }

.portal-alert { display: flex; align-items: flex-start; gap: 9px; padding: 13px 15px; margin-bottom: 18px; border: 1px solid transparent; border-radius: 13px; font-size: .84rem; }
.portal-alert .portal-icon { width: 1.05rem; height: 1.05rem; margin-top: 2px; }
.portal-alert.success { color: var(--portal-green); border-color: color-mix(in srgb, var(--portal-green) 17%, transparent); background: var(--portal-green-soft); }
.portal-alert.warning { color: var(--portal-amber); border-color: color-mix(in srgb, var(--portal-amber) 17%, transparent); background: var(--portal-amber-soft); }
.portal-alert.danger { color: var(--portal-danger); border-color: color-mix(in srgb, var(--portal-danger) 17%, transparent); background: var(--portal-danger-soft); }

.portal-breakdown { display: grid; gap: 12px; }
.portal-breakdown-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 12px; border-bottom: 1px dashed var(--portal-border-strong); }
.portal-breakdown-row:last-child { padding-bottom: 0; border-bottom: 0; }
.portal-breakdown-row.total { font-size: 1.04rem; font-weight: 900; }

.portal-invoice-head { display: flex; justify-content: space-between; gap: 25px; padding-bottom: 22px; border-bottom: 1px solid var(--portal-border); }
.portal-invoice-brand { display: flex; align-items: center; gap: 12px; }
.portal-invoice-brand .portal-brand-logo { width: 48px; height: 48px; padding: 4px; border: 1px solid var(--portal-border); border-radius: 14px; background: #fff; object-fit: contain; }
.portal-invoice-totals { width: min(100%, 410px); display: grid; gap: 10px; margin-inline-start: auto; padding: 17px; border: 1px solid var(--portal-border); border-radius: 15px; background: var(--portal-surface-soft); }
.portal-invoice-total-row { display: flex; justify-content: space-between; gap: 15px; }
.portal-invoice-total-row.grand { margin-inline: -17px; padding: 13px 17px; color: #fff; border: 0; background: linear-gradient(135deg, #c5252f, #9d1520); font-size: 1.08rem; font-weight: 900; }

.portal-timeline { position: relative; display: grid; gap: 13px; }
.portal-payment { position: relative; padding: 17px 18px; border: 1px solid var(--portal-border); border-radius: 16px; background: var(--portal-surface-soft); }
.portal-payment::before { content: ""; position: absolute; inset-block: 15px; inset-inline-start: -1px; width: 3px; border-radius: 3px; background: var(--portal-green); }
.portal-payment-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.portal-payment-allocation { display: inline-flex; align-items: center; gap: 5px; margin: 9px 5px 0 0; padding: 5px 8px; color: var(--portal-muted); border: 1px solid var(--portal-border); border-radius: 8px; background: var(--portal-surface); font-size: .72rem; }
.portal-payment-allocation .portal-icon { width: .9rem; height: .9rem; }

.portal-auth-wrap { width: min(960px, 100%); }
.portal-auth-tools { position: fixed; z-index: 1040; top: 20px; inset-inline-end: 22px; display: flex; align-items: center; gap: 8px; }
.portal-auth-shell { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); overflow: hidden; border: 1px solid var(--portal-border); border-radius: 28px; background: var(--portal-surface); box-shadow: var(--portal-shadow-lg); }
.portal-auth-hero { position: relative; min-height: 570px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: clamp(35px, 6vw, 62px); color: #fff; background: linear-gradient(145deg, #111b30 0%, #1a2741 54%, #8f1721 145%); }
.portal-auth-hero::before { content: ""; position: absolute; width: 280px; height: 280px; top: -130px; inset-inline-end: -100px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 50%; }
.portal-auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 15px; }
.portal-auth-logo { width: 62px; height: 62px; display: grid; place-items: center; padding: 7px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 19px; background: #fff; box-shadow: 0 18px 38px rgba(0, 0, 0, .22); }
.portal-auth-logo img { width: 100%; height: 100%; object-fit: contain; }
.portal-auth-eyebrow { display: block; color: #bac6d8; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.portal-auth-brand h2 { max-width: 360px; margin: 3px 0 0; color: #fff; font-size: clamp(1.45rem, 3vw, 2.1rem); font-weight: 950; line-height: 1.24; }
.portal-auth-hero > p { position: relative; z-index: 1; max-width: 480px; margin: 27px 0; color: #c5cede; }
.portal-auth-features { position: relative; z-index: 1; display: grid; gap: 11px; }
.portal-auth-features > div { display: flex; align-items: center; gap: 10px; color: #eef3fa; font-size: .83rem; font-weight: 700; }
.portal-auth-features .portal-icon { width: 1.15rem; height: 1.15rem; color: #ff8a92; }
.portal-auth-orbit { position: absolute; border: 1px solid rgba(255, 255, 255, .1); border-radius: 50%; }
.portal-auth-orbit-one { width: 320px; height: 320px; inset-inline-start: -190px; bottom: -150px; }
.portal-auth-orbit-two { width: 180px; height: 180px; inset-inline-start: -80px; bottom: -75px; }
.portal-auth-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 5vw, 56px); background: var(--portal-surface); }
.portal-auth-panel-head { margin-bottom: 24px; text-align: center; }
.portal-auth-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: 0 auto 13px; color: var(--portal-primary); border: 1px solid color-mix(in srgb, var(--portal-primary) 14%, transparent); border-radius: 16px; background: var(--portal-primary-soft); }
.portal-auth-icon .portal-icon { width: 1.35rem; height: 1.35rem; }
.portal-kicker { display: block; margin-bottom: 4px; color: var(--portal-primary); font-size: .69rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.portal-auth-title { margin: 0; color: var(--portal-ink); font-size: 1.72rem; font-weight: 950; }
.portal-auth-subtitle { margin: 7px auto 0; color: var(--portal-muted); font-size: .84rem; }
.portal-security-note { display: flex; align-items: flex-start; justify-content: center; gap: 7px; margin: 18px 0 0; color: var(--portal-muted); font-size: .71rem; text-align: center; }
.portal-security-note .portal-icon { width: .94rem; height: .94rem; margin-top: 2px; color: var(--portal-green); }

/* Portal 2026 dashboard and sign-in experience */
body.customer-portal-body { width: 100%; max-width: 100%; }
.portal-container, .portal-header-inner, .portal-dashboard-hero, .portal-dashboard-content { min-width: 0; }
.portal-header-inner { justify-content: space-between; }
.portal-brand { min-width: 0; flex: 0 1 auto; }
.portal-desktop-nav { margin-inline: auto; }
.portal-header-actions { flex: 0 0 auto; }

.portal-dashboard-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 370px);
    gap: clamp(25px, 5vw, 72px);
    margin-bottom: 16px;
    padding: clamp(28px, 4.8vw, 54px);
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 28px;
    background:
        radial-gradient(circle at 92% 5%, rgba(224, 54, 65, .3), transparent 31%),
        linear-gradient(135deg, #101a2d 0%, #17243b 58%, #111b2f 100%);
    box-shadow: 0 28px 70px rgba(16, 26, 45, .18);
    isolation: isolate;
}
.portal-dashboard-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 340px;
    height: 340px;
    inset-inline-start: -190px;
    bottom: -260px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 48px rgba(255, 255, 255, .025), 0 0 0 96px rgba(255, 255, 255, .018);
}
.portal-dashboard-intro { align-self: center; min-width: 0; }
.portal-dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 18px;
    padding: 6px 10px;
    color: #d8e1ef;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    font-size: .7rem;
    font-weight: 800;
}
.portal-dashboard-eyebrow .portal-icon { width: .92rem; height: .92rem; color: #ff7f88; }
.portal-dashboard-intro h1 {
    max-width: 680px;
    margin: 0;
    color: #fff;
    font-size: clamp(1.75rem, 4vw, 2.8rem);
    font-weight: 950;
    line-height: 1.22;
    letter-spacing: -.035em;
}
html[dir="rtl"] .portal-dashboard-intro h1 { letter-spacing: 0; }
.portal-dashboard-intro > p { max-width: 620px; margin: 12px 0 0; color: #b7c3d5; font-size: .92rem; }
.portal-dashboard-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 27px; }
.portal-hero-button {
    min-height: 47px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    color: #f4f7fb;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 13px;
    background: rgba(255, 255, 255, .07);
    text-decoration: none;
    font-size: .8rem;
    font-weight: 850;
    backdrop-filter: blur(8px);
    transition: transform .18s ease, background-color .18s ease, border-color .18s ease;
}
.portal-hero-button:hover { color: #fff; border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .12); transform: translateY(-1px); }
.portal-hero-button.primary { color: #fff; border-color: transparent; background: linear-gradient(135deg, #e23843, #b51c27); box-shadow: 0 12px 28px rgba(182, 28, 39, .28); }
.portal-hero-button .portal-icon { width: 1rem; height: 1rem; }
.portal-hero-button .portal-button-arrow { margin-inline-start: 4px; }

.portal-balance-panel {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 23px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 22px;
    background: rgba(255, 255, 255, .075);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
    backdrop-filter: blur(16px);
}
.portal-balance-heading { display: flex; align-items: center; gap: 9px; color: #c3cede; font-size: .75rem; font-weight: 800; }
.portal-balance-icon { width: 36px; height: 36px; display: grid; place-items: center; color: #ff8e96; border-radius: 11px; background: rgba(236, 67, 78, .13); }
.portal-balance-icon .portal-icon { width: 1.05rem; height: 1.05rem; }
.portal-balance-value { display: block; margin: 17px 0 23px; overflow-wrap: anywhere; color: #fff; font-size: clamp(1.65rem, 3.8vw, 2.4rem); font-weight: 950; direction: ltr; unicode-bidi: isolate; text-align: start; }
.portal-balance-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 17px; border-top: 1px solid rgba(255, 255, 255, .11); }
.portal-balance-footer > div { min-width: 0; }
.portal-balance-footer > div span { display: block; color: #9facc0; font-size: .68rem; font-weight: 700; }
.portal-balance-footer > div strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #7de1b7; font-size: .86rem; direction: ltr; unicode-bidi: isolate; text-align: start; }
.portal-balance-footer a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; color: #e8edf5; text-decoration: none; font-size: .7rem; font-weight: 800; }
.portal-balance-footer a:hover { color: #fff; }
.portal-balance-footer a .portal-icon { width: .9rem; height: .9rem; }

.portal-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.portal-overview-card {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px 18px;
    color: var(--portal-blue);
    border: 1px solid var(--portal-border);
    border-radius: 17px;
    background: var(--portal-surface);
    box-shadow: var(--portal-shadow-sm);
}
.portal-overview-card.purchases { color: var(--portal-green); }
.portal-overview-card.credit { color: var(--portal-amber); }
.portal-overview-icon { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: color-mix(in srgb, currentColor 10%, var(--portal-surface)); }
.portal-overview-icon .portal-icon { width: 1.2rem; height: 1.2rem; }
.portal-overview-card > div { min-width: 0; }
.portal-overview-card > div > span { display: block; overflow: hidden; color: var(--portal-muted); font-size: .7rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.portal-overview-card > div > strong { display: block; margin-top: 2px; overflow-wrap: anywhere; color: var(--portal-ink); font-size: 1.05rem; font-weight: 950; direction: ltr; unicode-bidi: isolate; text-align: start; }

.portal-dashboard-content { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .75fr); gap: 16px; }
.portal-activity-card { overflow: hidden; }
.portal-activity-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 21px; border-bottom: 1px solid var(--portal-border); }
.portal-activity-heading { min-width: 0; display: flex; align-items: center; gap: 12px; }
.portal-section-icon { width: 39px; height: 39px; display: grid; place-items: center; flex: 0 0 auto; color: var(--portal-blue); border-radius: 12px; background: var(--portal-blue-soft); }
.portal-section-icon.success { color: var(--portal-green); background: var(--portal-green-soft); }
.portal-section-icon .portal-icon { width: 1.08rem; height: 1.08rem; }
.portal-activity-heading h2 { margin: 0; color: var(--portal-ink); font-size: .96rem; font-weight: 900; }
.portal-activity-heading p { max-width: 430px; margin: 3px 0 0; overflow: hidden; color: var(--portal-muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.portal-text-link { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 7px 9px; color: var(--portal-primary); border-radius: 9px; text-decoration: none; font-size: .7rem; font-weight: 850; }
.portal-text-link:hover { color: var(--portal-primary); background: var(--portal-primary-soft); }
.portal-text-link .portal-icon { width: .9rem; height: .9rem; }
.portal-activity-list { display: grid; padding: 7px; }
.portal-activity-row, .portal-payment-row { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 11px; padding: 12px 13px; color: var(--portal-ink); border-radius: 12px; text-decoration: none; transition: background-color .16s ease, transform .16s ease; }
.portal-activity-row + .portal-activity-row, .portal-payment-row + .portal-payment-row { border-top: 1px solid var(--portal-border); border-radius: 0; }
.portal-activity-row:hover { color: var(--portal-ink); background: var(--portal-surface-soft); }
.portal-row-icon { width: 36px; height: 36px; display: grid; place-items: center; color: var(--portal-blue); border-radius: 11px; background: var(--portal-blue-soft); }
.portal-row-icon.success { color: var(--portal-green); background: var(--portal-green-soft); }
.portal-row-icon .portal-icon { width: 1rem; height: 1rem; }
.portal-row-main { min-width: 0; }
.portal-row-main strong { display: block; overflow: hidden; color: var(--portal-ink); font-size: .8rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.portal-row-main time { display: block; margin-top: 2px; color: var(--portal-muted); font-size: .67rem; }
.portal-row-value { display: grid; justify-items: end; gap: 4px; }
html[dir="rtl"] .portal-row-value { justify-items: start; }
.portal-row-value > strong { color: var(--portal-ink); font-size: .8rem; font-weight: 900; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.portal-row-arrow { display: grid; place-items: center; color: var(--portal-faint); }
.portal-row-arrow .portal-icon { width: .9rem; height: .9rem; }
.portal-payment-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.portal-payment-amount { color: var(--portal-green); font-size: .79rem; font-weight: 950; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.portal-dashboard-empty { min-height: 240px; display: grid; place-items: center; align-content: center; gap: 6px; }
.portal-dashboard-empty strong { color: var(--portal-muted); font-size: .78rem; }
html[dir="ltr"] .portal-button-arrow,
html[dir="ltr"] .portal-text-link .portal-icon,
html[dir="ltr"] .portal-row-arrow .portal-icon,
html[dir="ltr"] .portal-balance-footer a .portal-icon { transform: rotate(180deg); }

.portal-auth-wrap { width: min(1120px, 100%); }
.portal-login-shell {
    width: 100%;
    min-height: min(660px, calc(100svh - 130px));
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(390px, .94fr);
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 30px;
    background: var(--portal-surface);
    box-shadow: var(--portal-shadow-lg);
}
.portal-login-story {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(30px, 4.5vw, 52px);
    color: #fff;
    background:
        radial-gradient(circle at 90% 8%, rgba(225, 58, 69, .34), transparent 30%),
        linear-gradient(145deg, #0e1728 0%, #16233a 62%, #111b2f 100%);
    isolation: isolate;
}
.portal-login-story::before { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .16; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, black, transparent 74%); }
.portal-login-story-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.portal-login-brand { min-width: 0; display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.portal-login-brand:hover { color: #fff; }
.portal-login-logo { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; padding: 5px; overflow: hidden; border: 1px solid rgba(255,255,255,.22); border-radius: 16px; background: #fff; box-shadow: 0 14px 35px rgba(0,0,0,.22); }
.portal-login-logo img { width: 100%; height: 100%; object-fit: contain; }
.portal-login-brand strong { display: block; max-width: 220px; overflow: hidden; color: #fff; font-size: .88rem; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.portal-login-brand small { display: block; margin-top: 1px; color: #aeb9ca; font-size: .66rem; font-weight: 700; }
.portal-login-secure { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 6px 9px; color: #cfdae8; border: 1px solid rgba(255,255,255,.11); border-radius: 999px; background: rgba(255,255,255,.055); font-size: .63rem; font-weight: 750; }
.portal-login-secure .portal-icon { width: .85rem; height: .85rem; color: #75ddb3; }
.portal-login-story-copy { position: relative; z-index: 1; max-width: 540px; padding-block: 45px 35px; }
.portal-login-story-copy .portal-kicker { margin-bottom: 10px; color: #ff8991; }
.portal-login-story-copy h2 { margin: 0; color: #fff; font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 950; line-height: 1.12; letter-spacing: -.045em; }
html[dir="rtl"] .portal-login-story-copy h2 { letter-spacing: 0; }
.portal-login-story-copy p { max-width: 500px; margin: 18px 0 0; color: #b8c4d5; font-size: .9rem; }
.portal-login-feature-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.portal-login-feature { min-width: 0; padding: 14px; border: 1px solid rgba(255,255,255,.1); border-radius: 15px; background: rgba(255,255,255,.055); backdrop-filter: blur(10px); }
.portal-login-feature > span { width: 33px; height: 33px; display: grid; place-items: center; margin-bottom: 12px; color: #ff858e; border-radius: 10px; background: rgba(230,60,72,.13); }
.portal-login-feature > span .portal-icon { width: 1rem; height: 1rem; }
.portal-login-feature strong { display: block; color: #f4f7fb; font-size: .74rem; font-weight: 850; }
.portal-login-feature small { display: block; margin-top: 4px; overflow: hidden; color: #96a4b9; font-size: .6rem; line-height: 1.45; }
.portal-login-decoration { position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; }
.portal-login-decoration.one { width: 320px; height: 320px; inset-inline-start: -200px; bottom: -210px; box-shadow: 0 0 0 50px rgba(255,255,255,.018); }
.portal-login-decoration.two { width: 150px; height: 150px; inset-inline-end: -75px; top: 42%; }

.portal-login-panel { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 5vw, 60px); background: var(--portal-surface); }
.portal-login-mobile-brand { display: none; }
.portal-login-heading { margin-bottom: 25px; }
.portal-login-heading-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 16px; color: var(--portal-primary); border: 1px solid color-mix(in srgb, var(--portal-primary) 15%, transparent); border-radius: 14px; background: var(--portal-primary-soft); }
.portal-login-heading-icon .portal-icon { width: 1.18rem; height: 1.18rem; }
.portal-login-heading .portal-kicker { margin-bottom: 7px; }
.portal-login-heading h1 { margin: 0; color: var(--portal-ink); font-size: clamp(1.7rem, 3vw, 2.2rem); font-weight: 950; line-height: 1.2; }
.portal-login-heading p { max-width: 430px; margin: 9px 0 0; color: var(--portal-muted); font-size: .82rem; }
.portal-login-form .portal-field { margin-bottom: 16px; }
.portal-login-form .portal-form-control { min-height: 52px; border-radius: 13px; }
.portal-password-input .portal-form-control { padding-inline-end: 47px; }
.portal-password-toggle { position: absolute; top: 50%; inset-inline-end: 8px; width: 36px; height: 36px; display: grid; place-items: center; padding: 0; color: var(--portal-muted); border: 0; border-radius: 10px; background: transparent; transform: translateY(-50%); cursor: pointer; }
.portal-password-toggle:hover, .portal-password-toggle[aria-pressed="true"] { color: var(--portal-primary); background: var(--portal-primary-soft); }
.portal-password-toggle .portal-icon { width: 1.05rem; height: 1.05rem; }
.portal-login-submit { width: 100%; min-height: 52px; margin-top: 3px; border-radius: 14px; }
.portal-login-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--portal-border); }
.portal-login-foot p { max-width: 350px; display: flex; align-items: flex-start; gap: 7px; margin: 0; color: var(--portal-muted); font-size: .67rem; }
.portal-login-foot p .portal-icon { width: .9rem; height: .9rem; flex: 0 0 auto; margin-top: 1px; color: var(--portal-green); }
.portal-login-foot > a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; color: var(--portal-muted); text-decoration: none; font-size: .68rem; font-weight: 800; }
.portal-login-foot > a:hover { color: var(--portal-primary); }
.portal-login-foot > a .portal-icon { width: .85rem; height: .85rem; }
html[dir="ltr"] .portal-login-foot > a .portal-icon { transform: rotate(180deg); }

.portal-password-card { display: grid; grid-template-columns: .85fr 1.15fr; overflow: hidden; }
.portal-password-visual { display: flex; flex-direction: column; justify-content: center; padding: clamp(32px, 5vw, 52px); color: #fff; background: linear-gradient(145deg, #111b30, #253451); }
.portal-password-visual .portal-kicker { color: #ff9ca2; }
.portal-password-visual h1 { margin: 5px 0 10px; color: #fff; font-size: 1.8rem; font-weight: 950; }
.portal-password-visual p { margin: 0; color: #c4cede; }
.portal-password-shield { width: 64px; height: 64px; display: grid; place-items: center; margin-bottom: 26px; color: #fff; border: 1px solid rgba(255, 255, 255, .17); border-radius: 20px; background: rgba(255, 255, 255, .08); }
.portal-password-shield .portal-icon { width: 1.8rem; height: 1.8rem; }
.portal-password-form { padding: clamp(30px, 5vw, 52px); }

.pagination { gap: 4px; margin-top: 18px; }
.page-link { color: var(--portal-primary); border: 0; border-radius: 9px !important; background: var(--portal-surface); }
.page-link:hover { color: var(--portal-primary); background: var(--portal-primary-soft); }
.page-item.active .page-link { color: #fff; background: var(--portal-primary); }
.page-item.disabled .page-link { color: var(--portal-faint); background: var(--portal-surface-soft); }

.text-muted { color: var(--portal-muted) !important; }
.text-success { color: var(--portal-green) !important; }
.text-danger { color: var(--portal-danger) !important; }

.portal-footer {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    padding: 0 0 30px;
}

.portal-footer-card {
    display: grid;
    grid-template-columns: minmax(280px, 1.2fr) minmax(180px, .65fr) minmax(240px, .9fr);
    gap: 28px;
    padding: 28px;
    overflow: hidden;
    border: 1px solid var(--portal-border);
    border-radius: 24px;
    background:
        radial-gradient(circle at 8% 0, color-mix(in srgb, var(--portal-primary) 10%, transparent), transparent 34%),
        var(--portal-surface);
    box-shadow: var(--portal-shadow-sm);
}

.portal-footer-brand {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.portal-footer-logo {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    padding: 5px;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--portal-shadow-sm);
}

.portal-footer-logo img { width: 100%; height: 100%; object-fit: contain; }
.portal-footer-brand > div { min-width: 0; }
.portal-footer-brand strong { display: block; overflow: hidden; color: var(--portal-ink); font-size: .98rem; font-weight: 950; text-overflow: ellipsis; white-space: nowrap; }
.portal-footer-brand p { max-width: 390px; margin: 6px 0 0; color: var(--portal-muted); font-size: .72rem; line-height: 1.65; }

.portal-footer-links > strong,
.portal-footer-contact > strong {
    display: block;
    margin-bottom: 11px;
    color: var(--portal-ink);
    font-size: .75rem;
    font-weight: 950;
}

.portal-footer-links > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 14px; }
.portal-footer-links a { width: fit-content; color: var(--portal-muted); text-decoration: none; font-size: .7rem; font-weight: 760; transition: color .16s ease; }
.portal-footer-links a:hover { color: var(--portal-primary); }
.portal-footer-contact > div { display: grid; gap: 8px; }
.portal-footer-contact a,
.portal-footer-contact p { min-width: 0; display: flex; align-items: flex-start; gap: 8px; margin: 0; color: var(--portal-muted); text-decoration: none; font-size: .69rem; font-weight: 720; }
.portal-footer-contact a:hover { color: var(--portal-primary); }
.portal-footer-contact .portal-icon { width: .92rem; height: .92rem; flex: 0 0 auto; margin-top: 1px; color: var(--portal-primary); }
.portal-footer-contact span { min-width: 0; overflow-wrap: anywhere; }
.portal-footer-secure .portal-icon { color: var(--portal-green); }

.portal-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 13px 7px 0;
    color: var(--portal-muted);
    font-size: .66rem;
    font-weight: 700;
}

.portal-footer-security { display: inline-flex; align-items: center; gap: 6px; color: var(--portal-green); }
.portal-footer-security .portal-icon { width: .86rem; height: .86rem; }
.portal-footer-guest .portal-footer-card { grid-template-columns: minmax(280px, 1.2fr) minmax(180px, .65fr) minmax(210px, .75fr); }

@media (max-width: 1080px) {
    .portal-brand { min-width: 160px; }
    .portal-brand-name { max-width: 150px; }
    .portal-nav-link { padding-inline: 9px; }
    .portal-language-select { min-width: 82px; }
    .portal-desktop-nav { display: none; }
    .portal-mobile-nav { display: grid; }
    body.customer-portal-body.portal-has-mobile-nav {
        padding-bottom: calc(var(--portal-mobile-nav-clearance) + env(safe-area-inset-bottom, 0px));
    }
    .portal-header-actions { margin-inline-start: auto; }
    .portal-dashboard-content { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .portal-desktop-nav { display: none; }
    .portal-header-actions { margin-inline-start: auto; }
    .portal-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-grid-2 { grid-template-columns: 1fr; }
    .portal-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-filter > :first-child { grid-column: 1 / -1; }
    .portal-period-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .portal-filter-control-product, .portal-filter-control-invoice { grid-column: span 6; }
    .portal-filter-control-status { grid-column: span 6; }
    .portal-auth-shell { grid-template-columns: 1fr 1fr; }
    .portal-footer-card { grid-template-columns: minmax(0, 1.15fr) minmax(210px, .85fr); }
    .portal-footer-contact { grid-column: 1 / -1; padding-top: 18px; border-top: 1px solid var(--portal-border); }
    .portal-footer-contact > div { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .portal-login-shell { width: min(100%, 690px); grid-template-columns: 1fr; }
    .portal-login-story { min-height: 390px; }
    .portal-login-story-copy { padding-block: 42px 30px; }
    .portal-login-story-copy h2 { max-width: 520px; }
    .portal-login-panel { padding: 42px; }
}

@media (max-width: 760px) {
    .portal-container { width: min(100% - 22px, 1220px); }
    .portal-header-inner { min-height: 66px; gap: 9px; }
    .portal-brand-logo-wrap { width: 40px; height: 40px; border-radius: 12px; }
    .portal-brand-name { max-width: 155px; font-size: .84rem; }
    .portal-brand-caption { font-size: .62rem; }
    .portal-header .portal-language-form { display: none; }
    .portal-icon-button, .portal-account-button { width: 40px; height: 40px; }
    .portal-main { padding-top: 23px; }
    .portal-dashboard-hero { grid-template-columns: 1fr; gap: 24px; padding: 27px; border-radius: 22px; }
    .portal-balance-panel { min-height: 210px; }
    .portal-overview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .portal-overview-card { display: grid; align-content: start; gap: 10px; padding: 14px; }
    .portal-overview-icon { width: 38px; height: 38px; }
    .portal-activity-header { padding: 17px; }
    .portal-page-heading, .portal-invoice-head { align-items: flex-start; flex-direction: column; }
    .portal-heading-actions { width: 100%; }
    .portal-heading-actions .portal-btn { flex: 1; }
    .portal-card { border-radius: 16px; }
    .portal-card-body { padding: 17px; }
    .portal-table th, .portal-table td { padding: 12px 10px; }
    .portal-invoice-filter-heading { align-items: flex-start; padding: 16px; }
    .portal-filter-clear-link { align-self: center; }
    .portal-invoice-filter { padding: 16px; }
    .portal-period-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .portal-invoice-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-filter-control-product, .portal-filter-control-invoice, .portal-filter-control-status { grid-column: span 1; }
    .portal-filter-control-product { grid-column: 1 / -1; }
    .portal-custom-dates, .portal-filter-actions { grid-column: 1 / -1; }
    .portal-active-filters { align-items: flex-start; flex-direction: column; padding: 12px 16px; }
    .portal-invoice-results-header { padding: 15px 16px; }
    .portal-invoice-table-wrap { overflow: visible; }
    .portal-invoice-table { min-width: 0; display: block; padding: 12px; }
    .portal-invoice-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); border: 0; white-space: nowrap; }
    .portal-invoice-table tbody { display: grid; gap: 10px; }
    .portal-invoice-table tbody tr { min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--portal-border); border-radius: 14px; background: var(--portal-surface-soft); }
    .portal-invoice-table tbody tr:hover { background: var(--portal-surface-soft); transform: none; }
    .portal-invoice-table td { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--portal-border); }
    .portal-invoice-table td::before { content: attr(data-label); min-width: 0; color: var(--portal-muted); font-size: .66rem; font-weight: 800; }
    .portal-invoice-table .portal-invoice-number-cell, .portal-invoice-table .portal-invoice-date-cell { background: color-mix(in srgb, var(--portal-blue-soft) 46%, var(--portal-surface)); }
    .portal-invoice-table .portal-invoice-number-cell { border-inline-end: 1px solid var(--portal-border); }
    .portal-invoice-table .portal-invoice-status-cell { border-bottom: 0; }
    .portal-invoice-table .portal-invoice-action-cell { width: auto; border-bottom: 0; }
    .portal-invoice-table .portal-invoice-action-cell::before { display: none; }
    .portal-invoice-table .portal-invoice-action-cell .portal-btn { width: 100%; }
    .portal-invoice-table .portal-amount { overflow-wrap: anywhere; white-space: normal; }
    .portal-auth-main { padding: 82px 12px 28px; }
    .portal-auth-shell { width: min(100%, 520px); grid-template-columns: 1fr; }
    .portal-auth-hero { min-height: auto; padding: 30px; }
    .portal-auth-brand h2 { font-size: 1.45rem; }
    .portal-auth-hero > p { margin: 18px 0; }
    .portal-auth-panel { padding: 30px; }
    .portal-login-story { padding: 30px; }
    .portal-login-feature { padding: 12px; }
    .portal-login-panel { padding: 34px 30px; }
    .portal-password-card { grid-template-columns: 1fr; }
    .portal-password-visual { padding: 30px; }
    .portal-password-shield { margin-bottom: 18px; }
    .portal-footer { padding-bottom: 30px; }
    .portal-footer-card,
    .portal-footer-guest .portal-footer-card { grid-template-columns: 1fr; gap: 22px; padding: 22px; border-radius: 20px; }
    .portal-footer-contact { grid-column: auto; padding-top: 20px; }
    .portal-footer-contact > div { grid-template-columns: 1fr; }
}

@media (max-width: 540px) {
    .portal-brand-copy { display: none; }
    .portal-auth-tools { top: 14px; inset-inline-end: 14px; }
    .portal-auth-tools .portal-language-form { height: 40px; }
    .portal-auth-tools .portal-icon-button { width: 40px; height: 40px; }
    .portal-page-heading { margin-bottom: 18px; }
    .portal-page-title { font-size: 1.42rem; }
    .portal-stats { grid-template-columns: 1fr 1fr; gap: 9px; }
    .portal-stat { min-height: 129px; padding: 15px; }
    .portal-stat-icon { width: 37px; height: 37px; margin-bottom: 13px; }
    .portal-stat-value { font-size: 1rem; }
    .portal-filter { grid-template-columns: 1fr; }
    .portal-filter > :first-child { grid-column: auto; }
    .portal-invoice-filter-heading { display: grid; grid-template-columns: auto minmax(0, 1fr); }
    .portal-filter-clear-link { grid-column: 1 / -1; margin-inline-start: 0; padding: 0; }
    .portal-period-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-period-option span { white-space: normal; }
    .portal-invoice-filter-grid { grid-template-columns: 1fr; gap: 12px; }
    .portal-filter-control-product, .portal-filter-control-invoice, .portal-filter-control-status, .portal-custom-dates, .portal-filter-actions { grid-column: 1; }
    .portal-custom-dates { grid-template-columns: 1fr; padding: 12px; }
    .portal-custom-date-note { grid-column: 1; }
    .portal-filter-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .portal-filter-actions .portal-btn-primary { min-width: 0; }
    .portal-invoice-table { padding: 9px; }
    .portal-invoice-table tbody tr { grid-template-columns: 1fr; }
    .portal-invoice-table .portal-invoice-number-cell { border-inline-end: 0; }
    .portal-invoice-table td { border-bottom: 1px solid var(--portal-border); }
    .portal-invoice-table .portal-invoice-action-cell { border-bottom: 0; }
    .portal-payment-top { flex-direction: column; }
    .portal-auth-hero { display: none; }
    .portal-auth-shell { border-radius: 22px; }
    .portal-auth-panel { padding: 27px 21px; }
    .portal-dashboard-actions { display: grid; grid-template-columns: 1fr; }
    .portal-hero-button { width: 100%; }
    .portal-overview-grid { grid-template-columns: 1fr; }
    .portal-overview-card { display: flex; padding: 14px 15px; }
    .portal-activity-heading p { display: none; }
    .portal-activity-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .portal-row-arrow { display: none; }
    .portal-row-value > strong { font-size: .72rem; }
    .portal-login-story { display: none; }
    .portal-login-shell { min-height: auto; border-radius: 22px; }
    .portal-login-panel { padding: 29px 21px 24px; }
    .portal-login-mobile-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 28px; color: var(--portal-ink); text-decoration: none; font-size: .8rem; font-weight: 900; }
    .portal-login-mobile-brand img { width: 42px; height: 42px; padding: 4px; border: 1px solid var(--portal-border); border-radius: 12px; background: #fff; object-fit: contain; }
    .portal-login-heading-icon { display: none; }
    .portal-login-foot { align-items: center; }
    .portal-login-foot p { font-size: .62rem; }
    .portal-invoice-totals { padding: 14px; }
    .portal-invoice-total-row.grand { margin-inline: -14px; padding-inline: 14px; }
    .portal-footer-card { gap: 19px; padding: 19px; }
    .portal-footer-logo { width: 48px; height: 48px; border-radius: 14px; }
    .portal-footer-links > div { grid-template-columns: 1fr 1fr; }
    .portal-footer-bottom { align-items: flex-start; flex-direction: column; gap: 7px; padding-inline: 3px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media print {
    .portal-header, .portal-mobile-nav, .portal-auth-tools, .portal-footer, .portal-page-heading .portal-heading-actions, .portal-filter { display: none !important; }
    html, body.customer-portal-body { color: #111827 !important; background: #fff !important; }
    body.customer-portal-body.portal-has-mobile-nav { padding-bottom: 0 !important; }
    .portal-main { padding: 0; }
    .portal-container { width: 100%; }
    .portal-card { border-color: #dfe4ec !important; box-shadow: none !important; }
    .portal-table th { color: #4b5563 !important; background: #f4f6f9 !important; }
    .portal-table td, .portal-card-title, .portal-product-name { color: #111827 !important; }
}
