body.customer-portal { margin: 0; min-height: 100vh; background: #eef3f8; color: #142946; font-family: "Public Sans", system-ui, sans-serif; }
.portal-frame { display: grid; min-height: 100vh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "header" "content"; }
.portal-frame--signed { grid-template-columns: 14rem minmax(0, 1fr); grid-template-areas: "header header" "nav content"; }
.portal-header { grid-area: header; display: flex; justify-content: space-between; align-items: center; padding: .8rem clamp(1rem, 3vw, 2rem); border-bottom: 1px solid #e0e8f2; background: #fff; gap: 1rem; }
.portal-brand { display: flex; align-items: center; gap: .8rem; font-weight: 600; line-height: 1.2; color: #122b49; text-decoration: none; }
.portal-brand img { height: 2.35rem; width: auto; max-width: 8rem; object-fit: contain; }
.portal-brand small { display: block; color: #5c7089; font-weight: 500; margin-top: .2rem; }
.portal-branch { color: #506783; font-size: .875rem; }
.portal-nav { grid-area: nav; display: flex; flex-direction: column; gap: .4rem; padding: 1rem .7rem; background: #102944; }
.portal-nav a { display: flex; align-items: center; gap: .7rem; min-height: 2.75rem; padding: .55rem .75rem; border-radius: .65rem; text-decoration: none; color: #e4eefb; font-weight: 550; }
.portal-nav a:hover, .portal-nav [aria-current] { background: #23466b; color: #fff; }
.customer-portal .portal-content { grid-area: content; display: block; width: min(100%, 88rem); min-width: 0; margin-inline: auto; padding: clamp(1rem, 3vw, 2.25rem); }
.portal-content > .alert { max-width: 100%; overflow-wrap: anywhere; }
.portal-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.25rem; }
.portal-card { background: #fff; border: 1px solid #dce6f1; border-radius: .9rem; padding: clamp(1rem, 2vw, 1.5rem); min-width: 0; margin-bottom: 1rem; box-shadow: 0 8px 24px rgb(20 46 80 / 4%); overflow-wrap: anywhere; }
.portal-card h2 { font-size: 1.12rem; color: #122b49; }
.portal-card h2 i { color: #1955b6; margin-right: .35rem; }
.portal-access { max-width: 30rem; margin: clamp(1rem, 7vh, 5rem) auto; }
.portal-access a { display: block; margin-top: .8rem; }
.portal-access-icon { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: .85rem; color: #2456b4; background: #eaf1fe; font-size: 1.4rem; margin-bottom: 1rem; }
.portal-card form { display: grid; justify-items: start; gap: .55rem; }
.portal-card form + form { margin-top: 1.2rem; }
.portal-card input { max-width: 100%; width: 100%; min-height: 2.65rem; padding: .5rem .7rem; border: 1px solid #8b9db4; border-radius: .55rem; }
.portal-button, .portal-card form button, .portal-secondary { min-height: 2.65rem; display: inline-flex; align-items: center; gap: .45rem; padding: .6rem .9rem; border: 1px solid #1553bc; border-radius: .6rem; background: #1553bc; color: #fff; font-weight: 600; text-decoration: none; }
.portal-button:hover { color: #fff; background: #103d8a; }
.portal-row, .portal-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .45rem 1rem; padding: .65rem .25rem; }
.portal-row + .portal-row { border-top: 1px solid #e2eaf3; }
.portal-row span { color: #526883; }
.portal-row:hover { background: #f2f7fd; }
.portal-notice, .portal-alert { border-radius: .6rem; padding: .75rem 1rem; }
.portal-notice { background: #e6f6ed; color: #164d30; }
.portal-alert { background: #fff0ee; color: #86291d; padding-left: 2rem; }
.portal-page-heading { margin-bottom: 1rem; }
.portal-page-heading h1 { margin: .45rem 0; color: #142946; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.portal-page-heading p { color: #506783; margin-bottom: 0; }
.portal-content .request-portal { min-height: auto; padding: 0; background: transparent; }
.portal-content .request-portal__container { max-width: none; padding-inline: 0; }
.portal-content .professional-request-page { padding-inline: 0; }
.portal-review { width: min(34rem, calc(100% - 2rem)); max-height: 85vh; padding: 1.4rem; border: 1px solid #dce6f1; border-radius: .9rem; color: #142946; }
.portal-review::backdrop { background: rgb(12 32 55 / 55%); }
.portal-review dl { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .5rem 1rem; margin-block: 1rem; }
.portal-review dd { margin: 0; overflow-wrap: anywhere; }
.portal-review__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .6rem; }
@media (max-width: 900px) {
    .portal-frame--signed { grid-template-columns: minmax(0, 1fr); grid-template-areas: "header" "content"; padding-bottom: calc(4rem + env(safe-area-inset-bottom)); }
    .portal-nav { position: fixed; inset: auto 0 0; z-index: 40; flex-direction: row; justify-content: space-around; padding: .3rem .25rem calc(.3rem + env(safe-area-inset-bottom)); }
    .portal-nav a { flex: 1; flex-direction: column; justify-content: center; gap: .1rem; padding: .35rem .15rem; font-size: .72rem; text-align: center; }
    .portal-nav i { font-size: 1.1rem; }
}

/* Portal shell and account dashboard */
body.customer-portal {
    --portal-ink: #102844;
    --portal-muted: #526983;
    --portal-blue: #124ec8;
    background: #f1f5fa;
    color: var(--portal-ink);
}
.portal-frame--signed { grid-template-columns: 15rem minmax(0, 1fr); }
.portal-header { min-height: 4.65rem; padding-inline: clamp(1rem, 3vw, 2rem); }
.portal-identity { display: flex; align-items: center; gap: .65rem; color: var(--portal-ink); text-decoration: none; min-width: 0; }
.portal-identity span { max-width: 17rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
.portal-identity i { background: #e9f1ff; color: var(--portal-blue); padding: .4rem .58rem; border-radius: 50%; font-size: 1.1rem; }
.portal-nav { background: #102844; padding: 1.5rem .85rem; }
.portal-nav a { border: 1px solid transparent; }
.portal-nav [aria-current] { border-color: #345c8a; background: #23466e; }
.customer-portal .portal-content { width: min(100%, 81rem); padding-top: clamp(1rem, 3vw, 2rem); }
.portal-content > .alert { border-radius: .8rem; margin-top: 0 !important; }
.portal-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .8rem; margin-bottom: 1rem; }
.portal-stat { display: flex; gap: .75rem; align-items: center; min-width: 0; border: 1px solid #e1e9f3; background: #fff; border-radius: .9rem; padding: .9rem; color: var(--portal-muted); text-decoration: none; font-size: .8rem; }
.portal-stat > i, .portal-row-icon { display: grid; place-items: center; flex: 0 0 2.6rem; height: 2.6rem; color: var(--portal-blue); background: #eaf2ff; border-radius: .72rem; font-size: 1.13rem; }
.portal-stat strong { display: block; color: var(--portal-ink); font-size: 1.45rem; line-height: 1.15; }
.portal-stat:hover, .portal-row:hover { border-color: #a0b9df; background: #f5f9ff; }
.portal-card { border-color: #e0e8f2; border-radius: 1rem; }
.portal-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: .65rem; margin-bottom: .7rem; }
.portal-card-head h2 { font-weight: 600; letter-spacing: -.018em; margin: 0; }
.portal-card-head a { flex: 0 0 auto; font-weight: 600; font-size: .82rem; text-decoration: none; }
.portal-row { padding: .65rem; color: var(--portal-ink); text-decoration: none; border-radius: .6rem; min-height: 3.25rem; }
.portal-row strong i { margin-right: .35rem; color: var(--portal-blue); }
.portal-request-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: .65rem; }
.portal-request-row .portal-row-title { color: var(--portal-ink); }
.portal-row-title small { display: block; color: var(--portal-muted); }
.portal-request-row time { color: var(--portal-muted); font-size: .78rem; }
.portal-empty { padding: 1.6rem .65rem; text-align: center; color: var(--portal-muted); }
.portal-empty i { display: block; margin-bottom: .45rem; font-size: 1.8rem; color: #3772cd; }
.portal-empty strong { color: var(--portal-ink); }
.portal-empty p { margin: .3rem 0 0; }
.portal-card .portal-filters { grid-template-columns: minmax(0, 1fr) minmax(8rem, .38fr) auto; align-items: end; gap: .65rem; padding-bottom: .9rem; border-bottom: 1px solid #e3ebf3; margin-bottom: .65rem; }
.portal-filters > div { width: 100%; }
.portal-filters label, .portal-profile label { display: block; font-weight: 550; font-size: .85rem; margin-bottom: .2rem; }
.portal-card .portal-filters select { width: 100%; min-height: 2.65rem; padding: .45rem .55rem; border: 1px solid #8b9db4; border-radius: .55rem; background: #fff; }
.portal-profile { max-width: 40rem; }
.portal-profile input { margin-bottom: .45rem; }
.portal-profile input[readonly] { background: #f3f6fa; }
.customer-portal :focus-visible { outline: 2px solid #3178e3; outline-offset: 3px; }
@media (max-width: 900px) {
    .portal-frame--signed { grid-template-columns: minmax(0, 1fr); }
    .portal-nav { padding: .35rem .35rem calc(.35rem + env(safe-area-inset-bottom)); }
    .portal-header { min-height: 4rem; }
    .portal-identity span { display: none; }
}
@media (max-width: 650px) {
    .portal-stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
    .portal-stat { padding: .65rem; gap: .45rem; }
    .portal-stat > i { flex-basis: 2rem; height: 2rem; }
    .portal-card .portal-filters { grid-template-columns: minmax(0,1fr) auto; }
    .portal-filters > div:first-child { grid-column: 1 / -1; }
    .portal-card-head h2 { font-size: 1rem; }
}

.portal-content .request-card, .portal-content .professional-form-section { border-radius: 1rem; border-color: #dce6f1; }
.portal-content .request-progress { margin-bottom: 1rem; }
@media (max-width: 650px) {
    .portal-request-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .portal-request-row time { grid-column: 2; grid-row: 2; }
    .portal-request-row > i { grid-column: 3; grid-row: 1; }
}

/* Tracking-first dashboard */
.portal-dashboard-heading { margin-top: .25rem; margin-bottom: 1.15rem; }
.portal-dashboard-heading h1 { font-size: clamp(1.9rem, 3vw, 3rem); font-weight: 600; letter-spacing: -.035em; }
.portal-tracking { margin-bottom: 1rem; }
.portal-tracking h2 { margin: 0 0 .3rem; }
.portal-tracking p { margin-bottom: 1rem; }
.portal-tracking form { gap: .55rem; }
.portal-tracking input { min-width: 0; padding: .55rem .75rem; border: 1px solid #b7c6d9; border-radius: .6rem; color: #102844; background: #fff; }
.portal-stat--success > i { color: #166446; background: #e5f6ed; }
.portal-request-row .portal-state { border-radius: 99rem; background: #eaf2ff; color: #16468d; padding: .3rem .55rem; font-size: .75rem; font-weight: 550; }
.portal-request-row .portal-state--success { background: #e5f6ed; color: #166446; }
.portal-help { display: flex; align-items: center; gap: .8rem; background: #eaf1fa; }
.portal-help h2, .portal-help p { margin: 0; }
.portal-help p { color: #526983; }
.portal-help a { margin-left: auto; }
.portal-card .portal-filters { grid-template-columns: minmax(0, 1fr) minmax(8rem,.4fr) minmax(8rem,.45fr) auto; }
@media (max-width: 650px) {
    .portal-dashboard-heading .portal-button { width: 100%; justify-content: center; }
    .portal-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
    .portal-stat { flex-direction: column; align-items: flex-start; }
    .portal-stat > i { flex-basis: auto; width: 2rem; }
    .portal-request-row .portal-state { grid-column: 2; grid-row: 2; justify-self: start; }
    .portal-card .portal-filters { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
    .portal-help { flex-wrap: wrap; }
}

/* Customer workspace */
body.customer-portal {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: #f5f7fa;
}
.customer-portal .portal-content { font-size: .9375rem; }
.portal-frame--signed { grid-template-columns: 13.75rem minmax(0, 1fr); }
.portal-header { min-height: 4.15rem; }
.portal-nav { background: #fff; border-right: 1px solid #e0e8f2; }
.portal-nav a { color: #344d69; font-weight: 500; }
.portal-nav a:hover, .portal-nav [aria-current] {
    color: #153e78;
    background: #edf3fc;
    border-color: transparent;
}
.portal-nav [aria-current] { font-weight: 600; }
.portal-nav a i { width: 1.15rem; text-align: center; }
.portal-content > .alert { padding: .65rem .85rem; font-size: .85rem; }
.portal-content > .alert strong { font-weight: 600; }
.portal-dashboard-heading h1 {
    font-size: clamp(1.65rem, 2.4vw, 2.25rem);
    font-weight: 600;
    letter-spacing: -.025em;
}
.portal-page-heading h1, .portal-content .portal-access h1, .portal-content .portal-card h1 { font-weight: 600; }
.portal-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(17rem, 1fr);
    align-items: start;
    gap: 1rem;
}
.portal-card { box-shadow: none; border-radius: .75rem; }
.portal-stat { border-radius: .75rem; }
.portal-stat strong { font-weight: 600; }
.portal-card-head a, .portal-row-title strong, .portal-empty strong { font-weight: 600; }
.portal-request-row .portal-row-icon { width: 2.1rem; height: 2.1rem; border-radius: .5rem; }
.portal-row + .portal-row { border-radius: 0; }
.portal-tracking {
    min-height: 0;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e0e8f2;
    border-radius: .75rem;
    color: var(--portal-ink);
}
.portal-tracking h2 {
    color: var(--portal-ink);
    font-size: 1.06rem;
    font-weight: 600;
}
.portal-tracking h2 i { color: var(--portal-blue); margin-right: .35rem; }
.portal-tracking p { color: var(--portal-muted); font-size: .875rem; }
.portal-tracking form { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.portal-tracking input { border-color: #b7c6d9; }
.portal-tracking .portal-button { background: #eaf1fc; color: #153e78; border-color: #dce7f8; }
.portal-tracking .portal-button:hover { background: #dfeafb; }
.portal-help { background: #fff; flex-wrap: wrap; }
.portal-help h2 { font-weight: 600; font-size: 1rem; }
.portal-help p { font-size: .85rem; }
@media (max-width: 1050px) {
    .portal-dashboard-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 900px) {
    .portal-frame--signed { grid-template-columns: minmax(0, 1fr); }
    .portal-nav { border-right: 0; border-top: 1px solid #e0e8f2; }
}

@media (max-width: 380px) {
    .portal-tracking form { grid-template-columns: minmax(0, 1fr); }
    .portal-tracking .portal-button { justify-content: center; }
}

/* Mi PakLilmar */
.portal-feature h2, .portal-detail-heading h1 { font-size: clamp(1.35rem, 2.3vw, 1.85rem); font-weight: 600; letter-spacing: -.025em; }
.portal-muted, .portal-movement, .portal-row-date { color: #52657d; }
.portal-movement { margin: .65rem 0 0; font-size: .85rem; }
.portal-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1rem; margin-top: 1rem; }
.portal-copy { color: #174d9b; background: transparent; border: 0; padding: .45rem 0; text-align: left; font-size: .84rem; }
.portal-copy i, .portal-package i { margin-right: .3rem; }
.portal-card .portal-copy[hidden] { display: none; }
.portal-status { display: inline-block; background: #eef2f6; color: #34475d; border-radius: .4rem; padding: .32rem .55rem; font-size: .76rem; font-weight: 550; }
.portal-request-row .portal-status { background: #eef2f6; color: #34475d; }
.portal-status--in_transit, .portal-request-row .portal-status--in_transit { background: #eaf2ff; color: #16468d; }
.portal-status--destination, .portal-request-row .portal-status--destination { background: #e4f2f6; color: #205364; }
.portal-status--delivered, .portal-request-row .portal-status--delivered { background: #e5f4ec; color: #205b3c; }
.portal-status--incident, .portal-request-row .portal-status--incident { background: #fff1dc; color: #78400a; }
.portal-service-grid, .portal-shipment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.portal-service-grid a { display: flex; align-items: center; gap: .65rem; border: 1px solid #dce6f1; border-radius: .6rem; padding: .55rem .7rem; text-decoration: none; }
.portal-service-grid a:hover { background: #f1f6fd; }
.portal-service-grid a > span { flex: 1; }
.portal-request-row { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
.portal-row-date { font-size: .78rem; white-space: nowrap; }
.portal-back { display: inline-block; margin-bottom: .85rem; }
.portal-detail h2 { font-size: 1.25rem; font-weight: 600; margin: 1.35rem 0 .8rem; }
.portal-shipment { scroll-margin-top: 1rem; }
.portal-shipment h3, .portal-shipment h4 { margin: 0; font-size: 1rem; font-weight: 600; }
.portal-shipment-grid { margin-top: 1rem; gap: 1.4rem; }
.portal-shipment h4 { margin-bottom: .45rem; }
.portal-timeline { list-style: none; margin: 0; padding: 0 0 0 .7rem; border-left: 2px solid #dce8f8; }
.portal-timeline li { position: relative; padding: 0 0 .65rem .45rem; }
.portal-timeline li::before { content: ''; position: absolute; top: .3rem; left: -1rem; width: .46rem; height: .46rem; border-radius: 50%; background: #1854b5; }
.portal-timeline time { display: block; font-size: .8rem; color: #52657d; }
.portal-package { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .65rem; padding: .45rem 0; border-bottom: 1px solid #e0e8f2; }

@media (max-width: 650px) {
    .portal-frame--signed { grid-template-areas: "header" "content"; grid-template-rows: auto 1fr; }
    .portal-frame--signed .portal-content { padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)); }
    .customer-portal .portal-nav { position: fixed; inset: auto 0 0; z-index: 20; display: flex; flex-direction: row; justify-content: space-around; gap: .15rem; padding: .25rem .5rem calc(.25rem + env(safe-area-inset-bottom, 0px)); }
    .customer-portal .portal-nav a { flex: 1; flex-direction: column; justify-content: center; gap: .1rem; font-size: .75rem; padding: .35rem .15rem; }
    .customer-portal .portal-nav a span { display: inline; }
    .portal-service-grid, .portal-shipment-grid { grid-template-columns: minmax(0, 1fr); }
    .portal-request-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .portal-request-row .portal-row-date { grid-column: 2; }
    .portal-request-row .portal-state { grid-column: 3; grid-row: 1; justify-self: end; }
    .portal-request-row > .bi-chevron-right { display: none; }
}

/* Shared PakLilmar surfaces and client workflows. */
body.customer-portal { background: var(--pak-surface-soft, #f8fafc); }
.customer-portal .portal-content { width: min(100%, 84rem); }
.customer-portal .portal-card,
.customer-portal .portal-tracking { border-radius: var(--pak-radius, 14px); border-color: var(--pak-border, #e3eaf2); }
.customer-portal .portal-button,
.customer-portal .portal-card form button[type="submit"] { border-radius: var(--pak-radius-sm, 10px); }
.customer-portal .portal-button { background: var(--portal-brand, #1553bc); border-color: var(--portal-brand, #1553bc); }
.customer-portal .portal-button:hover { filter: brightness(.91); }
.customer-portal .portal-tracking .portal-button { background: #eaf1fc; border-color: #dce7f8; }
.customer-portal .portal-page-heading h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
.portal-overview { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; }
.portal-overview .pak-overview-kpi { min-height: 0; align-items: center; flex: 1 1 11rem; padding: .55rem .7rem; }
.portal-overview .pak-overview-icon { height: 2.1rem; flex-basis: 2.1rem; font-size: 1rem; }
.portal-summary-label { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 550; }
.portal-overview .portal-summary-label strong { font-size: 1rem; }
.portal-feature { border-top: 3px solid var(--portal-brand, #1553bc); }
.portal-feature--compact h2 { font-size: 1.15rem; }
.portal-results { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.portal-card .portal-filters { grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(7.5rem, .72fr)) auto; }
.portal-summary-details { display: flex; flex-wrap: wrap; gap: .8rem 2rem; margin: 1rem 0 0; }
.portal-summary-details dt { font-size: .78rem; color: #52657d; font-weight: 500; }
.portal-summary-details dd { margin: .2rem 0 0; font-weight: 550; }
.portal-pickup { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .55rem 0; }
.portal-pickup + .portal-pickup { border-top: 1px solid var(--pak-border, #e3eaf2); }
.portal-account-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; gap: 1rem; max-width: 64rem; }
.portal-account-grid .portal-profile { max-width: none; }
.customer-portal .portal-account-access form { display: block; }
.customer-portal .portal-account-access form .portal-secondary { background: #fff; color: #153e78; border-color: #c7d6ea; }
.portal-services { scroll-margin-top: 1rem; }

@media (max-width: 1050px) {
    .portal-card .portal-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .portal-filters > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
    .portal-account-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .portal-overview .pak-overview-kpi { flex-basis: 9rem; }
}

.portal-profile .form-select, .portal-recipient-picker .form-select { margin-bottom: .7rem; }
.portal-recipient-picker label { display: block; margin-bottom: .35rem; font-weight: 600; }
.portal-recipient-picker { max-width: 48rem; }

/* Inicio de Mi PakLilmar */
.portal-home-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(15rem, 1fr);
    grid-template-areas: "pending pending" "main aside";
    align-items: start;
    column-gap: 1rem;
}
.portal-home-grid > * { min-width: 0; }
.portal-home-main { grid-area: main; }
.portal-home-aside { grid-area: aside; }
.portal-home-pending {
    grid-area: pending;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    border: 1px solid #efdfb9;
    border-radius: .75rem;
    background: #fff6e3;
    margin-bottom: 1rem;
    padding: .75rem 1rem;
}
.portal-home-pending h2 {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-height: 2.65rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}
.portal-home-pending h2 i { color: #875609; }
.portal-home-pending ul { flex: 1 1 16rem; list-style: none; padding: 0; margin: 0; }
.portal-home-pending li { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem .75rem; }
.portal-home-pending li + li { margin-top: .45rem; }
.portal-home-feature { padding: 0; }
.portal-home-feature h2 {
    background: #eaf2fc;
    border-radius: .75rem .75rem 0 0;
    margin: 0;
    padding: .7rem 1rem;
    font-weight: 600;
}
.portal-home-feature-body, .portal-home-repeat {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .55rem .8rem;
}
.portal-home-feature-body { padding: .85rem 1rem; }
.portal-home-feature-links { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .65rem; margin-left: auto; }
.portal-home-feature-links > a { font-weight: 600; }
.portal-home-repeat { justify-content: space-between; }
.portal-home-repeat p { margin: 0; }
.portal-home-history { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .2rem .65rem; font-size: .85rem; }
.portal-home-activity .portal-card-head, .portal-home-services .portal-card-head { flex-wrap: wrap; }
.portal-home-activity .portal-request-row > .portal-row-title { min-width: 0; }

.portal-home-service-list > a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    padding: .45rem 0;
    color: var(--portal-ink);
    text-decoration: none;
}
.portal-home-service-list > a + a { border-top: 1px solid #e2eaf3; }
.portal-home-service-list > a:hover { color: var(--portal-blue); }
.portal-home-service-list .portal-row-icon { width: 2.1rem; height: 2.1rem; border-radius: .5rem; }

@media (max-width: 1080px) {
    .portal-home-grid {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto;
        grid-template-areas: "pending" "main" "aside";
    }
    .portal-home-feature-links { margin-left: 0; }
}
@media (max-width: 480px) {
    .portal-home-activity .portal-request-row { grid-template-columns: auto minmax(0, 1fr); }
    .portal-home-activity .portal-request-row .portal-state { grid-column: 2; grid-row: auto; justify-self: start; }
}

.portal-home-activity .portal-request-row .portal-status--proposal_pending {
    background: #e5f4ec;
    color: #205b3c;
}
@media (min-width: 651px) {
    .portal-home-activity .portal-request-row {
        grid-template-columns: auto minmax(0, 1fr) auto auto;
    }
}

/* Cabecera y navegación de Mi PakLilmar */
.portal-frame--signed { grid-template-areas: "brand header" "nav content"; }
.portal-shell-brand {
    grid-area: brand;
    min-width: 0;
    padding: .8rem 1.2rem;
    background: #fff;
}
.portal-shell-brand span { min-width: 0; overflow-wrap: anywhere; }
.portal-shell-brand img { max-width: 3.5rem; }
.portal-frame--signed .portal-shell-brand { border-right: 1px solid #e0e8f2; border-bottom: 1px solid #e0e8f2; }
.portal-frame:not(.portal-frame--signed) > .portal-shell-brand {
    grid-area: header;
    border-bottom: 1px solid #e0e8f2;
}
.portal-header-search {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: min(100%, 33rem);
    min-width: 0;
    padding: .22rem .25rem .22rem .75rem;
    border: 1px solid #dce6f1;
    border-radius: .65rem;
    background: #f5f8fc;
    color: var(--portal-muted);
}
.portal-header-search:focus-within { border-color: var(--portal-blue); }
.portal-header-search input {
    flex: 1;
    min-width: 0;
    width: 100%;
    min-height: 2rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--portal-ink);
}
.portal-header-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 2.2rem;
    padding: .25rem .6rem;
    border: 0;
    border-radius: .45rem;
    background: #e8eff9;
    color: #153e78;
    font-size: .85rem;
    font-weight: 600;
}
.portal-header-search button:hover { background: #dfe9f8; }
.portal-home-activity .portal-request-row { padding-block: .65rem; }
.portal-home-activity .portal-row-title small { line-height: 1.45; }
.portal-home-activity .portal-row-title time { font-size: inherit; }

@media (max-width: 900px) {
    .portal-frame--signed {
        grid-template-areas: "brand" "header" "content";
        grid-template-rows: auto auto 1fr;
    }
    .portal-frame--signed .portal-shell-brand { border-right: 0; }
    .portal-frame--signed .portal-header { padding: .5rem 1rem; gap: .65rem; min-height: 0; }
}
@media (max-width: 480px) {
    .portal-header-search button span { display: none; }
    .portal-home-activity .portal-request-row { position: relative; row-gap: .3rem; }
}

/* Menú de cuenta y detalles de solicitudes */
.portal-frame--signed {
    grid-template-columns: 13.75rem minmax(0, 1fr) auto;
    grid-template-areas: "brand header account" "nav content content";
}
.portal-frame--signed .portal-header { padding-right: .6rem; }
.portal-account-menu {
    grid-area: account;
    position: relative;
    display: flex;
    align-items: center;
    padding: .5rem 1rem .5rem .35rem;
    background: #fff;
    border-bottom: 1px solid #e0e8f2;
    z-index: 15;
}
.portal-account-menu summary {
    cursor: pointer;
    list-style: none;
    padding: .25rem .45rem;
    border-radius: .65rem;
    background: #f5f8fc;
}
.portal-account-menu summary::-webkit-details-marker { display: none; }
.portal-account-menu summary > .bi-chevron-down {
    padding: 0;
    background: transparent;
    color: var(--portal-muted);
    font-size: .75rem;
}
.portal-account-dropdown {
    position: absolute;
    top: calc(100% - .15rem);
    right: .75rem;
    width: min(19rem, calc(100vw - 1.5rem));
    padding: .5rem;
    border: 1px solid #e0e8f2;
    border-radius: .8rem;
    background: #fff;
    box-shadow: 0 12px 30px rgb(16 40 68 / 13%);
}
.portal-account-caption {
    padding: .65rem .75rem;
    border-radius: .5rem;
    background: #f3f7fc;
    overflow-wrap: anywhere;
}
.portal-account-caption small { display: block; color: var(--portal-muted); }
.portal-account-dropdown > a, .portal-account-dropdown button {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    padding: .65rem .75rem;
    border: 0;
    border-radius: .5rem;
    background: transparent;
    color: var(--portal-ink);
    text-align: left;
    text-decoration: none;
}
.portal-account-dropdown > a:hover, .portal-account-dropdown button:hover { background: #edf3fc; }
.portal-account-dropdown .portal-account-danger, .portal-recipient-actions .portal-account-danger { color: #9c261c; }
.portal-detail-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
    align-items: start;
}
.portal-request-summary { padding: 1rem 1.25rem; }
.portal-request-summary .portal-summary-details { margin-block: .65rem; }
.portal-row-title .portal-row-proposal { color: #16468d; }
.portal-recipient-entry { padding-block: .75rem; }
.portal-recipient-entry + .portal-recipient-entry { border-top: 1px solid #e0e8f2; }
.portal-recipient-entry p { margin: .25rem 0 .5rem; }
.portal-recipient-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .8rem; }
.portal-card .portal-recipient-actions form { display: block; margin: 0; }
.portal-card .portal-recipient-actions button[type="submit"] {
    padding: .35rem 0;
    min-height: 2rem;
    border: 0;
    background: transparent;
    font-weight: 500;
}
.portal-card .portal-recipient-form { justify-items: stretch; }
.portal-recipient-form > button { justify-self: start; }
@media (max-width: 900px) {
    .portal-frame--signed {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas: "brand account" "header header" "content content";
    }
    .portal-frame--signed .portal-header { padding-right: 1rem; }
    .portal-header-search { width: 100%; }
    .portal-account-menu { padding: .45rem .8rem .45rem .25rem; }
}
@media (max-width: 650px) {
    .portal-detail-columns { grid-template-columns: minmax(0, 1fr); }
    .portal-account-menu summary { gap: .3rem; }
}

/* Asistente de solicitud */
.portal-assistant-dialog {
    width: min(60rem, calc(100% - 2rem));
    height: min(52rem, calc(100dvh - 2rem));
    max-width: none;
    max-height: none;
    padding: 0;
    border: 1px solid #dce6f1;
    border-radius: 1rem;
    color: var(--portal-ink);
    background: #fff;
    overflow: hidden;
}
.portal-assistant-dialog[open] { display: flex; flex-direction: column; }
.portal-assistant-dialog::backdrop { background: rgb(16 40 68 / 52%); }
.portal-assistant-dialog > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .8rem 1.2rem;
    border-bottom: 1px solid #dce6f1;
}
.portal-assistant-dialog header span { color: var(--portal-muted); font-size: .82rem; }
.portal-assistant-dialog header h2 { margin: .15rem 0 0; font-size: 1.18rem; font-weight: 600; }
.portal-assistant-close {
    width: 2.75rem;
    min-height: 2.75rem;
    border: 0;
    border-radius: .6rem;
    background: #edf3fc;
    color: var(--portal-ink);
}
.portal-assistant-dialog iframe { flex: 1; min-height: 0; width: 100%; border: 0; }
body.customer-portal:has(.portal-assistant-dialog[open]) { overflow: hidden; }
.portal-embedded .portal-frame { display: block; }
.customer-portal.portal-embedded .portal-content { max-width: 56rem; padding: .85rem clamp(.75rem, 3vw, 1.5rem); }
.portal-embedded .request-portal { background: transparent; }
.portal-embedded .request-portal__orb,
.portal-embedded .request-trust-row,
.portal-embedded .request-entry-banner { display: none; }
.portal-embedded .request-card { box-shadow: none; }
.portal-embedded .request-step-intro h2,
.portal-embedded .request-section-title h3 { font-weight: 600; }
.portal-assistant-steps {
    display: flex;
    gap: .5rem;
    list-style: none;
    margin: 0 0 .7rem;
    padding: 0;
    color: var(--portal-muted);
}
.portal-assistant-steps li { padding: .4rem .65rem; border-radius: .45rem; font-size: .87rem; }
.portal-assistant-steps [aria-current] { background: #e7effb; color: #153e78; font-weight: 600; }
.portal-assistant-sender {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .45rem 1rem;
    padding: .7rem;
    border-radius: .65rem;
    background: #edf3fc;
}
.portal-assistant-sender span { display: block; overflow-wrap: anywhere; }
#portal-recipient-message { margin: .35rem 0; }
#portal-recipient-message:empty { display: none; }
@media (max-width: 650px) {
    .portal-assistant-dialog { inset: 0; margin: 0; width: 100%; height: 100dvh; border: 0; border-radius: 0; }
}

/* Distribución compacta de cuenta y solicitudes. */
.portal-account-grid { display: block; }
.portal-account-grid .portal-profile form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
    align-items: center;
    gap: .7rem 1.2rem;
    width: 100%;
}
.portal-account-grid .portal-profile form > input[type="hidden"] { display: none; }
.portal-account-grid .portal-profile form > p,
.portal-account-grid .portal-profile form > button { grid-column: 2; }
.portal-account-access { margin-top: 1rem; }
.portal-request-row {
    grid-template-columns: auto minmax(12rem, 1fr) auto !important;
    gap: .35rem .8rem;
    align-items: start;
    position: relative;
}
.portal-request-row .portal-row-date { grid-column: 2 !important; grid-row: auto !important; }
.portal-request-row .portal-status { grid-column: 3 !important; grid-row: 1 !important; }
.portal-request-row > .bi-chevron-right { display: none; }
.portal-request-summary {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: .35rem 1rem;
    align-items: start;
}
.portal-request-summary h1 { margin: 0; }
.portal-request-summary > p { margin: 0; grid-column: 1; }
.portal-request-summary > .portal-status { grid-column: 2; grid-row: 1; }
.portal-request-summary .portal-summary-details { margin: .25rem 0; }
.portal-request-summary .portal-actions { grid-column: 1 / -1; margin-top: .5rem; }
.portal-detail-columns .portal-summary-details { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
.portal-detail-columns .portal-summary-details div { min-width: 0; overflow-wrap: anywhere; }
.portal-repeat-options { max-height: 55vh; overflow-y: auto; margin-block: .75rem; }
@media(max-width:650px) {
    .portal-account-grid .portal-profile form { grid-template-columns: minmax(0,1fr); gap: .4rem; }
    .portal-account-grid .portal-profile form > p,
    .portal-account-grid .portal-profile form > button { grid-column: 1; }
    .portal-request-row { grid-template-columns: auto minmax(0,1fr) !important; }
    .portal-request-row .portal-status { grid-column: 2 !important; grid-row: auto !important; justify-self: start; }
    .portal-request-summary { grid-template-columns: minmax(0,1fr); }
    .portal-request-summary > .portal-status { grid-column: 1; grid-row: auto; justify-self: start; }
}
