/* ===============================
   REPORTES – UI PRO (TABLA + MODAL)
   Pegar al final de dashboard.css
   =============================== */

/* Contenedor tipo "card" para secciones */
.section-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
  border: 1px solid #e5e7eb;
}

/* Barra superior (título + acciones) */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 800;
  color: #0f172a;
}

/* Buscador */
.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 10px 0 16px;
}

.search-row input[type="text"],
.search-row input[type="search"] {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  outline: none;
}

.search-row input:focus {
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14,165,233,.18);
}

/* Tabla */
.reportes-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.reportes-table thead th {
  background: #0f4c5c;
  color: #fff;
  padding: 14px 12px;
  font-weight: 800;
  text-align: left;
  position: sticky;
  top: 0;
  z-index: 1;
}

.reportes-table thead th:first-child { border-top-left-radius: 12px; }
.reportes-table thead th:last-child  { border-top-right-radius: 12px; }

.reportes-table tbody td {
  padding: 12px;
  border-bottom: 1px solid #e5e7eb;
  color: #0f172a;
  vertical-align: middle;
}

.reportes-table tbody tr:hover {
  background: #f8fafc;
}

/* Evidencia miniatura */
.report-thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #e5e7eb;
  background: #f1f5f9;
}

/* Badges de estatus */
.status {
  display: inline-block;
  padding: .35rem .65rem;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 800;
  border: 1px solid transparent;
}

.status.pendiente {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.status.resuelto {
  background: #ecfdf5;
  color: #15803d;
  border-color: #bbf7d0;
}

.status.proceso {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

/* Acciones */
.actions-cell {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

/* Botones icon */
.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.btn-icon:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(15,23,42,.10);
}

.btn-icon.view {
  border-color: rgba(14,165,233,.35);
  background: rgba(14,165,233,.08);
}

.btn-icon.edit {
  border-color: rgba(15,76,92,.35);
  background: rgba(15,76,92,.10);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 999;
}

.modal-overlay.open { display: flex; }

.modal {
  width: 100%;
  max-width: 980px;
  background: #fff;
  border-radius: 18px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  overflow: hidden;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid #e5e7eb;
}

.modal-title {
  margin: 0;
  font-weight: 900;
  color: #0f172a;
}

.modal-close {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
}

.modal-body {
  padding: 18px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 18px;
}

.modal-image img {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: #f1f5f9;
}

.modal-info {
  display: grid;
  gap: 10px;
}

.modal-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f8fafc;
}

.modal-row strong { color: #0f172a; }
.modal-row span { color: #334155; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 18px;
  border-top: 1px solid #e5e7eb;
}

@media (max-width: 900px) {
  .modal-grid { grid-template-columns: 1fr; }
  .actions-cell { justify-content: flex-start; }
}

/* ===============================
   INICIO - capa visual renovada
================================= */

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.welcome-card {
  text-align: left;
  background:
    radial-gradient(900px 320px at 8% -10%, rgba(14, 165, 233, .17), transparent 62%),
    radial-gradient(720px 260px at 92% 0%, rgba(34, 197, 94, .13), transparent 60%),
    rgba(255, 255, 255, .94);
  border: 1px solid rgba(148, 163, 184, .22);
  overflow: hidden;
}

.welcome-card::before {
  height: 5px;
  background: linear-gradient(90deg, #154965, #0ea5e9, #22c55e);
}

.welcome-time {
  justify-content: flex-start;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  color: #154965;
  background: rgba(14, 165, 233, .10);
  border: 1px solid rgba(14, 165, 233, .18);
  font-weight: 900;
}

.welcome-heading {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -.04em;
  color: #0f172a;
}

.welcome-message {
  max-width: 720px;
  color: #475569;
  font-weight: 750;
}

.stats-preview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-item {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(248, 250, 252, .78));
  border: 1px solid rgba(148, 163, 184, .18);
  box-shadow: 0 14px 28px rgba(2, 6, 23, .07);
  text-align: center;
}

.stat-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #154965, #0ea5e9);
}

.stat-item:nth-child(2)::before {
  background: linear-gradient(90deg, #ef4444, #f97316);
}

.stat-item:nth-child(3)::before {
  background: linear-gradient(90deg, #22c55e, #0f766e);
}

.stat-value {
  color: #0f172a;
  letter-spacing: -.03em;
}

.stat-label {
  color: #64748b;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.action-buttons {
  justify-content: center;
}

.quick-access {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(620px 260px at 20% -8%, rgba(245, 158, 11, .12), transparent 60%),
    rgba(255, 255, 255, .94);
  border: 1px solid rgba(148, 163, 184, .22);
  min-height: 100%;
  opacity: 1;
}

.quick-access-header {
  border-bottom: 1px solid rgba(226, 232, 240, .92);
}

.quick-access h3 {
  margin: 0 0 16px;
  color: #154965;
  font-weight: 950;
}

.quick-access-subtitle {
  margin: -8px 0 18px;
  color: #64748b;
  font-size: .94rem;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
}

.quick-link {
  display: flex !important;
  justify-content: flex-start;
  width: 100%;
  min-height: 54px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, .22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 250, 252, .88)) !important;
  color: #0f172a !important;
  box-shadow: 0 10px 20px rgba(2, 6, 23, .05);
  font-weight: 950;
  text-decoration: none;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
}

.quick-link::before {
  content: "";
  width: 10px;
  align-self: stretch;
  border-radius: 999px;
  background: linear-gradient(180deg, #154965, #0ea5e9);
  box-shadow: 0 0 0 5px rgba(14, 165, 233, .09);
}

.quick-link.btn-accent::before {
  background: linear-gradient(180deg, #f59e0b, #f97316);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, .10);
}

.quick-link svg,
.quick-link i {
  color: #154965;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.quick-link:hover {
  transform: translateX(4px) translateY(-1px);
  box-shadow: 0 14px 26px rgba(2, 6, 23, .08);
  border-color: rgba(14, 165, 233, .32);
  background:
    linear-gradient(180deg, rgba(240, 249, 255, .98), rgba(255, 255, 255, .92)) !important;
}

.operations-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100%;
  padding: 32px;
  background:
    radial-gradient(760px 280px at 12% -8%, rgba(14, 165, 233, .14), transparent 62%),
    radial-gradient(680px 260px at 100% 0%, rgba(245, 158, 11, .12), transparent 60%),
    rgba(255, 255, 255, .94);
  border: 1px solid rgba(148, 163, 184, .22);
  animation: slideIn .5s ease-out .12s forwards;
  opacity: 0;
}

.operations-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, #154965, #f59e0b, #22c55e);
}

.operations-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(226, 232, 240, .92);
}

.operations-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #154965;
  background: rgba(14, 165, 233, .10);
  border: 1px solid rgba(14, 165, 233, .18);
  font-size: .82rem;
  font-weight: 950;
}

.operations-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: clamp(1.6rem, 3vw, 2.35rem);
  font-weight: 950;
  letter-spacing: -.04em;
}

.operations-header p {
  margin: 8px 0 0;
  color: #64748b;
  font-weight: 800;
  line-height: 1.45;
}

.operations-mark {
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #154965;
  background: rgba(255, 255, 255, .82);
  border: 1px solid rgba(148, 163, 184, .20);
  box-shadow: 0 14px 28px rgba(2, 6, 23, .07);
}

.operations-mark svg {
  width: 28px;
  height: 28px;
}

.operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.operations-item {
  position: relative;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 18px 14px;
  border-radius: 20px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 28px rgba(2, 6, 23, .06);
  overflow: hidden;
}

.operations-item::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: #0ea5e9;
}

.operations-item.danger::before { background: linear-gradient(90deg, #ef4444, #f97316); }
.operations-item.warning::before { background: linear-gradient(90deg, #f59e0b, #f97316); }
.operations-item.success::before { background: linear-gradient(90deg, #22c55e, #0f766e); }
.operations-item.info::before { background: linear-gradient(90deg, #154965, #0ea5e9); }

.operations-label {
  color: #64748b;
  font-size: .82rem;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.operations-item strong {
  color: #0f172a;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.05em;
}

.operations-focus {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  color: #154965;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .88), rgba(248, 250, 252, .76));
  border: 1px solid rgba(14, 165, 233, .18);
  font-weight: 900;
  line-height: 1.45;
}

.operations-focus svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .welcome-card {
    text-align: center;
  }

  .welcome-time,
  .action-buttons {
    justify-content: center;
  }

  .welcome-time {
    margin-left: auto;
    margin-right: auto;
  }

  .stats-preview {
    grid-template-columns: 1fr;
  }

  .operations-header {
    align-items: center;
  }
}

@media (max-width: 560px) {
  .operations-card {
    padding: 22px;
  }

  .operations-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-card,
  .quick-access,
  .operations-card,
  .stat-item,
  .quick-link,
  .operations-item {
    animation: none !important;
    transition: none !important;
  }
}

/* ===============================
   INICIO - acabado ejecutivo
================================= */

.dashboard-grid {
  gap: 22px;
}

.welcome-card,
.operations-card {
  background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(203, 213, 225, .72);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .07);
}

.welcome-card::before,
.operations-card::before {
  height: 4px;
  background: #154965;
}

.welcome-time,
.operations-eyebrow {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
  box-shadow: none;
}

.welcome-heading,
.operations-header h3 {
  color: #102a3a;
  letter-spacing: -.035em;
}

.welcome-message,
.operations-header p {
  color: #64748b;
  font-weight: 700;
}

.stats-preview,
.operations-grid {
  gap: 12px;
}

.stat-item,
.operations-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: none;
}

.stat-item:hover,
.operations-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.stat-item::before,
.operations-item::before {
  height: 3px;
}

.stat-value,
.operations-item strong {
  color: #0f172a;
}

.stat-label,
.operations-label {
  color: #64748b;
}

.operations-card {
  padding: 30px;
}

.operations-header {
  border-bottom-color: #e2e8f0;
}

.operations-mark {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: none;
  color: #154965;
}

.operations-focus {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #334155;
  box-shadow: none;
}

.action-buttons .btn {
  box-shadow: none;
}

.action-buttons .btn:hover {
  box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
}

/* Inicio con panel unico */
.dashboard-grid {
  grid-template-columns: minmax(0, 980px);
  justify-content: center;
}

.welcome-card {
  width: 100%;
  text-align: center;
}

.welcome-time {
  margin-left: auto;
  margin-right: auto;
  justify-content: center;
}

.welcome-message {
  margin-left: auto;
  margin-right: auto;
}
