* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --sidebar: 260px;

  --navy: #2d1130;
  --navy-2: #3d1a42;
  --navy-3: #5c2d6e;

  --blue: #e8614a;
  --blue-2: #f4825e;
  --cyan: #f9b08a;

  --green: #1fa86e;
  --orange: #f4a823;
  --red: #e84a5a;
  --purple: #9b4de8;

  --white: #ffffff;

  --background: #faf6f1;
  --background-2: #f5ede8;

  --text: #1a0f0a;
  --muted: #7a6560;

  --border: #e8d8d0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  font-family:
    "Inter",
    sans-serif;

  color: var(--text);

  background:
    radial-gradient(
      circle at 78% 4%,
      rgba(244, 168, 35, .10),
      transparent 28%
    ),
    radial-gradient(
      circle at 10% 90%,
      rgba(232, 97, 74, .07),
      transparent 30%
    ),
    linear-gradient(
      180deg,
      #fdf9f5 0%,
      var(--background) 100%
    );

  overflow-x: hidden;
}

button,
input,
select {
  font-family: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}


/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {
  position: fixed;

  top: 0;
  left: 0;

  z-index: 100;

  width: var(--sidebar);
  height: 100vh;

  padding:
    25px
    18px
    18px;

  display: flex;
  flex-direction: column;

  color: white;

  background:
    radial-gradient(
      circle at 15% 8%,
      rgba(232, 97, 74, .22),
      transparent 30%
    ),
    linear-gradient(
      165deg,
      #2d1130 0%,
      #3d1a42 56%,
      #5c2d6e 100%
    );

  box-shadow:
    14px 0 40px
    rgba(45, 17, 48, .18);

  overflow-y: auto;
}


/* =====================================================
   LOGO
===================================================== */

.brand {
  display: flex;

  align-items: center;

  gap: 13px;

  padding:
    0
    7px
    25px;

  margin-bottom: 8px;

  border-bottom:
    1px solid
    rgba(255,255,255,.09);
}


.brand-icon {
  width: 48px;
  height: 48px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex:
    0
    0
    auto;

  border-radius: 15px;

  color: white;

  background:
    linear-gradient(
      135deg,
      #f4825e,
      #e8614a
    );

  box-shadow:
    0 12px 27px
    rgba(232, 97, 74, .32);

  font-size: 18px;
}


.brand-copy strong {
  display: block;

  font-family:
    "Manrope",
    sans-serif;

  font-size: 19px;
}


.brand-copy span {
  display: block;

  margin-top: 3px;

  color:
    rgba(255,255,255,.54);

  font-size: 11px;
}


/* =====================================================
   NAVEGACIÓN
===================================================== */

.nav {
  flex: 1;

  padding-top: 7px;
}


.nav-title {
  display: block;

  padding:
    0
    10px
    8px;

  margin-top: 13px;

  color:
    rgba(255,255,255,.36);

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 1px;
}


.nav-title.second {
  margin-top: 20px;
}


.nav a {
  position: relative;

  height: 45px;

  display: flex;

  align-items: center;

  gap: 12px;

  padding:
    0
    14px;

  margin-bottom: 4px;

  border-radius: 12px;

  color:
    rgba(255,255,255,.68);

  font-size: 13px;

  font-weight: 600;

  transition:
    .22s ease;
}


.nav a i {
  width: 20px;

  text-align: center;

  font-size: 14.5px;
}


.nav a:hover {
  transform:
    translateX(2px);

  color: white;

  background:
    rgba(255,255,255,.07);
}


.nav a.active {
  color: white;

  background:
    linear-gradient(
      90deg,
      rgba(232,97,74,.35),
      rgba(244,168,35,.18)
    );

  box-shadow:
    inset 0 0 0 1px
    rgba(244,168,35,.15);
}


.nav a.active::before {
  content: "";

  position: absolute;

  left: -18px;

  width: 3px;
  height: 25px;

  border-radius:
    0
    6px
    6px
    0;

  background:
    var(--blue-2);
}


/* =====================================================
   PROGRAMA SOCIAL
===================================================== */

.social-program {
  display: none !important;

  margin-top: 17px;

  padding: 15px;

  border:
    1px solid
    rgba(255,255,255,.10);

  border-radius: 14px;

  background:
    rgba(255,255,255,.045);
}


.social-program > span {
  display: block;

  color:
    rgba(255,255,255,.42);

  font-size: 11px;
}


.social-program strong {
  display: block;

  margin-top: 5px;

  color: white;

  font-size: 12.5px;
}


.social-program strong i {
  margin-right: 5px;

  color: #82dcff;
}


.social-program small {
  display: block;

  margin-top: 6px;

  color:
    rgba(255,255,255,.54);

  font-size: 11px;
}


.social-progress {
  height: 5px;

  margin-top: 10px;

  overflow: hidden;

  border-radius: 999px;

  background:
    rgba(255,255,255,.15);
}


.social-progress div {
  width: 68%;
  height: 100%;

  border-radius: inherit;

  background:
    linear-gradient(
      90deg,
      #1688ff,
      #5bc9ff
    );
}


/* =====================================================
   LOGOUT
===================================================== */

.sidebar-footer {
  margin-top: 12px;
}


.logout {
  width: 100%;

  height: 44px;

  display: flex;

  align-items: center;

  gap: 10px;

  padding:
    0
    14px;

  border-radius: 12px;

  color:
    rgba(255,255,255,.65);

  background:
    transparent;

  cursor: pointer;

  font-size: 12.5px;

  font-weight: 700;

  transition:
    .2s ease;
}


.logout:hover {
  color: white;

  background:
    rgba(255,255,255,.08);
}


/* =====================================================
   MAIN
===================================================== */

.main {
  margin-left:
    var(--sidebar);

  min-height: 100vh;
}


/* =====================================================
   TOPBAR
===================================================== */

.topbar {
  position: sticky;

  top: 0;

  z-index: 70;

  height: 76px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 18px;

  padding:
    0
    28px;

  border-bottom:
    1px solid
    rgba(218,229,240,.9);

  background:
    rgba(255,255,255,.92);

  backdrop-filter:
    blur(18px);

  box-shadow:
    0 7px 25px
    rgba(23,74,120,.03);
}


.mobile-menu {
  display: none;

  width: 42px;
  height: 42px;

  align-items: center;
  justify-content: center;

  border:
    1px solid var(--border);

  border-radius: 12px;

  color: var(--navy);

  background: white;

  cursor: pointer;

  font-size: 15px;
}


/* =====================================================
   BUSCADOR
===================================================== */

.search-box {
  width: 365px;
  height: 44px;

  display: flex;

  align-items: center;

  gap: 10px;

  padding:
    0
    15px;

  border:
    1px solid
    var(--border);

  border-radius: 13px;

  background:
    #f7faff;

  transition:
    .2s ease;
}


.search-box:focus-within {
  border-color:
    #afd7fb;

  box-shadow:
    0 0 0 3px
    rgba(22,136,255,.08);

  background: white;
}


.search-box i {
  color:
    #8795a8;

  font-size: 14px;
}


.search-box input {
  width: 100%;

  border: 0;
  outline: 0;

  color:
    var(--navy);

  background: transparent;

  font-size: 12.5px;
}


/* =====================================================
   TOPBAR ACTIONS
===================================================== */

.topbar-actions {
  display: flex;

  align-items: center;

  gap: 10px;
}


.icon-btn {
  position: relative;

  width: 43px;
  height: 43px;

  border:
    1px solid
    var(--border);

  border-radius: 12px;

  color:
    #69788e;

  background:
    white;

  cursor: pointer;

  font-size: 14px;

  transition:
    .2s;
}


.icon-btn:hover {
  color:
    var(--blue);

  border-color:
    #beddf9;

  background:
    #f5faff;
}


.notification-dot {
  position: absolute;

  top: 8px;
  right: 8px;

  width: 7px;
  height: 7px;

  border:
    2px solid white;

  border-radius: 50%;

  background:
    #ef5f69;
}


/* =====================================================
   USUARIO
===================================================== */

.user-chip {
  min-width: 195px;

  display: flex;

  align-items: center;

  gap: 10px;

  padding:
    6px
    10px
    6px
    6px;

  border:
    1px solid
    var(--border);

  border-radius: 14px;

  background: white;
}


.user-avatar {
  width: 40px;
  height: 40px;

  flex:
    0
    0
    auto;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 12px;

  color: white;

  background:
    linear-gradient(
      135deg,
      #1688ff,
      #56c7ff
    );

  box-shadow:
    0 8px 19px
    rgba(22,136,255,.19);

  font-size: 12.5px;

  font-weight: 800;
}


.user-chip strong {
  display: block;

  color:
    var(--navy);

  font-size: 11.5px;
}


.user-chip span {
  display: block;

  margin-top: 2px;

  max-width: 115px;

  overflow: hidden;

  text-overflow: ellipsis;

  color:
    #8b98aa;

  font-size: 11px;

  white-space: nowrap;
}


.user-arrow {
  margin-left: auto;

  color:
    #a2adbb;

  font-size: 11px;
}


/* =====================================================
   CONTENIDO
===================================================== */

.dashboard-content {
  max-width: 1250px;

  margin:
    0
    auto;

  padding:
    32px
    28px
    65px;
}


/* =====================================================
   ENCABEZADO
===================================================== */

.dashboard-heading {
  display: flex;

  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;

  margin-bottom: 24px;
}


.dashboard-heading h1 {
  font-family:
    "Manrope",
    sans-serif;

  color:
    var(--navy);

  font-size: 30px;

  letter-spacing: -1.2px;
}


.dashboard-heading p {
  margin-top: 6px;

  color:
    var(--muted);

  font-size: 13px;

  line-height: 1.55;
}


.date-chip {
  min-height: 42px;

  display: flex;

  align-items: center;

  gap: 8px;

  padding:
    0
    15px;

  border:
    1px solid
    var(--border);

  border-radius: 12px;

  color:
    #63738a;

  background: white;

  box-shadow:
    0 6px 20px
    rgba(20,74,120,.03);

  font-size: 11.5px;
}


.date-chip i {
  color:
    var(--blue);
}


/* =====================================================
   KPIS
===================================================== */

.kpi-grid {
  display: grid;

  grid-template-columns:
    repeat(
      4,
      minmax(0,1fr)
    );

  gap: 17px;

  margin-bottom: 20px;
}


.kpi-card {
  min-height: 148px;

  padding: 20px;

  border:
    1px solid
    var(--border);

  border-radius: 20px;

  background:
    linear-gradient(
      180deg,
      #ffffff,
      #fbfdff
    );

  box-shadow:
    0 12px 35px
    rgba(21,75,124,.045);

  transition:
    .22s ease;
}


.kpi-card:hover {
  transform:
    translateY(-3px);

  border-color:
    #cfe3f6;

  box-shadow:
    0 17px 42px
    rgba(21,75,124,.075);
}


.kpi-top {
  display: flex;

  align-items: center;
  justify-content: space-between;

  margin-bottom: 17px;
}


.kpi-icon {
  width: 42px;
  height: 42px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 13px;

  font-size: 15px;
}


.kpi-icon.purple {
  color: #536bf4;

  background:
    #edf0ff;
}


.kpi-icon.green {
  color:
    #159b69;

  background:
    #e9f8f2;
}


.kpi-icon.orange {
  color:
    #e2920e;

  background:
    #fff3df;
}


.kpi-icon.cyan {
  color:
    #0b99ad;

  background:
    #e7f8fb;
}


.kpi-change {
  padding:
    5px
    9px;

  border-radius:
    999px;

  font-size: 11px;

  font-weight: 800;
}


.kpi-change.positive {
  color:
    #148e61;

  background:
    #eaf8f3;
}


.kpi-change.negative {
  color:
    #d65361;

  background:
    #ffedf0;
}


.kpi-value {
  display: block;

  font-family:
    "Manrope",
    sans-serif;

  color:
    var(--navy);

  font-size: 29px;

  letter-spacing:
    -1px;
}


.kpi-label {
  display: block;

  margin-top: 5px;

  color:
    var(--muted);

  font-size: 12.5px;
}


/* =====================================================
   TARJETAS
===================================================== */

.dashboard-card {
  overflow: hidden;

  border:
    1px solid
    var(--border);

  border-radius: 21px;

  background:
    rgba(255,255,255,.98);

  box-shadow:
    0 12px 35px
    rgba(21,75,124,.045);
}


.card-heading {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding:
    21px
    21px
    8px;
}


.card-heading h2 {
  color:
    var(--navy);

  font-family:
    "Manrope",
    sans-serif;

  font-size: 15px;
}


.card-heading p {
  margin-top: 4px;

  color:
    #8592a4;

  font-size: 11.5px;
}


.card-heading select {
  height: 36px;

  padding:
    0
    12px;

  border:
    1px solid
    var(--border);

  border-radius: 10px;

  outline: none;

  color:
    #5d6d83;

  background:
    #f9fbfd;

  font-size: 11.5px;
}


/* =====================================================
   ANALÍTICAS
===================================================== */

.analytics-grid {
  display: grid;

  grid-template-columns:
    minmax(0,2fr)
    minmax(300px,.85fr);

  gap: 18px;

  margin-bottom: 20px;
}


.demand-card {
  min-height: 375px;
}


.chart-wrapper {
  height: 295px;

  padding:
    17px
    21px
    18px;
}


/* =====================================================
   COBERTURA
===================================================== */

.coverage-card {
  min-height: 375px;
}


.coverage-chart-wrap {
  position: relative;

  width: 195px;
  height: 195px;

  margin:
    10px
    auto
    0;
}


.coverage-center {
  position: absolute;

  inset: 0;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  pointer-events: none;
}


.coverage-center strong {
  font-family:
    "Manrope",
    sans-serif;

  color:
    var(--navy);

  font-size: 27px;
}


.coverage-center span {
  margin-top: 2px;

  color:
    #8995a7;

  font-size: 11.5px;
}


.coverage-stats {
  display: grid;

  grid-template-columns:
    repeat(2,1fr);

  margin:
    10px
    20px
    18px;

  padding-top: 13px;

  border-top:
    1px solid
    #edf2f7;
}


.coverage-stats div {
  padding: 9px;

  text-align: center;
}


.coverage-stats strong {
  display: block;

  color:
    var(--navy);

  font-size: 14px;
}


.coverage-stats span {
  display: block;

  margin-top: 3px;

  color:
    #8a97a8;

  font-size: 11px;
}


/* =====================================================
   PARTE INFERIOR
===================================================== */

.bottom-grid {
  display: grid;

  grid-template-columns:
    minmax(0,1.4fr)
    minmax(330px,.9fr);

  gap: 18px;
}


/* =====================================================
   MAPA
===================================================== */

.map-card {
  min-height: 455px;
}


.care-map {
  width:
    calc(100% - 34px);

  height: 365px;

  margin:
    12px
    17px
    8px;

  overflow: hidden;

  border:
    1px solid
    #dce9f4;

  border-radius: 16px;

  background:
    #edf4fa;

  box-shadow:
    inset 0 0 0 1px
    rgba(255,255,255,.5);
}


.leaflet-container {
  font-family:
    "Inter",
    sans-serif;

  background:
    #edf4fa;
}


.leaflet-bar {
  border:
    0 !important;

  box-shadow:
    0 6px 20px
    rgba(20,64,104,.14)
    !important;
}


.leaflet-bar a {
  color:
    var(--navy)
    !important;
}


.leaflet-popup-content {
  font-size: 13px;
}


.map-legend {
  display: flex;

  flex-wrap: wrap;

  gap: 15px;

  padding:
    7px
    19px
    16px;

  color:
    #69788e;

  font-size: 11.5px;
}


.map-legend span {
  display: flex;

  align-items: center;

  gap: 5px;
}


.legend-dot {
  width: 8px;
  height: 8px;

  border-radius:
    50%;
}


.legend-dot.high {
  background:
    #ec606d;
}


.legend-dot.medium {
  background:
    #f0a01a;
}


.legend-dot.low {
  background:
    #19aa79;
}


/* =====================================================
   NECESIDADES
===================================================== */

.needs-card {
  min-height: 455px;
}


.needs-list {
  display: flex;

  flex-direction: column;

  gap: 11px;

  padding:
    14px
    17px
    20px;
}


.need-item {
  min-height: 65px;

  display: flex;

  align-items: center;

  gap: 12px;

  padding:
    11px
    12px;

  border:
    1px solid
    #e3ebf3;

  border-radius: 13px;

  background:
    #fcfdff;

  transition:
    .2s ease;
}


.need-item:hover {
  transform:
    translateX(2px);

  border-color:
    #cfe2f4;

  background:
    #f8fbff;
}


.need-icon {
  width: 40px;
  height: 40px;

  flex:
    0
    0
    auto;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 12px;

  font-size: 14.5px;
}


.need-icon.purple {
  color:
    #536bf4;

  background:
    #edf0ff;
}


.need-icon.cyan {
  color:
    #079daf;

  background:
    #e6f8fa;
}


.need-icon.orange {
  color:
    #e39413;

  background:
    #fff3df;
}


.need-icon.red {
  color:
    #e15a67;

  background:
    #ffedef;
}


.need-icon.gray {
  color:
    #65748a;

  background:
    #edf2f6;
}


.need-main {
  flex: 1;
}


.need-title {
  display: flex;

  justify-content: space-between;

  gap: 10px;
}


.need-title strong {
  color:
    var(--navy);

  font-size: 12px;
}


.need-title span {
  color:
    #728096;

  font-size: 11.5px;
}


.progress-track {
  height: 6px;

  margin-top: 9px;

  overflow: hidden;

  border-radius:
    999px;

  background:
    #eaf0f5;
}


.progress-track div {
  height: 100%;

  border-radius:
    inherit;

  background:
    linear-gradient(
      90deg,
      #1688ff,
      #39bfd7
    );
}


/* =====================================================
   BOTÓN FLOTANTE
===================================================== */

.floating-register {
  position: fixed;

  right: 27px;
  bottom: 25px;

  z-index: 90;

  min-height: 51px;

  display: flex;

  align-items: center;

  gap: 8px;

  padding:
    0
    21px;

  border-radius: 14px;

  color: white;

  background:
    linear-gradient(
      100deg,
      #0e67c7,
      #1688ff 55%,
      #4cb9ff
    );

  box-shadow:
    0 15px 35px
    rgba(22,136,255,.28);

  cursor: pointer;

  font-size: 12.5px;

  font-weight: 800;

  transition:
    .22s ease;
}


.floating-register:hover {
  transform:
    translateY(-2px);

  box-shadow:
    0 20px 42px
    rgba(22,136,255,.35);
}


/* =====================================================
   TOAST
===================================================== */

.toast {
  position: fixed;

  right: 27px;
  bottom: 86px;

  z-index: 200;

  max-width: 340px;

  padding:
    13px
    17px;

  border:
    1px solid
    rgba(255,255,255,.10);

  border-radius: 13px;

  color: white;

  background:
    linear-gradient(
      135deg,
      #071a30,
      #0d3458
    );

  box-shadow:
    0 16px 45px
    rgba(7,31,55,.20);

  font-size: 12.5px;

  opacity: 0;

  pointer-events: none;

  transform:
    translateY(12px);

  transition:
    .22s ease;
}


.toast.show {
  opacity: 1;

  transform:
    translateY(0);
}


/* =====================================================
   SCROLLBAR
===================================================== */

.sidebar::-webkit-scrollbar {
  width: 4px;
}


.sidebar::-webkit-scrollbar-thumb {
  border-radius:
    20px;

  background:
    rgba(255,255,255,.12);
}


/* =====================================================
   PANTALLAS GRANDES
===================================================== */

@media (min-width: 1500px) {

  .dashboard-content {
    max-width: 1320px;
  }

}


/* =====================================================
   LAPTOP / TABLET GRANDE
===================================================== */

@media (max-width: 1150px) {

  .dashboard-content {
    max-width: 100%;
  }


  .kpi-grid {
    grid-template-columns:
      repeat(2,1fr);
  }


  .analytics-grid,
  .bottom-grid {
    grid-template-columns:
      1fr;
  }

}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 850px) {

  :root {
    --sidebar: 260px;
  }


  .sidebar {
    transform:
      translateX(-105%);

    transition:
      .25s ease;
  }


  .sidebar.open {
    transform:
      translateX(0);
  }


  .main {
    margin-left:
      0;
  }


  .mobile-menu {
    display:
      inline-flex;
  }


  .search-box {
    flex: 1;
  }


  .user-chip {
    min-width:
      auto;
  }


  .user-chip > div:nth-child(2),
  .user-arrow {
    display:
      none;
  }


  .dashboard-content {
    padding:
      25px
      18px
      75px;
  }


  .topbar {
    padding:
      0
      18px;
  }

}


/* =====================================================
   CELULAR
===================================================== */

@media (max-width: 600px) {

  .dashboard-content {
    padding:
      21px
      13px
      80px;
  }


  .topbar {
    padding:
      0
      13px;
  }


  .search-box {
    display:
      none;
  }


  .dashboard-heading {
    flex-direction:
      column;
  }


  .dashboard-heading h1 {
    font-size:
      27px;
  }


  .dashboard-heading p {
    font-size:
      12.5px;
  }


  .kpi-grid {
    grid-template-columns:
      1fr;
  }


  .kpi-card {
    min-height:
      135px;
  }


  .chart-wrapper {
    height:
      250px;
  }


  .care-map {
    height:
      315px;

    width:
      calc(100% - 20px);

    margin:
      10px;
  }


  .floating-register {
    right:
      14px;

    bottom:
      14px;
  }

}
/* =====================================================
   CUIDA VÍNCULO - RESPONSIVE GLOBAL FINAL
===================================================== */

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

.main,
.dashboard-content,
section,
article,
aside,
div {
  min-width: 0;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1100px) {

  .dashboard-content {
    width: 100%;
  }

  .reports-stats,
  .privacy-summary,
  .settings-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .report-template-grid,
  .report-module-grid,
  .system-info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

}


/* =====================================================
   MOVIL
===================================================== */

@media (max-width: 900px) {

  body {
    overflow-x: hidden;
  }

  .dashboard-shell {
    display: block !important;
  }

  .sidebar {
    position: fixed !important;
    top: 0;
    left: -290px;

    width: 270px !important;
    max-width: 86%;

    height: 100%;

    z-index: 9999;

    overflow-y: auto;

    transition: left .25s ease;

    box-shadow:
      12px 0 40px rgba(0,0,0,.16);
  }

  .sidebar.open {
    left: 0;
  }

  .main {
    width: 100% !important;
    margin-left: 0 !important;
  }

  .topbar {
    position: sticky;
    top: 0;

    z-index: 1000;

    width: 100%;

    padding: 10px 14px !important;
  }

  .mobile-menu {
    display: flex !important;

    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    width: 42px !important;
    height: 42px !important;
  }

  .search-box {
    flex: 1;
    min-width: 0;
    max-width: none !important;
  }

  .search-box input {
    width: 100%;
  }

  .dashboard-content {
    width: 100% !important;

    padding:
      18px 14px 30px !important;
  }

  .user-chip > div:nth-child(2),
  .user-arrow {
    display: none !important;
  }


  /* HERO / HEADERS */

  .reports-heading,
  .settings-heading {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .reports-heading-actions,
  .settings-heading-actions {
    width: 100%;
  }


  /* GRID PRINCIPALES */

  .report-builder,
  .privacy-grid,
  .settings-grid {
    grid-template-columns: 1fr !important;
  }

  .report-preview-panel {
    position: static !important;
  }

  .privacy-side,
  .settings-side {
    grid-template-columns: 1fr !important;
  }

  .operation-settings-grid {
    grid-template-columns: 1fr !important;
  }


  /* TABLAS */

  .table-wrapper,
  .table-container,
  .data-table-wrapper,
  .role-table {
    width: 100%;
    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 650px;
  }


  /* BOTONES */

  button,
  .reports-primary-btn,
  .reports-secondary-btn,
  .settings-primary-btn,
  .settings-secondary-btn {
    min-height: 42px;
  }

}


/* =====================================================
   CELULAR
===================================================== */

@media (max-width: 650px) {

  html {
    font-size: 16px;
  }

  .dashboard-content {
    padding:
      14px 10px 26px !important;
  }

  .topbar {
    gap: 7px;

    padding:
      8px 10px !important;
  }

  .topbar-actions {
    gap: 4px;
  }

  .topbar .icon-btn {
    width: 40px;
    height: 40px;
  }

  .user-chip {
    display: none !important;
  }

  .search-box input,
  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  input,
  select,
  button {
    min-height: 44px;
  }


  /* TODOS LOS GRIDS IMPORTANTES A UNA COLUMNA */

  .reports-stats,
  .report-type-grid,
  .report-period-grid,
  .report-module-grid,
  .report-format-grid,
  .report-template-grid,

  .privacy-summary,
  .privacy-principles,
  .privacy-side,

  .settings-status-grid,
  .settings-form-grid,
  .operation-settings-grid,
  .system-info-grid,
  .settings-side,

  .preview-info {
    grid-template-columns: 1fr !important;
  }


  /* REPORTES */

  .report-builder-actions {
    flex-direction: column !important;
  }

  .preview-report-btn,
  .generate-report-btn {
    width: 100%;
    justify-content: center;
  }

  .report-document-summary {
    grid-template-columns: 1fr !important;
  }

  .recent-report-row {
    grid-template-columns:
      38px
      minmax(0,1fr)
      34px !important;
  }

  .recent-report-type,
  .recent-report-status {
    display: none !important;
  }


  /* PRIVACIDAD */

  .privacy-hero {
    grid-template-columns: 1fr !important;

    padding: 18px !important;
  }

  .privacy-hero-icon {
    width: 54px;
    height: 54px;
  }

  .privacy-score {
    width: 100%;
  }

  .privacy-bottom-note {
    grid-template-columns: 1fr !important;
  }


  /* CONFIGURACION */

  .settings-menu {
    display: grid !important;

    grid-template-columns: 1fr !important;
  }

  .settings-menu-title {
    grid-column: auto !important;
  }

  .profile-settings-card {
    grid-template-columns: 1fr !important;

    text-align: center;
  }

  .profile-avatar-large {
    margin: auto;
  }

  .maintenance-actions {
    flex-direction: column;
  }

  .maintenance-actions button {
    width: 100%;
    justify-content: center;
  }


  /* FLEX QUE PUEDEN SALIRSE */

  .reports-heading-actions,
  .settings-heading-actions,
  .privacy-hero-tags {
    flex-wrap: wrap;
  }

  .reports-heading-actions > *,
  .settings-heading-actions > * {
    flex: 1 1 100%;
    justify-content: center;
  }

}


/* =====================================================
   CELULAR PEQUEÑO
===================================================== */

@media (max-width: 430px) {

  .sidebar {
    width: 86% !important;
    max-width: 285px;
  }

  .dashboard-content {
    padding:
      12px 9px 24px !important;
  }

  h1 {
    font-size: 25px !important;
    line-height: 1.15;
  }

  h2 {
    line-height: 1.2;
  }

  .privacy-hero,
  .report-builder-main,
  .report-preview-panel,
  .settings-panel,
  .settings-menu,
  .settings-side-card {
    border-radius: 14px !important;
  }

}


/* ---- Fase 5: sección operación ---- */
.simulados-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff8e1;
  border: 1px solid #ffd54f;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  color: #795548;
  margin-bottom: 16px;
}
.simulados-banner i { color: #f9a825; }

.table-scroll { overflow-x: auto; }

.op-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.op-table th, .op-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border, #d2d2d7);
}
.op-table th {
  font-weight: 600;
  background: var(--surface-2, #f5f5f7);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.op-table td:not(:first-child) { text-align: right; }
.op-table th:not(:first-child) { text-align: right; }
