/* Fase 9.3 — CSS verbatim de los bloques de estilo de Pages/Ventas/GuiaRemision/GuiaV2/AnulacionComprobante.razor. Igual que hoy, es global mientras el componente está en pantalla:
   se enlaza con <link> donde estaba el bloque. Cambios: @@ → @ y capas D-51. */
.anc-root {
--em-cobalt: #1a4fba;
--em-cobalt-deep: #0f3494;
--em-cobalt-light: #2d6ae0;
--em-cobalt-pale: #e8eef9;
--em-cobalt-subtle: #f0f4fb;
--em-cobalt-muted: #c5d4f0;
--em-cobalt-mid: #6b8fd4;
--em-accent-glow: rgba(61,122,237,0.18);
--em-bg: #f7f9fd;
--em-border: #dce6f5;
--em-text-primary: #1a2540;
--em-text-secondary: #4a5e82;
--em-text-muted: #8ca0c4;
--em-success: #16a34a;
--em-success-bg: #eaf7f1;
--em-error: #dc2626;
--em-error-bg: #fdf0ef;
--em-warning: #b45309;
--em-warning-bg: #fef3cd;
--em-violet: #7c3aed;
--em-radius: 14px;
--em-radius-sm: 5px;
--em-shadow: 0 20px 60px rgba(26,79,186,0.18), 0 4px 16px rgba(0,0,0,0.06);
font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
font-size: 13px;
color: var(--em-text-primary);
}
.anc-root *, .anc-root *::before, .anc-root *::after { box-sizing: border-box; }

/* ── contenedor según modo ── */
.anc-overlay {
position: fixed; inset: 0; z-index: var(--z-modal-3);
background: rgba(10,22,54,0.48); backdrop-filter: blur(4px);
display: flex; align-items: center; justify-content: center; padding: 16px;
animation: anc-fade .22s ease;
}
.anc-embebido { width: 100%; height: 100%; display: flex; background: var(--em-bg); }
@keyframes anc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes anc-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes anc-spin { to { transform: rotate(360deg); } }

.anc-modal {
width: 100%; max-width: 1180px; max-height: calc(100vh - 32px);
background: #fff; border-radius: var(--em-radius); box-shadow: var(--em-shadow);
display: flex; flex-direction: column; overflow: hidden;
animation: anc-up .25s ease;
}
.anc-embebido .anc-modal { max-width: none; max-height: none; height: 100%; border-radius: 0; box-shadow: none; animation: none; }

/* ── cabecera ── */
.anc-hdr {
background: linear-gradient(135deg, var(--em-cobalt-deep) 0%, var(--em-cobalt) 60%, var(--em-cobalt-light) 100%);
color: #fff; padding: 14px 18px; display: flex; align-items: center; gap: 12px; flex-shrink: 0;
}
.anc-hdr-ic { width: 38px; height: 38px; border-radius: 9px; background: rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; font-size: 17px; }
.anc-hdr h1 { margin: 0; font-size: 15px; font-weight: 700; }
.anc-hdr p { margin: 1px 0 0; font-size: 11.5px; opacity: .78; }
.anc-sp { flex: 1; }
.anc-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.anc-chip-w { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.28); }
.anc-chip-ok { background: var(--em-success-bg); color: #166534; border: 1px solid #86efac; }
.anc-chip-err { background: var(--em-error-bg); color: #991b1b; border: 1px solid #fca5a5; }
.anc-chip-warn { background: var(--em-warning-bg); color: var(--em-warning); border: 1px solid #fcd34d; }
.anc-chip-blue { background: var(--em-cobalt-pale); color: var(--em-cobalt-deep); border: 1px solid var(--em-cobalt-muted); }
.anc-x { width: 31px; height: 31px; border-radius: 6px; border: none; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.anc-x:hover { background: rgba(255,255,255,.26); }

/* ── cuerpo ── */
.anc-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 12px; overflow: auto; background: var(--em-bg); flex: 1; }
/* 13/10/2026 · las tarjetas no se encogen: el cuerpo hace scroll (antes Cobros y Motivo salían cortados) */
.anc-body { min-height: 0; }
.anc-body > * { flex-shrink: 0; }
.anc-grid2 { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; }
.anc-card { background: #fff; border: 1px solid var(--em-border); border-radius: 10px; overflow: hidden; }
.anc-card-h { margin: 0; padding: 9px 12px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--em-text-secondary); background: var(--em-cobalt-subtle); border-bottom: 1px solid var(--em-border); display: flex; align-items: center; gap: 6px; }
.anc-card-h i { color: var(--em-cobalt-light); }
.anc-card-h .anc-r { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.anc-cb { padding: 10px 12px; }
.anc-cb0 { padding: 0; overflow-x: auto; }
.anc-kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 14px; }
.anc-kv span { display: block; font-size: 10px; color: var(--em-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.anc-kv b { font-size: 13px; }
.anc-tot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.anc-tot > div { background: var(--em-cobalt-subtle); border: 1px solid var(--em-border); border-radius: 6px; padding: 6px 9px; }
.anc-tot span { font-size: 10px; color: var(--em-text-muted); font-weight: 600; text-transform: uppercase; }
.anc-tot b { display: block; font-size: 14px; color: var(--em-cobalt-deep); }
.anc-tot .anc-after { font-size: 11px; color: var(--em-error); font-weight: 700; }
.anc-note { color: var(--em-text-muted); font-size: 11px; margin-top: 8px; }

/* ── alertas ── */
.anc-alert { border-radius: 8px; padding: 9px 12px; display: flex; gap: 9px; align-items: flex-start; font-size: 12px; line-height: 1.45; }
.anc-alert i { margin-top: 2px; }
.anc-alert b { display: block; }
.anc-alert-err { background: var(--em-error-bg); border: 1px solid #fca5a5; color: #991b1b; }
.anc-alert-warn { background: var(--em-warning-bg); border: 1px solid #fcd34d; color: #7c4a03; }
.anc-alert-info { background: var(--em-cobalt-pale); border: 1px solid var(--em-cobalt-muted); color: var(--em-cobalt-deep); }
.anc-alerts { display: flex; flex-direction: column; gap: 6px; }
.anc-alert-ok { background: #e7f4f1; border: 1px solid #9fd3c7; color: #0a4f44; }

/* ── pasos ── */
.anc-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.anc-steps li { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; line-height: 1.4; }
.anc-steps li i { margin-top: 2px; color: var(--em-cobalt-light); width: 14px; text-align: center; }

/* ── timeline ── */
.anc-tl { display: flex; align-items: stretch; overflow-x: auto; padding: 12px 6px 8px; }
.anc-node { min-width: 150px; flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 6px; }
.anc-node:not(:last-child)::after { content: ""; position: absolute; top: 19px; left: calc(50% + 20px); right: calc(-50% + 20px); height: 3px; background: var(--em-cobalt-muted); }
.anc-dot { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 15px; z-index: 1; box-shadow: 0 2px 8px rgba(26,79,186,.25); }
.anc-node.anc-main .anc-dot { outline: 3px solid #fde68a; }
.anc-node .anc-t { margin-top: 6px; font-weight: 700; font-size: 12px; }
.anc-node .anc-n { font-size: 11px; color: var(--em-text-secondary); }
.anc-node .anc-f { font-size: 10.5px; color: var(--em-text-muted); }
.anc-node .anc-st { margin-top: 5px; display: flex; flex-direction: column; gap: 3px; align-items: center; }
.anc-arrow { font-size: 10px; color: var(--em-text-muted); }

/* ── tablas ── */
.anc-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.anc-tbl th { text-align: left; font-size: 10.5px; font-weight: 700; color: var(--em-text-secondary); text-transform: uppercase; letter-spacing: .3px; padding: 7px 8px; border-bottom: 1px solid var(--em-border); background: #fbfcfe; white-space: nowrap; }
.anc-tbl td { padding: 7px 8px; border-bottom: 1px solid #eef2f9; vertical-align: middle; }
.anc-tbl .anc-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.anc-tbl tr.anc-sub td { background: #fbfcfe; font-size: 11.5px; color: var(--em-text-secondary); }
.anc-tbl tfoot td { font-weight: 700; background: var(--em-cobalt-subtle); }
.anc-pos { color: var(--em-success); font-weight: 700; }
.anc-neg { color: var(--em-error); font-weight: 700; }
.anc-delta { display: inline-block; min-width: 44px; text-align: center; padding: 1px 6px; border-radius: 10px; font-size: 11px; font-weight: 700; background: var(--em-success-bg); color: var(--em-success); }
.anc-ba { display: inline-flex; align-items: center; gap: 6px; }
.anc-ba s { color: var(--em-text-muted); }
.anc-ba i { color: var(--em-text-muted); font-size: 10px; }
.anc-muted { color: var(--em-text-muted); }
.anc-small { font-size: 11px; }
.anc-pm { display: inline-flex; align-items: center; gap: 6px; }
.anc-pm i { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--em-cobalt-pale); color: var(--em-cobalt); }
.anc-empty { padding: 10px 12px; color: var(--em-text-muted); font-size: 12px; }

/* ── motivo ── */
.anc-motivo { display: grid; grid-template-columns: 280px 1fr; gap: 10px; }
.anc-lbl { font-size: 10.5px; font-weight: 600; color: var(--em-text-secondary); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 3px; display: block; }
.anc-inp { width: 100%; padding: 6px 9px; border: 1.5px solid var(--em-border); border-radius: var(--em-radius-sm); font-size: 12.5px; outline: none; font-family: inherit; background: #fff; color: var(--em-text-primary); }
.anc-inp:focus { border-color: var(--em-cobalt-light); box-shadow: 0 0 0 3px var(--em-accent-glow); }
.anc-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; margin-top: 10px; cursor: pointer; }

/* ── pie ── */
.anc-ftr { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--em-border); background: var(--em-cobalt-subtle); flex-shrink: 0; flex-wrap: wrap; }
.anc-btn { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; height: 31px; font-size: 13px; font-weight: 600; border: none; color: #fff; border-radius: 5px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.08); white-space: nowrap; }
.anc-btn:disabled { opacity: .5; cursor: not-allowed; }
.anc-btn:hover:not(:disabled) { filter: brightness(1.08); }

/* ── capas: confirmar / procesando / resultado ── */
.anc-layer { position: fixed; inset: 0; z-index: var(--z-modal-4); background: rgba(10,22,54,.6); backdrop-filter: blur(5px); display: flex; align-items: center; justify-content: center; padding: 16px; animation: anc-fade .18s ease; }
.anc-dlg { background: #fff; border-radius: 14px; width: 100%; max-width: 560px; overflow: hidden; box-shadow: 0 24px 64px rgba(26,79,186,.28); display: flex; flex-direction: column; max-height: calc(100vh - 32px); animation: anc-up .22s ease; }
.anc-dlg-h { padding: 14px 18px; color: #fff; display: flex; align-items: center; gap: 10px; }
.anc-dlg-h i { font-size: 21px; }
.anc-dlg-h h4 { margin: 0; font-size: 15px; }
.anc-dlg-h p { margin: 2px 0 0; font-size: 11.5px; opacity: .85; }
.anc-dlg-b { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.anc-dlg-f { padding: 10px 18px; border-top: 1px solid var(--em-border); display: flex; justify-content: flex-end; gap: 8px; background: var(--em-cobalt-subtle); }
.anc-h-err { background: linear-gradient(135deg, #991b1b, #dc2626); }
.anc-h-ok { background: linear-gradient(135deg, #166534, #16a34a); }
.anc-proc { background: #fff; border-radius: 14px; padding: 22px 26px; width: 100%; max-width: 460px; box-shadow: 0 24px 64px rgba(26,79,186,.28); }
.anc-proc-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.anc-proc-top h4 { margin: 0; font-size: 14px; }
.anc-proc-el { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--em-cobalt); font-size: 14px; }
.anc-spin { width: 30px; height: 30px; border: 3px solid var(--em-cobalt-muted); border-top-color: var(--em-cobalt); border-radius: 50%; animation: anc-spin .75s linear infinite; flex-shrink: 0; }
.anc-plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12px; }
.anc-plist li { display: flex; align-items: center; gap: 8px; color: var(--em-text-muted); }
.anc-plist li i { width: 15px; text-align: center; }
.anc-plist li.anc-run { color: var(--em-cobalt-deep); font-weight: 600; }
.anc-plist li.anc-done { color: #166534; }
.anc-plist li.anc-fail { color: var(--em-error); font-weight: 600; }
.anc-plist li ul { list-style: none; padding-left: 23px; margin: 4px 0 0; display: flex; flex-direction: column; gap: 3px; font-weight: 400; font-size: 11.5px; }
.anc-av { border: 1px solid var(--em-border); border-left: 4px solid var(--em-cobalt-light); border-radius: 6px; padding: 8px 11px; background: var(--em-cobalt-subtle); }
.anc-av-w { border-left-color: var(--em-warning); background: var(--em-warning-bg); }
.anc-av-e { border-left-color: var(--em-error); background: var(--em-error-bg); }
.anc-av-h { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; }
.anc-av-h code { margin-left: auto; font-size: 10px; background: #fff; border: 1px solid var(--em-border); padding: 1px 6px; border-radius: 10px; color: var(--em-text-secondary); }
.anc-av-d { font-size: 12px; color: var(--em-text-secondary); margin-top: 3px; }
.anc-loading { padding: 60px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--em-text-secondary); }

@media (max-width: 900px) {
.anc-grid2, .anc-motivo { grid-template-columns: 1fr; }
.anc-kv { grid-template-columns: 1fr 1fr; }
.anc-tot { grid-template-columns: 1fr 1fr; }
}

/* ── tratamiento del dinero ── */
.anc-money { display: flex; flex-direction: column; gap: 10px; padding: 10px 12px; }
.anc-mrow { border: 1px solid var(--em-border); border-radius: 8px; padding: 10px 12px; background: #fff; display: flex; flex-direction: column; gap: 8px; }
.anc-mrow.anc-ok { border-left: 4px solid var(--em-success); }
.anc-mrow.anc-pend { border-left: 4px solid var(--em-warning); }
.anc-mrow-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.anc-mrow-h .anc-amt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.anc-q { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.anc-q > span { font-weight: 600; color: var(--em-text-secondary); min-width: 210px; }
.anc-seg { display: inline-flex; border: 1.5px solid var(--em-border); border-radius: 6px; overflow: hidden; }
.anc-seg button { border: none; background: #fff; padding: 4px 12px; font-size: 12px; font-weight: 600; color: var(--em-text-secondary); cursor: pointer; height: 28px; }
.anc-seg button + button { border-left: 1.5px solid var(--em-border); }
.anc-seg button.anc-on { background: var(--em-cobalt); color: #fff; }
.anc-seg button.anc-on-red { background: var(--em-error); color: #fff; }
.anc-seg button.anc-on-green { background: var(--em-success); color: #fff; }
.anc-seg button:disabled { opacity: .5; cursor: not-allowed; }
.anc-medio { display: grid; grid-template-columns: 180px 1fr 1fr; gap: 8px; padding: 8px; background: var(--em-cobalt-subtle); border-radius: 6px; }
.anc-medio .anc-inp { height: 30px; padding: 4px 8px; }
.anc-res { font-size: 12px; display: flex; align-items: center; gap: 6px; }
.anc-res.anc-res-out { color: var(--em-error); font-weight: 700; }
.anc-res.anc-res-in { color: var(--em-success); font-weight: 700; }
.anc-res.anc-res-info { color: var(--em-text-secondary); }
.anc-mov { border-radius: 8px; padding: 9px 12px; display: flex; gap: 10px; align-items: center; font-size: 12.5px; font-weight: 600; }
.anc-mov-out { background: var(--em-error-bg); border: 1px solid #fca5a5; color: #991b1b; }
.anc-mov-in { background: var(--em-success-bg); border: 1px solid #86efac; color: #166534; }
.anc-mov-info { background: var(--em-cobalt-pale); border: 1px solid var(--em-cobalt-muted); color: var(--em-cobalt-deep); }
.anc-mov b { margin-left: auto; font-variant-numeric: tabular-nums; }
.anc-pend-list { font-size: 11.5px; color: var(--em-warning); }
.anc-origin { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #f3eefe; border: 1px solid #ddd6fe; border-radius: 8px; color: #5b21b6; font-size: 12.5px; }
.anc-origin b { color: #4c1d95; }
@media (max-width: 900px) { .anc-medio { grid-template-columns: 1fr; } .anc-q > span { min-width: 0; } }
