/*
 * Nexpy Platform
 * Sistema visual base para Oracle APEX 26.1 / Universal Theme.
 *
 * Aplicar globalmente con:
 *   #APP_FILES#nexpy-theme.css
 *
 * Clases de página:
 *   nexpy-login-page    Página 9999
 *   nexpy-context-page  Página de selección de contexto
 *
 * Clases de región:
 *   nexpy-context-card
 */

:root {
  --nx-color-primary: #0f766e;
  --nx-color-primary-hover: #0d9488;
  --nx-color-primary-soft: #ccfbf1;
  --nx-color-accent: #22d3ee;
  --nx-color-navy-950: #071521;
  --nx-color-navy-900: #0b1f31;
  --nx-color-navy-800: #123047;
  --nx-color-text: #172033;
  --nx-color-text-muted: #667085;
  --nx-color-border: #dbe3eb;
  --nx-color-surface: #ffffff;
  --nx-color-canvas: #f4f7fa;
  --nx-color-danger: #dc2626;
  --nx-radius-sm: 0.625rem;
  --nx-radius-md: 0.875rem;
  --nx-radius-lg: 1.25rem;
  --nx-shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
  --nx-shadow-md: 0 12px 32px rgb(15 23 42 / 0.1);
  --nx-shadow-lg: 0 30px 70px rgb(2 12 27 / 0.22);
  --nx-transition: 160ms ease;
  --nx-font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

html,
body {
  font-family: var(--nx-font-family);
}

button,
input,
select,
textarea,
.t-PageBody,
.t-Header,
.t-Body,
.t-Region,
.t-Button,
.t-Form-label,
.a-IRR-container,
.a-IRR-table {
  font-family: var(--nx-font-family);
}

body {
  background: var(--nx-color-canvas);
  color: var(--nx-color-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Encabezado y navegación */

.t-Header {
  background: rgb(255 255 255 / 0.92);
  border-bottom: 1px solid rgb(219 227 235 / 0.85);
  box-shadow: 0 1px 12px rgb(15 23 42 / 0.04);
  backdrop-filter: blur(16px);
}

.t-Header-logo-link,
.t-Header-logo-link:focus,
.t-Header-logo-link:hover {
  color: var(--nx-color-navy-900);
  font-weight: 750;
  letter-spacing: -0.025em;
}

.t-Body-nav {
  background:
    radial-gradient(circle at 20% 0%, rgb(34 211 238 / 0.1), transparent 32%),
    linear-gradient(180deg, var(--nx-color-navy-900), var(--nx-color-navy-950));
}

.t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content {
  border-radius: var(--nx-radius-sm);
  margin: 0.2rem 0.55rem;
  min-height: 2.75rem;
  transition:
    background-color var(--nx-transition),
    color var(--nx-transition),
    transform var(--nx-transition);
}

.t-TreeNav .a-TreeView-node--topLevel > .a-TreeView-content:hover {
  background: rgb(255 255 255 / 0.08);
  transform: translateX(2px);
}

.t-TreeNav .a-TreeView-node--topLevel.is-current > .a-TreeView-content {
  background: linear-gradient(135deg, rgb(13 148 136 / 0.95), rgb(8 145 178 / 0.9));
  box-shadow: 0 8px 22px rgb(8 145 178 / 0.2);
}

/* Regiones y tarjetas */

.t-Region,
.a-CardView {
  border: 1px solid var(--nx-color-border);
  border-radius: var(--nx-radius-lg);
  box-shadow: var(--nx-shadow-sm);
  overflow: hidden;
}

.t-Region {
  background: var(--nx-color-surface);
}

.t-Region-header {
  background: transparent;
  border-bottom-color: #edf1f5;
  padding-block: 1rem;
}

.t-Region-title {
  color: var(--nx-color-text);
  font-weight: 700;
  letter-spacing: -0.015em;
}

/* Elementos de formulario */

.t-Form-label {
  color: #344054;
  font-size: 0.8125rem;
  font-weight: 650;
  margin-bottom: 0.4rem;
}

.apex-item-text,
.apex-item-textarea,
.apex-item-select,
.apex-item-multi,
.a-Combobox-input,
.a-DatePicker-input {
  background-color: #fff;
  border: 1px solid #cbd5df;
  border-radius: var(--nx-radius-sm);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
  color: var(--nx-color-text);
  min-height: 2.875rem;
  padding-inline: 0.875rem;
  transition:
    border-color var(--nx-transition),
    box-shadow var(--nx-transition),
    background-color var(--nx-transition);
}

.apex-item-text:hover,
.apex-item-textarea:hover,
.apex-item-select:hover,
.a-Combobox-input:hover,
.a-DatePicker-input:hover {
  border-color: #94a3b8;
}

.apex-item-text:focus,
.apex-item-textarea:focus,
.apex-item-select:focus,
.a-Combobox-input:focus,
.a-DatePicker-input:focus {
  border-color: var(--nx-color-primary-hover);
  box-shadow: 0 0 0 4px rgb(13 148 136 / 0.14);
  outline: none;
}

.apex-item-text::placeholder,
.apex-item-textarea::placeholder {
  color: #98a2b3;
}

.t-Form-error {
  color: var(--nx-color-danger);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Botones */

.t-Button {
  border-radius: var(--nx-radius-sm);
  font-weight: 650;
  min-height: 2.75rem;
  padding-inline: 1.1rem;
  transition:
    background-color var(--nx-transition),
    border-color var(--nx-transition),
    box-shadow var(--nx-transition),
    color var(--nx-transition),
    transform var(--nx-transition);
}

.t-Button:hover {
  transform: translateY(-1px);
}

.t-Button:active {
  transform: translateY(0);
}

.t-Button--hot {
  background: linear-gradient(135deg, var(--nx-color-primary), #0891b2);
  border-color: transparent;
  box-shadow: 0 8px 18px rgb(13 148 136 / 0.2);
  color: #fff;
}

.t-Button--hot:hover,
.t-Button--hot:focus {
  background: linear-gradient(135deg, var(--nx-color-primary-hover), #06a6c7);
  box-shadow: 0 10px 24px rgb(13 148 136 / 0.27);
}

.t-Button:focus-visible {
  box-shadow: 0 0 0 4px rgb(34 211 238 / 0.22);
  outline: 2px solid transparent;
}

/* Botones más compactos en toda la aplicación */

.t-Button {
  line-height: 1.2;
  min-height: 2.375rem;
  padding-block: 0.4rem;
  padding-inline: 1rem;
}

/* Menú contextual de acciones en filas de reportes */

button.t-Button.t-Button--noLabel.t-Button--icon[data-menu^=tc_menu_] {
  inline-size: 2rem;
  justify-content: center;
  max-inline-size: 2rem;
  min-inline-size: 2rem;
  padding-inline: 0;
}

/* Mensajes */

.t-Alert {
  border: 0;
  border-radius: var(--nx-radius-md);
  box-shadow: var(--nx-shadow-sm);
}

/* Login */

body.nexpy-login-page,
.nexpy-login-page .t-PageBody--login {
  background:
    radial-gradient(circle at 16% 20%, rgb(13 148 136 / 0.16), transparent 30rem),
    radial-gradient(circle at 86% 78%, rgb(34 211 238 / 0.1), transparent 34rem),
    linear-gradient(rgb(34 211 238 / 0.025) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(90deg, rgb(34 211 238 / 0.025) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(135deg, #061521 0%, #0a2435 58%, #0b2b3b 100%);
  min-height: 100vh;
}

.nexpy-login-page .t-Login-container {
  padding: 2rem 1.25rem;
}

.nexpy-login-page .t-Login-region {
  background: #fff;
  border: 1px solid #dce5ea;
  border-radius: 1.5rem;
  box-shadow: 0 24px 58px rgb(2 12 27 / 0.2);
  max-width: 25rem;
  overflow: hidden;
  padding: 2rem 2rem 1.25rem;
}

.nexpy-login-page .t-Login-logo {
  align-items: center;
  background: #0f8f8d;
  border-radius: 0.95rem;
  box-shadow: 0 10px 22px rgb(13 148 136 / 0.26);
  display: flex;
  height: 3.35rem;
  justify-content: center;
  margin: 0 auto 1.15rem;
  width: 3.35rem;
}

.nexpy-login-page .t-Login-logo img {
  filter: none;
  height: 1.85rem;
  object-fit: contain;
  width: 1.85rem;
}

.nexpy-login-page .t-Login-title {
  color: var(--nx-color-navy-900);
  font-size: 1.45rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}

.nexpy-login-intro {
  color: #758493;
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 0 0 1.55rem;
  text-align: center;
}

.nexpy-login-page .t-Login-region .t-Form-fieldContainer {
  margin-bottom: 1rem;
}

.nexpy-login-page .t-Login-region .apex-item-text,
.nexpy-login-page .t-Login-region .apex-item-password {
  background: #f7f9fa;
  border-color: #d6e0e5;
  min-height: 2.85rem;
}

.nexpy-login-page .t-Login-region input:-webkit-autofill,
.nexpy-login-page .t-Login-region input:-webkit-autofill:hover,
.nexpy-login-page .t-Login-region input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #f8fafc inset;
  -webkit-text-fill-color: var(--nx-color-text);
  caret-color: var(--nx-color-text);
}

.nexpy-login-page .t-Login-region .t-Button--hot {
  box-shadow: 0 10px 22px rgb(13 148 136 / 0.22);
  margin-top: 0.55rem;
  min-height: 2.85rem;
  width: 100%;
}

.nexpy-login-page .t-Login-region::before {
  display: none;
}

.nexpy-login-page .t-Login-region::after {
  color: #8a98a8;
  content: "Conexión segura y cifrada · Nexpy";
  display: block;
  font-size: 0.75rem;
  margin-top: 1.35rem;
  text-align: center;
}

/* Selección de contexto */

.nexpy-context-page .t-Header,
.nexpy-context-page .t-Header-branding {
  background: #0b1f31;
  border-bottom: 1px solid rgb(15 143 141 / 0.32);
}

.nexpy-context-page .t-Header-logo-link,
.nexpy-context-page .t-Header-logo-link:focus,
.nexpy-context-page .t-Header-logo-link:hover {
  color: #fff;
}

.nexpy-context-page .t-Body-main {
  background:
    radial-gradient(circle at 14% 18%, rgb(15 143 141 / 0.045), transparent 28rem),
    linear-gradient(rgb(11 31 49 / 0.022) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(90deg, rgb(11 31 49 / 0.022) 1px, transparent 1px) 0 0 / 72px 72px,
    #f4f7f9;
}

.nexpy-context-page .t-Body-contentInner {
  align-items: center;
  display: flex;
  justify-content: center;
  min-height: calc(100vh - 9.5rem);
  padding: 2rem 1.25rem;
}

.nexpy-context-card {
  background: #fff;
  border: 1px solid #dce5ea;
  border-radius: 1.5rem;
  box-shadow: 0 22px 54px rgb(11 31 49 / 0.13);
  max-width: 30rem;
  overflow: hidden;
  width: 100%;
}

.nexpy-context-card .t-Region-header {
  display: none;
}

.nexpy-context-card .t-Region-body {
  background: #fff;
  padding: 2rem 2rem 0.45rem;
}

.nexpy-context-intro {
  margin: 0 0 1.75rem;
  text-align: center;
}

.nexpy-context-mark {
  align-items: center;
  background: #0f8f8d;
  border-radius: 0.95rem;
  box-shadow: 0 9px 20px rgb(15 143 141 / 0.22);
  color: #fff;
  display: inline-flex;
  font-size: 1.55rem;
  font-weight: 800;
  height: 3.35rem;
  justify-content: center;
  margin-bottom: 1.05rem;
  width: 3.35rem;
}

.nexpy-context-title {
  color: var(--nx-color-navy-900);
  font-size: 1.4rem;
  font-weight: 780;
  letter-spacing: -0.03em;
  line-height: 1.25;
  margin: 0 0 0.35rem;
}

.nexpy-context-description {
  color: #758493;
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0 auto;
  max-width: 24rem;
}

.nexpy-context-card .t-Form-fieldContainer {
  margin-bottom: 1rem;
}

.nexpy-context-card .t-Form-label {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 680;
}

.nexpy-context-card .t-Form-inputContainer,
.nexpy-context-card .t-Form-itemWrapper,
.nexpy-context-card .apex-item-group,
.nexpy-context-card .apex-item-popup-lov {
  max-width: none;
  width: 100%;
}

.nexpy-context-card .apex-item-group {
  display: flex;
}

.nexpy-context-card .apex-item-text,
.nexpy-context-card .apex-item-select,
.nexpy-context-card .apex-item-popup-lov {
  background: #f7f9fa;
  border-color: #d6e0e5;
  min-height: 3rem;
}

.nexpy-context-card .t-Region-buttons {
  background: #fff;
  border: 0;
  padding: 0.35rem 2rem 1.75rem;
}

.nexpy-context-card .t-Region-buttons-right {
  width: 100%;
}

.nexpy-context-card .t-Button--hot {
  background: #0f8f8d;
  box-shadow: 0 9px 20px rgb(15 143 141 / 0.2);
  min-height: 3rem;
  width: 100%;
}

.nexpy-context-card .t-Button--hot:hover,
.nexpy-context-card .t-Button--hot:focus {
  background: #0c7d7b;
  box-shadow: 0 10px 24px rgb(15 143 141 / 0.24);
}

/* Página de inicio */

.nexpy-home-page .t-Header,
.nexpy-home-page .t-Header-branding {
  background: #0b1f31;
  border-bottom: 1px solid rgb(15 143 141 / 0.32);
}

.nexpy-home-page .t-Header-logo-link,
.nexpy-home-page .t-Header-logo-link:focus,
.nexpy-home-page .t-Header-logo-link:hover {
  color: #fff;
}

.nexpy-home-page .t-Body-main {
  background:
    radial-gradient(circle at 92% 8%, rgb(15 143 141 / 0.045), transparent 30rem),
    #f4f7f9;
}

.nexpy-home-page .t-Body-contentInner {
  margin: 0 auto;
  max-width: 76rem;
  padding: 2.5rem 2rem 3rem;
}

.nexpy-home-region {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}

.nexpy-home-region .t-Region-body {
  padding: 0;
}

.nexpy-home-shell {
  display: grid;
  gap: 1.35rem;
}

.nexpy-home-welcome {
  align-items: center;
  background: linear-gradient(125deg, #fff 0%, #f5fbfa 100%);
  border: 1px solid #dce5ea;
  border-radius: 1.5rem;
  display: flex;
  gap: 2rem;
  justify-content: space-between;
  min-height: 11rem;
  overflow: hidden;
  padding: 2.25rem 2.5rem;
  position: relative;
}

.nexpy-home-welcome::after {
  background: rgb(15 143 141 / 0.07);
  border-radius: 999px;
  content: "";
  height: 15rem;
  position: absolute;
  right: -5rem;
  top: -8rem;
  width: 15rem;
}

.nexpy-home-copy {
  max-width: 42rem;
  position: relative;
  z-index: 1;
}

.nexpy-home-eyebrow {
  color: #0f8f8d;
  display: block;
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.09em;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.nexpy-home-title {
  color: #0b1f31;
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  font-weight: 780;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin: 0;
}

.nexpy-home-description {
  color: #667785;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0.75rem 0 0;
  max-width: 36rem;
}

.nexpy-home-welcome .t-Button {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}

.nexpy-home-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nexpy-home-card {
  background: #fff;
  border: 1px solid #dce5ea;
  border-radius: 1.15rem;
  min-height: 12rem;
  padding: 1.45rem;
}

.nexpy-home-card-icon {
  align-items: center;
  background: #e8f5f4;
  border-radius: 0.75rem;
  color: #0f7f7d;
  display: inline-flex;
  font-size: 1rem;
  height: 2.5rem;
  justify-content: center;
  margin-bottom: 1rem;
  width: 2.5rem;
}

.nexpy-home-card-kicker {
  color: #758493;
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.nexpy-home-card-title {
  color: #0b1f31;
  font-size: 1.05rem;
  font-weight: 740;
  margin: 0;
}

.nexpy-home-card-text {
  color: #667785;
  font-size: 0.84rem;
  line-height: 1.55;
  margin: 0.55rem 0 0;
}

.nexpy-home-card-link {
  color: #0f7f7d;
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  margin-top: 1rem;
  text-decoration: none;
}

.nexpy-home-card-link:hover,
.nexpy-home-card-link:focus {
  color: #0b6664;
  text-decoration: underline;
}

/* Movimiento reducido */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  body.nexpy-login-page,
  .nexpy-login-page .t-PageBody--login {
    background-attachment: scroll;
    background-position: 48% center;
  }

  .nexpy-login-page .t-Login-container {
    padding: 1rem;
  }

  .nexpy-login-page .t-Login-logo {
    height: 3.35rem;
    width: 3.35rem;
  }

  .nexpy-login-page .t-Login-region {
    padding: 1.75rem 1.5rem 1.15rem;
  }

  .nexpy-home-page .t-Body-contentInner {
    padding: 1.25rem 1rem 2rem;
  }

  .nexpy-home-welcome {
    align-items: flex-start;
    flex-direction: column;
    padding: 1.5rem;
  }

  .nexpy-home-grid {
    grid-template-columns: 1fr;
  }

  .nexpy-context-page .t-Body-contentInner {
    align-items: flex-start;
    padding-top: 1rem;
  }

  .nexpy-context-card .t-Region-body {
    padding: 1.25rem;
  }
}

/* ==========================================================
   Mantenimientos
   ========================================================== */

.nexpy-maintenance-page .t-Header,
.nexpy-maintenance-page .t-Header-branding {
  background: #0b1f31;
  border-bottom: 1px solid rgb(15 143 141 / 0.32);
}

.nexpy-maintenance-page .t-Header-logo-link {
  color: #fff;
}

.nexpy-maintenance-page .t-Body-main {
  background:
    radial-gradient(
      circle at 96% 2%,
      rgb(15 143 141 / 0.045),
      transparent 28rem
    ),
    #f4f7f9;
}

.nexpy-maintenance-page .t-Body-title {
  background: rgb(255 255 255 / 0.76);
  border-bottom: 1px solid #e4eaf0;
}

.nexpy-maintenance-page .t-Body-titleInner,
.nexpy-maintenance-page .t-Body-contentInner {
  margin-inline: auto;
  max-width: 76rem;
}

.nexpy-maintenance-page .t-Body-contentInner {
  padding: 1.5rem 2rem 3rem;
}

.nexpy-maintenance-page .t-BreadcrumbRegion-titleText {
  color: #0b1f31;
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 780;
  letter-spacing: -0.035em;
}

/* Formularios */

.nexpy-form-card {
  border-color: #dce5ea;
  box-shadow: 0 12px 34px rgb(11 31 49 / 0.07);
  margin-inline: auto;
  max-width: 68rem;
}

.nexpy-form-card .t-Region-header {
  padding: 1.1rem 1.4rem;
}

.nexpy-form-card .t-Region-title {
  color: #0b1f31;
  font-size: 1.05rem;
  font-weight: 750;
}

.nexpy-form-card .t-Region-body {
  padding: 1.35rem 1.4rem 0.65rem;
}

.nexpy-form-card .t-Region-buttons {
  background: #fbfcfd;
  border-top: 1px solid #edf1f5;
  padding: 1rem 1.4rem;
}

.nexpy-form-card .t-Form-fieldContainer {
  margin-bottom: 0.9rem;
}

.nexpy-form-card .apex-item-text,
.nexpy-form-card .apex-item-textarea,
.nexpy-form-card .apex-item-select {
  background: #f9fbfc;
}

.nexpy-form-card .apex-item-textarea {
  min-height: 5.25rem;
  padding-bottom: 0.65rem;
  padding-top: 1.75rem;
  resize: vertical;
}

/* Diálogos */

.ui-dialog.nexpy-form-dialog {
  border: 1px solid #dce5ea;
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgb(11 31 49 / 0.18);
  overflow: hidden;
}

.ui-dialog.nexpy-form-dialog .ui-dialog-titlebar {
  background: #fff;
  border-bottom: 1px solid #e7edf2;
  padding: 1.1rem 1.4rem;
}

.ui-dialog.nexpy-form-dialog .ui-dialog-title {
  color: #0b1f31;
  font-size: 1.05rem;
  font-weight: 750;
}

.ui-dialog.nexpy-form-dialog .ui-dialog-content {
  border: 0;
  padding: 0;
}

.nexpy-dialog-page .t-Dialog-body {
  background: #f6f8fa;
  padding: 2.5rem 1.4rem 1.25rem;
}

.nexpy-dialog-page .t-Dialog-header,
.nexpy-dialog-page .t-Dialog-footer {
  background: #fff;
  border-color: #e7edf2;
  box-shadow: none;
}

.nexpy-dialog-page .t-Dialog-footer {
  padding: 1.5rem 1.4rem;
}

.nexpy-dialog-page .t-Dialog-title {
  color: #0b1f31;
  font-weight: 760;
}

/* Confirmaciones y alertas */

.ui-dialog--notification {
  border: 1px solid #dce5ea;
  border-radius: 0.9rem;
  box-shadow: 0 18px 48px rgb(11 31 49 / 0.2);
  max-width: calc(100vw - 2rem);
  overflow: hidden;
  padding: 0;
}

.ui-dialog--notification .ui-dialog-titlebar {
  display: none;
}

.ui-dialog--notification .ui-dialog-content {
  background: #fff;
  color: #0b1f31;
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 2rem;
}

.ui-dialog--notification .a-AlertMessage {
  margin: 0;
}

.ui-dialog--notification .ui-dialog-buttonpane {
  background: #fbfcfd;
  border: 0;
  border-top: 1px solid #e7edf2;
  margin: 0;
  padding: 0.8rem 1rem;
}

.ui-dialog--notification .ui-dialog-buttonset {
  display: flex;
  gap: 0.625rem;
  justify-content: flex-end;
  width: 100%;
}

.ui-dialog--notification .ui-button {
  background: #eef2f4;
  border: 1px solid #d7dee3;
  border-radius: 0.65rem;
  box-shadow: none;
  color: #0b1f31;
  font-weight: 700;
  margin: 0;
  min-height: 2.5rem;
  padding: 0.6rem 1rem;
}

.ui-dialog--notification .ui-button:hover,
.ui-dialog--notification .ui-button:focus {
  background: #e6ecef;
  border-color: #c9d4da;
}

.ui-dialog--notification .ui-dialog-buttonset .ui-button:last-child {
  background: #0d8b8f;
  border-color: #0d8b8f;
  color: #fff;
}

.ui-dialog--notification .ui-dialog-buttonset .ui-button:last-child:hover,
.ui-dialog--notification .ui-dialog-buttonset .ui-button:last-child:focus {
  background: #08777b;
  border-color: #08777b;
}

.ui-dialog--notification .ui-button:focus-visible {
  outline: 3px solid rgb(13 139 143 / 0.25);
  outline-offset: 2px;
}

/* ==========================================================
   Informes interactivos
   ========================================================== */

.nexpy-report-page .t-Body-title .t-Body-titleInner,
.nexpy-report-page .t-Body-contentInner {
  max-width: 92rem;
}

.nexpy-report-card {
  background: #fff;
  border: 1px solid #e1e7ec;
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgb(11 31 49 / 0.09);
  overflow: hidden;
  width: 100%;
}

.nexpy-report-card .t-Region-body {
  padding: 0;
}

.nexpy-report-card .a-IRR-container,
.nexpy-report-card .a-IRR {
  background: #fff;
  border: 0;
  border-radius: inherit;
  overflow: hidden;
}

/* Barra superior */

.nexpy-report-card .a-IRR-toolbar {
  align-items: center;
  background: #fff;
  border: 0;
  display: flex;
  min-height: 4.25rem;
  padding: 0.75rem 1rem;
}

/* Buscador */

.nexpy-report-card .a-IRR-search {
  align-items: center;
  background: #fff;
  border: 1px solid #d7e0e7;
  border-radius: 0.65rem;
  display: flex;
  min-height: 2.35rem;
  overflow: hidden;
  transition:
    border-color var(--nx-transition),
    box-shadow var(--nx-transition);
  width: 20rem;
}

.nexpy-report-card .a-IRR-search:focus-within {
  border-color: #0f8f8d;
  box-shadow: 0 0 0 3px rgb(15 143 141 / 0.12);
}

.nexpy-report-card .a-IRR-searchFieldContainer {
  border: 0;
  flex: 1;
}

.nexpy-report-card .a-IRR-search-field {
  background: transparent;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 0.84rem;
  min-height: 2.25rem;
  outline: 0;
  width: 100%;
}

.nexpy-report-card .a-IRR-button--search {
  background: transparent;
  border: 0;
  box-shadow: none;
}

/* Botón Acciones */

.nexpy-report-card .a-IRR-button--actions {
  align-items: center;
  background: #fff;
  border: 1px solid #d7e0e7;
  border-radius: 0.6rem;
  box-shadow: none;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: 650;
  justify-content: center;
  line-height: 1.2;
  min-height: 2.25rem;
  padding: 0.3rem 0.7rem;
}

/* Botón principal reutilizable */

.nexpy-report-card .t-Button--hot {
  background: #0d8587;
  border: 0;
  border-radius: 0.6rem;
  box-shadow: 0 4px 12px rgb(13 133 135 / 0.18);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  min-height: 2.25rem;
  padding: 0.3rem 0.8rem;
}

.nexpy-report-card .t-Button--hot:hover,
.nexpy-report-card .t-Button--hot:focus {
  background: #0a7476;
  box-shadow: 0 6px 15px rgb(13 133 135 / 0.22);
}

/* Tabla */

.nexpy-report-card .a-IRR-table {
  border-collapse: collapse;
  width: 100%;
}

.nexpy-report-card .a-IRR-header {
  background: #f5f8f9;
  border-bottom: 1px solid #dfe6eb;
  color: #007786;
  font-size: 0.72rem;
  font-weight: 750;
  height: 2.5rem;
  letter-spacing: 0.035em;
  padding: 0.7rem 0.85rem;
  text-transform: uppercase;
}

.nexpy-report-card .a-IRR-table th,
.nexpy-report-card .a-IRR-table td {
  border-left: 0 !important;
  border-right: 1px solid #edf1f4 !important;
}

.nexpy-report-card .a-IRR-table th:last-child,
.nexpy-report-card .a-IRR-table td:last-child {
  border-right: 0 !important;
}

.nexpy-report-card .a-IRR-table td {
  background: #fff;
  border-bottom: 1px solid #e5eaee;
  color: #172033;
  font-size: 0.8rem;
  height: 3.15rem;
  padding: 0.55rem 0.85rem;
}

.nexpy-report-card .a-IRR-table tbody tr:last-child td {
  border-bottom: 0;
}

.nexpy-report-card .a-IRR-table tbody tr:hover td {
  background: #f8fbfb;
}

/* Estados */

.nexpy-status {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.75rem;
  font-weight: 700;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
}

.nexpy-status::before {
  background: currentColor;
  border-radius: 50%;
  content: "";
  height: 0.35rem;
  width: 0.35rem;
}

.nexpy-status--S {
  background: #e4f6ef;
  color: #078260;
}

.nexpy-status--N {
  background: #eef1f3;
  color: #697586;
}

/* Acciones de estado */

.nexpy-state-action {
  border-radius: 0.45rem;
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.55rem;
  text-decoration: none;
}

.nexpy-state-action[data-estado="N"] {
  color: #d92d20;
}

.nexpy-state-action[data-estado="N"]:hover,
.nexpy-state-action[data-estado="N"]:focus {
  background: #fff0ee;
  color: #b42318;
  text-decoration: none;
}

.nexpy-state-action[data-estado="S"] {
  color: #087f79;
}

.nexpy-state-action[data-estado="S"]:hover,
.nexpy-state-action[data-estado="S"]:focus {
  background: #e8f5f4;
  color: #0b6664;
  text-decoration: none;
}

/* Pie y paginación */

.nexpy-report-card .a-IRR-paginationWrap {
  align-items: center;
  background: #fff;
  border-top: 1px solid #edf1f4;
  color: #81909e;
  min-height: 3.4rem;
  padding: 0.65rem 1rem;
}

.nexpy-report-card .a-IRR-button--pagination {
  border: 1px solid #e2e8ed;
  border-radius: 0.5rem;
  min-height: 2rem;
  min-width: 2rem;
}

.nexpy-report-card .a-IRR-button--pagination.is-active {
  background: #087f82;
  border-color: #087f82;
  color: #fff;
}

/* Distribucion de lotes */

.ui-dialog.nexpy-lot-dialog {
  border: 1px solid #dce5ea;
  border-radius: 1rem;
  box-shadow: 0 18px 48px rgb(11 31 49 / 0.2);
  overflow: hidden;
}

.ui-dialog.nexpy-lot-dialog .ui-dialog-titlebar {
  background: #fff;
  border-bottom: 1px solid #e5ebef;
  padding: 1rem 1.25rem;
}

.ui-dialog.nexpy-lot-dialog .ui-dialog-content {
  background: #f4f7f9;
  padding: 1rem;
}

.nexpy-lot-summary,
.nexpy-lot-editor,
.nexpy-lot-report {
  background: #fff;
  border: 1px solid #e1e7ec;
  border-radius: 0.8rem;
  box-shadow: none;
  margin-bottom: 0.9rem;
  overflow: hidden;
}

.nexpy-lot-summary .t-Region-body,
.nexpy-lot-editor .t-Region-body {
  padding: 1rem 1.1rem 0.6rem;
}

.nexpy-lot-summary .apex-item-display-only {
  color: #0b1f31;
  font-size: 1rem;
  font-weight: 750;
}

.nexpy-lot-summary .nexpy-lot-pending .apex-item-display-only {
  color: #b54708;
}

.nexpy-lot-report .t-Region-header {
  background: #fff;
  border-bottom: 1px solid #e7edf2;
}

.nexpy-lot-report .t-Region-title {
  color: #0b1f31;
  font-size: 0.95rem;
  font-weight: 750;
}

.nexpy-lot-report .t-Region-body,
.nexpy-lot-report .a-IRR-container,
.nexpy-lot-report .a-IRR {
  border: 0;
}

.nexpy-lot-report .a-IRR-table td {
  background: #fff;
  border-bottom: 1px solid #e8edf1;
}

.nexpy-lot-report .a-IRR-header {
  background: #f5f8f9;
  color: #007786;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
}

/* Responsive */

@media (max-width: 640px) {
  .nexpy-maintenance-page .t-Body-contentInner {
    padding: 1rem 0.75rem 2rem;
  }

  .nexpy-report-card .a-IRR-search {
    max-width: 100%;
    width: 14rem;
  }

  .ui-dialog.nexpy-lot-dialog .ui-dialog-content {
    padding: 0.75rem;
  }
}

/* Resumen HTML de distribución de lotes */

/* Encabezado de distribución de lotes */

.nexpy-lot-summary {
  background:
    linear-gradient(135deg, #f8fcfc 0%, #f4f8fb 100%);
  border: 1px solid #d6e3e8;
  border-radius: 0.85rem;
  box-shadow: 0 5px 16px rgb(11 31 49 / 0.06);
  overflow: hidden;
}

.nexpy-lot-summary .t-Region-body {
  padding: 0;
}

.nexpy-lot-summary-panel {
  align-items: center;
  display: grid;
  gap: 0.8rem 1.5rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 1rem 1.15rem 0.9rem;
}

.nexpy-lot-summary-identity {
  align-items: center;
  display: flex;
  gap: 0.9rem;
  min-width: 0;
}

.nexpy-lot-summary-icon {
  align-items: center;
  background:
    linear-gradient(135deg, #087f82, #0aa0a2);
  border-radius: 0.8rem;
  box-shadow: 0 7px 16px rgb(8 127 130 / 0.2);
  color: #fff;
  display: flex;
  flex: 0 0 3rem;
  font-size: 1.25rem;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.nexpy-lot-summary-heading {
  min-width: 0;
}

.nexpy-lot-summary-eyebrow {
  color: #64808c;
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}

.nexpy-lot-summary-product {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
}

.nexpy-lot-summary-code {
  background: #e4f4f3;
  border: 1px solid #c4e5e2;
  border-radius: 999px;
  color: #08777b;
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.025em;
  padding: 0.28rem 0.65rem;
}

.nexpy-lot-summary-title {
  color: #0b1f31;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
}

.nexpy-lot-summary-metrics {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(3, minmax(6.2rem, 1fr));
  margin: 0;
}

.nexpy-lot-summary-metric {
  background: rgb(255 255 255 / 0.78);
  border: 1px solid #dde7eb;
  border-radius: 0.7rem;
  min-width: 0;
  padding: 0.55rem 0.75rem;
}

.nexpy-lot-summary-metric.is-total {
  border-top: 3px solid #8298a3;
}

.nexpy-lot-summary-metric.is-assigned {
  border-top: 3px solid #0d8b8f;
}

.nexpy-lot-summary-metric.is-pending-metric {
  border-top: 3px solid #25a56a;
}

.nexpy-lot-summary-metric.is-pending-metric.has-pending {
  background: #fff8eb;
  border-color: #f0d39e;
  border-top-color: #e59b21;
}

.nexpy-lot-summary-metric dt {
  color: #6b7f89;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  margin: 0 0 0.2rem;
  text-transform: uppercase;
}

.nexpy-lot-summary-metric dd {
  color: #0b1f31;
  font-size: 1.05rem;
  font-weight: 850;
  line-height: 1.2;
  margin: 0;
}

.nexpy-lot-summary-metric.has-pending dd {
  color: #b54708;
}

.nexpy-lot-summary-progress {
  grid-column: 1 / -1;
}

.nexpy-lot-summary-progress-header {
  align-items: center;
  color: #607681;
  display: flex;
  font-size: 0.7rem;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.nexpy-lot-summary-progress-header strong {
  color: #38515e;
  font-size: 0.72rem;
}

.nexpy-lot-summary-progress-track {
  background: #dfe9ec;
  border-radius: 999px;
  height: 0.4rem;
  overflow: hidden;
}

.nexpy-lot-summary-progress-bar {
  background:
    linear-gradient(90deg, #0d8b8f, #20a6a1);
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 180ms ease;
  width: 0;
}

.nexpy-lot-summary-panel.is-complete
  .nexpy-lot-summary-progress-bar {
  background:
    linear-gradient(90deg, #16895c, #28ac73);
}

@media (max-width: 760px) {
  .nexpy-lot-summary-panel {
    grid-template-columns: 1fr;
  }

  .nexpy-lot-summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }
}
