/* ============================================================
   Radar IA — identidad visual
   Concepto: pantalla de radar. Fondo noche, retícula sutil,
   señal verde-cian, acento ámbar para lo destacado.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #06090f;
  --bg-2: #0a0f18;
  --surface: #0e1522;
  --surface-2: #131c2c;
  --line: rgba(148, 180, 220, 0.14);
  --text: #e8eef7;
  --text-dim: #9fb0c5;
  --text-faint: #66788f;
  --accent: #2de0a5;      /* señal */
  --accent-2: #52b8ff;    /* señal fría */
  --accent-warm: #ffc65c; /* destacado */
  --danger: #ff6b7a;
  --warning: #ffc65c;
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow-card: 0 8px 30px rgba(2, 6, 12, 0.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Resplandor de fondo en capa propia: evita los fallos de pintado
   de background-attachment: fixed (Safari iOS incluido). */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(45, 224, 165, 0.09), transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 10%, rgba(82, 184, 255, 0.07), transparent 60%);
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; }

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Cabecera ---------- */

#site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(6, 9, 15, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 21px;
  color: var(--text); text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand em { color: var(--accent); font-style: normal; }
.logo-mark { width: 30px; height: 30px; color: var(--accent); }

.nav { display: flex; align-items: center; gap: 22px; }
.nav-link { color: var(--text-dim); font-size: 15px; font-weight: 500; }
.nav-link:hover { color: var(--text); text-decoration: none; }
.nav-link.active { color: var(--accent); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 24px; cursor: pointer; }

.demo-bar {
  background: linear-gradient(90deg, rgba(255, 198, 92, 0.12), rgba(255, 198, 92, 0.05));
  border-bottom: 1px solid rgba(255, 198, 92, 0.25);
  color: var(--accent-warm);
  text-align: center; font-size: 13px; padding: 7px 16px;
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #1db98a);
  color: #04231a;
  box-shadow: 0 4px 18px rgba(45, 224, 165, 0.28);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(45, 224, 165, 0.4); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface); }
.btn-danger { background: rgba(255, 107, 122, 0.12); border-color: rgba(255, 107, 122, 0.35); color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ---------- Hero con radar ---------- */

.hero { padding: 42px 0 24px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 36px; align-items: center; }

.hero h1 { font-size: clamp(30px, 4.2vw, 46px); font-weight: 700; }
.hero h1 .glow { color: var(--accent); text-shadow: 0 0 24px rgba(45, 224, 165, 0.45); }
.hero p.lead { margin-top: 14px; font-size: 16.5px; color: var(--text-dim); max-width: 52ch; }
.hero-actions { margin-top: 22px; display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats { display: flex; gap: 30px; margin-top: 24px; }
.hero-stat b { font-family: var(--font-display); font-size: 23px; color: var(--accent); display: block; }
.hero-stat span { font-size: 12.5px; color: var(--text-faint); }

/* Radar animado */
.radar-scope { position: relative; width: min(255px, 70vw); aspect-ratio: 1; margin: 0 auto; }
.radar-scope svg { width: 100%; height: 100%; }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(45, 224, 165, 0.35), transparent 70deg, transparent 360deg);
  animation: sweep 4.5s linear infinite;
  mask: radial-gradient(circle, black 98%, transparent 100%);
}
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-blip { animation: blip 4.5s ease-out infinite; transform-origin: center; }
.radar-blip.b2 { animation-delay: 1.4s; }
.radar-blip.b3 { animation-delay: 2.7s; }
@keyframes blip {
  0%, 12% { opacity: 0; }
  16% { opacity: 1; }
  55% { opacity: .25; }
  100% { opacity: 0; }
}

/* ---------- Filtros ---------- */

.filters {
  padding: 12px 0; position: sticky; top: 68px; z-index: 40;
  background: rgba(6, 9, 15, 0.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.filters-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.search-box { position: relative; flex: 1 1 240px; max-width: 360px; }
.search-box input {
  width: 100%; padding: 9px 16px 9px 40px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); font-size: 14.5px; font-family: var(--font-body);
}
.search-box input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45, 224, 165, 0.15); }
.search-box::before {
  content: ''; position: absolute; left: 15px; top: 50%; width: 16px; height: 16px;
  transform: translateY(-50%);
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%239fb0c5" stroke-width="2.4"><circle cx="11" cy="11" r="7"/><line x1="21" y1="21" x2="16.5" y2="16.5"/></svg>') no-repeat center / contain;
}

.select-pill {
  padding: 9px 34px 9px 15px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; color: var(--text); font-size: 14px; font-family: var(--font-body);
  appearance: none; cursor: pointer; white-space: nowrap;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%239fb0c5" stroke-width="2.4"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat; background-position: right 13px center; background-size: 13px;
}
.select-pill:focus { outline: none; border-color: var(--accent); }
.select-pill.has-selection { border-color: var(--accent); color: var(--accent); }

/* Desplegables de casillas (servicios y tecnologías) */
.dropdown { position: relative; }
.dropdown-btn { text-align: left; }
.dropdown-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  min-width: 272px; max-height: 340px; overflow-y: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px; box-shadow: 0 16px 44px rgba(2, 6, 12, 0.7);
}
.dropdown-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text-dim); cursor: pointer;
}
.dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.dropdown-item input { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

.chip {
  padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-dim);
  cursor: pointer; transition: all .15s ease; user-select: none;
}
.chip:hover { border-color: var(--accent-2); color: var(--text); }
.chip.on { background: rgba(45, 224, 165, 0.14); border-color: var(--accent); color: var(--accent); }

.active-row { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 10px; }
.chip-remove { font-family: var(--font-body); }
.chip-remove span { opacity: .7; margin-left: 2px; }

.results-count { color: var(--text-faint); font-size: 13.5px; margin-left: auto; white-space: nowrap; }
.clear-filters { background: none; border: none; color: var(--accent-2); cursor: pointer; font-size: 13px; }

/* ---------- Tarjetas del directorio ---------- */

.cards-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 22px; padding: 24px 0 70px;
}

.card {
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  box-shadow: var(--shadow-card);
}
.card:hover { transform: translateY(-4px); border-color: rgba(45, 224, 165, 0.4); box-shadow: 0 14px 40px rgba(2, 6, 12, 0.65); }
.card a.card-link { position: absolute; inset: 0; z-index: 3; }

/* El retrato manda: ocupa todo el ancho de la tarjeta en formato cuadrado.
   Por eso al subir imagen se recorta en cuadrado (assets/js/cropper.js). */
.card-photo { position: relative; width: 100%; aspect-ratio: 1; background: var(--surface-2); }
.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 68px;
  color: var(--accent); background: var(--surface-2);
}
/* Velo inferior para que las etiquetas se lean sobre cualquier foto. */
.card-photo::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 42%;
  background: linear-gradient(to top, rgba(6, 9, 15, 0.92), transparent);
  pointer-events: none;
}
.card-type { position: absolute; left: 14px; bottom: 14px; z-index: 2; }
.card-featured {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  font-size: 12px; font-weight: 600; padding: 4px 11px; border-radius: 999px;
  background: rgba(10, 14, 22, 0.82); color: var(--accent-warm);
  backdrop-filter: blur(4px);
}

.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }

.avatar {
  width: 58px; height: 58px; border-radius: 50%; object-fit: cover;
  border: 2px solid rgba(45, 224, 165, 0.35); background: var(--surface-2); flex-shrink: 0;
}
.avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--accent);
}

.card-name { font-size: 20px; font-weight: 600; font-family: var(--font-display); }
.card-headline { color: var(--text-dim); font-size: 14.5px; }

.badge-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.badge {
  font-size: 12px; font-weight: 600; padding: 3px 11px; border-radius: 999px;
  letter-spacing: .02em; white-space: nowrap;
}
.card .badge[class*="badge-type-"] { font-size: 11.5px; padding: 3px 10px; }
.badge-type-consultora { background: rgba(82, 184, 255, 0.14); color: var(--accent-2); }
.badge-type-freelancer { background: rgba(45, 224, 165, 0.13); color: var(--accent); }
.badge-type-despacho { background: rgba(196, 145, 255, 0.15); color: #c491ff; }
.badge-visible { background: rgba(45, 224, 165, 0.13); color: var(--accent); }
.badge-featured { background: rgba(255, 198, 92, 0.15); color: var(--accent-warm); }
.badge-exp { background: var(--surface-2); color: var(--text-dim); }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.tag {
  font-size: 12px; padding: 4px 10px; border-radius: 7px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-dim);
}
.tag-more { color: var(--text-faint); border-style: dashed; }

.empty-state { text-align: center; padding: 70px 20px; color: var(--text-dim); }
.empty-state h3 { font-size: 22px; margin-bottom: 10px; color: var(--text); }

/* ---------- Sección cómo funciona ---------- */

.how { padding: 60px 0 80px; border-top: 1px solid var(--line); }
.how h2, .section-title { font-size: clamp(26px, 3.4vw, 36px); margin-bottom: 14px; }
.how .sub { color: var(--text-dim); max-width: 62ch; margin-bottom: 40px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.how-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.how-card .num {
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(45, 224, 165, 0.12); color: var(--accent); margin-bottom: 16px;
}
.how-card h3 { font-size: 18px; margin-bottom: 8px; }
.how-card p { font-size: 14.5px; color: var(--text-dim); }

/* ---------- Ficha de perfil ---------- */

.profile-hero { padding: 44px 0 30px; }
.profile-head { display: flex; gap: 34px; align-items: center; flex-wrap: wrap; }
.profile-photo {
  width: 260px; height: 260px; flex-shrink: 0; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.profile-photo .photo-fallback { font-size: 84px; }
.profile-head h1 { font-size: clamp(28px, 4vw, 42px); }
.profile-headline { font-size: 18px; color: var(--text-dim); margin-top: 6px; max-width: 60ch; }
.profile-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

.profile-body { display: grid; grid-template-columns: 1.6fr .9fr; gap: 30px; padding: 26px 0 80px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.panel + .panel { margin-top: 22px; }
.panel h2 { font-size: 17px; margin-bottom: 16px; color: var(--text); letter-spacing: .01em; }
.panel .bio { color: var(--text-dim); white-space: pre-line; }

.link-list { display: flex; flex-direction: column; gap: 12px; }
.link-list a {
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font-size: 14.5px; transition: border-color .15s ease;
}
.link-list a:hover { border-color: var(--accent); text-decoration: none; }
.link-list .ico { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }

.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-faint); font-size: 14px; margin-bottom: 22px; }

/* ---------- Formularios ---------- */

.auth-wrap { max-width: 440px; margin: 60px auto 90px; padding: 0 24px; }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--text-dim); font-size: 14.5px; margin-bottom: 26px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 7px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--text); font-size: 15px; font-family: var(--font-body);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(45, 224, 165, 0.13);
}
.field textarea { resize: vertical; min-height: 120px; }
.field .hint { font-size: 12.5px; color: var(--text-faint); margin-top: 5px; }
.form-error { color: var(--danger); font-size: 14px; margin: 10px 0; min-height: 20px; }

.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-dim); }

.tabs { display: flex; gap: 6px; background: var(--bg-2); padding: 5px; border-radius: 999px; margin-bottom: 26px; }
.tabs button {
  flex: 1; padding: 9px; border: none; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--text-dim); font-family: var(--font-display); font-weight: 600; font-size: 14px;
}
.tabs button.on { background: var(--surface-2); color: var(--accent); }

/* ---------- Editor de perfil + gamificación ---------- */

.editor-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 28px; padding: 44px 0 90px; align-items: start; }
.editor-layout h1 { font-size: 30px; margin-bottom: 6px; }
.page-sub { color: var(--text-dim); margin-bottom: 28px; }

.signal-panel { position: sticky; top: 96px; }
.signal-score { display: flex; align-items: center; gap: 20px; margin-bottom: 8px; }
.signal-ring { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.signal-ring svg { transform: rotate(-90deg); }
.signal-ring .track { stroke: var(--surface-2); }
.signal-ring .bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset .6s ease, stroke .3s ease; }
.signal-ring .pct {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 24px;
}
.signal-level { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.signal-status { font-size: 13.5px; color: var(--text-dim); margin-top: 4px; }
.signal-status b.ok { color: var(--accent); }
.signal-status b.ko { color: var(--warning); }

.checklist { list-style: none; margin-top: 18px; display: flex; flex-direction: column; gap: 9px; }
.checklist li {
  display: flex; align-items: center; gap: 10px; font-size: 13.5px;
  color: var(--text-faint); padding: 8px 12px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid transparent;
}
.checklist li.done { color: var(--text-dim); }
.checklist li.done .mark { color: var(--accent); }
.checklist li.pending-required { border-color: rgba(255, 198, 92, 0.3); }
.checklist .mark { font-weight: 700; width: 16px; color: var(--text-faint); }
.checklist .pts { margin-left: auto; font-size: 12px; color: var(--text-faint); }

.img-uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.img-upload {
  border: 1.5px dashed var(--line); border-radius: var(--radius-sm); padding: 18px;
  text-align: center; cursor: pointer; transition: border-color .15s ease;
}
.img-upload:hover { border-color: var(--accent); }
.img-upload.subiendo { border-color: var(--accent); opacity: .6; pointer-events: none; }
.img-upload.subiendo .label::after { content: ' · subiendo…'; color: var(--accent); }
.img-upload img { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; margin-bottom: 8px; }
.img-upload .label { font-size: 13px; color: var(--text-dim); font-weight: 600; }
.img-upload .hint { font-size: 11.5px; color: var(--text-faint); }
.img-upload input { display: none; }

.pick-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.form-actions { display: flex; gap: 14px; align-items: center; margin-top: 28px; flex-wrap: wrap; }

/* ---------- Panel de administración ---------- */

.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 30px 0; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.stat-card b { font-family: var(--font-display); font-size: 30px; display: block; }
.stat-card span { font-size: 13px; color: var(--text-faint); }
.stat-card.ok b { color: var(--accent); }
.stat-card.warn b { color: var(--warning); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 80px; }
table.admin { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 780px; }
table.admin th {
  text-align: left; padding: 13px 16px; background: var(--surface-2);
  color: var(--text-dim); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
}
table.admin td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
table.admin tr:hover td { background: rgba(148, 180, 220, 0.04); }
.cell-name { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.cell-name .avatar { width: 34px; height: 34px; font-size: 13px; border-width: 1px; }
.row-actions { display: flex; gap: 8px; }
.row-actions .btn { padding: 5px 12px; font-size: 12.5px; }

.score-pill { font-family: var(--font-display); font-weight: 700; padding: 3px 10px; border-radius: 999px; font-size: 13px; }
.score-ok { background: rgba(45, 224, 165, 0.13); color: var(--accent); }
.score-low { background: rgba(255, 198, 92, 0.13); color: var(--warning); }

/* ---------- Pie ---------- */

#site-footer { border-top: 1px solid var(--line); padding: 44px 0 54px; background: var(--bg-2); }
.footer-inner { text-align: center; color: var(--text-faint); font-size: 14px; }
.brand-footer { justify-content: center; margin-bottom: 14px; }
.footer-inner p { max-width: 56ch; margin: 0 auto 6px; }
.footer-small { font-size: 12.5px; }

/* ---------- Ventana de recorte de imagen ---------- */

.cropper-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(3, 6, 11, 0.82); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.cropper-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; width: min(420px, 100%); box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
}
.cropper-box h3 { font-size: 20px; margin-bottom: 6px; }
.cropper-hint { font-size: 13.5px; color: var(--text-faint); margin-bottom: 18px; }

.cropper-frame {
  position: relative; width: 100%; aspect-ratio: 1; overflow: hidden;
  border-radius: var(--radius-sm); background: var(--bg-2);
  cursor: grab; touch-action: none; user-select: none;
  border: 1px solid var(--line);
}
.cropper-frame.arrastrando { cursor: grabbing; }
.cropper-frame img {
  position: absolute; top: 50%; left: 50%; max-width: none;
  transform-origin: center; pointer-events: none;
}
/* Guía visual: marca el borde de lo que quedará dentro del recorte. */
.cropper-frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(45, 224, 165, .5);
  border-radius: var(--radius-sm);
}

.cropper-zoom { display: flex; align-items: center; gap: 12px; margin: 18px 0 22px; color: var(--text-faint); }
.cropper-zoom input { flex: 1; accent-color: var(--accent); }

.cropper-actions { display: flex; gap: 12px; justify-content: flex-end; }
.cropper-actions .btn { flex: 1; }

/* ---------- Avisos (toast) ---------- */

#toast-box { position: fixed; bottom: 24px; right: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  padding: 13px 20px; border-radius: var(--radius-sm); font-size: 14.5px; font-weight: 500;
  opacity: 0; transform: translateY(8px); transition: all .35s ease; max-width: 340px;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.toast.show { opacity: 1; transform: none; }
.toast-ok { background: #0d2b21; border: 1px solid rgba(45, 224, 165, 0.4); color: var(--accent); }
.toast-error { background: #2b1114; border: 1px solid rgba(255, 107, 122, 0.4); color: var(--danger); }

.loading { text-align: center; padding: 60px; color: var(--text-faint); }

/* ---------- Adaptación a móvil ---------- */

@media (max-width: 900px) {
  .hero-grid, .profile-body, .editor-layout { grid-template-columns: 1fr; }
  .profile-photo { width: 200px; height: 200px; }
  .radar-scope { display: none; }
  .how-grid { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .signal-panel { position: static; }
}

@media (max-width: 720px) {
  /* Filtros en dos líneas justas: buscador arriba, selectores debajo. */
  .filters { padding: 10px 0; }
  .filters-bar { gap: 8px; }
  .search-box { flex: 1 1 100%; max-width: none; }
  .select-pill { font-size: 13px; padding: 8px 27px 8px 13px; background-position: right 10px center; }
  /* El desplegable nativo se estira hasta su opción más larga: lo acotamos
     para que los tres controles quepan en una sola línea. */
  #type-filter { max-width: 92px; text-overflow: ellipsis; }
  .results-count { display: none; }
  .dropdown-panel { min-width: min(272px, calc(100vw - 40px)); }
  #tech-dropdown .dropdown-panel { left: auto; right: 0; }

  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: 18px 24px; gap: 16px;
    background: var(--bg-2); border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }

  /* En móvil el hero se recoge: los perfiles deben verse cuanto antes. */
  .hero { padding: 26px 0 14px; }
  .hero p.lead { font-size: 15.5px; margin-top: 10px; }
  .hero-actions { margin-top: 18px; gap: 10px; }
  .hero-actions .btn { padding: 11px 18px; font-size: 14.5px; }
  .hero-stats { gap: 24px; margin-top: 18px; flex-wrap: wrap; }
  .hero-stat b { font-size: 21px; }
  .img-uploads { grid-template-columns: 1fr; }
}
