/* ================================================================
   NEXUS CXP MODULE — JARVIS / IRON MAN UI
   Sistema INRAI · Cuentas por Pagar
   ================================================================ */

/* ---------- ANIMACIONES GLOBALES CXP ---------- */

@keyframes cxp-glow-pulse {
    0%, 100% { box-shadow: 0 0 6px rgba(0,212,255,.3); }
    50%       { box-shadow: 0 0 22px rgba(0,212,255,.8), 0 0 50px rgba(0,212,255,.25); }
}
@keyframes cxp-gold-pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(200,168,75,.4), 0 0 0 1px rgba(200,168,75,.1); }
    50%       { box-shadow: 0 0 28px rgba(200,168,75,.9), 0 0 60px rgba(200,168,75,.3), 0 0 0 1px rgba(200,168,75,.3); }
}
@keyframes cxp-scan {
    0%   { transform: translateY(-200%); opacity: 0; }
    10%  { opacity: .6; }
    90%  { opacity: .6; }
    100% { transform: translateY(800%);  opacity: 0; }
}
@keyframes cxp-scan-h {
    0%   { transform: translateX(-100%); opacity: 0; }
    10%  { opacity: .5; }
    90%  { opacity: .5; }
    100% { transform: translateX(200%);  opacity: 0; }
}
@keyframes cxp-spin {
    to { transform: rotate(360deg); }
}
@keyframes cxp-spin-r {
    to { transform: rotate(-360deg); }
}
@keyframes cxp-fadein {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cxp-flicker {
    0%, 19.99%, 22%, 62.99%, 64%, 64.99%, 70%, 100% { opacity: 1; }
    20%, 21.99%, 63%, 63.99%, 65%, 69.99%            { opacity: .3; }
}
@keyframes cxp-glitch {
    0%,100% { clip-path:none; transform:none }
    91%     { clip-path:none }
    92%     { clip-path:polygon(0 15%,100% 15%,100% 30%,0 30%); transform:translateX(-3px) }
    93%     { clip-path:polygon(0 60%,100% 60%,100% 75%,0 75%); transform:translateX(3px) }
    94%     { clip-path:none }
    96%     { clip-path:polygon(0 40%,100% 40%,100% 55%,0 55%); transform:translateX(-2px) }
    97%     { clip-path:none }
}
@keyframes cxp-energy-surge {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}
@keyframes cxp-arc-ring {
    0%   { transform: rotate(0deg) scale(1);    opacity: .7; }
    50%  { transform: rotate(180deg) scale(1.05); opacity: 1; }
    100% { transform: rotate(360deg) scale(1);   opacity: .7; }
}
@keyframes cxp-btn-holo {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes cxp-border-chase {
    0%   { background-position: 0 0, 100% 0, 100% 100%, 0 100%; }
    25%  { background-position: 100% 0, 100% 100%, 0 100%, 0 0; }
    50%  { background-position: 100% 100%, 0 100%, 0 0, 100% 0; }
    75%  { background-position: 0 100%, 0 0, 100% 0, 100% 100%; }
    100% { background-position: 0 0, 100% 0, 100% 100%, 0 100%; }
}
@keyframes cxp-stat-boot {
    0%   { opacity: 0; transform: scaleY(0); }
    60%  { opacity: 1; transform: scaleY(1.04); }
    100% { opacity: 1; transform: scaleY(1); }
}
@keyframes cxp-counter-up {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes cxp-orb-float {
    0%, 100% { transform: translateY(0) translateX(0); }
    33%       { transform: translateY(-8px) translateX(4px); }
    66%       { transform: translateY(4px) translateX(-4px); }
}
@keyframes cxp-upload-breathe {
    0%, 100% { border-color: rgba(0,212,255,.3); box-shadow: inset 0 0 20px rgba(0,212,255,.03), 0 0 0 rgba(0,212,255,0); }
    50%       { border-color: rgba(0,212,255,.6); box-shadow: inset 0 0 30px rgba(0,212,255,.06), 0 0 20px rgba(0,212,255,.08); }
}
@keyframes cxp-radicar-power {
    0%   { background-position: 0% 50%; box-shadow: 0 0 8px rgba(200,168,75,.3); }
    50%  { background-position: 100% 50%; box-shadow: 0 0 30px rgba(200,168,75,.7), 0 0 60px rgba(200,168,75,.3); }
    100% { background-position: 0% 50%; box-shadow: 0 0 8px rgba(200,168,75,.3); }
}

/* ---------- CONTENEDOR PRINCIPAL ---------- */

.cxp-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 40px;
    background: linear-gradient(180deg, #040a18, #020611);
    border: 1px solid rgba(0,212,255,.15);
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(0,212,255,.08);
}

.cxp-panel {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 20px;
    animation: cxp-fadein .4s ease;
}

/* ---------- TÍTULOS ---------- */

.cxp-title {
    font-family: 'Orbitron', monospace;
    font-size: 28px;
    letter-spacing: 2px;
    color: #e8c96d;
    margin-bottom: 30px;
}

.cxp-subtitle {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    color: rgba(0,212,255,.6);
    margin-bottom: 25px;
}

.cxp-section-title {
    font-family: 'Orbitron', monospace;
    font-size: 10px;
    letter-spacing: 3px;
    color: #00d4ff;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,212,255,.2);
    text-transform: uppercase;
}

/* ---------- TARJETAS — HUD PANEL STYLE ---------- */

.cxp-card {
    background: linear-gradient(135deg, #040b1e 0%, #020810 100%);
    border: 1px solid rgba(0,212,255,.12);
    border-radius: 0;
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
    transition: border-color .3s, box-shadow .3s;
    /* HUD corner cuts */
    clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
/* Top scan line */
.cxp-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,.5), rgba(0,212,255,.8), rgba(0,212,255,.5), transparent);
    animation: cxp-scan-h 3.5s linear infinite;
}
/* Corner accent top-right */
.cxp-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 12px; height: 12px;
    background: rgba(0,212,255,.4);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.cxp-card:hover {
    border-color: rgba(0,212,255,.35);
    box-shadow: 0 0 18px rgba(0,212,255,.1), inset 0 0 20px rgba(0,212,255,.03);
}

/* ---------- STATS DASHBOARD ---------- */

.cxp-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 28px;
}

.cxp-stat-card {
    background: linear-gradient(135deg, #040b1e 0%, #020810 100%);
    border: 1px solid rgba(0,212,255,.15);
    border-radius: 0;
    padding: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all .3s;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    animation: cxp-stat-boot .5s ease backwards;
}
.cxp-stat-card:nth-child(1) { animation-delay: .05s; }
.cxp-stat-card:nth-child(2) { animation-delay: .10s; }
.cxp-stat-card:nth-child(3) { animation-delay: .15s; }
.cxp-stat-card:nth-child(4) { animation-delay: .20s; }
/* top corner cut accent */
.cxp-stat-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 10px; height: 10px;
    background: rgba(0,212,255,.35);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
}
/* bottom scan line */
.cxp-stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,.6), transparent);
}
.cxp-stat-card:hover {
    border-color: rgba(0,212,255,.4);
    box-shadow: 0 0 20px rgba(0,212,255,.15), inset 0 0 15px rgba(0,212,255,.04);
    transform: translateY(-3px);
}

.cxp-stat-value {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #00d4ff;
    line-height: 1;
    margin-bottom: 6px;
}
.cxp-stat-value.gold { color: #e8c96d; }
.cxp-stat-value.green { color: #00ff88; }
.cxp-stat-value.red { color: #ff4466; }
.cxp-stat-value.cyan { color: #00d4ff; }

.cxp-stat-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(0,212,255,.55);
    text-transform: uppercase;
}

/* ---------- TABLA CXP ---------- */

.cxp-table-wrap {
    background: linear-gradient(180deg, #050d1f, #030811);
    border: 1px solid rgba(0,212,255,.15);
    border-radius: 4px;
    overflow: hidden;
}

.cxp-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
}

.cxp-table thead tr {
    background: rgba(0,212,255,.07);
    border-bottom: 1px solid rgba(0,212,255,.2);
}

.cxp-table th {
    padding: 12px 14px;
    text-align: left;
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(0,212,255,.7);
    font-weight: 700;
    white-space: nowrap;
}

.cxp-table td {
    padding: 10px 14px;
    color: #b8ccdf;
    border-bottom: 1px solid rgba(0,212,255,.06);
    vertical-align: middle;
}

.cxp-table tbody tr {
    transition: background .15s;
}
.cxp-table tbody tr:hover {
    background: rgba(0,212,255,.04);
}

.cxp-table .money {
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    color: #00d4ff;
    font-weight: 700;
}
.cxp-table .money-total {
    font-family: 'Orbitron', monospace;
    font-size: 13px;
    color: #e8c96d;
    font-weight: 700;
}

/* ---------- BADGES DE ESTADO ---------- */

.cxp-badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 2px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.cxp-badge-ACEPTADA {
    background: rgba(0,255,136,.1);
    color: #00ff88;
    border: 1px solid rgba(0,255,136,.35);
    text-shadow: 0 0 8px rgba(0,255,136,.5);
}
.cxp-badge-RECHAZADA {
    background: rgba(255,68,102,.1);
    color: #ff4466;
    border: 1px solid rgba(255,68,102,.35);
    text-shadow: 0 0 8px rgba(255,68,102,.5);
}
.cxp-badge-EN_REVISION {
    background: rgba(255,200,0,.1);
    color: #ffc800;
    border: 1px solid rgba(255,200,0,.35);
    text-shadow: 0 0 8px rgba(255,200,0,.5);
}
.cxp-badge-RECIBIDA {
    background: rgba(0,212,255,.1);
    color: #00d4ff;
    border: 1px solid rgba(0,212,255,.35);
    animation: cxp-glow-pulse 2.5s ease-in-out infinite;
}
.cxp-badge-PAGADA {
    background: rgba(100,100,120,.15);
    color: #8899aa;
    border: 1px solid rgba(100,100,120,.3);
}
.cxp-badge-ANULADA {
    background: rgba(80,40,40,.2);
    color: #cc6666;
    border: 1px solid rgba(200,80,80,.3);
}
.cxp-badge-AJUSTADA {
    background: rgba(160,80,255,.1);
    color: #a050ff;
    border: 1px solid rgba(160,80,255,.35);
}
.cxp-badge-RECHAZADA_CONTABILIDAD {
    background: rgba(255,68,102,.1);
    color: #ff4466;
    border: 1px solid rgba(255,68,102,.35);
}

/* ---------- BOTÓN VER (tabla) — arc reactor micro ---------- */

.cxp-btn-ver {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 5px 16px;
    background: rgba(0,212,255,.05);
    border: 1px solid rgba(0,212,255,.3);
    color: #00d4ff;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    text-decoration: none;
    transition: all .25s;
    display: inline-block;
    position: relative;
    overflow: hidden;
}
.cxp-btn-ver::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,.2), transparent);
    transition: left .3s;
}
.cxp-btn-ver:hover {
    background: rgba(0,212,255,.15);
    border-color: #00d4ff;
    box-shadow: 0 0 12px rgba(0,212,255,.4), inset 0 0 8px rgba(0,212,255,.1);
    color: #7ee8ff;
    text-decoration: none;
}
.cxp-btn-ver:hover::before { left: 100%; }

/* ---------- BOTONES ACCIÓN — IRON MAN STYLE ---------- */

/* Botón primario — Reactor Arc Azul */
.cxp-btn-primary {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 11px 26px;
    background: linear-gradient(135deg, #003d5c 0%, #006899 40%, #00d4ff 100%);
    background-size: 200% auto;
    border: none;
    border-top: 1px solid rgba(0,212,255,.6);
    border-left: 1px solid rgba(0,212,255,.3);
    color: #e8f8ff;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: background-position .4s, box-shadow .25s, letter-spacing .2s;
    text-shadow: 0 0 8px rgba(0,212,255,.6);
}
.cxp-btn-primary::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,.9), transparent);
    animation: cxp-scan-h 2.5s linear infinite;
}
.cxp-btn-primary:hover {
    background-position: right center;
    box-shadow: 0 0 20px rgba(0,212,255,.5), 0 0 50px rgba(0,212,255,.2), inset 0 0 10px rgba(0,212,255,.1);
    color: #fff;
    letter-spacing: 3px;
    text-decoration: none;
}
.cxp-btn-primary:disabled { opacity: .35; cursor: not-allowed; }

/* Botón gold — Energía Stark */
.cxp-btn-gold {
    font-family: 'Orbitron', monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 11px 26px;
    background: linear-gradient(135deg, #3d2800 0%, #8a6200 40%, #e8c96d 100%);
    background-size: 200% auto;
    border: none;
    border-top: 1px solid rgba(232,201,109,.5);
    border-left: 1px solid rgba(200,168,75,.3);
    color: #fff3c4;
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: background-position .4s, box-shadow .25s, letter-spacing .2s;
    text-shadow: 0 0 8px rgba(200,168,75,.5);
}
.cxp-btn-gold::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(232,201,109,.9), transparent);
    animation: cxp-scan-h 3s linear infinite;
}
.cxp-btn-gold:hover {
    background-position: right center;
    box-shadow: 0 0 20px rgba(200,168,75,.6), 0 0 50px rgba(200,168,75,.2), inset 0 0 10px rgba(200,168,75,.1);
    color: #fff;
    letter-spacing: 3px;
    text-decoration: none;
}

/* Botón outline — Holograma */
.cxp-btn-outline {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 2px;
    padding: 10px 22px;
    background: transparent;
    border: 1px solid rgba(0,212,255,.4);
    color: #00d4ff;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    transition: all .25s;
}
.cxp-btn-outline::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(0,212,255,.08) 100%);
    transition: opacity .25s;
    opacity: 0;
}
.cxp-btn-outline:hover {
    background: rgba(0,212,255,.08);
    border-color: #00d4ff;
    box-shadow: 0 0 14px rgba(0,212,255,.35), inset 0 0 8px rgba(0,212,255,.08);
    color: #7ee8ff;
    text-decoration: none;
    letter-spacing: 3px;
}
.cxp-btn-outline:hover::before { opacity: 1; }

/* ---------- FORMULARIO ---------- */

.cxp-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.cxp-field {
    display: flex;
    flex-direction: column;
}

.cxp-field label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: rgba(0,212,255,.65);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.cxp-field input,
.cxp-field select {
    background: #020611;
    border: 1px solid rgba(0,212,255,.25);
    color: #eaf6ff;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 3px;
    transition: all .2s;
}

.cxp-field input:focus,
.cxp-field select:focus {
    outline: none;
    border-color: #00d4ff;
    box-shadow: 0 0 8px rgba(0,212,255,.35);
}

.cxp-provider {
    grid-column: span 2;
}

/* ---------- ZONA DE UPLOAD — ARC REACTOR PANEL ---------- */

.cxp-upload-zone {
    border: 2px dashed rgba(0,212,255,.25);
    border-radius: 0;
    padding: 52px 32px;
    text-align: center;
    background: linear-gradient(135deg, rgba(0,212,255,.02) 0%, rgba(0,50,80,.04) 100%);
    cursor: pointer;
    transition: all .35s;
    position: relative;
    overflow: hidden;
    /* HUD shape */
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
    animation: cxp-upload-breathe 3s ease-in-out infinite;
}
/* Corner cut accent */
.cxp-upload-zone::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 16px; height: 16px;
    background: rgba(0,212,255,.3);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
}
/* Animated scan beam */
.cxp-upload-zone::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,.7), transparent);
    animation: cxp-scan-h 2.5s linear infinite;
    z-index: 1;
}
.cxp-upload-zone:hover,
.cxp-upload-zone.dragover {
    border-color: rgba(0,212,255,.7);
    background: rgba(0,212,255,.06);
    box-shadow: 0 0 30px rgba(0,212,255,.15), inset 0 0 30px rgba(0,212,255,.05);
    animation: none;
}

.cxp-upload-icon {
    font-size: 52px;
    color: rgba(0,212,255,.5);
    margin-bottom: 16px;
    display: block;
    line-height: 1;
}

.cxp-upload-title {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    letter-spacing: 3px;
    color: #ddeeff;
    margin-bottom: 8px;
}

.cxp-upload-sub {
    font-family: 'Rajdhani', sans-serif;
    font-size: 13px;
    color: rgba(0,212,255,.5);
    margin-bottom: 24px;
    line-height: 1.6;
}

.cxp-file-btn {
    font-family: 'Orbitron', monospace;
    display: inline-block;
    background: rgba(0,212,255,.08);
    border: 1px solid rgba(0,212,255,.5);
    border-top-color: rgba(0,212,255,.8);
    color: #00d4ff;
    padding: 11px 32px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
    transition: all .25s;
    position: relative;
    overflow: hidden;
    text-shadow: 0 0 8px rgba(0,212,255,.5);
}
.cxp-file-btn::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #00d4ff, transparent);
    animation: cxp-scan-h 2s linear infinite;
}
.cxp-file-btn:hover {
    background: rgba(0,212,255,.18);
    box-shadow: 0 0 20px rgba(0,212,255,.4), inset 0 0 10px rgba(0,212,255,.08);
    letter-spacing: 3.5px;
    color: #7ee8ff;
}

.cxp-file-name {
    display: block;
    margin-top: 14px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: #00ff88;
    min-height: 18px;
    letter-spacing: .5px;
}

.cxp-file-input { display: none; }

/* ---------- BADGE IA — NEURAL LINK INDICATOR ---------- */

.cxp-ia-tag {
    background: linear-gradient(135deg, rgba(0,255,136,.04) 0%, rgba(0,50,30,.06) 100%);
    border-left: 3px solid #00ff88;
    border-top: 1px solid rgba(0,255,136,.15);
    border-right: 1px solid rgba(0,255,136,.05);
    border-bottom: 1px solid rgba(0,255,136,.05);
    padding: 12px 16px;
    margin: 20px 0;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: rgba(0,255,136,.65);
    letter-spacing: .8px;
    line-height: 1.7;
    position: relative;
    overflow: hidden;
}
.cxp-ia-tag::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 8px; height: 8px;
    background: rgba(0,255,136,.5);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
}
.cxp-ia-tag strong {
    color: #00ff88;
    text-shadow: 0 0 8px rgba(0,255,136,.4);
}

/* ---------- BOTÓN RADICAR — POWER CORE IRON MAN ---------- */

.cxp-btn-radicar {
    width: 100%;
    margin-top: 22px;
    padding: 18px 0;
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 4px;
    background: linear-gradient(270deg, #3d2800, #c8a84b, #fff3c4, #e8c96d, #c8a84b, #3d2800);
    background-size: 300% 100%;
    border: none;
    border-top: 1px solid rgba(232,201,109,.6);
    border-bottom: 1px solid rgba(200,168,75,.3);
    color: #0a0800;
    clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: letter-spacing .3s, color .2s;
    text-shadow: 0 1px 0 rgba(255,255,255,.3);
    animation: cxp-radicar-power 4s ease-in-out infinite;
}
.cxp-btn-radicar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.8), transparent);
    animation: cxp-scan-h 2s linear infinite;
}
.cxp-btn-radicar::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(200,168,75,.5), transparent);
    animation: cxp-scan-h 2s linear infinite reverse;
}
.cxp-btn-radicar:hover:not(:disabled) {
    letter-spacing: 6px;
    color: #000;
    box-shadow: 0 0 30px rgba(200,168,75,.8), 0 0 70px rgba(200,168,75,.35), 0 0 120px rgba(200,168,75,.15);
}
.cxp-btn-radicar:disabled {
    background: linear-gradient(90deg, #1a1a1a, #2a2a2a, #1a1a1a);
    color: #444;
    cursor: not-allowed;
    animation: none;
    box-shadow: none;
    border-color: rgba(255,255,255,.05);
    clip-path: polygon(14px 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}

/* ---------- LOADING SPINNER — ARC REACTOR ---------- */

.cxp-loading {
    display: none;
    text-align: center;
    padding: 32px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(0,212,255,.6);
    text-transform: uppercase;
    animation: cxp-flicker 4s ease-in-out infinite;
}

.cxp-spinner {
    width: 48px; height: 48px;
    position: relative;
    margin: 0 auto 18px;
}
.cxp-spinner::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-top-color: #00d4ff;
    border-right-color: rgba(0,212,255,.3);
    border-radius: 50%;
    animation: cxp-spin .7s linear infinite;
    box-shadow: 0 0 14px rgba(0,212,255,.5);
}
.cxp-spinner::after {
    content: '';
    position: absolute;
    inset: 6px;
    border: 2px solid transparent;
    border-bottom-color: #e8c96d;
    border-left-color: rgba(200,168,75,.3);
    border-radius: 50%;
    animation: cxp-spin-r 1.1s linear infinite;
    box-shadow: 0 0 10px rgba(200,168,75,.4);
}

/* ---------- ORDEN INFO CARD ---------- */

.cxp-orden-card {
    background: linear-gradient(135deg, #050d1f, #030811);
    border: 1px solid rgba(200,168,75,.2);
    border-radius: 4px;
    padding: 20px 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}
.cxp-orden-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(200,168,75,.4), transparent);
}

.cxp-orden-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.cxp-orden-item label {
    display: block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: rgba(0,212,255,.5);
    margin-bottom: 3px;
    text-transform: uppercase;
}

.cxp-orden-item span {
    font-family: 'Rajdhani', sans-serif;
    font-size: 15px;
    color: #ddeeff;
    font-weight: 500;
}

.cxp-valor-orden {
    font-family: 'Orbitron', monospace !important;
    font-size: 24px !important;
    color: #e8c96d !important;
    font-weight: 700 !important;
    animation: cxp-gold-pulse 3s ease-in-out infinite;
    display: inline-block;
}

/* ---------- ALERTAS CXP ---------- */

.cxp-alert {
    padding: 12px 16px;
    border-radius: 3px;
    margin-bottom: 14px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: .5px;
    line-height: 1.5;
}
.cxp-alert-error {
    background: rgba(255,68,102,.08);
    border-left: 3px solid #ff4466;
    color: rgba(255,200,200,.8);
}
.cxp-alert-warning {
    background: rgba(255,200,0,.08);
    border-left: 3px solid #ffc800;
    color: rgba(255,230,150,.8);
}
.cxp-alert-success {
    background: rgba(0,255,136,.08);
    border-left: 3px solid #00ff88;
    color: rgba(150,255,200,.8);
}

/* ---------- DETALLE CXP ---------- */

.cxp-det-header {
    background: linear-gradient(135deg, #060e22 0%, #030811 100%);
    border: 1px solid rgba(0,212,255,.2);
    border-top: 2px solid rgba(0,212,255,.4);
    border-radius: 0;
    padding: 22px 26px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    position: relative;
    overflow: hidden;
    /* JARVIS cut corners */
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
/* Dual scan lines — cyan top / gold bottom */
.cxp-det-header::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00d4ff, #e8c96d, #00d4ff);
    background-size: 200% auto;
    animation: cxp-btn-holo 3s linear infinite;
}
.cxp-det-header::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 20px; height: 20px;
    background: rgba(0,212,255,.4);
    clip-path: polygon(100% 0, 100% 100%, 0 0);
}

.cxp-det-titulo {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #ddeeff;
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.cxp-det-sub {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: rgba(0,212,255,.55);
    letter-spacing: 1px;
}

.cxp-det-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.cxp-det-full { grid-column: 1 / -1; }

.cxp-det-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 7px 0;
    border-bottom: 1px solid rgba(0,212,255,.05);
}
.cxp-det-row:last-child { border-bottom: none; }

.cxp-det-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 9px;
    letter-spacing: 1.5px;
    color: rgba(0,212,255,.5);
    text-transform: uppercase;
}

.cxp-det-value {
    font-family: 'Rajdhani', sans-serif;
    font-size: 14px;
    color: #ddeeff;
    font-weight: 500;
}

.cxp-money {
    font-family: 'Orbitron', monospace;
    font-size: 15px;
    color: #00d4ff;
    font-weight: 700;
}

.cxp-money-total {
    font-family: 'Orbitron', monospace;
    font-size: 20px;
    color: #e8c96d;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(200,168,75,.4);
}

.cxp-saldo {
    font-family: 'Orbitron', monospace;
    font-size: 17px;
    color: #ffc800;
    font-weight: 700;
}

/* ---------- ACCIONES DETALLE ---------- */

.cxp-det-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}

/* ---------- HISTORIAL DE ESTADOS ---------- */

.cxp-historial-item {
    padding: 10px 14px;
    border-left: 3px solid rgba(0,212,255,.3);
    margin-bottom: 8px;
    background: rgba(0,212,255,.03);
    border-radius: 0 3px 3px 0;
    transition: border-color .2s;
}
.cxp-historial-item:hover {
    border-left-color: #00d4ff;
}

.cxp-historial-estado {
    font-family: 'Orbitron', monospace;
    font-size: 9px;
    letter-spacing: 2px;
    color: #00d4ff;
    text-transform: uppercase;
}

.cxp-historial-meta {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    color: rgba(0,212,255,.4);
    margin-top: 3px;
    letter-spacing: .5px;
}

.cxp-historial-obs {
    font-family: 'Rajdhani', sans-serif;
    font-size: 12px;
    color: rgba(184,204,223,.7);
    margin-top: 5px;
    line-height: 1.5;
}

/* ---------- VALIDACIÓN STATUS ---------- */

.cxp-val-ok {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(0,255,136,.06);
    border: 1px solid rgba(0,255,136,.3);
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: #00ff88;
}

.cxp-val-fail {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255,68,102,.06);
    border: 1px solid rgba(255,68,102,.3);
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: #ff4466;
}

/* ---------- PREVIEW DE DATOS (proveedor no encontrado) ---------- */

.cxp-preview-card {
    background: linear-gradient(135deg, #0a0810, #050308);
    border: 1px solid rgba(255,68,102,.3);
    border-radius: 4px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: rgba(255,150,150,.7);
    letter-spacing: .5px;
    line-height: 1.7;
}
.cxp-preview-card strong { color: #ff4466; }

/* ---------- FILTROS LISTA ---------- */

.cxp-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    align-items: center;
}

.cxp-filter-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1.5px;
    color: rgba(0,212,255,.5);
}

.cxp-filter-btn {
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    padding: 5px 14px;
    background: transparent;
    border: 1px solid rgba(0,212,255,.2);
    color: rgba(0,212,255,.6);
    border-radius: 2px;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s;
    display: inline-block;
}
.cxp-filter-btn:hover,
.cxp-filter-btn.active {
    background: rgba(0,212,255,.1);
    border-color: rgba(0,212,255,.5);
    color: #00d4ff;
    text-decoration: none;
}

/* ---------- FILE INPUT (form legacy) ---------- */

.cxp-file {
    border: 1px dashed rgba(0,212,255,.35);
    padding: 25px;
    text-align: center;
    background: rgba(0,212,255,.03);
    cursor: pointer;
    transition: all .2s;
}
.cxp-file:hover {
    border-color: #00d4ff;
    background: rgba(0,212,255,.06);
}
.cxp-file input {
    border: none;
    background: none;
}

/* ---------- ACTIONS LEGACY ---------- */

.cxp-actions {
    margin-top: 30px;
    text-align: right;
}

/* ---------- RADICAR — PREVIEW LAYOUT ---------- */

.cxp-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 16px;
    padding: 10px 16px;
    background: rgba(0,212,255,.04);
    border: 1px solid rgba(0,212,255,.15);
    border-radius: 4px;
}

.cxp-preview-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 1.5px;
    color: #00d4ff;
}

.cxp-ia-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
    animation: cxp-glow-pulse 1.5s ease-in-out infinite;
}

.cxp-preview-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: start;
}

.cxp-pdf-col {
    position: sticky;
    top: 16px;
}

.cxp-pdf-viewer {
    width: 100%;
    aspect-ratio: 8.5 / 11;
    background: rgba(0,0,0,.4);
    border: 1px solid rgba(0,212,255,.2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    min-height: 500px;
}

.cxp-pdf-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.cxp-pdf-open-btn {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    display: block;
    margin-top: 8px;
}

.cxp-data-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cxp-data-col .cxp-card { margin-bottom: 0; }

.cxp-nit-match {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 6px;
    padding: 6px 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    border-radius: 3px;
    background: rgba(0,255,136,.06);
    border: 1px solid rgba(0,255,136,.25);
    color: #00ff88;
}

.cxp-nit-concordancia {
    margin-top: 8px;
    padding: 6px 10px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    border-radius: 3px;
}
.cxp-nit-concordancia.ok {
    background: rgba(0,255,136,.06);
    border: 1px solid rgba(0,255,136,.25);
    color: #00ff88;
}
.cxp-nit-concordancia.warn {
    background: rgba(232,201,109,.06);
    border: 1px solid rgba(232,201,109,.3);
    color: #e8c96d;
}

.cxp-nit-nomatch {
    margin-top: 10px;
    padding: 10px 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    line-height: 1.8;
    background: rgba(255,68,102,.06);
    border: 1px solid rgba(255,68,102,.3);
    border-radius: 3px;
    color: #ff4466;
}

.cxp-val-missing { color: #ff4466 !important; font-weight: 700; }
.cxp-highlight   { color: #00d4ff !important; font-weight: 700; }

@media (max-width: 1100px) {
    .cxp-preview-layout { grid-template-columns: 1fr; }
    .cxp-pdf-col { position: static; }
    .cxp-pdf-viewer { min-height: 420px; aspect-ratio: 8.5 / 7; }
}

/* ---------- DETALLE — ELEMENTOS ADICIONALES ---------- */

.cxp-det-row-total {
    border-top: 1px solid rgba(0,212,255,.1);
    padding-top: 10px;
    margin-top: 4px;
}

.cxp-saldo-cero {
    color: #00ff88;
    font-weight: 700;
}

.cxp-det-descripcion {
    font-size: 11px;
    line-height: 1.5;
    color: rgba(0,212,255,.6);
    font-style: italic;
}

.cxp-val-pending {
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(0,212,255,.04);
    border: 1px solid rgba(0,212,255,.2);
    border-radius: 3px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    letter-spacing: 1px;
    color: rgba(0,212,255,.6);
}

.cxp-empty-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: rgba(0,212,255,.3);
    letter-spacing: 1.5px;
}

/* --- cambio de estado --- */

.cxp-estado-form { display: flex; flex-direction: column; gap: 14px; }

.cxp-estado-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.cxp-btn-estado {
    font-family: 'Rajdhani', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 8px 18px;
    border: none;
    cursor: pointer;
    clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
    transition: all .2s;
    background: rgba(0,212,255,.08);
    border: 1px solid rgba(0,212,255,.25);
    color: rgba(0,212,255,.8);
}
.cxp-btn-estado:hover {
    background: rgba(0,212,255,.15);
    color: #00d4ff;
    letter-spacing: 3px;
}
.cxp-btn-estado-ACEPTADA {
    background: rgba(0,255,136,.08);
    border-color: rgba(0,255,136,.3);
    color: rgba(0,255,136,.8);
}
.cxp-btn-estado-ACEPTADA:hover {
    background: rgba(0,255,136,.15);
    color: #00ff88;
}
.cxp-btn-estado-RECHAZADA, .cxp-btn-estado-ANULADA {
    background: rgba(255,68,102,.08);
    border-color: rgba(255,68,102,.3);
    color: rgba(255,68,102,.8);
}
.cxp-btn-estado-RECHAZADA:hover, .cxp-btn-estado-ANULADA:hover {
    background: rgba(255,68,102,.15);
    color: #ff4466;
}
.cxp-btn-estado-NOTA_CONTABLE {
    background: rgba(232,201,109,.08);
    border-color: rgba(232,201,109,.3);
    color: rgba(232,201,109,.8);
}
.cxp-btn-estado-NOTA_CONTABLE:hover {
    background: rgba(232,201,109,.15);
    color: #e8c96d;
}

.cxp-input-obs {
    width: 100%;
    background: rgba(0,212,255,.03);
    border: 1px solid rgba(0,212,255,.15);
    border-radius: 3px;
    padding: 8px 12px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    letter-spacing: 1px;
    color: rgba(0,212,255,.7);
    box-sizing: border-box;
    transition: border-color .2s;
}
.cxp-input-obs::placeholder { color: rgba(0,212,255,.3); }
.cxp-input-obs:focus {
    outline: none;
    border-color: rgba(0,212,255,.5);
    background: rgba(0,212,255,.06);
}

/* badge extra estados */
.cxp-badge-NOTA_CONTABLE { background: rgba(232,201,109,.12); color: #e8c96d; border-color: rgba(232,201,109,.4); }
.cxp-badge-EN_REVISION   { background: rgba(0,212,255,.1);   color: #00d4ff; border-color: rgba(0,212,255,.4); }
.cxp-badge-PAGADA        { background: rgba(0,255,136,.12);  color: #00ff88; border-color: rgba(0,255,136,.4); }
.cxp-badge-ANULADA       { background: rgba(120,120,140,.1); color: rgba(180,180,200,.6); border-color: rgba(180,180,200,.2); }

/* ---------- RESPONSIVE ---------- */

@media (max-width: 900px) {
    .cxp-stat-grid { grid-template-columns: 1fr 1fr; }
    .cxp-det-grid { grid-template-columns: 1fr; }
    .cxp-det-full { grid-column: 1; }
    .cxp-form-grid { grid-template-columns: 1fr; }
    .cxp-provider { grid-column: span 1; }
    .cxp-orden-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .cxp-stat-grid { grid-template-columns: 1fr 1fr; }
    .cxp-panel { padding: 0 12px; }
    .cxp-det-header { flex-direction: column; gap: 12px; }
}

/* ================================================================
   AJUSTE GLOBAL DE FUENTES +1pt — todas las pantallas Iron Man
   Regla: los tamaños 9px→11px, 10px→12px, 11px→13px, 12px→13px
   Inputs siempre en color blanco para legibilidad
   ================================================================ */

/* Etiquetas y badges pequeños */
.cxp-stat-label         { font-size: 11px !important; }
.cxp-section-title      { font-size: 11px !important; }
.cxp-subtitle           { font-size: 14px !important; }
.cxp-badge              { font-size: 11px !important; padding: 3px 13px !important; }
.cxp-filter-label       { font-size: 12px !important; }
.cxp-filter-btn         { font-size: 12px !important; padding: 6px 16px !important; }
.cxp-btn-ver            { font-size: 12px !important; padding: 6px 18px !important; }

/* Tabla */
.cxp-table              { font-size: 13px !important; }
.cxp-table th           { font-size: 11px !important; }
.cxp-table td           { font-size: 13px !important; }
.cxp-table .money,
.cxp-table .money-total { font-size: 14px !important; }

/* Detalle */
.cxp-det-label          { font-size: 11px !important; }
.cxp-det-value          { font-size: 15px !important; }
.cxp-det-titulo         { font-size: 19px !important; }
.cxp-det-sub            { font-size: 12px !important; }
.cxp-money              { font-size: 16px !important; }
.cxp-money-total        { font-size: 21px !important; }
.cxp-saldo              { font-size: 18px !important; }

/* Historial */
.cxp-historial-estado   { font-size: 11px !important; }
.cxp-historial-meta     { font-size: 12px !important; }
.cxp-historial-obs      { font-size: 13px !important; }

/* Orden */
.cxp-orden-item label   { font-size: 11px !important; }
.cxp-orden-item span    { font-size: 16px !important; }

/* Alertas y validaciones */
.cxp-alert              { font-size: 12px !important; }
.cxp-val-ok,
.cxp-val-fail,
.cxp-val-pending        { font-size: 12px !important; }
.cxp-ia-tag             { font-size: 12px !important; }
.cxp-empty-text         { font-size: 12px !important; }
.cxp-preview-card       { font-size: 12px !important; }
.cxp-preview-badge      { font-size: 12px !important; }
.cxp-det-descripcion    { font-size: 12px !important; }
.cxp-nit-concordancia,
.cxp-nit-match,
.cxp-nit-nomatch        { font-size: 12px !important; }
.cxp-input-obs          { font-size: 13px !important; color: #ffffff !important; }

/* Botones acción */
.cxp-btn-primary,
.cxp-btn-gold           { font-size: 12px !important; }
.cxp-btn-outline        { font-size: 12px !important; }
.cxp-btn-estado         { font-size: 12px !important; }
.cxp-btn-radicar        { font-size: 15px !important; }

/* Upload */
.cxp-upload-title       { font-size: 15px !important; }
.cxp-upload-sub         { font-size: 14px !important; }
.cxp-file-btn           { font-size: 12px !important; }
.cxp-file-name          { font-size: 13px !important; }

/* Campos de captura — texto siempre blanco */
.cxp-field input,
.cxp-field select,
.cxp-field textarea     { color: #ffffff !important; font-size: 15px !important; }

/* Inputs en blanco SOLO dentro de contextos oscuros */
.cxp-panel input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
.cxp-panel select,
.cxp-panel textarea,
.cxp-panel .form-control,
.sidebar input,
.sidebar select,
.sidebar .form-control  { color: #ffffff !important; }

.cxp-panel input::placeholder,
.cxp-panel textarea::placeholder,
.sidebar input::placeholder { color: rgba(255,255,255,.38) !important; }
