/* ==========================================================================
 * INDICE DE ESTE ARCHIVO. Solo comentarios: no cambia ninguna regla.
 * Orden: Debugger ABAP, PE02, PC00_M29_CALC, puntos de interrupcion en SE38.
 * Numero = linea donde empieza el comentario de esa parte (el texto es el del propio comentario).
 *
 *   linea 17: Debugger ABAP (SE38 + /h) y PE02 (editor de reglas), con la paleta del SAP GUI de la captura
 *   linea 24: Debugger: filas de información (programa / evento, SY-SUBRC, SY-TABIX)
 *   linea 36: Debugger: solapas
 *   linea 42: Debugger: código fuente
 *   linea 60: Debugger: pila ABAP y variables
 *   linea 82: PE02: editor de reglas
 *   linea 101: ventana agrandada: estas pantallas rellenan el alto como las demás
 *   linea 109: PC00_M29_CALC: driver de nómina Argentina (simulación)
 *   linea 133: Pantalla PC00_M29_CALC: el texto del cuerpo siempre negro (especificidad 0: no pisa reglas propias com... [menciona #w-pcalc]
 *   linea 137: SE38 en modo /h: margen izquierdo del código para fijar puntos de interrupción (breakpoints). Oculto f... [menciona #w-se38]
 * ========================================================================= */
/* Debugger ABAP (SE38 + /h) y PE02 (editor de reglas), con la paleta del SAP GUI de la captura */
.sx__rule { display: block; min-height: 330px; padding: 6px 6px 8px; background: #d9d8c6; font-size: 12px; }
.sx__dbg button, .sx__rule button.sapx__b { cursor: default; }

.sx__dbg { display: flex; flex-direction: column; min-height: 330px; padding: 6px 6px 8px; background: #d9d8c6; font-size: 12px; }
.sx__dbg > .dbg__pane { flex: 1 1 auto; }

/* --- Debugger: filas de información (programa / evento, SY-SUBRC, SY-TABIX) --- */
.dbg__info { display: grid; gap: 3px; margin-bottom: 8px; }
.dbg__r { display: flex; align-items: center; gap: 4px; min-width: 0; }
.dbg__ic { display: flex; flex: none; align-items: center; justify-content: center; width: 20px; height: 20px; }
.dbg__ic svg { width: 16px; height: 16px; }
.dbg__f { min-width: 0; padding: 1px 6px; overflow: hidden; color: #000; background: #e4e2d3; box-shadow: inset 1px 1px #8a8f96, inset -1px -1px #fff; white-space: nowrap; text-overflow: ellipsis; }
.dbg__f--w { flex: 1 1 120px; max-width: 250px; }
.dbg__f--s { flex: 0 0 38px; text-align: right; }
.dbg__f--m { flex: 0 0 76px; }
.dbg__sl { flex: none; }
.dbg__lab { flex: none; margin-left: auto; padding-left: 14px; }

/* --- Debugger: solapas --- */
.dbg__tabs { display: flex; flex-wrap: wrap; gap: 1px; padding-left: 2px; }
.dbg__tabs button { margin: 0; padding: 3px 10px 2px; color: #000; background: #c3cfda; border: 1px solid #7a8a98; border-bottom: 0; border-radius: 3px 3px 0 0; box-shadow: none; font: inherit; }
.dbg__tabs button.is-on { position: relative; z-index: 1; top: 1px; padding-bottom: 3px; background: #d9d8c6; }
.dbg__pane { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; background: #d9d8c6; border: 1px solid #7a8a98; }

/* --- Debugger: código fuente --- */
.dbg__src { display: flex; flex: 1 1 300px; flex-direction: column; min-width: 0; }
.dbg__full { flex-basis: 100%; }
.dbg__code { position: relative; flex: 1 1 262px; height: 262px; min-height: 262px; overflow: auto; background: #e6f1f2; border: 1px solid #7a8a98; box-shadow: inset 1px 1px #8a8f96; font: 12px/16px 'Courier New', monospace; }
.dbg__ln { display: flex; height: 16px; white-space: pre; }
.dbg__g { display: flex; flex: none; align-items: center; justify-content: center; width: 16px; background: #d4e3ea; cursor: default; }
.dbg__a { display: flex; flex: none; align-items: center; justify-content: center; width: 16px; background: #d4e3ea; }
.dbg__g svg, .dbg__a svg { width: 12px; height: 12px; }
.dbg__ln i { flex: none; width: 36px; padding-right: 6px; color: #5a6a94; background: #e6f1f2; font-style: normal; text-align: right; }
.dbg__ln code { padding-left: 6px; user-select: text; }
.dbg__ln b { color: #1a1aa6; font-weight: 400; }
.dbg__ln em { color: #5a6a94; font-style: italic; }
.dbg__ln s { color: #a03000; text-decoration: none; }
.dbg__ln.is-cur, .dbg__ln.is-cur i { background: #cfe4ff; }
.dbg__st { display: flex; gap: 2px; margin-top: 2px; }
.dbg__st span { padding: 1px 6px; white-space: nowrap; box-shadow: var(--bevel-status); }
.dbg__st span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* --- Debugger: pila ABAP y variables --- */
.dbg__right { display: flex; flex: 1 1 290px; flex-direction: column; gap: 8px; min-width: 0; }
.dbg__box { background: #e4e2d3; border: 1px solid #7a8a98; }
.dbg__bt { padding: 2px 6px; background: #d7d5c6; border-bottom: 1px solid #fff; font-weight: 700; }
.dbg__vt { display: flex; flex-wrap: wrap; gap: 1px; padding: 3px 3px 0; background: #d7d5c6; }
.dbg__vt button { margin: 0; padding: 2px 10px; color: #000; background: #c3cfda; border: 1px solid #7a8a98; border-bottom: 0; border-radius: 3px 3px 0 0; box-shadow: none; font: inherit; }
.dbg__vt button.is-on { background: #e4e2d3; }
.dbg__sc { max-height: 118px; overflow: auto; }
.dbg__full .dbg__sc { max-height: 240px; }
.dbg__tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.dbg__tbl th { position: sticky; top: 0; padding: 1px 6px; background: #d7d5c6; border: 1px solid #fff; border-right-color: #8a8f96; border-bottom-color: #8a8f96; font-weight: 400; text-align: left; white-space: nowrap; }
.dbg__tbl td { height: 18px; padding: 0 6px; background: #fff; border: 1px solid #c8c6b6; white-space: nowrap; }
.dbg__tbl td.c { padding: 0 2px; text-align: center; background: #e4e2d3; }
.dbg__tbl td.c svg { display: block; width: 14px; height: 14px; margin: 0 auto; }
.dbg__tbl tr.is-top td:not(.c) { background: #cfe4ff; }
.dbg__tbl input { width: 100%; min-width: 80px; padding: 0; border: 0; background: transparent; font: inherit; outline: 0; }
.dbg__nil { margin: 8px; font-style: italic; }
.sx__msg--dbg { display: flex; align-items: center; gap: 6px; }
.sx__msg--dbg .sx__ml { flex: 1; min-width: 0; }
.sx__msg--dbg .sx__mr { flex: none; padding: 0 10px; box-shadow: var(--bevel-status); }
.sx__msg .w { display: inline-block; width: 14px; height: 14px; margin-right: 2px; color: #000; background: #ffd84a; border: 1px solid #8a6a00; border-radius: 2px; font-style: normal; font-weight: 700; line-height: 12px; text-align: center; }

/* --- PE02: editor de reglas --- */
.rl__cmd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rl__cmd input { flex: 1; min-width: 0; height: 22px; padding: 1px 4px; border: 0; background: #fff; box-shadow: inset 1px 1px #8a8f96, inset -1px -1px #fff; font: 12px 'Courier New', monospace; }
.rl__cmd .sapx__b { padding: 3px 18px; }
.rl__hd, .rl__row { display: grid; grid-template-columns: 62px 88px 22px 22px minmax(0, 1fr); gap: 2px; align-items: center; }
.rl__hd { font-weight: 700; }
.rl__ops { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: hidden; }
.rl__ops b { overflow: hidden; white-space: nowrap; }
.rl__sep { display: grid; grid-template-columns: 62px 88px 22px 22px minmax(0, 1fr); gap: 2px; margin: 2px 0 5px; line-height: 12px; font: 12px 'Courier New', monospace; }
.rl__s1 { grid-column: 1 / 5; overflow: hidden; white-space: nowrap; }
.rl__so { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rl__so span { overflow: hidden; white-space: nowrap; }
.rl__row { margin-bottom: 4px; }
.rl__n, .rl__row input { height: 22px; padding: 2px 4px; border: 0; color: #000; background: #fff; box-shadow: inset 1px 1px #8a8f96, inset -1px -1px #fff; font: 12px 'Courier New', monospace; line-height: 18px; }
.rl__row input { width: 100%; min-width: 0; outline: 0; }
.rl__row input:focus { background: #fffbe6; }
.rl__row input[readonly] { background: #fff; }
.rl__row .rl__s { padding: 2px 0; text-align: center; }

/* ventana agrandada: estas pantallas rellenan el alto como las demás */
html .window--sap.is-sx:is(.is-max, .is-sized) .sx__screen > :is(.sx__dbg, .sx__rule) { flex: 1 0 auto; }
html .window--sap.is-sx:is(.is-max, .is-sized) .dbg__code { height: auto; }
html .window--sap.is-sx:is(.is-max, .is-sized) .dbg__right .dbg__box:last-child { flex: 1 1 auto; }
html .window--sap.is-sx:is(.is-max, .is-sized) .dbg__right .dbg__box:last-child .dbg__sc { max-height: none; }
@media (max-width: 600px) { .dbg__lab { padding-left: 6px; } .dbg__f--m { flex-basis: 56px; } .rl__hd, .rl__row, .rl__sep { grid-template-columns: 54px 60px 20px 20px minmax(0, 1fr); } }
@media (max-width: 600px) { .rl__ops { grid-template-columns: 1fr; } .rl__ops b:nth-child(n+2), .rl__so span:nth-child(n+2) { display: none; } .rl__so { grid-template-columns: 1fr; } }

/* --- PC00_M29_CALC: driver de nómina Argentina (simulación) --- */
.pc__sel { display: block; }
.pc__sel .sx__grp { margin-bottom: 14px; }
.pc__sel input[type="checkbox"] { justify-self: start; min-width: 0; }
.pc__sel input.is-req { background: #ffe98a; }
.pc__sel .pc__hint { margin: 2px 0 0; color: #3a4a6a; font-size: 11px; font-style: italic; }
.pc__res { display: flex; flex: 1 1 100%; flex-direction: column; min-width: 0; margin: 6px; padding: 6px 6px 8px; background: #d9d8c6; }
.pc__res .dbg__pane { display: block; flex: 1 1 auto; }
.pc__res .dbg__sc { max-height: 300px; }
.pc__res .sx__code { height: 280px; }
.pc__r { text-align: right !important; font-family: 'Courier New', monospace; }
.pc__tbl tr.pc__t td { background: #e4e2d3; font-weight: 700; }
.pc__tbl tr.pc__n td { background: #cfe4ff; font-weight: 700; }
.pc__sum { display: grid; grid-template-columns: minmax(140px, 220px) minmax(0, 1fr); gap: 4px 10px; margin: 0; padding: 8px; }
.pc__sum dt { border-bottom: 1px solid #a9a690; }
.pc__sum dd { margin: 0; font-family: 'Courier New', monospace; }
.pc__run { flex: 1 1 100%; margin: 6px; padding: 24px 20px; background: #dcd9c9; border: 1px solid #7a8a98; }
.pc__run p { margin: 0 0 10px; }
.pc__bar { height: 18px; padding: 2px; background: #fff; box-shadow: inset 1px 1px #8a8f96, inset -1px -1px #fff; }
.pc__bar i { display: block; width: 0; height: 100%; background: repeating-linear-gradient(90deg, #1c3f94 0 8px, #fff 8px 10px); transition: width .25s linear; }
html .window--sap.is-sx:is(.is-max, .is-sized) .pc__res .dbg__sc { max-height: none; }
html .window--sap.is-sx:is(.is-max, .is-sized) .pc__res .sx__code { height: auto; min-height: 280px; }
@media (max-width: 600px) { .pc__sum { grid-template-columns: 1fr; } }

/* Pantalla PC00_M29_CALC: el texto del cuerpo siempre negro (especificidad 0: no pisa reglas propias como .pc__hint o .is-bad) */
:where(#w-pcalc) :where(.sx__body, .sx__body *, .sx__msg) { color: #000; }
:where(#w-pcalc) :where(.sapx__menu, .sapx__menu *) { color: inherit; }

/* SE38 en modo /h: margen izquierdo del código para fijar puntos de interrupción (breakpoints). Oculto fuera de /h. */
.sx__code .se__g { display: none; flex: none; align-items: center; justify-content: center; width: 16px; background: #d4e3ea; cursor: pointer; }
#w-se38.is-dbg .se__g, .sx.is-dbg .se__g { display: flex; }
.sx__code .se__g svg { width: 12px; height: 12px; }
.sx__code .se__g:empty:hover::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(217, 58, 58, .35); }
