/* =========================================================
   DataTables (#datatable-buttons)
========================================================= */
table#datatable-buttons.dataTable > thead > tr > th {
  background-color: #737373 !important;
  color: #fff !important;
}

#datatable-buttons {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

#datatable-buttons tbody {
  background-color: #f1f1f1;
}

#datatable-buttons td {
  vertical-align: middle;
  font-size: 14px;
  color: #333;
}

#datatable-buttons tbody td:first-child {
  text-align: center;
  font-weight: bold;
  background-color: #eef4fa;
  color: #1a524f;
}

/* Botones de DataTables */
.dt-buttons .btn {
  border-radius: 8px;
  padding: 6px 12px;
  background-color: #265f97;
  color: white;
  border: none;
  font-size: 13px;
}

/* =========================================================
   Offcanvas
========================================================= */
.custom-offcanvas {
  background-color: #4d4d4d;
  width: 500px !important;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
}

@media (max-width: 768px) {
  .custom-offcanvas {
    width: 100% !important;
    padding: 10px;
  }
}

.offcanvas-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.offcanvas-logo {
  height: 100px;
}

.offcanvas-title {
  color: #fff;
  font-weight: 700;
}

.offcanvas-body {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

#offcanvasContent {
  width: 100%;
  margin-bottom: 20px;
}

/* =========================================================
   Expediente - lista / botones
========================================================= */
.botones {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 15px;
}

.subirArchivo {
  padding: 5px 0;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btnSubirArchivo {
  width: 100%;
  padding: 10px;
  border: 2px solid #a3dc65;
  border-radius: 10px;
  background-color: #a3dc65;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.3s ease-in-out;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
}

/* ✅ (versión más nueva) mantiene estilos + oculta al inicio */
.listaExpediente {
  background-color: #737373;
  border-radius: 10px;
  width: 100%;
  list-style: none;
  padding: 20px;
  margin: 0 auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);

  display: none; /* Oculta al inicio */
  transition: all 0.4s ease;
}

.listaExpediente li {
  padding: 5px;
  font-size: 1rem;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom: 2px dotted rgba(0, 0, 0, 0.7);
  position: relative;
}

.listaExpediente li span {
  width: 50%;
  padding: 10px;
}

.listaExpediente li .fa-trash {
  position: absolute;
  top: 50%;
  right: 20px;
  font-size: 1.5rem;
  color: #ececec;
  opacity: 0.5;
  transform: translateY(-50%);
  pointer-events: none;
}

.listaExpediente li .fa-trash.habilitado {
  color: #b71c1c;
  cursor: pointer;
  opacity: 1;
}

.listaExpediente li .fa-file-pdf {
  position: absolute;
  top: 50%;
  right: 50px;
  font-size: 1.5rem;
  color: #ececec;
  opacity: 0.5;
  transform: translateY(-50%);
  pointer-events: none;
}

.listaExpediente li .fa-file-pdf.habilitado {
  color: #a3dc65;
  cursor: pointer;
  opacity: 1;
}

.listaExpediente li .fa-check {
  color: #a3dc65;
  font-size: 1.2rem;
}

.listaExpediente li .btnSeleccionarArchivo {
  font-size: 1.2rem;
  color: #75b432;
  border-radius: 50%;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 50%;
  right: 85px;
  padding: 5px;
  width: 35px;
  transform: translateY(-50%);
}

.listaExpediente li .btnSeleccionarArchivo:hover {
  color: #ccc;
  cursor: pointer;
}

.listaExpediente li .btnSeleccionarArchivo .inputOculto {
  display: none;
}

/* ✅ (versión más nueva) resaltado */
.listaExpediente li.resaltado {
  background-color: rgba(76, 175, 80, 0.15);
  border: 1px solid #4caf50;
  border-radius: 6px;
  transition: background-color 0.5s ease;
}

@media (max-width: 768px) {
  .listaExpediente {
    padding: 10px;
  }
  .listaExpediente li span {
    font-size: 0.9rem;
  }
}

/* =========================================================
   Overlay / Visor PDF (versión más nueva)
========================================================= */
.overlayPdf {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9998;
}

.overlayPdf.ver {
  display: flex;
}

.visualizarPdf {
  position: relative;
  background-color: rgb(50, 50, 50);
  width: 70%;
  height: 90%;
  border-radius: 15px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
  z-index: 9999;
}

.btn-cerrar {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

.btn-cerrar:hover {
  color: red;
}

.visualizarPdf iframe {
  flex: 1;
  width: 100%;
  border-radius: 10px;
  background: #fff;
}

/* =========================================================
   List-group (expediente sobre fondo oscuro)
========================================================= */
.expediente-list-group .list-group-item {
  border-color: rgba(255, 255, 255, 0.12);
  padding: 0.75rem 0.75rem;
}

.expediente-list-group .list-group-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.expediente-file-icon {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  color: #fff;
}

/* =========================================================
   Utilidades
========================================================= */
.min-w-0 {
  min-width: 0;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Select personalizado */
.custom-select-expediente {
  background-color: #f1f1f1;
  border: 2px solid #4caf50;
  border-radius: 8px;
  padding: 10px 25px;
  font-size: 15px;
  font-weight: 500;
  color: #2e7d32;
  outline: none;
  transition: all 0.3s ease;
  margin: 10px 0 15px;
}

.custom-select-expediente:hover {
  border-color: #2e7d32;
  background-color: #e9f5ee;
  cursor: pointer;
}

.custom-select-expediente:focus {
  border-color: #1a524f;
  box-shadow: 0 0 6px rgba(46, 125, 50, 0.4);
}

/* =========================================================
   Variables (unificadas; si se repiten, gana lo de abajo)
========================================================= */
:root {
  /* Modal base */
  --modal-base: #737373;
  --modal-base-900: #5e5e5e;
  --modal-base-800: #6a6a6a;
  --modal-accent: #d1f7e6;
  --modern-border: rgba(255, 255, 255, 0.12);
  --modern-hr: rgba(255, 255, 255, 0.16);

  /* Material-ish tokens */
  --md-primary: #1a73e8;
  --md-outline: #dadce0;
  --md-outline-strong: #c7c9cc;
  --md-surface: #ffffff;
  --md-text: #202124;
  --md-muted: #5f6368;
  --md-focus-ring: rgba(26, 115, 232, 0.18);

  /* Urgencias stepper */
  --urgencias-primary: #2e7d32;
  --urgencias-primary-soft: rgba(46, 125, 50, 0.08);
  --urgencias-line: #c8e6c9;

  /* Acordeón urgencias */
  --urg-main: #4caf50;
  --urg-main-soft: #e5f6e9;

  /* Urgencias (cards) */
  --urg-radius: 18px;
  --urg-green-1: #2ea745;
  --urg-green-2: #3db354;
  --urg-green-3: #1e7a35;
  --urg-green-4: #155f2a;
  --urg-red: #f04b63;
  --urg-red-dark: #d73a52;
  --urg-orange: #f08a3c;
  --urg-orange-dark: #d86c1e;
  --urg-white: #ffffff;
  --urg-soft: #eaf5ec;
  --urg-shadow: rgba(0, 0, 0, 0.2);
  --urg-shadow-strong: rgba(0, 0, 0, 0.35);
}

/* =========================================================
   Modal modern (fullscreen)
========================================================= */
.modal-modern .modal-dialog.modal-fullscreen {
  height: 100%;
}

.modal-modern .modal-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(145deg, var(--modal-base), var(--modal-base-900));
  color: #fff;
  border: 1px solid var(--modern-border);
  border-radius: 20px;
}

@media (min-width: 992px) {
  .modal-modern .modal-content {
    border-radius: 24px;
  }
}

/* Unificado (antes repetido) */
.modern-header {
  flex: 0 0 auto;
  background: #4caf50;
  border-bottom: 1px solid var(--modern-border);
  padding: 14px 18px;
  min-height: 56px;

  /* ajustes finales */
  padding-bottom: 0.75rem;
  border-radius: 3px;
}

.modern-header__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--modern-border);
  font-size: 18px;
  color: #fff;
}

.modern-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 18px;
  overflow: hidden;
}

.modern-body .container-fluid,
.modern-body .row {
  height: 100%;
}

.modern-footer {
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--modern-border);
  padding: 12px 18px;
  backdrop-filter: blur(4px);
}

.modern-card {
  background: #4d4d4d;
  border: 1px solid var(--modern-border);
  border-radius: 16px;
  min-height: 0;
  overflow: auto;
  margin-bottom: 10px;
}

.modern-btn-primary {
  background: linear-gradient(180deg, #34c38f, #2ea97c);
  color: #0a2f22;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  padding: 0.55rem 1rem;
}

.modern-btn-primary:hover {
  filter: brightness(1.05);
}

.modern-btn-light {
  background: rgba(255, 255, 255, 0.9);
  color: #1b1b1b;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.modern-btn-light:hover {
  filter: brightness(0.97);
}

.modal-backdrop.show {
  opacity: 0.55;
}

/* =========================================================
   Hospital table theme
========================================================= */
.bg-hospital {
  background: linear-gradient(180deg, #e7607b 0%, #d65771 100%);
}

.table-modern thead th {
  border: 0 !important;
  vertical-align: middle;
}

.table-modern tbody tr {
  border-color: rgba(0, 0, 0, 0.05);
}

.table-modern tbody tr:hover {
  background-color: rgba(231, 96, 123, 0.06);
}

.table-modern td,
.table-modern th {
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.table-modern th:last-child,
.table-modern td:last-child {
  text-align: right;
  white-space: nowrap;
}

@media (prefers-color-scheme: dark) {
  .table-modern tbody tr {
    border-color: rgba(255, 255, 255, 0.08);
  }
  .table-modern tbody tr:hover {
    background-color: rgba(231, 96, 123, 0.12);
  }
}

/* =========================================================
   Modal body helpers
========================================================= */
.modal-body-fill {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#consulta-content {
  flex: 1 1 auto;
}

.btn-close-fab {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Compact controls */
.g-ctl-sm {
  padding-top: 0.6rem !important;
  padding-bottom: 0.6rem !important;
  min-height: 2.25rem;
  font-size: 0.9rem;
}

.form-floating-sm > .form-control,
.form-floating-sm > .form-select {
  height: calc(2.5rem + 2px);
  min-height: calc(2.5rem + 2px);
  padding: 0.6rem 0.75rem;
  font-size: 0.9rem;
  line-height: 1.25;
}

.form-floating-sm > label {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
  height: auto;
  pointer-events: none;
}

.form-floating-sm > .form-control:focus ~ label,
.form-floating-sm > .form-control:not(:placeholder-shown) ~ label,
.form-floating-sm > .form-select:focus ~ label,
.form-floating-sm > .form-select:not([value=""]) ~ label {
  transform: scale(0.85) translateY(-0.55rem) translateX(0.15rem);
  opacity: 0.75;
}

.form-floating-sm textarea.form-control {
  min-height: 5.25rem;
  height: 5.25rem;
  padding-top: 1.1rem;
  padding-bottom: 0.6rem;
}

#consulta-form .row.g-2 > [class^="col-"],
#consulta-form .row.g-2 > [class*=" col-"] {
  margin-bottom: 0.15rem;
}

/* =========================================================
   Cards / UI (gcard) - unificado
========================================================= */
.modern-modal {
  background: #fff;
}

.gcard {
  border: 1px solid #eceff3;
  background: linear-gradient(180deg, #fff, #fbfbfc);
  box-shadow: 0 6px 16px rgba(60, 64, 67, 0.08) !important;
}

.gcard-header {
  padding: 1rem 1rem 0.5rem;
}

.gcard-body {
  padding: 0.75rem 1rem 1rem;
}

.gavatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f5f6f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #5f6368;
}

.gtitle {
  font-size: 1.05rem;
  font-weight: 600;
}

.gsubtitle {
  color: #6b7280;
}

.gsection-label {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #5f6368;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.ginfo-list {
  display: grid;
  gap: 0.45rem;
}

.ginfo-item {
  padding: 0.55rem 0.65rem;
  border: 1px solid #edf0f4;
  border-radius: 12px;
  background: #f1f1f1;
}

.ginfo-label {
  font-size: 0.75rem;
  color: #1a524f;
  margin-bottom: 0.15rem;
  font-weight: 500;
}

.ginfo-value {
  font-size: 0.93rem;
  color: #1f2937;
}

.logo-img {
  height: clamp(28px, 4vw, 48px);
  width: auto;
  max-width: 100%;
  object-fit: contain;
  image-rendering: auto;
  display: inline-block;
}

/* =========================================================
   Material-ish select (Google)
========================================================= */
.gmd-select {
  position: relative;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji";
}

.gmd-control {
  color: var(--md-text);
  background: var(--md-surface);
  border: 1px solid var(--md-outline);
  border-radius: 0.5rem;
  padding: 0.7rem 0.95rem;
  height: calc(2.75rem + 2px);
  line-height: 1.2;
  box-shadow: none;
  appearance: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease,
    background-color 0.18s ease;
  text-transform: uppercase;
}

.gmd-control:hover {
  border-color: var(--md-outline-strong);
  background-color: #fcfdff;
}

.gmd-select:focus-within .gmd-control {
  border-color: var(--md-primary);
  box-shadow: 0 0 0 0.25rem var(--md-focus-ring);
  outline: 0;
}

.gmd-label {
  position: absolute;
  top: -0.6rem;
  left: 0.85rem;
  padding: 0 0.35rem;
  background: #87bf8a;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: #fff;
  pointer-events: none;
  border-radius: 5px;
}

.gmd-select:focus-within .gmd-label {
  color: var(--md-primary);
}

.gmd-support {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--md-muted);
}

.gmd-control:disabled {
  background-color: #f5f6f7;
  color: #9aa0a6;
  border-color: var(--md-outline);
  cursor: not-allowed;
}

@media (max-width: 576px) {
  .gmd-control {
    height: calc(2.5rem + 2px);
    padding: 0.55rem 0.8rem;
  }
  .gmd-label {
    top: -0.55rem;
    left: 0.75rem;
  }
}

/* =========================================================
   Branding / agenda form
========================================================= */
.brand-logo {
  max-height: 48px;
  width: auto;
}

.agenda-form {
  background: #f1f1f1;
  border-radius: 10px;
  color: white;
  margin-top: 5px;
  padding: 5px;
  padding-bottom: 15px;
}

.agenda-form .gmd-label,
.agenda-form .gmd-support {
  color: #fff;
}

/* =========================================================
   Calendario wrapper (unificado)
========================================================= */
.calendario-wrapper {
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 0.5rem;
}

@media (max-width: 992px) {
  .calendario-wrapper {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 576px) {
  .calendario-wrapper {
    grid-template-columns: repeat(2, 1fr);
  }
}

.cal-dia {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.8rem;
  padding: 0.85rem;
  text-align: center;
  background: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  user-select: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.cal-dia:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.cal-dia.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f4f5f6;
}

.cal-dia .titulo {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}

.cal-dia .badge-count {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.45rem;
  border-radius: 0.5rem;
  background: rgba(26, 82, 79, 0.1);
  color: #1a524f;
}

/* =========================================================
   Horarios disponibles (grid + slots)
========================================================= */
#horariosDisponibles {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 0.9rem;
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0.25rem;
  box-sizing: border-box;
}

#horariosDisponibles > .mb-2 {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  padding: 0.6rem 0.8rem;
  border-radius: 0.9rem;
  background: #314559;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.07);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
  color: #e5e7eb;
  cursor: default;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

#horariosDisponibles > .mb-2::before {
  content: "🕒";
  font-size: 1.05rem;
  line-height: 1;
  opacity: 0.9;
}

/* ✅ (versión más nueva) slots */
.h-slot {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.6rem;
  padding: 0.6rem 0.7rem;
  text-align: center;
  background: #e7607b;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

@media (max-width: 992px) {
  #horariosDisponibles {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 576px) {
  #horariosDisponibles {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* =========================================================
   Calendario mensual
========================================================= */
.cal-month-wrapper {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 14px;
  background: #4d4d4d;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  padding: 0.75rem;

  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.cal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.5rem 0.75rem;
}

.cal-bar .cal-title {
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: capitalize;
}

.cal-nav-btn {
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #fff;
  border-radius: 10px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.cal-nav-btn:hover {
  background: #f6f7f8;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  gap: 0.25rem;
  color: #fff;
  font-size: 0.8rem;
  margin: 0 0.25rem 0.25rem;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.25rem;
}

.cal-cell {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  padding: 0.5rem;
  min-height: 70px;
  position: relative;
}

.cal-cell .num {
  font-weight: 700;
  font-size: 0.9rem;
}

.cal-cell.other {
  background: #fafafa;
  color: #9ca3af;
}

.cal-cell.blocked {
  opacity: 0.6;
}

.cal-cell.enabled {
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.cal-cell.enabled:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  background: #f9fbfb;
}

.cal-cell.enabled.selected {
  outline: #4caf50;
  background: #4caf50;
  color: white;
}

#calendarioDisponibilidades {
  display: block;
  width: 100%;
  max-width: 100%;
  clear: both;
  margin-top: 0.75rem;
}

@media (max-width: 576px) {
  .cal-cell {
    min-height: 56px;
    padding: 0.4rem;
  }
  .cal-cell .num {
    font-size: 0.85rem;
  }
}

/* =========================================================
   Citas UI
========================================================= */
.cita-header-badge {
  font-weight: 600;
  letter-spacing: 0.02em;
}

.cita-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}

.cita-card + .cita-card {
  margin-top: 0.75rem;
}

.cita-kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 0.25rem 0.75rem;
  color: #fff;
}

@media (max-width: 576px) {
  .cita-kv {
    grid-template-columns: 1fr;
  }
}

.cita-card {
  background-color: #4d4d4d;
}

/* =========================================================
   Header logo
========================================================= */
.header-thumb {
  object-fit: cover;
  display: block;
}

.header-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
  display: block;
  background: transparent;
  border: 0;
  box-shadow: none;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

@media (max-width: 576px) {
  .header-logo {
    height: 44px;
  }
}

/* Bootstrap pills */
.nav-pills .nav-link.active {
  background-color: #4caf50 !important;
}

/* =========================================================
   Urgencias stepper
========================================================= */
.urgencias-stepper {
  position: relative;
  display: flex;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.85rem;
  background: #f5f7fb;
}

.urgencias-stepper::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 1.5rem;
  right: 1.5rem;
  height: 2px;
  background: var(--urgencias-line);
  z-index: 1;
}

.urgencias-stepper .nav-item {
  z-index: 2;
}

.urgencias-stepper .nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: #5f6368;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background-color 0.2s ease, border-color 0.2s ease,
    color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.urgencias-stepper .nav-link:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: #d0d7e2;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.urgencias-stepper .nav-link.active {
  background: linear-gradient(135deg, var(--urgencias-primary), #4caf50);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(46, 125, 50, 0.35);
}

.urgencias-stepper .step-index {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  border: 2px solid var(--urgencias-primary);
  background: #fff;
  color: var(--urgencias-primary);
  box-shadow: 0 0 0 3px var(--urgencias-primary-soft);
}

.urgencias-stepper .nav-link.active .step-index {
  background: #fff;
  color: var(--urgencias-primary);
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.urgencias-stepper .step-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.urgencias-stepper .step-label {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.urgencias-stepper .step-sub {
  font-size: 0.75rem;
  opacity: 0.8;
}

.urgencias-stepper .nav-link.active .step-label,
.urgencias-stepper .nav-link.active .step-sub {
  color: #ffffff;
}

@media (max-width: 576px) {
  .urgencias-stepper {
    flex-direction: column;
    gap: 0.5rem;
  }
  .urgencias-stepper::before {
    display: none;
  }
}

/* =========================================================
   Accordion urgencias (nota)
========================================================= */
.accordion-urgencias .accordion-item {
  background-color: #ffffff;
}

.accordion-urgencias .accordion-button {
  background: linear-gradient(
    90deg,
    rgba(76, 175, 80, 0.08),
    rgba(255, 255, 255, 0.98)
  );
  font-size: 0.9rem;
  color: #333;
}

.accordion-urgencias .accordion-button.collapsed {
  background: #f8f9fa;
  color: #495057;
}

.accordion-urgencias .accordion-button:not(.collapsed) {
  color: var(--urg-main);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.04);
}

.accordion-urgencias .accordion-button:focus {
  box-shadow: 0 0 0 0.15rem rgba(76, 175, 80, 0.25);
}

.accordion-urgencias .accordion-body {
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

#notaUrgenciasForm .form-control,
#notaUrgenciasForm .form-select,
#notaUrgenciasForm textarea {
  border-radius: 0.6rem;
  border-color: #dde2e6;
}

#notaUrgenciasForm .form-control:focus,
#notaUrgenciasForm .form-select:focus,
#notaUrgenciasForm textarea:focus {
  border-color: var(--urg-main);
  box-shadow: 0 0 0 0.15rem rgba(76, 175, 80, 0.2);
}

#notaUrgenciasForm .form-label {
  letter-spacing: 0.02em;
}

@media (max-width: 576px) {
  .accordion-urgencias .accordion-button {
    align-items: flex-start;
  }
}

/* =========================================================
   Urg step badge (unificado; última versión gana)
========================================================= */
.urg-step-badge {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;

  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  color: #2e7d32;
  border: 1px solid rgba(46, 125, 50, 0.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);

  transition: all 0.2s ease-in-out;
}

.urg-step-badge i {
  line-height: 1;
}

.urgencias-stepper .nav-link.active .urg-step-badge {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: #ffffff;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 14px rgba(46, 125, 50, 0.35);
}

.urgencias-stepper .nav-link:not(.active):hover .urg-step-badge {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}

/* =========================================================
   Close button urgencias (verde)
========================================================= */
.btn-close-urg {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%232e7d32'%3e%3cpath d='M.293 1.707a1 1 0 0 1 1.414-1.414L8 6.586l6.293-6.293a1 1 0 0 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8z'/%3e%3c/svg%3e");
  opacity: 1;
}

.btn-close-urg:hover {
  filter: brightness(0.85);
}

/* =========================================================
   Icon button (g-iconbtn)
========================================================= */
.g-iconbtn {
  --sz: 34px;
  width: var(--sz);
  height: var(--sz);
  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;

  text-decoration: none;
  cursor: pointer;

  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, border-color 0.15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.g-iconbtn i {
  font-size: 1.05rem;
  line-height: 1;
}

.g-iconbtn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.g-iconbtn:active {
  transform: translateY(0px) scale(0.98);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.g-iconbtn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.18),
    0 10px 22px rgba(0, 0, 0, 0.12);
}

.g-iconbtn--primary {
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.08);
  border-color: rgba(13, 110, 253, 0.2);
}
.g-iconbtn--success {
  color: #198754;
  background: rgba(25, 135, 84, 0.1);
  border-color: rgba(25, 135, 84, 0.22);
}
.g-iconbtn--warning {
  color: #b86a00;
  background: rgba(255, 193, 7, 0.18);
  border-color: rgba(255, 193, 7, 0.35);
}
.g-iconbtn--danger {
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
  border-color: rgba(220, 53, 69, 0.22);
}
.g-iconbtn--neutral {
  color: #495057;
  background: rgba(73, 80, 87, 0.08);
  border-color: rgba(73, 80, 87, 0.18);
}

a.g-iconbtn {
  vertical-align: middle;
}

/* =========================================================
   Urgencias Cards (modal-body / cards)
========================================================= */
.modal-body {
  background: #f6f9fc;
}

#urgenciasCards {
  padding-top: 4px;
}

.urg-accordion {
  border-radius: var(--urg-radius);
}

.urg-card {
  border: none !important;
  border-radius: var(--urg-radius) !important;
  overflow: hidden;
  background: #314559;
  box-shadow: 0 18px 40px var(--urg-shadow);
  position: relative;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.urg-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.3);
}

.urg-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--urg-radius);
  padding: 2px;
  background: linear-gradient(135deg, var(--urg-green-4), rgba(255, 255, 255, 0.18));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.urg-card__header {
  background: transparent;
  border: 0;
}

.urg-acc-btn {
  background: transparent !important;
  border: none !important;
  color: var(--urg-white) !important;
  padding: 18px 18px !important;
  box-shadow: none !important;
  border-radius: var(--urg-radius) !important;
}

.urg-acc-btn:not(.collapsed) {
  background: rgba(0, 0, 0, 0.08) !important;
}

.urg-acc-btn::after {
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.urg-card__title {
  font-weight: 800;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  line-height: 1.1;
  color: var(--urg-white);
}

.urg-card__title i {
  font-size: 1.2rem;
  opacity: 0.95;
}

.urg-card__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--urg-soft);
  font-size: 0.92rem;
  margin-top: 6px;
}

.urg-card__meta strong {
  font-weight: 800;
  color: var(--urg-white);
}

.urg-muted {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Pills */
.urg-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  color: var(--urg-white);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.urg-pill i {
  font-size: 14px;
  opacity: 0.9;
}

.urg-pill-real {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 0 14px 24px var(--urg-shadow-strong);
  background: linear-gradient(180deg, var(--urg-red), var(--urg-red-dark));
  color: var(--urg-white);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.urg-pill-real i {
  opacity: 0.95;
}

/* Badges */
.urg-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 18px var(--urg-shadow);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(6px);
}

.urg-badge--pending,
.urg-badge--warning,
.urg-badge--orange {
  background: linear-gradient(180deg, var(--urg-orange), var(--urg-orange-dark));
  color: var(--urg-white);
}

.urg-badge--success {
  background: rgba(255, 255, 255, 0.16);
  color: var(--urg-white);
}

.urg-badge--danger {
  background: linear-gradient(180deg, var(--urg-red), var(--urg-red-dark));
  color: var(--urg-white);
}

.urg-badge--info {
  background: cadetblue;
  border-color: cadetblue;
  color: #fff;
}

.urg-badge--rz,
.urg-badge--can {
  background: #d73a52;
  border-color: #d73a52;
  color: #fff;
}

.urg-badge--or {
  background: #ff8800;
  border-color: #ff8800;
  color: #fff;
}

.urg-badge--nla {
  background: #074560;
  border-color: #074560;
  color: #fff;
}

.urg-badge--ok {
  background: #4caf50;
  border-color: #4caf50;
  color: #fff;
}

.urg-badge--warn {
  background: #d89e70;
  border-color: #d89e70;
  color: #fff;
}

.urg-badge--muted {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

/* Body */
.urg-card__body {
  background-color: #fff !important;
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--urg-white);
  padding: 18px;
}

.urg-kv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 992px) {
  .urg-kv {
    grid-template-columns: 1fr;
  }
}

.urg-kv__item {
  background: #2d4052;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.urg-kv__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 4px;
  letter-spacing: 0.2px;
}

.urg-kv__value {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--urg-white);
  line-height: 1.2;
}

/* Detalle */
.urg-detail-wrap {
  padding: 12px 12px 16px;
}

.urg-detail-card {
  background: #2d4052;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(8px);
}

.urg-item {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.urg-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
}

.urg-label {
  font-weight: 800;
  font-size: 0.85rem;
  display: flex;
  gap: 8px;
  align-items: center;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.urg-label i {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #314559;
  color: #fff;
  font-size: 14px;
}

.urg-value {
  font-size: 0.92rem;
  color: var(--urg-soft);
  line-height: 1.35rem;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 576px) {
  .urg-detail-card {
    padding: 12px;
  }
  .urg-item {
    padding: 10px 12px;
  }
  .urg-value {
    font-size: 13.5px;
  }
}

/* Footer */
.urg-card__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
}

.btn-enviar-validacion {
  border-radius: 999px !important;
  padding: 9px 14px !important;
  font-weight: 800 !important;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  backdrop-filter: blur(8px);
  transition: transform 0.15s ease;
}

.btn-enviar-validacion:hover {
  transform: translateY(-1px);
}

.btn-urg-save {
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  background: #4caf50;
  color: #fff;
  box-shadow: 0 10px 22px rgba(34, 197, 94, 0.25),
    0 4px 10px rgba(15, 118, 110, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-urg-save:hover {
  transform: translateY(-2px);
  filter: brightness(1.03);
  box-shadow: 0 14px 30px rgba(34, 197, 94, 0.3),
    0 6px 14px rgba(15, 118, 110, 0.22);
}

.btn-urg-save:active {
  transform: translateY(0px);
}

.btn-urg-save:focus {
  outline: none;
  box-shadow: 0 0 0 0.25rem rgba(34, 197, 94, 0.25),
    0 10px 22px rgba(34, 197, 94, 0.22);
}

/* =========================================================
   Nota Larga (notalargaid)
========================================================= */
#notalargaid .form-control,
#notalargaid .form-select {
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 11px 14px;
}

#notalargaid .form-control:focus,
#notalargaid .form-select:focus {
  border-color: rgba(13, 110, 253, 0.55);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

#notalargaid .card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#notalargaid .card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.1);
}

#notalargaid .accordion-button:focus {
  box-shadow: none;
}

#notalargaid .accordion-button::after {
  filter: brightness(10);
}

#notalargaid .accordion-item {
  border-radius: 18px !important;
}

.nl-acc-btn {
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.nl-acc-btn:focus {
  outline: none;
  box-shadow: none;
}

.nl-acc-icon {
  opacity: 0.65;
  transition: transform 0.18s ease;
}

.nl-acc-btn[aria-expanded="true"] .nl-acc-icon {
  transform: rotate(180deg);
}

/* =========================================================
   HERO urg (topo) - se queda con la última versión ::before
========================================================= */
.urg-hero-topo {
  --hero-green: #4caf50;
  --hero-green-2: #2e7d32;
  --hero-radius: 22px;

  position: relative;
  border-radius: var(--hero-radius);
  padding: clamp(20px, 3vw, 48px) 16px;

  overflow: hidden;

  background: linear-gradient(135deg, var(--hero-green), var(--hero-green-2));
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);

  isolation: isolate;
}

/* ✅ última versión (multi capas) */
.urg-hero-topo::before {
  content: "";
  position: absolute;
  inset: 0;

   background-image: url("../images/banner-overlay-img.png");

  background-repeat: repeat;
  background-size: 900px auto;
  background-position: center, calc(50% + 20px) calc(50% + 10px),
    calc(50% - 18px) calc(50% - 12px), calc(50% + 40px) calc(50% - 20px),
    calc(50% - 38px) calc(50% + 22px), calc(50% + 60px) calc(50% + 30px);

  opacity: 1;
  mix-blend-mode: screen;
  filter: brightness(1.6) contrast(1.2);
  pointer-events: none;
  z-index: 1;
}

.urg-hero-topo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(900px 380px at 50% 35%, rgba(255, 255, 255, 0.1), transparent 60%),
    radial-gradient(900px 500px at 50% 120%, rgba(0, 0, 0, 0.1), transparent 55%);
  pointer-events: none;
}

.urg-hero-topo__content {
  position: relative;
  z-index: 3;
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
}

.urg-hero-topo__title {
  margin: 0 0 10px 0;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: clamp(28px, 3.6vw, 56px);
  line-height: 1.05;
  text-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.urg-hero-topo__sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 600;
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.55;
  text-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

/* =========================================================
   MODAL NOTA LARGA (FULLSCREEN)
========================================================= */
.nl-modal .modal-dialog {
  margin: 0;
}

.nl-modal__content {
  border: 0;
  background: radial-gradient(1000px 420px at 12% 0%, rgba(76, 175, 80, 0.22), transparent 55%),
    radial-gradient(820px 380px at 92% 8%, rgba(46, 125, 50, 0.18), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.nl-modal__header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(135deg, #4caf50, #2e7d32);
  color: #fff;
  padding: 18px 18px;
}

.nl-modal__sub {
  opacity: 0.9;
}

.nl-modal__body {
  padding: 18px;
  overflow: auto;
}

.nl-modal__footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  border-top: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  padding: 14px 18px;
}

/* Form card */
.nl-form-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

.nl-form-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.1);
  overflow: hidden;
}

.nl-form-card__top {
  padding: 16px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(76, 175, 80, 0.1), rgba(255, 255, 255, 0));
}

.nl-form-card__title {
  margin: 0;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.92);
}

.nl-form-card__hint {
  margin-top: 4px;
  color: rgba(15, 23, 42, 0.62);
}

.nl-form-card__body {
  padding: 16px 16px 18px;
}

.nl-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: rgba(15, 23, 42, 0.9);
  margin: 14px 0 8px;
}

.nl-section-title i {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(76, 175, 80, 0.12);
  color: #2e7d32;
}

.nl-label {
  font-weight: 700;
  color: rgba(15, 23, 42, 0.78);
  margin-bottom: 6px;
}

.nl-control {
  border-radius: 14px !important;
  border: 1px solid rgba(15, 23, 42, 0.14) !important;
  background: rgba(255, 255, 255, 0.96) !important;
  padding: 12px 12px !important;
  box-shadow: none !important;
}

.nl-control:focus {
  border-color: rgba(76, 175, 80, 0.55) !important;
  box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.18) !important;
}

.nl-help {
  color: rgba(15, 23, 42, 0.55);
  font-size: 0.85rem;
}

.nl-switch .form-check-input {
  width: 2.7em;
  height: 1.45em;
  border-radius: 999px;
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: none;
}

.nl-switch .form-check-input:checked {
  background-color: #4caf50;
  border-color: #4caf50;
}

.nl-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(248, 250, 252, 0.92);
  color: rgba(15, 23, 42, 0.7);
  font-weight: 700;
  font-size: 0.88rem;
}

.nl-btn-save {
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  box-shadow: 0 14px 28px rgba(76, 175, 80, 0.22);
}

/* =========================================================
   Modal Nota Larga Edit
========================================================= */
#modalNotaLargaEdit .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 22px 70px rgba(15, 23, 42, 0.28);
  background: #fff;
}

#modalNotaLargaEdit .modal-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border: 0;
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 1), rgba(46, 125, 50, 1));
  color: #fff;
}

#modalNotaLargaEdit .modal-title {
  font-weight: 900;
  letter-spacing: 0.2px;
}

#modalNotaLargaEdit .btn-close {
  filter: invert(1);
  opacity: 0.9;
}

#modalNotaLargaEdit .btn-close:hover {
  opacity: 1;
}

#modalNotaLargaEdit .modal-body {
  background: radial-gradient(1200px 300px at 10% 0%, rgba(76, 175, 80, 0.14), transparent 60%),
    radial-gradient(900px 260px at 90% 10%, rgba(46, 125, 50, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
  padding: 18px;
}

#modalNotaLargaEdit .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  border: 0;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
}

#modalNotaLargaEdit .nl-edit-wrap {
  max-width: 100%;
  margin: 0 auto;
}

#modalNotaLargaEdit .nl-edit-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.1);
}

#modalNotaLargaEdit .nl-edit-card__head {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(76, 175, 80, 0.1), rgba(255, 255, 255, 0));
}

#modalNotaLargaEdit .nl-edit-card__head .nl-edit-title {
  margin: 0;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  gap: 10px;
}

#modalNotaLargaEdit .nl-edit-card__body {
  padding: 16px;
}

#modalNotaLargaEdit .nl-field {
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(248, 250, 252, 0.9);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

#modalNotaLargaEdit .nl-field:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: rgba(76, 175, 80, 0.2);
}

#modalNotaLargaEdit .nl-field .form-label {
  font-weight: 800;
  color: rgba(15, 23, 42, 0.72);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

#modalNotaLargaEdit .nl-field .form-control,
#modalNotaLargaEdit .nl-field .form-select {
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 10px 12px;
  background: #fff;
  box-shadow: none;
}

#modalNotaLargaEdit .nl-field textarea.form-control {
  min-height: 110px;
  resize: vertical;
}

#modalNotaLargaEdit .nl-field .form-control:focus,
#modalNotaLargaEdit .nl-field .form-select:focus {
  border-color: rgba(76, 175, 80, 0.55);
  box-shadow: 0 0 0 0.22rem rgba(76, 175, 80, 0.16);
}

#modalNotaLargaEdit .invalid-feedback {
  font-weight: 600;
}
