/* CIVIA AI — sistema visual derivado del logo:
   negro profundo, cristal cromado, resplandor ámbar y acero azulado; tipografía geométrica,
   etiquetas en mayúsculas con tracking amplio y trazos finos de plano arquitectónico. */

:root {
  --bg: #07080b;
  --bg-2: #0b0d11;
  --panel: #0f1116;
  --panel-2: #14171d;
  --glass: rgba(255, 255, 255, 0.035);
  --glass-2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eceef2;
  --text-2: #a7adb8;
  --text-3: #6c727e;
  --gold: #d6a46c;
  --gold-2: #f2cf9f;
  --gold-glow: rgba(214, 164, 108, 0.22);
  --steel: #9fb2d3;
  --steel-2: #c8d4ea;
  --ok: #7cc6a1;
  --warn: #e9b96b;
  --danger: #e57a6e;
  --chrome: linear-gradient(180deg, #ffffff 0%, #d9dee6 45%, #8e97a6 100%);
  --ai: linear-gradient(180deg, #d4def0 0%, #8fa3c7 100%);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Outfit", "Inter", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --sidebar: 248px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  /* Movimiento: duraciones y curvas comunes a todos los efectos. */
  --dur-1: 0.16s;
  --dur-2: 0.32s;
  --dur-3: 0.6s;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f4f2ee;
  --bg-2: #ece9e3;
  --panel: #ffffff;
  --panel-2: #f7f5f1;
  --glass: rgba(20, 22, 28, 0.03);
  --glass-2: rgba(20, 22, 28, 0.06);
  --line: rgba(20, 22, 28, 0.09);
  --line-2: rgba(20, 22, 28, 0.16);
  --text: #15171c;
  --text-2: #4c525d;
  --text-3: #858a94;
  --gold: #a8743a;
  --gold-2: #8a5b27;
  --gold-glow: rgba(168, 116, 58, 0.16);
  --steel: #4d6490;
  --steel-2: #354a72;
  --chrome: linear-gradient(180deg, #2a2e36 0%, #15171c 100%);
  --ai: linear-gradient(180deg, #5b75a6 0%, #354a72 100%);
  --shadow: 0 24px 60px -30px rgba(40, 30, 20, 0.35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14.5px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg, canvas, video { display: block; max-width: 100%; }
:where(svg[aria-hidden="true"]) { width: 18px; height: 18px; flex: none; }
::selection { background: var(--gold-glow); color: var(--text); }
:focus-visible { outline: 1.5px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- tipografía */
.display { font-family: var(--display); font-weight: 300; letter-spacing: -0.02em; line-height: 1.08; }
.chrome-text { background: var(--chrome); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-text { background: var(--ai); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow {
  font: 500 10.5px/1 var(--font);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-3);
}
.eyebrow.gold { color: var(--gold); }
.ruled { display: flex; align-items: center; gap: 14px; }
.ruled::before, .ruled::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--line-2), transparent); }
.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: -0.01em; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
h1 { font: 300 clamp(28px, 3.4vw, 44px)/1.08 var(--display); letter-spacing: -0.025em; }
h2 { font: 400 22px/1.2 var(--display); letter-spacing: -0.015em; }
h3 { font: 500 16px/1.3 var(--display); letter-spacing: -0.005em; }
p { margin: 0; }

/* ---------------------------------------------------------------- splash */
#splash {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: radial-gradient(60% 50% at 50% 45%, rgba(214, 164, 108, 0.08), transparent 70%), var(--bg);
  transition: opacity 0.45s var(--ease), visibility 0.45s;
}
#splash.out { opacity: 0; visibility: hidden; }
@keyframes breathe { 50% { filter: drop-shadow(0 0 22px rgba(214, 164, 108, 0.35)); transform: scale(1.03); } }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* ---------------------------------------------------------------- fondo arquitectónico */
.backdrop { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.backdrop::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw;
  background: radial-gradient(closest-side, rgba(214, 164, 108, 0.07), transparent 70%);
}
.backdrop::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(80% 60% at 70% 0%, #000 0%, transparent 75%);
  opacity: 0.35;
}
.backdrop svg { position: absolute; right: -40px; bottom: -40px; width: 520px; opacity: 0.18; }

/* ---------------------------------------------------------------- shell */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 14px 18px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 40%), var(--bg);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; }
.brand img { width: 40px; height: 40px; mix-blend-mode: screen; }
:root[data-theme="light"] .brand img, :root[data-theme="light"] .auth .brand-mobile img, :root[data-theme="light"] #splash img, :root[data-theme="light"] .msg .who img, :root[data-theme="light"] .mark-plate { background: #07080b; border-radius: 10px; padding: 2px; }
.brand .name { font: 400 21px/1 var(--display); letter-spacing: -0.01em; }
.brand .name b { font-weight: 400; }
.brand .tag { margin-top: 5px; font-size: 8.5px; letter-spacing: 0.34em; color: var(--text-3); text-transform: uppercase; }
.nav-section { margin: 14px 12px 6px; }
.nav a {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 450;
  transition: background 0.2s, color 0.2s;
}
.nav a svg { width: 18px; height: 18px; flex: none; opacity: 0.85; }
.nav a:hover { background: var(--glass); color: var(--text); }
.nav a.active { color: var(--text); background: var(--glass-2); }
.nav a.active::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.nav a .pill { margin-left: auto; }
.sidebar .foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); }
.engine { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.engine i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 64px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.search {
  display: flex; align-items: center; gap: 10px;
  flex: 1; max-width: 520px; height: 38px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--glass);
  color: var(--text-3); cursor: text; transition: border-color 0.2s;
}
.search:hover { border-color: var(--line-2); }
.search svg { width: 16px; height: 16px; flex: none; }
.search input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; }
.search kbd { font: 500 10.5px var(--mono); padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--text-3); }
.topbar .spacer { flex: 1; }
.content { padding: 34px 40px 80px; max-width: 1480px; width: 100%; margin: 0 auto; animation: rise 0.45s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; flex-wrap: wrap; }
.page-head .eyebrow { margin-bottom: 12px; }
.page-head p { margin-top: 10px; max-width: 640px; }

/* ---------------------------------------------------------------- componentes */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line-2); background: var(--glass);
  color: var(--text); font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, box-shadow 0.25s;
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--glass-2); border-color: color-mix(in srgb, var(--text) 25%, transparent); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled] { opacity: 0.5; pointer-events: none; }
.btn.primary {
  border-color: transparent; color: #17120b;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 30px -12px var(--gold), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
:root[data-theme="light"] .btn.primary { color: #fff; }
.btn.primary:hover { box-shadow: 0 14px 36px -10px var(--gold), inset 0 1px 0 rgba(255, 255, 255, 0.45); filter: brightness(1.04); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { color: var(--text); background: var(--glass); }
.btn.danger { color: var(--danger); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn.lg { height: 46px; padding: 0 22px; font-size: 14.5px; border-radius: 13px; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 30px; }
.btn.block { width: 100%; }
.spinner { width: 15px; height: 15px; border-radius: 50%; border: 1.5px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.008)), var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card.pad { padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.card-body { padding: 20px 24px; }
.card.hover { transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s; cursor: pointer; }
.card.hover:hover { transform: translateY(-2px); border-color: var(--line-2); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(214, 164, 108, 0.1); }
.glow::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(400px 120px at 20% 0%, rgba(214, 164, 108, 0.14), transparent 70%);
}

.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.lg { gap: 18px; }
.sep { height: 1px; background: var(--line); margin: 18px 0; }
.right { margin-left: auto; }

.kpi { padding: 20px 22px; }
.kpi .eyebrow { padding-right: 42px; }
.kpi .val { margin-top: 14px; font: 300 34px/1 var(--display); letter-spacing: -0.03em; }
.kpi .sub { margin-top: 8px; font-size: 12px; color: var(--text-3); }
.kpi .ico { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--gold); }
.kpi .ico svg { width: 17px; height: 17px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 99px; border: 1px solid var(--line-2); font-size: 11px; font-weight: 500; color: var(--text-2); white-space: nowrap;
}
.pill.gold { color: var(--gold-2); border-color: color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 9%, transparent); }
.pill.steel { color: var(--steel-2); border-color: color-mix(in srgb, var(--steel) 40%, transparent); background: color-mix(in srgb, var(--steel) 8%, transparent); }
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pill.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.pill.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 12px; font-weight: 500; color: var(--text-2); letter-spacing: 0.01em; }
.input, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 10px 13px;
  border: 1px solid var(--line-2); border-radius: 11px;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.input { resize: vertical; min-height: 96px; line-height: 1.5; }
.input:focus { border-color: color-mix(in srgb, var(--gold) 70%, transparent); box-shadow: 0 0 0 4px var(--gold-glow); }
.input::placeholder { color: var(--text-3); }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 18px) 18px, calc(100% - 13px) 18px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.hint { font-size: 12px; color: var(--text-3); }
.error-text { font-size: 12.5px; color: var(--danger); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.check input { accent-color: var(--gold); width: 16px; height: 16px; }
input[type="range"] { accent-color: var(--gold); }

.tabs { display: flex; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--glass); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px;
  border: 0; border-radius: 10px; background: transparent; color: var(--text-2); font-weight: 500; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.tabs button svg, .tabs a svg { width: 15px; height: 15px; }
.tabs .active { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 6px 16px -8px rgba(0, 0, 0, 0.8); }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 500 10.5px var(--font); letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); padding: 12px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--glass); }
.table .num { text-align: right; font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.table-wrap { overflow-x: auto; }

.empty { display: grid; place-items: center; gap: 12px; padding: 54px 24px; text-align: center; color: var(--text-2); }
.empty svg.big { width: 56px; height: 56px; color: var(--text-3); stroke-width: 1; }
.empty p { max-width: 420px; }

.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 600 12px var(--font); color: #111; flex: none; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }

.progress { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width 0.6s var(--ease); }
.ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--line) 0); flex: none; }
.ring > span { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); font: 400 18px var(--display); }

/* ---------------------------------------------------------------- proyectos */
.project-card { overflow: hidden; }
.cover { position: relative; overflow: hidden; }
.cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover::after { content: ""; position: absolute; inset: 40% 0 0 0; background: linear-gradient(transparent, var(--panel)); pointer-events: none; }
.project-card .cover { position: relative; height: 150px; overflow: hidden; border-bottom: 1px solid var(--line); }
.project-card .cover svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.project-card .body { padding: 18px 20px 20px; }
.project-card .meta { display: flex; gap: 14px; margin-top: 14px; font-size: 12px; color: var(--text-3); flex-wrap: wrap; }
.project-card .meta span { display: inline-flex; align-items: center; gap: 6px; }
.project-card .meta svg { width: 13px; height: 13px; }

.stepper { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.stepper .step { flex: 1; min-width: 120px; cursor: pointer; }
.stepper .step i { display: block; height: 3px; border-radius: 3px; background: var(--line-2); margin-bottom: 9px; }
.stepper .step.done i { background: color-mix(in srgb, var(--gold) 55%, transparent); }
.stepper .step.current i { background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.stepper .step span { font-size: 11.5px; color: var(--text-3); }
.stepper .step.current span { color: var(--text); }

.rec { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rec:last-child { border-bottom: 0; }
.rec .mark { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; border: 1px solid var(--line-2); }
.rec .mark svg { width: 15px; height: 15px; }
.rec.alta .mark { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.rec.media .mark { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.rec.baja .mark { color: var(--steel); border-color: color-mix(in srgb, var(--steel) 40%, transparent); }
.rec h4 { font: 500 14px var(--font); }
.rec p { margin-top: 3px; font-size: 13px; color: var(--text-2); }

/* ---------------------------------------------------------------- archivos */
.dropzone {
  position: relative; display: grid; place-items: center; gap: 10px; padding: 34px; text-align: center;
  border: 1px dashed var(--line-2); border-radius: var(--radius-lg); background: var(--glass); cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone.over { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 5%, transparent); }
.dropzone svg { width: 34px; height: 34px; color: var(--gold); stroke-width: 1.2; }
.file-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 13px; transition: background 0.15s; cursor: pointer; }
.file-row:hover { background: var(--glass); }
.file-ico { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel-2); font: 600 9.5px var(--mono); letter-spacing: 0.05em; color: var(--text-2); text-transform: uppercase; }
.file-ico.plan { color: var(--gold-2); }
.file-ico.model { color: var(--steel-2); }
.file-ico.photo { color: var(--ok); }
.file-row .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.upload-item { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 10px 0; font-size: 12.5px; }
.upload-item .progress { grid-column: 1 / -1; }

.preview { min-height: 320px; border-radius: var(--radius); overflow: hidden; background: #050608; border: 1px solid var(--line); display: grid; place-items: center; }
.preview img { max-height: 70vh; object-fit: contain; }
.preview iframe { width: 100%; height: 72vh; border: 0; background: #fff; }

.check-list { display: grid; gap: 8px; }
.check-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--glass); }
.check-item .st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.check-item .st svg { width: 13px; height: 13px; }
.check-item.OK .st { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.check-item.FALTA .st { color: var(--danger); background: color-mix(in srgb, var(--danger) 14%, transparent); }
.check-item.REVISAR .st { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
.check-item.resolved { opacity: 0.55; }
.check-item h4 { font: 500 13.5px var(--font); }
.check-item p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }

/* ---------------------------------------------------------------- kanban */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; overflow-x: auto; }
.kanban .col { padding: 14px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--glass); min-height: 320px; }
.kanban .col.over { border-color: var(--gold); }
.kanban .col-head { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 12px; }
.task { padding: 13px 14px; border-radius: 13px; border: 1px solid var(--line); background: var(--panel); margin-bottom: 10px; cursor: grab; transition: border-color 0.2s, transform 0.2s; }
.task:hover { border-color: var(--line-2); }
.task.dragging { opacity: 0.5; transform: rotate(1deg); }
.task h4 { font: 500 13.5px var(--font); }
.task .row { margin-top: 10px; font-size: 11.5px; color: var(--text-3); }
.prio-URGENT { color: var(--danger); } .prio-HIGH { color: var(--warn); } .prio-MEDIUM { color: var(--steel); } .prio-LOW { color: var(--text-3); }

/* ---------------------------------------------------------------- copiloto */
.chat { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 18px; height: calc(100vh - 64px - 34px - 40px); min-height: 520px; }
.chat .list { overflow-y: auto; padding: 10px; }
.chat .conv-search { flex: none; max-width: none; margin: 0 12px 4px; height: 34px; }
.chat .conv { display: block; padding: 10px 12px; border-radius: 11px; color: var(--text-2); font-size: 13px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat .conv-row { position: relative; }
.chat .conv-row .conv { padding-right: 36px; }
.chat .conv-more { position: absolute; top: 8px; right: 4px; opacity: 0; transition: opacity 0.15s; }
.chat .conv-row:hover .conv-more, .chat .conv-more:focus-visible { opacity: 1; }
.chat .pin-ico { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; color: var(--gold); }
.menu { position: fixed; z-index: 70; min-width: 200px; padding: 6px; display: grid; animation: pop 0.18s var(--ease); }
.menu button { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); cursor: pointer; text-align: left; font-size: 13px; }
.menu button:hover { background: var(--glass-2); color: var(--text); }
.menu button svg { width: 15px; height: 15px; }
.menu button.danger { color: var(--danger); }
@media (hover: none) { .chat .conv-more { opacity: 1; } }
.chat .conv:hover { background: var(--glass); color: var(--text); }
.chat .conv.active { background: var(--glass-2); color: var(--text); }
.chat .thread { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.messages { flex: 1; overflow-y: auto; padding: 28px clamp(16px, 4vw, 48px); display: flex; flex-direction: column; gap: 22px; }
.msg { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; max-width: 900px; animation: rise 0.35s var(--ease); }
.msg .who { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); overflow: hidden; }
.msg .who img { width: 100%; height: 100%; mix-blend-mode: screen; }
.msg.user { align-self: flex-end; grid-template-columns: minmax(0, 1fr); }
.msg.user .who { display: none; }
.msg.user .bubble { background: var(--glass-2); border: 1px solid var(--line); padding: 12px 16px; border-radius: 16px 16px 4px 16px; justify-self: end; }
.msg .meta { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.msg-actions { display: flex; align-items: center; gap: 2px; margin-top: 8px; margin-left: -6px; }
.msg-actions .btn { color: var(--text-3); }
.msg-actions .btn:hover { color: var(--text); }
.msg-actions .btn.done { color: var(--ok); }
.msg-actions .btn.on { color: var(--gold-2); }
.msg-actions .engine-tag { margin-left: 8px; }
/* "Responder de nuevo" solo en la última respuesta de la conversación. */
.messages > .msg:not(:last-child) .regen { display: none; }
.composer { padding: 14px; border-top: 1px solid var(--line); }
.composer .box { display: flex; align-items: flex-end; gap: 10px; padding: 10px; border: 1px solid var(--line-2); border-radius: 16px; background: color-mix(in srgb, var(--bg) 60%, transparent); }
.composer textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; min-height: 24px; max-height: 220px; padding: 7px 6px; line-height: 1.5; }
.composer .btn.stopping { background: var(--panel-2); color: var(--text); border-color: var(--line-2); box-shadow: 0 0 0 4px var(--gold-glow); }
.msg.stopped .md { opacity: 0.75; }
.composer .counter { margin-top: 6px; text-align: right; font-family: var(--mono); }
.composer .counter.over { color: var(--danger); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 5px 12px; text-align: left; line-height: 1.35; border-radius: 99px; border: 1px solid var(--line-2); background: var(--glass); color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.chip:hover { color: var(--text); border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.chip svg { width: 13px; height: 13px; }
.typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; } .typing i:nth-child(3) { animation-delay: 0.4s; }
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.18em; border-radius: 1px; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@keyframes blink { 0%, 80%, 100% { opacity: 0.2; } 40% { opacity: 1; } }

/* ---------------------------------------------------------------- markdown */
.md { font-size: 14.5px; line-height: 1.68; color: var(--text); overflow-wrap: anywhere; }
.md > * + * { margin-top: 0.75em; }
.md h1, .md h2, .md h3, .md h4 { font-family: var(--display); font-weight: 500; margin-top: 1.3em; }
.md h2 { font-size: 19px; } .md h3 { font-size: 16px; } .md h4 { font-size: 14.5px; }
.md ul, .md ol { padding-left: 1.3em; margin-bottom: 0; }
.md li + li { margin-top: 0.3em; }
.md li::marker { color: var(--gold); }
.md strong { font-weight: 600; color: var(--text); }
.md em { color: var(--text-2); }
.md code { font-family: var(--mono); font-size: 0.88em; padding: 1px 6px; border-radius: 6px; background: var(--glass-2); }
.md blockquote { margin: 0; padding: 10px 16px; border-left: 2px solid var(--gold); background: var(--glass); border-radius: 0 10px 10px 0; color: var(--text-2); }
.md table { width: 100%; border-collapse: collapse; font-size: 13.5px; display: block; overflow-x: auto; }
.md th, .md td { padding: 8px 12px; border: 1px solid var(--line); text-align: left; }
.md th { background: var(--glass); font-weight: 600; }
.md a { color: var(--gold-2); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--gold) 45%, transparent); text-underline-offset: 3px; }
.md a:hover { text-decoration-color: var(--gold); }
.md hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2), transparent); margin: 1.4em 0; }
.md .cite { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin: 0 1px; border-radius: 6px; font: 600 10.5px var(--mono); color: var(--gold-2); background: color-mix(in srgb, var(--gold) 14%, transparent); vertical-align: 2px; }
.md pre.code { position: relative; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--bg) 75%, transparent); overflow-x: auto; }
.md pre.code code { padding: 0; background: none; font-size: 12.5px; line-height: 1.6; white-space: pre; }
.md pre.code .code-copy { position: absolute; top: 6px; right: 8px; height: 24px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text-2); font: 500 11px var(--font); cursor: pointer; opacity: 0; transition: opacity 0.15s, color 0.15s; }
.md pre.code:hover .code-copy, .md pre.code .code-copy:focus-visible { opacity: 1; }
.md pre.code .code-copy.done { color: var(--ok); opacity: 1; }
.md pre.code[data-lang] { padding-top: 30px; }
@media (hover: none) { .md pre.code .code-copy { opacity: 1; } }
.md pre.code[data-lang]::before { content: attr(data-lang); position: absolute; top: 10px; left: 16px; font: 500 9.5px var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.md .task-box.done { background: var(--gold); border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--panel); }
.md .task-box { display: inline-block; width: 13px; height: 13px; border: 1px solid var(--line-2); border-radius: 4px; margin-right: 6px; vertical-align: -1px; }

/* ---------------------------------------------------------------- biblioteca */
.ask-hero { position: relative; overflow: hidden; padding: clamp(28px, 4vw, 48px); }
.ask-hero .box { display: flex; gap: 10px; margin-top: 22px; padding: 8px; border: 1px solid var(--line-2); border-radius: 16px; background: color-mix(in srgb, var(--bg) 70%, transparent); }
.ask-hero .box input { flex: 1; border: 0; outline: 0; background: transparent; padding: 0 12px; font-size: 15.5px; min-width: 0; }
.featured { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 24px 26px; overflow: hidden; }
.featured::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(500px 160px at 0% 50%, var(--gold-glow), transparent 70%); }
.featured-mark { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); color: var(--gold-2); background: color-mix(in srgb, var(--gold) 8%, transparent); }
.featured-mark svg { width: 26px; height: 26px; }
@media (max-width: 640px) { .featured { grid-template-columns: 1fr; } .featured-go { justify-self: start; } }
.ask-hero .lib-meta { margin-top: 14px; gap: 14px; }
.ask-hero .lib-meta .chips { gap: 6px; }
.cat-card { padding: 20px; }
.cat-card .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line-2); color: var(--gold); margin-bottom: 16px; }
.cat-card .ico svg { width: 19px; height: 19px; }
.cat-card p { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.article { max-width: 780px; }
.article .md { font-size: 15.5px; }
.alpha { display: flex; flex-wrap: wrap; gap: 4px; }
.alpha button { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: transparent; color: var(--text-2); cursor: pointer; font-size: 12px; }
.alpha button:hover, .alpha button.active { border-color: var(--gold); color: var(--gold-2); }
.chip.active { color: var(--gold-2); border-color: color-mix(in srgb, var(--gold) 60%, transparent); background: color-mix(in srgb, var(--gold) 9%, transparent); }
.term { padding: 14px 0; border-bottom: 1px solid var(--line); }
.term b { font: 500 15px var(--display); }
.term p { color: var(--text-2); margin-top: 4px; font-size: 13.5px; }

/* ---------------------------------------------------------------- visor 3D y cámara */
.viewer { position: relative; height: calc(100vh - 64px - 34px - 40px - 70px); min-height: 520px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: radial-gradient(80% 80% at 50% 30%, #12151b, #050608); }
.viewer canvas { width: 100% !important; height: 100% !important; touch-action: none; }
.viewer .hud { position: absolute; display: flex; gap: 8px; flex-wrap: wrap; }
.viewer .hud.tl { top: 14px; left: 14px; } .viewer .hud.tr { top: 14px; right: 14px; } .viewer .hud.bl { bottom: 14px; left: 14px; } .viewer .hud.br { bottom: 14px; right: 14px; }
.glass-panel { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line-2); border-radius: 14px; }
.viewer .panel { position: absolute; top: 14px; right: 14px; width: min(340px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow-y: auto; padding: 18px; }
.viewer .loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(5, 6, 8, 0.6); }
.tool.active { border-color: var(--gold); color: var(--gold-2); }
.label3d { position: absolute; transform: translate(-50%, -120%); padding: 4px 9px; border-radius: 8px; font: 500 11.5px var(--mono); white-space: nowrap; pointer-events: none; background: rgba(7, 8, 11, 0.85); border: 1px solid var(--gold); color: var(--gold-2); }
.label3d.note { border-color: var(--steel); color: var(--steel-2); pointer-events: auto; cursor: pointer; font-family: var(--font); max-width: 220px; white-space: normal; }

.camera { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #000; border: 1px solid var(--line); aspect-ratio: 4 / 3; max-height: 72vh; width: 100%; }
.camera video, .camera canvas.shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.camera canvas.overlay { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; touch-action: none; cursor: crosshair; }
.camera .reticle { position: absolute; inset: 0; pointer-events: none; display: grid; place-items: center; }
.camera .reticle::before { content: ""; width: 64%; height: 64%; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 8px; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.12); }
.camera .controls { position: absolute; z-index: 2; left: 0; right: 0; bottom: 18px; display: flex; justify-content: center; align-items: center; gap: 22px; }
.shutter { width: 68px; height: 68px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.85); background: transparent; display: grid; place-items: center; cursor: pointer; }
.shutter::after { content: ""; width: 54px; height: 54px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.shutter:active::after { transform: scale(0.9); background: var(--gold-2); }

/* ---------------------------------------------------------------- auth */
.auth { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.auth .hero { position: relative; overflow: hidden; border-right: 1px solid var(--line); background: #000; }
.auth .hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 40%; opacity: 0.95; }
/* La imagen ya trae el logotipo: sin textos encima, solo un fundido hacia el panel. */
.auth .hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, transparent 70%, var(--bg)), linear-gradient(transparent 80%, rgba(0, 0, 0, 0.6)); }
.auth .brand-mobile { display: none; }
.auth .panel { display: grid; place-items: center; padding: 48px 24px; }
.auth form { width: 100%; max-width: 400px; }
.auth .switch { margin-top: 22px; text-align: center; font-size: 13.5px; color: var(--text-2); }
.auth .switch a { color: var(--gold-2); }
.auth .forgot { align-self: flex-end; font-size: 12.5px; color: var(--gold-2); }
.auth .auth-card { width: 100%; max-width: 400px; }
.auth .notice-ok { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--text-2); padding: 14px 16px; border: 1px solid color-mix(in srgb, var(--ok) 40%, transparent); border-radius: 10px; }
.auth .notice-ok svg { flex: none; color: var(--ok); margin-top: 2px; }
.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.strength i { height: 3px; border-radius: 3px; background: var(--line-2); transition: background 0.3s; }
.strength.s1 i:nth-child(-n+1) { background: var(--danger); }
.strength.s2 i:nth-child(-n+2) { background: var(--warn); }
.strength.s3 i:nth-child(-n+3) { background: var(--steel); }
.strength.s4 i { background: var(--ok); }
.pw { position: relative; }
.pw .btn { position: absolute; right: 4px; top: 4px; height: 34px; }

/* ---------------------------------------------------------------- overlays */
.modal-back { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; background: rgba(3, 4, 6, 0.72); backdrop-filter: blur(6px); animation: fade 0.2s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; animation: pop 0.28s var(--ease); }
.modal.wide { width: min(980px, 100%); }
.modal .card-head h2 { font-size: 19px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px 22px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
.drawer { position: fixed; z-index: 55; top: 70px; right: 20px; width: min(400px, calc(100vw - 40px)); max-height: calc(100vh - 90px); overflow-y: auto; animation: pop 0.22s var(--ease); }
.toasts { position: fixed; z-index: 80; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 13.5px; animation: pop 0.25s var(--ease); }
.toast.error { border-color: color-mix(in srgb, var(--danger) 50%, transparent); }
.toast.ok svg { color: var(--ok); } .toast.error svg { color: var(--danger); }
.toast svg { width: 17px; height: 17px; flex: none; }
.notif { display: grid; grid-template-columns: 8px 1fr; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif:hover { background: var(--glass); }
.notif i { width: 7px; height: 7px; border-radius: 50%; margin-top: 7px; background: transparent; }
.notif.unread i { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.notif b { font-weight: 500; font-size: 13.5px; }
.notif p { font-size: 12.5px; color: var(--text-2); margin-top: 2px; }
.badge-count { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: #111; font: 700 9.5px/16px var(--font); text-align: center; }
.rel { position: relative; }
.skeleton { border-radius: 10px; background: linear-gradient(90deg, var(--glass) 0%, var(--glass-2) 50%, var(--glass) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.mobile-nav { display: none; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1200px) {
  .chat { grid-template-columns: 220px minmax(0, 1fr); }
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
.history-toggle { display: none; }
@media (max-width: 1100px) {
  .chat { grid-template-columns: 1fr; position: relative; }
  .chat .list-card { display: none !important; }
  .history-toggle { display: inline-flex; }
  .chat.show-list .list-card { display: flex !important; position: absolute; z-index: 5; inset: 56px 8px auto; max-height: 70%; isolation: isolate; background: var(--panel-2); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9); animation: pop 0.22s var(--ease); }
  .chat.show-list .thread .messages, .chat.show-list .thread .composer { opacity: 0.25; filter: blur(2px); pointer-events: none; transition: opacity 0.2s, filter 0.2s; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 22px 16px 110px; }
  .topbar { padding: 0 16px; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 64px - 22px - 110px); }
  .auth { grid-template-columns: 1fr; }
  /* Móvil: en lugar de recortar la imagen (y sus letras), una cabecera de marca limpia. */
  .auth .hero { min-height: 0; padding: 44px 24px 30px; border-right: 0; border-bottom: 0; background: radial-gradient(60% 80% at 50% 30%, rgba(214, 164, 108, 0.12), transparent 70%), var(--bg); }
  .auth .hero > img { display: none; }
  .auth .hero::after { background: linear-gradient(var(--line), var(--line)) bottom / 60% 1px no-repeat; left: 20%; right: 20%; }
  .auth .brand-mobile { display: grid; justify-items: center; gap: 10px; text-align: center; }
  .auth .hero .brand-mobile img { position: static; inset: auto; object-fit: contain; opacity: 1; width: 84px; height: 84px; mix-blend-mode: screen; filter: drop-shadow(0 0 24px rgba(214, 164, 108, 0.35)); animation: splash-reveal 0.9s var(--ease-out) both; }
  .auth .brand-mobile .wordmark { font: 300 34px/1 var(--display); letter-spacing: -0.02em; }
  .auth .brand-mobile .eyebrow { font-size: 9px; letter-spacing: 0.34em; }
  .mobile-nav {
    position: fixed; z-index: 40; left: 12px; right: 12px; bottom: 12px;
    display: grid; grid-template-columns: repeat(5, 1fr);
    padding: 6px; border-radius: 18px;
    background: color-mix(in srgb, var(--panel) 88%, transparent); backdrop-filter: blur(16px);
    border: 1px solid var(--line-2); box-shadow: var(--shadow);
  }
  .mobile-nav a { display: grid; justify-items: center; gap: 3px; padding: 7px 0; border-radius: 12px; color: var(--text-3); font-size: 10.5px; }
  .mobile-nav a svg { width: 20px; height: 20px; }
  .mobile-nav a.active { color: var(--gold-2); background: var(--glass-2); }
  .viewer { height: 64vh; }
  .search kbd { display: none; }
}
@media (max-width: 640px) {
  .topbar { gap: 6px; }
  .search { min-width: 0; padding: 0 10px; }
  #theme-toggle { display: none; }
  .kpi .val { font-size: 28px; }
  .kpi .eyebrow { letter-spacing: 0.2em; }
  .g2, .g3, .g4, .g5, .form-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .page-head { margin-bottom: 20px; }
  .card.pad, .card-body { padding: 18px; }
  .card-head { padding: 16px 18px; }
  .kanban { grid-template-columns: repeat(4, 82vw); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------- movimiento */
/* Onda al pulsar: nace donde se toca y se desvanece. */
.btn, .chip, .nav a, .mobile-nav a, .tabs a, .tabs button { position: relative; overflow: hidden; isolation: isolate; }
.ripple { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; transform: scale(0); opacity: 0.55;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold-2) 55%, transparent) 0%, transparent 70%);
  animation: ripple var(--dur-3) var(--ease-out) forwards; }
.btn.primary .ripple { background: radial-gradient(circle, rgba(255, 255, 255, 0.65) 0%, transparent 70%); }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
/* Entrada escalonada: cada tarjeta llega un instante después de la anterior. */
.enter { animation: enter var(--dur-3) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes enter { from { opacity: 0; transform: translateY(12px) scale(0.985); } }
/* Cambio de sección: la vista anterior se desvanece hacia arriba antes de que entre la nueva. */
.content.leaving { opacity: 0; transform: translateY(-6px); filter: blur(2px); transition: opacity var(--dur-1) ease, transform var(--dur-1) ease, filter var(--dur-1) ease; }
/* Indicador del menú lateral que se desliza a la sección activa. */
.nav { position: relative; }
.nav-pill { position: absolute; left: 0; right: 0; top: 0; height: 0; border-radius: 10px; background: var(--glass-2); box-shadow: inset 0 0 0 1px var(--line); pointer-events: none; opacity: 0;
  transition: transform var(--dur-2) var(--ease-out), height var(--dur-2) var(--ease-out), opacity var(--dur-1); }
.nav-pill::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--gold); box-shadow: 0 0 12px var(--gold); }
.nav.has-pill a.active { background: transparent; }
.nav.has-pill a.active::before { display: none; }
.nav a > * { position: relative; }
/* Barra móvil: el ícono activo se eleva con un rebote corto y un punto dorado lo marca. */
.mobile-nav a svg { transition: transform var(--dur-2) var(--ease-spring), color var(--dur-1); }
.mobile-nav a.active svg { transform: translateY(-2px) scale(1.12); }
.mobile-nav a::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); opacity: 0; transform: scale(0); transition: transform var(--dur-2) var(--ease-spring), opacity var(--dur-1); }
.mobile-nav a.active::after { opacity: 1; transform: scale(1); }
/* Tarjetas: al presionarlas se hunden un poco, como un botón físico. */
.card.hover:active { transform: translateY(0) scale(0.992); transition-duration: var(--dur-1); }
.chip:active { transform: scale(0.96); }
.chip { transition: color 0.15s, border-color 0.15s, transform var(--dur-1) var(--ease-out), background 0.15s; }
/* Brillo que sigue al cursor en las tarjetas clicables (solo con ratón). */
@media (hover: hover) {
  .card.hover:not(.featured)::before { content: ""; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none; opacity: 0;
    background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--gold) 12%, transparent), transparent 65%);
    transition: opacity var(--dur-2); }
  .card.hover:hover::before { opacity: 1; }
  .card.hover:not(.featured) > * { position: relative; z-index: 1; }
}
/* Barras de progreso: crecen desde la izquierda al aparecer. */
.progress > i { transform-origin: left center; animation: bar-grow 0.9s var(--ease-out) both; animation-delay: 0.15s; }
@keyframes bar-grow { from { transform: scaleX(0); } }
/* Anillos de avance: el arco se dibuja de 0 al valor (requiere @property para animar --p). */
@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }
.ring { animation: ring-fill 1.1s var(--ease-out) both; animation-delay: 0.1s; }
@keyframes ring-fill { from { --p: 0; } }
/* Avisos: entran desde la derecha, muestran el tiempo que les queda y salen deslizándose. */
.toast { position: relative; overflow: hidden; animation: toast-in var(--dur-2) var(--ease-out); }
.toast.out { animation: toast-out var(--dur-2) ease forwards; }
.toast .toast-timer { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; transform-origin: left; background: linear-gradient(90deg, var(--gold), var(--gold-2)); opacity: 0.7; animation: toast-timer linear forwards; }
.toast.error .toast-timer { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
@keyframes toast-timer { to { transform: scaleX(0); } }
/* Diálogos y paneles: también se van con animación, no desaparecen de golpe. */
.modal-back.closing { animation: fade-out var(--dur-2) ease forwards; }
.modal-back.closing .modal { animation: pop-out var(--dur-2) ease forwards; }
.drawer.closing, .menu.closing { animation: pop-out var(--dur-1) ease forwards; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes pop-out { to { opacity: 0; transform: translateY(8px) scale(0.98); } }
/* Pantalla de carga: el logo se revela de abajo hacia arriba con un destello dorado. */
@keyframes splash-reveal { from { clip-path: inset(100% 0 0 0); filter: drop-shadow(0 0 0 transparent) brightness(1.6); transform: translateY(8px); } }
/* Acceso: la imagen respira despacio y el formulario entra campo por campo. */
.auth .hero img { animation: hero-drift 18s ease-in-out infinite alternate; transform-origin: 50% 40%; }
@keyframes hero-drift { from { transform: scale(1); } to { transform: scale(1.06) translateY(-1%); } }
.auth .panel > * { animation: enter var(--dur-3) var(--ease-out) both; }
/* Chat: tus mensajes entran desde la derecha y los de CIVIA desde la izquierda. */
.msg.user { animation: msg-right var(--dur-2) var(--ease-out); }
.msg.ai, .msg.live { animation: msg-left var(--dur-2) var(--ease-out); }
@keyframes msg-right { from { opacity: 0; transform: translateX(14px); } }
@keyframes msg-left { from { opacity: 0; transform: translateX(-10px); } }
/* Indicador de escritura: los puntos suben en ola en lugar de solo parpadear. */
.typing i { animation: typing-wave 1.1s var(--ease) infinite; }
.typing i:nth-child(2) { animation-delay: 0.14s; } .typing i:nth-child(3) { animation-delay: 0.28s; }
@keyframes typing-wave { 0%, 60%, 100% { transform: translateY(0); opacity: 0.35; } 30% { transform: translateY(-4px); opacity: 1; } }
/* Volver al final del chat: aparece al subir a leer. */
.chat .thread { position: relative; }
.to-latest { position: absolute; left: 50%; bottom: 128px; z-index: 3; transform: translateX(-50%); border-radius: 50%; background: var(--panel-2); box-shadow: var(--shadow); animation: pop var(--dur-2) var(--ease-spring); }
/* Cambio de tema: el nuevo tema se revela en círculo desde el botón (View Transitions). */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
/* Barra superior: gana sombra y una línea dorada tenue cuando la página se desplaza. */
.topbar { transition: box-shadow var(--dur-2), border-color var(--dur-2); }
.topbar.scrolled { box-shadow: 0 12px 30px -18px rgba(0, 0, 0, 0.9); border-bottom-color: color-mix(in srgb, var(--gold) 22%, var(--line)); }
/* Esqueleto genérico mientras carga una sección lenta. */
.view-skeleton { display: grid; gap: 18px; }
.view-skeleton .sk-title { height: 44px; width: min(420px, 70%); }
.view-skeleton .sk-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.view-skeleton .sk-card { height: 150px; border-radius: var(--radius-lg); }
/* Foco con teclado: el anillo dorado aparece con un pulso breve. */
:focus-visible { animation: focus-pulse var(--dur-2) var(--ease-out); }
@keyframes focus-pulse { from { outline-offset: 6px; outline-color: transparent; } }
/* Pestañas: la activa cambia con un fundido suave y un leve escalado. */
.tabs button, .tabs a { transition: background var(--dur-2) var(--ease-out), color var(--dur-1), box-shadow var(--dur-2), transform var(--dur-1); }
.tabs .active { animation: tab-on var(--dur-2) var(--ease-out); }
@keyframes tab-on { from { transform: scale(0.96); } }
/* Estados vacíos: el ícono flota despacio para que la pantalla no se sienta muerta. */
.empty svg.big, .empty.welcome img { animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-6px); } }
/* Campos: el borde dorado y el halo aparecen con transición. */
.input, select.input, textarea.input { transition: border-color var(--dur-2), box-shadow var(--dur-2), background var(--dur-2); }
.input:focus { background: color-mix(in srgb, var(--bg) 45%, transparent); }
/* Glosario: las letras reaccionan al pasar y la elegida rebota. */
.alpha button { transition: border-color var(--dur-1), color var(--dur-1), transform var(--dur-1) var(--ease-out); }
.alpha button:hover { transform: translateY(-2px); }
.alpha button.active { animation: tab-on var(--dur-2) var(--ease-spring); }
/* Kanban: la tarjeta que se arrastra se eleva y gira un poco, como papel. */
.task:active { cursor: grabbing; }
.task.dragging, .task[aria-grabbed="true"] { transform: rotate(-1.5deg) scale(1.02); box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.9); border-color: color-mix(in srgb, var(--gold) 50%, transparent); }
/* Desplazamiento suave para saltos dentro de la página. */
html { scroll-behavior: smooth; }
/* Portadas de proyecto: el alzado se dibuja trazo a trazo, como un plano que se traza. */
.cover svg .lines path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease-out) forwards; animation-delay: calc(var(--d, 0) * 70ms + 0.15s); }
@keyframes draw { to { stroke-dashoffset: 0; } }
/* Aparición al desplazarse: el contenido largo se revela a medida que llega a la pantalla. */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); }
.reveal.shown { opacity: 1; transform: none; }
/* Perfil: resumen de uso del Copilot. */
.usage .usage-val { margin-top: 8px; font: 300 26px/1 var(--display); letter-spacing: -0.02em; }

/* ---------------------------------------------------------------- acceso (rediseño) */
.auth .panel { position: relative; background: radial-gradient(70% 50% at 50% 0%, rgba(214, 164, 108, 0.06), transparent 70%); }
.auth .auth-card { position: relative; width: 100%; max-width: 440px; padding: 34px 32px 28px; border-radius: 26px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.01)), color-mix(in srgb, var(--panel) 88%, transparent);
  backdrop-filter: blur(18px); box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.05); }
.auth .auth-card::before { content: ""; position: absolute; top: -1px; left: 18%; right: 18%; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.8; }
.auth .auth-card h1 { font-size: clamp(28px, 3vw, 36px); }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; margin-bottom: 26px; border-radius: 13px; border: 1px solid var(--line); background: var(--glass); }
.seg a { position: relative; z-index: 1; height: 36px; display: grid; place-items: center; border-radius: 10px; font-size: 13px; font-weight: 500; color: var(--text-2); transition: color var(--dur-2); }
.seg a.active { color: var(--text); }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--panel-2); box-shadow: inset 0 0 0 1px var(--line-2), 0 6px 16px -8px rgba(0, 0, 0, 0.8); transition: transform var(--dur-2) var(--ease-out); }
.seg-pill.right { transform: translateX(100%); }
@media (max-width: 960px) {
  .auth .panel { padding: 8px 16px 40px; align-items: start; }
  .auth .auth-card { padding: 26px 20px 22px; border-radius: 22px; }
}
/* Campos con ícono y estado de validación. */
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .input { padding-left: 40px; padding-right: 38px; }
.input-wrap.pw .input { padding-right: 76px; }
.input-wrap svg.lead { position: absolute; left: 13px; width: 17px; height: 17px; color: var(--text-3); pointer-events: none; transition: color var(--dur-2); }
.input-wrap:focus-within svg.lead { color: var(--gold); }
.input-wrap .state { position: absolute; right: 12px; width: 18px; height: 18px; display: grid; place-items: center; border-radius: 50%; font: 700 11px/1 var(--font); opacity: 0; transform: scale(0.4); transition: opacity var(--dur-1), transform var(--dur-2) var(--ease-spring); pointer-events: none; }
.input-wrap.pw .state { right: 44px; }
.input-wrap.pw .btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); height: 34px; }
.field-msg { min-height: 0; font-size: 12px; line-height: 1.4; color: var(--text-3); overflow: hidden; transition: color var(--dur-1); }
.field-msg:empty { display: none; }
.field.valid .input { border-color: color-mix(in srgb, var(--ok) 55%, transparent); }
.field.valid .state { opacity: 1; transform: none; background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.field.valid .state::before { content: "✓"; }
.field.invalid .input { border-color: color-mix(in srgb, var(--danger) 65%, transparent); }
.field.invalid .input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 16%, transparent); }
.field.invalid .state { opacity: 1; transform: none; background: color-mix(in srgb, var(--danger) 18%, transparent); color: var(--danger); }
.field.invalid .state::before { content: "!"; }
.field.invalid .field-msg { color: var(--danger); animation: shake 0.32s var(--ease-out); }
.field.warn .field-msg { color: var(--warn); }
@keyframes shake { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }
.link-btn { padding: 0; border: 0; background: none; color: var(--gold-2); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.field-msg a { color: var(--gold-2); text-decoration: underline; }
/* Requisitos de la contraseña: se marcan en vivo. */
.pw-checks { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; font-size: 12px; color: var(--text-3); }
.pw-checks li { display: flex; align-items: center; gap: 8px; transition: color var(--dur-2); }
.pw-checks li::before { content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); transition: background var(--dur-2), border-color var(--dur-2), transform var(--dur-2) var(--ease-spring); }
.pw-checks li.ok { color: var(--text-2); }
.pw-checks li.ok::before { border-color: var(--ok); transform: scale(1.05); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23101317' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7'/%3E%3C/svg%3E") center / 10px no-repeat; }
.caps { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--warn); animation: enter var(--dur-2) var(--ease-out); }
.caps[hidden] { display: none; }
.caps svg { width: 13px; height: 13px; }

/* Aviso mientras la API despierta (plan gratuito de Render). */
.wake-banner { position: fixed; z-index: 90; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 13px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text); font-size: 13.5px; line-height: 1.4; animation: wake-in var(--dur-2) var(--ease-out); }
@keyframes wake-in { from { opacity: 0; transform: translate(-50%, -8px); } }
.wake-banner[hidden] { display: none; }
.wake-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 var(--gold-glow); animation: wake-pulse 1.4s ease-in-out infinite; }
@keyframes wake-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--gold-glow); } 50% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .wake-banner, .wake-dot { animation: none; } }

/* ================================================================ Interfaz 2.0 */

/* ---- Distribución: todo centrado y sin desbordes laterales, en PC y en móvil */
.shell, .main, .content { min-width: 0; }
.main { overflow-x: clip; }
.content { max-width: 1560px; padding: 30px clamp(16px, 3vw, 44px) 80px; }
.content > * { max-width: 100%; }
img, video, canvas, iframe, table { max-width: 100%; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- Efectos */
.lift { transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s; }
@media (hover: hover) {
  .lift:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--gold) 35%, transparent); box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9), 0 0 0 1px color-mix(in srgb, var(--gold) 12%, transparent), 0 0 40px -14px var(--gold-glow); }
}
.sheen { position: relative; overflow: hidden; }
.sheen::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.22), transparent); transform: translateX(-120%); animation: sheen 3.6s ease-in-out 1.2s infinite; pointer-events: none; }
@keyframes sheen { 60%, 100% { transform: translateX(260%); } }
@keyframes drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(36px, -28px) scale(1.08); } }
@keyframes draw-line { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

/* ---- Inicio */
.hero-banner { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px 28px; padding: clamp(22px, 3vw, 36px); margin-bottom: 20px; border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(135deg, rgba(214, 164, 108, 0.11), color-mix(in srgb, var(--panel) 70%, transparent) 46%, rgba(159, 178, 211, 0.08)); }
.hero-banner::before { content: ""; position: absolute; top: -200px; right: -140px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, var(--gold-glow), transparent 62%); animation: drift 18s ease-in-out infinite; pointer-events: none; }
.hero-banner-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--glass-2) 1px, transparent 1px), linear-gradient(90deg, var(--glass-2) 1px, transparent 1px); background-size: 36px 36px; mask-image: radial-gradient(ellipse at 80% 20%, #000 8%, transparent 70%); pointer-events: none; }
.hero-banner-copy { position: relative; min-width: 0; max-width: 640px; }
.hero-banner-copy h1 { margin: 12px 0 8px; font-size: clamp(30px, 4vw, 48px); }
.hero-banner-actions { position: relative; display: flex; gap: 10px; flex-wrap: wrap; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi2 { display: block; color: inherit; }
.kpi2 .eyebrow { padding-right: 0; }
.kpi2-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi2-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--gold); background: var(--glass); }
.kpi2-ico svg { width: 17px; height: 17px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; padding: 18px; }
.project-grid .project-card .cover { height: 120px; }
.project-grid .project-card h3 { font-size: 15px; }
.cover-pill { position: absolute; top: 12px; left: 12px; z-index: 1; }
.timeline .tl-item { position: relative; display: grid; grid-template-columns: 12px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.timeline .tl-item:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 24px; bottom: -6px; width: 1px; background: var(--line); }
.timeline .tl-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold-glow); }
.timeline .tl-text { font-size: 13.5px; }
.copilot-card { padding: 22px; border-color: color-mix(in srgb, var(--steel) 22%, transparent); background: linear-gradient(180deg, rgba(159, 178, 211, 0.08), transparent 60%), var(--panel); }
.ai-badge { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: var(--ai); color: #0b0d11; }
.ai-badge svg { width: 16px; height: 16px; }
.ask-row { display: flex; gap: 8px; }
.ask-row .input { flex: 1; min-width: 0; }

/* ---- Acceso */
.auth .hero { background: radial-gradient(ellipse at 30% 20%, #1a2030, #0a0c10 70%); }
.auth .hero::after { display: none; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(159, 178, 211, 0.07) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 178, 211, 0.07) 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(ellipse at 50% 45%, #000 35%, transparent 80%); }
.hero-glow { position: absolute; top: -160px; left: -120px; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(214, 164, 108, 0.16), transparent 62%); animation: drift 20s ease-in-out infinite; }
.hero-brand { position: absolute; top: 34px; left: 40px; z-index: 2; display: flex; align-items: center; gap: 12px; font: 300 22px/1 var(--display); letter-spacing: -0.01em; }
.auth .hero .hero-brand img { position: static; inset: auto; width: 40px; height: 40px; object-fit: contain; opacity: 1; mix-blend-mode: screen; animation: none; }
@keyframes fade { from { opacity: 0; } }
/* Escena de arquitectura del acceso (bucle de 14 s). */
.auth-scene { position: absolute; left: 50%; top: 44%; width: min(84%, 640px); height: auto; aspect-ratio: 1; transform: translate(-50%, -50%); overflow: visible; fill: none; animation: scene-float 9s ease-in-out infinite; }
@keyframes scene-float { 0%, 100% { transform: translate(-50%, -50%); } 50% { transform: translate(-50%, calc(-50% - 10px)); } }
.auth-scene .ground line { stroke: rgba(214, 164, 108, 0.16); stroke-width: 0.8; stroke-dasharray: 3 5; }
.auth-scene .lot { stroke: #d6a46c; stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; animation: lot-draw 14s cubic-bezier(.65, 0, .35, 1) infinite; }
@keyframes lot-draw { 0% { stroke-dashoffset: 1; opacity: 1; } 12%, 86% { stroke-dashoffset: 0; opacity: 1; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.auth-scene .face.l { fill: url(#as-l); stroke: rgba(200, 212, 234, 0.35); stroke-width: 0.6; }
.auth-scene .face.r { fill: url(#as-r); stroke: rgba(200, 212, 234, 0.25); stroke-width: 0.6; }
.auth-scene .face.dim { opacity: 0.55; }
.auth-scene .roof { fill: #e9e6df; fill-opacity: 0.85; stroke: #f2cf9f; stroke-width: 0.8; }
.auth-scene .roof.dim { fill-opacity: 0.25; stroke: rgba(242, 207, 159, 0.4); }
.auth-scene .slab { stroke: #e9e6df; stroke-width: 1.2; stroke-opacity: 0.8; }
.auth-scene .floor { transform-box: fill-box; }
.auth-scene .win { fill: #ffe2bb; opacity: 0.15; animation: win-light 4.2s ease-in-out infinite; }
.auth-scene .win.r { fill: #f2cf9f; }
.auth-scene .win.dim { animation-duration: 5.6s; }
@keyframes win-light { 0%, 100% { opacity: 0.12; } 45%, 60% { opacity: 0.85; } }
.auth-scene .nb { animation: fade 1.6s ease both; }
.auth-scene .nb.b { animation-delay: 0.3s; } .auth-scene .nb.c { animation-delay: 0.6s; }
.auth-scene .mast { stroke: #d6a46c; stroke-width: 2; stroke-linecap: round; }
.auth-scene .lattice { stroke: rgba(214, 164, 108, 0.6); stroke-width: 0.8; }
.auth-scene .counter { fill: #d6a46c; fill-opacity: 0.7; }
.auth-scene .cable { stroke: rgba(236, 238, 242, 0.55); stroke-width: 0.8; }
.auth-scene .load { fill: #9fb2d3; fill-opacity: 0.8; }
.auth-scene .jib { transform-box: view-box; animation: jib-swing 14s ease-in-out infinite; }
@keyframes jib-swing { 0%, 100% { transform: rotate(-8deg); } 50% { transform: rotate(14deg); } }
.auth-scene .hook { transform-box: view-box; animation: hook-sway 3.5s ease-in-out infinite; }
@keyframes hook-sway { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.auth-scene .sun { animation: sun-pulse 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes sun-pulse { 0%, 100% { opacity: 0.85; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
.auth-scene .beam { animation: beam-sweep 9s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes beam-sweep { 0% { transform: translateX(-160px); opacity: 0; } 20% { opacity: 1; } 70% { opacity: 1; } 100% { transform: translateX(760px); opacity: 0; } }
.auth-scene .dim-line line { stroke: rgba(236, 238, 242, 0.5); stroke-width: 0.8; }
.auth-scene .dim-line line:first-child { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dim-draw 14s ease infinite; }
@keyframes dim-draw { 0%, 45% { stroke-dashoffset: 1; } 60%, 86% { stroke-dashoffset: 0; } 96%, 100% { stroke-dashoffset: 0; opacity: 0; } }
.auth-scene .tag { opacity: 0; animation: tag-in 14s ease infinite; }
.auth-scene .tag rect { fill: rgba(7, 8, 11, 0.8); stroke: rgba(214, 164, 108, 0.45); stroke-width: 0.8; }
.auth-scene .tag text { fill: #f2cf9f; font: 500 9.5px var(--mono); letter-spacing: 0.04em; }
@keyframes tag-in { 0% { opacity: 0; transform: translateY(6px); } 6%, 30% { opacity: 1; transform: none; } 38%, 100% { opacity: 0; } }
.hero-copy { position: absolute; left: 40px; right: 40px; bottom: 40px; z-index: 2; animation: enter var(--dur-3) var(--ease-out) 0.4s both; }
.hero-copy h2 { margin-top: 12px; max-width: 520px; font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; }
.hero-points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.hero-points li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 99px; font-size: 12.5px; color: var(--text-2); border: 1px solid var(--line-2); background: rgba(7, 8, 11, 0.55); backdrop-filter: blur(8px); }
.hero-points svg { width: 14px; height: 14px; color: var(--gold); }
.auth .panel { background: radial-gradient(70% 50% at 50% 0%, rgba(214, 164, 108, 0.08), transparent 70%), radial-gradient(60% 40% at 50% 100%, rgba(159, 178, 211, 0.06), transparent 70%); }
.auth .auth-card { box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(214, 164, 108, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.06); }
.auth .auth-card::after { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, rgba(214, 164, 108, 0.55) 80%, transparent 90%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: orbit 7s linear infinite; }
@property --angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes orbit { to { --angle: 360deg; } }
.auth .btn.primary.lg { position: relative; overflow: hidden; }
.auth .btn.primary.lg::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.3), transparent); transform: translateX(-120%); animation: sheen 4s ease-in-out 1.5s infinite; }

/* ---- Intro tras iniciar sesión */
.intro-open, .intro-open body { overflow: hidden; }
.intro { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; overflow: hidden auto; color: var(--text);
  background: radial-gradient(ellipse at 50% 110%, #1b2232 0%, #0a0d14 45%, #05060a 80%); animation: fade 0.4s ease both; }
.intro.out { opacity: 0; transform: scale(1.04); filter: blur(6px); transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease; pointer-events: none; }
.intro-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(159, 178, 211, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 178, 211, 0.06) 1px, transparent 1px), linear-gradient(rgba(159, 178, 211, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 178, 211, 0.035) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px; mask-image: radial-gradient(ellipse at 50% 50%, #000 30%, transparent 75%); animation: intro-grid 1.6s var(--ease-out) both; }
@keyframes intro-grid { from { opacity: 0; transform: scale(1.08); } }
.intro-top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px clamp(16px, 3vw, 40px); }
.intro-meta { font: 400 11px var(--mono); letter-spacing: 0.08em; color: var(--text-3); }
.intro-skip { font: inherit; font-size: 12.5px; color: var(--text-2); padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--glass); cursor: pointer; transition: background 0.2s, color 0.2s; }
.intro-skip:hover { background: var(--glass-2); color: var(--text); }
.intro-stage { position: relative; z-index: 1; display: flex; justify-content: center; padding: 0 12px; }
.intro-art { width: min(92vw, 860px); height: auto; overflow: visible; fill: none; }
.intro-art path, .intro-art line.ln { stroke-width: 1; }
.intro-art text { font: 400 10px var(--mono); fill: var(--text-3); }
.intro-art .ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-line 1.6s cubic-bezier(0.65, 0, 0.35, 1) both; }
.intro-art .fl { transform-box: fill-box; transform-origin: bottom; animation: intro-grow 0.5s var(--ease-out) both; }
@keyframes intro-grow { from { transform: scaleY(0); opacity: 0; } }
.intro-art .sun { animation: intro-sun 2.2s var(--ease-out) 2.3s both; }
@keyframes intro-sun { from { transform: translate(-60px, 120px); opacity: 0; } }
.intro-art .shadow { transform-box: fill-box; transform-origin: left bottom; animation: intro-shadow 2s var(--ease-out) 2.7s both; }
@keyframes intro-shadow { from { transform: skewX(-35deg) translateX(-160px); opacity: 0; } to { transform: skewX(-35deg); opacity: 0.5; } }
.intro .up { animation: enter 0.9s var(--ease-out) both; }
.intro-copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 12px 20px 36px; }
.intro-logo { font: 300 clamp(30px, 4vw, 46px)/1 var(--display); letter-spacing: 0.38em; padding-left: 0.38em; background: linear-gradient(180deg, #fff, #d9dee6 45%, #8e97a6); -webkit-background-clip: text; background-clip: text; color: transparent; animation: intro-logo 1.4s var(--ease-out) 2.9s both; }
@keyframes intro-logo { from { opacity: 0; letter-spacing: 0.9em; filter: blur(8px); } }
.intro-copy p { color: var(--text-2); font-size: 15px; }
.intro-progress { width: min(420px, 86vw); height: 2px; border-radius: 2px; background: var(--line); overflow: hidden; margin-top: 6px; }
.intro-progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); box-shadow: 0 0 12px var(--gold); animation: intro-bar 4.6s cubic-bezier(0.45, 0, 0.2, 1) 0.8s both; }
@keyframes intro-bar { from { width: 0; } to { width: 100%; } }
.intro-steps { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: 12px; color: var(--text-2); }
.intro-steps li { animation: fade 0.4s ease both; }
.intro-steps li::before { content: "✓ "; color: var(--ok); }
.intro-go { margin-top: 12px; }
.intro.reduced *, .intro.reduced *::before { animation-duration: 0.01s !important; animation-delay: 0s !important; }

/* ---- Aviso de versión nueva */
.update-banner { position: fixed; z-index: 95; left: 50%; bottom: 22px; transform: translateX(-50%); width: min(620px, calc(100vw - 24px)); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: linear-gradient(90deg, rgba(214, 164, 108, 0.16), var(--panel-2) 60%); box-shadow: var(--shadow); animation: update-in 0.5s var(--ease-out) both; }
@keyframes update-in { from { opacity: 0; transform: translate(-50%, 16px); } }
.update-banner > div { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; font-size: 12.5px; color: var(--text-2); }
.update-banner b { color: var(--text); font-size: 13.5px; }
.update-ico { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(214, 164, 108, 0.2); color: var(--gold-2); }
.update-ico svg { width: 16px; height: 16px; animation: spin 6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Formularios con validación profesional */
.project-form { display: flex; flex-direction: column; gap: 22px; }
.project-form fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.project-form legend { padding: 0; margin-bottom: 14px; font-size: 10px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.label-row .req { color: var(--gold); }
.counter { font-size: 10.5px; color: var(--text-3); transition: color 0.2s; }
.counter.near { color: var(--warn); }
.input-wrap.affixed .input { padding-left: 14px; }
.input-wrap.affixed .affix { flex: none; font-size: 12.5px; color: var(--text-3); white-space: nowrap; pointer-events: none; }
.input-wrap.affixed .affix.pre { position: absolute; left: 13px; }
.input-wrap.affixed .affix.pre ~ .input { padding-left: 30px; }
.input-wrap.affixed .affix.post { position: absolute; right: 38px; }
.input-wrap.affixed:has(.affix.post) .input { padding-right: 82px; }
.form-summary { padding: 12px 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); background: color-mix(in srgb, var(--danger) 9%, transparent); font-size: 13px; animation: shake 0.32s var(--ease-out); }
.form-summary b { color: color-mix(in srgb, var(--danger) 70%, var(--text)); }
.form-summary ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); }
.form-summary a { color: var(--gold-2); text-decoration: underline; text-underline-offset: 2px; }
.field.valid .field-msg { color: var(--text-2); }
.field.warn .input { border-color: color-mix(in srgb, var(--warn) 60%, transparent); }
.field.warn .state { opacity: 1; transform: none; background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.field.warn .state::before { content: "!"; }

/* ---- Volumetría */
.massing-form { gap: 14px; }
.floor-stepper { display: flex; gap: 8px; align-items: center; }
.floor-stepper .btn { width: 44px; height: 48px; font-size: 20px; flex: none; }
.floor-stepper .input { flex: 1; min-width: 0; height: 48px; text-align: center; font: 300 24px/1 var(--display); border-color: color-mix(in srgb, var(--gold) 45%, transparent); box-shadow: 0 0 0 4px rgba(214, 164, 108, 0.08); }
.massing-form input[type=range] { width: 100%; accent-color: var(--gold); }
.range-ends { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--text-3); }
.presets { gap: 6px; }
.notice { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 12.5px; }
.notice svg { width: 18px; height: 18px; margin-top: 1px; }
.notice b { display: block; font-size: 13px; margin-bottom: 2px; }
.notice p { margin: 0; color: var(--text-2); }
.notice.warn { border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); color: var(--warn); }
.notice.info { border: 1px solid color-mix(in srgb, var(--steel) 35%, transparent); background: color-mix(in srgb, var(--steel) 7%, transparent); color: var(--steel-2); }
.form-grid.compact { gap: 10px 12px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.metric-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.metric { padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--glass); min-width: 0; }
.metric .eyebrow { font-size: 9px; letter-spacing: 0.22em; }
.metric .display { margin-top: 6px; font-size: 20px; overflow-wrap: anywhere; }
.label3d.floor { border-color: rgba(200, 212, 234, 0.4); color: var(--steel-2); font-size: 10.5px; padding: 2px 7px; transform: translate(0, -50%); }

/* ---- Almacenamiento y caché */
.storage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.usage-bar { display: flex; gap: 2px; height: 12px; border-radius: 8px; overflow: hidden; background: var(--glass-2); }
.usage-bar i { display: block; height: 100%; background: var(--text-3); transform-origin: left; animation: grow-x 1.1s var(--ease-out) both; }
@keyframes grow-x { from { transform: scaleX(0); } }
.usage-bar i.gold, .legend i.gold { background: var(--gold); } .usage-bar i.steel, .legend i.steel { background: var(--steel); } .usage-bar i.ok, .legend i.ok { background: var(--ok); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; }
.legend li span { margin-left: auto; color: var(--text-3); }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--text-3); flex: none; }
.legend .faint { grid-column: 1 / -1; }
.toggle-row { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.toggle-row span { display: flex; flex-direction: column; font-size: 13.5px; }
.toggle-row small { font-size: 12px; color: var(--text-3); }
.toggle { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; margin: 0; border-radius: 99px; background: var(--line-2); position: relative; cursor: pointer; transition: background 0.25s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform 0.25s var(--ease-spring); }
.toggle:checked { background: var(--gold); }
.toggle:checked::after { transform: translateX(18px); background: #15110b; }
.file-tag { display: inline-block; margin-right: 10px; padding: 2px 6px; border-radius: 6px; font: 500 10px var(--mono); background: var(--glass-2); color: var(--text-2); }
.file-tag.gold { background: rgba(214, 164, 108, 0.16); color: var(--gold-2); } .file-tag.steel { background: rgba(159, 178, 211, 0.16); color: var(--steel-2); } .file-tag.ok { background: rgba(124, 198, 161, 0.14); color: var(--ok); }
.table.compact td, .table.compact th { padding: 8px 6px; }
.storage-card #st-files { border-top: 1px solid var(--line); }

/* ---- Responsive */
@media (max-width: 1100px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
  .content { padding: 18px 14px calc(100px + env(safe-area-inset-bottom)); }
  .mobile-nav { left: max(10px, env(safe-area-inset-left)); right: max(10px, env(safe-area-inset-right)); bottom: max(10px, env(safe-area-inset-bottom)); }
  .auth .hero { min-height: 0; }
  .hero-grid, .hero-glow, .hero-brand, .hero-copy { display: none; }
  .auth .hero .brand-mobile img { display: none; }
  .auth-scene { position: relative; left: auto; top: auto; display: block; width: min(78vw, 340px); margin: -10px auto -18px; transform: none; animation: none; }
  .auth .hero { background: radial-gradient(60% 80% at 50% 30%, rgba(214, 164, 108, 0.14), transparent 70%), var(--bg); }
  .auth .panel { padding: 6px 12px 32px; }
  .auth .auth-card { max-width: 520px; margin: 0 auto; }
  /* Visor en el teléfono: el modelo ocupa su propio espacio y los controles van debajo. */
  .viewer { height: min(62vh, 560px); min-height: 360px; }
  .viewer .hud.tl { top: 10px; left: 10px; right: 10px; justify-content: center; }
  .viewer .hud.bl { left: 10px; right: 10px; bottom: 10px; padding: 8px 12px !important; gap: 8px 12px !important; justify-content: space-between; }
  .viewer .hud.bl input[type=range] { flex: 1 1 90px; min-width: 70px; }
  #v-panel.below { position: static; width: 100%; max-height: none; overflow: visible; margin-top: 14px; padding: 18px; border-radius: var(--radius-lg); }
  .hero-banner { margin-bottom: 14px; }
  .hero-banner-actions, .hero-banner-actions .btn { width: 100%; }
  .hero-banner-actions .btn { justify-content: center; }
}
@media (max-width: 640px) {
  .viewer .form-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi-row > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .project-grid { padding: 12px; gap: 12px; }
  .metric-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .metric { padding: 10px; }
  .legend { grid-template-columns: 1fr; }
  .update-banner { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .intro-meta { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .sheen::after, .hero-banner::before, .hero-glow, .auth .auth-card::after, .auth .btn.primary.lg::after { animation: none; }
  .auth-scene, .auth-scene * { animation: none !important; }
  .auth-scene .floor, .auth-scene .roof, .auth-scene .tag { opacity: 1; }
  .auth-scene .lot, .auth-scene .dim-line line { stroke-dashoffset: 0; }
}

/* ---------------------------------------------------------------- acceso: texto cinético y pestañas */
/* Letras: suben, se enfocan y se iluminan una tras otra. */
.kinetic .kw { display: inline-block; white-space: nowrap; }
.kinetic .kc { display: inline-block; opacity: 0; transform: translateY(0.55em) rotateX(-70deg); filter: blur(6px); transform-origin: 50% 100%;
  animation: kc-in 0.75s cubic-bezier(.16, 1, .3, 1) both; animation-delay: calc(0.18s + var(--ci) * 0.028s); }
@keyframes kc-in { 60% { filter: blur(0); } to { opacity: 1; transform: none; filter: none; } }
.auth-card h1.kinetic, .hero-copy h2.kinetic { perspective: 600px; }

/* Etiqueta dorada: las letras entran abiertas y se cierran, con un destello que la recorre. */
.eyebrow.kinetic .kc { transform: translateX(-0.4em); filter: blur(3px); animation-name: kc-track; animation-duration: 0.6s; animation-delay: calc(0.05s + var(--ci) * 0.02s); }
@keyframes kc-track { to { opacity: 1; transform: none; filter: none; } }
.auth-card > .eyebrow.kinetic .kc, .hero-copy .eyebrow.kinetic .kc {
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 42%, #fff2dc 50%, var(--gold) 58%, var(--gold) 100%);
  background-size: 1200% 100%; background-position: calc(100% - var(--ci) * 4%) 0; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: kc-track 0.6s cubic-bezier(.16, 1, .3, 1) both, eyebrow-shine 5s ease-in-out infinite; animation-delay: calc(0.05s + var(--ci) * 0.02s), 1.4s; }
@keyframes eyebrow-shine { 0% { background-position: calc(100% - var(--ci) * 4%) 0; } 40%, 100% { background-position: calc(0% - var(--ci) * 4%) 0; } }

/* Palabra destacada: dorado y acero que fluyen dentro de las letras, con un leve resplandor. */
.fx-accent { position: relative; font-weight: 400; }
.fx-accent .kc { background: linear-gradient(100deg, #8e97a6 0%, #eceef2 18%, #f2cf9f 36%, #d6a46c 50%, #f2cf9f 64%, #c8d4ea 82%, #8e97a6 100%);
  background-size: 900% 100%; background-position: calc(var(--ci) * 7%) 0; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: kc-in 0.75s cubic-bezier(.16, 1, .3, 1) both, accent-flow 6s linear infinite; animation-delay: calc(0.18s + var(--ci) * 0.028s), 0s;
  filter: drop-shadow(0 0 14px rgba(214, 164, 108, 0.18)); }
@keyframes accent-flow { to { background-position: calc(var(--ci) * 7% + 100%) 0; } }
.fx-accent::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0.02em; height: 1.5px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold), var(--gold-2), transparent);
  transform: scaleX(0); transform-origin: left; animation: underline-in 0.9s cubic-bezier(.16, 1, .3, 1) 0.9s both; }
@keyframes underline-in { to { transform: scaleX(1); } }

/* Subtítulo y textos: aparecen suaves después del título. */
.auth-card > p.muted { animation: sub-in 0.8s ease 0.55s both; }
@keyframes sub-in { from { opacity: 0; transform: translateY(6px); filter: blur(3px); } }
.auth .field label { transition: color var(--dur-2), letter-spacing var(--dur-2); }
.auth .field:focus-within label { color: var(--gold-2); letter-spacing: 0.02em; }

/* Pestañas Iniciar sesión / Crear cuenta: la píldora viaja con un rebote, se estira al moverse y
   deja un destello dorado; el texto activo se vuelve dorado y el inactivo se atenúa. */
.seg { overflow: hidden; isolation: isolate; }
.seg::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(120px 40px at var(--gx, 25%) 50%, rgba(214, 164, 108, 0.12), transparent 70%); transition: --gx 0.6s; pointer-events: none; }
.seg.on-right::before { --gx: 75%; }
@property --gx { syntax: "<percentage>"; inherits: false; initial-value: 25%; }
.seg-pill { transition: transform 0.55s cubic-bezier(.34, 1.56, .64, 1); background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)), var(--panel-2);
  box-shadow: inset 0 0 0 1px rgba(214, 164, 108, 0.35), 0 8px 22px -10px rgba(214, 164, 108, 0.45), 0 6px 16px -8px rgba(0, 0, 0, 0.8); overflow: hidden; }
.seg-pill b { position: absolute; left: 12%; right: 12%; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold), var(--gold-2), var(--gold), transparent); box-shadow: 0 0 10px var(--gold); }
.seg-pill::after { content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -50%; background: linear-gradient(100deg, transparent, rgba(255, 242, 220, 0.22), transparent); }
.seg-pill.moving { animation: pill-stretch 0.55s cubic-bezier(.16, 1, .3, 1); }
.seg-pill.moving::after { animation: pill-sheen 0.7s ease 0.15s; }
@keyframes pill-stretch { 0% { scale: 1 1; } 35% { scale: 1.12 0.9; } 70% { scale: 0.97 1.03; } 100% { scale: 1 1; } }
@keyframes pill-sheen { to { left: 110%; } }
.seg a span { display: inline-block; transition: transform 0.45s cubic-bezier(.34, 1.56, .64, 1), color 0.3s, opacity 0.3s, letter-spacing 0.3s; }
.seg a:not(.active) span { opacity: 0.62; transform: scale(0.96); }
.seg a:not(.active):hover span { opacity: 1; transform: translateY(-1px); color: var(--gold-2); }
.seg a.active span { background: linear-gradient(180deg, #fff, #f2cf9f); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: 0.01em; animation: tab-pop 0.5s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes tab-pop { 0% { transform: scale(0.9); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }

/* El contenido del formulario entra desde el lado hacia el que se cambió. */
.auth-card.from-right > :not(.seg) { animation: from-right 0.6s cubic-bezier(.16, 1, .3, 1) both; }
.auth-card.from-left > :not(.seg) { animation: from-left 0.6s cubic-bezier(.16, 1, .3, 1) both; }
@keyframes from-right { from { opacity: 0; transform: translateX(34px); filter: blur(4px); } }
@keyframes from-left { from { opacity: 0; transform: translateX(-34px); filter: blur(4px); } }

/* Botón principal: el texto se ilumina al pasar el cursor. */
.auth .btn.primary.lg { letter-spacing: 0.01em; transition: letter-spacing 0.3s, filter 0.2s, box-shadow 0.25s; }
.auth .btn.primary.lg:hover { letter-spacing: 0.04em; }
.auth .btn.primary.lg svg { transition: transform 0.3s cubic-bezier(.34, 1.56, .64, 1); }
.auth .btn.primary.lg:hover svg { transform: translateX(4px); }
.auth .switch a, .auth .forgot { background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size 0.35s ease; }
.auth .switch a:hover, .auth .forgot:hover { background-size: 100% 1px; }

@media (prefers-reduced-motion: reduce) {
  .kinetic .kc, .fx-accent .kc, .fx-accent::after, .auth-card > p.muted, .seg-pill.moving, .seg-pill.moving::after, .seg a.active span,
  .auth-card.from-right > *, .auth-card.from-left > *, .eyebrow.kinetic .kc { animation: none !important; opacity: 1; transform: none; filter: none; }
  .fx-accent::after { transform: scaleX(1); }
}

/* Las etiquetas 3D quedan por debajo de los controles del visor. */
.viewer .label3d { z-index: 1; }
.viewer .hud, .viewer .panel { z-index: 3; }
.label3d.floor { opacity: 0.9; }

/* ================================================================ Interfaz 2.1: barra lateral */
.sidebar { overflow: hidden; background: linear-gradient(180deg, rgba(214, 164, 108, 0.05), transparent 30%, transparent 70%, rgba(159, 178, 211, 0.05)), var(--bg); }
.sidebar::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(159, 178, 211, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 178, 211, 0.05) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 35%, transparent 70%, #000); }
/* Línea de luz que recorre el borde derecho de arriba a abajo. */
.sidebar::after { content: ""; position: absolute; top: -30%; right: -1px; width: 1px; height: 30%; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--gold), transparent); opacity: 0.7; animation: edge-run 7s ease-in-out infinite; }
@keyframes edge-run { 0% { top: -30%; } 60%, 100% { top: 110%; } }
.sidebar > * { position: relative; z-index: 1; }

.brand img { animation: brand-glow 5s ease-in-out infinite; }
@keyframes brand-glow { 0%, 100% { filter: drop-shadow(0 0 0 rgba(214, 164, 108, 0)); } 50% { filter: drop-shadow(0 0 12px rgba(214, 164, 108, 0.55)); } }
.brand .name { background: linear-gradient(100deg, #8e97a6, #fff 30%, #f2cf9f 50%, #fff 70%, #8e97a6); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: brand-sheen 8s ease-in-out infinite; }
.brand .name b { background: inherit; -webkit-background-clip: text; background-clip: text; }
@keyframes brand-sheen { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

/* Etiquetas de sección: letras que entran y una línea dorada que crece. */
.nav-section { display: flex; align-items: center; gap: 10px; }
.nav-section::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(214, 164, 108, 0.45), transparent); transform-origin: left; animation: sec-line 1s var(--ease-out) both; animation-delay: calc(0.3s + var(--ni) * 0.05s); }
@keyframes sec-line { from { transform: scaleX(0); } }

/* Enlaces: entran escalonados; al pasar, el ícono se eleva, el texto avanza y aparece la flecha. */
.nav a { animation: nav-in 0.6s var(--ease-out) both; animation-delay: calc(0.1s + var(--ni) * 0.045s); transition: color 0.25s; }
@keyframes nav-in { from { opacity: 0; transform: translateX(-14px); filter: blur(3px); } }
.nav a:hover { background: transparent; }
.nav a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(120px 40px at 0% 50%, rgba(214, 164, 108, 0.1), transparent 70%); opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.nav a:hover::after { opacity: 1; }
.nav-ico { display: grid; place-items: center; width: 30px; height: 30px; margin: -6px 0 -6px -4px; border-radius: 9px; transition: transform 0.4s var(--ease-spring), background 0.3s, color 0.3s, box-shadow 0.3s; }
.nav-ico svg { width: 18px; height: 18px; }
.nav-label { transition: transform 0.35s var(--ease-out), letter-spacing 0.35s; }
.nav-arrow { margin-left: auto; display: grid; opacity: 0; transform: translateX(-6px); transition: opacity 0.25s, transform 0.35s var(--ease-out); color: var(--gold); }
.nav-arrow svg { width: 14px; height: 14px; }
.nav a:hover .nav-ico { transform: translateY(-2px) rotate(-6deg) scale(1.06); color: var(--gold-2); }
.nav a:hover .nav-label { transform: translateX(3px); }
.nav a:hover .nav-arrow { opacity: 0.8; transform: none; }
.nav a.active { color: var(--text); }
.nav a.active .nav-ico { color: #15110b; background: linear-gradient(145deg, var(--gold-2), var(--gold)); box-shadow: 0 6px 18px -6px rgba(214, 164, 108, 0.7); }
.nav a.active .nav-label { font-weight: 500; }
.nav a.active .nav-arrow { opacity: 0.9; transform: none; }

/* Indicador que viaja entre secciones con rebote y estela. */
.nav-pill { border-radius: 12px; background: linear-gradient(90deg, rgba(214, 164, 108, 0.14), rgba(255, 255, 255, 0.03) 60%, transparent);
  box-shadow: inset 0 0 0 1px rgba(214, 164, 108, 0.22); transition: transform 0.55s cubic-bezier(.34, 1.4, .64, 1), height 0.3s var(--ease-out), opacity 0.2s; }
.nav-pill::before { top: 8px; bottom: 8px; width: 3px; left: -1px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); box-shadow: 0 0 14px var(--gold), 0 0 4px var(--gold-2); }
.nav-pill i { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 242, 220, 0.16), transparent); transform: translateX(-120%); }
.nav-pill.moving { animation: pill-squash 0.55s var(--ease-out); }
.nav-pill.moving i { animation: pill-sweep 0.8s ease 0.1s; }
@keyframes pill-squash { 0% { scale: 1 1; } 30% { scale: 0.97 1.18; } 65% { scale: 1.01 0.96; } 100% { scale: 1 1; } }
@keyframes pill-sweep { to { transform: translateX(320%); } }

/* Tarjeta del motor de IA. */
.sidebar .foot { padding: 12px 6px 0; }
.engine-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(159, 178, 211, 0.08), transparent 70%); }
.engine-card .eyebrow { font-size: 8.5px; letter-spacing: 0.26em; }
.engine-name { margin-top: 4px; font-size: 12px; color: var(--text-2); line-height: 1.3; overflow-wrap: anywhere; }
.engine-orb { position: relative; flex: none; width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #d4def0, #5b75a6 60%, #22304a); box-shadow: 0 0 0 1px rgba(200, 212, 234, 0.25); }
.engine-orb i { position: absolute; inset: -4px; border-radius: 50%; border: 1px solid rgba(159, 178, 211, 0.45); }
.engine-orb.live { background: radial-gradient(circle at 35% 30%, #ffe2bb, var(--gold) 55%, #6e4b26); box-shadow: 0 0 16px -2px var(--gold-glow); }
.engine-orb.live i { border-color: rgba(214, 164, 108, 0.6); animation: orb-ring 2.4s ease-out infinite; }
@keyframes orb-ring { from { transform: scale(0.8); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* ================================================================ Interfaz 2.1: inicio */
.hb2 { min-height: 220px; isolation: isolate; }
.hb-aurora { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hb-aurora i { position: absolute; width: 60%; height: 160%; top: -30%; border-radius: 50%; filter: blur(60px); opacity: 0.35; }
.hb-aurora i:first-child { left: -10%; background: radial-gradient(circle, rgba(214, 164, 108, 0.5), transparent 65%); animation: aurora 16s ease-in-out infinite; }
.hb-aurora i:last-child { right: -15%; background: radial-gradient(circle, rgba(91, 117, 166, 0.55), transparent 65%); animation: aurora 20s ease-in-out infinite reverse; }
@keyframes aurora { 0%, 100% { transform: translate(0, 0) rotate(0deg); } 50% { transform: translate(8%, 6%) rotate(20deg); } }
.hb-skyline { position: absolute; right: 2%; bottom: 0; width: min(46%, 440px); height: auto; opacity: 0.55; pointer-events: none; }
.hb-skyline .sk-line { stroke: rgba(214, 164, 108, 0.75); stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-line 1.8s cubic-bezier(.65, 0, .35, 1) both; }
.hb-skyline .s1 { animation-delay: 0.2s; stroke: rgba(159, 178, 211, 0.7); } .hb-skyline .s2 { animation-delay: 0.4s; } .hb-skyline .s3 { animation-delay: 0.6s; stroke: rgba(242, 207, 159, 0.9); }
.hb-skyline .s4 { animation-delay: 0.8s; stroke: rgba(159, 178, 211, 0.7); } .hb-skyline .s5 { animation-delay: 1s; }
.hb-skyline .sk-win { fill: #ffe2bb; opacity: 0; animation: win-light 5s ease-in-out infinite; }
.hb-skyline .sk-sun { fill: rgba(242, 207, 159, 0.35); filter: blur(1px); animation: sun-pulse 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hb-title { font-size: clamp(32px, 4.2vw, 52px); }
.hb-chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hb-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 99px; font-size: 12.5px; color: var(--text-2);
  border: 1px solid var(--line-2); background: rgba(7, 8, 11, 0.45); backdrop-filter: blur(8px); animation: chip-in 0.6s var(--ease-out) both; animation-delay: calc(0.9s + var(--ci) * 0.1s); }
.hb-chips svg { width: 14px; height: 14px; color: var(--gold); }
@keyframes chip-in { from { opacity: 0; transform: translateY(8px) scale(0.96); } }
.glass-btn { background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(10px); border-color: rgba(255, 255, 255, 0.14); }

/* Indicadores con profundidad: entrada escalonada, brillo que sigue al cursor, borde vivo e inclinación. */
.kpi3 { position: relative; display: block; overflow: hidden; color: inherit; isolation: isolate; animation: kpi-in 0.8s var(--ease-out) backwards; animation-delay: calc(0.15s + var(--ki) * 0.08s);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 60%), var(--panel); transition: border-color 0.3s, box-shadow 0.3s; }
@keyframes kpi-in { from { opacity: 0; transform: translateY(16px) scale(0.97); filter: blur(4px); } }
.kpi3 .eyebrow { padding-right: 0; }
.kpi3 .val { font-size: 38px; margin-top: 16px; background: linear-gradient(180deg, #fff 20%, #b9c0cc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kpi3 .sub { position: relative; }
.kpi3-glow { position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 0.35s; background: radial-gradient(220px circle at var(--gx, 50%) var(--gy, 0%), rgba(214, 164, 108, 0.16), transparent 70%); }
.kpi3:hover .kpi3-glow { opacity: 1; }
.kpi3-ico { position: relative; flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: var(--gold); border: 1px solid var(--line-2); background: rgba(214, 164, 108, 0.06); transition: transform 0.45s var(--ease-spring), background 0.3s, color 0.3s; }
.kpi3-ico svg { width: 17px; height: 17px; }
.kpi3-ico i { position: absolute; inset: -5px; border-radius: 14px; border: 1px dashed rgba(214, 164, 108, 0.35); opacity: 0; transition: opacity 0.3s; animation: spin 12s linear infinite; }
.kpi3:hover .kpi3-ico { transform: translateY(-2px) rotate(-8deg); background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: #15110b; }
.kpi3:hover .kpi3-ico i { opacity: 1; }
.kpi3-line { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); transform: scaleX(0); transition: transform 0.5s var(--ease-out); }
.kpi3:hover .kpi3-line { transform: scaleX(1); }
.kpi3:hover { border-color: rgba(214, 164, 108, 0.32); box-shadow: 0 30px 60px -36px rgba(0, 0, 0, 0.95), 0 0 30px -16px var(--gold-glow); }

/* Inclinación 3D (solo con ratón). */
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 0.35s var(--ease-out), border-color 0.3s, box-shadow 0.3s; will-change: transform; }

/* Secciones: título con punto dorado y subrayado que se dibuja al aparecer. */
.sec-title { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.sec-title::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.sec .card-head { position: relative; }
.sec .card-head::after { content: ""; position: absolute; left: 24px; bottom: -1px; width: 80px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease-out) 0.2s; }
.sec.shown .card-head::after, .sec:not(.reveal) .card-head::after { transform: scaleX(1); }
.link-arrow svg { transition: transform 0.3s var(--ease-spring); }
.link-arrow:hover svg { transform: translateX(4px); }
.count-pill { min-width: 26px; justify-content: center; }

/* Proyectos: portada que se mueve, inclinación y reflejo. */
.pc2 { position: relative; overflow: hidden; color: inherit; }
.pc2 .cover svg { transition: transform 0.8s var(--ease-out); }
.pc2:hover .cover svg { transform: scale(1.08) translateY(-4px); }
.pc2 .cover::before { content: ""; position: absolute; inset: 0; z-index: 1; background-image: linear-gradient(rgba(214, 164, 108, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(214, 164, 108, 0.12) 1px, transparent 1px); background-size: 18px 18px; opacity: 0; transition: opacity 0.4s; animation: grid-pan 8s linear infinite; }
.pc2:hover .cover::before { opacity: 1; }
@keyframes grid-pan { to { background-position: 18px 18px; } }
.pc2 .cover-pill { display: inline-flex; align-items: center; gap: 6px; backdrop-filter: blur(8px); }
.pc2 .cover-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); animation: dot-pulse 2s ease-in-out infinite; }
@keyframes dot-pulse { 50% { opacity: 0.35; } }
.pc2-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; font-size: 12.5px; color: var(--text-3); }
.pc2-go { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-2); transition: background 0.3s, color 0.3s, transform 0.4s var(--ease-spring); }
.pc2-go svg { width: 14px; height: 14px; }
.pc2:hover .pc2-go { background: var(--gold); color: #15110b; transform: rotate(-45deg); }
.pc2-glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; background: radial-gradient(260px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.08), transparent 60%); }
.pc2:hover .pc2-glare { opacity: 1; }
.pc2:hover { border-color: rgba(214, 164, 108, 0.35); box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.95), 0 0 34px -18px var(--gold-glow); }

/* Actividad: los elementos entran en cascada. */
.timeline .tl-item { animation: tl-in 0.6s var(--ease-out) both; animation-delay: calc(0.3s + var(--ti) * 0.07s); }
@keyframes tl-in { from { opacity: 0; transform: translateX(-10px); } }
.timeline .tl-dot { animation: dot-pulse 2.6s ease-in-out infinite; }
.empty-mini { display: flex; align-items: center; gap: 12px; padding: 18px 4px; color: var(--text-3); font-size: 13px; }
.empty-mini svg { width: 34px; height: 34px; padding: 8px; border-radius: 10px; border: 1px dashed var(--line-2); color: var(--steel); animation: float-y 4s ease-in-out infinite; }
.empty-mini.done svg { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
@keyframes float-y { 50% { transform: translateY(-4px); } }

/* Copilot: borde que gira, orbe vivo, texto de ayuda que se escribe solo. */
.cp2 { position: relative; overflow: hidden; isolation: isolate; }
.cp2-border { position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 60%, rgba(159, 178, 211, 0.7) 72%, rgba(214, 164, 108, 0.8) 80%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: orbit 6s linear infinite; }
.cp2::before { content: ""; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; border-radius: 50%; z-index: -1; background: radial-gradient(circle, rgba(91, 117, 166, 0.35), transparent 65%); animation: aurora 14s ease-in-out infinite; }
.ai-orb { position: relative; flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 13px; color: #0b0d11; background: linear-gradient(145deg, #e6edf9, #8fa3c7); box-shadow: 0 10px 26px -10px rgba(143, 163, 199, 0.8); }
.ai-orb svg { width: 18px; height: 18px; animation: sparkle-spin 6s ease-in-out infinite; }
.ai-orb i { position: absolute; inset: -6px; border-radius: 16px; border: 1px solid rgba(200, 212, 234, 0.4); animation: orb-ring 2.8s ease-out infinite; }
@keyframes sparkle-spin { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(90deg) scale(1.1); } }
.cp2-engine { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11.5px; color: var(--text-3); }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: dot-pulse 1.8s ease-in-out infinite; }
.cp2 .ask-row .input { transition: border-color 0.3s, box-shadow 0.3s; }
.cp2 .ask-row .input:focus { border-color: rgba(159, 178, 211, 0.6); box-shadow: 0 0 0 4px rgba(159, 178, 211, 0.12); }
.chip-glow { transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease-spring), box-shadow 0.3s; }
.chip-glow:hover { border-color: rgba(214, 164, 108, 0.5); color: var(--gold-2); transform: translateY(-2px); box-shadow: 0 8px 20px -12px var(--gold-glow); }

/* Biblioteca: libros que se inclinan. */
.lib-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; color: inherit; transition: border-color 0.3s, transform 0.35s var(--ease-out); }
.lib-books { flex: none; display: flex; align-items: flex-end; gap: 3px; height: 34px; }
.lib-books i { display: block; width: 8px; border-radius: 2px; background: linear-gradient(180deg, var(--gold-2), var(--gold)); transform-origin: bottom; transition: transform 0.45s var(--ease-spring); }
.lib-books i:nth-child(1) { height: 26px; } .lib-books i:nth-child(2) { height: 32px; background: linear-gradient(180deg, #c8d4ea, #8fa3c7); } .lib-books i:nth-child(3) { height: 22px; opacity: 0.8; }
.lib-card:hover { border-color: rgba(214, 164, 108, 0.35); transform: translateY(-2px); }
.lib-card:hover .lib-books i:nth-child(1) { transform: rotate(-10deg); } .lib-card:hover .lib-books i:nth-child(3) { transform: rotate(12deg); }
.lib-go { transition: transform 0.3s var(--ease-spring); }
.lib-card:hover .lib-go { transform: translateX(4px); color: var(--gold); }

@media (max-width: 960px) {
  .hb-skyline { width: 70%; opacity: 0.25; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar::after, .brand img, .brand .name, .nav a, .nav-section::after, .nav-pill.moving, .nav-pill.moving i, .engine-orb.live i,
  .hb-aurora i, .hb-skyline *, .hb-chips li, .kpi3, .kpi3-ico i, .timeline .tl-item, .tl-dot, .cp2-border, .cp2::before, .ai-orb svg, .ai-orb i, .pc2 .cover::before, .empty-mini svg, .live-dot, .cover-pill .dot { animation: none !important; }
  .hb-skyline .sk-line { stroke-dashoffset: 0; }
  .tilt { transform: none !important; }
}

/* ================================================================ Interfaz 2.2: secciones */
/* Encabezados de sección: letras animadas, etiqueta con destello y línea dorada que se dibuja. */
.ph2 { position: relative; padding-bottom: 18px; }
.ph2 > :last-child:not(:first-child) { animation-fill-mode: backwards !important; }
.ph2::after { content: ""; position: absolute; left: 0; bottom: 0; width: min(260px, 50%); height: 1px; background: linear-gradient(90deg, var(--gold), rgba(214, 164, 108, 0.2), transparent);
  transform: scaleX(0); transform-origin: left; animation: underline-in 1.1s var(--ease-out) 0.5s both; }
.ph2 h1.kinetic { perspective: 600px; }
.ph2 .eyebrow.kinetic .kc { background: linear-gradient(90deg, var(--gold) 0%, var(--gold) 42%, #fff2dc 50%, var(--gold) 58%, var(--gold) 100%);
  background-size: 1200% 100%; background-position: calc(100% - var(--ci) * 4%) 0; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: kc-track 0.6s cubic-bezier(.16, 1, .3, 1) both, eyebrow-shine 5s ease-in-out infinite; animation-delay: calc(0.05s + var(--ci) * 0.02s), 1.4s; }
.ph2 p.muted { animation: sub-in 0.8s ease 0.45s both; }
.ph2 > :last-child:not(:first-child) { animation: chip-in 0.6s var(--ease-out) 0.5s both; }

/* Tarjetas de las secciones: entran escalonadas y se iluminan al pasar. */
.content .card:not(.kpi3):not(.skeleton) { animation: card-in 0.7s var(--ease-out) backwards; }
.content .split > :nth-child(2) .card, .content .chat > :nth-child(2) { animation-delay: 0.12s; }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } }
.content .card:not(.kpi3) { transition: border-color 0.35s, box-shadow 0.35s; }
.content .card:not(.kpi3):not(.thread):not(.list-card):hover { border-color: rgba(214, 164, 108, 0.22); box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.9), 0 0 30px -20px var(--gold-glow); }
.content .card-head h3 { position: relative; display: inline-flex; align-items: center; gap: 10px; }
.content .card-head h3::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); flex: none; }

/* Campos: brillo dorado al enfocar en toda la app. */
.content .input { transition: border-color 0.25s, box-shadow 0.25s, background 0.25s; }
.content .input:focus { border-color: rgba(214, 164, 108, 0.6); box-shadow: 0 0 0 4px rgba(214, 164, 108, 0.1); background: rgba(7, 8, 11, 0.6); }
.content .field:focus-within > label, .content .field:focus-within .label-row label { color: var(--gold-2); }

/* Pestañas con indicador que se desliza con rebote. */
.tabs.has-ink { position: relative; isolation: isolate; }
.tab-ink { position: absolute; top: 0; left: 0; z-index: -1; border-radius: 10px; pointer-events: none; opacity: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015)), var(--panel-2);
  box-shadow: inset 0 0 0 1px rgba(214, 164, 108, 0.3), 0 8px 20px -10px rgba(214, 164, 108, 0.45);
  transition: transform 0.5s cubic-bezier(.34, 1.4, .64, 1), width 0.4s var(--ease-out), opacity 0.2s; }
.tab-ink::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); box-shadow: 0 0 8px var(--gold); }
.tabs.has-ink .active { background: transparent; box-shadow: none; color: var(--gold-2); }
.tabs button, .tabs a { transition: color 0.3s; }
.tabs button svg, .tabs a svg { transition: transform 0.4s var(--ease-spring); }
.tabs .active svg { transform: scale(1.12); }

/* ---------------- Cámara: visor con esquinas, retícula, barrido y etiqueta en vivo. */
.camera { box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 0.95), inset 0 0 0 1px rgba(214, 164, 108, 0.08); }
.vf { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.vf-c { position: absolute; width: 34px; height: 34px; border: 2px solid var(--gold); filter: drop-shadow(0 0 6px rgba(214, 164, 108, 0.6)); animation: vf-breathe 3s ease-in-out infinite; }
.vf-c.tl { top: 18px; left: 18px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.vf-c.tr { top: 18px; right: 18px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.vf-c.bl { bottom: 18px; left: 18px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.vf-c.br { bottom: 18px; right: 18px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
@keyframes vf-breathe { 50% { transform: scale(0.92); opacity: 0.7; } }
.vf-grid { position: absolute; inset: 0; background-image: linear-gradient(90deg, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.1) 33.33%, transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.1) 66.66%, transparent calc(66.66% + 0.5px)),
  linear-gradient(180deg, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.1) 33.33%, transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.1) 66.66%, transparent calc(66.66% + 0.5px)); }
.vf-scan { position: absolute; left: 6%; right: 6%; top: 0; height: 2px; background: linear-gradient(90deg, transparent, rgba(214, 164, 108, 0.8), transparent); box-shadow: 0 0 18px 2px rgba(214, 164, 108, 0.35); animation: vf-scan 3.6s ease-in-out infinite; }
@keyframes vf-scan { 0% { top: 8%; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 92%; opacity: 0; } }
.camera[data-mode="plan"] .vf-scan { background: linear-gradient(90deg, transparent, rgba(159, 178, 211, 0.9), transparent); box-shadow: 0 0 18px 2px rgba(159, 178, 211, 0.35); }
.camera[data-mode="measure"] .vf-scan { display: none; }
.vf-tag { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; font: 500 11px var(--mono); letter-spacing: 0.08em; text-transform: uppercase;
  color: #fff; background: rgba(7, 8, 11, 0.6); border: 1px solid rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px); }
.vf-tag i { width: 7px; height: 7px; border-radius: 50%; background: #e57a6e; box-shadow: 0 0 8px #e57a6e; animation: dot-pulse 1.2s ease-in-out infinite; }
.camera .controls { z-index: 3; }
/* Obturador: el círculo interior queda centrado de forma absoluta (no depende del relleno del botón
   ni de los elementos que se le agregan); un arco dorado gira alrededor, un halo respira y al
   disparar el centro se hunde, destella y la imagen hace un flash. */
.shutter { position: relative; flex: none; width: 74px; height: 74px; padding: 0; margin: 0; border: 0; border-radius: 50%; background: transparent; display: block; cursor: pointer;
  transition: transform 0.35s var(--ease-spring); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8); -webkit-tap-highlight-color: transparent; }
.shutter::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 3px;
  background: conic-gradient(from var(--angle, 0deg), rgba(255, 255, 255, 0.9) 0 62%, var(--gold) 72%, var(--gold-2) 80%, rgba(255, 255, 255, 0.9) 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: orbit 3.2s linear infinite; }
.shutter::after { content: ""; position: absolute; top: 50%; left: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #eceef2 60%, #d9dee6); box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.18), 0 0 0 0 rgba(214, 164, 108, 0.6);
  transition: transform 0.18s ease, background 0.2s; animation: shutter-breathe 2.4s ease-in-out infinite; }
@keyframes shutter-breathe { 0%, 100% { box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.18), 0 0 0 0 rgba(214, 164, 108, 0.55); } 50% { box-shadow: inset 0 -2px 6px rgba(0, 0, 0, 0.18), 0 0 0 9px rgba(214, 164, 108, 0); } }
.shutter > * { display: none; }
.shutter:hover { transform: scale(1.06); }
.shutter:hover::after { background: radial-gradient(circle at 35% 30%, #fff8ec, var(--gold-2) 70%, var(--gold)); }
.shutter:active::after, .shutter.snap::after { transform: scale(0.82); background: radial-gradient(circle at 35% 30%, #fff8ec, var(--gold-2) 60%, var(--gold)); }
.shutter.snap { animation: shutter-pop 0.45s var(--ease-spring); }
@keyframes shutter-pop { 40% { transform: scale(0.92); } 100% { transform: scale(1); } }
.camera .controls { align-items: center; }
.camera .flash { position: absolute; inset: 0; z-index: 5; background: #fff; pointer-events: none; animation: cam-flash 0.45s ease-out forwards; }
@keyframes cam-flash { from { opacity: 0.85; } to { opacity: 0; } }
#cam-error:not([hidden]) ~ .vf, #cam-error:not([hidden]) + .vf { display: none; }
.camera:has(#cam-error:not([hidden])) .vf { display: none; }
.cam-denied { position: relative; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 420px; text-align: center; color: var(--text-2); }
.cam-denied h3 { color: var(--text); font-family: var(--display); font-weight: 400; font-size: 20px; }
.cam-denied p { font-size: 13.5px; }
.cam-denied-ico { position: relative; display: grid; place-items: center; width: 74px; height: 74px; margin-bottom: 6px; border-radius: 22px; color: var(--gold-2); background: radial-gradient(circle at 30% 25%, rgba(214, 164, 108, 0.25), rgba(214, 164, 108, 0.04)); border: 1px solid rgba(214, 164, 108, 0.35); }
.cam-denied-ico svg { width: 30px; height: 30px; animation: float-y 3.5s ease-in-out infinite; }
.cam-denied-ico i { position: absolute; inset: -8px; border-radius: 28px; border: 1px solid rgba(214, 164, 108, 0.35); animation: orb-ring 2.6s ease-out infinite; }
.cam-denied-ico i:nth-child(2) { animation-delay: 1.3s; }

/* ---------------- Copilot: bienvenida con órbitas, composer con borde vivo, mensajes con entrada. */
.welcome2 { gap: 14px; }
.wl-logo { position: relative; width: 170px; height: 170px; display: grid; place-items: center; margin-bottom: 4px; }
.wl-logo img { position: relative; z-index: 2; width: 110px; height: 110px; mix-blend-mode: screen; animation: float-y 5s ease-in-out infinite, brand-glow 5s ease-in-out infinite; }
.wl-ring { position: absolute; border-radius: 50%; border: 1px solid rgba(214, 164, 108, 0.28); }
.wl-ring.r1 { inset: 18px; animation: spin 14s linear infinite; border-style: dashed; }
.wl-ring.r2 { inset: 2px; border-color: rgba(159, 178, 211, 0.25); animation: spin 22s linear infinite reverse; }
.wl-ring.r3 { inset: -14px; border-color: rgba(214, 164, 108, 0.12); animation: orb-ring 4s ease-out infinite; }
.wl-dot { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--gold-2); box-shadow: 0 0 8px var(--gold);
  transform: rotate(calc(var(--d) * 45deg)) translateX(84px); animation: wl-orbit 12s linear infinite; animation-delay: calc(var(--d) * -1.5s); opacity: 0.8; }
.wl-dot:nth-child(even) { background: #c8d4ea; box-shadow: 0 0 8px #8fa3c7; }
@keyframes wl-orbit { from { transform: rotate(calc(var(--d) * 45deg)) translateX(84px); } to { transform: rotate(calc(var(--d) * 45deg + 360deg)) translateX(84px); } }
.welcome2 p { animation: sub-in 0.8s ease 0.6s both; }
.welcome2 #suggested .chip { animation: chip-in 0.5s var(--ease-out) both; transition: border-color 0.3s, color 0.3s, transform 0.3s var(--ease-spring), box-shadow 0.3s; }
.welcome2 #suggested .chip:nth-child(1) { animation-delay: 0.8s; } .welcome2 #suggested .chip:nth-child(2) { animation-delay: 0.88s; } .welcome2 #suggested .chip:nth-child(3) { animation-delay: 0.96s; }
.welcome2 #suggested .chip:nth-child(4) { animation-delay: 1.04s; } .welcome2 #suggested .chip:nth-child(5) { animation-delay: 1.12s; }
.welcome2 #suggested .chip:hover { border-color: rgba(214, 164, 108, 0.5); color: var(--gold-2); transform: translateY(-2px); box-shadow: 0 8px 20px -12px var(--gold-glow); }
.composer2 .box { position: relative; transition: border-color 0.3s, box-shadow 0.3s; }
.composer2 .box::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 60%, rgba(159, 178, 211, 0.8) 72%, rgba(214, 164, 108, 0.9) 80%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: orbit 4s linear infinite; }
.composer2 .box:focus-within::before { opacity: 1; }
.composer2 .box:focus-within { box-shadow: 0 0 40px -18px var(--gold-glow); }
.msg { animation: msg-in 0.5s var(--ease-out) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px); filter: blur(3px); } }
.msg.user .bubble { background: linear-gradient(135deg, rgba(214, 164, 108, 0.16), rgba(255, 255, 255, 0.04)); border-color: rgba(214, 164, 108, 0.25); }
.msg .who { box-shadow: 0 0 0 1px rgba(214, 164, 108, 0.15), 0 6px 16px -8px var(--gold-glow); }
.chat .conv { transition: background 0.25s, color 0.25s, transform 0.3s var(--ease-out), padding 0.3s; }
.chat .conv:hover { transform: translateX(3px); }
.chat .conv.active { background: linear-gradient(90deg, rgba(214, 164, 108, 0.14), transparent); box-shadow: inset 2px 0 0 var(--gold); }

/* ---------------- Proyectos: barra de filtros y tarjetas con profundidad. */
.filter-bar .search { transition: border-color 0.3s, box-shadow 0.3s; }
.filter-bar .search:focus-within { border-color: rgba(214, 164, 108, 0.55); box-shadow: 0 0 0 4px rgba(214, 164, 108, 0.1); }
.filter-bar .search:focus-within svg { color: var(--gold); }
#list .pc3 { animation: card-in 0.7s var(--ease-out) backwards; }
#list .pc3:nth-child(2) { animation-delay: 0.08s; } #list .pc3:nth-child(3) { animation-delay: 0.16s; } #list .pc3:nth-child(4) { animation-delay: 0.24s; }
#list .pc3:nth-child(5) { animation-delay: 0.32s; } #list .pc3:nth-child(n+6) { animation-delay: 0.4s; }
.pc3 .meta span { transition: color 0.3s; }
.pc3:hover .meta span { color: var(--text-2); }
.pc3:hover .meta svg { color: var(--gold); }
.pc3 h3 { transition: color 0.3s; }
.pc3:hover h3 { color: var(--gold-2); }

/* ---------------- Perfil: banda superior, avatar con anillo y verificación con escudo. */
.profile-head { padding: 26px 26px 26px; border-radius: var(--radius-lg); border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  background: linear-gradient(135deg, rgba(214, 164, 108, 0.1), transparent 50%, rgba(159, 178, 211, 0.08)), var(--panel); }
.profile-head::after { left: 26px; }
.ph-band { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(159, 178, 211, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 178, 211, 0.05) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(90deg, transparent, #000 60%); }
.ph-band::after { content: ""; position: absolute; top: -40%; right: -10%; width: 50%; height: 180%; background: radial-gradient(circle, rgba(214, 164, 108, 0.22), transparent 65%); animation: aurora 16s ease-in-out infinite; }
.avatar-ring { position: relative; display: inline-grid; place-items: center; padding: 4px; border-radius: 50%; }
.avatar-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 2px; background: conic-gradient(from var(--angle, 0deg), var(--gold), #c8d4ea, var(--gold-2), var(--gold));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: orbit 6s linear infinite; }
.avatar-ring i { position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(214, 164, 108, 0.35); animation: orb-ring 3s ease-out infinite; }
.avatar-ring .avatar { box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.8); }
.mfa-card { position: relative; overflow: hidden; }
.mfa-shield { position: absolute; right: -18px; bottom: -22px; color: rgba(214, 164, 108, 0.12); pointer-events: none; }
.mfa-shield svg { width: 130px; height: 130px; animation: float-y 6s ease-in-out infinite; }
.mfa-card.on .mfa-shield { color: rgba(124, 198, 161, 0.14); }
.usage .usage-val { background: linear-gradient(180deg, #fff 20%, #b9c0cc); -webkit-background-clip: text; background-clip: text; color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .ph2::after, .ph2 p.muted, .ph2 > :last-child, .content .card, .tab-ink, .vf-c, .vf-scan, .vf-tag i, .shutter::before, .shutter::after, .cam-denied-ico *, .wl-logo *, .welcome2 *, .composer2 .box::before,
  .msg, #list .pc3, .ph-band::after, .avatar-ring::before, .avatar-ring i, .mfa-shield svg, .ph2 .eyebrow.kinetic .kc { animation: none !important; }
  .ph2::after { transform: scaleX(1); }
}

/* ================================================================ fondo animado de la aplicación */
.bg-scene { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; contain: strict;
  background: radial-gradient(120% 80% at 50% 120%, #10151f 0%, transparent 60%), radial-gradient(90% 60% at 80% -10%, rgba(214, 164, 108, 0.08), transparent 60%), var(--bg); }
.shell { position: relative; z-index: 1; }
.sidebar { background-color: color-mix(in srgb, var(--bg) 82%, transparent) !important; backdrop-filter: blur(14px); }

/* Auroras de luz que se desplazan muy despacio (siguen un poco al cursor). */
.bg-aurora { position: absolute; inset: -20%; transform: translate(calc(var(--px, 0) * -30px), calc(var(--py, 0) * -20px)); }
.bg-aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.5; mix-blend-mode: screen; }
.bg-aurora .a1 { width: 48vw; height: 48vw; top: 4%; right: 6%; background: radial-gradient(circle, rgba(214, 164, 108, 0.35), transparent 65%); animation: bg-drift1 38s ease-in-out infinite; }
.bg-aurora .a2 { width: 56vw; height: 56vw; bottom: 0; left: -4%; background: radial-gradient(circle, rgba(91, 117, 166, 0.38), transparent 65%); animation: bg-drift2 46s ease-in-out infinite; }
.bg-aurora .a3 { width: 34vw; height: 34vw; top: 38%; left: 40%; background: radial-gradient(circle, rgba(242, 207, 159, 0.18), transparent 65%); animation: bg-drift3 30s ease-in-out infinite; }
@keyframes bg-drift1 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(-12vw, 10vh) scale(1.15); } }
@keyframes bg-drift2 { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(14vw, -8vh) scale(0.9); } }
@keyframes bg-drift3 { 0%, 100% { transform: translate(0, 0); opacity: 0.35; } 50% { transform: translate(-8vw, -12vh); opacity: 0.6; } }

/* Retícula de plano en perspectiva que avanza hacia el horizonte. */
.bg-floor { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 62%; perspective: 520px; perspective-origin: 50% 0%;
  mask-image: linear-gradient(180deg, transparent 0%, #000 45%, #000 100%); }
.bg-floor-grid { position: absolute; inset: 0; transform: rotateX(72deg); transform-origin: 50% 0%;
  background-image: linear-gradient(rgba(214, 164, 108, 0.16) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 178, 211, 0.12) 1px, transparent 1px);
  background-size: 70px 70px; animation: bg-floor 6s linear infinite; }
@keyframes bg-floor { to { background-position: 0 70px; } }
.bg-horizon { position: absolute; left: 0; right: 0; bottom: 61%; height: 1px; background: linear-gradient(90deg, transparent, rgba(214, 164, 108, 0.35), rgba(242, 207, 159, 0.5), rgba(214, 164, 108, 0.35), transparent);
  box-shadow: 0 0 22px 4px rgba(214, 164, 108, 0.1); opacity: 0.35; }

/* Ciudad de líneas con ventanas que se encienden. */
.bg-city-wrap { position: absolute; left: -4%; right: -4%; bottom: 0; height: 30vh; min-height: 180px; opacity: 0.75; transform: translate(calc(var(--px, 0) * 18px), calc(var(--py, 0) * 6px));
  mask-image: linear-gradient(180deg, transparent, #000 35%); }
.bg-city { width: 100%; height: 100%; }
.bg-city-body path { fill: url(#bgc); stroke: rgba(214, 164, 108, 0.22); stroke-width: 0.8; }
.bg-city-win rect { fill: #ffe2bb; opacity: 0.05; animation: bg-win 7s ease-in-out infinite; }
@keyframes bg-win { 0%, 100% { opacity: 0.03; } 40%, 55% { opacity: 0.38; } }
.bg-city-ground { stroke: rgba(214, 164, 108, 0.45); stroke-width: 1; }

/* Puntos de obra y acabado. */
.bg-particles { position: absolute; inset: 0; width: 100%; height: 100%; }
.bg-vignette { position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 40%, transparent 50%, rgba(0, 0, 0, 0.55) 100%); }
.bg-grain { position: absolute; inset: -50%; opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: bg-grain 1.2s steps(4) infinite; }
@keyframes bg-grain { 25% { transform: translate(-3%, 2%); } 50% { transform: translate(2%, -3%); } 75% { transform: translate(-2%, -2%); } }

/* Tema claro: el mismo fondo, más suave. */
:root[data-theme="light"] .bg-scene { background: radial-gradient(90% 60% at 80% -10%, rgba(214, 164, 108, 0.12), transparent 60%), var(--bg); }
:root[data-theme="light"] .bg-aurora i { mix-blend-mode: multiply; opacity: 0.25; }
:root[data-theme="light"] .bg-vignette, :root[data-theme="light"] .bg-grain { display: none; }

/* Móvil: menos capas pesadas. */
@media (max-width: 960px) {
  .bg-aurora i { filter: blur(60px); }
  .bg-city-wrap { height: 22vh; opacity: 0.6; }
  .bg-grain { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .bg-scene *, .bg-scene *::before { animation: none !important; }
  .bg-particles { display: none; }
}

/* ================================================================ pantalla de carga */
#splash { display: grid; place-items: center; overflow: hidden; background: radial-gradient(70% 60% at 50% 45%, #15120e 0%, #0a0b0f 55%, #050608 100%); }
#splash.out { opacity: 0; visibility: hidden; filter: blur(6px); transform: scale(1.04); transition: opacity 0.6s ease, visibility 0.6s, filter 0.6s ease, transform 0.6s ease; }
.sp-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(159, 178, 211, 0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 178, 211, 0.06) 1px, transparent 1px),
  linear-gradient(rgba(159, 178, 211, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 178, 211, 0.03) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px; background-position: center; mask-image: radial-gradient(circle at 50% 45%, #000 10%, transparent 60%); animation: sp-fade 1.4s ease both; }
.sp-corner { position: absolute; width: 28px; height: 28px; border: 1px solid rgba(214, 164, 108, 0.45); animation: sp-fade 1s ease 0.3s both; }
.sp-corner.tl { top: 24px; left: 24px; border-right: 0; border-bottom: 0; } .sp-corner.tr { top: 24px; right: 24px; border-left: 0; border-bottom: 0; }
.sp-corner.bl { bottom: 24px; left: 24px; border-right: 0; border-top: 0; } .sp-corner.br { bottom: 24px; right: 24px; border-left: 0; border-top: 0; }
.sp-center { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.sp-logo { position: relative; width: 220px; height: 220px; display: grid; place-items: center; }
.sp-logo > * { grid-area: 1 / 1; }
.sp-logo img { position: relative; z-index: 2; width: 132px; height: 132px; mix-blend-mode: screen; animation: splash-reveal 1s var(--ease-out) both, sp-float 4s ease-in-out 1s infinite; }
@keyframes splash-reveal { from { clip-path: inset(100% 0 0 0); filter: brightness(1.8); transform: translateY(10px); } }
@keyframes sp-float { 50% { transform: translateY(-4px); filter: drop-shadow(0 0 18px rgba(214, 164, 108, 0.45)); } }
.sp-dial { width: 220px; height: 220px; fill: none; animation: spin 40s linear infinite, sp-fade 1.2s ease both; }
.sp-dial circle { stroke: rgba(214, 164, 108, 0.18); stroke-width: 1; }
.sp-dial line { stroke: rgba(214, 164, 108, 0.35); stroke-width: 1.2; }
.sp-ring { width: 176px; height: 176px; border-radius: 50%; }
.sp-ring.r1 { border: 1px dashed rgba(159, 178, 211, 0.35); animation: spin 18s linear infinite reverse; }
.sp-ring.r2 { border: 1px solid rgba(214, 164, 108, 0.35); animation: orb-ring 2.4s ease-out infinite; }
.sp-arc { width: 196px; height: 196px; border-radius: 50%; padding: 2px; background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, rgba(214, 164, 108, 0.9) 85%, #fff2dc 90%, transparent 92%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; animation: orbit 1.8s linear infinite; filter: drop-shadow(0 0 6px rgba(214, 164, 108, 0.7)); }
.sp-glow { width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgba(214, 164, 108, 0.28), transparent 65%); animation: sp-pulse 2.4s ease-in-out infinite; }
@keyframes sp-pulse { 50% { transform: scale(1.15); opacity: 0.6; } }
.sp-word { display: flex; gap: 0.32em; margin-top: 18px; font: 300 30px/1 var(--display); letter-spacing: 0.06em; }
.sp-word span { display: inline-block; background: linear-gradient(180deg, #fff, #d9dee6 45%, #8e97a6); -webkit-background-clip: text; background-clip: text; color: transparent; animation: sp-letter 0.8s var(--ease-out) both; }
.sp-word span.ai { background: linear-gradient(180deg, #f2cf9f, #d6a46c); -webkit-background-clip: text; background-clip: text; }
.sp-word .sp-gap { width: 0.25em; }
.sp-word span:nth-child(1) { animation-delay: 0.45s; } .sp-word span:nth-child(2) { animation-delay: 0.52s; } .sp-word span:nth-child(3) { animation-delay: 0.59s; }
.sp-word span:nth-child(4) { animation-delay: 0.66s; } .sp-word span:nth-child(5) { animation-delay: 0.73s; } .sp-word span:nth-child(7) { animation-delay: 0.86s; } .sp-word span:nth-child(8) { animation-delay: 0.93s; }
@keyframes sp-letter { from { opacity: 0; transform: translateY(14px) rotateX(-60deg); filter: blur(6px); } }
.sp-tag { margin-top: 10px; font: 500 9.5px var(--font); letter-spacing: 0.42em; padding-left: 0.42em; text-transform: uppercase; color: var(--gold); animation: sp-fade 0.8s ease 1.05s both; }
.sp-bar { position: relative; width: 200px; height: 2px; margin-top: 26px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); overflow: hidden; animation: sp-fade 0.6s ease 1.1s both; }
.sp-bar i { position: absolute; top: 0; bottom: 0; left: 0; width: 38%; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--gold), #fff2dc, var(--gold), transparent); box-shadow: 0 0 10px var(--gold); animation: sp-load 1.4s cubic-bezier(.45, 0, .2, 1) infinite; }
@keyframes sp-load { from { transform: translateX(-110%); } to { transform: translateX(290%); } }
.sp-status { position: relative; height: 18px; width: 260px; margin-top: 12px; font-size: 12px; color: var(--text-3); }
.sp-status span { position: absolute; inset: 0; opacity: 0; animation: sp-status 6s ease infinite; }
.sp-status span:nth-child(2) { animation-delay: 2s; } .sp-status span:nth-child(3) { animation-delay: 4s; }
@keyframes sp-status { 0% { opacity: 0; transform: translateY(6px); } 6%, 28% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; transform: translateY(-6px); } }
@keyframes sp-fade { from { opacity: 0; } }
@media (max-width: 480px) { .sp-logo { transform: scale(0.85); } .sp-word { font-size: 26px; } }
@media (prefers-reduced-motion: reduce) { #splash *, #splash *::before { animation: none !important; } .sp-status span:first-child { opacity: 1; } }

/* Fondo de la pantalla de carga: auroras, piso de retícula, ciudad, rayos de luz y polvo dorado. */
.sp-bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sp-au { position: absolute; border-radius: 50%; filter: blur(80px); mix-blend-mode: screen; }
.sp-au.a1 { width: 60vmax; height: 60vmax; left: -15vmax; top: -20vmax; background: radial-gradient(circle, rgba(214, 164, 108, 0.32), transparent 65%); animation: sp-drift1 14s ease-in-out infinite; }
.sp-au.a2 { width: 66vmax; height: 66vmax; right: -20vmax; bottom: -28vmax; background: radial-gradient(circle, rgba(91, 117, 166, 0.42), transparent 65%); animation: sp-drift2 18s ease-in-out infinite; }
.sp-au.a3 { width: 36vmax; height: 36vmax; left: 50%; top: 40%; margin: -18vmax 0 0 -18vmax; background: radial-gradient(circle, rgba(242, 207, 159, 0.2), transparent 65%); animation: sp-pulse 5s ease-in-out infinite; }
@keyframes sp-drift1 { 50% { transform: translate(12vw, 10vh) scale(1.15); } }
@keyframes sp-drift2 { 50% { transform: translate(-12vw, -8vh) scale(0.9); } }
.sp-floor { position: absolute; left: -50%; right: -50%; bottom: -8%; height: 38%; perspective: 480px; perspective-origin: 50% 0; mask-image: linear-gradient(180deg, transparent, #000 50%); }
.sp-floor div { position: absolute; inset: 0; transform: rotateX(72deg); transform-origin: 50% 0;
  background-image: linear-gradient(rgba(214, 164, 108, 0.22) 1px, transparent 1px), linear-gradient(90deg, rgba(159, 178, 211, 0.16) 1px, transparent 1px);
  background-size: 64px 64px; animation: sp-floor 3s linear infinite; }
@keyframes sp-floor { to { background-position: 0 64px; } }
.sp-horizon { position: absolute; left: 0; right: 0; bottom: 30%; height: 1px; background: linear-gradient(90deg, transparent, rgba(214, 164, 108, 0.5), #fff2dc, rgba(214, 164, 108, 0.5), transparent); box-shadow: 0 0 30px 6px rgba(214, 164, 108, 0.16); opacity: 0.55; }
.sp-city { position: absolute; left: -4%; right: -4%; bottom: 0; width: 108%; height: 30vh; min-height: 160px; opacity: 0.8; mask-image: linear-gradient(180deg, transparent, #000 40%); }
.sp-city .b path { fill: rgba(159, 178, 211, 0.07); stroke: rgba(214, 164, 108, 0.28); stroke-width: 0.8; }
.sp-city .w rect { fill: #ffe2bb; opacity: 0.05; animation: bg-win 5s ease-in-out infinite; }
.sp-city line { stroke: rgba(214, 164, 108, 0.5); }
.sp-beam { position: absolute; top: -20%; width: 22vw; height: 140%; background: linear-gradient(90deg, transparent, rgba(255, 242, 220, 0.06), transparent); transform: rotate(18deg); }
.sp-beam.b1 { left: -30%; animation: sp-beam 7s ease-in-out infinite; }
.sp-beam.b2 { left: -30%; animation: sp-beam 9s ease-in-out 3s infinite; opacity: 0.7; }
@keyframes sp-beam { 0% { transform: translateX(0) rotate(18deg); } 100% { transform: translateX(170vw) rotate(18deg); } }
.sp-dust { position: absolute; top: 0; left: 0; width: 2px; height: 2px; border-radius: 50%; }
.sp-dust.d1 { box-shadow: 95vw 17vh 0 0px rgba(242,207,159,.55), 15vw 57vh 0 1px rgba(242,207,159,.55), 98vw 98vh 0 0px rgba(242,207,159,.55), 56vw 54vh 0 1px rgba(242,207,159,.55), 33vw 49vh 0 0px rgba(242,207,159,.55), 47vw 19vh 0 1px rgba(242,207,159,.55), 76vw 41vh 0 0px rgba(242,207,159,.55), 70vw 97vh 0 1px rgba(242,207,159,.55), 23vw 54vh 0 1px rgba(242,207,159,.55), 47vw 74vh 0 0px rgba(242,207,159,.55), 59vw 41vh 0 0px rgba(242,207,159,.55), 69vw 10vh 0 0px rgba(242,207,159,.55), 72vw 72vh 0 0px rgba(242,207,159,.55), 87vw 59vh 0 0px rgba(242,207,159,.55), 99vw 1vh 0 0px rgba(242,207,159,.55), 39vw 27vh 0 1px rgba(242,207,159,.55), 77vw 10vh 0 1px rgba(242,207,159,.55), 38vw 63vh 0 1px rgba(242,207,159,.55), 97vw 88vh 0 0px rgba(242,207,159,.55), 36vw 18vh 0 0px rgba(242,207,159,.55), 45vw 84vh 0 1px rgba(242,207,159,.55), 41vw 46vh 0 0px rgba(242,207,159,.55), 41vw 90vh 0 0px rgba(242,207,159,.55), 72vw 76vh 0 1px rgba(242,207,159,.55), 35vw 56vh 0 1px rgba(242,207,159,.55), 39vw 58vh 0 0px rgba(242,207,159,.55), 28vw 51vh 0 1px rgba(242,207,159,.55), 66vw 31vh 0 0px rgba(242,207,159,.55), 46vw 46vh 0 0px rgba(242,207,159,.55), 46vw 86vh 0 0px rgba(242,207,159,.55), 74vw 49vh 0 0px rgba(242,207,159,.55), 94vw 72vh 0 0px rgba(242,207,159,.55), 49vw 69vh 0 0px rgba(242,207,159,.55), 75vw 72vh 0 0px rgba(242,207,159,.55), 22vw 11vh 0 0px rgba(242,207,159,.55), 36vw 2vh 0 0px rgba(242,207,159,.55), 66vw 7vh 0 1px rgba(242,207,159,.55), 20vw 72vh 0 0px rgba(242,207,159,.55), 2vw 83vh 0 0px rgba(242,207,159,.55), 8vw 74vh 0 1px rgba(242,207,159,.55), 39vw 100vh 0 1px rgba(242,207,159,.55), 10vw 42vh 0 0px rgba(242,207,159,.55), 35vw 94vh 0 0px rgba(242,207,159,.55), 40vw 10vh 0 0px rgba(242,207,159,.55), 81vw 83vh 0 0px rgba(242,207,159,.55), 12vw 95vh 0 1px rgba(242,207,159,.55); animation: sp-rise 24s linear infinite; }
.sp-dust.d2 { box-shadow: 54vw 31vh 0 1px rgba(200,212,234,.45), 28vw 62vh 0 1px rgba(200,212,234,.45), 43vw 97vh 0 0px rgba(200,212,234,.45), 50vw 44vh 0 0px rgba(200,212,234,.45), 42vw 86vh 0 0px rgba(200,212,234,.45), 63vw 62vh 0 1px rgba(200,212,234,.45), 92vw 9vh 0 1px rgba(200,212,234,.45), 79vw 5vh 0 0px rgba(200,212,234,.45), 96vw 85vh 0 0px rgba(200,212,234,.45), 0vw 48vh 0 0px rgba(200,212,234,.45), 59vw 69vh 0 1px rgba(200,212,234,.45), 3vw 67vh 0 0px rgba(200,212,234,.45), 90vw 1vh 0 0px rgba(200,212,234,.45), 53vw 53vh 0 0px rgba(200,212,234,.45), 31vw 94vh 0 0px rgba(200,212,234,.45), 81vw 48vh 0 1px rgba(200,212,234,.45), 21vw 41vh 0 0px rgba(200,212,234,.45), 49vw 54vh 0 1px rgba(200,212,234,.45), 37vw 35vh 0 0px rgba(200,212,234,.45), 60vw 39vh 0 1px rgba(200,212,234,.45), 14vw 38vh 0 1px rgba(200,212,234,.45), 19vw 99vh 0 0px rgba(200,212,234,.45), 7vw 96vh 0 0px rgba(200,212,234,.45), 2vw 74vh 0 0px rgba(200,212,234,.45), 4vw 40vh 0 0px rgba(200,212,234,.45), 25vw 23vh 0 0px rgba(200,212,234,.45), 27vw 75vh 0 0px rgba(200,212,234,.45), 76vw 91vh 0 0px rgba(200,212,234,.45), 76vw 65vh 0 0px rgba(200,212,234,.45), 56vw 23vh 0 0px rgba(200,212,234,.45), 51vw 22vh 0 0px rgba(200,212,234,.45), 80vw 70vh 0 1px rgba(200,212,234,.45), 61vw 33vh 0 0px rgba(200,212,234,.45), 51vw 43vh 0 1px rgba(200,212,234,.45), 70vw 98vh 0 0px rgba(200,212,234,.45), 61vw 28vh 0 0px rgba(200,212,234,.45); animation: sp-rise 34s linear infinite; }
@keyframes sp-rise { from { transform: translateY(0); } to { transform: translateY(-100vh); } }
.sp-dust::after { content: ""; position: absolute; top: 100vh; left: 0; width: 2px; height: 2px; border-radius: 50%; box-shadow: inherit; }
#splash .sp-grid { mask-image: radial-gradient(circle at 50% 45%, #000 12%, transparent 58%); }
@media (max-width: 640px) { .sp-city { height: 22vh; } .sp-au { filter: blur(60px); } }

/* ================================================================ acceso: distrito urbano (día y noche, 28 s) */
.auth .hero { --cycle: 28s; }
/* Cielo: atardecer dorado → noche azul → amanecer. */
.auth .hero::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(10, 16, 32, 0.0), rgba(10, 16, 32, 0.0)); animation: sky-night var(--cycle) ease-in-out infinite; }
@keyframes sky-night { 0%, 30% { background: linear-gradient(180deg, rgba(214, 164, 108, 0.14), rgba(91, 117, 166, 0.06) 60%, transparent); }
  50%, 75% { background: linear-gradient(180deg, rgba(8, 14, 34, 0.75), rgba(20, 30, 60, 0.35) 60%, transparent); }
  100% { background: linear-gradient(180deg, rgba(214, 164, 108, 0.14), rgba(91, 117, 166, 0.06) 60%, transparent); } }
.auth-scene.district { position: absolute; width: min(92%, 680px); top: 46%; }
.district { overflow: visible; }

/* Terreno y calles. */
.district .pl-top { fill: rgba(28, 33, 44, 0.92); stroke: rgba(214, 164, 108, 0.35); stroke-width: 0.8; }
.district .pl-l { fill: #11151d; } .district .pl-r { fill: #0b0e14; }
.district .street { fill: rgba(9, 11, 16, 0.9); }
.district .lane { stroke: rgba(242, 207, 159, 0.55); stroke-width: 0.9; stroke-dasharray: 5 6; animation: lane-run 1.6s linear infinite; }
@keyframes lane-run { to { stroke-dashoffset: -11; } }
.district .corner { fill: #d6a46c; }
.district .plot { fill: none; stroke: #d6a46c; stroke-width: 1.2; stroke-dasharray: 1; stroke-dashoffset: 1; animation: plot-draw var(--cycle, 14s) cubic-bezier(.65, 0, .35, 1) infinite; animation-duration: 14s; }
@keyframes plot-draw { 0% { stroke-dashoffset: 1; } 10%, 90% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.district .pad.fl, .district .pad.fr, .district .pad.ft { fill: rgba(60, 66, 80, 0.7); stroke: rgba(214, 164, 108, 0.25); stroke-width: 0.5; }
.district .plaza.ft { fill: rgba(70, 72, 66, 0.55); } .district .plaza.fl, .district .plaza.fr { fill: #1a1d24; }
.district .fountain { fill: rgba(159, 178, 211, 0.35); stroke: rgba(200, 212, 234, 0.6); stroke-width: 0.8; animation: fountain 3s ease-in-out infinite; }
@keyframes fountain { 50% { fill: rgba(159, 178, 211, 0.55); } }

/* Torre de vidrio. */
.district .glass.fl { fill: url(#ds-glass-l); stroke: rgba(200, 212, 234, 0.35); stroke-width: 0.5; }
.district .glass.fr { fill: url(#ds-glass-r); stroke: rgba(200, 212, 234, 0.25); stroke-width: 0.5; }
.district .slab-line { fill: none; stroke: #e9e6df; stroke-width: 1.1; stroke-opacity: 0.8; }
.district .roof.fl, .district .roof.fr { fill: #2a2f39; stroke: rgba(242, 207, 159, 0.4); stroke-width: 0.6; }
.district .roof.ft { fill: #e9e6df; fill-opacity: 0.85; stroke: #f2cf9f; stroke-width: 0.6; }
.district .mast-thin { stroke: #d6a46c; stroke-width: 1.2; }
.district .beacon { fill: #e57a6e; filter: drop-shadow(0 0 4px #e57a6e); animation: beacon 1.4s steps(2) infinite; }
@keyframes beacon { 50% { opacity: 0.15; } }
.district .sheen { fill: url(#ds-sheen); mix-blend-mode: screen; animation: sheen-move 7s ease-in-out infinite; }
@keyframes sheen-move { 0%, 20% { transform: translateX(0); opacity: 0; } 30% { opacity: 1; } 60% { transform: translateX(52px) translateY(30px); opacity: 0.9; } 70%, 100% { transform: translateX(60px) translateY(34px); opacity: 0; } }

/* Ventanas: encendidas sobre todo de noche. */
.district .win { fill: #ffe2bb; opacity: 0.1; animation: win-night var(--cycle) ease-in-out infinite, win-light 4.2s ease-in-out infinite; }
.district .win.r { fill: #f2cf9f; }
@keyframes win-night { 0%, 30%, 100% { fill-opacity: 0.4; } 50%, 75% { fill-opacity: 1; } }

/* Obra: estructura de acero y losas. */
.district .beam { fill: none; stroke: rgba(214, 164, 108, 0.75); stroke-width: 1; }
.district .slab { fill: rgba(233, 230, 223, 0.08); stroke: rgba(233, 230, 223, 0.35); stroke-width: 0.6; }
.district .col { stroke: rgba(242, 207, 159, 0.85); stroke-width: 1.4; }
.district .brace { stroke: rgba(159, 178, 211, 0.4); stroke-width: 0.6; }
.district .mast { stroke: #d6a46c; stroke-width: 2; stroke-linecap: round; }
.district .lat { stroke: rgba(214, 164, 108, 0.55); stroke-width: 0.7; }
.district .cw { fill: rgba(214, 164, 108, 0.75); }
.district .cable { stroke: rgba(236, 238, 242, 0.55); stroke-width: 0.7; }
.district .load { fill: #9fb2d3; }
.district .jib2 { transform-box: view-box; animation: jib2 18s ease-in-out infinite; }
@keyframes jib2 { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(16deg); } }

/* Rotonda con cúpula. */
.district .cyl { fill: url(#ds-cyl); stroke: rgba(200, 212, 234, 0.4); stroke-width: 0.6; }
.district .rib { stroke: rgba(255, 242, 220, 0.18); stroke-width: 0.8; }
.district .cyl-top { fill: #2a2f39; stroke: rgba(242, 207, 159, 0.5); stroke-width: 0.6; }
.district .dome { fill: url(#ds-dome); stroke: rgba(242, 207, 159, 0.6); stroke-width: 0.6; }
.district .dome-hl { fill: none; stroke: rgba(255, 255, 255, 0.5); stroke-width: 1.2; stroke-linecap: round; }

/* Edificio bajo, techo verde y paneles solares. */
.district .low.fl { fill: rgba(200, 196, 186, 0.35); stroke: rgba(233, 230, 223, 0.4); stroke-width: 0.5; }
.district .low.fr { fill: rgba(120, 118, 112, 0.4); stroke: rgba(233, 230, 223, 0.3); stroke-width: 0.5; }
.district .low.ft { fill: rgba(233, 230, 223, 0.55); }
.district .green { fill: rgba(124, 198, 161, 0.55); stroke: rgba(124, 198, 161, 0.8); stroke-width: 0.5; }
.district .solar { fill: #1d3a63; stroke: #9fb2d3; stroke-width: 0.5; animation: solar 5s ease-in-out infinite; }
@keyframes solar { 50% { fill: #2f5a96; } }

/* Árboles que se mecen. */
.district .tree-shadow { fill: rgba(0, 0, 0, 0.35); }
.district .trunk { stroke: #6e5238; stroke-width: 1.6; }
.district .crown circle { fill: rgba(92, 160, 120, 0.85); }
.district .crown .hl { fill: rgba(170, 220, 180, 0.45); }
.district .crown { animation: sway 4s ease-in-out infinite; animation-delay: var(--sw, 0s); }
@keyframes sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }

/* Autos y alumbrado. */
.district .car .fl, .district .car .fr, .district .car .ft { stroke: rgba(0, 0, 0, 0.3); stroke-width: 0.3; }
.district .car .ft { fill: var(--car); } .district .car .fl { fill: color-mix(in srgb, var(--car) 70%, #000); } .district .car .fr { fill: color-mix(in srgb, var(--car) 50%, #000); }
.district .car-light { fill: #fff2dc; filter: drop-shadow(0 0 3px #ffe2bb); animation: night-on var(--cycle) ease-in-out infinite; }
.district .lamp line { stroke: #8e97a6; stroke-width: 1; }
.district .lamp-bulb { fill: #fff2dc; }
.district .lamp-glow { fill: rgba(255, 226, 187, 0.35); filter: blur(3px); animation: night-on var(--cycle) ease-in-out infinite; }
.district .lamp-pool { fill: rgba(255, 226, 187, 0.18); animation: night-on var(--cycle) ease-in-out infinite; }
@keyframes night-on { 0%, 32%, 100% { opacity: 0.08; } 48%, 78% { opacity: 1; } }

/* Cielo: sol, luna y nubes. */
.district .sky-sun { animation: sun-cycle var(--cycle) ease-in-out infinite; transform-box: view-box; }
.district .sun-core { fill: #ffe8c7; }
@keyframes sun-cycle { 0%, 28% { opacity: 1; transform: translateY(0); } 45%, 80% { opacity: 0; transform: translateY(60px); } 100% { opacity: 1; transform: translateY(0); } }
.district .sky-moon circle { fill: #e9edf6; } .district .sky-moon .moon-cut { fill: #0d1220; }
.district .sky-moon { opacity: 0; animation: moon-cycle var(--cycle) ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(200, 212, 234, 0.6)); }
@keyframes moon-cycle { 0%, 35% { opacity: 0; transform: translateY(30px); } 50%, 75% { opacity: 1; transform: none; } 90%, 100% { opacity: 0; } }
.district .cloud ellipse { fill: rgba(200, 212, 234, 0.12); }
.district .cloud.c1 { animation: cloud 42s linear infinite; } .district .cloud.c2 { animation: cloud 58s linear -20s infinite; }
@keyframes cloud { from { transform: translate(-80px, 130px); } to { transform: translate(700px, 110px); } }
.district .cloud.c2 { transform: translate(-80px, 60px); }

/* Dron de topografía. */
.district .drone .body { fill: #e9e6df; } .district .drone .arm { stroke: #8e97a6; stroke-width: 1.2; }
.district .drone .rotor { fill: rgba(200, 212, 234, 0.45); animation: rotor 0.15s linear infinite; transform-box: fill-box; transform-origin: center; }
@keyframes rotor { 50% { transform: scaleX(0.3); } }
.district .drone .led { fill: #7cc6a1; animation: beacon 0.9s steps(2) infinite; }
.district .drone .scan { fill: url(#ds-scan); animation: scan-pulse 2s ease-in-out infinite; }
@keyframes scan-pulse { 50% { opacity: 0.4; } }

/* Planos: cota, norte y escala. */
.district .dim2 line { stroke: rgba(236, 238, 242, 0.55); stroke-width: 0.8; }
.district .dim2 line:first-child { stroke-dasharray: 1; stroke-dashoffset: 1; animation: dim-draw 14s ease infinite; }
.district .tag.steel rect { stroke: rgba(159, 178, 211, 0.55); } .district .tag.steel text { fill: #c8d4ea; }
.district .compass circle { fill: rgba(7, 8, 11, 0.6); stroke: rgba(214, 164, 108, 0.5); }
.district .compass .n { fill: #d6a46c; } .district .compass text { fill: #f2cf9f; font: 600 9px var(--mono); }
.district .compass { animation: none; }
.district .scalebar rect { fill: #d6a46c; } .district .scalebar rect.w { fill: rgba(236, 238, 242, 0.25); }
.district .scalebar text { fill: #8b919c; font: 500 8.5px var(--mono); }

@media (max-width: 960px) {
  .auth .hero { display: flex; flex-direction: column; align-items: center; padding-bottom: 8px; }
  .auth .hero .brand-mobile { order: -1; position: relative; z-index: 1; }
  .auth-scene.district { position: relative; left: auto; top: auto; transform: none; display: block; width: min(76vw, 290px); margin: -4px auto -34px; }
  .district .tag, .district .scalebar, .district .compass { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .auth .hero::before { animation: none; }
  .district *, .district { animation: none !important; }
  .district .floor, .district .sky-moon { opacity: 1; }
  .district .sky-moon { opacity: 0; }
}
