﻿/*
 * Salutek admin layout standard (ui-layout-standard).
 * Opt-in: every rule is scoped to an sk-* class, so screens that do not use sk-* markup render unchanged.
 * Self-contained: no external resources and no imports (runtime-assets closure).
 * Containers never clip their content, so DevExpress and Chosen popups stay visible.
 */

:root {
  --sk-space-1: 4px;
  --sk-space-2: 8px;
  --sk-space-3: 16px;
  --sk-space-4: 24px;
  --sk-space-5: 32px;
  --sk-control-h: 42px;
  --sk-radius: 4px;
  --sk-primary: #0c5460;
  --sk-primary-hover: #094049;
  --sk-primary-active: #073138;
  --sk-primary-soft: #e8f1f3;
  --sk-accent: #0e7490;
  --sk-nav-bg: #1b4d3e;
  --sk-nav-hover: #143a2f;
  --sk-header-bg: #1b4d3e;
  --sk-header-fg: #ffffff;
  --sk-bg-page: #f4f6f9;
  --sk-surface: #ffffff;
  --sk-surface-alt: #f8fafc;
  --sk-surface-subtle: #eef2f6;
  --sk-danger: #b02a37;
  --sk-danger-hover: #8f2230;
  --sk-danger-soft: #fee2e2;
  --sk-border: #ced4da;
  --sk-border-strong: #7c858d;
  --sk-border-subtle: #e2e8f0;
  --sk-success: #166534;
  --sk-success-soft: #dcfce7;
  --sk-warning: #92400e;
  --sk-warning-soft: #fef3c7;
  --sk-info: #0c5460;
  --sk-info-soft: #e0f2fe;
  --sk-text: #2a2a2a;
  --sk-muted: #5c636a;
  --sk-font-xs: 12px;
  --sk-font-sm: 13px;
  --sk-font-md: 14px;
  --sk-font-lg: 16px;
  --sk-font-xl: 20px;
  --sk-focus-ring: 0 0 0 3px rgba(12, 84, 96, 0.45);
  --sk-focus-ring-inverse: 0 0 0 3px #ffffff;
}

:root[data-sk-theme="institucional"] {
  --sk-primary: #0c5460;
  --sk-primary-hover: #094049;
  --sk-primary-active: #073138;
  --sk-primary-soft: #e8f1f3;
  --sk-accent: #0e7490;
  --sk-nav-bg: #1b4d3e;
  --sk-nav-hover: #143a2f;
  --sk-header-bg: #1b4d3e;
  --sk-header-fg: #ffffff;
  --sk-bg-page: #f4f6f9;
  --sk-surface: #ffffff;
  --sk-surface-alt: #f8fafc;
  --sk-surface-subtle: #eef2f6;
  --sk-danger: #b02a37;
  --sk-danger-hover: #8f2230;
  --sk-danger-soft: #fee2e2;
  --sk-border: #ced4da;
  --sk-border-strong: #7c858d;
  --sk-border-subtle: #e2e8f0;
  --sk-success: #166534;
  --sk-success-soft: #dcfce7;
  --sk-warning: #92400e;
  --sk-warning-soft: #fef3c7;
  --sk-info: #0c5460;
  --sk-info-soft: #e0f2fe;
  --sk-text: #2a2a2a;
  --sk-muted: #5c636a;
}

/* ---------- Page header: title left, actions right ---------- */

.panel-financiero-main .panel-heading:has(> .sk-page-actions),
.panel-medico-main .panel-heading:has(> .sk-page-actions),
.panel-salutek-main .panel-heading:has(> .sk-page-actions) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sk-space-3);
}

.panel-financiero-main .panel-heading:has(> .sk-page-actions) > h1,
.panel-financiero-main .panel-heading:has(> .sk-page-actions) > h2,
.panel-medico-main .panel-heading:has(> .sk-page-actions) > h1,
.panel-medico-main .panel-heading:has(> .sk-page-actions) > h2,
.panel-salutek-main .panel-heading:has(> .sk-page-actions) > h1,
.panel-salutek-main .panel-heading:has(> .sk-page-actions) > h2 {
  margin: 0;
  min-width: 0;
}

.sk-page-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sk-space-2);
  margin-left: auto;
}

/* ---------- Buttons ---------- */

a.sk-btn,
button.sk-btn,
input.sk-btn,
.sk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-sizing: border-box;
  height: var(--sk-control-h, 42px);
  min-height: var(--sk-control-h, 42px);
  margin: 0;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--sk-radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
}

/* Compact button variant: reserved exclusively for GridView row cells */
a.sk-btn--sm,
button.sk-btn--sm,
input.sk-btn--sm,
.sk-btn--sm {
  height: 32px;
  min-height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
}

/* Uniform height for legacy Bootstrap .btn siblings inside action bars */
.sk-toolbar .btn:not(.btn-xs):not(.sk-ai-btn):not(.sk-btn--sm):not(.btn-login),
.sk-filter__actions .btn:not(.btn-xs):not(.sk-ai-btn):not(.sk-btn--sm):not(.btn-login),
.sk-form__actions .btn:not(.btn-xs):not(.sk-ai-btn):not(.sk-btn--sm):not(.btn-login),
.sk-page-actions .btn:not(.btn-xs):not(.sk-ai-btn):not(.sk-btn--sm):not(.btn-login),
.sk-sol-modal__foot .btn:not(.btn-xs):not(.sk-ai-btn):not(.sk-btn--sm):not(.btn-login) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: var(--sk-control-h, 42px);
  min-height: var(--sk-control-h, 42px);
  padding: 0 16px;
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.2;
  vertical-align: middle;
  white-space: nowrap;
}

.sk-sol-modal__foot {
  align-items: center;
}

.sk-btn:hover,
.sk-btn:focus {
  text-decoration: none;
}

.sk-btn:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--sk-focus-ring);
}

.sk-btn--primary {
  background-color: var(--sk-primary);
  border-color: var(--sk-primary);
  color: #ffffff;
}

.sk-btn--primary:hover,
.sk-btn--primary:focus {
  background-color: var(--sk-primary-hover);
  border-color: var(--sk-primary-hover);
  color: #ffffff;
}

.sk-btn--secondary {
  background-color: #ffffff;
  border-color: var(--sk-primary);
  color: var(--sk-primary);
}

.sk-btn--secondary:hover,
.sk-btn--secondary:focus {
  background-color: var(--sk-primary-soft);
  color: var(--sk-primary-hover);
}

.sk-btn--ghost {
  background-color: transparent;
  border-color: transparent;
  color: var(--sk-primary);
}

.sk-btn--ghost:hover,
.sk-btn--ghost:focus {
  background-color: var(--sk-primary-soft);
  color: var(--sk-primary-hover);
}

.sk-btn--danger {
  background-color: var(--sk-danger);
  border-color: var(--sk-danger);
  color: #ffffff;
}

.sk-btn--danger:hover,
.sk-btn--danger:focus {
  background-color: var(--sk-danger-hover);
  border-color: var(--sk-danger-hover);
  color: #ffffff;
}

/* Header variants. Only the dark-gradient headers get the inverted (white-on-dark) buttons:
   .panel-salutek-main (layout2 #0c5460 -> #155724; role layouts use lighter teal gradients) and
   .panel-financiero-main (facturacion blue gradient). Ghost/secondary carry their own dark tint so white text
   stays >= 4.5:1 on every stop. Any other header (for example .panel-medico-main, whose heading has no
   background and renders on white) keeps the base dark-on-light variants above (>= 8.5:1 on white). */

.panel-salutek-main .panel-heading .sk-page-actions .sk-btn--primary,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn--primary {
  background-color: #ffffff;
  border-color: #ffffff;
  color: var(--sk-primary);
}

.panel-salutek-main .panel-heading .sk-page-actions .sk-btn--primary:hover,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn--primary:hover,
.panel-salutek-main .panel-heading .sk-page-actions .sk-btn--primary:focus,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn--primary:focus {
  background-color: var(--sk-primary-soft);
  border-color: var(--sk-primary-soft);
  color: var(--sk-primary-hover);
}

.panel-salutek-main .panel-heading .sk-page-actions .sk-btn--secondary,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn--secondary {
  background-color: rgba(0, 0, 0, 0.35);
  border-color: #ffffff;
  color: #ffffff;
}

.panel-salutek-main .panel-heading .sk-page-actions .sk-btn--ghost,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn--ghost {
  background-color: rgba(0, 0, 0, 0.35);
  border-color: transparent;
  color: #ffffff;
}

.panel-salutek-main .panel-heading .sk-page-actions .sk-btn--secondary:hover,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn--secondary:hover,
.panel-salutek-main .panel-heading .sk-page-actions .sk-btn--secondary:focus,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn--secondary:focus,
.panel-salutek-main .panel-heading .sk-page-actions .sk-btn--ghost:hover,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn--ghost:hover,
.panel-salutek-main .panel-heading .sk-page-actions .sk-btn--ghost:focus,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn--ghost:focus {
  background-color: rgba(0, 0, 0, 0.5);
  color: #ffffff;
}

.panel-salutek-main .panel-heading .sk-page-actions .sk-btn:focus-visible,
.panel-financiero-main .panel-heading .sk-page-actions .sk-btn:focus-visible {
  box-shadow: var(--sk-focus-ring-inverse);
}

/* ---------- Content blocks (vertical rhythm 24px) ---------- */

.sk-alert,
.sk-toolbar,
.sk-filter,
.sk-card {
  margin: 0 0 var(--sk-space-4);
}

.sk-card {
  box-sizing: border-box;
  min-width: 0;
  background-color: #ffffff;
  border: 1px solid #e3e7eb;
  border-radius: var(--sk-radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.sk-card__body {
  box-sizing: border-box;
  min-width: 0;
  padding: var(--sk-space-3);
  overflow-x: auto;
}

.sk-card__body > form {
  margin: 0;
}

/* Opt-in keyboard scrolling (D7 d7-dx-rendered-remediation item 6): a card body that scrolls wide content
   (e.g. a PivotGrid) is given tabindex="0" role="region" aria-label in the view. */
.sk-card__body[tabindex]:focus-visible {
  outline: 2px solid var(--sk-primary);
  outline-offset: -2px;
}

.sk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sk-space-2);
}

/* A DevExpress check box in a toolbar keeps its own width (Phase 5, Programaciones "Mostrar todos"): the legacy
   layout rule .panel-salutek-main table:not(...) { width: 100% } would stretch it across the row. */
.sk-toolbar > table[class*="dxeBase"] {
  width: auto !important;
}

.sk-section-title {
  margin: 0 0 var(--sk-space-3);
  color: var(--sk-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- Filters and forms ---------- */

.sk-filter {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sk-space-3);
  align-items: end;
}

.sk-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--sk-space-3) var(--sk-space-4);
  align-items: end;
}

.sk-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
}

/* The global label rule (devexpress-modernization-salutek.css) is !important; beat it by specificity. */
.sk-field > label {
  display: block !important;
  margin: 0 0 4px !important;
  color: var(--sk-text) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
}

/* !important: the legacy fixed-width helpers (.input100/.input200/.input400) are themselves !important. */
.sk-field > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.sk-field > select {
  box-sizing: border-box;
  width: 100% !important;
  height: var(--sk-control-h);
}

/* Visible caption that has no associable control: same rendering as .sk-field > label. */
.sk-field > .sk-field__label {
  display: block;
  margin: 0 0 4px;
  color: var(--sk-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

/* Caption-less field (for example a DevExpress check box): centred in a control-height row. */
.sk-field--inline {
  justify-content: center;
  min-height: var(--sk-control-h);
}

/* Chosen (chzn) single select: full cell width, control height, arrow re-centred for 42px. */
.sk-field .chzn-container {
  width: 100% !important;
  margin-left: 0 !important;
}

/* Chosen 0.9 caches inline pixel widths on the drop and its search input at init; keep them inside the field. */
.sk-field .chzn-drop,
.sk-field .chzn-search input {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100%;
}

.sk-field .chzn-container-single .chzn-single {
  box-sizing: border-box;
  height: var(--sk-control-h);
  line-height: calc(var(--sk-control-h) - 2px);
}

.sk-field .chzn-container-single .chzn-single div b {
  background-position: 0 9px;
}

.sk-field .chzn-container-active .chzn-single-with-drop div b {
  background-position: -18px 9px;
}

/* DevExpress button edits (DateEdit, ComboBox) and text boxes: control height (the modernization theme
   renders them 46px and 32px) and the field width, like native inputs (L-za-5). !important beats the inline server
   width (pixel-width ComboBoxes from shared callback partials, e.g. GetMedicos 250px). */
.sk-field > table.dxeButtonEditSys,
.sk-field > table.dxeTextBoxSys {
  box-sizing: border-box !important;
  width: 100% !important;
  height: var(--sk-control-h) !important;
  min-height: var(--sk-control-h) !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

.sk-field > table.dxeButtonEditSys td {
  height: auto !important;
}

/* Block inputs: no inline baseline gap under the edit area. */
.sk-field > table.dxeButtonEditSys td.dxic > input.dxeEditAreaSys {
  display: block;
  height: calc(var(--sk-control-h) - 4px) !important;
}

.sk-field > table.dxeTextBoxSys td.dxic > input.dxeEditAreaSys {
  display: block;
  height: calc(var(--sk-control-h) - 2px) !important;
}

/* The edit area fills its cell (L-za-5). DevExpress sizes it with .dxeEditAreaSys { width: 100% } and content-box in
   its DXR.axd stylesheet; without that stylesheet (audit harness) it kept its intrinsic 177px. Border-box keeps the
   theme padding inside the cell in both cases. */
.sk-field > table.dxeButtonEditSys td.dxic > input.dxeEditAreaSys,
.sk-field > table.dxeTextBoxSys td.dxic > input.dxeEditAreaSys {
  box-sizing: border-box !important;
  width: 100% !important;
}

/* A filter rendered as a card pads itself; it never clips (Chosen and DevExpress popups stay visible). */
.sk-card.sk-filter {
  padding: var(--sk-space-3);
}

.sk-filter__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--sk-space-2);
  padding-top: var(--sk-space-2);
  border-top: 1px solid var(--sk-border-subtle);
}

.sk-filter__actions--inline {
  grid-column: auto;
  justify-content: flex-start;
  flex-wrap: nowrap;
  padding-top: 0;
  border-top: 0;
}

.sk-filter__actions > form {
  margin: 0;
}

/* DevExpress buttons carry a 0 5px theme margin; inside the action row the gap does the spacing. */
.sk-filter__actions .dxbButtonSys {
  margin: 0 !important;
}

/* Section heading that shares a toolbar row with its section actions. */
.sk-toolbar > .sk-section-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

/* ---------- Hub pages: shortcut tile groups (Phase 4) ---------- */

/* Each shortcut group is a .sk-card.sk-hub: an h2.sk-section-title, then the unchanged ul.shortcuts tile list
   (shortcuts-salutek.css). The body neither clips nor scrolls: tiles reflow inside the card, and their hover
   lift and shadow stay visible. */
.sk-hub > .sk-card__body {
  overflow: visible;
}

/* The legacy list carries margin 0 0 30px !important; inside the card the body padding does the spacing. */
.sk-hub > .sk-card__body > ul.shortcuts {
  margin: 0 !important;
}

/* A section whose role guards render neither a title nor a tile renders nothing (legacy: an empty list). */
.sk-hub:not(:has(.sk-section-title)):not(:has(li)) {
  display: none;
}

/* A section whose guards render its title but no tile keeps the title (legacy: the banner showed) without a
   trailing gap. */
.sk-hub:not(:has(li)) .sk-section-title {
  margin-bottom: 0;
}

/* ---------- Legend, alerts, row actions ---------- */

.sk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sk-space-2) var(--sk-space-3);
  margin: 0 0 var(--sk-space-3);
  padding: 0;
  list-style: none;
  color: var(--sk-muted);
  font-size: 13px;
}

.sk-legend__item {
  display: inline-flex;
  align-items: center;
  gap: var(--sk-space-1);
}

.sk-legend__swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 1px solid var(--sk-border);
  border-radius: 2px;
}

/* Censo: PreAlta rows (row colour set by the grid, #add8e6). */
.sk-legend__swatch--prealta {
  background-color: #add8e6;
}

/* Servicios/Lista: hospitalisation status rows (colours of the legacy legend). */
.sk-legend__swatch--liberado {
  background-color: #000080;
}

.sk-legend__swatch--parto {
  background-color: #ff1493;
}

.sk-legend__swatch--facturar {
  background-color: #fa8072;
}

.sk-legend__swatch--credito {
  background-color: #ffffe0;
}

.sk-legend__swatch--pagado {
  background-color: #e0ffff;
}

/* Phase 5 legends (HojaCuarto, HojaPacientesExternos, Reportes/HojaDePacientesExternos): legacy colours. */
.sk-legend__swatch--cuenta {
  background-color: #000080;
}

.sk-legend__swatch--expediente {
  background-color: #fa8072;
}

.sk-legend__swatch--cortesia {
  background-color: #90ee90;
}

.sk-legend__swatch--cancelado {
  background-color: #87cefa;
}

.sk-legend__swatch--observaciones {
  background-color: #d3d3d3;
}

.sk-alert {
  box-sizing: border-box;
  padding: var(--sk-space-2) var(--sk-space-3);
  border: 1px solid transparent;
  border-radius: var(--sk-radius);
  font-size: 14px;
  line-height: 1.4;
}

.sk-alert--success {
  background-color: #e6f4ea;
  border-color: #b7dfc2;
  color: #14532d;
}

.sk-alert--error {
  background-color: #fbeaec;
  border-color: #f1b8be;
  color: #8a1c27;
}

.sk-row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 24px;
  min-height: 24px;
  border-radius: var(--sk-radius);
  color: var(--sk-primary);
  vertical-align: middle;
}

.sk-row-action--danger {
  color: var(--sk-danger);
}

.sk-row-action:hover,
.sk-row-action:focus {
  background-color: var(--sk-primary-soft);
}

.sk-row-action:focus-visible {
  outline: 2px solid transparent;
  box-shadow: var(--sk-focus-ring);
}

/* ---------- Responsive and print ---------- */

@media (max-width: 767px) {
  .panel-financiero-main .panel-heading:has(> .sk-page-actions),
  .panel-medico-main .panel-heading:has(> .sk-page-actions),
  .panel-salutek-main .panel-heading:has(> .sk-page-actions) {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sk-space-2);
  }

  .sk-page-actions {
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }

  .sk-filter,
  .sk-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .sk-card__body,
  .sk-card.sk-filter {
    padding: var(--sk-space-2);
  }

  .sk-filter__actions {
    justify-content: flex-start;
  }

  .sk-filter__actions--inline {
    flex-wrap: wrap;
  }
}

@media print {
  .sk-page-actions {
    display: none !important;
  }
}

/* ui-form-standard-start */
/* Forms (ui-form-standard F0, design section 2 + amendments G1-G4): scoped to .sk-form; the unscoped .sk-form-grid keeps its behaviour. */
:root {
  --sk-field-border: #7c858d;          /* CD2; >=3:1 on #fff/#f8f9fa/#f1f3f5 - measured by the foundation test */
  --sk-field-bg-readonly: #f8f9fa;
  --sk-field-bg-disabled: #f1f3f5;
}
.sk-card.sk-form > .sk-card__body { overflow: visible; }            /* Chosen/DX drops never clipped */
.sk-form .sk-form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1199px) { .sk-form .sk-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .sk-form .sk-form-grid { grid-template-columns: minmax(0, 1fr); } }
.sk-form .sk-field--full { grid-column: 1 / -1; }
.sk-form .sk-field > label, .sk-form .sk-field__label { overflow-wrap: anywhere; }   /* G3: long unbroken captions wrap */
.sk-form .sk-fieldset { min-width: 0; margin: 0 0 var(--sk-space-4); padding: 0; border: 0; }
.sk-form .sk-fieldset:last-child { margin-bottom: 0; }
.sk-form .sk-fieldset > legend { display: block; width: 100%; margin: 0 0 var(--sk-space-3); padding: 0 0 var(--sk-space-2);
  border: 0; border-bottom: 1px solid #e3e7eb; color: var(--sk-text); font-size: 18px; font-weight: 600; line-height: 1.3; }
.sk-form .sk-fieldset--group { margin: 0; }
.sk-form .sk-fieldset--group > legend { margin: 0 0 4px; padding: 0; border: 0; font-size: 13px; }
/* natives (legacy buttons-inputs-salutek.css 2px #e0e6ed / padding 12px 16px / focus #11a8a8 are not !important) */
.sk-form .sk-field > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.sk-form .sk-field > select, .sk-form .sk-field > textarea {
  box-sizing: border-box; width: 100% !important; margin: 0; padding: 0 12px; border: 1px solid var(--sk-field-border);
  border-radius: var(--sk-radius); background-color: #fff; color: var(--sk-text); font-size: 14px; box-shadow: none; }
.sk-form .sk-field > select { padding-right: 40px; }
.sk-form .sk-field > textarea { height: auto; min-height: 80px; padding: 8px 12px; resize: vertical; }
.sk-form .sk-field > input[type="file"] { height: auto; min-height: var(--sk-control-h); padding: 8px 0; border: 0; }
.sk-form .sk-field > input:not([type="checkbox"]):not([type="radio"]):hover,
.sk-form .sk-field > select:hover, .sk-form .sk-field > textarea:hover { border-color: var(--sk-muted); }
/* G1: focus, readonly and disabled repeat the :not() chain so they win over the base rule above */
.sk-form .sk-field > input:focus-visible, .sk-form .sk-field > select:focus-visible, .sk-form .sk-field > textarea:focus-visible,
.sk-form .sk-field > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus-visible {
  outline: 2px solid var(--sk-primary); outline-offset: 1px; border-color: var(--sk-primary); box-shadow: none; }
.sk-form .sk-field > input[readonly], .sk-form .sk-field > textarea[readonly],
.sk-form .sk-field > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"])[readonly] {
  background-color: var(--sk-field-bg-readonly); }
.sk-form .sk-field > input:disabled, .sk-form .sk-field > select:disabled, .sk-form .sk-field > textarea:disabled,
.sk-form .sk-field > input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):disabled {
  background-color: var(--sk-field-bg-disabled); color: var(--sk-muted); cursor: not-allowed; }
/* checkbox / radio (beats .sk-field > label and the global !important label rule) */
.sk-form .sk-field > label.sk-check, .sk-form .sk-checks > label.sk-check {
  display: inline-flex !important; align-items: center; gap: var(--sk-space-2); min-height: 24px; margin: 0 !important;
  font-weight: 400 !important; cursor: pointer; }
.sk-form .sk-check > input[type="checkbox"], .sk-form .sk-check > input[type="radio"] {
  flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--sk-primary); }
.sk-form .sk-field--check { justify-content: flex-end; min-height: var(--sk-control-h); }
.sk-form .sk-checks { display: flex; flex-wrap: wrap; gap: var(--sk-space-2) var(--sk-space-4); }
/* Uniform (defensive: no authenticated layout loads jquery.uniform.js today) */
.sk-form .sk-field div.uploader { box-sizing: border-box; width: 100% !important; max-width: 100%; }
.sk-form .sk-check > div.checker, .sk-form .sk-check > div.radio { margin: 0 !important; }
/* DevExpress 14.2 (DateEdit/ComboBox/SpinEdit/TimeEdit share dxeButtonEditSys and are sized by the existing .sk-field rules) */
.sk-form .sk-field > table.dxeButtonEditSys, .sk-form .sk-field > table.dxeTextBoxSys { border-color: var(--sk-field-border) !important; }
.sk-form .sk-field > table[class*="dxeFocused"] { outline: 2px solid var(--sk-primary); outline-offset: 1px; }
/* G14: legacy .input100..400 on a DX table (CssClass) adds padding 12px 16px (DateEdit 69px): reset it */
.sk-form .sk-field > table.dxeButtonEditSys, .sk-form .sk-field > table.dxeTextBoxSys { padding: 0 !important; }
/* G14: a masked native DX TextBox renders table#{Name}_ET.dxeValidStEditorTable > td > input#{Name}.dxeTextBoxSys */
.sk-form .sk-field > table.dxeValidStEditorTable { width: 100% !important; }
.sk-form .sk-field > table.dxeValidStEditorTable td > input.dxeTextBoxSys {
  box-sizing: border-box; width: 100% !important; height: var(--sk-control-h); margin: 0; padding: 0 12px;
  border: 1px solid var(--sk-field-border); border-radius: var(--sk-radius); }
/* W8 (F3): DX 14.2 MetropolisBlue pads the edit cell 1px/2px (.dxeButtonEdit_MetropolisBlue[cellspacing="0"] td.dxic, DXR
   theme) and the live ButtonEdit markup sets no inline vertical padding: DateEdit/TimeEdit/ComboBox roots were 45px */
.sk-form .sk-field > table.dxeButtonEditSys td.dxic, .sk-filter .sk-field > table.dxeButtonEditSys td.dxic { padding-top: 0 !important; padding-bottom: 0 !important; }
/* G2: Memo/ListBox borders recoloured to the field border (>=3:1) */
.sk-form .sk-field > table[class*="dxeMemo"], .sk-form .sk-field > table[class*="dxeListBox"] {
  box-sizing: border-box; width: 100% !important; border-color: var(--sk-field-border) !important; }
.sk-form .sk-field > table[class*="dxeMemo"] textarea { box-sizing: border-box; width: 100% !important; min-height: 80px; }
.sk-form .sk-field > table[class*="dxeBase"]:not(.dxeButtonEditSys):not(.dxeTextBoxSys):not([class*="dxeMemo"]):not([class*="dxeListBox"]) {
  width: auto !important; }                                         /* DX CheckBox: undo layout2 table width:100% */
/* Chosen 0.9 */
.sk-form .sk-field .chzn-container-single .chzn-single,
.sk-form .sk-field .chzn-container-multi .chzn-choices {
  box-sizing: border-box; border: 1px solid var(--sk-field-border); border-radius: var(--sk-radius); background: #fff; box-shadow: none; }
.sk-form .sk-field .chzn-container-multi .chzn-choices { min-height: var(--sk-control-h); }
.sk-form .sk-field .chzn-container-active .chzn-single, .sk-form .sk-field .chzn-container-active .chzn-choices {
  border-color: var(--sk-primary); outline: 2px solid var(--sk-primary); outline-offset: 1px; }
/* G4: the closed results list (drop parked at left:-9000px) is not a keyboard scroller / extra Tab stop */
.sk-form .chzn-container-single .chzn-single:not(.chzn-single-with-drop) + .chzn-drop .chzn-results { visibility: hidden; }
/* required, hints, errors */
.sk-form .sk-required { color: var(--sk-danger); font-weight: 700; }
.sk-form .sk-form__hint { margin: 0 0 var(--sk-space-3); color: var(--sk-muted); font-size: 13px; }
.sk-form .sk-field__hint { margin: 4px 0 0; color: var(--sk-muted); font-size: 12px; line-height: 1.4; }
/* display-only rows (F3): read-only caption/value pairs in the card body; dt = field caption style, dd = plain text */
.sk-form .sk-form__summary { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr);
  gap: var(--sk-space-2) var(--sk-space-4); margin: 0 0 var(--sk-space-4); }
.sk-form .sk-form__summary > dt { grid-column: 1; margin: 0; color: var(--sk-text); font-size: 13px; font-weight: 600;
  line-height: 1.3; overflow-wrap: anywhere; }
.sk-form .sk-form__summary > dd { grid-column: 2; min-width: 0; margin: 0; color: var(--sk-text); font-size: 14px;
  line-height: 1.3; overflow-wrap: anywhere; }
@media (max-width: 767px) { .sk-form .sk-form__summary { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .sk-form .sk-form__summary > dt, .sk-form .sk-form__summary > dd { grid-column: 1; }
  .sk-form .sk-form__summary > dd + dt { margin-top: var(--sk-space-2); } }
.sk-form .field-validation-error, .sk-form .sk-field__error { display: block; margin: 4px 0 0; color: var(--sk-danger); font-size: 13px; font-weight: 600; }
.sk-form .field-validation-valid, .sk-form .validation-summary-valid { display: none; }
.sk-form .input-validation-error { border-color: var(--sk-danger) !important; }
.sk-form .validation-summary-errors { margin: 0 0 var(--sk-space-3); padding: var(--sk-space-2) var(--sk-space-3);
  border: 1px solid #f1b8be; border-radius: var(--sk-radius); background-color: #fbeaec; color: #8a1c27; }
.sk-form .validation-summary-errors ul { margin: 0; padding-left: 20px; }
/* actions */
.sk-form__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: var(--sk-space-2);
  padding: var(--sk-space-3); border-top: 1px solid #e3e7eb; }
.sk-form__actions .dxbButtonSys { margin: 0 !important; }
.sk-form__table { overflow-x: auto; }                               /* F5 detail tables scroll, the form never clips */
@media (max-width: 767px) { .sk-form__actions { padding: var(--sk-space-2); } }
.panel-body:has(.sk-form) { scroll-padding-top: var(--sk-space-5); } /* value re-measured live vs fixed navbar */
/* ui-form-standard-end */

/* ---------- Auxiliary form helpers used in views ---------- */

.sk-field__unit {
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--sk-muted);
}

.sk-form__totals {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--sk-border);
}

.sk-form__pane {
  box-sizing: border-box;
  padding: 16px;
  border: 1px solid var(--sk-border);
  border-radius: var(--sk-radius);
  background-color: var(--sk-surface);
}

.sk-form__section {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--sk-border-subtle);
}

.sk-form__files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sk-descuento-grupo__signo {
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--sk-muted);
}
