/* =========================================================
   SIG GUARDIANES
   Estilo institucional vino / moderno / responsivo
   ========================================================= */

/* =========================
   VARIABLES
========================= */

:root {
  --vino-profundo: #3b0712;
  --vino-oscuro: #57101f;
  --vino: #781c30;
  --vino-medio: #963247;
  --vino-claro: #c05d70;

  --rosa-suave: #f7e3e7;
  --rosa-claro: #fcf3f5;

  --white: #ffffff;
  --ink: #171419;
  --muted: #6f6670;

  --line: rgba(120, 28, 48, 0.17);
  --glass: rgba(255, 255, 255, 0.84);

  --shadow:
    0 22px 55px rgba(59, 7, 18, 0.17);
}

/* =========================
   REINICIO GENERAL
========================= */

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;

  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: var(--ink);

  background:
    radial-gradient(
      circle at 8% 0%,
      rgba(192, 93, 112, 0.19),
      transparent 25%
    ),
    radial-gradient(
      circle at 95% 12%,
      rgba(120, 28, 48, 0.12),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      #fbf5f6,
      #f5efec
    );

  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

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

.app-header {
  height: 112px;
  padding: 22px 32px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  color: var(--white);

  background:
    linear-gradient(
      120deg,
      rgba(59, 7, 18, 0.99),
      rgba(120, 28, 48, 0.94)
    );

  box-shadow: var(--shadow);

  position: relative;
  overflow: hidden;
}

.app-header::after {
  content: "";

  position: absolute;
  inset: -120% 38% auto -10%;

  height: 360px;

  background:
    radial-gradient(
      circle,
      rgba(192, 93, 112, 0.36),
      transparent 65%
    );

  pointer-events: none;
}

.header-info {
  position: relative;
  z-index: 2;
}

.eyebrow,
.panel__kicker {
  display: block;

  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;

  color: #efadb9;
}

.app-header h1 {
  font-size: clamp(1.65rem, 3vw, 2.55rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.app-header p {
  margin-top: 5px;
  opacity: 0.82;
}

/* Contenedor para uno o varios logos */

.header-brand,
.header-logos {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;

  position: relative;
  z-index: 2;
}

/* Logos del encabezado */

.header-logo {
  width: 144px;
  height: 144px;

  object-fit: contain;

  opacity: 0.9;

  filter:
    drop-shadow(
      0 0 16px rgba(255, 210, 219, 0.24)
    );

  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
}

.header-logo:hover {
  transform: scale(1.06);
  opacity: 1;
}

/* Logo secundario: misma medida que el principal */

.header-logo--secondary {
  width: 66px;
  height: 66px;
}

/* =========================
   ESTRUCTURA PRINCIPAL
========================= */

.app-layout {
  display: grid;

  grid-template-columns:
    370px
    minmax(0, 1fr);

  gap: 20px;
  padding: 20px;

  height: calc(100vh - 112px);
}

/* =========================
   BARRA LATERAL
========================= */

.sidebar {
  overflow: auto;
  padding-right: 4px;
}

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

.sidebar::-webkit-scrollbar-thumb {
  background:
    rgba(120, 28, 48, 0.26);

  border-radius: 99px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

/* =========================
   PANELES
========================= */

.panel {
  position: relative;
  overflow: hidden;

  margin-bottom: 15px;
  padding: 18px;

  background: var(--glass);

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

  border-radius: 22px;

  box-shadow:
    0 14px 36px rgba(59, 7, 18, 0.1);

  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.panel::before {
  content: "";

  position: absolute;

  top: 0;
  left: 20px;
  right: 20px;

  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--vino-claro),
      transparent
    );
}

.panel--hero {
  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.92),
      rgba(247, 227, 231, 0.86)
    );
}

.panel__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;

  margin-bottom: 13px;
}

.panel h2 {
  margin-top: 1px;

  font-size: 1rem;

  color: var(--vino-profundo);
}

.panel small,
.status-text {
  color: var(--muted);
  line-height: 1.45;
}

.badge {
  padding: 5px 9px;

  border-radius: 999px;

  background: var(--rosa-suave);
  color: var(--vino);

  font-size: 0.68rem;
  font-weight: 800;

  white-space: nowrap;
}

/* =========================
   FORMULARIOS
========================= */

input,
select,
textarea {
  width: 100%;

  padding: 11px 12px;

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

  border-radius: 13px;

  background:
    rgba(255, 255, 255, 0.92);

  color: var(--ink);

  outline: none;

  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--vino);

  background: var(--white);

  box-shadow:
    0 0 0 3px rgba(120, 28, 48, 0.15);
}

textarea {
  resize: vertical;
}

/* =========================
   BOTONES
========================= */

button {
  padding: 11px 13px;

  border: 0;
  border-radius: 13px;

  background:
    linear-gradient(
      135deg,
      var(--vino),
      var(--vino-profundo)
    );

  color: var(--white);

  font-weight: 800;

  box-shadow:
    0 10px 22px rgba(59, 7, 18, 0.2);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

button:hover {
  transform: translateY(-1px);

  box-shadow:
    0 14px 28px rgba(59, 7, 18, 0.27);
}

button:active {
  transform: translateY(0);
}

.button-secondary {
  background: var(--rosa-claro);
  color: var(--vino-profundo);

  box-shadow: none;

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

.button-secondary:hover {
  background: var(--rosa-suave);

  box-shadow: none;
}

.icon-button {
  width: 46px;
  flex: 0 0 46px;

  font-size: 1.25rem;
}

.input-action {
  display: flex;
  gap: 8px;
}

.coord-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* =========================
   DETALLES DESPLEGABLES
========================= */

.details {
  margin-top: 10px;
}

.details summary {
  cursor: pointer;

  color: var(--vino);

  font-size: 0.82rem;
  font-weight: 700;
}

.details__content {
  margin-top: 10px;
}

/* =========================
   CARGA DE ARCHIVOS
========================= */

.file-drop {
  display: grid;
  gap: 4px;

  padding: 18px;

  text-align: center;

  border:
    1px dashed rgba(120, 28, 48, 0.38);

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.57);

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.file-drop:hover {
  border-color: var(--vino);

  background: var(--white);

  transform: translateY(-1px);
}

.file-drop__icon {
  font-size: 1.45rem;

  color: var(--vino);
}

.status-text {
  margin-top: 9px;

  font-size: 0.8rem;
}

/* =========================
   CONTENEDOR DEL MAPA
========================= */

.map-shell {
  position: relative;
  overflow: hidden;

  min-height: 500px;

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

  border-radius: 28px;

  background: #e7dfe1;

  box-shadow: var(--shadow);
}

#map {
  width: 100%;
  height: 100%;

  min-height: 500px;
}

/* =========================
   ESTADO Y COORDENADAS
========================= */

.mouse-coords,
.map-status {
  position: absolute;

  z-index: 800;

  color: var(--white);

  background:
    rgba(59, 7, 18, 0.9);

  border:
    1px solid rgba(192, 93, 112, 0.31);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.mouse-coords {
  left: 14px;
  bottom: 14px;

  padding: 8px 13px;

  border-radius: 999px;

  font-size: 0.77rem;
}

.map-status {
  right: 14px;
  bottom: 14px;

  display: flex;
  align-items: center;
  gap: 7px;

  padding: 8px 12px;

  border-radius: 999px;

  font-size: 0.76rem;
}

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

  border-radius: 50%;

  background: #65e2a1;

  box-shadow:
    0 0 10px #65e2a1;
}

/* =========================
   RESULTADOS, CAPAS Y LEYENDA
========================= */

.results,
.layer-manager,
.legend {
  display: grid;
  gap: 8px;
}

.result-item,
.layer-item {
  padding: 10px;

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

  border-radius: 13px;

  background:
    rgba(252, 243, 245, 0.92);
}

.result-item {
  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.result-item:hover {
  background: var(--white);

  transform: translateX(2px);
}

.layer-item {
  display: grid;

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

  align-items: center;
  gap: 9px;
}

.layer-color {
  width: 14px;
  height: 14px;

  border-radius: 4px;
}

.layer-item__name {
  min-width: 0;

  overflow: hidden;

  font-size: 0.86rem;
  font-weight: 700;

  text-overflow: ellipsis;
  white-space: nowrap;
}

.layer-actions {
  display: flex;
  gap: 5px;
}

.layer-actions button,
.delete-point-btn {
  width: auto;

  margin: 0;
  padding: 6px 8px;

  font-size: 0.74rem;

  box-shadow: none;
}

.empty-state {
  color: var(--muted);

  font-size: 0.82rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 0.82rem;
}

.legend-color {
  width: 17px;
  height: 17px;

  border:
    1px solid rgba(0, 0, 0, 0.15);

  border-radius: 5px;
}

/* =========================
   PANTALLA DE CARGA
========================= */

.loader {
  position: fixed;
  inset: 0;

  z-index: 999999;

  display: grid;
  place-items: center;

  background:
    radial-gradient(
      circle at center,
      rgba(192, 93, 112, 0.24),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      var(--vino-profundo),
      var(--vino)
    );

  transition:
    opacity 0.55s ease,
    visibility 0.55s ease;
}

.loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader__content {
  text-align: center;

  color: var(--white);
}

.loader img {
  width: 112px;

  filter:
    drop-shadow(
      0 0 20px rgba(255, 202, 213, 0.42)
    );

  animation:
    pulse 1.7s ease-in-out infinite;
}

.loader h2 {
  margin-top: 10px;
}

.loader p {
  margin-top: 5px;

  opacity: 0.7;
}

.loader__bar {
  width: 250px;
  height: 7px;

  margin-top: 18px;

  overflow: hidden;

  border-radius: 99px;

  background:
    rgba(255, 255, 255, 0.13);
}

.loader__bar span {
  display: block;

  width: 42%;
  height: 100%;

  background:
    linear-gradient(
      90deg,
      transparent,
      #f4adba,
      transparent
    );

  animation:
    bar 1.1s linear infinite;
}

@keyframes pulse {
  50% {
    transform: scale(1.06);
    opacity: 0.8;
  }
}

@keyframes bar {
  from {
    transform: translateX(-110%);
  }

  to {
    transform: translateX(260%);
  }
}

/* =========================
   VENTANAS MODALES
========================= */

.modal {
  position: fixed;
  inset: 0;

  z-index: 5000;

  display: none;
}

.modal.is-open {
  display: grid;
  place-items: center;
}

.modal__backdrop {
  position: absolute;
  inset: 0;

  background:
    rgba(41, 4, 13, 0.69);

  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}

.modal__card {
  z-index: 1;

  width:
    min(
      470px,
      calc(100% - 30px)
    );

  display: grid;
  gap: 11px;

  padding: 22px;

  border-radius: 23px;

  background: var(--white);

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.32);
}

.modal__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.modal__close {
  width: 36px;

  padding: 5px;

  background: var(--rosa-claro);
  color: var(--vino-profundo);

  box-shadow: none;

  font-size: 1.3rem;
}

.coord-preview {
  display: flex;
  justify-content: space-between;
  gap: 10px;

  padding: 8px 10px;

  border-radius: 11px;

  background: #fbf3f5;

  color: var(--muted);

  font-size: 0.8rem;
}

.modal__actions {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 8px;
}

/* =========================
   NOTIFICACIONES
========================= */

.toast-container {
  position: fixed;

  top: 18px;
  right: 18px;

  z-index: 10000;

  display: grid;
  gap: 8px;
}

.toast {
  max-width: 340px;

  padding: 12px 15px;

  border-radius: 14px;

  background: var(--vino-profundo);
  color: var(--white);

  box-shadow: var(--shadow);

  animation:
    toastIn 0.25s ease;
}

.toast--error {
  background: #842029;
}

.toast--success {
  background: #0b6040;
}

@keyframes toastIn {
  from {
    opacity: 0;

    transform:
      translateY(-8px);
  }
}

/* =========================
   POPUPS DE LEAFLET
========================= */

.leaflet-popup-content-wrapper {
  border-radius: 16px;
}

.leaflet-popup-content table {
  width: 100%;

  border-collapse: collapse;
}

.leaflet-popup-content td {
  padding: 5px 6px;

  border-bottom:
    1px solid #eee5e7;

  vertical-align: top;
}

.leaflet-popup-content td:first-child {
  font-weight: 800;

  color: var(--vino-profundo);
}

/* Botones principales de Leaflet */

.leaflet-bar a {
  color: var(--vino-profundo);
}

.leaflet-bar a:hover {
  background: var(--rosa-claro);
  color: var(--vino);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 920px) {

  .app-header {
    height: auto;

    padding: 18px 20px;
  }

  .header-brand,
  .header-logos {
    gap: 10px;
  }

  .header-logo {
    width: 58px;
    height: 58px;
  }

  .header-logo--secondary {
    width: 58px;
    height: 58px;
  }

  .app-layout {
    grid-template-columns: 1fr;

    height: auto;

    padding: 12px;
  }

  .map-shell {
    height: 65vh;

    order: 1;
  }

  .sidebar {
    order: 2;

    overflow: visible;
  }

  .mouse-coords {
    max-width: 70%;

    overflow: hidden;

    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .map-status {
    display: none;
  }
}

@media (max-width: 560px) {

  .app-header {
    align-items: flex-start;

    gap: 14px;
  }

  .app-header h1 {
    font-size: 1.45rem;
  }

  .app-header p {
    font-size: 0.78rem;
  }

  .header-brand,
  .header-logos {
    flex-shrink: 0;
  }

  .header-logo {
    width: 48px;
    height: 48px;
  }

  .header-logo--secondary {
    width: 48px;
    height: 48px;
  }

  .coord-grid,
  .modal__actions {
    grid-template-columns: 1fr;
  }

  .loader__bar {
    width: 220px;
  }
}

/* =========================
   VERSIÓN 2.5 · PUNTOS Y CRÉDITOS
========================= */

.point-manager-tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.point-manager {
  display: grid;
  gap: 9px;
  max-height: 340px;
  overflow: auto;
  padding-right: 2px;
}

.point-item {
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(252, 243, 245, 0.92);
}

.point-item__top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.point-item__top div {
  min-width: 0;
  display: grid;
}

.point-item__top strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.87rem;
  color: var(--vino-profundo);
}

.point-item__top small {
  margin-top: 2px;
  font-size: 0.72rem;
  color: var(--vino-medio);
}

.point-item p {
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.point-pin {
  flex: 0 0 auto;
}

.point-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.point-actions button {
  padding: 7px 5px;
  font-size: 0.7rem;
  box-shadow: none;
}

.danger-button {
  background: #842029;
}

.layer-actions button.is-muted {
  opacity: 0.42;
}

.layer-credit {
  position: absolute;
  top: 15px;
  left: 50%;
  z-index: 900;
  width: min(410px, calc(100% - 40px));
  padding: 12px 16px;
  display: grid;
  gap: 2px;
  color: var(--white);
  background: rgba(59, 7, 18, 0.92);
  border: 1px solid rgba(239, 173, 185, 0.38);
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  transform: translate(-50%, -140%);
  opacity: 0;
  pointer-events: none;
  transition: 0.4s ease;
}

.layer-credit.is-visible {
  transform: translate(-50%, 0);
  opacity: 1;
}

.layer-credit__label {
  color: #efadb9;
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.layer-credit strong {
  font-size: 0.92rem;
}

.layer-credit > span:last-child {
  opacity: 0.8;
  font-size: 0.75rem;
}

.modal__card--wide {
  width: min(680px, calc(100% - 30px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.modal-help {
  color: var(--muted);
  font-size: 0.83rem;
  line-height: 1.45;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal__card label {
  display: grid;
  gap: 5px;
  color: var(--vino-profundo);
  font-size: 0.75rem;
  font-weight: 800;
}

.source-details {
  display: grid;
  gap: 8px;
}

.source-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--rosa-claro);
  font-size: 0.82rem;
}

.source-row strong {
  color: var(--vino-profundo);
}

.source-row span {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.source-link {
  display: inline-flex;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--vino);
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.loader__logos {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
}

.loader__logos img:first-child {
  width: 175px;
  height: 175px;
  object-fit: contain;
  object-position: center;
}

.loader__logos img:last-child {
  width: 85px;
  height: 85px;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 560px) {
  .form-grid,
  .point-actions {
    grid-template-columns: 1fr;
  }

  .source-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .layer-credit {
    top: 10px;
  }
}

/* =========================
   VERSIÓN 3.0 · AUTENTICACIÓN
========================= */

body.auth-locked {
  overflow: hidden;
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
  background:
    radial-gradient(circle at 15% 18%, rgba(192, 93, 112, .26), transparent 28%),
    radial-gradient(circle at 88% 80%, rgba(255, 255, 255, .10), transparent 30%),
    linear-gradient(135deg, #26040b, var(--vino-profundo) 45%, var(--vino));
  transition: opacity .35s ease, visibility .35s ease;
}

.auth-gate.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.auth-gate__glow {
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(239, 173, 185, .13);
  filter: blur(45px);
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  min-height: 540px;
  display: grid;
  grid-template-columns: .92fr 1.08fr;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 30px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 34px 100px rgba(0,0,0,.38);
}

.auth-card__brand {
  padding: 48px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  background:
    linear-gradient(145deg, rgba(59,7,18,.96), rgba(120,28,48,.92)),
    url('../assets/logos/logoguardianesblanco.PNG') center/55% no-repeat;
}

.auth-card__brand h1 {
  margin-top: 8px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1;
}

.auth-card__brand p {
  margin-top: 14px;
  line-height: 1.55;
  opacity: .82;
}

.auth-card__logos {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
}

.auth-card__logos img:first-child {
  width: 170px;
  height: 170px;
  object-fit: contain;
}

.auth-card__logos img:last-child {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.auth-card__forms {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 25px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--rosa-claro);
}

.auth-tab {
  box-shadow: none;
  background: transparent;
  color: var(--muted);
}

.auth-tab:hover {
  box-shadow: none;
}

.auth-tab.is-active {
  color: var(--white);
  background: linear-gradient(135deg, var(--vino), var(--vino-profundo));
  box-shadow: 0 8px 18px rgba(59,7,18,.18);
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--vino-profundo);
  font-size: .79rem;
  font-weight: 800;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 38px;
  height: 34px;
  padding: 0;
  transform: translateY(-50%);
  box-shadow: none;
  background: transparent;
  color: var(--vino);
}

.password-toggle:hover {
  transform: translateY(-50%);
  box-shadow: none;
  background: var(--rosa-suave);
}

.auth-message {
  min-height: 22px;
  margin-top: 14px;
  font-size: .82rem;
  color: var(--muted);
}

.auth-message--error {
  color: #9b1c31;
  font-weight: 700;
}

.user-toolbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-toolbar[hidden] {
  display: none;
}

.user-toolbar__identity {
  display: grid;
  text-align: right;
}

.user-toolbar__identity span {
  font-size: .66rem;
  opacity: .72;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.user-toolbar__identity strong {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .82rem;
}

.user-toolbar .button-secondary {
  padding: 8px 11px;
  color: var(--white);
  border-color: rgba(255,255,255,.28);
  background: rgba(255,255,255,.10);
}

@media (max-width: 760px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-card__brand {
    padding: 28px;
  }

  .auth-card__brand p {
    display: none;
  }

  .auth-card__logos {
    margin-bottom: 12px;
  }

  .auth-card__logos img:first-child {
    width: 170px;
    height: 170px;
  }

  .auth-card__logos img:last-child {
    width: 62px;
    height: 62px;
  }

  .auth-card__forms {
    padding: 28px;
  }

  .user-toolbar__identity {
    display: none;
  }
}

/* =========================
   V4 · PROYECTOS EN LA NUBE
========================= */
.header-session {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  position: relative;
  z-index: 3;
}

.project-toolbar {
  min-width: 190px;
}

.project-toolbar label {
  display: block;
  margin-bottom: 4px;
  color: rgba(255,255,255,.72);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.project-toolbar__controls {
  display: flex;
  gap: 7px;
}

.project-toolbar select {
  width: 180px;
  min-height: 38px;
  padding: 7px 30px 7px 11px;
  color: white;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  font-weight: 700;
}

.project-toolbar select option {
  color: #3b0712;
  background: white;
}

.project-toolbar .button-secondary {
  width: 40px;
  min-height: 38px;
  padding: 5px;
  color: white;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.28);
}

@media (max-width: 1000px) {
  .header-session {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 680px) {
  .header-session {
    align-items: stretch;
    flex-direction: column;
  }

  .project-toolbar,
  .project-toolbar select {
    width: 100%;
  }
}


/* =========================
   V4.1 · COLOR PERSONALIZADO DE CAPAS
========================= */

.layer-color-picker {
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  box-shadow: none;
}

.layer-color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.layer-color-picker::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}

.layer-color-picker::-moz-color-swatch {
  border: 0;
  border-radius: 5px;
}

.layer-color-picker:disabled {
  cursor: wait;
  opacity: .55;
}

/* =========================================================
   V5 · EDITOR PROFESIONAL DE ESTILO DE CAPAS
========================================================= */

.layer-item {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.layer-style-swatch {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  border: 3px solid var(--layer-stroke, #1f6096) !important;
  border-radius: 10px !important;
  background: var(--layer-fill, #1f6096) !important;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.65) !important;
}

.layer-style-swatch:hover {
  transform: scale(1.06);
}

.layer-color-picker,
.layer-color-button {
  display: none !important;
}

.style-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 4px 0 8px;
}

.style-presets button {
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  border: 3px solid rgba(255,255,255,.95);
  border-radius: 50%;
  background: var(--preset);
  box-shadow: 0 0 0 1px rgba(59,7,18,.2), 0 6px 15px rgba(59,7,18,.15);
}

.style-presets button:hover {
  transform: scale(1.10);
}

#layerStyleForm input[type="color"] {
  width: 100%;
  height: 52px;
  padding: 4px;
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: auto;
}

.style-range-label {
  display: grid;
  gap: 8px;
}

.style-range-label > span {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.style-range-label strong {
  min-width: 48px;
  text-align: right;
  color: var(--vino);
}

.style-range-label input[type="range"] {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
