/* Estilos propios del módulo Mantenimiento FTTH (coherentes con ERP HANSA & Saturación de FAT, cero overflow en móvil) */

.mnt-shell {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 100%;
}

.mnt-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.mnt-banner-priority {
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.mnt-banner-priority.has-alert {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.mnt-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.mnt-chip-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mnt-chip-btn:hover {
  border-color: #2563eb;
  color: #1d4ed8;
}

.mnt-chip-btn.warn {
  border-color: #f59e0b;
  background: #fef3c7;
  color: #92400e;
}

.mnt-chip-btn.danger {
  border-color: #ef4444;
  background: #fee2e2;
  color: #991b1b;
}

.mnt-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.mnt-kpi {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.mnt-kpi:hover {
  border-color: #3b82f6;
  transform: translateY(-1px);
}

.mnt-kpi.active {
  border-color: #1d4ed8;
  background: #eff6ff;
}

.mnt-kpi-label {
  font-size: 0.74rem;
  color: #475569;
  font-weight: 600;
}

.mnt-kpi-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 0.15rem;
}

.mnt-kpi-sub {
  font-size: 0.71rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.mnt-filter-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mnt-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.55rem;
}

.mnt-field {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.mnt-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
}

.mnt-field input,
.mnt-field select,
.mnt-field textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.42rem 0.6rem;
  font-size: 0.85rem;
  background: #ffffff;
  color: #0f172a;
  width: 100%;
  box-sizing: border-box;
}

.mnt-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.mnt-badge-ok { background: #dcfce7; color: #166534; border-color: #86efac; }
.mnt-badge-warn { background: #fef3c7; color: #92400e; border-color: #fcd34d; }
.mnt-badge-danger { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.mnt-badge-info { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.mnt-badge-muted { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }

.mnt-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.9rem;
}

.mnt-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 0.85rem;
}

.mnt-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mnt-bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 140px;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.8rem;
}

.mnt-bar-track {
  background: #f1f5f9;
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.mnt-bar-fill {
  background: linear-gradient(90deg, #2563eb 0%, #0ea5e9 100%);
  height: 100%;
  border-radius: 999px;
}

.mnt-bar-fill.pending-hist {
  background: repeating-linear-gradient(45deg, #cbd5e1, #cbd5e1 6px, #e2e8f0 6px, #e2e8f0 12px);
}

.mnt-mobile-cards {
  display: none;
  flex-direction: column;
  gap: 0.65rem;
}

.mnt-mcard {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.mnt-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.mnt-timeline-item {
  border-left: 3px solid #2563eb;
  background: #f8fafc;
  padding: 0.6rem 0.8rem;
  border-radius: 0 8px 8px 0;
}

@media (max-width: 768px) {
  .mnt-desktop-table {
    display: none;
  }
  .mnt-mobile-cards {
    display: flex;
  }
  .mnt-kpi-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .mnt-bar-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

.mnt-collapsible {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
}

.mnt-collapsible > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.84rem;
  color: #1e293b;
  user-select: none;
}

.mnt-collapsible[open] > summary {
  margin-bottom: 0.65rem;
}

.mnt-active-filters-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.7rem;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 0.8rem;
}

.mnt-month-highlight {
  border: 1px solid #2563eb;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.mnt-grid-toolbar,
.mnt-grid-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #334155;
}

.mnt-grid-toolbar {
  padding-bottom: 0.55rem;
}

.mnt-grid-footer {
  padding-top: 0.55rem;
  border-top: 1px solid #cbd5e1;
}

.mnt-table-scroll {
  max-height: 68vh;
  min-height: 360px;
  overflow-y: auto;
  overflow-x: auto;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  position: relative;
  background: #ffffff;
}

.mnt-table-scroll table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.mnt-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: #f1f5f9;
  box-shadow: inset 0 -2px 0 #94a3b8;
}

.mnt-btn-history-hero {
  background: linear-gradient(135deg, #1d4ed8 0%, #0f172a 100%);
  color: #ffffff;
  border: 2px solid #93c5fd;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.25);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.mnt-btn-history-hero:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(29, 78, 216, 0.35);
}

.mnt-hist-hero-card {
  border: 1px solid #93c5fd;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border-radius: 12px;
  padding: 0.9rem 1rem;
}
