/* ==========================================================================
   POLICÍA DE TIERRA DEL FUEGO - REGISTRO DE AGENCIAS DE SEGURIDAD PRIVADA
   Estilos unificados y optimizados
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,1,0&display=swap');

/* Variables Institucionales */
:root {
  --pdtf-blue: #17394b;
  --pdtf-blue-dark: #0f2734;
  --pdtf-green: #047e1a;
  --pdtf-red: #f20d0d;
  --pdtf-yellow: #f2c90d;
  --pdtf-lime: #d8ef00;
  --pdtf-bg: #f4f6f7;
  --pdtf-card-bg: #fff;
  --pdtf-muted: #68767e;
  --pdtf-line: rgba(23, 57, 75, .12);
  --pdtf-shadow: 0 12px 34px rgba(0, 0, 0, .08);
  --pdtf-radius-lg: 24px;
  --pdtf-radius-md: 16px;
  --pdtf-transition: all .2s cubic-bezier(.4, 0, .2, 1);
}

/* Reset básico */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  background: var(--pdtf-bg);
  color: var(--pdtf-blue);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Contenedor principal */
.pdtf-safety {
  width: 100%;
  max-width: 1180px;
  margin: auto;
  padding: 16px;
}

@media (min-width: 768px) {
  .pdtf-safety {
    padding: 28px;
  }
}

.pdtf-panel {
  overflow: hidden;
  background: var(--pdtf-bg);
  border: 1px solid var(--pdtf-line);
  border-radius: var(--pdtf-radius-lg);
  box-shadow: var(--pdtf-shadow);
}

/* Encabezado */
.pdtf-header {
  padding: 24px 20px 22px;
  background: #fff;
  border-bottom: 1px solid var(--pdtf-line);
}

@media (min-width: 768px) {
  .pdtf-header {
    padding: 32px 34px 28px;
  }
}

/* Botón Volver (por si se reactiva) */
.pdtf-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--pdtf-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(23, 57, 75, .28);
  transition: var(--pdtf-transition);
}

.pdtf-back:hover {
  background: var(--pdtf-blue-dark);
  color: var(--pdtf-lime);
  transform: translateY(-1px);
}

.pdtf-header__brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.pdtf-header__logo {
  width: auto;
  height: 52px;
  object-fit: contain;
}

@media (min-width: 768px) {
  .pdtf-header__logo {
    height: 64px;
  }
}

.pdtf-kicker {
  margin: 0;
  color: #718088;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.pdtf-title {
  margin: 4px 0 0;
  color: var(--pdtf-blue);
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.1;
}

.pdtf-intro {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--pdtf-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Contenido Principal */
.pdtf-agencias-container {
  padding: 24px 16px 36px;
}

@media (min-width: 768px) {
  .pdtf-agencias-container {
    padding: 28px 34px 44px;
  }
}

/* Barra de Filtros y Búsqueda */
.pdtf-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 18px;
}

@media (min-width: 680px) {
  .pdtf-filter-bar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.pdtf-search-wrapper {
  position: relative;
  flex: 1;
  max-width: 460px;
}

.pdtf-search-wrapper .material-symbols-rounded {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--pdtf-muted);
  font-size: 22px;
  pointer-events: none;
}

.pdtf-search-input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  font-family: inherit;
  font-size: 14px;
  color: var(--pdtf-blue);
  background: #fff;
  border: 1px solid var(--pdtf-line);
  border-radius: var(--pdtf-radius-md);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .02);
  outline: none;
  transition: var(--pdtf-transition);
}

.pdtf-search-input:focus {
  border-color: var(--pdtf-blue);
  box-shadow: 0 0 0 3px rgba(23, 57, 75, 0.12);
}

/* Cápsulas de filtrado por ciudad */
.pdtf-city-pills {
  display: flex;
  align-items: center;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  -webkit-overflow-scrolling: touch;
}

.pdtf-pill-btn {
  white-space: nowrap;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #5c6b73;
  background: #ffffff;
  border: 1.5px solid #e1e7ea;
  cursor: pointer;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pdtf-pill-btn:hover {
  color: var(--pdtf-blue);
  border-color: var(--pdtf-blue);
}

.pdtf-pill-btn.is-active {
  background: #17394b;
  color: #ffffff;
  border-color: #17394b;
  box-shadow: 0 4px 14px rgba(23, 57, 75, 0.28);
}

/* Contador de agencias */
.pdtf-stats-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--pdtf-muted);
  margin-bottom: 14px;
  letter-spacing: .02em;
}

/* Spinner de carga */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--pdtf-muted);
  font-weight: 600;
  font-size: 14px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(23, 57, 75, 0.12);
  border-top-color: var(--pdtf-blue);
  border-radius: 50%;
  animation: pdtfSpin 0.8s linear infinite;
  margin-bottom: 14px;
}

@keyframes pdtfSpin {
  to { transform: rotate(360deg); }
}

/* Tarjeta y Tabla de datos */
.pdtf-table-card {
  background: #fff;
  border: 1px solid var(--pdtf-line);
  border-radius: var(--pdtf-radius-md);
  box-shadow: var(--pdtf-shadow);
  overflow: hidden;
}

.pdtf-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pdtf-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.pdtf-data-table th {
  background: #f8fafb;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 800;
  color: var(--pdtf-blue);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--pdtf-line);
  white-space: nowrap;
}

.pdtf-data-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(23, 57, 75, 0.07);
  vertical-align: middle;
  color: var(--pdtf-blue);
}

.pdtf-data-table tr:last-child td {
  border-bottom: none;
}

.pdtf-data-table tr:hover td {
  background: #f8fafc;
}

/* Badges de Ciudad */
.pdtf-badge-city {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.pdtf-badge-city--rg {
  background: rgba(4, 126, 26, 0.12);
  color: #036915;
}

.pdtf-badge-city--ush {
  background: rgba(23, 57, 75, 0.12);
  color: var(--pdtf-blue);
}

.pdtf-badge-city--tol {
  background: rgba(242, 201, 13, 0.25);
  color: #836700;
}

.pdtf-badge-city--other {
  background: #eee;
  color: #666;
}

/* Enlaces de Teléfono y Correo */
.pdtf-link-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--pdtf-blue);
  text-decoration: none;
  font-weight: 600;
  transition: var(--pdtf-transition);
}

.pdtf-link-action:hover {
  color: var(--pdtf-green);
  text-decoration: underline;
}

.pdtf-link-action .material-symbols-rounded {
  font-size: 16px;
  flex-shrink: 0;
  color: var(--pdtf-green);
}

.pdtf-text-muted-empty {
  color: #9aa4aa;
  font-style: italic;
  font-size: 12.5px;
}

/* Estado Sin Resultados */
.pdtf-empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--pdtf-muted);
}

.pdtf-empty-state .material-symbols-rounded {
  font-size: 44px;
  margin-bottom: 10px;
  opacity: 0.5;
}

.pdtf-empty-state p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

/* Pie de página */
.pdtf-footer {
  padding: 20px 24px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--pdtf-muted);
  border-top: 1px solid var(--pdtf-line);
  background: #fff;
}

.pdtf-footer p {
  margin: 0;
}
