/* =========================================================
   Identidad visual — Sistema de Gestión Territorial Municipal
   Autor: Monzon
   Version: 1.1
   ========================================================= */
/*ICONOS*/
@import "lucide.css";
:root {
  --primary: rgb(0 97 148);
  --bs-primary-dark: #17379d;
  --secondary: rgb(0 102 138);
  --bs-primary-rgb: 37, 99, 235;
  --app-body: white;

  --success: rgb(16 185 129);
  --warning: rgb(245 158 11);
  --danger: rgb(239 68 68);
  --info: #0ea5e9;
  --ice: rgb(240 249 255);

  /* typography */
  --app-font-family: "Inter", sans-serif;
  --font-scale: 1;

  --text-primary: rgb(0 97 148);
  --text-muted: rgb(100 116 139);

  --transition-3s: all ease-in-out 0.3s;
}
::-webkit-scrollbar {
  display: none;
}
::selection {
  background-color: rgb(224 242 254);
  color: rgb(0 97 148);
}

* {
  box-sizing: border-box;
}

a {
  color: inherit;
  text-decoration: none;
}
body {
  font-family: var(--app-font-family);
  font-size: 1rem;
  margin: 0;
  transition:
    background-color 0.25s ease,
    color 0.25s ease,
    font-size 0.2s ease;
}
ul {
  padding-left: 0;
  list-style: none;
}
header {
  grid-area: header;
}

aside {
  grid-area: aside;
}

.rightbar {
  grid-area: rightbar;
}

main {
  grid-area: main;
  background-color: var(--bs-border-color);
}

footer {
  grid-area: footer;
}
/*-------------------PERSONALIZACION--------------------*/
.btn {
  letter-spacing: 0.01em;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  padding: 7px 13px;
  border: 0;
  border-radius: 10px;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--primary);
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}
.btn-primary:hover {
  color: white;
  background: rgb(0 123 185);
}
.btn-light {
  background: white;
  color: rgb(30 41 59);
}
.btn-light:hover {
  color: var(--text-primary);
  background-color: var(--ice);
}
.btn-ice {
  color: var(--primary);
  background: var(--ice);
}
.btn-ice:hover {
  color: var(--primary);
  background: rgb(224 242 254);
}
.btn-danger {
  background: color-mix(in srgb, var(--danger) 14%, transparent) !important;
  border-color: color-mix(in srgb, var(--danger) 30%, transparent) !important;
  color: #b53e2e;
  font-weight: 600;
}
.btn-danger:hover {
  background: color-mix(in srgb, var(--danger) 22%, transparent);
  border-color: var(--danger);
  color: #a03428;
}
.btn-sm {
  padding: 4px 10px;
}
.border-subtle-700 {
  border-color: rgb(226 232 240 / 0.7);
}
.border-subtle-500 {
  border-color: rgb(226 232 240 / 0.5);
}
.border-cyan {
  border-color: color-mix(in srgb, var(--cyan) 88%, transparent) !important;
}
.border-primary {
  border-color: rgb(186 230 253);
}

.text-primary {
  color: var(--primary) !important;
}
.text-success {
  color: var(--success) !important;
}
.text-secondary {
  color: var(--secondary) !important;
}
.hover\:text-primary:hover {
  color: var(--primary) !important;
}
.hover\:text-danger:hover {
  color: var(--danger) !important;
}
.text-muted {
  color: var(--text-muted) !important;
}
.text-warning {
  color: var(--warning) !important;
}
.text-danger {
  color: var(--danger) !important;
}
.text-amber {
  color: var(--amber-text);
}
.text-sm {
  font-size: 12px;
}
.text-md {
  font-size: 15px;
}
.text-lg {
  font-size: 18px;
}
.text-xl {
  font-size: 21px;
}
.text-headline-sm {
  font-size: 18px;
  line-height: 26px;
  font-weight: 600;
}
.text-headline-md {
  font-size: 22px;
  line-height: 30px;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.text-headline-lg {
  font-size: 28px;
  line-height: 36px;
  letter-spacing: -0.015em;
  font-weight: 700;
}
.text-body-sm {
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
}
.text-body-md {
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
}

.text-label-md {
  font-size: 13px;
  line-height: 18px;
  letter-spacing: 0.01em;
  font-weight: 600;
}
.text-label-sm {
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.bg-ice {
  background-color: var(--ice);
}
.hover\:bg-ice:hover {
  background-color: var(--ice) !important;
}
.bg-amber-dim {
  background: var(--amber-dim);
}
.bg-success {
  background-color: var(--success) !important;
}
.bg-success-200 {
  background-color: rgb(236 253 245) !important;
}
.bg-surface-tint {
  background-color: rgb(224 242 254);
}
.hover\:bg-surface-tint:hover {
  background-color: rgb(224 242 254) !important;
}
.bg-primary {
  background: var(--primary) !important;
  color: #fff;
}

.bg-primary-100 {
  background-color: rgb(204 229 255);
}
.bg-warning {
  background-color: var(--warning);
}
.bg-warning-50 {
  background-color: rgb(255 251 235);
}
.bg-warning-100 {
  background-color: rgb(254 243 199);
}
.bg-warning-200 {
  background-color: rgb(253 230 138);
}
.bg-warning-300 {
  background-color: rgb(252 214 101);
}
.bg-danger-200 {
  background-color: rgb(239 68 68 / 0.2);
}
.hover\:bg-primary:hover {
  background: color-mix(
    in srgb,
    var(--primary) 4%,
    rgb(224 242 254)
  ) !important;
  border-color: color-mix(
    in srgb,
    var(--primary) 18%,
    var(--bs-border-color)
  ) !important;
}
.bg-secondary {
  background-color: rgb(40 48 68) !important;
}
.bg-secondary-200 {
  background-color: rgb(64 194 253 / 0.2) !important;
}
.bg-surface {
  background-color: rgb(234 237 255);
}
.bg-surface-200 {
  background-color: rgb(248 250 252) !important;
}
.bg-gradient-to-r {
  background-image: linear-gradient(to right, #006194, #e0f2fe);
}
.badge {
  font-size: 11px !important;
  padding: 3px 8px;
  font-weight: 500;
}
.badge-danger {
  background-color: color-mix(in oklab, var(--danger) 10%, transparent);
  color: var(--danger);
}
.badge-warning {
  color: var(--warning);
  background-color: color-mix(in oklab, var(--warning) 10%, transparent);
}
.badge-success {
  background-color: color-mix(in oklab, var(--bs-success) 10%, transparent);
  color: var(--bs-success);
}
.badge-info {
  background-color: color-mix(in oklab, var(--info) 10%, transparent);
  color: var(--info);
}
.badge-outline-light {
  color: var(--bs-border-color);
  border: 1px solid var(--bs-border-color);
}
.alert {
  padding: 0.6rem !important;
  font-size: 13px !important;
  border-radius: 13px;
}
.alert-danger {
  color: #a9542f;
  border-color: color-mix(in srgb, #d87443 25%, var(--bs-border-color));
  background: color-mix(in srgb, #d87443 9%, var(--surface-solid));
}
.alert-success {
  color: var(--mint-text);
  border-color: color-mix(in srgb, var(--mint) 17%, var(--bs-border-color));
  background: color-mix(in srgb, var(--mint) 5%, var(--surface-solid));
}
.alert-info {
  color: rgb(30 41 59);
  border: 1px solid rgb(186 230 253);
  background: var(--ice);
}
.shadow {
  box-shadow:
    0 4px 20px -2px rgba(2, 132, 199, 0.06),
    0 2px 6px -1px rgba(15, 23, 42, 0.04) !important;
}
.shadow-md {
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
}
.hover\:shadow-md:hover {
  box-shadow:
    0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1) !important;
}
.shadow-sm {
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
}
.shadow-inner {
  box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05) !important;
}

.scale:hover .hover\:scale-110 {
  transform: scale(1.1);
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
.hover\:underline:hover {
  text-decoration: underline;
}

/*==========================================================*/
.layout-main {
  background-color: var(--app-body);
  height: 100%;
}
.layout-main.login {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(
      circle at 52% 18%,
      rgba(214, 235, 255, 0.72),
      transparent 30%
    ),
    radial-gradient(
      circle at 34% 40%,
      rgba(223, 243, 245, 0.44),
      transparent 34%
    ),
    radial-gradient(
      circle at 84% 58%,
      rgba(224, 230, 255, 0.35),
      transparent 32%
    ),
    linear-gradient(145deg, #f1f4f8 0%, #f3f6fa 48%, #edf1f7 100%);
}

.app-wrapper {
  display: grid;
  grid-template-columns: 100px 1fr 60px;
  grid-template-rows: auto 1fr;
  min-height: 100vh;
  padding: 0;
  gap: 0;
  grid-template-areas:
    "aside header rightbar"
    "aside main rightbar"
    "aside footer rightbar";
}

.dropdown-toggle::after {
  display: none;
}
.breadcrumb-item + .breadcrumb-item {
  padding-left: 0 !important;
}
.breadcrumb-item + .breadcrumb-item::before {
  padding-right: 0.2rem !important;
  content: "\e06f" !important;
  font-family: "lucide" !important;
}
.current-page {
  color: var(--primary) !important;
  background-color: rgb(224 242 254);
}
.avatar-text {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  background-color: rgb(64 194 253 / 0.2);
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-sm {
  width: 26px;
  height: 26px;
}
.avatar-md {
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
}
.avatar-xl {
  width: 80px;
  height: 80px;
  font-size: 1.5rem;
}
.text-kpi-value {
  font-size: 40px;
  line-height: 38px;
  letter-spacing: -0.02em;
  font-weight: 700;
}
.tinaco-map-container {
  width: 100%;
  overflow: hidden;
}

.tinaco-map {
  display: block;
  width: 100%;
  height: auto;
  min-height: 280px;
  max-height: 480px;
  user-select: none;
}

#territorialMarkers g {
  cursor: pointer;
}

.animate-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse 1.8s ease-out infinite;
}
/*--------------------------------------------------------*/

.card {
  background-color: rgba(var(--bs-dark-rgb));
  border-color: rgba(var(--bs-card-bg-rgb), 1);
  position: relative;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.04);
  border-bottom-width: 3px;
  margin-top: 21px;
}
.card-title {
  position: absolute;
  top: -22px;
  background: rgba(var(--bs-dark-rgb));
  width: calc(100% - 56px);
  height: 21px;
  left: -1px;
  padding-top: 3px;
}
.card.mini {
  border-top-left-radius: 0 !important;
}
.form-label {
  color: rgb(30 41 59);
  font-size: 12px;
  margin-bottom: 0.08rem;
}
.form-control,
.form-select {
  height: 35px;
  font-size: 12px;
  background-color: white;
  border-radius: 0.5rem;
  border: 1px solid rgb(226 232 240);
  color: rgb(30 41 59);
}
.form-control:focus,
.form-select:focus {
  border-color: rgb(0 97 148);
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: 0 0 0 calc(1px + 0px) rgb(0 97 148 / 1);
}
.custom-tooltip {
  --bs-tooltip-bg: var(--bs-primary);
  --bs-tooltip-color: var(--bs-white);
}
.score-value {
  top: 75px;
  color: #212529;
}
.cursor-pointer {
  cursor: pointer;
}
/*---------------------------TABLE--------------------------------------------*/
.table > :not(caption) > * > * {
  color: inherit;
  background-color: inherit;
  border: 0;
  box-shadow: none;
}
.tabla-datos thead tr {
  color: rgb(100 116 139);
  background-color: rgb(234 237 255 / 0.2);
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tabla-datos thead tr th,
.tabla-datos tbody tr td {
  padding: 0.875rem 1rem;
}
.tabla-datos tbody tr:hover {
  background-color: var(--ice);
}
.dataTables_filter input {
  min-width: 400px;
}
.dataTables_wrapper .dataTables_length label {
  font-size: 13px;
  color: var(--text-secondary, #898e9e);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.dataTables_wrapper .pagination .page-item .page-link {
  border-radius: 6px !important;
  border: 0;
  color: rgb(100 116 139);
  font-size: 13px;
  padding: 5px 12px;
  font-weight: 600;
}
div.dataTables_wrapper div.dataTables_paginate ul.pagination {
  margin: 2px 0;
  gap: 4px;
  white-space: nowrap;
  justify-content: flex-end;
}
.dataTables_wrapper .pagination .page-item.disabled .page-link {
  background-color: var(--bg-shade-1, #f6f7f8);
  color: var(--base-3, #a5a9b5);
  border-color: var(--base-4, #ebecef);
}
.dataTables_wrapper .pagination .page-item.active .page-link {
  background-color: var(--primary, #1054de);
  border-color: var(--primary, #1054de);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(16, 84, 222, 0.25);
}
/*-----------------------------MODAL--------------------------------*/
.modal-backdrop.show.fade {
  opacity: 1;
  backdrop-filter: blur(4px);
  background: rgb(15 23 42 / 0.6);
}

.modal-title {
  font-size: 17px !important;
  font-weight: 400;
  letter-spacing: 0.005em !important;
}
.modal-content {
  border-radius: 1rem;
  border-top: 0.375rem solid var(--primary);
  box-shadow:
    0 25px 60px rgba(2, 132, 199, 0.22),
    0 8px 24px rgba(15, 23, 42, 0.18);
}
/*-------------------------------responsive---------------*/
@media (min-width: 1400px) {
}
@media (min-width: 1200px) {
  .app-wrapper {
    grid-template-columns: 100px 1fr 70px;
  }
}
@media (min-width: 992px) {
  .layout-main {
    main {
      grid-area: main;
      background-color: rgb(248 250 252);
      overflow-y: auto;
      height: calc(100vh - 92px);
      border-radius: 24px !important;
    }
  }
}
@keyframes pulse {
  0% {
    transform: scale(0.65);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .animate-pulse {
    animation: none;
  }
}
/* =========================================================
   TOAST — Notificaciones globales
   ========================================================= */
.toast-wrap {
  position: fixed;
  bottom: 37px;
  right: 37px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.st-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 27px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  pointer-events: auto;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.14),
    0 4px 12px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  transition:
    opacity 0.28s cubic-bezier(0.22, 0.68, 0, 1.2),
    transform 0.28s cubic-bezier(0.22, 0.68, 0, 1.2);
}

.st-toast--in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.st-toast--out {
  opacity: 0;
  transform: translateY(6px) scale(0.96);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease;
}

/* Variantes de color */
.st-toast--success {
  background: color-mix(in srgb, #edf9f3 92%, transparent);
  border-color: rgba(75, 201, 139, 0.28);
  color: #1a6640;
}
.st-toast--success .st-toast__icon {
  color: #2daa6c;
}

.st-toast--danger {
  background: color-mix(in srgb, #fef2f2 92%, transparent);
  border-color: rgba(231, 111, 97, 0.28);
  color: #b53e2e;
}
.st-toast--danger .st-toast__icon {
  color: var(--danger);
}

.st-toast--warning {
  background: color-mix(in srgb, #fffbeb 92%, transparent);
  border-color: rgba(217, 154, 0, 0.28);
  color: #7a5500;
}
.st-toast--warning .st-toast__icon {
  color: var(--amber);
}

.st-toast--info {
  background: color-mix(in srgb, #eff6ff 92%, transparent);
  border-color: rgba(117, 167, 227, 0.28);
  color: #1d4e8b;
}
.st-toast--info .st-toast__icon {
  color: var(--cyan);
}

.st-toast__icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

.st-toast__msg {
  flex: 1;
}

.st-toast__close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
  color: inherit;
  opacity: 0.55;
  padding: 0 2px;
  transition: opacity 0.16s;
}
.st-toast__close:hover {
  opacity: 1;
}

/* =========================================================
   Login page — centrado vertical y horizontal
   ========================================================= */
body.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.login .container {
  display: flex;
  align-items: center;
  justify-content: center;
}
