/* ODÍN — aplicación (shell, asistente, visor de tableros, Mímir, Muninn) */
body.app { background: var(--bg); min-height: 100vh; }
.shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
@media (max-width: 1000px) { .shell { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- Barra lateral */
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: linear-gradient(180deg, #081634 0%, #0b1d45 100%); color: #c9d7f7; border-right: 1px solid rgba(255, 255, 255, .06); z-index: 60; }
.side-head { padding: 18px 16px 14px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.side-org { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none !important; }
.side-logo { width: 40px; height: 40px; border-radius: 11px; background: #fff; display: grid; place-items: center; overflow: hidden; flex: none; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .6); }
.side-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.side-logo.mark { background: none; padding: 0; }
.side-logo.mark img { padding: 0; }
.side-org b { display: block; font-size: .95rem; line-height: 1.2; }
.side-org small { display: block; font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: #8fa6d6; margin-top: 2px; }
.side-search { margin: 12px 14px 4px; }
.side-nav { flex: 1; overflow-y: auto; padding: 6px 0 12px; scrollbar-width: thin; scrollbar-color: #1f3470 transparent; }
.side-group { padding: 14px 18px 6px; font: 800 .64rem/1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: #6f87bd; }
.side-item { display: flex; align-items: center; gap: 10px; margin: 1px 10px; padding: 9px 10px; border-radius: 10px; color: #c9d7f7; font: 600 .87rem/1.25 var(--font); text-decoration: none !important; border: 1px solid transparent; cursor: pointer; background: none; width: calc(100% - 20px); text-align: left; }
.side-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.side-item.active { background: linear-gradient(90deg, rgba(59, 130, 246, .28), rgba(59, 130, 246, .08)); color: #fff; border-color: rgba(96, 165, 250, .3); box-shadow: inset 3px 0 0 var(--cyan-400); }
.side-item .ico { flex: none; opacity: .9; }
.side-item .count { margin-left: auto; font: 700 .68rem var(--font-mono); padding: 2px 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #dbe6ff; }
.side-item .dot { width: 7px; height: 7px; border-radius: 50%; margin-left: auto; background: var(--cyan-400); box-shadow: 0 0 10px var(--cyan-400); }
.side-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .08); display: grid; gap: 10px; }
.plan-card { padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); font-size: .8rem; }
.plan-card b { color: #fff; }
.meter { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, .1); overflow: hidden; margin-top: 6px; }
.meter > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.side .btn-light { width: 100%; }
.side-by { display: flex; align-items: center; gap: 8px; font-size: .7rem; color: #6f87bd; }
.side-by img { width: 18px; height: 18px; border-radius: 5px; }
.mobile-bar { display: none; }
@media (max-width: 1000px) {
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; transform: translateX(-102%); transition: transform .3s var(--ease); }
  .side.open { transform: none; box-shadow: 30px 0 80px rgba(0, 0, 0, .45); }
  .mobile-bar { display: flex; position: sticky; top: 0; z-index: 50; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #081634; color: #fff; }
}

/* ---------------------------------------------------------------- Contenido */
.main { min-width: 0; }
.page { padding: 28px clamp(16px, 3vw, 36px) 60px; max-width: 1560px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.5rem, 2.4vw, 2.1rem); margin: 4px 0 4px; }
.kicker { font: 800 .7rem/1 var(--font); letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.empty { text-align: center; padding: 60px 20px; border: 2px dashed var(--line-strong); border-radius: var(--r-xl); background: var(--surface); }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--r); margin-bottom: 18px; font-size: .9rem; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--ink-2); }
.banner.warn { border-color: rgba(217, 119, 6, .35); background: var(--warn-soft); }
.banner.bad { border-color: rgba(220, 38, 38, .35); background: var(--bad-soft); }

/* Tarjetas de tableros (inicio) */
.dash-tiles { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.dash-tile { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); text-decoration: none !important; color: inherit; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; position: relative; overflow: hidden; }
.dash-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-3); border-color: var(--accent-line); }
.dash-tile::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); }
.dash-tile h3 { margin: 0; font-size: 1.05rem; }
.dash-tile .headline { font-size: .86rem; color: var(--muted); min-height: 2.6em; }
.new-tile { display: grid; place-items: center; text-align: center; gap: 10px; border: 2px dashed var(--accent-line); background: var(--accent-soft); color: var(--accent); min-height: 190px; }

/* ---------------------------------------------------------------- Visor de tableros */
.dash-top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.dash-top-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px clamp(16px, 3vw, 36px); max-width: 1560px; margin: 0 auto; }
.dash-title h1 { font-size: clamp(1.2rem, 2vw, 1.6rem); margin: 2px 0 0; }
.dash-title p { margin: 2px 0 0; color: var(--muted); font-size: .86rem; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filterbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px clamp(16px, 3vw, 36px) 12px; max-width: 1560px; margin: 0 auto; }
.seg { display: inline-flex; padding: 3px; border-radius: 11px; background: var(--surface-3); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 8px; font: 700 .78rem var(--font); color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
.fchip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; border-radius: 999px; background: var(--accent); color: #fff; font: 700 .78rem var(--font); }
.fchip button { border: 0; background: rgba(255, 255, 255, .22); color: #fff; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.fchip svg { width: 12px; height: 12px; }
.fbtn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: 700 .8rem var(--font); cursor: pointer; }
.fbtn:hover { border-color: var(--accent-line); color: var(--accent); }
.fbtn.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.popover { position: absolute; z-index: 300; width: 300px; max-height: 380px; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--sh-3); padding: 10px; animation: pop .2s var(--ease); }
.popover .list { overflow-y: auto; margin-top: 8px; display: grid; gap: 2px; }
.popover label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; font-size: .85rem; cursor: pointer; }
.popover label:hover { background: var(--surface-2); }
.popover label small { margin-left: auto; color: var(--faint); font-family: var(--font-mono); font-size: .72rem; }

.dash-body { padding: 18px clamp(16px, 3vw, 36px) 64px; max-width: 1560px; margin: 0 auto; }
.wgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.wgrid > .wcard { grid-column: span var(--span, 6); }
@media (max-width: 1180px) { .wgrid > .wcard { grid-column: span 12; } .wgrid > .w-kpi { grid-column: span 6; } }
@media (max-width: 640px) { .wgrid { grid-template-columns: 1fr; } .wgrid > .wcard, .wgrid > .w-kpi { grid-column: 1 / -1; } }

.wcard { position: relative; display: flex; flex-direction: column; min-width: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 92%, var(--accent) 3%), var(--surface) 40%); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--sh-1); transition: box-shadow .25s var(--ease), border-color .25s; }
.wcard:hover { box-shadow: var(--sh-2); border-color: color-mix(in srgb, var(--line) 50%, var(--accent) 50%); }
.wcard.focus { outline: 2px solid var(--accent); }
.wcard-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 18px 0; }
.wcard-h h3 { margin: 0; font-size: .98rem; letter-spacing: -.01em; line-height: 1.3; }
.wcard-h p { margin: 3px 0 0; font-size: .78rem; color: var(--muted); }
.wcard-actions { display: flex; gap: 2px; opacity: .55; transition: opacity .2s; }
.wcard:hover .wcard-actions, .wcard:focus-within .wcard-actions { opacity: 1; }
.wcard-actions button { border: 0; background: transparent; color: var(--muted); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.wcard-actions button:hover { background: var(--accent-soft); color: var(--accent); }
.wcard-b { flex: 1; padding: 8px 12px 10px; min-height: 0; }
.chart { width: 100%; height: 300px; }
.w-lg .chart, .w-xl .chart { height: 330px; }
.w-sm .chart { height: 280px; }
.wcard-f { padding: 0 18px 14px; font-size: .8rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.wcard-f .ai { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.wcard-f .ai svg { width: 12px; height: 12px; }
.w-error { padding: 30px 16px; text-align: center; color: var(--muted); font-size: .88rem; }

/* KPI */
.kpi { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 6px; height: 100%; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font: 800 .7rem/1.3 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.kpi-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.kpi-value { font: 800 clamp(1.55rem, 2.2vw, 2.05rem)/1.05 var(--font-mono); letter-spacing: -.035em; color: var(--ink); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 3px 8px 3px 6px; border-radius: 999px; font: 800 .76rem/1 var(--font-mono); }
.delta svg { width: 12px; height: 12px; }
.delta.good { background: var(--good-soft); color: var(--good); }
.delta.bad { background: var(--bad-soft); color: var(--bad); }
.delta.flat { background: var(--surface-3); color: var(--muted); }
.spark { height: 46px; margin-top: auto; }
.kpi-target { font-size: .74rem; color: var(--muted); }
.kpi-target .meter { background: var(--surface-3); height: 5px; }

/* Resumen IA */
.insight-hero { position: relative; overflow: hidden; border-radius: 22px; padding: 22px 24px; margin-bottom: 18px; color: #e6eeff; background: radial-gradient(700px 300px at 100% 0%, rgba(96, 165, 250, .22), transparent 60%), linear-gradient(135deg, #081634, #12307c 70%, #1d4ed8); box-shadow: var(--sh-3); }
.insight-hero h2 { color: #fff; font-size: clamp(1.15rem, 2vw, 1.5rem); margin: 6px 0 8px; max-width: 900px; }
.insight-hero p { color: #c9d7f7; max-width: 900px; margin: 0; }
.insight-hero .kicker { color: #93c5fd; display: inline-flex; gap: 8px; align-items: center; }
.insights { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 16px; }
.insight { padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); cursor: pointer; transition: background .2s; }
.insight:hover { background: rgba(255, 255, 255, .12); }
.insight b { display: flex; gap: 7px; align-items: center; color: #fff; font-size: .86rem; margin-bottom: 4px; }
.insight span { font-size: .8rem; color: #c9d7f7; line-height: 1.45; display: block; }
.insight i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.i-positivo i { background: #34d399; } .i-alerta i { background: #fbbf24; } .i-riesgo i { background: #f87171; } .i-oportunidad i { background: #60a5fa; }
.actions-list { margin-top: 14px; display: grid; gap: 8px; }
.action { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: #dbe6ff; }
.action .n { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, .12); font: 800 .72rem var(--font-mono); }
.hero-raven { position: absolute; right: 18px; top: 16px; width: 54px; height: 54px; opacity: .9; }

/* Pestañas de páginas del tablero */
.page-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.page-tab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font: 700 .84rem var(--font); cursor: pointer; white-space: nowrap; }
.page-tab[aria-selected="true"] { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }

/* Bloqueo por prueba vencida */
.locked { position: relative; }
.locked .dash-body > *:not(.lock-over) { filter: blur(7px) saturate(.7); pointer-events: none; user-select: none; }
.lock-over { position: fixed; inset: auto 0 0 0; z-index: 70; display: grid; place-items: center; padding: 24px; pointer-events: none; }
.lock-card { pointer-events: auto; max-width: 560px; text-align: center; padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-3); }

/* ---------------------------------------------------------------- Mímir (chat) */
.drawer-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-b { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.drawer-f { padding: 12px 14px; border-top: 1px solid var(--line); }
.msg { max-width: 92%; padding: 11px 14px; border-radius: 16px; font-size: .9rem; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.ai { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.ai .chart { height: 220px; margin-top: 10px; }
.msg.ai ul { margin: 6px 0; padding-left: 18px; }
.suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.suggest button { border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 6px 11px; font: 600 .78rem var(--font); cursor: pointer; text-align: left; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { min-height: 46px; max-height: 140px; resize: none; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

/* ---------------------------------------------------------------- Asistente de alta */
.wizard { max-width: 1060px; margin: 0 auto; }
.stepper { display: flex; gap: 8px; margin: 6px 0 26px; flex-wrap: wrap; }
.stepper .st { display: flex; align-items: center; gap: 9px; padding: 8px 14px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 700 .82rem var(--font); color: var(--muted); }
.stepper .st b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-3); font: 800 .75rem var(--font-mono); color: var(--muted); }
.stepper .st.on { border-color: var(--accent); color: var(--ink); }
.stepper .st.on b { background: var(--accent); color: #fff; }
.stepper .st.done b { background: var(--good); color: #fff; }
.area-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.area { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; font: inherit; color: inherit; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.area:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.area[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.area b { font-size: .92rem; }
.area span { font-size: .78rem; color: var(--muted); line-height: 1.4; }
.area .tag { position: absolute; top: 10px; right: 10px; }
.area[hidden] { display: none; }
.area-tools { display: grid; gap: 10px; margin-bottom: 14px; }
.area-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted); transition: border-color .2s, box-shadow .2s; }
.area-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.area-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink, inherit); font: 500 .95rem var(--font); padding: 12px 0; }
.area-groups button .muted { font-weight: 500; opacity: .75; }
.area-groups button[aria-pressed="true"] .muted { color: inherit; }
.area-empty { margin: 12px 2px 0; }
@media (max-width: 640px) { .area-groups { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; } .area-groups button { flex: none; } }
.drop { display: grid; place-items: center; gap: 10px; text-align: center; padding: 42px 20px; border-radius: 22px; border: 2px dashed var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), transparent); cursor: pointer; transition: background .2s, border-color .2s; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop .icon-tile { width: 60px; height: 60px; border-radius: 18px; }
.file-list { display: grid; gap: 8px; margin-top: 14px; }
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; }
.file-row .ext { font: 800 .66rem var(--font-mono); padding: 4px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); text-transform: uppercase; }
.progress { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--grad-brand); transition: width .3s; }
.profile-table { display: grid; gap: 14px; }
.col-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: .8rem; margin: 3px; }
.col-pill i { font-style: normal; font: 700 .64rem var(--font-mono); text-transform: uppercase; color: var(--accent); }
.forge { max-width: 640px; margin: 20px auto; text-align: center; }
.forge-raven { width: 110px; height: 110px; margin: 0 auto 18px; border-radius: 30px; box-shadow: 0 30px 60px -20px rgba(37, 99, 235, .7); animation: float 3s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }
.forge-steps { display: grid; gap: 8px; text-align: left; margin-top: 22px; }
.fstep { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.fstep .s { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-3); }
.fstep.active { color: var(--ink); border-color: var(--accent-line); box-shadow: 0 0 0 4px var(--accent-soft); }
.fstep.active .s { background: var(--accent-soft); color: var(--accent); }
.fstep.done { color: var(--ink-2); }
.fstep.done .s { background: var(--good); color: #fff; }
.fstep.error .s { background: var(--bad); color: #fff; }
.fstep small { display: block; font-size: .76rem; color: var(--muted); }

/* ---------------------------------------------------------------- Muninn (captura) */
.cap-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
@media (max-width: 1100px) { .cap-grid { grid-template-columns: 1fr; } }
.phone { width: 360px; max-width: 100%; margin: 0 auto; border-radius: 40px; padding: 12px; background: #0a1633; box-shadow: var(--sh-3); }
.phone-screen { border-radius: 30px; overflow: hidden; background: var(--bg); max-height: 680px; overflow-y: auto; }
.cform { padding: 18px; display: grid; gap: 14px; }
.cform-head { padding: 22px 18px 18px; color: #fff; background: var(--grad-navy); }
.cform-head h2 { color: #fff; font-size: 1.25rem; margin: 10px 0 4px; }
.cform-head p { color: #c9d7f7; font-size: .85rem; margin: 0; }
.cform fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; }
.cform legend { font: 800 .72rem var(--font); letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.stars { display: flex; gap: 6px; }
.stars button { border: 0; background: none; font-size: 1.6rem; line-height: 1; color: var(--line-strong); cursor: pointer; padding: 0; }
.stars button.on { color: #f5b301; }
.toggle { display: inline-flex; border-radius: 12px; border: 1px solid var(--line-strong); overflow: hidden; }
.toggle button { border: 0; padding: 10px 18px; background: var(--surface); font: 700 .88rem var(--font); cursor: pointer; color: var(--muted); }
.toggle button.on { background: var(--accent); color: #fff; }
.records { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }

/* ---------------------------------------------------------------- Público (captura en campo, compartido) */
body.public-capture { background: var(--bg); }
.pc-wrap { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--surface); box-shadow: var(--sh-2); }
.pc-foot { text-align: center; padding: 18px; font-size: .75rem; color: var(--muted); }

/* ---------------------------------------------------------------- Impresión / PDF */
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff !important; }
  .side, .mobile-bar, .toolbar, .filterbar .fbtn, .wcard-actions, .drawer, .toast-wrap, .no-print, .page-tabs { display: none !important; }
  .shell { display: block; }
  .dash-top { position: static; background: #fff; border: 0; }
  .wcard { break-inside: avoid; box-shadow: none; border-color: #dbe2ef; }
  .insight-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .print-all [data-page] { display: grid !important; margin-bottom: 18px; }
}

/* Móvil: barras de herramientas y filtros en una sola fila deslizable */
@media (max-width: 760px) {
  .dash-top-inner { gap: 10px; }
  .toolbar, .filterbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .toolbar::-webkit-scrollbar, .filterbar::-webkit-scrollbar { display: none; }
  .toolbar > *, .filterbar > * { flex: none; }
  .dash-title h1 { font-size: 1.15rem; }
}
.demo-nav { background: #081634 !important; }
@media (max-width: 640px) { .demo-nav .chip { display: none; } .demo-nav .btn { min-height: 38px; padding: 8px 12px; font-size: .85rem; } }
@media (max-width: 640px) { .hero-raven { display: none; } .insight-hero { padding: 18px; } }

/* ---------------------------------------------------------------- Vida: entradas, hover y estados vacíos
   Solo transform/opacity. Los colores de las gráficas no cambian (validados para accesibilidad). */
@keyframes app-rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes kpi-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes dot-pulse { 50% { opacity: .45; transform: scale(.8); } }
@keyframes aurora { to { transform: translate(-140px, 70px) scale(1.25); } }

/* Barra lateral: iconos que responden */
.side-item { transition: background .2s, color .2s, border-color .2s, transform .25s var(--ease); }
.side-item:hover { transform: translateX(2px); }
.side-item .ico { transition: transform .35s var(--ease), color .2s; }
.side-item:hover .ico { transform: scale(1.14) rotate(-6deg); color: #93c5fd; }
.side-item.active .ico { color: #93c5fd; }
.side-item .dot { animation: dot-pulse 2.4s ease-in-out infinite; }
.side-logo { transition: transform .4s var(--ease); }
.side-org:hover .side-logo { transform: rotate(-6deg) scale(1.05); }
.meter > i { transition: width .8s var(--ease); }

/* Inicio: tarjetas de tableros */
.dash-tiles > * { animation: app-rise .5s var(--ease) backwards; }
.dash-tiles > :nth-child(2) { animation-delay: .05s; } .dash-tiles > :nth-child(3) { animation-delay: .1s; } .dash-tiles > :nth-child(4) { animation-delay: .15s; } .dash-tiles > :nth-child(n+5) { animation-delay: .2s; }
.dash-tile::after { transition: transform .6s var(--ease); }
.dash-tile:hover::after { transform: scale(1.7); }
.dash-tile::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad-brand); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.dash-tile:hover::before { transform: none; }
.dash-tile .icon-tile { transition: transform .45s var(--ease); }
.dash-tile:hover .icon-tile { transform: rotate(-8deg) scale(1.08); }
.new-tile { transition: transform .25s var(--ease), background .25s, border-color .25s; }
.new-tile:hover { border-style: solid; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.new-tile:hover .icon-tile { transform: rotate(90deg) scale(1.08); }

/* Visor: tarjetas con brillo de marca y KPIs que aparecen */
.wcard { transition: box-shadow .3s var(--ease), border-color .3s, transform .3s var(--ease); }
.wcard:hover { box-shadow: 0 20px 44px -26px color-mix(in srgb, var(--accent) 60%, transparent), var(--sh-1); }
.wgrid > .wcard { animation: app-rise .5s var(--ease) backwards; }
.wgrid > .wcard:nth-child(2) { animation-delay: .04s; } .wgrid > .wcard:nth-child(3) { animation-delay: .08s; } .wgrid > .wcard:nth-child(4) { animation-delay: .12s; } .wgrid > .wcard:nth-child(5) { animation-delay: .16s; } .wgrid > .wcard:nth-child(6) { animation-delay: .2s; } .wgrid > .wcard:nth-child(n+7) { animation-delay: .24s; }
.w-kpi:hover { transform: translateY(-3px); }
.w-kpi::before { content: ""; position: absolute; left: 18px; right: 18px; top: -1px; height: 3px; border-radius: 0 0 3px 3px; background: var(--grad-brand); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); pointer-events: none; }
.w-kpi:hover::before { transform: none; }
.kpi-value { animation: kpi-in .55s var(--ease) backwards; font-variant-numeric: tabular-nums; }
.kpi-row, .kpi-target { animation: kpi-in .55s .08s var(--ease) backwards; }
.kpi-ico { transition: transform .45s var(--ease), background .3s, color .3s; }
.w-kpi:hover .kpi-ico { transform: rotate(-8deg) scale(1.08); background: var(--accent); color: #fff; }
.delta { transition: transform .25s var(--ease); }
.w-kpi:hover .delta { transform: translateY(-1px); }
.wcard-actions button { transition: background .2s, color .2s, transform .2s var(--ease); }
.wcard-actions button:hover { transform: translateY(-1px); }
.page-tab { transition: border-color .2s, color .2s, background .2s, transform .2s var(--ease); }
.page-tab:hover:not([aria-selected="true"]) { border-color: var(--accent-line); color: var(--accent); transform: translateY(-1px); }
.seg button { transition: color .2s, background .2s; }
.seg button:hover:not([aria-pressed="true"]) { color: var(--ink); }
.fbtn { transition: border-color .2s, color .2s, background .2s, transform .2s var(--ease); }
.fbtn:hover { transform: translateY(-1px); }

/* Resumen ejecutivo: aurora suave detrás del texto */
.insight-hero { isolation: isolate; }
.insight-hero::after { content: ""; position: absolute; z-index: -1; width: 440px; height: 440px; right: -140px; top: -220px; border-radius: 50%; background: radial-gradient(closest-side, rgba(96, 165, 250, .22), transparent); pointer-events: none; animation: aurora 16s ease-in-out infinite alternate; }
.insight { transition: background .2s, transform .25s var(--ease), border-color .25s; }
.insight:hover { transform: translateY(-2px); border-color: rgba(147, 197, 253, .35); }

/* Asistente: zona de carga y pasos */
.drop .icon-tile { transition: transform .4s var(--ease), box-shadow .4s; }
.drop:hover { border-color: var(--accent); }
.drop:hover .icon-tile { transform: translateY(-4px); box-shadow: 0 16px 30px -12px rgba(37, 99, 235, .7); }
.drop.over .icon-tile { animation: float 1.2s ease-in-out infinite; }
.file-row { animation: app-rise .35s var(--ease) backwards; }
.area[aria-pressed="true"] { background: linear-gradient(180deg, var(--accent-soft), transparent 70%), var(--surface); }
.stepper .st { transition: border-color .3s, color .3s; }
.fstep { transition: border-color .3s, box-shadow .3s, color .3s; }
.fstep.done .s { animation: kpi-in .4s var(--ease); }

/* Estados vacíos con el cuervo */
.empty { position: relative; overflow: hidden; background: radial-gradient(520px 220px at 50% 0%, var(--accent-soft), transparent 70%), var(--surface); }
.empty:not(:has(.icon-tile))::before { content: ""; display: block; width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 22px; background: url("/assets/img/odin-mark.svg") center / cover no-repeat; box-shadow: 0 18px 40px -16px rgba(37, 99, 235, .7), 0 0 0 8px var(--accent-soft); animation: float 4s ease-in-out infinite; }
.empty .icon-tile { animation: float 4s ease-in-out infinite; }
.lock-card { animation: app-rise .5s var(--ease) backwards; }

/* Demo público: cierre con llamada a la acción */
.demo-cta { padding: 44px 20px 64px; }
.demo-cta-card { position: relative; isolation: isolate; overflow: hidden; max-width: 980px; margin: 0 auto; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px 26px; align-items: center; padding: clamp(22px, 4vw, 36px); border-radius: var(--r-xl); background: var(--grad-navy); color: #dbe6ff; box-shadow: var(--sh-3); }
.demo-cta-card::after { content: ""; position: absolute; z-index: -1; width: 360px; height: 360px; right: -120px; top: -180px; border-radius: 50%; background: radial-gradient(closest-side, rgba(96, 165, 250, .28), transparent); animation: aurora 14s ease-in-out infinite alternate; }
.demo-cta-card img { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--sh-glow); animation: float 5s ease-in-out infinite; }
.demo-cta-card h2 { color: #fff; margin: 0 0 6px; font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.demo-cta-card p { margin: 0; color: #b3c3e6; }
.demo-cta-card .row { justify-content: flex-end; }
.demo-cta-card .btn-light { --b-bg: rgba(255, 255, 255, .1); --b-fg: #fff; --b-bd: rgba(255, 255, 255, .25); }
@media (max-width: 760px) { .demo-cta-card { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; } .demo-cta-card .row { justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .insight-hero::after, .demo-cta-card::after, .empty::before, .empty .icon-tile { animation: none !important; } }

/* ---------------------------------------------------------------- Aurora en la app: más color, progreso visible y celebración
   Loops con transform/opacity, pausados fuera de pantalla ([data-live]); con «reducir movimiento» todo queda quieto. */
@keyframes halo-out { 0% { opacity: .7; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.7); } }

/* Barra lateral: cielo nocturno con aurora y grupos con su color */
.side { overflow: hidden; background: radial-gradient(320px 280px at 0% 100%, rgba(59, 130, 246, .26), transparent 70%), radial-gradient(300px 220px at 100% 0%, rgba(96, 165, 250, .14), transparent 70%), linear-gradient(180deg, #081634 0%, #0b1d45 100%); }
.side > .sky { z-index: 0; }
.side > .sky .sky-stars { opacity: .45; }
.side > .sky .sky-stars.s2 { opacity: .2; }
.side > :not(.sky) { position: relative; z-index: 1; }
.side-group { display: flex; align-items: center; gap: 8px; }
.side-group::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--g, #60a5fa); box-shadow: 0 0 10px var(--g, #60a5fa); flex: none; }
.g-odin { --g: #60a5fa; } .g-huginn { --g: #60a5fa; } .g-muninn { --g: #93c5fd; } .g-cuenta { --g: #fbbf24; }
.side-item.active { background: linear-gradient(90deg, rgba(37, 99, 235, .32), rgba(59, 130, 246, .08)); box-shadow: inset 3px 0 0 #93c5fd, 0 8px 22px -14px rgba(59, 130, 246, .8); }
.meter > i { background: linear-gradient(90deg, #60a5fa, #3b82f6, #3b82f6); }
.mobile-bar { background: linear-gradient(90deg, #081634, #13265e); box-shadow: inset 0 -2px 0 rgba(59, 130, 246, .45); }

/* Inicio: portada del centro de mando */
.home-hero { position: relative; overflow: hidden; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px 40px; align-items: center; padding: clamp(22px, 3.4vw, 40px); margin-bottom: 26px; border-radius: var(--r-xl); background: var(--grad-sky); color: #dbe6ff; box-shadow: 0 30px 70px -40px rgba(8, 22, 52, .9); animation: app-rise .55s var(--ease) backwards; }
.home-hero > .sky, .home-hero > .flock { z-index: 0; }
.home-hero > :not(.sky):not(.flock) { position: relative; z-index: 1; }
.home-hero .kicker { color: #93c5fd; }
.home-hero h1 { color: #fff; font-size: clamp(1.6rem, 2.8vw, 2.4rem); margin: 8px 0 6px; }
.home-sub { color: #a9bbe0; margin: 0 0 16px; }
.home-stats { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.home-stats li { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .13); font-size: .84rem; color: #dbe6ff; }
.home-stats b { color: #fff; }
.home-stats .tone-cyan svg { color: #93c5fd; } .home-stats .tone-violet svg { color: #bfdbfe; } .home-stats .tone-teal svg { color: #bfdbfe; }
.home-hero-ring { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 18px 22px; border-radius: 22px; background: rgba(8, 22, 52, .35); border: 1px solid rgba(255, 255, 255, .13); }
.home-hero .pring { --ring-track: rgba(255, 255, 255, .12); filter: drop-shadow(0 0 14px rgba(59, 130, 246, .45)); }
.home-hero .pring .ring-v { color: #fff; font-size: 2rem; }
.home-hero .pring .ring-v small { font-size: .5em; color: #a9bbe0; }
.hr-l { font: 800 .68rem/1 var(--font); letter-spacing: .16em; text-transform: uppercase; color: #9fb4e0; }
.hr-next { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .84rem; color: #93c5fd !important; }
.hr-next.is-done { color: #34d399 !important; }
.hr-next svg { transition: transform .25s var(--ease); }
.hr-next:hover svg { transform: translateX(3px); }
@media (max-width: 760px) { .home-hero { grid-template-columns: minmax(0, 1fr); } .home-hero-ring { grid-template-columns: auto minmax(0, 1fr); justify-items: start; text-align: left; } .home-hero-ring .pring { grid-row: span 2; } .home-hero .btn-lg { width: 100%; } }

/* Ruta de activación */
.act-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.act-steps a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; color: inherit; text-decoration: none !important; border: 1px solid transparent; transition: background .2s, border-color .2s, transform .25s var(--ease); }
.act-steps a:hover { background: var(--surface-2); transform: translateX(2px); }
.act-ic { position: relative; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--accent-soft); color: var(--accent); flex: none; }
.act-l { flex: 1; font-size: .88rem; }
.act-steps .ok .act-ic { background: var(--good); color: #fff; }
.act-steps .ok .act-l { text-decoration: line-through; color: var(--muted); }
.act-steps .next a { border-color: var(--accent-line); background: linear-gradient(90deg, var(--accent-soft), transparent); }
.act-steps .next .act-ic { background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff; }
.act-steps .next .act-ic::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid #3b82f6; opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .act-steps .next .act-ic::after { animation: halo-out 2.4s ease-out infinite; } }
.progress > i { background: linear-gradient(90deg, #2563eb, #3b82f6 60%, #60a5fa); }

/* Tarjetas de tablero con el tono de su área */
.dash-tile[class*="tone-"]::before { background: var(--tone-grad); }
.dash-tile[class*="tone-"]::after { background: radial-gradient(circle, color-mix(in srgb, var(--tone) 20%, transparent), transparent 70%); }
.dash-tile[class*="tone-"]:hover { border-color: color-mix(in srgb, var(--tone) 45%, transparent); box-shadow: 0 26px 60px -30px color-mix(in srgb, var(--tone) 70%, transparent); }
.bifrost-card { position: relative; }
.bifrost-card > :not(.bf-mini) { position: relative; z-index: 1; }
.bf-mini { position: absolute; right: -8px; bottom: -6px; width: 150px; height: auto; opacity: .5; z-index: 0; pointer-events: none; }
.bf-mini path { fill: none; stroke-width: 5; stroke-linecap: round; }

/* Asistente: línea de avance, iconos y arte por paso */
.stepper { position: relative; width: fit-content; max-width: 100%; }
.stepper .st { position: relative; z-index: 1; }
.stepper .st b svg { width: 14px; height: 14px; }
.stepper .st.on { box-shadow: 0 10px 26px -14px rgba(37, 99, 235, .8); }
.stepper .st.on b { background: linear-gradient(135deg, #2563eb, #1e40af); position: relative; }
.stepper .st.on b::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #3b82f6; opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .stepper .st.on b::after { animation: halo-out 2.4s ease-out infinite; } }
@media (min-width: 700px) {
  .stepper::before, .stepper::after { content: ""; position: absolute; left: 22px; right: 22px; top: 50%; height: 2px; margin-top: -1px; border-radius: 2px; background: var(--line); }
  .stepper::after { background: linear-gradient(90deg, #059669, #2563eb, #3b82f6); transform-origin: 0 50%; transform: scaleX(var(--wp, 0)); transition: transform .8s var(--ease); }
}
.wiz-head { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px 28px; align-items: center; }
.wiz-head h1 { margin-top: 6px; }
.wiz-art { width: 100%; height: auto; overflow: visible; }
@media (max-width: 760px) { .wiz-head { grid-template-columns: minmax(0, 1fr); } .wiz-art { display: none; } }
.wa-glow { fill: var(--accent-soft); }
.wa-web { fill: none; stroke: var(--accent-line); stroke-width: 1.4; stroke-dasharray: 3 5; stroke-linecap: round; }
.wa-win rect { fill: #bfdbfe; opacity: .35; }
@media (prefers-reduced-motion: no-preference) { .wa-win rect { animation: wa-lamp 5s ease-in-out infinite; animation-delay: calc(var(--i) * .37s); } }
@keyframes wa-lamp { 0%, 100% { opacity: .3; } 40% { opacity: .95; } }
.wa-annex { fill: #1e3a8a; opacity: .55; }
.wa-spark path { fill: #f59e0b; transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) { .wa-spark path { animation: breathe-app 3s ease-in-out infinite; } .wa-spark path + path { animation-delay: -1.5s; } .wa-perch .bw { transform-box: fill-box; transform-origin: 50% 100%; animation: wa-flap 1.6s ease-in-out infinite alternate; } }
@keyframes breathe-app { 50% { opacity: .5; transform: scale(.7); } }
@keyframes wa-flap { to { transform: scaleY(.55); } }
.wa-ring { fill: none; stroke: var(--accent-line); stroke-width: 1.4; stroke-dasharray: 3 6; }
.wa-ring.r2 { stroke-dasharray: none; opacity: .6; } .wa-ring.r3 { stroke-dasharray: 2 4; }
.wa-orbit { transform-box: view-box; transform-origin: 110px 72px; }
@media (prefers-reduced-motion: no-preference) { .wa-orbit { animation: spin 36s linear infinite; } .wa-eye { transform-box: fill-box; transform-origin: center; animation: breathe-app 3s ease-in-out infinite; } .wa-file { animation: float 5s ease-in-out infinite; } .wa-file.f2 { animation-delay: -1.6s; } .wa-file.f3 { animation-delay: -3.2s; } }
.wa-cross { stroke: var(--accent-line); stroke-width: 2; stroke-linecap: round; }
.wa-well { fill: var(--accent-soft); stroke: var(--accent-line); }
.wa-file rect { fill: var(--surface); stroke-width: 1.6; }
.wa-file text { font: 800 9px var(--font-mono); letter-spacing: .02em; }
.wa-file.f1 rect { stroke: #2563eb; } .wa-file.f1 text { fill: #2563eb; }
.wa-file.f2 rect { stroke: #0d9488; } .wa-file.f2 text { fill: #0d9488; }
.wa-file.f3 rect { stroke: #1e40af; } .wa-file.f3 text { fill: #1e40af; }
[data-theme="dark"] .wa-file.f1 text { fill: #93c5fd; } [data-theme="dark"] .wa-file.f2 text { fill: #bfdbfe; } [data-theme="dark"] .wa-file.f3 text { fill: #bfdbfe; }
.wa-flow { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-dasharray: 2 5; stroke-linecap: round; opacity: .7; }

/* Áreas del asistente con tono; seleccionada con borde y palomita */
.area[class*="tone-"]:hover { border-color: color-mix(in srgb, var(--tone) 45%, transparent); box-shadow: 0 16px 34px -22px var(--tone-glow); }
.area[class*="tone-"][aria-pressed="true"] { border-color: var(--tone); box-shadow: 0 0 0 4px var(--tone-soft), 0 18px 40px -24px var(--tone-glow); background: linear-gradient(180deg, var(--tone-soft), transparent 70%), var(--surface); }
.area[aria-pressed="true"]::after { content: ""; position: absolute; right: 10px; bottom: 10px; width: 22px; height: 22px; border-radius: 50%; background: var(--tone, var(--accent)) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; animation: kpi-in .35s var(--ease); }
.area[class*="tone-"] .icon-tile { transition: transform .45s var(--ease), background .3s, color .3s; }
.area[class*="tone-"]:hover .icon-tile, .area[class*="tone-"][aria-pressed="true"] .icon-tile { transform: rotate(-8deg) scale(1.06); background: var(--tone-grad); color: #fff; }
.suggest button { transition: transform .2s var(--ease), background .2s, box-shadow .2s; }
.suggest button:hover { transform: translateY(-1px); }
.suggest button[aria-pressed="true"] { background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff; border-color: transparent; box-shadow: 0 8px 20px -10px rgba(30, 64, 175, .8); }

/* Zona de carga: archivos que flotan alrededor */
.drop { position: relative; overflow: hidden; background: radial-gradient(420px 180px at 50% 0%, rgba(59, 130, 246, .1), transparent 70%), linear-gradient(180deg, var(--accent-soft), transparent); }
.drop-art { position: relative; display: grid; place-items: center; width: 170px; height: 92px; }
.drop-art .dc { position: absolute; font: 800 .6rem/1 var(--font-mono); letter-spacing: .03em; padding: 6px 8px; border-radius: 7px; color: #fff; box-shadow: 0 8px 18px -8px rgba(8, 22, 52, .5); transition: translate .5s var(--ease-spring); }
.dc1 { left: 2px; top: 8px; background: var(--grad-brand); rotate: -12deg; } .dc2 { right: 6px; top: 0; background: var(--grad-teal); rotate: 10deg; }
.dc3 { left: 16px; bottom: 2px; background: var(--grad-violet); rotate: 8deg; } .dc4 { right: 0; bottom: 10px; background: var(--grad-gold); rotate: -8deg; }
.drop:hover .dc1, .drop.over .dc1 { translate: -8px -4px; } .drop:hover .dc2, .drop.over .dc2 { translate: 8px -5px; } .drop:hover .dc3, .drop.over .dc3 { translate: -9px 4px; } .drop:hover .dc4, .drop.over .dc4 { translate: 9px 3px; }
@media (prefers-reduced-motion: no-preference) { .drop-art .dc { animation: float 4.5s ease-in-out infinite; } .dc2 { animation-delay: -1.1s !important; } .dc3 { animation-delay: -2.2s !important; } .dc4 { animation-delay: -3.3s !important; } }
.pring.q-good { --ring-track: var(--good-soft); } .pring.q-mid { --ring-track: var(--warn-soft); }

/* Forja: portal de aurora, anillo con avance real y celebración */
.forge-stage { position: relative; width: 220px; height: 220px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; isolation: isolate; overflow: hidden; background: var(--grad-sky); box-shadow: 0 0 0 6px var(--accent-soft), 0 30px 70px -30px rgba(59, 130, 246, .8); transition: box-shadow .6s var(--ease); }
.forge-stage > .sky, .forge-stage > .flock { z-index: 0; }
.forge-stage .forge-raven { position: relative; z-index: 2; width: 96px; height: 96px; margin: 0; border-radius: 26px; }
.fs-ring { position: absolute; z-index: 1; inset: 20px; border-radius: 50%; border: 1.5px dashed rgba(147, 197, 253, .4); }
.fs-ring.r2 { inset: 42px; border: 1px solid rgba(147, 197, 253, .45); }
.fs-orbit { position: absolute; z-index: 1; inset: 20px; border-radius: 50%; }
.fs-orbit.o2 { inset: 42px; }
.fs-orbit i { position: absolute; left: 50%; top: -5px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #93c5fd; box-shadow: 0 0 14px #60a5fa; }
.fs-orbit.o2 i { top: -4px; width: 8px; height: 8px; margin-left: -4px; background: #bfdbfe; box-shadow: 0 0 12px #3b82f6; }
@media (prefers-reduced-motion: no-preference) { .fs-orbit { animation: spin 4s linear infinite; } .fs-orbit.o2 { animation-duration: 2.8s; animation-direction: reverse; } .fs-ring { animation: spin 30s linear infinite; } }
.forge.forged .forge-stage { box-shadow: 0 0 0 8px rgba(5, 150, 105, .18), 0 0 90px -10px rgba(52, 211, 153, .75); }
.forge.forged h2 { color: var(--good); }
.forge-meter { display: flex; align-items: center; gap: 14px; width: fit-content; max-width: 100%; margin: 18px auto 0; padding: 10px 18px 10px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2); text-align: left; }
.forge-meter[hidden] { display: none; }
.forge-meter b { display: block; font-size: .92rem; }
.forge-meter small { display: block; color: var(--muted); font-size: .8rem; }
.forge-meter .ring-v { font-size: .78rem; }
.fstep.active { background: linear-gradient(90deg, var(--accent-soft), var(--surface) 60%); }

/* Cuenta y facturación: iconos en tonos y arte en la cabecera */
.card-h { display: flex; align-items: center; gap: 10px; }
.card-h .icon-tile { width: 36px; height: 36px; border-radius: 11px; }
.card-h .icon-tile svg { width: 18px; height: 18px; }
.icon-tile.soft.is-bad { background: var(--bad-soft); color: var(--bad); }
.acc-card { transition: transform .3s var(--ease), box-shadow .3s, border-color .3s; }
.acc-card:hover { transform: translateY(-2px); box-shadow: var(--sh-2); }
.page .row > .icon-tile.soft { width: 34px; height: 34px; border-radius: 10px; }
.page .row > .icon-tile.soft svg { width: 17px; height: 17px; }
.page-art { flex: none; width: 190px; height: auto; color: var(--ink); }
.pa-bar { transform-box: fill-box; transform-origin: 50% 100%; animation: bar-grow-app .9s var(--ease) backwards; animation-delay: calc(.2s + var(--i) * .08s); }
@keyframes bar-grow-app { from { transform: scaleY(0); } }
@media (max-width: 760px) { .page-art { display: none; } }
.page .price-card.featured { border-color: transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad-aurora) border-box; box-shadow: 0 30px 70px -36px rgba(59, 130, 246, .7); }
.page .price-card .ribbon { background: linear-gradient(135deg, #2563eb, #1e40af); }

/* Muninn en la app: plantillas con tono y arte de "formato → app" */
.fmt-art { display: block; width: 100%; max-width: 300px; height: auto; margin: 4px 0 10px; }
.fa-sheet { fill: var(--surface-2); stroke: var(--line-strong); }
.fa-grid { stroke: var(--line); fill: none; }
.fa-hd { fill: var(--accent-soft); }
.fa-phone { fill: var(--surface); stroke: #1e40af; stroke-width: 1.6; }
.fa-in { fill: var(--surface-3); }
.fa-btn { fill: #1e40af; }
.fa-arrow { fill: none; stroke: #1e40af; stroke-width: 1.8; stroke-dasharray: 3 4; stroke-linecap: round; }
.fa-spark { fill: #f59e0b; }

/* Estados vacíos: el cuervo con aurora */
.empty::after { content: ""; position: absolute; z-index: 0; width: 280px; height: 280px; left: 50%; top: -150px; margin-left: -140px; border-radius: 50%; background: radial-gradient(closest-side, rgba(59, 130, 246, .16), transparent); pointer-events: none; }
.empty > * { position: relative; z-index: 1; }
.empty .icon-tile { background: linear-gradient(135deg, #2563eb, #1e40af); }

/* Botones: onda de luz al hacer clic (ripple) necesita contenedor recortado */
.btn-primary, .btn-dark { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .home-hero, .pa-bar, .area[aria-pressed="true"]::after { animation: none !important; }
}

/* Captura (Muninn): cabecera con estrellas y palomita que celebra */
.cform-head { position: relative; overflow: hidden; isolation: isolate; }
.cform-head > .sky { z-index: 0; }
.cform-head > .sky .sky-stars { opacity: .5; }
.cform-head > :not(.sky) { position: relative; z-index: 1; }
.cform-head::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: var(--grad-aurora); opacity: .85; }
.cform .btn-primary.btn-lg { box-shadow: 0 16px 34px -14px rgba(37, 99, 235, .75); }
.ok-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 4px; border-radius: 50%; background: var(--good); color: #fff; vertical-align: middle; animation: pop .45s var(--ease-spring); }
[data-ok]:not([hidden]) { animation: pop .35s var(--ease); }
body.public-capture { background: radial-gradient(700px 360px at 0% 0%, rgba(59, 130, 246, .1), transparent 65%), radial-gradient(700px 360px at 100% 100%, rgba(96, 165, 250, .1), transparent 65%), var(--bg); }
.pc-wrap { border-radius: 0 0 var(--r-xl) var(--r-xl); overflow: hidden; }

/* Demo público: cielo con estrellas en la llamada final y línea de aurora en la barra */
.demo-cta-card { background: var(--grad-sky); }
.demo-cta-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: url("/assets/img/stars.svg") 0 0 / 360px 360px repeat; opacity: .55; pointer-events: none; }
.demo-cta-card h2 { color: #fff; }
.demo-nav { box-shadow: inset 0 -2px 0 rgba(59, 130, 246, .45); }

/* Paso 3: pegar una tabla o reusar archivos ya subidos */
.alt-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; align-items: start; }
.alt-inputs:has([data-prev]:empty) { grid-template-columns: 1fr; }
@media (max-width: 760px) { .alt-inputs { grid-template-columns: 1fr; } }
.paste-card { padding: 14px 16px; }
.paste-card summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; cursor: pointer; list-style: none; }
.paste-card summary::-webkit-details-marker { display: none; }
.paste-card summary .small { flex-basis: 100%; }
.paste-card[open] summary { margin-bottom: 10px; }
.paste-card textarea { font-size: .8rem; white-space: pre; overflow-x: auto; tab-size: 14; }
.prev-card { padding: 14px 16px; }
.prev-row { width: 100%; cursor: pointer; font: inherit; color: inherit; transition: border-color .2s var(--ease), translate .2s var(--ease); }
.prev-row:hover { border-color: var(--accent); translate: 0 -1px; }
.prev-row[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.prev-row .accent-text { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.prev-card > b:first-child { display: flex; align-items: center; gap: 8px; }

/* Equipo (Mi cuenta) */
.team-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 2px; }
.team-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line, rgba(148,163,184,.25)); }
.team-row:last-child { border-bottom: 0; }
.team-row > span { min-width: 0; overflow-wrap: anywhere; }
