/* ==========================================================================
   NZT-48 - SISTEMA DE DISEÑO Y ESTILOS UNIFICADOS (NZT-48)
   ========================================================================== */

:root {
  --nzt48-red: #da291c;
  --nzt48-red-hover: #b91c1c;
  --nzt48-dark: #1e293b;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-color: #334155;
  --text-muted: #64748b;
  --border-color: #cbd5e1;
  --primary-color: #d32f2f;
  --primary-dark: #b71c1c;
  --apto-color: #2e7d32;
  --no-apto-color: #c62828;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN GLOBAL
   ========================================================================== */
header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-text {
  color: var(--nzt48-red);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
}

.logo-sub {
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  border-left: 1px solid var(--border-color);
  padding-left: 15px;
}

main {
  flex: 1;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
}

/* Cabecera unificada de vista (back-nav + título integrado) */
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--nzt48-red);
  border-radius: 10px;
  padding: 14px 20px;
  margin-bottom: 24px;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.view-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.view-header-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.view-header-title h2 {
  font-size: 15px;
  font-weight: 800;
  color: var(--nzt48-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-header-title span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.view-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* Botones de acción unificados */
.btn-action,
.btn-back,
.btn-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-action {
  background-color: var(--nzt48-red);
  color: white;
}

.btn-action:hover {
  background-color: var(--nzt48-red-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(218, 41, 28, 0.3);
}

.btn-back {
  background-color: #f1f5f9;
  color: var(--nzt48-dark);
  border: 1px solid var(--border-color);
}

.btn-back:hover {
  background-color: #e2e8f0;
  border-color: #94a3b8;
}

.btn-sub {
  background: #f8fafc;
  color: var(--nzt48-dark);
  border: 1px solid var(--border-color);
}

.btn-sub:hover {
  background: #ffffff;
  border-color: var(--nzt48-red);
}

/* Mantener back-nav como alias para compatibilidad */
.back-nav {
  display: none;
}

/* ==========================================================================
   TITULOS Y CONTENEDORES DE DOCUMENTO
   ========================================================================== */
.page-title {
  font-size: 18px;
  color: var(--nzt48-dark);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-left: 4px solid var(--nzt48-red);
  padding-left: 12px;
  font-weight: 800;
}

.document-container {
  background-color: var(--card-bg);
  padding: 30px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
}

.doc-header {
  border-bottom: 3px solid var(--nzt48-red);
  padding-bottom: 20px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
}

.doc-title h1 {
  font-size: 22px;
  color: var(--nzt48-dark);
  font-weight: 900;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.doc-title p {
  font-size: 13px;
  color: var(--nzt48-red);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   MENÚ PRINCIPAL Y DASHBOARD (GRID DE TARJETAS + BUSCADOR)
   ========================================================================== */
.menu-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 20px;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  max-width: 450px;
}

.search-box input {
  width: 100%;
  padding: 10px 14px 10px 38px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  background: #ffffff;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.search-box input:focus {
  border-color: var(--nzt48-red);
  box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.12);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
  pointer-events: none;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.menu-card {
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border-color);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.menu-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(218, 41, 28, 0.15);
  border-color: var(--nzt48-red);
}

.card-img-container {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.card-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.menu-card:hover .card-img-container img {
  transform: scale(1.05);
}

.card-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.2) 60%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 15px;
  color: white;
}

.card-img-overlay h3 {
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 2px;
}

.card-location {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

.card-body-menu {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.card-metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.card-metric span:first-child {
  font-size: 11px;
  color: #7f8c8d;
  font-weight: 700;
  text-transform: uppercase;
}

.card-metric span:last-child {
  font-size: 12px;
  color: var(--nzt48-red);
  font-weight: 700;
  text-align: right;
}

.card-description {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}

/* ==========================================================================
   FORMULARIO Y REJILLAS METADATOS / DASHBOARD PANELS
   ========================================================================== */
.meta-header-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
  background: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.meta-item label,
.input-group label,
.field label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  display: block;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.meta-item input,
.meta-item select,
.input-group input,
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 13px;
  background: #ffffff;
  outline: none;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.meta-item input:focus,
.meta-item select:focus,
.input-group input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--nzt48-red);
  box-shadow: 0 0 0 3px rgba(218, 41, 28, 0.1);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.span-2 {
  grid-column: span 2;
}
.span-3 {
  grid-column: span 3;
}

.dashboard-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-header-modern {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  background: #f8fafc;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.card-header-modern::before {
  content: "";
  display: block;
  width: 4px;
  height: 14px;
  background-color: var(--nzt48-red);
  border-radius: 2px;
}

.card-body {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ==========================================================================
   TABLAS DE DATOS TÉCNICOS Y REGISTROS
   ========================================================================== */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

table.data-table th,
table.data-table td {
  border: 1px solid var(--border-color);
  padding: 6px 8px;
  text-align: left;
}

table.data-table th {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 700;
}

table.data-table input,
table.data-table select {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
}

table.data-table tfoot td {
  background-color: #f8fafc;
  font-weight: bold;
  color: var(--nzt48-dark);
  text-align: center;
}

.table-scroll-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 15px;
  padding-bottom: 5px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
}

.nzt48-official-table {
  width: 100%;
  min-width: 950px;
  border-collapse: collapse;
  font-size: 11px;
  text-align: center;
}

.nzt48-official-table th,
.nzt48-official-table td {
  border: 1px solid #ccc;
  padding: 6px 4px;
  white-space: nowrap;
}

.nzt48-official-table th {
  background-color: #eceff1;
  font-weight: 700;
  color: #37474f;
}

.sub-th {
  font-size: 10px;
  background-color: #f5f5f5 !important;
}
.bg-v {
  background-color: #e3f2fd !important;
}
.bg-i {
  background-color: #fff3e0 !important;
}
.bg-p {
  background-color: #e8f5e9 !important;
}
.bg-e {
  background-color: #f3e5f5 !important;
}
.bg-pf {
  background-color: #efebe9 !important;
}

.date-cell,
.equip-cell {
  font-weight: bold;
  background-color: #fafafa;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-media {
  background-color: #fff9c4;
  font-weight: bold;
}
.Highlight-date {
  color: var(--primary-dark);
}

.badge-apto {
  background-color: #e8f5e9;
  color: var(--apto-color);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 10px;
}

.badge-no-apto {
  background-color: #ffebee;
  color: var(--no-apto-color);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 10px;
}

/* ==========================================================================
   RESULTADOS ANALÍTICOS, ALERTAS Y GRÁFICOS
   ========================================================================== */
.results-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  background: #f8fafc;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 12px;
}

.result-box-item label {
  font-weight: 700;
  color: #475569;
  display: block;
  margin-bottom: 3px;
  font-size: 11px;
}

.result-box-item span {
  font-weight: 800;
  color: #0f172a;
  font-size: 15px;
}

.alert-box {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  display: none;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}
.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.chart-container {
  position: relative;
  height: 320px;
  width: 100%;
  margin-top: 10px;
}

/* ==========================================================================
   FOTOS Y COMENTARIOS
   ========================================================================== */
.section-title {
  background-color: #f8f9fa;
  border-left: 4px solid var(--nzt48-red);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: bold;
  margin: 25px 0 15px 0;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.photo-box {
  border: 2px dashed #ccc;
  height: 200px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  cursor: pointer;
  background-color: #fafafa;
  overflow: hidden;
  position: relative;
  padding: 5px;
  transition: border-color 0.2s;
}

.photo-box:hover {
  border-color: var(--nzt48-red);
}

.photo-box img {
  width: 100%;
  height: calc(100% - 25px);
  object-fit: cover;
  margin-bottom: 5px;
}

.photo-box input[type="file"] {
  display: none;
}

.btn-delete-photo {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(218, 41, 28, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.photo-box.has-image .btn-delete-photo {
  display: flex;
}

.photo-description {
  font-size: 11px;
  font-weight: bold;
  color: #444;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 4px 6px;
  border-radius: 3px;
  width: 100%;
  text-align: center;
  border-top: 1px solid #eee;
}

.notes-textarea,
.diagnosis-textarea {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  width: 100%;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  min-height: 100px;
  color: var(--text-color);
}

/* ==========================================================================
   FÓRMULAS Y BLOQUES DE INFORMACIÓN (KATEX / SITRANS CALLOUTS)
   ========================================================================== */
.formulas-container {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px;
  margin-top: 20px;
}

.formulas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.formula-card {
  background: #fff;
  padding: 14px 18px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.formula-card strong {
  color: var(--nzt48-dark);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.formula-card strong::before {
  content: "";
  width: 6px;
  height: 6px;
  background-color: var(--nzt48-red);
  border-radius: 50%;
  display: inline-block;
}

.formula-card .math-box {
  text-align: center;
  margin: 4px 0;
}

.content-block {
  margin-bottom: 25px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.content-block h2 {
  font-size: 15px;
  color: var(--nzt48-dark);
  border-left: 4px solid var(--nzt48-red);
  padding-left: 12px;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
}

.content-block p {
  font-size: 13px;
  color: var(--text-color);
  margin-bottom: 12px;
  text-align: justify;
  line-height: 1.6;
}

.content-block ul {
  padding-left: 20px;
  margin-bottom: 12px;
}

.content-block li {
  font-size: 13px;
  color: var(--text-color);
  margin-bottom: 8px;
  text-align: justify;
  line-height: 1.5;
}

.callout-box {
  background-color: #fef2f2;
  border-left: 4px solid var(--nzt48-red);
  padding: 14px 18px;
  border-radius: 0 6px 6px 0;
  margin: 15px 0;
  font-size: 12px;
  color: #991b1b;
}

/* ==========================================================================
   FICHA TÉCNICA ABB (BLOQUES Y SECCIONES)
   ========================================================================== */
.block {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 22px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #edf2f7;
}

.block-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.block-num {
  background: var(--nzt48-red);
  color: white;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.block-title {
  color: var(--nzt48-dark);
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sub-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(218, 41, 28, 0.08);
  color: var(--nzt48-dark);
  font-size: 0.72rem;
  font-weight: 700;
}

.sub-section-title {
  margin: 18px 0 10px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--nzt48-dark);
  border-left: 4px solid var(--nzt48-red);
  padding-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.45px;
}

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

/* ==========================================================================
   VISOR DE ESQUEMAS Y MODAL FLOTANTE
   ========================================================================== */
.schemes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
}

.scheme-item-large {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.scheme-item-large h2 {
  font-size: 16px;
  color: var(--nzt48-dark);
  border-left: 4px solid var(--nzt48-red);
  padding-left: 10px;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
}

.scheme-item-large img {
  width: 100%;
  height: 440px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.scheme-item-large img:hover {
  transform: scale(1.01);
  border-color: var(--nzt48-red);
}

.scheme-item-large p {
  font-size: 12px;
  color: #64748b;
  margin-top: 15px;
  text-align: center;
  font-style: italic;
}

.image-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.98);
  overflow: hidden;
  user-select: none;
}

.modal-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: grab;
}

.modal-wrapper:active {
  cursor: grabbing;
}

.image-modal img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.05s ease-out;
  background: #ffffff;
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border: 2px solid #fff;
  pointer-events: none;
}

.zoom-controls {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 41, 59, 0.95);
  padding: 8px 18px;
  border-radius: 30px;
  display: flex;
  gap: 15px;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 2020;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.zoom-btn {
  background: var(--nzt48-red);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition:
    background 0.2s,
    transform 0.1s;
}

.zoom-btn:hover {
  background: #b91c1c;
  transform: scale(1.1);
}

.zoom-level {
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  min-width: 50px;
  text-align: center;
}

.modal-caption {
  position: fixed;
  top: 25px;
  left: 35px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.75);
  padding: 8px 16px;
  border-radius: 6px;
  z-index: 2020;
}

.modal-close-btn {
  position: fixed;
  top: 25px;
  right: 35px;
  background: var(--nzt48-red);
  color: white;
  border: none;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  font-size: 26px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transition:
    background 0.2s,
    transform 0.2s;
  z-index: 2020;
}

.modal-close-btn:hover {
  background: #b91c1c;
  transform: scale(1.05);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background-color: var(--nzt48-dark);
  color: #fff;
  text-align: center;
  padding: 14px;
  font-size: 12px;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   RESPONSIVE & MEDIA PRINT
   ========================================================================== */
@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .span-2,
  .span-3 {
    grid-column: span 1;
  }
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .schemes-grid {
    grid-template-columns: 1fr;
  }
  .scheme-item-large style {
    grid-column: span 1 !important;
  }
  header {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
  .logo-sub {
    border-left: none;
    padding-left: 0;
    margin-top: 4px;
  }
}

@media print {
  .back-nav,
  .menu-toolbar,
  input[type="file"],
  .btn-delete-photo,
  .image-modal,
  .modal-close-btn,
  .zoom-controls {
    display: none !important;
  }
  body {
    background: white;
  }
  main {
    padding: 0;
    max-width: 100%;
  }
  .document-container,
  .block,
  .dashboard-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}
