html, body {
    /*font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;*/
    font-family: 'Inter', sans-serif !important;
    --accent-fill-rest: var(--epal-menu-blue);
    --body-font: 'Inter', sans-serif;
    --font-family: 'Inter', sans-serif;
    --epal-menu-blue: #0153DF;
    --epal-info-bg: #E8F3FE;
    --epal-warning-bg: #FFF9EC;
    --epal-debt-bg: #FFC9C9;
    --epal-open-invoice-bg: #FEE685;
    --epal-blue: #0153DF;
    --epal-blue-hover: #0143B5;
    --epal-blue-strong: #013BA0;
    --epal-blue-soft-bg: #E6EEFC;
    --epal-blue-very-soft-bg: #F2F6FE;
    --epal-text-strong: #1F1648;
    --epal-text-brand: #312070;
    --epal-text-link: #3D82F5;
    --epal-text-muted: #7C7C7C;
    --epal-border-soft: #E4E8EE;
    --epal-card-border: #eff4fc;
    --epal-card-bg: #ffffff;
    --epal-text-subtitle: #586cbd;
    --epal-action: #3f63fa;
    --epal-text-muted: #677cad;
}

.epal-card-soft {
    background: var(--epal-card-bg);
    border: 1px solid var(--epal-card-border);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* ============================================================
   Padrões partilhados pelas páginas de detalhe (Billing/Details,
   Receipts/Details). Mantém visual coerente sem duplicar CSS.
   ============================================================ */

.back-link {
    color: var(--epal-text-link);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
}

    .back-link:hover {
        text-decoration: underline;
    }

    .back-link svg {
        display: block;
    }

/* Card de valor total */
.value-card {
    padding: 24px;
}

.value-body {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 8px;
}

.value-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: var(--epal-blue-soft-bg, #E6EEFC);
    border-radius: 50%;
    flex-shrink: 0;
}

.value-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.value-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--epal-text-strong);
    opacity: 0.85;
}

.value-amount {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--epal-blue, #0153DF);
}

/* Lista de informação (Recibo/Fatura): título + linhas com label + valor */
.info-card-title {
    margin-top: 0;
    margin-bottom: 28px;
    font-size: 22px;
    font-weight: 700;
    color: var(--epal-text-strong);
}

.info-list {
    display: flex;
    flex-direction: column;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--epal-card-border, #eff4fc);
}

    .info-row:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .info-row.align-top {
        align-items: flex-start;
    }

.info-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

    .info-left.align-top {
        align-items: flex-start;
        padding-top: 2px;
    }

.info-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--epal-text-subtitle, #586cbd);
}

.info-right {
    font-size: 15px;
    font-weight: 600;
    color: var(--epal-text-strong);
    text-align: right;
}

    .info-right.multi-line {
        line-height: 1.5;
    }

@media (max-width: 768px) {
    .info-row,
    .info-row.align-top {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }

    .info-left,
    .info-left.align-top {
        align-items: center;
        justify-content: center;
        padding-top: 0;
    }

    .info-right {
        text-align: center;
        width: 100%;
    }
}

fluent-card {
    --fill-color: var(--epal-card-bg);
    --neutral-stroke-rest: var(--epal-card-border);
    --neutral-stroke-layer-rest: var(--epal-card-border);
    background: var(--epal-card-bg) !important;
    border: 1px solid var(--epal-card-border) !important;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    contain: none !important;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
}

    fluent-card::part(control) {
        background: var(--epal-card-bg) !important;
        border: none !important;
        border-radius: inherit;
        contain: none !important;
        transform: none !important;
    }

    fluent-card.status-card-paid,
    fluent-card.status-card-paid::part(control) {
        background: #DCF5E2 !important;
        border: 1px solid #1E803F !important;
        --fill-color: #DCF5E2 !important;
        --neutral-layer-1: #DCF5E2 !important;
    }

    fluent-card.status-card-pending,
    fluent-card.status-card-pending::part(control) {
        background: #FFE3CC !important;
        border: 1px solid #FF6F24 !important;
        --fill-color: #FFE3CC !important;
        --neutral-layer-1: #FFE3CC !important;
    }

.apexcharts-tooltip.apexcharts-theme-light,
.apexcharts-tooltip.apexcharts-theme-dark {
    background: var(--epal-card-bg, #ffffff) !important;
    border: 1px solid var(--epal-card-border, #eff4fc) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(11, 46, 172, 0.12) !important;
    color: var(--epal-text-strong) !important;
    overflow: hidden;
    font-family: 'Inter', sans-serif !important;
}

.apexcharts-tooltip .apexcharts-tooltip-title {
    background: var(--epal-blue-very-soft-bg, #F2F6FE) !important;
    border-bottom: 1px solid var(--epal-card-border, #eff4fc) !important;
    color: var(--epal-text-strong) !important;
    font-weight: 700 !important;
    padding: 8px 12px !important;
    margin: 0 !important;
}

.apexcharts-tooltip .apexcharts-tooltip-series-group {
    background: var(--epal-card-bg, #ffffff) !important;
    padding: 8px 12px !important;
}

.apexcharts-tooltip .apexcharts-tooltip-text-y-label {
    color: var(--epal-text-subtitle, #586cbd) !important;
    font-weight: 500 !important;
}

.apexcharts-tooltip .apexcharts-tooltip-text-y-value {
    color: var(--epal-text-strong) !important;
    font-weight: 700 !important;
}

.apexcharts-xaxistooltip,
.apexcharts-yaxistooltip {
    background: var(--epal-card-bg, #ffffff) !important;
    border: 1px solid var(--epal-card-border, #eff4fc) !important;
    border-radius: 8px !important;
    color: var(--epal-text-strong) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

    .apexcharts-xaxistooltip::before,
    .apexcharts-xaxistooltip::after,
    .apexcharts-yaxistooltip::before,
    .apexcharts-yaxistooltip::after {
        border-color: var(--epal-card-border, #eff4fc) !important;
    }

.epal-text-strong {
    color: var(--epal-text-strong);
}

.epal-text-brand {
    color: var(--epal-text-brand);
}

.epal-text-muted {
    color: var(--epal-text-muted);
}

.epal-title {
    color: var(--epal-text-strong);
    font-weight: 700;
}

.epal-title-brand {
    color: var(--epal-text-brand);
    font-weight: 700;
}

.epal-subtitle {
    color: var(--epal-text-muted);
    font-weight: 500;
}

.epal-link {
    color: var(--epal-text-link);
    text-decoration: none;
    font-weight: 500;
}

    .epal-link:hover {
        text-decoration: underline;
    }

.epal-icon-brand,
.epal-icon-brand ::deep svg {
    color: var(--epal-text-brand);
    fill: var(--epal-text-brand) !important;
}

fluent-dialog,
fluent-dialog::part(control),
fluent-dialog::part(dialog) {
    background: #ffffff !important;
    --neutral-layer-floating: #ffffff;
    --neutral-fill-layer-rest: #ffffff;
}

    fluent-dialog::part(control) {
        padding: 0 !important;
        padding-top: 10px !important;
    }

    fluent-dialog .fluent-dialog-header,
    fluent-dialog .fluent-dialog-body {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    fluent-dialog .fluent-dialog-header {
        display: flex;
        justify-content: flex-end;
    }

    fluent-dialog .fluent-dialog-header fluent-button {
        margin-left: auto;
        --type-ramp-base-font-weight: 800;
        --font-weight: 800;
        font-weight: 800 !important;
    }

        fluent-dialog .fluent-dialog-header fluent-button::part(control) {
            font-weight: 800 !important;
            font: 800 1.1rem/1 'Inter', sans-serif !important;
        }

fluent-select.epal-contract-picker {
    --type-ramp-base-font-weight: 700;
    --font-weight: 700;
}

    fluent-select.epal-contract-picker::part(control),
    fluent-select.epal-contract-picker::part(selected-value) {
        font: 700 0.9rem/1 'Inter', sans-serif !important;
    }

    fluent-select.epal-contract-picker fluent-option {
        font-weight: 700 !important;
    }

fluent-design-system-provider {
    font-family: 'Inter', sans-serif;
    --body-font: 'Inter', sans-serif;
    --font-family: 'Inter', sans-serif;
}

*,
*::before,
*::after {
    font-family: 'Inter', sans-serif !important;
}


a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

#nav-menu-container {
    transition: width 0.3s ease, padding 0.3s ease;
}

    #nav-menu-container.collapsed .fluent-nav-link,
    #nav-menu-container.collapsed .fluent-nav-menu {
        display: none;
    }

    #nav-menu-container.collapsed {
        width: 0 !important;
        padding: 0 !important;
    }

fluent-select::part(listbox) {
    max-height: 200px;
    overflow-y: auto;
}

.login-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/external-background.png') no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    opacity: 1;
    /*filter: alpha(opacity=50);*/
    /*filter: grayscale(1);*/
}

[aria-required="true"] + label::after {
    content: " *";
    color: var(--re-accent-base, #d32f2f);
    font-weight: bold;
}

.full-height-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.grid-wrapper {
    flex-grow: 1;
    overflow: auto;
    position: relative;
}

/* --- Global Scrollbar --- */

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--neutral-stroke-rest) transparent;
}

/* Chrome, Edge, Safari, and Opera */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--neutral-stroke-rest);
    border-radius: 20px;
    border: 1px solid transparent;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: var(--neutral-stroke-strong-rest);
    }

::-webkit-scrollbar-thumb {
    background-clip: content-box;
    background-color: rgba(128, 128, 128, 0.3);
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: rgba(128, 128, 128, 0.6);
    }


.main-app-bar fluent-anchored-region {
    left: auto !important;
    right: 0 !important;
    transform: translate(0px, 40px) !important;
}

    .main-app-bar fluent-anchored-region > div {
        margin-top: 0 !important;
        border-radius: var(--layer-corner-radius);
        border: 1px solid var(--neutral-stroke-report);
        box-shadow: var(--elevation-shadow-flyout);
    }

.main-app-bar header, .fluent-header, fluent-stack {
    overflow: visible !important;
}

.main-app-bar .fluent-appbar-item svg {
    fill: var(--neutral-layer-2) !important;
}

.main-app-bar .fluent-appbar-item:hover svg {
    fill: var(--neutral-foreground-rest) !important;
    transition: fill 0.2s ease;
}

.main-app-bar .fluent-appbar-item:active svg {
    fill: var(--accent-fill-rest) !important;
}

.main-app-bar .fluent-appbar-item [part="label"] {
    color: var(--neutral-layer-2) !important;
    transition: color 0.2s ease;
}

.main-app-bar .fluent-appbar-item:hover [part="label"] {
    color: var(--neutral-foreground-rest) !important;
}

.main-app-bar fluent-anchored-region .fluent-appbar-item svg {
    fill: var(--neutral-foreground-rest) !important;
}

.main-app-bar fluent-anchored-region .fluent-appbar-item [part="label"] {
    color: var(--neutral-foreground-rest) !important;
}

.main-app-bar fluent-search::part(control)::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

.main-app-bar fluent-search::part(root) {
    position: relative;
}

    .main-app-bar fluent-search::part(root)::before {
        /* Use a variable here. The fallback is "Search" */
        content: var(--search-placeholder, "Search...");
        position: absolute;
        left: 34px;
        top: 50%;
        transform: translateY(-50%);
        color: #666;
        font-size: 14px;
        pointer-events: none;
        z-index: 10;
        display: block;
    }

.main-app-bar fluent-search:focus-within::part(root)::before,
.main-app-bar fluent-search[value]:not([value=""])::part(root)::before {
    display: none;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: #1b6ec2 !important;
    --bs-nav-pills-link-active-color: #ffffff;
}

.nav-link {
    --bs-nav-link-color: #1b6ec2 !important;
}

fluent-dialog:focus,
fluent-dialog:focus-visible,
fluent-dialog *:focus {
    outline: none !important;
}

fluent-dialog fluent-button:focus-visible {
    outline: 2px solid var(--accent-fill-rest) !important;
    outline-offset: 2px;
}


.epal-logo-styled {
    background-color: var(--accent-fill-rest);
    -webkit-mask-image: url('/img/epal-logo.svg');
    mask-image: url('/img/epal-logo.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-position: center;
    mask-position: center;
    width: 290px;
    height: 80px;
    display: inline-block;
}

    .epal-logo-styled:hover {
        background-color: var(--accent-fill-hover);
    }

fluent-anchor[appearance="accent"].error-button {
    --accent-fill-rest: var(--error) !important;
    --accent-fill-hover: var(--error) !important;
    --accent-fill-active: var(--error) !important;
}

#blazor-error-ui {
    display: none;
    background: #fff1f0;
    color: #d32f2f;
    bottom: 0;
    left: 0;
    position: fixed;
    width: 100%;
    z-index: 1000;
    padding: 0.6rem 1.25rem;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    border-top: 2px solid #d32f2f;
    text-align: center;
}

    #blazor-error-ui .reload {
        margin-left: 10px;
        font-weight: bold;
        color: #d32f2f;
        text-decoration: underline;
    }

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 1.25rem;
        top: 0.75rem;
    }

fluent-data-grid {
    min-height: 300px;
    height: 100%;
}

.fluent-data-grid-empty-content {
    display: flex;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    padding: 50px 0;
}

.empty-content-row.empty-content-cell {
    height: auto !important;
    min-height: 350px;
    display: table-cell;
    vertical-align: middle;
}

.fluent-data-grid-row.empty-content-row {
    height: auto !important;
}

fluent-dialog,
fluent-overlay,
#fluent-dialog-container,
.fluent-dialog-main {
    z-index: 99999 !important;
    position: fixed !important;
}

#nav-menu-container,
.fluent-header,
.sidebar {
    z-index: 10 !important;
}

.epal-card {
    border: 1px solid #e9eef5;
    border-radius: 12px;
    background: #fcfcfd;
    padding: 18px;
}

.epal-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

fluent-button.epal-btn {
    height: auto !important;
    font-weight: bold;
}

    fluent-button.epal-btn::part(control) {
        height: auto !important;
        min-height: 0 !important;
        padding: 8px 24px !important;
        border-radius: 10px;
        font-weight: bold;
    }

.epal-btn-text {
    font-weight: bold !important;
}

.epal-textarea-wrap {
    position: relative;
    width: 100%;
}

.epal-textarea {
    width: 100%;
    min-height: 180px;
    padding: 14px;
    border: 1px solid #e4e8ee;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #1f2a44;
    background: #ffffff;
    resize: vertical;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease;
}

    .epal-textarea:focus {
        border-color: var(--epal-menu-blue);
    }

.epal-textarea-hint {
    position: absolute;
    right: 14px;
    bottom: 12px;
    font-size: 0.8rem;
    color: #b3bac6;
    pointer-events: none;
}

.page, .sidebar, #nav-menu-container {
    transform: none !important;
    -webkit-transform: none !important;
    perspective: none !important;
}

/* ===== Grid partilhada (Billing, Home, Recibos) ===== */

.epal-grid-card {
    background-color: var(--epal-card-bg, #ffffff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    border: 1px solid var(--epal-card-border, #eff4fc);
    padding: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow: visible;
    contain: none !important;
}

    fluent-card.epal-grid-card::part(control) {
        overflow: visible !important;
        contain: none !important;
    }

.epal-grid-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    margin-bottom: 1.25rem;
}

.epal-grid-title {
    color: var(--epal-text-strong);
    margin: 0;
    font-weight: 700;
    flex: 1 0 auto;
}

.epal-grid-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--epal-card-border, #eff4fc);
    background: var(--epal-card-bg, #ffffff);
    display: block;
}

/* Quando a grid é usada sem .epal-grid-card por fora, dá-lhe aspeto de card */
.epal-grid-scroll-standalone {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
}

.epal-grid-scroll::-webkit-scrollbar {
    height: 6px;
}

.epal-grid-scroll::-webkit-scrollbar-thumb {
    background: var(--neutral-stroke-rest);
    border-radius: 10px;
}

/* Card que envolve apenas a paginação (no Billing a grid e a paginação estão em cards separados) */
.epal-pagination-card {
    background: var(--epal-card-bg, #ffffff);
    border: 1px solid var(--epal-card-border, #eff4fc);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    padding: 14px 20px;
}

/* FluentDataGrid dentro de epal-grid-card */
.epal-grid-scroll fluent-data-grid,
.epal-grid-scroll .fluent-data-grid {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    --grid-header-cell-background: transparent;
    --neutral-layer-1: transparent;
    --neutral-layer-2: transparent;
    --neutral-layer-3: transparent;
    min-width: 720px !important;
    width: 100% !important;
    display: block;
}

    .epal-grid-scroll .fluent-data-grid [role="row"]:first-child,
    .epal-grid-scroll .fluent-data-grid [role="rowgroup"]:first-child [role="row"] {
        background: #f8fafe !important;
    }

    .epal-grid-scroll .fluent-data-grid [role="row"] {
        background: transparent !important;
        border: none !important;
    }

    .epal-grid-scroll .fluent-data-grid [role="gridcell"] {
        color: var(--epal-text-subtitle, #586cbd);
        font-size: 0.9rem;
        font-weight: 400 !important;
        background: transparent !important;
        border: none !important;
        border-top: 1px solid #f7f9fe !important;
        display: flex !important;
        align-items: center !important;
        overflow: visible !important;
        line-height: 1.4 !important;
        padding: 20px 16px;
    }

.epal-grid-scroll .column-header,
.epal-grid-scroll [role="columnheader"] {
    background: #f8fafe !important;
    color: var(--epal-text-strong) !important;
    font-weight: 700 !important;
    font-size: 0.85rem;
    text-transform: none;
    border: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: nowrap !important;
}

    .epal-grid-scroll [role="columnheader"] *,
    .epal-grid-scroll .column-header * {
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: nowrap !important;
        max-width: none !important;
    }

    /* Esconder controlos de resize / opções da grid */
    .epal-grid-scroll .col-options-button,
    .epal-grid-scroll .col-options,
    .epal-grid-scroll .resize-handle,
    .epal-grid-scroll [role="columnheader"]::before,
    .epal-grid-scroll [role="columnheader"]::after,
    .epal-grid-scroll .column-header::before,
    .epal-grid-scroll .column-header::after {
        display: none !important;
    }

.epal-grid-scroll [role="columnheader"] {
    border-right: none !important;
    border-left: none !important;
    resize: none !important;
}

    .epal-grid-scroll [role="columnheader"] > button.resize,
    .epal-grid-scroll [role="columnheader"] .resize {
        display: none !important;
    }

    /* Respeitar Align="Align.Center" do FluentDataGrid (justify-content via flex) */
    .epal-grid-scroll [role="gridcell"].col-justify-center,
    .epal-grid-scroll [role="columnheader"].col-justify-center,
    .epal-grid-scroll [role="gridcell"][align="center"],
    .epal-grid-scroll [role="columnheader"][align="center"] {
        justify-content: center !important;
        text-align: center !important;
    }

    .epal-grid-scroll [role="gridcell"].col-justify-end,
    .epal-grid-scroll [role="columnheader"].col-justify-end,
    .epal-grid-scroll [role="gridcell"][align="end"],
    .epal-grid-scroll [role="columnheader"][align="end"] {
        justify-content: flex-end !important;
        text-align: right !important;
    }

    .epal-grid-scroll [role="gridcell"].col-justify-center > *,
    .epal-grid-scroll [role="columnheader"].col-justify-center > * {
        justify-content: center !important;
        margin: 0 auto;
    }

/* Empty content centrado e a ocupar todas as colunas */
.epal-grid-scroll .fluent-data-grid-empty-content,
.epal-grid-scroll .empty-content-cell {
    grid-column: 1 / -1 !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
    display: flex !important;
}

.epal-grid-scroll .empty-content-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: var(--epal-text-muted);
    width: 100%;
}

.epal-grid-scroll .grid-cell-placeholder {
    position: relative;
    pointer-events: none;
    color: transparent;
}

    .epal-grid-scroll .grid-cell-placeholder::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 12px;
        transform: translateY(-50%);
        width: 60%;
        height: 14px;
        border-radius: 6px;
        background: linear-gradient(90deg, var(--neutral-fill-rest) 25%, var(--neutral-fill-hover) 50%, var(--neutral-fill-rest) 75%);
        background-size: 200% 100%;
        animation: epal-shimmer 1.5s infinite;
    }

@keyframes epal-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Valor monetário em destaque na grid */
.epal-invoice-amount {
    color: var(--epal-text-strong);
    font-weight: 700;
}

/* Badges de estado */
.epal-status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
}

.epal-status-badge-paid {
    background-color: #DCF5E2;
    color: #1E7E34;
}

.epal-status-badge-pending {
    background-color: #FFE3CC;
    color: #ff6f04;
}

/* Botão de acção icon-only (download) */
.epal-grid-action-btn {
    background: transparent;
    border: 1px solid var(--epal-card-border, #eff4fc);
    padding: 6px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.15s ease;
    color: var(--epal-action);
}

    .epal-grid-action-btn svg {
        fill: var(--epal-action) !important;
    }

    .epal-grid-action-btn:hover:not([disabled]) {
        background: var(--epal-blue-very-soft-bg, #F2F6FE);
    }

    .epal-grid-action-btn[disabled] {
        cursor: default;
        opacity: 0.6;
    }

/* Link "Ver detalhe" (texto + ícone) */
.epal-grid-action-link {
    color: var(--epal-action);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
}

    .epal-grid-action-link:hover {
        text-decoration: underline;
    }

    .epal-grid-action-link ::deep svg,
    .epal-grid-action-link svg {
        display: block;
        fill: var(--epal-action) !important;
    }

/* Botão "Pagar" (borda azul leve, texto + ícone) */
.epal-grid-pay-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 8px;
    border: 1px solid var(--epal-card-border, #eff4fc);
    background: var(--epal-card-bg, #ffffff);
    color: var(--epal-action);
    font-weight: 500;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

    .epal-grid-pay-btn:hover {
        background: var(--epal-blue-very-soft-bg, #F2F6FE);
    }

    .epal-grid-pay-btn svg {
        fill: var(--epal-action) !important;
    }

/* ===== Toolbar de filtros (Todas/Por pagar/Pesquisa/Exportar) ===== */

.epal-filter-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
}

.epal-filter-toolbar-search {
    margin-left: auto;
    flex: 1 1 300px;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .epal-filter-toolbar-search fluent-search {
        flex: 1;
    }

.epal-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid var(--epal-card-border, #eff4fc);
    background: var(--epal-card-bg, #ffffff);
    color: var(--epal-text-strong);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

    .epal-filter-pill:hover {
        background: var(--epal-blue-very-soft-bg, #F2F6FE);
    }

.epal-filter-pill-active {
    background: #ffffff;
    border-color: #1952f2;
    color: #1952f2;
}

    .epal-filter-pill-active:hover {
        background: #f5f8ff;
        color: #1952f2;
    }

    .epal-filter-pill-active svg {
        fill: #1952f2 !important;
    }

    .epal-filter-pill-success svg {
        fill: var(--success) !important;
    }

.epal-export-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 10px;
    border: 1px solid #1952f2;
    background: #ffffff;
    color: #1952f2;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.15s ease;
}

    .epal-export-btn:hover:not([disabled]) {
        background: #f5f8ff;
    }

    .epal-export-btn[disabled] {
        cursor: default;
        opacity: 0.6;
    }

    .epal-export-btn svg {
        fill: #1952f2 !important;
    }


.epal-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding-top: 16px;
    gap: 12px;
    flex-wrap: wrap;
}


.epal-pagination-card .epal-pagination {
    padding-top: 0;
}



.epal-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}

    .epal-input-wrap > input,
    .epal-input-wrap > .epal-input {
        width: 100%;
        height: 44px;
        padding: 10px 40px 10px 44px;
        border: 1px solid #d6def0;
        border-radius: 10px;
        background: #ffffff;
        font-size: 0.95rem;
        color: #0a2a55;
        font-family: inherit;
        transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
        box-sizing: border-box;
    }

        .epal-input-wrap > input:focus,
        .epal-input-wrap > .epal-input:focus {
            outline: none;
            border-color: #1f6feb;
            background: #f5f8ff;
            box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.18);
        }

        .epal-input-wrap > input::placeholder,
        .epal-input-wrap > .epal-input::placeholder {
            color: #94a3bc;
        }

    .epal-input-wrap.epal-input-wrap-icon-right > input,
    .epal-input-wrap.epal-input-wrap-icon-right > .epal-input {
        padding: 10px 80px 10px 14px;
    }

.epal-input-button {
    text-align: left;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 24px;
}

.epal-input-label {
    position: absolute;
    top: -5px;
    left: 5px;
    background: var(--epal-card-bg, #ffffff);
    padding: 0 6px;
    font-size: 0.75rem;
    color: var(--epal-text-subtitle, #586cbd);
    font-weight: 500;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
}

.epal-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #1848da;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .epal-input-icon.epal-input-icon-right {
        left: auto;
        right: 14px;
    }

    .epal-input-icon.epal-input-icon-interactive {
        pointer-events: auto;
        cursor: pointer;
    }

    .epal-input-icon svg {
        fill: #1848da !important;
    }

.epal-input-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3bc;
    transition: background-color 0.15s ease, color 0.15s ease;
}

    .epal-input-clear:hover {
        background: #eef2f7;
        color: #0a2a55;
    }

    .epal-input-clear svg {
        fill: currentColor !important;
    }

    .epal-input-clear.epal-input-clear-aux {
        right: 40px;
    }

.epal-pagination-left {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.epal-pagination-summary {
    color: #677cad;
    font-size: 0.9rem;
}

.epal-page-size {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.epal-page-size-label {
    color: #677cad;
    font-size: 0.9rem;
}

fluent-select.epal-range-picker {
    --neutral-stroke-rest: var(--epal-card-border, #eff4fc);
    --neutral-stroke-hover: var(--epal-card-border, #eff4fc);
    --neutral-stroke-active: var(--epal-card-border, #eff4fc);
    --neutral-stroke-focus: var(--epal-card-border, #eff4fc);
    --neutral-foreground-rest: #4e59bc;
    color: #4e59bc;
    border-radius: 8px;
}

    fluent-select.epal-range-picker::part(control) {
        border-color: var(--epal-card-border, #eff4fc) !important;
        color: #4e59bc !important;
        font-weight: 600;
        border-radius: 8px;
    }

    fluent-select.epal-range-picker::part(selected-value) {
        color: #4e59bc !important;
        font-weight: 600;
    }

    fluent-select.epal-range-picker svg {
        fill: #4e59bc !important;
        color: #4e59bc !important;
    }

    fluent-select.epal-range-picker fluent-option {
        color: #4e59bc;
    }

.epal-pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    row-gap: 6px;
    justify-content: flex-end;
}

.epal-pagination-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid var(--epal-card-border, #eff4fc);
    background: var(--epal-card-bg, #ffffff);
    color: var(--epal-text-strong);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

    .epal-pagination-btn:hover:not([disabled]):not(.epal-pagination-btn-active) {
        background: var(--epal-blue-very-soft-bg, #F2F6FE);
    }

    .epal-pagination-btn[disabled] {
        cursor: default;
        opacity: 0.4;
    }

.epal-pagination-btn-active {
    background: var(--epal-blue, #0153DF);
    border-color: var(--epal-blue, #0153DF);
    color: #ffffff;
}

    .epal-pagination-btn-active:hover {
        background: var(--epal-blue-hover, #0143B5);
        color: #ffffff;
    }

.epal-pagination-ellipsis {
    padding: 0 4px;
    color: var(--epal-text-muted);
    user-select: none;
}

@media (max-width: 600px) {
    .epal-filter-toolbar-search {
        margin-left: 0;
        width: 100%;
    }

    .epal-pagination {
        justify-content: center;
    }

    .epal-pagination-left,
    .epal-pagination-pages {
        width: 100%;
        justify-content: center;
    }

    .epal-grid-card,
    .epal-pagination-card {
        align-self: flex-start;
        height: fit-content;
    }
}

@media (max-width: 768px) {
    .epal-grid-card {
        padding: 14px;
    }

    .epal-filter-toolbar {
        align-items: stretch;
        gap: 8px;
    }

    .epal-filter-toolbar-search {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .epal-input-wrap.epal-input-wrap-icon-right {
        flex: 1 1 auto !important;
        width: 100%;
    }

    .epal-filter-pill,
    .epal-export-btn {
        width: 100%;
        justify-content: center;
    }
}


.efc-field {
    display: flex;
    flex-direction: column;
}

.efc-field-label {
    font-weight: 600;
    color: var(--epal-text-strong);
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: block;
}

.efc-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.efc-input-wrap {
    position: relative;
}

    .efc-input-wrap input.form-control,
    .efc-input-wrap select.form-control,
    .efc-input-wrap button.form-control {
        width: 100%;
        padding: 12px 14px 12px 44px;
        border: 1px solid #d6def0;
        border-radius: 10px;
        background: #ffffff;
        font-size: 0.95rem;
        color: #0a2a55;
        transition: border-color 0.15s, background 0.15s;
        font-family: inherit;
    }

        .efc-input-wrap select.form-control {
            padding-right: 40px;
            appearance: none;
            -webkit-appearance: none;
            background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3e%3cpath d='M1 1.5L6 6.5L11 1.5' stroke='%235b6c87' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3e%3c/svg%3e");
            background-repeat: no-repeat;
            background-position: right 14px center;
            cursor: pointer;
        }

        .efc-input-wrap input.form-control:focus,
        .efc-input-wrap select.form-control:focus,
        .efc-input-wrap button.form-control:focus {
            outline: none;
            border-color: #1f6feb;
            background-color: #f5f8ff;
            box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.18);
        }

        .efc-input-wrap input.form-control:-webkit-autofill,
        .efc-input-wrap input.form-control:-webkit-autofill:hover,
        .efc-input-wrap input.form-control:-webkit-autofill:focus,
        .efc-input-wrap input.form-control:-webkit-autofill:active {
            -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
            -webkit-text-fill-color: #0a2a55 !important;
            caret-color: #0a2a55;
            transition: background-color 9999s ease-out 0s;
        }

        .efc-input-wrap input.form-control::placeholder {
            color: #94a3bc;
        }

        .efc-input-wrap input.form-control[readonly] {
            cursor: default;
            color: #314f7c;
            background: #eef2f7;
        }

            .efc-input-wrap input.form-control[readonly]:focus,
            .efc-input-wrap input.form-control[readonly]:focus-visible {
                background: #eef2f7;
                border-color: #d6def0;
                box-shadow: none;
            }

.efc-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #1848da;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .efc-input-icon svg {
        fill: #1848da !important;
    }

.efc-input-trailing {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #5b6c87;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.efc-input-wrap.has-edit-btn input.form-control,
.efc-phone-wrap .phone-input-wrapper input.phone-number-input {
    padding-right: 56px;
}

.efc-edit-btn {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    padding: 0 12px;
    background: #ffffff;
    border: 0;
    border-left: 1px solid #d6def0;
    border-top-right-radius: 9px;
    border-bottom-right-radius: 9px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    color: var(--epal-text-link);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
    z-index: 2;
}

    .efc-edit-btn:hover:not([disabled]) {
        background: var(--epal-blue-very-soft-bg, #F2F6FE);
    }

    .efc-edit-btn svg {
        fill: var(--epal-text-link) !important;
    }

    .efc-edit-btn[disabled] {
        cursor: default;
        opacity: 0.55;
    }

        .efc-edit-btn[disabled] svg {
            fill: #94a3bc !important;
        }

.efc-phone-wrap {
    position: relative;
}

fluent-checkbox.profile-consents-checkbox {
    color: #737fa2;
}

    fluent-checkbox.profile-consents-checkbox::part(label),
    fluent-checkbox.profile-consents-checkbox label {
        color: #737fa2;
    }

.efc-dropdown-trigger {
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    line-height: 1;
}

    .efc-dropdown-trigger > .efc-dropdown-trigger-text {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .efc-dropdown-trigger > .efc-dropdown-chevron {
        display: inline-flex;
        align-items: center;
        flex-shrink: 0;
        color: #5b6c87;
        transition: transform 0.15s ease;
    }

    .efc-dropdown-trigger[aria-expanded="true"] > .efc-dropdown-chevron {
        transform: rotate(180deg);
    }

    .efc-dropdown-trigger > .efc-dropdown-chevron svg {
        fill: #5b6c87;
    }

.efc-dropdown-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #d6def0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(11, 46, 172, 0.12);
    z-index: 100;
    padding: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.efc-dropdown-panel--portal {
    position: fixed;
    top: 0;
    left: 0;
    right: auto;
    z-index: 1000;
}

.efc-dropdown-panel--country {
    width: auto !important;
    min-width: 300px;
}

.efc-dropdown-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 8px 8px;
    border-bottom: 1px solid #eef2f7;
    background: #ffffff;
    flex-shrink: 0;
}

    .efc-dropdown-search svg {
        flex-shrink: 0;
        color: #5b6c87;
    }

.efc-dropdown-search-input {
    flex: 1;
    border: 1px solid #d6def0;
    border-radius: 6px;
    outline: none;
    background: #ffffff;
    color: #0a2a55;
    font-size: 0.875rem;
    padding: 6px 8px;
    font-family: inherit;
}

    .efc-dropdown-search-input::placeholder {
        color: #94a3bc;
    }

    .efc-dropdown-search-input:focus {
        border-color: #1f6feb;
    }

.efc-dropdown-options {
    padding: 2px 0;
    max-height: 260px;
    overflow-y: auto;
}

.efc-dropdown-no-results {
    padding: 12px;
    text-align: center;
    color: #5b6c87;
    font-style: italic;
    font-size: 0.875rem;
}

.efc-country-name {
    flex: 1;
    color: #0a2a55;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.efc-country-dial-code {
    font-size: 0.8rem;
    color: #5b6c87;
    font-weight: 600;
}

.efc-dropdown-option > .fi {
    width: 1.6em;
    height: 1.15em;
    border-radius: 2px;
    background-size: cover;
    flex-shrink: 0;
}

.efc-dropdown-option {
    width: 100%;
    background: transparent;
    border: 0;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    color: var(--epal-text-strong, #0a2a55);
    font-size: 0.95rem;
    font-family: inherit;
    transition: background-color 0.12s ease;
}

    .efc-dropdown-option:hover {
        background: var(--epal-blue-very-soft-bg, #F2F6FE);
    }

    .efc-dropdown-option.is-selected {
        background: var(--epal-blue-soft-bg, #E6EEFC);
        font-weight: 600;
    }

    .efc-dropdown-option > svg {
        flex-shrink: 0;
    }

    .efc-dropdown-option > .efc-dropdown-option-text {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.efc-dropdown-backdrop {
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 99;
}

.efc-dropdown-backdrop--portal {
    z-index: 999;
}

.efc-link {
    color: #1f6feb;
    font-weight: 600;
    text-decoration: none;
}

    .efc-link:hover {
        text-decoration: underline;
    }

.efc-submit {
    width: 100%;
    height: 48px;
    font-weight: 700;
    border-radius: 10px;
}

.efc-submit-secondary {
    width: 100%;
    height: 48px;
    font-weight: 700;
    border-radius: 10px;
    background: #b3b8c2;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .efc-submit-secondary:hover:not([disabled]) {
        background: #9ea3ae;
    }

    .efc-submit-secondary[disabled] {
        cursor: default;
        opacity: 0.6;
    }

/* Native HTML primary submit (alternative to FluentButton when we render a plain <button>) */
.efc-submit-primary {
    width: 100%;
    height: 48px;
    font-weight: 700;
    border-radius: 10px;
    background: #1f6feb;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    transition: background-color 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .efc-submit-primary:hover:not([disabled]) {
        background: #1857c0;
    }

    .efc-submit-primary[disabled] {
        cursor: default;
        opacity: 0.6;
    }

.efc-submit-danger {
    width: 100%;
    height: 48px;
    font-weight: 700;
    border-radius: 10px;
    background: #ff0000;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    transition: filter 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .efc-submit-danger:hover:not([disabled]) {
        filter: brightness(0.95);
    }

    .efc-submit-danger[disabled] {
        cursor: default;
        opacity: 0.6;
    }

.dlg-title {
    margin: 0 0 16px 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #4a4a4a;
    text-align: left;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .dlg-title svg {
        flex-shrink: 0;
        fill: #4a4a4a;
    }

.efc-submit-primary > fluent-progress-ring,
.efc-submit-secondary > fluent-progress-ring,
.efc-submit-danger > fluent-progress-ring {
    --accent-foreground-rest: #ffffff;
    --neutral-foreground-rest: #ffffff;
}

.dlg-panel {
    background: #f3f4f7;
    border: 1px solid #e6e9ef;
    border-radius: 16px;
    padding: 24px;
}

.dlg-section-title {
    color: #5b6c87;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    margin: 0 0 18px 0;
}

.dlg-text {
    color: #5b6c87;
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

    .dlg-text:last-child {
        margin-bottom: 0;
    }

.dlg-text-strong {
    color: var(--epal-text-strong, #1F1648);
    font-weight: 600;
}

.dlg-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 18px;
}

.dlg-steps {
    list-style: decimal;
    padding-left: 22px;
    margin: 0 0 18px 0;
    color: #5b6c87;
}

    .dlg-steps li {
        margin-bottom: 10px;
    }

        .dlg-steps li:last-child {
            margin-bottom: 0;
        }

    .dlg-steps a {
        color: var(--epal-text-link, #1f6feb);
        text-decoration: underline;
    }

/* QR code wrapper */
.dlg-qr-wrap {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

.dlg-qr-box {
    padding: 12px;
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
}

.profile-pic-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e6e9ef;
}

.profile-pic-preview-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.profile-pic-name {
    font-weight: 600;
    color: var(--epal-text-strong, #1F1648);
    font-size: 1rem;
}

.profile-pic-number {
    color: var(--epal-text-muted, #677cad);
    font-size: 0.85rem;
}

fluent-input-file.profile-pic-dropzone {
    display: block;
    width: 100%;
    min-height: 180px;
    border: 1.5px dashed #c5cee0;
    border-radius: 12px;
    background: #ffffff;
}

.profile-pic-dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    text-align: center;
}

.profile-pic-dropzone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #eef4ff;
    cursor: pointer;
}

    .profile-pic-dropzone-icon svg {
        fill: #0348f8 !important;
    }

.profile-pic-browse-link {
    color: #0348f8;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.profile-pic-hint {
    color: var(--epal-text-muted, #677cad);
    font-size: 0.8rem;
    font-style: italic;
}

.profile-pic-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    color: var(--epal-text-strong, #1F1648);
    font-size: 0.9rem;
}

.dlg-status-message {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f5ec;
    color: #1e7e34;
    border: 1px solid #b9e1c4;
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-weight: 600;
    font-size: 0.9rem;
}

    .dlg-status-message svg {
        flex-shrink: 0;
    }

.dlg-recovery-title {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--epal-text-strong, #1F1648);
}

.dlg-recovery-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.dlg-recovery-code {
    display: block;
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--epal-text-strong, #1F1648);
    text-align: center;
    letter-spacing: 0.5px;
}

.efc-field .text-danger,
.efc-field .validation-message {
    margin-top: 4px;
    font-size: 0.8rem;
    line-height: 1.2;
}

.efc-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 400;
    color: #0a2a55;
    margin: 4px 0;
    cursor: pointer;
}

    .efc-check > span {
        font-size: 0.8rem;
        font-weight: 400;
        color: #0a2a55;
    }

    .efc-check svg {
        fill: #0f35a5 !important;
    }

    .efc-check input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 18px;
        height: 18px;
        border: 2px solid #0f35a5;
        border-radius: 4px;
        background: #ffffff;
        position: relative;
        cursor: pointer;
        margin: 0;
    }

        .efc-check input[type="checkbox"]:checked {
            background: #0f35a5;
            border-color: #0f35a5;
        }

            .efc-check input[type="checkbox"]:checked::after {
                content: "";
                position: absolute;
                left: 4px;
                top: 0px;
                width: 5px;
                height: 10px;
                border: solid #ffffff;
                border-width: 0 2px 2px 0;
                transform: rotate(45deg);
            }