/* Shared by the server-rendered subscription workspaces. */
.provider-admin, .customer-portal {
    --red: var(--fastpro-red, #e30721);
    --ink: #26252b;
    --muted: #635f68;
    --line: #dedce0;
    --surface-soft: #f6f5f6;
    background: #f7f6f7;
    color: var(--ink);
    font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif;
    font-variant-numeric: tabular-nums;
}
:where(.provider-admin, .customer-portal) :is(h1, h2, h3) { letter-spacing: normal; }
.provider-admin .sidebar { padding: 17px 10px 10px; background: #232228; }
.provider-admin .sidebar > .brand { padding: 0 11px 13px; margin: 0 0 9px; border-bottom: 1px solid #454249; }
.provider-admin .sidebar nav { gap: 2px; margin-bottom: 0; }
.provider-admin .nav-item {
    color: #e0dce1; min-height: 34px; padding: 5px 11px; gap: 10px;
    line-height: 1.6; font-size: 12px; border-radius: 6px;
}
.provider-admin .nav-item:hover { background: #38363c; }
.provider-admin .nav-item.active { background: var(--red); color: #fff; }
.provider-admin .nav-icon { width: 18px; height: 18px; color: #bcb8c0; flex: none; }
.provider-admin .nav-item.active .nav-icon { color: inherit; }
.provider-admin .topbar { height: 50px; padding-inline: clamp(13px, 2vw, 28px); background: #fff; }
.provider-admin .workspace-name { font-weight: 700; font-size: 14px; }
.provider-admin .workspace { min-width: 0; }
.provider-admin main#content { max-width: 1560px; padding: 15px clamp(13px, 2vw, 28px) 12px; }
.provider-admin .page-heading, .customer-portal .page-heading { margin-bottom: 12px; gap: 10px; }
.provider-admin .page-heading h1, .customer-portal .page-heading h1 { font-size: clamp(21px, 1.8vw, 27px); line-height: 1.5; }
.provider-admin .page-heading p:not(.eyebrow), .customer-portal .page-heading p { margin-top: 1px; color: var(--muted); font-size: 12px; }
.provider-admin .page-footer { justify-content: flex-end; color: var(--muted); }
.provider-admin .page-footer, .customer-portal .page-footer { font-size: 10px; }
.provider-admin main:not([data-section=plans]), .customer-portal {
    --panel-pad: clamp(12px, 1.2vw, 18px);
}
.provider-admin main:not([data-section=plans]) .panel, .customer-portal .panel {
    padding: var(--panel-pad); margin: 0 0 12px; border-radius: 9px; box-shadow: 0 2px 5px #27232b04;
}
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .section-heading {
    gap: 10px; margin-bottom: 11px; align-items: center;
}
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .panel > :is(h2,h3) { margin-block-end: 7px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .table-wrap {
    margin-inline: 0; border: 1px solid var(--line); border-radius: 6px; max-width: 100%; scrollbar-width: thin;
}
:where(.provider-admin main:not([data-section=plans]), .customer-portal) table { font-size: 12px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) :is(td,th) { padding: 8px 12px; text-align: start; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) :is(th,td):is(:first-child,:last-child) { padding-inline: 12px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) th { background: #f3f2f3; color: #4d4952; font-size: 11px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) tbody tr:hover { background: #faf8f9; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .pagination { margin-top: 8px; padding-top: 7px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .field { margin-bottom: 9px; gap: 3px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .field > span { font-size: 12px; color: #4b4750; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) :is(.field input,.field select,.field textarea,.search-field input) {
    min-height: 36px; padding: 6px 9px; border: 1px solid #d2ced3; border-radius: 6px; line-height: 1.5;
}
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .field textarea { min-height: 58px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .button { border-radius: 6px; min-height: 35px; padding: 6px 12px; font-size: 12px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .button.small { min-height: 30px; padding: 4px 9px; font-size: 11px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .notice { margin: 0 0 10px; padding: 9px 12px; font-size: 12px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .empty { padding: 12px; border: 1px dashed #d5d1d6; border-radius: 6px; background: var(--surface-soft); color: var(--muted); text-align: start; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .data-grid { gap: 10px 14px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .panel > dl:not([class]) {
    display: grid; grid-template-columns: max-content minmax(0,1fr); align-items: baseline; gap: 6px 16px; margin: 0;
}
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .panel > dl:not([class]) dt { color: var(--muted); font-size: 12px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .panel > dl:not([class]) dd { font-weight: 650; margin: 0; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .filter-bar { gap: 8px; margin-bottom: 11px; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .filter-bar .field { margin: 0; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .admin-form[method=get]:has(> .field) {
    display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; margin-bottom: 9px;
}
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .admin-form[method=get] > .field { flex: 1 1 155px; margin: 0; }
:where(.provider-admin main:not([data-section=plans]), .customer-portal) .admin-form[method=get] > label:not(.field) { align-self: center; }
.provider-admin .metrics { grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr)); gap: 8px; margin-bottom: 10px; }
.provider-admin .metric { border-radius: 8px; padding: 10px 13px; }
.provider-admin .metric > span { color: var(--muted); font-size: 12px; }
.provider-admin .metric strong { font-size: 25px; margin: 3px 0 0; }
.provider-admin .status-pills { gap: 6px; margin: 0 0 12px; }
.provider-admin .status-pills a { padding: 3px 9px; color: var(--muted); }
.provider-admin .customer-hero { padding: 12px 15px; border-radius: 9px 9px 0 0; gap: 10px; }
.provider-admin .customer-hero .button { display: inline-flex; }
.provider-admin .customer-metrics { margin-bottom: 12px; padding: 12px 15px; border-radius: 0 0 9px 9px; }
.provider-admin .section-tabs { gap: 17px; margin-bottom: 11px; }
.provider-admin .section-tabs a { font-size: 12px; padding: 7px 0 8px; }
.provider-admin .detail-layout, .provider-admin .readiness-grid, .provider-admin .operator-grid { gap: 12px; }
.provider-admin .readiness-card, .provider-admin .operator-card { padding: 13px; border-radius: 8px; }
.provider-admin :is(.operator-card, .readiness-card) .card-heading { margin-bottom: 9px; }
.provider-admin main[data-section=billing] > form.admin-form { background: white; border: 1px solid var(--line); border-radius: 9px; padding: var(--panel-pad); }
.provider-admin :is(main[data-section=billing] > form.admin-form, .panel > form.admin-form):has(> .field):not([method=get]):not(.gateway-form),
.customer-portal :is(#support, #renewal) > .admin-form {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 8px 14px;
}
.provider-admin :is(main[data-section=billing] > form.admin-form, .panel > form.admin-form):has(> .field):not([method=get]):not(.gateway-form) > :not(.field, input),
.customer-portal :is(#support, #renewal) > .admin-form > button { grid-column: 1 / -1; justify-self: start; }
.provider-admin .admin-form > .field:has(textarea), .customer-portal #support .field:has(textarea) { grid-column: 1 / -1; }
.provider-admin main[data-section=billing] > form.admin-form .notice { justify-self: stretch; }
.provider-admin .gateway-form {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 6px 14px;
}
.provider-admin .gateway-form > .field-wide { grid-column: 1 / -1; }
.provider-admin .gateway-form .check { margin-block: 3px; }
.provider-admin .auth-card .field { margin-bottom: 11px; }
.provider-admin.auth-page { background: #f5f4f5; }
.auth-card.standalone, .customer-portal .standalone {
    width: min(440px, calc(100% - 28px)); max-width: none; padding: 24px; margin: clamp(20px, 7vh, 64px) auto;
    border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 4px 22px #29232c0c;
}
.provider-admin .auth-card.standalone { margin: 0 auto; }
.auth-logo, .customer-portal .standalone .portal-brand img { width: 150px; height: auto; margin-bottom: 15px; display: block; }
.auth-card.standalone h1, .customer-portal .standalone h1 { margin: 0 0 12px; font-size: 22px; }
.customer-portal .standalone .muted, .provider-admin .standalone .muted { margin-bottom: 12px; }
.provider-admin .auth-card .bootstrap { margin-top: 14px; padding-top: 12px; }
.customer-portal .topbar { min-height: 56px; padding: 6px max(16px, calc((100% - 1250px) / 2)); gap: 16px; background: white; }
.customer-portal .portal-brand { display: inline-flex; flex: none; }
.customer-portal .portal-brand img { max-width: 100%; height: auto; display: block; }
.customer-portal .topbar nav { gap: 2px; align-items: center; }
.customer-portal .topbar nav a { display: inline-flex; align-items: center; white-space: nowrap; color: #45414a; padding: 6px 10px; border-radius: 5px; }
.customer-portal .topbar nav a:hover, .customer-portal .topbar nav a[aria-current] { background: var(--fastpro-red-soft); color: #ae081c; }
.customer-content { max-width: 1282px; margin: 16px auto; padding: 0 16px; min-width: 0; }
.customer-portal .customer-columns, .customer-portal .payment-list {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px;
}
.customer-portal .subscription-summary {
    background: #2b292f; color: #fff; display: grid; grid-template-columns: repeat(3, minmax(0,1fr));
    border-radius: 6px; padding: 13px 16px; gap: 14px;
}
.customer-portal .subscription-summary > div + div { border-inline-start: 1px solid #555159; padding-inline-start: 14px; }
.customer-portal .subscription-summary small { color: #dbd7dc; }
.customer-portal .subscription-summary strong { font-size: 16px; }
.customer-list { list-style: none; padding: 0; }
.customer-list li { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 3px 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.customer-list li:last-child { border-bottom: 0; }
.customer-portal .customer-invoice { padding: 10px 13px; margin: 0 0 7px; border-radius: 6px; }
.customer-invoice summary:after { content: "⌄"; color: var(--muted); }
.customer-invoice summary strong { margin-inline-end: auto; }
.customer-portal .customer-thread { gap: 8px; margin-bottom: 14px; }
.customer-portal .customer-message { padding: 11px 14px; border-radius: 8px; }
.customer-portal .payment-card { display: grid; grid-template-columns: minmax(0,1fr); justify-items: start; gap: 8px; align-content: start; }
.customer-portal .payment-card > h2 { margin: 0; }
.customer-portal .payment-card [role=status] { background: var(--surface-soft); border-radius: 5px; padding: 5px 9px; }
.customer-portal :is(#renewal, #support) .admin-form { margin-block: 9px; }
.customer-portal .panel[id] { scroll-margin-top: 66px; }
.customer-content:has(> .payment-card) { max-width: 800px; }
.provider-admin main[data-section=approvals]:has(#approval) > .admin-form {
    background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: var(--panel-pad); margin-bottom: 10px;
}
@media (min-width:900px) {
    .provider-admin main[data-section=approvals]:has(#approval) {
        display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 0 12px;
    }
    .provider-admin main[data-section=approvals]:has(#approval) > * { grid-column: 1 / -1; }
    .provider-admin main[data-section=approvals]:has(#approval) > .button { justify-self: start; }
    .provider-admin main[data-section=approvals]:has(#approval) > .admin-form { grid-column: auto; }
    .provider-admin :is(#approval,#invoice) > dl:not([class]) {
        grid-template-columns: max-content minmax(0,1fr) max-content minmax(0,1fr); gap: 9px 14px;
    }
}
@media (max-width:980px) {
    .provider-admin .sidebar { visibility: hidden; }
    .provider-admin.nav-open .sidebar { visibility: visible; }
    .provider-admin .nav-item { min-height: 38px; }
}
@media (max-width:740px) {
    .provider-admin .metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .provider-admin .metric > span { font-size: 11px; white-space: normal; }
    .provider-admin .workspace-name { font-size: 12px; }
    .customer-portal .topbar { flex-wrap: wrap; gap: 4px 10px; padding: 6px 12px 4px; }
    .customer-portal .topbar nav { order: 3; width: 100%; overflow-x: auto; scrollbar-width: thin; }
    .customer-portal .topbar .portal-brand img { width: 128px; }
    .customer-portal .customer-content { margin-top: 10px; padding-inline: 10px; }
    .customer-portal .panel[id] { scroll-margin-top: 95px; }
}
@media (max-width:540px) {
    .provider-admin .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .provider-admin .gateway-form { grid-template-columns: minmax(0,1fr); }
    .customer-portal .customer-columns, .customer-portal .payment-list,
    .provider-admin :is(main[data-section=billing] > form.admin-form, .panel > form.admin-form):has(> .field):not([method=get]):not(.gateway-form),
    .customer-portal :is(#support, #renewal) > .admin-form { grid-template-columns: minmax(0,1fr); }
    .customer-portal .subscription-summary { grid-template-columns: minmax(0,1fr); gap: 6px; padding: 12px; }
    .customer-portal .subscription-summary > div { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
    .customer-portal .subscription-summary > div + div { border: 0; padding: 0; }
    .customer-portal .subscription-summary strong { font-size: 13px; }
    .customer-portal .customer-invoice summary { flex-direction: row; align-items: center; flex-wrap: wrap; }
    .provider-admin .auth-card.standalone { padding: 18px; }
}

.provider-admin .sidebar nav { gap: 3px; }
.nav-group { border-top: 1px solid #45434b; padding-top: 3px; }
.nav-group summary { padding: 7px 11px; color: #d8d4da; cursor: pointer; font-size: 12px; font-weight: 650; }
.nav-group[open] summary { color: #fff; }
.nav-group > div { padding-inline-start: 6px; }
.provider-admin .nav-group .nav-item { border-radius: 5px; }
.provider-admin .empty, .customer-portal .empty { background: transparent; padding: 5px 0; border: 0; }
.provider-admin .profile-commands, .contract-actions, .contract-line, .register-counts {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px;
}
.provider-admin .profile-commands { justify-content: flex-end; }
.register-counts { gap: 4px 9px; margin-bottom: 9px; }
.register-counts a, .register-counts summary {
    display: inline-flex; gap: 6px; align-items: center; padding: 4px 8px; color: var(--muted);
    font-size: 12px; cursor: pointer; border-radius: 4px;
}
.register-counts a[aria-current] { color: #aa061c; background: #fff0f2; font-weight: 700; }
.register-counts b { color: var(--ink); }
.register-counts summary { display: list-item; list-style-position: inside; }
.register-counts details { position: relative; }
.register-counts details > div {
    position: absolute; inset-inline-start: 0; z-index: 3; width: max-content; max-width: min(88vw,330px);
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); padding: 5px;
    border: 1px solid var(--line); background: white; box-shadow: 0 4px 15px #25232b16; border-radius: 6px;
}
.register-counts a:hover { background: var(--surface-soft); }
.customer-register .match-count { margin-top: 6px; }
.profile-workspace { border: 1px solid var(--line); border-radius: 8px; background: white; min-width: 0; }
.profile-sections { display: flex; align-items: center; overflow-x: auto; gap: 3px; padding: 4px 6px; border-bottom: 1px solid var(--line); scrollbar-width: thin; }
.profile-sections a { padding: 6px 10px; white-space: nowrap; color: var(--muted); font-size: 12px; font-weight: 650; border-radius: 5px; }
.profile-pane .table-wrap { max-width: 100%; overflow-x: auto; }
#customer-subscription .table-wrap table { min-width: 465px; }
#customer-subscription .table-wrap :is(th,td):nth-child(2),
#customer-subscription .table-wrap :is(th,td):nth-child(3) { white-space: nowrap; }
.profile-sections a[aria-selected=true] { background: #fff0f2; color: #a5071c; }
.profile-pane { padding: var(--panel-pad); min-width: 0; }
.profile-pane[hidden] { display: none; }
.profile-pane .editor { margin-top: 7px; }
.profile-pane .editor > summary, .portal-compose > summary, .portal-records summary, .billing-issue summary { cursor: pointer; font-weight: 650; font-size: 13px; }
.profile-pane .contract-actions { margin-bottom: 9px; }
.contract-line { padding-block: 5px 9px; color: var(--muted); font-size: 12px; }
.contract-line strong { color: var(--ink); font-size: 15px; }
.provider-admin .profile-pane > .panel { margin-bottom: 7px; box-shadow: none; }
.provider-admin .profile-pane .editor { padding: 7px 10px; }
.provider-admin .billing-issue { padding-block: 9px; }
.billing-issue[open] summary, .portal-compose[open] summary { margin-block-end: 8px; }
.portal-account { display: flex; align-items: center; justify-content: space-between; gap: 7px 16px; flex-wrap: wrap; margin-block-end: 12px; }
.portal-account h1 { font-size: clamp(20px,2vw,26px); line-height: 1.4; }
.portal-account bdi, .coverage-end { color: var(--muted); font-size: 12px; }
.coverage-end { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.coverage-end strong { color: var(--ink); }
.portal-daily { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,1fr); align-items: start; gap: 12px; }
.portal-daily > div { min-width: 0; }
.portal-records { background: white; border: 1px solid var(--line); border-radius: 8px; padding: 0 var(--panel-pad); }
.portal-records > details + details { border-top: 1px solid var(--line); }
.portal-records > details > summary, .portal-compose > summary { padding: 7px 0; }
.portal-records summary b { padding-inline: 4px; font-weight: 550; color: var(--muted); }
.portal-records > details[open] { padding-bottom: 9px; }
.portal-records .table-wrap { margin-block: 4px; }
.portal-compose { margin-top: 6px; }
.portal-compose > summary { color: #ad071c; }
.customer-portal .portal-daily .admin-form > .field { margin-bottom: 2px; }
.customer-portal .portal-daily .customer-invoice:last-child { margin-bottom: 0; }
@media (max-width:790px) {
    .portal-daily { display: block; }
    .register-counts details > div { inset-inline-start: auto; inset-inline-end: 0; }
    .provider-admin .profile-commands { justify-content: start; }
    .provider-admin .page-heading:has(.profile-commands) { flex-wrap: wrap; }
}

.system-status { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; gap: 5px 16px; }
.system-status li { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.system-status + .contract-line { border-top: 1px solid var(--line); margin-top: 8px; padding-bottom: 0; }
.provider-admin .compact-disclosure { padding-block: 9px; }
.compact-disclosure > summary { cursor: pointer; font-weight: 650; }
.compact-disclosure[open] > summary { margin-bottom: 9px; }

.commerce-row,.commerce-actions{display:flex;flex-wrap:wrap;align-items:end;gap:.75rem;padding:.8rem 0}
.commerce-row{border-block-end:1px solid #dce4ed}
.commerce-row label{display:grid;gap:.25rem}
.commerce-row input,.commerce-row select{min-height:2.35rem;padding-inline:.6rem;border:1px solid #b9c9da;border-radius:.4rem}
.commerce-group{padding:.55rem .75rem;border-block-end:1px solid #dce4ed}
.commerce-group summary,.customer-content details summary{cursor:pointer}
.commerce-group ul,.customer-content .payment-card details ul{max-height:18rem;overflow:auto}
.commerce-group bdi{font-size:.83em;color:#405970;overflow-wrap:anywhere}
@media(max-width:640px){.commerce-row>label{flex:1 1 10rem}.commerce-row input,.commerce-row select{max-width:100%}}

