/* ==========================================================================
   ORDENES DE EMISION — Asistente, items asegurados, localidades, coaseguro. Ver §6.8.
   Archivo 4 de 9. El ORDEN de los nueve importa: Docs/DESIGN-LANGUAGE.md.
   ========================================================================== */
.insured-items-panel__create-option{
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color var(--motion-fast) var(--motion-ease);
}
.insured-items-panel__create-option:hover{
    background-color: var(--mud-palette-action-default-hover);
}
.insured-items-panel__create-option .mud-icon-root{
    width: 20px;
    height: 20px;
    font-size: 20px;
    flex-shrink: 0;
}
.insured-items-panel__create-option-text{
    min-width: 0;
}
.insured-items-panel__create-option-text .mud-typography-body2{
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.25;
}
.insured-items-panel__create-option-text .mud-typography-caption{
    font-size: 0.72rem;
    line-height: 1.2;
}
/* Los placeholders de busqueda quedan mas claros que los de formulario, a proposito. */
.items-search-field .mud-input-root::placeholder,
.items-plan-search .mud-input-root::placeholder{
    color: var(--text-placeholder);
    opacity: 1;
}
.items-search-field .mud-input-root::placeholder,
.items-plan-search .mud-input-root::placeholder{
    font-size: 13.5px;
}
.cfg-strip{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.coins-status-chip{
    margin-left: auto;
    padding: 3px 10px;
    border-radius: var(--r-chip);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}
.coins-status-chip--ok{
    background: var(--status-ok-bg);
    color: var(--status-ok-fg);
}
.coins-status-chip--warn{
    background: var(--status-warn-bg);
    color: var(--status-warn-fg);
}
.coins-status-chip--danger{
    background: var(--status-danger-bg);
    color: var(--status-danger-fg);
}
/* Localidades aseguradas — paso 3 del wizard. */
.loc-panel{
    border: 1px solid var(--gh-line-card);
    border-radius: 14px;
    padding: 12px;
}
.loc-grid{
    display: grid;
    grid-template-columns: 52px 1.2fr 1fr 1fr;
    align-items: center;
    gap: 8px;
}
.loc-grid--head{
    padding: 4px 14px 10px;
}
.loc-th{
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gh-label-2);
}
.loc-th--right{
    text-align: right;
}
.loc-rows{
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* Filas como card, no como filas de tabla con divisor. */
.loc-row{
    padding: 11px 14px;
    border-radius: var(--gh-r-row-2);
    transition: border-color .15s ease;
}
.loc-row--on{
    background: var(--mud-palette-surface);
    border: 1px solid var(--gh-line-row-2);
}
.loc-row--on:hover{
    border-color: var(--gh-line-row-2-hover);
}
.loc-row--off{
    background: var(--surf-item);
    border: 1px solid var(--gh-line-divider);
}
.loc-row--off:hover{
    border-color: var(--gh-line-row-1-hover);
}
/* Markup propio: un MudCheckBox no se recolorea desde CSS. Ver §8, trampa 30. */
.loc-check{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 19px;
    height: 19px;
    border-radius: 5px;
    border: 1.5px solid var(--gh-line-row-2-hover);
    cursor: pointer;
    user-select: none;
    flex: 0 0 auto;
}
.loc-check--on{
    /* --control-on y no --mud-palette-primary, que invierte a casi blanco. Ver §2.5. */
    background: var(--control-on);
    border-color: var(--control-on);
    color: var(--control-on-ink);
}
.loc-check--locked{
    cursor: default;
    pointer-events: none;
    opacity: .7;
}
.loc-check:focus-visible{
    outline: 2px solid var(--mud-palette-primary);
    outline-offset: 2px;
}
.loc-check svg{
    display: block;
}
/* Una fila sin seleccionar no atenua su texto: el piso de 4.5:1 tambien le aplica. */
.loc-addr{
    font-size: 15px;
    font-weight: 600;
    color: var(--gh-strong);
}
.loc-muni{
    font-size: 15px;
    color: var(--gh-body);
}
.loc-value{
    text-align: right;
    font-size: 15px;
    color: var(--gh-body);
}
.loc-value--empty{
    color: var(--text-muted-2);
    font-weight: 400;
}
.loc-value-input .mud-input-adornment{
    font-size: 12.5px;
    font-weight: 700;
}
.loc-total{
    margin-top: 8px;
    padding: 14px;
    border-top: 1px solid var(--gh-line-divider);
}
.loc-total__label{
    font-size: 13px;
    font-weight: 700;
    color: var(--gh-body);
}
.loc-total__value{
    text-align: right;
    font-size: 17px;
    font-weight: 700;
    color: var(--gh-strong);
}
.loc-total__prefix{
    margin-right: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gh-label-2);
}
/* Items asegurados — shell de etapas, solo modo Orden. Ver §6.8. */
.insured-items-panel__section{
    padding: 20px;
    border-radius: 14px;
    border: 1px solid var(--mud-palette-lines-default);
    background-color: var(--mud-palette-background);
}
.items-hdr__title{
    font-size: 16px;
    font-weight: 700;
    color: var(--gh-strong);
}
.items-hdr__count-chip{
    padding: 4px 10px;
    border-radius: var(--r-chip);
    font-size: 12px;
    font-weight: 700;
    background: var(--surf-chip-neutral);
    color: var(--gh-label-2);
}
.items-hdr__ramo{
    margin-left: auto;
    font-size: 12.5px;
    color: var(--gh-label-2);
    white-space: nowrap;
}
/* One stage card. Active/Locked/Completed skins per mock literals:
   Active    border:#C2D0E4 → --gh-line-row-1-hover, white surface.
   Locked    border:#E2E9F3 → --gh-line-divider, opacity:.6.
   Completed border:#E2E9F3, tinted surface (mock #F5F8FC ≈ --surf-item). */
.items-stage{
    border-radius: 12px;
    padding: 16px;
}
.items-stage--active{
    border: 1px solid var(--gh-line-row-1-hover);
    background: var(--mud-palette-surface);
}
.items-stage--locked{
    border: 1px solid var(--gh-line-divider);
    opacity: .6;
}
.items-stage--completed{
    border: 1px solid var(--gh-line-divider);
    padding: 14px 16px;
    background: var(--surf-item);
}
.items-stage__head{
    display: flex;
    align-items: center;
    gap: 11px;
}
.items-stage--active .items-stage__head{
    margin-bottom: 14px;
}
.items-stage__circle{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: var(--r-chip);
    font-size: 12.5px;
    font-weight: 700;
}
.items-stage__circle--active{
    border: 2px solid var(--mud-palette-primary);
    color: var(--mud-palette-primary);
}
.items-stage__circle--locked{
    background: var(--surf-chip-neutral);
    color: var(--text-support);
}
.items-stage__circle--completed{
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}
.items-stage__title{
    font-size: 14.5px;
}
.items-stage__title--active{
    font-weight: 700;
    color: var(--gh-strong);
}
.items-stage__title--locked{
    font-weight: 600;
    color: var(--gh-label-2);
}
.items-stage__title--completed{
    font-weight: 600;
    color: var(--gh-body);
}
.items-stage__reason{
    margin-left: auto;
    font-size: 12px;
    color: var(--gh-label-2);
    white-space: nowrap;
}
.items-stage__summary{
    margin-left: auto;
    font-size: 12.5px;
    color: var(--gh-label-2);
    white-space: nowrap;
}
.items-stage__edit{
    background: none;
    border: none;
    padding: 0;
    /* Stage 3 completa sin resumen, y entonces nada empujaba a "Editar". */
    margin-left: auto;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mud-palette-primary);
    cursor: pointer;
    white-space: nowrap;
}
.items-stage__edit:hover{
    filter: brightness(1.15);
}
/* Pending-order context (design D2): all three stages render Locked with
   "Requiere guardar la orden", plus the preserved lead copy above them. */
.items-stage__pending-lead{
    font-size: 13px;
    color: var(--gh-body);
    margin-bottom: 2px;
}
/* Items asegurados — cuerpo de la etapa 1. */
.insured-items-panel__field{
    display: flex;
    flex-direction: column;
    width: 100%;
}
.insured-items-panel__field-label{
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    color: var(--gh-strong);
    margin: 0 0 6px 2px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.insured-items-panel__field-label .mud-icon-root{
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 1;
    opacity: .7;
    flex-shrink: 0;
}
.insured-items-panel__field-help{
    font-size: 0.72rem;
    line-height: 1;
    color: var(--text-support);
    margin: 6px 0 0 2px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.insured-items-panel__field-help .mud-icon-root{
    font-size: 14px;
    width: 14px;
    height: 14px;
    line-height: 1;
    flex-shrink: 0;
}
.insured-items-panel__field-help--hint{
    color: var(--mud-palette-primary);
    font-weight: 500;
}
.insured-items-panel__create-option{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background-color var(--motion-fast) var(--motion-ease);
    color: var(--gh-body);
}
.insured-items-panel__create-option:hover,
.insured-items-panel__create-option:focus-visible{
    background-color: color-mix(in srgb, var(--mud-palette-primary) 8%, transparent);
    outline: none;
}
.insured-items-panel__create-option .mud-icon-root{ color: var(--mud-palette-primary); }
.insured-items-panel__create-option-text{ min-width: 0; }
.insured-items-panel__create-option-text strong{ color: var(--mud-palette-primary); }
/* Los 7 !important se BORRAN, no se migran: en app.css gana el orden de carga. Ver §6.8. */
.insured-items-panel__plan-chip{
    height: 30px;
    border-radius: 999px;
    padding: 0 4px 0 12px;
    gap: 8px;
}
.insured-items-panel__plan-chip .mud-chip-content{
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
}
.insured-items-panel__plan-currency{
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: .04em;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .18);
    color: inherit;
}
.insured-items-panel__plan-chip.mud-chip-color-default .insured-items-panel__plan-currency{
    background: var(--mud-palette-background-gray);
    color: var(--mud-palette-text-secondary);
}
.insured-items-panel__pending-chip{
    height: 26px;
    font-size: 0.75rem;
}
.items-stage1__toolbar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}
.items-nature-tabs{
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.items-nature-tab{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 15px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--line-input);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--gh-body);
    cursor: pointer;
    transition: border-color var(--motion-fast) var(--motion-ease), background-color var(--motion-fast) var(--motion-ease), color var(--motion-fast) var(--motion-ease);
}
.items-nature-tab .mud-icon-root{ font-size: 15px; }
.items-nature-tab:hover:not(:disabled):not(.items-nature-tab--active){
    border-color: var(--gh-line-row-1-hover);
}
.items-nature-tab:disabled{
    cursor: not-allowed;
    opacity: .6;
}
.items-nature-tab--active{
    background: var(--mud-palette-primary);
    border-color: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
}
.items-templates-menu .mud-button-root{
    height: 38px;
    font-weight: 700;
    letter-spacing: 0.05em;
}
/* "Aún no has agregado productos" empty state (task 4) — the "instant
   creation" promise now lives only here (grep: "lo creamos al instante"). */
.items-search-field .mud-input.mud-input-outlined{
    min-height: 46px;
    border-radius: 10px;
    /* Sin relleno: el tinte es de los campos de FORMULARIO, no de una busqueda. */
    background-color: transparent;
}
.items-search-field .mud-input-outlined-border{
    border: none;
}
.items-empty{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 30px 0 22px;
    background: var(--surf-item);
    border-radius: 11px;
    text-align: center;
}
.items-empty .mud-icon-root{ color: var(--text-placeholder); }
.items-empty__title{
    font-size: 14px;
    font-weight: 600;
    color: var(--gh-body);
}
.items-empty__help{
    font-size: 12.5px;
    color: var(--gh-label-2);
}
.items-relations-chip{
    margin-left: auto;
    padding: 3px 10px;
    border-radius: var(--r-chip);
    font-size: 11.5px;
    font-weight: 700;
    background: var(--surf-chip-neutral);
    color: var(--gh-label-2);
}
.items-relations-chip--active{
    background: var(--status-info-bg);
    color: var(--status-info-fg);
}
/* Stage-1 footer: real pluralization, no "producto(s)" (task 7). */
.items-stage1__footer{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--gh-line-divider);
}
.items-stage1__footer--empty{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.items-stage1__footer-count{
    font-size: 12.5px;
    color: var(--gh-label-2);
}
.items-stage1__footer-actions{
    display: flex;
    align-items: center;
    gap: 10px;
}
/* Un primario deshabilitado siempre nombra por que. Ver §6.8. */
.items-save-gate-reason{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--status-warn-fg);
    white-space: nowrap;
}
.items-save-gate-reason__dot{
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--status-warn-fg);
    flex-shrink: 0;
}
/* S6f delta 9: stage 1's unsaved-content chip. Not mock-verified ("Sin
   guardar" has zero occurrences in the decoded mock) — same warn-token
   reuse rationale as above. */
.items-unsaved-chip{
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: var(--r-chip);
    font-size: 11.5px;
    font-weight: 700;
    background: var(--status-warn-bg);
    color: var(--status-warn-fg);
}
.items-btn-save{
    height: 40px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.items-product-card{
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    border-radius: 11px;
}
.items-product-card--ready{
    background: var(--surf-item);
    border: 1px solid var(--gh-line-divider);
}
.items-product-card--pending{
    background: var(--pending-bg);
    border: 1px solid var(--pending-line);
}
.items-product-card__head{
    display: flex;
    align-items: center;
    gap: 10px;
}
.items-product-card__title{
    font-size: 14.5px;
    font-weight: 700;
    color: var(--gh-strong);
}
.items-product-card__ok{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--status-ok-fg);
}
.items-product-card__pending-chip{
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px;
    border-radius: var(--r-chip);
    font-size: 11.5px;
    font-weight: 700;
    background: var(--status-warn-bg);
    color: var(--status-warn-fg);
}
.items-product-card__actions{
    margin-left: auto;
    display: flex;
    gap: 2px;
}
.items-icon-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: var(--r-icon);
    background: none;
    color: var(--text-support);
    cursor: pointer;
}
.items-icon-btn:hover:not(:disabled){
    background: var(--danger-plate);
    color: var(--danger-ink);
}
.items-icon-btn:disabled{
    opacity: .4;
    cursor: not-allowed;
}
.items-plan-chips{
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.items-plan-chip{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px 5px 12px;
    background: var(--mud-palette-surface);
    border: 1px solid var(--gh-line-row-1-hover);
    border-radius: var(--r-chip);
    font-size: 13px;
    font-weight: 600;
    color: var(--gh-title);
}
.items-plan-chip__currency{
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gh-label-2);
}
.items-plan-chip__remove{
    color: var(--text-placeholder);
    cursor: pointer;
    line-height: 1;
}
.items-plan-chip__remove:hover{
    color: var(--danger-ink);
}
.items-plan-search .mud-input{
    height: 42px;
    border-radius: 9px;
}
.items-plan-search .mud-input.mud-input-outlined{
    background-color: var(--mud-palette-surface);
}
.items-plan-search .mud-input-outlined-border{
    border-color: var(--line-input);
}
.items-plan-search--pending .mud-input-outlined-border{
    border-color: var(--pending-line);
}
/* Formulario inline de plan nuevo + compuerta de guardado. */
.items-plan-search-row{
    display: flex;
    align-items: center;
    gap: 10px;
}
.items-plan-search-row .items-plan-search{
    flex: 1;
    min-width: 0;
}
.items-plan-search__hint{
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gh-label-2);
    white-space: nowrap;
}
.items-plan-search--active .mud-input-outlined-border{
    border-color: var(--mud-palette-primary);
}
.items-plan-create{
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--mud-palette-surface);
    border: 1px dashed var(--line-input);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.items-plan-create__head{
    display: flex;
    align-items: center;
    gap: 8px;
}
.items-plan-create__title{
    font-size: 13.5px;
    font-weight: 600;
    color: var(--gh-strong);
}
.items-plan-create__title strong{
    color: var(--mud-palette-primary);
}
.items-plan-create__missing-chip{
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: var(--r-chip);
    font-size: 11px;
    font-weight: 700;
    background: var(--status-warn-bg);
    color: var(--status-warn-fg);
}
.items-plan-create .fld .mud-input.mud-input-filled{
    border-radius: 10px;
    background: var(--field-fill);
}
.items-plan-create .fld .mud-input.mud-input-filled:hover{
    background: var(--field-fill-hover);
}
.items-plan-create .fld .mud-input-filled::before,
.items-plan-create .fld .mud-input-filled::after{
    display: none;
}
.items-plan-create__footer{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.items-plan-create__helper{
    font-size: 12px;
    color: var(--gh-label-2);
}
.items-plan-create__actions{
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}
.items-plan-create__confirm{
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
/* Items asegurados — etapas 2 y 3. */
.items-file-chip{
    /* El empuje al extremo es propiedad de la CABECERA, no del chip: dos auto se reparten el sobrante. */
    padding: 3px 10px;
    border-radius: var(--r-chip);
    font-size: 11.5px;
    font-weight: 700;
    background: var(--surf-chip-neutral);
    color: var(--gh-label-2);
}
.items-stage__head .items-file-chip{
    margin-left: auto;
}
.items-file-chip--active{
    background: var(--status-info-bg);
    color: var(--status-info-fg);
}
.items-btn-preview{
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    height: 36px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid var(--gh-line-row-1-hover);
    background: var(--mud-palette-surface);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--mud-palette-primary);
    cursor: pointer;
}
.items-btn-preview:hover:not(:disabled){
    background: var(--surf-item);
    border-color: var(--mud-palette-primary);
}
.items-btn-preview:disabled{
    opacity: .5;
    cursor: not-allowed;
}
/* Stage 2 body: uploaded-file row + help/buttons row. */
.items-file-row{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surf-item);
    border-radius: 10px;
    margin-bottom: 12px;
}
.items-file-row__icon{ color: var(--gh-label-2); }
.items-file-row__name{
    flex: 1;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--mud-palette-primary);
}
.items-file-row__chip{
    padding: 3px 10px;
    background: var(--status-info-bg);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--status-info-fg);
}
.items-file-row__delete{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--r-icon);
    border: none;
    background: none;
    color: var(--text-placeholder);
    cursor: pointer;
}
.items-file-row__delete:hover{
    background: var(--danger-plate);
    color: var(--danger-ink);
}
.insured-items-panel{
    /* The panel header (Ítems asegurados + count chip) sat flush under the
       wizard's step rail and the two read as one block. */
    margin-top: 14px;
}
/* Informativa, nunca bloqueante: una segunda carga tiene que seguir siendo posible. Ver §6.8. */
.items-import-upload__note{
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: var(--gh-r-row-2);
    /* Muted grey from the palette, background AND text, per the user: this is a
       statement of fact, not a status. Info-blue read as an alert. */
    background: var(--surf-chip-neutral);
    color: var(--text-muted-2);
    font-size: 12.5px;
    line-height: 1.45;
}
.items-import-upload__note .mud-icon-root{
    flex: none;
    color: var(--text-muted-2);
}
.items-import-upload__note--locked{
    /* Un bloqueo es un estado, no un error: gris, no rojo. */
    background: var(--surf-chip-neutral);
    color: var(--text-muted-2);
}
.items-import-upload__actions{
    display: flex;
    align-items: center;
    gap: 12px;
}
.items-import-upload__help{
    flex: 1;
    font-size: 12px;
    color: var(--gh-label-2);
}
.items-btn{
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.err-group{ margin-bottom: 14px; }
.err-group:last-child{ margin-bottom: 0; }
.err-group__head{
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 10px;
    background: var(--status-danger-bg);
}
.err-group__head .mud-icon-root{ color: var(--status-danger-fg); }
.err-group__title{
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--status-danger-fg);
}
.err-group__toggle{
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--status-danger-fg);
    cursor: pointer;
}
.err-group__body{
    padding: 12px 14px;
    background: var(--mud-palette-surface);
    border: 1px solid color-mix(in srgb, var(--status-danger-fg) 35%, var(--mud-palette-surface));
    border-radius: 10px;
}
.err-group__message{
    font-size: 13.5px;
    color: var(--gh-body);
    line-height: 1.5;
}
.err-group__rows{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
}
.err-group__rows-chip{
    padding: 3px 9px;
    background: var(--surf-item);
    border: 1px solid var(--gh-line-divider);
    border-radius: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gh-label-2);
}
.err-group__hint{
    font-size: 11.5px;
    color: var(--gh-label-2);
}
.err-group__rows-detail{
    margin-top: 8px;
    font-size: 12px;
    color: var(--gh-body);
}
.err-group--warn .err-group__head{ background: var(--pending-bg); }
.err-group--warn .err-group__head .mud-icon-root,
.err-group--warn .err-group__title,
.err-group--warn .err-group__toggle{
    color: var(--status-warn-fg);
}
.err-group--warn .err-group__body{
    border-color: var(--pending-line);
}
.items-warning-groups{ margin-top: 14px; }
.ok-bar{
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    background: var(--status-ok-bg);
    border-radius: 10px;
}
.ok-bar .mud-icon-root{ color: var(--status-ok-fg); }
.ok-bar__text{
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--status-ok-fg);
}
.ok-bar__cancel{
    background: none;
    border: none;
    padding: 0;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--gh-body);
    cursor: pointer;
}
.ok-bar__cancel:hover:not(:disabled){ color: var(--status-danger-fg); }
.ok-bar__confirm{
    height: 38px;
    padding: 0 16px;
    border: none;
    border-radius: 9px;
    background: var(--mud-palette-primary);
    color: var(--mud-palette-primary-text);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
}
.ok-bar__confirm:hover:not(:disabled){ filter: brightness(1.1); }
.ok-bar__cancel:disabled,
.ok-bar__confirm:disabled{
    opacity: .5;
    cursor: not-allowed;
}
/* Items asegurados — Detalle normalizado. */
.items-detail-card{
    border: 1px solid var(--gh-line-row-1-hover);
    border-radius: 12px;
    overflow: hidden;
}
.items-sec__head{
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--gh-line-divider);
}
.items-sec__head-icon.mud-icon-root{
    color: var(--text-support);
    font-size: 20px;
}
/* Same for the download/reload pair: hairline and muted at rest. `.icon-btn`
   already turns them primary on hover. */
.items-sec__actions .icon-btn .mud-icon-root{
    color: var(--icon-action);
}
.items-sec__title{
    font-size: 14.5px;
    font-weight: 700;
    color: var(--gh-strong);
}
.items-sec__actions{
    display: flex;
    align-items: center;
    gap: 2px;
    margin-left: auto;
}
.items-stage__summary + .items-stage__edit{
    margin-left: 12px;
}
.icon-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: var(--r-icon);
    background: none;
    color: var(--icon-action);
    cursor: pointer;
}
.icon-btn:hover:not(:disabled){
    background: var(--surf-chip-neutral);
    color: var(--mud-palette-primary);
}
.icon-btn:disabled{
    opacity: .4;
    cursor: not-allowed;
}
.items-detail-table{ width: 100%; }
.items-detail-row{
    display: grid;
    grid-template-columns: 110px 110px 1fr 140px 120px 160px;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    border-top: 1px solid var(--gh-line-divider);
}
.items-detail-row--head{
    padding: 10px 16px;
    background: var(--surf-chip-neutral);
    border-top: none;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--gh-label-2);
}
.items-detail-insured{
    font-weight: 600;
    color: var(--gh-strong);
}
.items-detail-ref{
    font-family: var(--font-code, ui-monospace, SFMono-Regular, Menlo, monospace);
    font-size: 13.5px;
    color: var(--gh-body);
}
.items-detail-amount{
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
}
.items-detail-row--head .items-detail-amount{ justify-content: flex-end; }
.items-detail-amount__currency{
    font-size: 11.5px;
    font-weight: 700;
    color: var(--gh-label-2);
}
.items-detail-amount__value{
    font-size: 14.5px;
    font-weight: 600;
    color: var(--gh-strong);
}
/* Observaciones — un compositor, una lista. */
.obs__head{
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.obs__t{
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: var(--gh-strong);
}
.obs__pill{
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.obs__pill--count{
    background: var(--field-fill);
    color: var(--gh-label-2);
    min-width: 26px;
    text-align: center;
}
.obs__pill--unsaved{
    background: var(--status-warn-bg);
    color: var(--status-warn-fg);
}
.obs__composer{
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 6px 16px;
    border: 1px solid var(--gh-line-divider);
    border-radius: 12px;
    transition: border-color .15s ease;
}
.obs__composer:focus-within,
.obs__composer.is-active{
    border-color: var(--field-border);
}
.obs__input{
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 15px;
    color: var(--gh-strong);
    padding: 10px 0;
}
.obs__input::placeholder{
    color: var(--mud-palette-text-secondary);
    opacity: 1;
}
.obs__input--inline{
    padding: 4px 0;
    border-bottom: 1px solid var(--field-border);
}
.obs__hint,
.obs__counter{
    font-size: 12.5px;
    color: var(--gh-label-1);
    white-space: nowrap;
}
.obs__composer .obs__add{
    min-height: 38px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    flex: 0 0 auto;
    /* MudButton pasa el label a mayusculas por default. Ver §8, trampa 29. */
    text-transform: none;
    letter-spacing: 0;
}
.obs__empty{
    text-align: center;
    padding: 26px 0 6px;
}
.obs__empty-t{
    margin: 0 0 4px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--gh-body);
}
.obs__empty-s{
    margin: 0;
    font-size: 13px;
    color: var(--gh-label-1);
}
/* List. Capped so twenty observations cannot stretch the dialog past its footer. */
.obs__list{
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
    max-height: 260px;
    overflow-y: auto;
}
.obs__item{
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--field-fill);
}
/* Unsaved: amber tint plus a real border, so it is distinguishable from a saved
   row even with colour removed. */
.obs__item--unsaved{
    background: color-mix(in srgb, var(--status-warn-fg) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--status-warn-fg) 28%, transparent);
}
.obs__avatar{
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gh-tray-2);
    color: var(--gh-strong);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .02em;
}
.obs__avatar--unsaved{
    background: color-mix(in srgb, var(--status-warn-fg) 18%, transparent);
    color: var(--status-warn-fg);
}
.obs__body{
    flex: 1;
    min-width: 0;
}
.obs__meta{
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2px;
}
.obs__author{
    font-size: 14.5px;
    font-weight: 700;
    color: var(--gh-strong);
}
.obs__date{
    font-size: 13px;
    color: var(--gh-label-1);
}
.obs__text{
    margin: 0;
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--gh-body);
    /* Long unbroken strings (policy numbers, pasted URLs) must not widen the row. */
    overflow-wrap: break-word;
    word-break: break-word;
}
.obs__actions{
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 0 0 auto;
}
.obs__actions .mud-icon-button{
    color: var(--gh-label-1);
}
/* Footer note, shown only while something is pending — a permanent note would be
   noise on a list with nothing to submit. */
.obs__note{
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--gh-line-divider);
    font-size: 12.5px;
    color: var(--gh-label-1);
}
/* BadgeColor tiene default Primary, asi que esta regla no matcheaba nada. Ver §8, trampa 28. */
.order-tabs .mud-badge-default{
    background-color: var(--status-warn-bg);
    color: var(--status-warn-fg);
    font-weight: 700;
}
/* polizas-redesign P7a. Chip de bloqueo y barra de escape del panel de ítems. */
.items-locked-chip{
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: var(--r-chip);
    background: var(--surf-chip-neutral);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--gh-label-2);
    white-space: nowrap;
}
/* Plato NEUTRO, no informativo: aca no paso nada, solo dice por donde se cambia. */
.items-escape-bar{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px;
    margin-bottom: 14px;
    border-radius: 10px;
    background: var(--gh-tray-1);
    color: var(--gh-body);
}
.items-escape-bar .mud-icon-root{
    color: var(--gh-label-1);
}
.items-escape-bar strong{
    color: var(--gh-strong);
}
.items-escape-bar__text{
    flex: 1 1 auto;
    font-size: 13.5px;
    line-height: 1.45;
}
/* Reemplaza al encabezado en vez de sumarse. */
.items-selection-bar{
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--status-info-bg);
    color: var(--status-info-fg);
}
.items-selection-bar__count{
    font-size: 13.5px;
    font-weight: 600;
}
/* El encabezado no se desmonta, se oculta: envolver su markup en un @if obligaría a
   emparejar tags a mano en un archivo compartido con Órdenes. */
.insured-items-panel__section-header.is-replaced{
    display: none !important;
}
.insured-items-panel__section--flat{
    padding: 0;
    border: 0;
    background: transparent;
}
