/* ============ Base ============ */
:root {
    /* Paleta Braindea */
    --olive-900: #2f3324;
    --olive-800: #3b3e30;
    --olive: #485422;
    --olive-2: #606C38;
    --orange: #FDA055;
    --rust: #924C00;
    --lime-soft: #DFEDAC;
    --peach: #FFDCC4;
    --tint: #eef4d6;

    --bg: #faf8f2;
    --card: #ffffff;
    --text: #46483C;
    --muted: #7a7c6c;
    --line: #e6e4d8;
    --brand: #485422;
    --brand-2: #606C38;
    --ok: #16a34a;
    --warn: #d97706;
    --err: #dc2626;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
    --shadow-lg: 0 10px 40px rgba(15, 23, 42, .18);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; }
h1:focus { outline: none; }
p { margin: 0 0 .75rem; line-height: 1.55; }
a { color: var(--brand); }
ul, ol { padding-left: 1.2rem; margin: 0 0 1rem; }
li { margin: .25rem 0; line-height: 1.45; }
code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; font-size: .9em; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.spacer { flex: 1; }
.req { color: var(--err); }

input, textarea, select {
    width: 100%;
    font: inherit;
    color: inherit;
    padding: .7rem .85rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(96, 108, 56, .2);
}
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
input[type=color] { width: 44px; height: 34px; padding: 2px; cursor: pointer; }

.field-label { display: block; font-weight: 600; font-size: .9rem; margin: 1rem 0 .4rem; }

/* ============ Buttons & chips ============ */
.btn {
    display: inline-flex; align-items: center; gap: .4rem;
    font: inherit; font-weight: 600; font-size: .92rem;
    border: 1px solid transparent; border-radius: 10px;
    padding: .6rem 1rem; cursor: pointer; text-decoration: none;
    transition: transform .08s, background .15s, box-shadow .15s, opacity .15s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--orange); color: var(--olive-900); box-shadow: 0 4px 14px rgba(253, 160, 85, .35); }
.btn-primary:hover:not(:disabled) { background: #fc9440; box-shadow: 0 6px 20px rgba(253, 160, 85, .5); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--tint); }
.btn-lg { padding: .8rem 1.4rem; font-size: 1rem; }
.btn.small { padding: .4rem .7rem; font-size: .85rem; }

.icon { flex-shrink: 0; vertical-align: -.15em; }
.icon-btn {
    display: inline-grid; place-items: center;
    border: none; background: transparent; cursor: pointer; font-size: 1rem;
    width: 32px; height: 32px; border-radius: 8px; color: var(--muted); flex-shrink: 0;
}
.icon-btn:hover { background: rgba(0,0,0,.06); color: var(--text); }
.icon-btn.danger:hover { background: #fee2e2; color: var(--err); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip {
    --chip: var(--brand);
    font: inherit; font-size: .85rem; font-weight: 500;
    border: 1px solid var(--line); background: #fff; color: var(--text);
    padding: .38rem .75rem; border-radius: 999px; cursor: pointer;
    transition: all .15s;
}
.chip:hover { border-color: var(--chip); }
.chip.selected { background: var(--chip); border-color: var(--chip); color: #fff; }
.chip.ghost { background: transparent; border-style: dashed; color: var(--muted); }
.chip.ghost:hover { color: var(--text); }

.badge {
    --chip: var(--brand);
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .78rem; font-weight: 600; padding: .25rem .6rem; border-radius: 999px;
    background: color-mix(in srgb, var(--chip) 14%, white); color: color-mix(in srgb, var(--chip) 80%, black);
}
.badge.plain { background: #f1f5f9; color: var(--muted); }
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.accent { background: color-mix(in srgb, var(--rm-accent, #f59e0b) 20%, white); color: color-mix(in srgb, var(--rm-accent, #f59e0b) 70%, black); }

.tag { font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 6px; background: #f1f5f9; color: var(--muted); }
.src-tu { background: var(--lime-soft); color: var(--olive); }
.src-equipo { background: #dcfce7; color: #166534; }
.src-contratar { background: #fef3c7; color: #92400e; }
.src-consultoria { background: #fce7f3; color: #9d174d; }

.alert { padding: .8rem 1rem; border-radius: 10px; margin: 1rem 0; font-size: .92rem; display: flex; gap: .5rem; align-items: flex-start; justify-content: space-between; line-height: 1.5; }
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert.info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; display: block; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem; }

/* ============ Layout ============ */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between;
    padding: .8rem 20px; background: rgba(250,248,242,.88); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.topbar nav { display: flex; gap: .3rem; }
.topbar nav a { white-space: nowrap; padding: .45rem .8rem; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: .92rem; }
.topbar nav a.active, .topbar nav a:hover { background: var(--tint); color: var(--brand); }


.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: .6rem; color: var(--muted); }
.boot-logo { display: grid; place-content: center; animation: pulse 1.4s ease-in-out infinite; }

/* ============ Home ============ */
.hero { padding: 3.5rem 0 2rem; background: radial-gradient(1200px 400px at 50% -100px, var(--lime-soft), transparent); }
.hero h1 { font-size: clamp(2rem, 5vw, 3.1rem); font-weight: 800; letter-spacing: -.02em; text-align: center; }
.hero .hl { background: linear-gradient(135deg, var(--olive-2), var(--rust)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { text-align: center; color: var(--muted); font-size: 1.1rem; max-width: 640px; margin: 0 auto 1.8rem; }

.mode-switch { display: flex; justify-content: center; gap: .4rem; margin-bottom: 1rem; }
.mode-switch button {
    font: inherit; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--muted);
    padding: .6rem 1.1rem; border-radius: 999px; cursor: pointer;
}
.mode-switch button.active { background: var(--text); color: #fff; border-color: var(--text); }

.create-card { padding: 1.6rem; }
.create-card textarea { font-size: 1.05rem; }
.examples { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: .7rem 0; font-size: .85rem; color: var(--muted); }
.actions { display: flex; align-items: center; gap: .8rem; justify-content: space-between; margin-top: 1.4rem; flex-wrap: wrap; }
.hint { font-size: .85rem; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; padding-top: 1rem; padding-bottom: 4rem; }
.feature { padding: 1.2rem; }
.feature-icon { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--peach); color: var(--rust); }
.feature h3 { margin-top: .4rem; font-size: 1rem; }
.feature p { color: var(--muted); font-size: .9rem; }

/* Crear mapa (onboarding por pasos) */
.onb { padding-top: 2.2rem; padding-bottom: 4rem; }
.onb h1 { font-size: clamp(1.7rem, 4vw, 2.3rem); font-weight: 800; letter-spacing: -.01em; margin-bottom: .6rem; }
.onb-lead { color: var(--muted); font-size: 1.02rem; max-width: 620px; margin-bottom: 1.4rem; }
.onb-card { padding: 1.5rem; }
.onb-card .field-label:first-child { margin-top: 0; }
.onb-card textarea#goal { font-size: 1.05rem; }
.onb-card .hint { margin: .5rem 0 0; }
.onb-nav { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.onb-subtitle { font-size: 1.05rem; margin: 2.4rem 0 .3rem; }
.onb-card .onb-subtitle { margin-top: 1.6rem; }

.onb-steps { list-style: none; padding: 0; margin: 0 0 1.8rem; display: flex; gap: 1.4rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.onb-steps li { margin: 0; }
.onb-steps button {
    font: inherit; font-size: .88rem; font-weight: 600; background: none; border: none; color: var(--muted);
    padding: 0 0 .7rem; margin-bottom: -1px; border-bottom: 2px solid transparent; cursor: pointer;
    display: flex; align-items: center; gap: .45rem;
}
.onb-steps button:disabled { cursor: default; }
.onb-steps .num { width: 20px; height: 20px; border-radius: 50%; display: grid; place-content: center; border: 1px solid var(--line); font-size: .72rem; }
.onb-steps .current button { color: var(--text); border-bottom-color: var(--olive); }
.onb-steps .current .num { background: var(--olive); border-color: var(--olive); color: #fff; }
.onb-steps .done button { color: var(--olive); }
.onb-steps .done .num { background: var(--lime-soft); border-color: var(--lime-soft); }

.link-btn { font: inherit; font-size: .9rem; font-weight: 600; background: none; border: none; padding: 0; color: var(--olive); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-btn.small { font-size: .82rem; }
.link-btn:hover { color: var(--rust); }

.onb-examples { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .9rem; margin-top: 1rem; }
.onb-example { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; display: flex; flex-direction: column; }
.onb-example-kind { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--rust); }
.onb-example h3 { font-size: .98rem; margin: .25rem 0 .7rem; }
.onb-tree { list-style: none; padding: 0 0 0 .9rem; margin: 0 0 .9rem; border-left: 1px solid var(--line); flex: 1; }
.onb-tree li { position: relative; margin: .2rem 0; font-size: .85rem; color: var(--muted); }
.onb-tree li::before { content: ""; position: absolute; left: -.9rem; top: .65em; width: .6rem; border-top: 1px solid var(--line); }
.onb-example .link-btn { align-self: flex-start; }

.onb-kinds { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; }
.onb-kind {
    font: inherit; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px;
    padding: .7rem .85rem; cursor: pointer; display: flex; flex-direction: column; gap: .15rem; transition: border-color .15s, background .15s;
}
.onb-kind strong { font-size: .92rem; }
.onb-kind small { color: var(--muted); font-size: .8rem; }
.onb-kind:hover { border-color: var(--olive); }
.onb-kind.selected { border-color: var(--olive); background: var(--tint); }
.onb .segmented { flex-wrap: wrap; }

.onb-goal { font-size: 1.15rem; font-weight: 700; padding-left: .8rem; border-left: 3px solid var(--orange); }
.onb-summary { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 1rem 0 0; font-size: .9rem; }
.onb-summary dt { color: var(--muted); }
.onb-summary dd { margin: 0; }
.onb-outcomes { padding-left: 1.2rem; }
.onb-outcomes li { margin: .5rem 0; color: var(--muted); font-size: .92rem; }
.onb-outcomes strong { color: var(--text); }

.options { display: grid; gap: .45rem; }
.options.two { grid-template-columns: 1fr 1fr; }
.option {
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    border: 1px solid var(--line); border-radius: 10px; padding: .65rem .85rem; cursor: pointer; font-size: .92rem;
    transition: border-color .15s, background .15s;
}
.option:hover { border-color: #c7d2fe; }
.option.selected { border-color: var(--brand); background: var(--tint); }
.option small { width: 100%; color: var(--muted); padding-left: 1.6rem; margin-top: -.2rem; }
.options + input { margin-top: .5rem; }

.team-list { display: grid; gap: .5rem; }
.team-row { display: grid; grid-template-columns: 1fr 80px 140px 32px; gap: .5rem; align-items: center; }
.check { display: flex; align-items: center; gap: .55rem; margin-top: 1rem; font-size: .92rem; cursor: pointer; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ============ Loading overlay ============ */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, .55); backdrop-filter: blur(4px); display: grid; place-content: center; padding: 20px; }
.overlay-card { background: #fff; border-radius: 20px; padding: 2.2rem; max-width: 440px; text-align: center; box-shadow: var(--shadow-lg); }
.overlay-msg { font-weight: 600; color: var(--brand); min-height: 1.5em; }
.progress { height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden; margin: .8rem 0; }
.progress > div { height: 100%; background: linear-gradient(90deg, var(--rm-primary, var(--brand)), var(--rm-accent, var(--orange))); transition: width .8s ease; }
.orbit { position: relative; width: 64px; height: 64px; margin: 0 auto 1.2rem; }
.orbit span { position: absolute; inset: 0; border-radius: 50%; border: 3px solid transparent; border-top-color: var(--brand); animation: spin 1.2s linear infinite; }
.orbit span:nth-child(2) { inset: 8px; border-top-color: #db2777; animation-duration: 1.8s; animation-direction: reverse; }
.orbit span:nth-child(3) { inset: 16px; border-top-color: #f59e0b; animation-duration: 2.4s; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.12); } }

/* Mis roadmaps */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 2rem 0 1rem; }
.page-head h1 { margin: 0; }
.page-head .actions { margin: 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; padding-bottom: 4rem; }
.rm-card { position: relative; padding: 0; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.rm-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.rm-card-link { display: flex; flex-direction: column; gap: .5rem; padding: 1.2rem 1.3rem; color: inherit; text-decoration: none; height: 100%; }
.rm-card-link .badge { align-self: flex-start; }
.rm-card-link h3 { font-size: 1.05rem; margin: 0; padding-right: 2rem; }
.rm-card-bar { display: flex; height: 6px; margin: -1.2rem -1.3rem .7rem; }
.rm-card-bar i { flex: 1; }
.rm-card-foot { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 600; color: #334155; margin-top: auto; }
.rm-card .icon-btn { position: absolute; top: 18px; right: 10px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.empty-state { text-align: center; padding: 4rem 1rem; }
.empty-icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 18px; background: var(--tint); color: var(--olive); }

/* Error UI de Blazor */
#blazor-error-ui {
    background: #fef2f2; color: #991b1b; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2);
    display: none; left: 0; padding: .6rem 1.25rem .7rem; position: fixed; width: 100%; z-index: 1000;
}
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }


/* ============ Shell ============ */
.app-shell { display: flex; flex-direction: column; min-height: 100dvh; }
.app-shell > main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.app-shell:has(.map-page) { height: 100dvh; }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: #fef2f2; }
.actions-secondary { display: flex; gap: .5rem; flex-wrap: wrap; }

.segmented { display: inline-flex; background: #e2e8f0; padding: 3px; border-radius: 10px; }
.segmented button { font: inherit; font-size: .85rem; font-weight: 600; border: none; background: transparent; padding: .4rem .8rem; border-radius: 8px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.segmented button.active { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* Colores de estado: UN color por estado, el mismo en mapa, roadmap, checklist, leyendas y etiquetas.
   El usuario puede cambiarlos (window.statusColors en app.js, que también recalcula -ink); el borde
   (-line) se deriva solo del color. Ninguna vista debe usar otro tono para un estado.
   Pendiente = blanco · En progreso = amarillo · Hecho = verde (palomita) · Omitido = naranja (guion). */
:root {
    --st-pend: #ffffff; --st-pend-ink: #46483C;
    --st-prog: #fde047; --st-prog-ink: #26281f;
    --st-done: #9fd08a; --st-done-ink: #26281f;
    --st-skip: #FDA055; --st-skip-ink: #26281f;
    --st-pend-line: color-mix(in srgb, var(--st-pend) 62%, #3b3e30);
    --st-prog-line: color-mix(in srgb, var(--st-prog) 62%, #3b3e30);
    --st-done-line: color-mix(in srgb, var(--st-done) 62%, #3b3e30);
    --st-skip-line: color-mix(in srgb, var(--st-skip) 62%, #3b3e30);
}
/* Cualquier elemento con la clase de un estado expone --c (relleno), --c-line (borde) y --c-ink (texto o símbolo encima). */
.pendiente { --c: var(--st-pend); --c-line: var(--st-pend-line); --c-ink: var(--st-pend-ink); }
.en-progreso { --c: var(--st-prog); --c-line: var(--st-prog-line); --c-ink: var(--st-prog-ink); }
.hecho { --c: var(--st-done); --c-line: var(--st-done-line); --c-ink: var(--st-done-ink); }
.omitido { --c: var(--st-skip); --c-line: var(--st-skip-line); --c-ink: var(--st-skip-ink); }

.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--c-line, var(--st-pend-line)); background: var(--c, var(--st-pend)); flex-shrink: 0; }
.tag:is(.en-progreso, .hecho, .omitido) { background: var(--c); color: var(--c-ink); }
.badge.prog { background: var(--st-prog); color: var(--st-prog-ink); }
.badge.skip { background: var(--st-skip); color: var(--st-skip-ink); }

/* ============ Home ============ */
.more-context { margin-top: 1rem; border-top: 1px dashed var(--line); padding-top: .8rem; }
.more-context summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--brand); }

/* ============ Mis mapas ============ */
.rm-card-bar { background: #e2e8f0; }
.rm-card-bar i.fill { background: var(--st-done-line); }
.area-chips { display: flex; flex-wrap: wrap; gap: .3rem; }

/* ============ Ajustes ============ */
.settings-card h2 { font-size: 1.2rem; }

/* ============ Página del mapa ============ */
.map-page { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.map-bar { display: flex; align-items: center; gap: .7rem; padding: .55rem 16px; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.map-bar .icon-btn { display: grid; place-content: center; text-decoration: none; }
.map-title { font: inherit; font-weight: 800; font-size: 1.05rem; border: none; background: none; cursor: pointer; padding: .2rem .3rem; border-radius: 6px; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-title:hover { background: #f1f5f9; }
.map-progress { display: flex; align-items: center; gap: .5rem; font-size: .85rem; font-weight: 700; color: var(--st-done-line); }
.map-progress .progress { width: 120px; margin: 0; }
.map-progress .progress > div, .panel-progress .progress > div { background: var(--st-done-line); }
.map-alert { margin: .6rem 16px 0; align-items: center; }
.map-alert a { font-weight: 700; color: inherit; }

.map-body { flex: 1; display: flex; min-height: 0; position: relative; }
.map-main { flex: 1; position: relative; min-width: 0; display: flex; flex-direction: column; }
.map-scroll { flex: 1; overflow-y: auto; padding: 1.5rem 0 4rem; }

.map-controls { position: absolute; left: 16px; top: 16px; display: flex; flex-direction: column; background: #fff; border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; }
.map-controls button { font: inherit; font-size: 1.05rem; width: 38px; height: 38px; border: none; border-bottom: 1px solid var(--line); background: #fff; cursor: pointer; }
.map-controls button:last-child { border-bottom: none; }
.map-controls button:hover { background: #f1f5f9; }
.map-legend { position: absolute; left: 16px; bottom: 14px; display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: .8rem; background: rgba(255,255,255,.9); padding: .45rem .8rem; border-radius: 10px; box-shadow: var(--shadow); }
.map-legend span { display: inline-flex; align-items: center; gap: .35rem; }

/* Lienzo */
.mm-viewport {
    flex: 1; position: relative; overflow: hidden; cursor: grab; touch-action: none;
    background-color: #fbfbfd;
    background-image: linear-gradient(#eceef3 1px, transparent 1px), linear-gradient(90deg, #eceef3 1px, transparent 1px);
    background-size: 24px 24px;
}
.mm-viewport.dragging { cursor: grabbing; }
.mm-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mm-inner { position: relative; }
.mm-edges { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.mm-edge { fill: none; stroke: #64748b; stroke-width: 1.4; }
.mm-edge.done { stroke: var(--st-done-line); stroke-width: 1.8; }

.mm-node {
    position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    text-align: center; cursor: pointer; user-select: none; padding: 8px;
    background: var(--c, var(--st-pend)); border: 1.5px solid var(--c-line, var(--st-pend-line)); color: var(--c-ink, var(--text));
    transition: box-shadow .15s, transform .15s;
}
.mm-node:hover { box-shadow: 0 4px 14px rgba(15,23,42,.15); }
.mm-node.selected { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--brand); }
.mm-label { font-size: 11.5px; line-height: 1.2; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; word-break: break-word; }

.mm-node.circle { border-radius: 50%; padding: 10px; }
.mm-node.area { border-radius: 4px; }
.mm-node.area .mm-label { font-size: 13px; font-weight: 700; -webkit-line-clamp: 2; }
.mm-node.root { border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: none; color: #fff; }
.mm-node.root .mm-label { font-size: 14px; font-weight: 800; -webkit-line-clamp: 2; }
.mm-node.root.selected { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #db2777; }

.mm-bar { width: 80%; height: 4px; border-radius: 4px; background: rgba(15,23,42,.12); overflow: hidden; }
.mm-bar i { display: block; height: 100%; background: var(--st-done-line); }
.mm-node.root .mm-bar { background: rgba(255,255,255,.3); }
.mm-node.root .mm-bar i { background: #fff; }
.mm-count { font-size: 10px; font-weight: 700; color: var(--muted); }

.mm-toggle {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 1;
    min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px;
    font: inherit; font-size: 11px; font-weight: 700; line-height: 1;
    background: #fff; border: 1.5px solid #64748b; color: #334155; cursor: pointer;
}
.mm-toggle.right { right: -11px; }
.mm-toggle.left { left: -11px; }
.mm-toggle:hover { background: var(--brand); border-color: var(--brand); color: #fff; }

/* Panel lateral */
.panel { position: relative; width: var(--panel-w, 360px); flex-shrink: 0; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.panel-resizer { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 5; touch-action: none; }
.panel-resizer::after { content: ""; position: absolute; left: 3px; top: 0; bottom: 0; width: 2px; background: transparent; transition: background .15s; }
.panel-resizer:hover::after, .resizing .panel-resizer::after { background: var(--brand); }
body.resizing { cursor: col-resize; user-select: none; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; padding: .7rem .9rem .3rem 1.2rem; }
.crumbs { display: flex; flex-wrap: wrap; gap: .2rem; align-items: center; font-size: .78rem; color: var(--muted); padding-top: .4rem; }
.crumbs button { font: inherit; border: none; background: none; color: var(--brand); cursor: pointer; padding: 0; }
.crumbs button:hover { text-decoration: underline; }
.panel-body { overflow-y: auto; padding: .2rem 1.2rem 2rem; }
.panel-title { font-size: 1.2rem; font-weight: 800; border-color: transparent; padding: .4rem .5rem; margin: 0 -.5rem .6rem; width: calc(100% + 1rem); }
.panel-title:hover { border-color: var(--line); }
.status-picker { display: flex; }
.status-picker button { flex: 1; padding: .4rem .35rem; }
.status-picker button.active:is(.en-progreso, .hecho, .omitido) { background: var(--c); color: var(--c-ink); }
.panel-omitted { margin: .5rem 0 0; }
.panel-progress .progress { margin: 0 0 .3rem; }
.panel-row { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.panel-ai { margin-top: 1.3rem; padding: 1rem; border-radius: 12px; background: linear-gradient(135deg, var(--tint), #fff4ea); display: flex; flex-direction: column; gap: .5rem; }
.panel-ai h4 { margin: 0; font-size: .95rem; }
.panel-ai p { margin: 0; }
.panel-ai .btn { align-self: flex-start; }
.panel-sub { font-size: .85rem; margin: 1.3rem 0 .4rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.child-list { list-style: none; padding: 0; margin: 0 0 .6rem; }
.child-list li { margin: 0; }
.child-list button { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; font: inherit; font-size: .9rem; border: none; background: none; padding: .4rem .3rem; border-radius: 6px; cursor: pointer; }
.child-list button:hover { background: #f1f5f9; }
.panel-danger { margin-top: 1.6rem; padding-top: 1rem; border-top: 1px solid var(--line); }

/* Checklist */
.checklist-wrap { padding-bottom: 2rem; }
.checklist, .checklist ul { list-style: none; margin: 0; padding: 0; }
.checklist ul { padding-left: 1.4rem; border-left: 1px dashed var(--line); margin-left: .7rem; }
.cl-item { margin: 0; }
.cl-row { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border-radius: 8px; }
.cl-row:hover { background: #fff; }
.cl-row.selected { background: var(--tint); }
.cl-caret { width: 20px; border: none; background: none; cursor: pointer; color: var(--muted); font-size: .85rem; padding: 0; flex-shrink: 0; }
.cl-pct { font-size: .72rem; font-weight: 700; color: var(--muted); width: 34px; text-align: right; flex-shrink: 0; }
.cl-row:is(.hecho, .en-progreso, .omitido) .cl-pct { color: var(--c-line); }
.cl-title { font: inherit; text-align: left; border: none; background: none; cursor: pointer; padding: 0; color: var(--text); }
.cl-row:not(:has(.cl-pct)) .cl-title { font-weight: 400; }
.cl-row:has(.cl-pct) .cl-title { font-weight: 700; }
.cl-row.hecho input:checked + .cl-title { text-decoration: line-through; color: var(--muted); }
.cl-row.omitido .cl-title, .cl-row.omitido .cl-pct { color: var(--muted); }
/* Casilla de estado del checklist y del roadmap: mismos colores y símbolos que los marcadores del camino */
.cl-row input[type=checkbox], .plan-row input[type=checkbox] {
    appearance: none; -webkit-appearance: none; margin: 0; flex-shrink: 0; position: relative; cursor: pointer;
    width: 17px; height: 17px; border-radius: 5px; border: 2px solid var(--c-line, var(--st-pend-line)); background: var(--c, var(--st-pend)); }
.cl-row input[type=checkbox]:disabled, .plan-row input[type=checkbox]:disabled { cursor: default; }
.cl-row input[type=checkbox]:checked::after, .plan-row input[type=checkbox]:checked::after {
    content: ""; position: absolute; left: 50%; top: 45%; width: 4px; height: 8px; border: solid var(--c-ink); border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg); }
.cl-row.omitido input[type=checkbox]::after, .plan-row.omitido input[type=checkbox]::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 2px; border-radius: 1px; background: var(--c-ink); transform: translate(-50%, -50%); }
.omit-toggle { font: inherit; font-size: .75rem; font-weight: 600; color: var(--muted); background: none; border: none; padding: .1rem .4rem; border-radius: 6px; cursor: pointer; opacity: 0; transition: opacity .15s; flex-shrink: 0; }
.omit-toggle:hover { background: var(--tint); color: var(--brand); }
.cl-row:hover .omit-toggle, .plan-row:hover .omit-toggle, .omitido > .omit-toggle, .omit-toggle:focus-visible { opacity: 1; }
@media (hover: none) { .omit-toggle { opacity: 1; } }
.mini-progress { width: 70px; height: 5px; border-radius: 4px; background: #e2e8f0; overflow: hidden; margin-left: auto; }
.mini-progress i { display: block; height: 100%; background: var(--st-done-line); }

/* Roadmap (orden recomendado) */
.plan-empty { text-align: center; padding: 2.5rem 1.5rem; }
.plan-empty p { max-width: 520px; margin: 0 auto 1.4rem; }
.next-step { display: flex; flex-direction: column; gap: .3rem; padding: 1rem 1.2rem; border-radius: var(--radius); background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; margin-bottom: 1.4rem; }
.next-step button { font: inherit; font-size: 1.1rem; text-align: left; border: none; background: none; color: #fff; cursor: pointer; padding: 0; }
.next-step .muted { color: rgba(255,255,255,.75); font-size: .9rem; }
.plan-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.plan-head h2 { margin: 0; font-size: 1.2rem; }
.plan-trace { margin: -.3rem 0 1rem; }
.panel-stage { display: flex; align-items: center; gap: .35rem; margin: .5rem 0 0; }
.stages { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.stage { display: flex; gap: 1rem; margin: 0; padding: 1.1rem 1.2rem; }
.stage.complete { opacity: .7; }
.stage.unplanned { margin-top: .9rem; border: 1px dashed var(--line); box-shadow: none; }
.stage-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-content: center; font-weight: 800; background: var(--tint); color: var(--brand); flex-shrink: 0; }
.stage.complete .stage-num { background: var(--st-done); color: var(--st-done-ink); }
.stage-body { flex: 1; min-width: 0; }
.stage-top { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.stage-top h3 { font-size: 1rem; margin: 0 0 .2rem; }
.plan-items { list-style: none; padding: 0; margin: .4rem 0 0; }
.plan-row { display: flex; align-items: center; gap: .6rem; margin: 0; padding: .35rem .4rem; border-radius: 8px; }
.plan-row:hover { background: #f8fafc; }
.plan-row.selected { background: var(--tint); }
.plan-row button { flex: 1; display: flex; flex-direction: column; text-align: left; font: inherit; font-size: .92rem; border: none; background: none; cursor: pointer; padding: 0; min-width: 0; }
.plan-row small { font-size: .75rem; }
.plan-row.hecho button span { text-decoration: line-through; color: var(--muted); }
.plan-row.omitido button span { color: var(--muted); }

/* Roadmap: lista del orden recomendado a la izquierda, el camino a la derecha */
.road-split { flex: 1; display: flex; min-height: 0; }
.road-list { position: relative; flex: 0 0 var(--panel-w, 440px); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.panel-resizer.right { left: auto; right: -4px; }
.road-list .container { padding: 0 18px; }
.road-diagram { flex: 1; position: relative; display: flex; min-width: 0; }
.road-styles { position: absolute; right: 16px; top: 16px; box-shadow: var(--shadow); background: #fff; }
.road-styles button.active { background: var(--tint); color: var(--brand); box-shadow: none; }

.rd-viewport { background-color: #f4f6ec; background-image: radial-gradient(#dfe3cf 1.2px, transparent 1.2px); background-size: 22px 22px; }
.rd-viewport .mm-edges path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* Carretera: asfalto con línea central; lo recorrido se pinta de olivo */
.rd-carretera .rd-road-edge { stroke: #d8dcc8; stroke-width: 46; }
.rd-carretera .rd-road { stroke: #5d6052; stroke-width: 36; }
.rd-carretera .rd-road-done { stroke: var(--brand-2); stroke-width: 36; }
.rd-carretera .rd-road-lane { stroke: #fff; stroke-width: 2.5; stroke-dasharray: 14 12; opacity: .85; }
/* Metro: una línea con estaciones */
.rd-metro .rd-road { stroke: #cfd4bd; stroke-width: 10; }
.rd-metro .rd-road-done { stroke: var(--st-done); stroke-width: 10; }
/* Sendero: puntitos */
.rd-sendero .rd-road { stroke: #b9b49a; stroke-width: 7; stroke-dasharray: 0 16; }
.rd-sendero .rd-road-done { stroke: var(--brand-2); stroke-width: 7; stroke-dasharray: 0 16; }

.rd-point { position: absolute; width: 0; height: 0; }
.rd-marker { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: grid; place-content: center;
    width: 24px; height: 24px; border-radius: 50%; padding: 0; font: inherit; font-weight: 800; font-size: .8rem;
    background: var(--c, var(--st-pend)); border: 3px solid var(--c-line, var(--st-pend-line)); color: var(--c-ink); box-shadow: 0 2px 6px rgba(0,0,0,.15); }
button.rd-marker { cursor: pointer; }
.rd-tarea.selected .rd-marker { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--brand); }
.rd-etapa .rd-marker, .rd-inicio .rd-marker, .rd-meta .rd-marker { width: 38px; height: 38px; border-radius: 12px; border: none; background: var(--brand); color: #fff; }
.rd-etapa.pendiente .rd-marker { background: #fff; color: var(--brand); border: 3px solid var(--brand); }
.rd-etapa.hecho .rd-marker { background: var(--st-done); color: var(--st-done-ink); }
.rd-meta .rd-marker { background: var(--orange); color: var(--olive-900); width: 44px; height: 44px; border-radius: 50%; }
.rd-meta.hecho .rd-marker { background: var(--st-done); color: var(--st-done-ink); }

.rd-label { position: absolute; left: 0; top: 24px; transform: translateX(-50%); width: 160px; text-align: center;
    font: inherit; font-size: .82rem; font-weight: 600; line-height: 1.2; color: var(--text); background: none; border: none; padding: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
button.rd-label { cursor: pointer; }
button.rd-label:hover { color: var(--brand); text-decoration: underline; }
.rd-tarea.hecho .rd-label { color: var(--muted); text-decoration: line-through; }
.rd-dash { display: block; width: 10px; height: 3px; border-radius: 2px; background: currentColor; }
.rd-tarea.omitido .rd-label { color: var(--muted); }
.rd-label small { display: block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rd-etapa .rd-label, .rd-meta .rd-label, .rd-inicio .rd-label { display: block; top: auto; bottom: 30px; padding: .35rem .7rem; border-radius: 10px;
    background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); font-weight: 800; width: max-content; max-width: 190px; }
.rd-meta .rd-label { bottom: 34px; }
.rd-point.down .rd-label { top: 30px; bottom: auto; }
.rd-tarea.up .rd-label { top: auto; bottom: 22px; }
.rd-tarea.up .rd-here { bottom: auto; top: 18px; }
.rd-tarea.up .rd-here::after { bottom: auto; top: -4px; border: 4px solid transparent; border-top: 0; border-bottom-color: var(--brand); }
.rd-here { position: absolute; left: 0; bottom: 18px; transform: translateX(-50%); white-space: nowrap; font-size: .68rem; font-weight: 800;
    color: #fff; background: var(--brand); padding: .15rem .5rem; border-radius: 999px; box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.rd-here::after { content: ""; position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); border: 4px solid transparent; border-bottom: 0; border-top-color: var(--brand); }

/* Editor de colores de estado: flota sobre la leyenda del mapa o del roadmap */
.status-colors { position: absolute; left: 16px; bottom: 60px; z-index: 20; width: min(400px, calc(100% - 32px)); max-height: calc(100% - 90px); overflow-y: auto; padding: 1rem 1.1rem; box-shadow: var(--shadow-lg); }
.status-colors-head { display: flex; justify-content: space-between; align-items: center; }
.status-colors > p { margin: .2rem 0 .8rem; }
.status-colors-row { display: grid; grid-template-columns: 110px 1fr; gap: .6rem; align-items: start; padding: .55rem 0; border-top: 1px solid var(--line); }
.status-colors-sample { display: flex; align-items: center; gap: .45rem; font-weight: 600; font-size: .88rem; padding-top: .2rem; }
.status-colors-sample i { width: 22px; height: 22px; border-radius: 50%; background: var(--c); border: 3px solid var(--c-line); flex-shrink: 0; }
.status-colors .color-name { display: none; }
.status-colors .color-grid { grid-template-columns: repeat(6, 24px); grid-template-rows: auto; }
.status-colors .swatch { width: 24px; height: 24px; }
.status-colors > .btn { margin-top: .6rem; }
.map-legend .link-btn { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; }

/* ============ Responsive ============ */
@media (max-width: 760px) {
    .grid-2 { grid-template-columns: 1fr; }
    .topbar nav a { padding: .4rem .5rem; font-size: .85rem; }
    .map-title { max-width: 55vw; }
    .map-progress .progress { width: 70px; }
    .map-legend .muted { display: none; }
    .road-split { flex-direction: column; overflow-y: auto; }
    .road-list { flex: none; border-right: none; overflow: visible; }
    .road-diagram { flex: none; height: 70vh; border-top: 1px solid var(--line); }
    .panel-resizer { display: none; }
    .panel { position: absolute; inset: auto 0 0 0; width: auto; max-height: 70%; border-left: none; border-top: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 16px 16px 0 0; z-index: 10; }
    .actions { flex-direction: column-reverse; align-items: stretch; }
    .actions .btn { justify-content: center; }
}

@media print {
    .no-print, .map-bar, .map-controls, .map-legend, .panel { display: none !important; }
}

/* JSON del mapa */
.json-view { max-width: 1100px; }
.json-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: .8rem; }
.json-head h2 { font-size: 1.2rem; margin: 0 0 .2rem; }
.json-head p { margin: 0; }
.json-code {
    margin: 0; padding: 1rem 1.2rem; border-radius: var(--radius); background: #0f172a; color: #e2e8f0;
    font: 13px/1.55 ui-monospace, Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; tab-size: 2;
}

/* Pegar JSON en Mis mapas */
.paste-card { margin-bottom: 1.2rem; }
.paste-card .field-label { margin-top: 0; }
.paste-card textarea { font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; }
.paste-card .actions { justify-content: flex-end; margin-top: .8rem; }

/* Diálogo de confirmación */
.btn-danger { background: var(--err); color: #fff; box-shadow: 0 4px 14px rgba(220, 38, 38, .3); }
.btn-danger:hover { background: #b91c1c; }
.btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 200; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); animation: fade-in .15s ease-out; }
.dialog {
    position: fixed; z-index: 201; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 32px)); background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg);
    padding: 1.6rem 1.5rem 1.3rem; text-align: center; animation: pop-in .18s ease-out;
}
.dialog-icon { width: 52px; height: 52px; margin: 0 auto .8rem; border-radius: 50%; display: grid; place-content: center; background: var(--tint); color: var(--brand); }
.dialog-icon.danger { background: #fee2e2; color: var(--err); }
.dialog h2 { font-size: 1.15rem; margin: 0 0 .4rem; }
.dialog p { color: var(--muted); font-size: .95rem; margin: 0 0 1.3rem; overflow-wrap: anywhere; }
.dialog-actions { display: flex; gap: .6rem; justify-content: center; }
.dialog-actions .btn { flex: 1; justify-content: center; }
@keyframes fade-in { from { opacity: 0; } }
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } }

/* Versiones */
.version-bar { display: flex; align-items: center; gap: .35rem; padding: .35rem 16px; background: #f8fafc; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.version-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: .3rem; flex-shrink: 0; }
.vtab { display: inline-flex; align-items: center; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: .8rem; }
.vtab > button, button.vtab { font: inherit; font-size: .8rem; border: none; background: none; padding: .3rem .65rem; cursor: pointer; color: inherit; white-space: nowrap; }
button.vtab { border: 1px solid var(--line); background: #fff; }
.vtab small { color: var(--muted); margin-left: .2rem; }
.vtab.locked { opacity: .6; background: #f1f5f9; }
.vtab.locked:hover { opacity: 1; }
.vtab.active { opacity: 1; border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: #fff; }
.vtab.current { font-weight: 700; color: var(--st-done-line); }
.vtab.current.active { color: var(--brand); }
.vtab-x { padding: .3rem .5rem .3rem .2rem !important; color: var(--muted) !important; font-size: 1rem !important; line-height: 1; }
.vtab-x:hover { color: var(--err) !important; }
.vtab-save { font: inherit; font-size: .78rem; font-weight: 600; border: 1px dashed var(--line); background: none; border-radius: 8px; padding: .3rem .65rem; cursor: pointer; color: var(--muted); white-space: nowrap; flex-shrink: 0; margin-left: auto; }
.vtab-save:hover { color: var(--brand); border-color: var(--brand); }
.readonly-banner { display: flex; align-items: center; gap: .8rem; }
.map-page.readonly .mm-viewport { background-color: #f6f7f9; }

/* Panel en solo lectura */
.panel-title.readonly { font-size: 1.2rem; font-weight: 800; margin: .2rem 0 .5rem; }
.readonly-status { display: flex; align-items: center; gap: .5rem; font-weight: 600; margin-top: .8rem; }
.readonly-text { white-space: pre-wrap; font-size: .92rem; }

/* Asistente */
.assistant-head { align-items: center; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.assistant-head h3 { font-size: 1rem; margin: 0; }
.assistant-body { flex: 1; overflow-y: auto; padding: .8rem 1rem 1rem; display: flex; flex-direction: column; gap: .9rem; min-height: 0; }
.memory { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; }
.memory summary { cursor: pointer; font-weight: 600; font-size: .88rem; }
.memory p { margin: .5rem 0; }
.memory textarea { font-size: .88rem; }
.assistant-empty { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; }
.assistant-empty p { margin: 0; }
.turn { display: flex; flex-direction: column; gap: .4rem; }
.bubble { border-radius: 14px; padding: .6rem .8rem; font-size: .9rem; max-width: 92%; }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }
.bubble.user { align-self: flex-end; background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.bubble.ai { align-self: flex-start; background: #f1f5f9; border-bottom-left-radius: 4px; }
.turn-kind { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .85; margin-bottom: .2rem; }
.changes { display: inline-block; margin-top: .5rem; font-size: .75rem; font-weight: 700; color: #3f6b2a; background: #d5e8d4; padding: .15rem .5rem; border-radius: 999px; }
.bubble time { display: block; font-size: .7rem; color: var(--muted); margin-top: .35rem; }
.assistant-input { border-top: 1px solid var(--line); padding: .7rem 1rem .9rem; background: #fff; }
.assistant-input textarea { font-size: .9rem; }
.assistant-send { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .5rem; }

/* Colores por nodo */
.panel-colors { margin-top: 1rem; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .8rem; }
.panel-colors summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.panel-colors > .btn { margin-top: .7rem; }
.color-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin-top: .7rem; }
.color-field { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.color-name { font-size: .78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.color-grid { display: grid; grid-template-columns: repeat(3, 26px); grid-template-rows: repeat(2, 26px); gap: 5px; }
.swatch { width: 26px; height: 26px; border-radius: 7px; border: 1px solid rgba(15,23,42,.18); cursor: pointer; padding: 0; position: relative; display: grid; place-content: center; }
.swatch:hover { transform: scale(1.08); }
.swatch.selected { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--brand); }
.swatch.custom { background: conic-gradient(#f87171, #fbbf24, #4ade80, #60a5fa, #c084fc, #f87171); color: #fff; font-weight: 800; font-size: .9rem; text-shadow: 0 1px 2px rgba(0,0,0,.4); overflow: hidden; }
.swatch.custom input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; padding: 0; border: none; }
.hex-row { display: flex; align-items: center; gap: .2rem; }
.hex-input { width: 88px; padding: .25rem .4rem; font: 12px ui-monospace, Menlo, monospace; border-radius: 6px; }
.hex-reset { border: none; background: none; cursor: pointer; color: var(--muted); font-size: .95rem; padding: 0 .2rem; }
.hex-reset:hover { color: var(--brand); }
.mm-status-dot { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 9px; height: 9px; }
.mm-node.area .mm-status-dot, .mm-node.root .mm-status-dot { left: 8px; top: 8px; transform: none; }

/* ============ Logo ============ */
.logo { display: inline-flex; align-items: center; gap: .45rem; }
.logo-mark { flex-shrink: 0; }
.logo-word { font-weight: 700; font-size: 1.35em; letter-spacing: -.02em; line-height: 1; }
.logo-word .w1 { color: var(--olive-800); }
.logo-word .w2 { color: var(--rust); }
.logo.light .w1 { color: #fff; }
.logo.light .w2 { color: var(--orange); }

/* ============ Landing ============ */
.lp { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.lp main { flex: 1; }
.lp-wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.lp-btn-dark { background: var(--olive-800); color: #fff; }
.lp-btn-dark:hover { background: var(--olive-900); }
.lp-btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }
.lp-btn-outline:hover { background: rgba(255,255,255,.08); }

.lp-nav { position: sticky; top: 0; z-index: 30; background: rgba(250,248,242,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-nav-inner { display: flex; align-items: center; gap: 1.5rem; height: 66px; }
.lp-nav nav { display: flex; gap: .3rem; margin-left: auto; }
.lp-nav nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem; padding: .45rem .8rem; border-radius: 8px; }
.lp-nav nav a:hover { background: var(--tint); }

.lp-hero { background: var(--olive-800); color: #fff; padding: 4.5rem 0; overflow: hidden; }
.lp-hero-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: center; }
.lp-eyebrow { display: inline-block; text-transform: uppercase; letter-spacing: .22em; font-size: .75rem; font-weight: 600; color: var(--orange); margin-bottom: 1rem; }
.lp-hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.08; margin-bottom: 1.1rem; }
.lp-lead { font-size: 1.1rem; color: rgba(255,255,255,.8); max-width: 520px; margin-bottom: 1.8rem; }
.lp-cta { display: flex; flex-wrap: wrap; gap: .7rem; }
.lp-hero-note { margin-top: 1rem; font-size: .85rem; color: rgba(255,255,255,.55); }

.lp-mock { background: #fff; border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.35); overflow: hidden; color: var(--text); transform: perspective(1400px) rotateY(-6deg); }
.lp-mock-bar { display: flex; gap: 6px; padding: 10px 14px; background: #2b2d24; }
.lp-mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.lp-mock-bar i:nth-child(2) { background: #febc2e; }
.lp-mock-bar i:nth-child(3) { background: #28c840; }
/* Mockup del inicio: el mismo ejemplo en Mapa, Roadmap y Checklist, recortado para que se intuya que sigue */
.lp-shot-bar { display: flex; align-items: center; gap: .6rem; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: .8rem; }
.lp-shot-bar strong { font-weight: 800; }
.lp-shot-bar small { font-weight: 700; color: var(--st-done-line); }
.lp-shot-progress { width: 90px; height: 6px; border-radius: 4px; background: #e2e8f0; overflow: hidden; margin-left: auto; }
.lp-shot-progress i { display: block; height: 100%; background: var(--st-done-line); }
.lp-shot { display: grid; grid-template-columns: 1.25fr 1fr 1fr; height: 310px; }
.lp-pane { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid var(--line); background: var(--bg); }
.lp-pane:last-child { border-right: none; }
.lp-pane-head { display: flex; align-items: center; gap: .35rem; padding: 8px 10px; font-size: .74rem; font-weight: 700; color: var(--brand); background: #fff; border-bottom: 1px solid var(--line); white-space: nowrap; }
.lp-pane-head small { font-weight: 500; color: var(--muted); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; }
.lp-pane-body { position: relative; flex: 1; overflow: hidden; font-size: .7rem;
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent); mask-image: linear-gradient(to bottom, #000 80%, transparent); }
.lp-pane-body > svg { position: absolute; left: 0; top: 0; overflow: visible; }
.lp-pane-body > svg path { fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* Mapa */
.lp-map { background-color: #fbfbfd; background-image: linear-gradient(#eceef3 1px, transparent 1px), linear-gradient(90deg, #eceef3 1px, transparent 1px); background-size: 16px 16px; }
.lp-map .mm-edge { stroke-width: 1.3; }
.lp-node { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center;
    background: var(--c, var(--st-pend)); border: 1.5px solid var(--c-line, var(--st-pend-line)); color: var(--c-ink, var(--text)); font-weight: 600; line-height: 1.1; }
.lp-node.root { width: 64px; height: 64px; border-radius: 50%; border: none; color: #fff; font-weight: 800; font-size: .66rem; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 12px rgba(59,62,48,.25); }
.lp-node.area { width: 58px; height: 30px; border-radius: 4px; font-weight: 700; font-size: .62rem; }
.lp-node.circle { width: 40px; height: 40px; border-radius: 50%; font-size: .5rem; padding: 0; white-space: nowrap; letter-spacing: -.01em; }
.lp-node b { width: 70%; height: 3px; border-radius: 3px; background: rgba(15,23,42,.12); overflow: hidden; }
.lp-node b i { display: block; height: 100%; background: var(--st-done-line); }
.lp-node.root b { background: rgba(255,255,255,.3); }
.lp-node.root b i { background: #fff; }

/* Roadmap: el camino */
.lp-road { background-color: #f4f6ec; background-image: radial-gradient(#dfe3cf 1px, transparent 1px); background-size: 14px 14px; }
.lp-road-edge { stroke: none; }
.lp-road-asphalt { stroke: #d5dac4; stroke-width: 6; }
.lp-road-done { stroke: var(--st-done); stroke-width: 6; }
.lp-road-lane { stroke: none; }
.lp-stop { position: absolute; width: 0; height: 0; }
.lp-stop-mark { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%); display: grid; place-content: center;
    width: 15px; height: 15px; border-radius: 50%; background: var(--c, var(--st-pend)); border: 2px solid var(--c-line, var(--st-pend-line)); color: var(--c-ink); box-shadow: 0 1px 4px rgba(0,0,0,.2); }
.lp-stop-etapa .lp-stop-mark, .lp-stop-inicio .lp-stop-mark { width: 19px; height: 19px; border-radius: 6px; border: none; background: var(--brand); color: #fff; font-size: .6rem; font-weight: 800; }
.lp-stop-meta .lp-stop-mark { width: 22px; height: 22px; border: none; background: var(--orange); color: var(--olive-900); }
.lp-stop-label { position: absolute; left: 0; top: 11px; transform: translateX(-50%); white-space: nowrap; font-size: .54rem; font-weight: 600; color: var(--text); }
.lp-stop.up .lp-stop-label { top: auto; bottom: 11px; }
.lp-stop.hecho .lp-stop-label { color: var(--muted); text-decoration: line-through; }
.lp-stop.omitido .lp-stop-label { color: var(--muted); }
.lp-here { position: absolute; left: 0; bottom: 12px; transform: translateX(-50%); white-space: nowrap; font-size: .52rem; font-weight: 800; color: #fff; background: var(--brand); padding: .1rem .4rem; border-radius: 999px; box-shadow: 0 2px 6px rgba(0,0,0,.2); }
.lp-dash { display: block; width: 6px; height: 2px; border-radius: 1px; background: currentColor; }

/* Checklist */
.lp-list { padding: 10px 8px; }
.lp-group { display: flex; align-items: center; gap: 4px; padding: 4px 2px; }
.lp-group strong { white-space: nowrap; }
.lp-group .mini-progress { width: 30px; height: 4px; margin-left: .3rem; }
.lp-caret { width: 10px; color: var(--muted); }
.lp-pct { width: 26px; text-align: right; font-weight: 700; color: var(--muted); font-size: .62rem; }
.lp-group-items { margin: 0 0 6px 7px; padding-left: 12px; border-left: 1px dashed var(--line); }
.lp-check-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; white-space: nowrap; overflow: hidden; }
.lp-check-row .badge { font-size: .52rem; padding: .05rem .35rem; }
.lp-check-row.hecho .lp-check-text, .lp-check-row.omitido .lp-check-text { color: var(--muted); }
.lp-check-row.hecho .lp-check-text { text-decoration: line-through; }
.lp-box { width: 12px; height: 12px; border-radius: 3px; border: 1.5px solid var(--c-line, var(--st-pend-line)); background: var(--c, var(--st-pend)); color: var(--c-ink); flex-shrink: 0; display: grid; place-content: center; }

.lp-section { padding: 5rem 0; }
.lp-soft { background: var(--tint); }
.lp-h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 700; text-align: center; letter-spacing: -.015em; color: var(--olive-800); }
.lp-sub { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 2.6rem; }


.lp-pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 340px)); justify-content: center; gap: 1.5rem; }
.lp-plan { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 2rem; display: flex; flex-direction: column; }
.lp-plan.featured { border: 2px solid var(--orange); box-shadow: 0 20px 50px rgba(146, 76, 0, .12); }
.lp-plan-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--orange); color: var(--olive-900); font-size: .75rem; font-weight: 700; padding: .3rem .8rem; border-radius: 999px; }
.lp-plan h3 { font-size: 1.1rem; color: var(--olive-800); }
.lp-price { display: flex; align-items: baseline; gap: .3rem; margin: .3rem 0; }
.lp-price strong { font-size: 2.8rem; font-weight: 700; color: var(--olive-800); letter-spacing: -.02em; }
.lp-price span { color: var(--muted); }
.lp-price-tax { display: block; margin: -.2rem 0 .5rem; font-size: .78rem; font-weight: 600; color: var(--muted); }
.lp-plan-note { color: var(--rust); font-size: .85rem; font-weight: 500; }
.lp-plan ul { list-style: none; padding: 0; margin: .5rem 0 1.6rem; flex: 1; }
.lp-plan li { padding-left: 1.6rem; position: relative; }
.lp-plan li::before { content: ""; position: absolute; left: 3px; top: .5em; width: 9px; height: 4.5px; border-left: 2px solid var(--olive-2); border-bottom: 2px solid var(--olive-2); transform: rotate(-45deg); }
.lp-plan .btn { justify-content: center; }
.lp-fineprint { text-align: center; color: var(--muted); font-size: .85rem; max-width: 560px; margin: 2rem auto 0; }

.lp-final { background: var(--rust); color: #fff; text-align: center; padding: 4rem 0; }
.lp-final h2 { font-size: clamp(1.7rem, 3.8vw, 2.6rem); max-width: 760px; margin: 0 auto .8rem; letter-spacing: -.02em; line-height: 1.15; }
.lp-final p { color: rgba(255,255,255,.8); margin: 0 auto 1.6rem; max-width: 520px; }

/* --- Inicio: secciones con historia (problema, para quién, valor, cómo funciona) --- */
.lp-kicker { display: inline-block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--rust); margin-bottom: .8rem; }
.lp-kicker-center { display: block; text-align: center; }
@keyframes lp-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes lp-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes lp-blink { 50% { opacity: 0; } }

/* 1. Problema: ruido → orden */
.lp-noise-head { max-width: 680px; }
.lp-noise-head h2 { font-size: clamp(2rem, 4.6vw, 3.3rem); line-height: 1.05; letter-spacing: -.03em; color: var(--olive-900); margin-bottom: 1rem; }
.lp-noise-head p { font-size: 1.1rem; color: var(--muted); max-width: 560px; }
.lp-noise-stage { display: grid; grid-template-columns: 1.15fr auto 1fr; gap: 1.5rem; align-items: center; margin-top: 2.8rem; }
.lp-noise-cloud { position: relative; height: 340px; border-radius: 24px; background: repeating-linear-gradient(-45deg, transparent 0 14px, rgba(59,62,48,.035) 14px 15px); }
.lp-noise-cloud span { position: absolute; white-space: nowrap; transform: rotate(var(--rot)); padding: .45rem .8rem; border-radius: 10px; font-weight: 600; font-size: .92rem;
    background: #fff; color: var(--olive-800); box-shadow: 0 6px 18px rgba(59,62,48,.1); animation: lp-float 5s ease-in-out infinite; }
.lp-noise-cloud span:nth-child(3n) { background: #fff3e6; color: var(--rust); animation-duration: 6.5s; }
.lp-noise-cloud span:nth-child(4n) { background: transparent; box-shadow: none; color: var(--muted); font-style: italic; animation-duration: 7s; }
.lp-noise-cloud span:nth-child(5n) { background: var(--tint); animation-delay: -2s; }
.lp-noise-cloud span:nth-child(2n) { animation-delay: -3s; }
.lp-noise-arrow { display: flex; flex-direction: column; align-items: center; gap: .5rem; color: var(--olive); font-weight: 700; font-size: .8rem; }
.lp-noise-arrow-dot { display: grid; place-content: center; width: 54px; height: 54px; border-radius: 50%; background: var(--olive); color: #fff; box-shadow: 0 10px 24px rgba(72,84,34,.35); }
.lp-noise-clear { background: #fff; border-radius: 20px; padding: 1.3rem 1.4rem; box-shadow: 0 24px 60px rgba(59,62,48,.14); display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.lp-clear-goal { grid-column: 1 / -1; display: flex; align-items: center; gap: .45rem; font-weight: 800; color: var(--olive-900); padding-bottom: .8rem; border-bottom: 1px solid var(--line); }
.lp-clear-goal .icon { color: var(--olive-2); }
.lp-clear-group { display: flex; flex-direction: column; gap: .35rem; font-size: .86rem; }
.lp-clear-group strong { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--rust); }
.lp-clear-item { display: flex; align-items: center; gap: .45rem; }
.lp-clear-item i { width: 13px; height: 13px; border-radius: 4px; border: 2px solid var(--st-pend-line); flex-shrink: 0; }
.lp-clear-item.hecho { color: var(--muted); text-decoration: line-through; }
.lp-clear-item.hecho i { background: var(--st-done); border-color: var(--st-done-line); }

/* 2. Para quién: selector de perfiles */
.lp-who { background: var(--tint); }
.lp-who-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: center; }
.lp-who-side h2 { font-size: clamp(1.8rem, 3.6vw, 2.6rem); line-height: 1.1; letter-spacing: -.025em; color: var(--olive-900); margin-bottom: 1.6rem; }
.lp-who-list { display: flex; flex-direction: column; gap: .2rem; }
.lp-who-list button { display: flex; align-items: center; gap: .8rem; font: inherit; font-size: 1.05rem; font-weight: 600; text-align: left; color: var(--muted);
    background: none; border: none; border-left: 3px solid transparent; padding: .65rem 1rem; border-radius: 0 12px 12px 0; cursor: pointer; transition: all .2s; }
.lp-who-list button:hover { color: var(--olive-900); }
.lp-who-list button.active { color: var(--olive-900); background: #fff; border-left-color: var(--orange); box-shadow: 0 6px 18px rgba(59,62,48,.08); }
.lp-who-list button.active .icon { color: var(--rust); }
.lp-who-show { background: #fff; border-radius: 24px; padding: 2rem 2.1rem; box-shadow: 0 30px 70px rgba(59,62,48,.16); }
.lp-who-show > * { animation: lp-rise .45s ease both; }
.lp-who-label { font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--rust); }
.lp-who-goal { font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; color: var(--olive-900); margin: .2rem 0 1.3rem; line-height: 1.15; }
.lp-who-fronts { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; margin-bottom: 1.3rem; }
.lp-who-fronts span { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; border-radius: 12px; background: var(--bg); font-weight: 600; font-size: .92rem; color: var(--olive-800);
    animation: lp-rise .45s ease both; animation-delay: calc(var(--i) * 70ms + 80ms); }
.lp-who-fronts span:last-child:nth-child(odd) { grid-column: 1 / -1; }
.lp-who-fronts b { font-size: .72rem; color: var(--olive-2); font-variant-numeric: tabular-nums; }
.lp-who-gets { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; padding-top: 1.1rem; border-top: 1px solid var(--line); animation-delay: .5s; }
.lp-who-gets span { display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 600; color: var(--olive-800); }
.lp-who-gets .icon { color: var(--st-done-line); }

/* 3. Valor: lo que no estaba en tu lista */
.lp-blind { background: var(--olive-900); color: #fff; padding: 6rem 0; }
.lp-blind-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 4rem; align-items: start; }
.lp-blind-head { position: sticky; top: 100px; }
.lp-blind-head .lp-kicker { color: var(--orange); }
.lp-blind-head h2 { font-size: clamp(2rem, 4.2vw, 3rem); line-height: 1.08; letter-spacing: -.03em; margin-bottom: 1.1rem; }
.lp-blind-head p { color: rgba(255,255,255,.72); font-size: 1.05rem; margin-bottom: 1.8rem; max-width: 460px; }
.lp-blind-list { list-style: none; margin: 0; padding: 0; }
.lp-blind-list li { display: flex; gap: 1.4rem; padding: 1.6rem 0; border-top: 1px solid rgba(255,255,255,.12); margin: 0; }
.lp-blind-list li:last-child { border-bottom: 1px solid rgba(255,255,255,.12); }
.lp-blind-num { font-size: 2.6rem; font-weight: 800; line-height: 1; color: var(--orange); letter-spacing: -.04em; min-width: 3.2rem; font-variant-numeric: tabular-nums; }
.lp-blind-list strong { display: block; font-size: 1.2rem; line-height: 1.3; margin-bottom: .35rem; }
.lp-blind-list p { margin: 0; color: rgba(255,255,255,.62); }

/* 5. Lo que incluye: recorrido por la app (izquierda) y lo que hace cada vista (derecha) */
.lp-tour { background: linear-gradient(180deg, var(--bg) 0%, #eef0e4 100%); }
.lp-tour-head { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 3rem; align-items: end; margin-bottom: 2.4rem; }
.lp-tour-head .lp-kicker { grid-column: 1 / -1; margin: 0; }
.lp-tour-head h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); line-height: 1.05; letter-spacing: -.03em; color: var(--olive-900); margin: 0; }
.lp-tour-head p { color: var(--muted); margin: 0; font-size: 1.02rem; }
.tour { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 3.5rem; align-items: center; }
.tour-left { min-width: 0; }
.tour-hint { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; padding: .4rem .85rem; border-radius: 999px; background: var(--olive-900); color: #fff;
    font-size: .85rem; font-weight: 600; box-shadow: 0 8px 20px rgba(47,51,36,.25); animation: tour-nudge 1.6s ease-in-out infinite; }
.tour-hint .icon { color: var(--orange); }
@keyframes tour-nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
.tour-tabs button { position: relative; }
.tour-tabs button:not(.active) { box-shadow: inset 0 0 0 1px transparent; }
.tour-tabs button:not(.active):hover { background: rgba(255,255,255,.6); }
.tour-cursor { position: absolute; right: -10px; bottom: -16px; z-index: 3; color: var(--olive-900); pointer-events: none; animation: tour-tap 1.4s ease-in-out infinite; }
.tour-cursor .icon path:last-child { fill: #fff; }
@keyframes tour-tap { 0%, 100% { transform: translate(0, 0) scale(1); } 45% { transform: translate(-3px, -3px) scale(.88); } 55% { transform: translate(-3px, -3px) scale(.88); } }

/* Puntos numerados: naranjas los de cada vista, verdes los fijos (A, B, C) */
.tour-dot { display: inline-grid; place-content: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--orange); color: var(--olive-900);
    font-size: .7rem; font-weight: 800; font-style: normal; line-height: 1; box-shadow: 0 0 0 3px rgba(253,160,85,.28); }
.tour-dot-fixed { background: var(--olive); color: #fff; box-shadow: 0 0 0 3px rgba(72,84,34,.2); }
.tour-pin { position: absolute; top: -12px; right: -12px; z-index: 2; animation: tour-pulse 2.4s ease-in-out infinite; }
.tour-assistant .tour-dot, .tour-download .tour-dot, .tour-versions .tour-dot { position: absolute; top: -10px; right: -10px; min-width: 19px; height: 19px; font-size: .64rem; }
@keyframes tour-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(253,160,85,.3); } 50% { box-shadow: 0 0 0 8px rgba(253,160,85,.06); } }

/* Ventana */
.tour-window { background: #fff; border-radius: 18px; box-shadow: 0 40px 90px rgba(47,51,36,.22), 0 0 0 1px rgba(47,51,36,.06); }
.tour-bar { display: flex; align-items: center; gap: .65rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); font-size: .85rem; color: var(--text); }
.tour-bar > strong { font-weight: 800; }
.tour-progress { width: 70px; height: 6px; border-radius: 4px; background: #e2e8f0; overflow: hidden; }
.tour-progress i { display: block; width: 40%; height: 100%; background: var(--st-done-line); }
.tour-bar small { font-weight: 700; color: var(--st-done-line); }
.tour-spacer { flex: 1; }
.tour-assistant, .tour-download { position: relative; display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .65rem; border: 1px solid var(--line); border-radius: 8px; font-weight: 600; font-size: .78rem; }
.tour-download { padding: .35rem .45rem; color: var(--muted); }
.tour-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .6rem 1.2rem .6rem .8rem; border-bottom: 1px solid var(--line); background: #fbfbf7; }
.tour-tabs { display: inline-flex; background: #e2e8f0; padding: 3px; border-radius: 10px; }
.tour-tabs button { display: inline-flex; align-items: center; gap: .3rem; font: inherit; font-size: .8rem; font-weight: 700; border: none; background: none; color: var(--muted);
    padding: .4rem .7rem; border-radius: 8px; cursor: pointer; transition: background .2s, color .2s; }
.tour-tabs button:hover { color: var(--text); }
.tour-tabs button.active { background: #fff; color: var(--olive-900); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.tour-versions { display: flex; align-items: center; gap: .35rem; font-size: .72rem; flex-shrink: 0; }
.tour-versions em.old { display: none; }
.tour-versions em { position: relative; font-style: normal; font-weight: 600; padding: .22rem .55rem; border-radius: 999px; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); white-space: nowrap; }
.tour-versions em.current { border-color: var(--olive); color: var(--olive); }
.tour-versions em.save { border-style: dashed; color: var(--olive); }

/* Escenario de cada vista */
.tour-stage { position: relative; aspect-ratio: 800 / 520; container-type: inline-size; border-radius: 0 0 18px 18px; overflow: hidden;
    background-color: #fbfbfd; background-image: linear-gradient(#eceef3 1px, transparent 1px), linear-gradient(90deg, #eceef3 1px, transparent 1px); background-size: 22px 22px;
    animation: lp-rise .4s ease both; }
.tour-stage-roadmap { background-color: #f6f7f1; background-image: radial-gradient(#dfe3cf 1.2px, transparent 1.2px); background-size: 20px 20px; }
.tour-stage-checklist, .tour-stage-json { background: var(--bg); overflow: visible; }
.tour-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.tour-svg text { font-family: inherit; text-anchor: middle; }
.tour-svg-dot circle { fill: var(--orange); stroke: rgba(253,160,85,.35); stroke-width: 6; animation: tour-ring 2.4s ease-in-out infinite; }
.tour-svg-dot text { fill: var(--olive-900); font-size: 14px; font-weight: 800; }
@keyframes tour-ring { 0%, 100% { stroke-width: 6; } 50% { stroke-width: 14; stroke: rgba(253,160,85,.12); } }

/* Mapa */
.tour-edge { fill: none; stroke: #64748b; stroke-width: 1.8; }
.tour-edge.done { stroke: var(--st-done-line); stroke-width: 2.2; }
.tour-root { fill: var(--brand); }
.tour-root-text { fill: #fff; font-weight: 800; font-size: 16px; }
.tour-area { fill: var(--c); stroke: var(--c-line); stroke-width: 1.8; }
.tour-area-text { fill: var(--c-ink); font-weight: 700; font-size: 15px; }
.tour-leaf { fill: var(--c); stroke: var(--c-line); stroke-width: 1.8; }
.tour-leaf-text { fill: var(--c-ink); font-weight: 600; font-size: 12.5px; }
.tour-toggle circle { fill: #fff; stroke: #94a3b8; stroke-width: 1.6; }
.tour-toggle text { font-size: 12px; font-weight: 800; fill: var(--text); }

/* Roadmap (estilo Metro) */
.tour-line, .tour-line-done { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 10; }
.tour-line { stroke: #d5dac4; }
.tour-line-done { stroke: var(--st-done); }
.tour-stop-mark { fill: var(--c, var(--st-pend)); stroke: var(--c-line, var(--st-pend-line)); stroke-width: 3.5; }
.tour-stop-sign { fill: none; stroke: var(--c-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.tour-stop-text { font-size: 14px; font-weight: 600; fill: var(--text); }
.tour-stop.hecho .tour-stop-text { fill: var(--muted); text-decoration: line-through; }
.tour-stop.omitido .tour-stop-text { fill: var(--muted); }
.tour-stop-milestone { fill: var(--brand); }
.tour-stop-milestone.meta { fill: var(--orange); }
.tour-stop-num { fill: #fff; font-weight: 800; font-size: 15px; }
.tour-stop:has(.meta) .tour-stop-num { fill: var(--olive-900); }
.tour-here rect { fill: var(--brand); }
.tour-here text { fill: #fff; font-size: 12.5px; font-weight: 800; }

/* Checklist: igual que en la app, en una sola columna */
.tour-list { position: absolute; inset: 0; list-style: none; margin: 0; padding: 5cqw 7cqw; font-size: clamp(.78rem, 2.15cqw, .98rem); overflow: hidden; }
.tour-list ul { list-style: none; margin: 0 0 .5em 1.05em; padding: 0 0 0 1.4em; border-left: 1px dashed #cfd4bd; }
.tour-list li { margin: 0; }
.tour-list-head { display: flex; align-items: center; gap: .6em; padding: .5em 0; }
.tour-caret { width: 1.1em; }
.tour-pct { width: 3em; }
.tour-caret { color: var(--muted); }
.tour-pct { font-size: .82em; font-weight: 700; color: var(--muted); text-align: right; }
.tour-list-head strong { color: var(--olive-900); }
.tour-bar-mini { position: relative; width: 6em; height: .42em; border-radius: 4px; background: #e2e8f0; margin-left: .3em; }
.tour-bar-mini i { display: block; height: 100%; border-radius: 4px; background: var(--st-done-line); }
.tour-list-row { display: flex; align-items: center; gap: .7em; padding: .42em 0; }
.tour-list-row .badge { font-size: .72em; }
.tour-list-row.hecho > span:nth-child(2) { color: var(--muted); text-decoration: line-through; }
.tour-list-row.omitido > span:nth-child(2) { color: var(--muted); }
.tour-check .tour-pin { top: 50%; right: auto; left: -2.9em; transform: translateY(-50%); }
.tour-check { position: relative; width: 1.1em; height: 1.1em; border-radius: .3em; flex-shrink: 0; border: 2px solid var(--c-line, var(--st-pend-line)); background: var(--c, var(--st-pend)); }
.tour-list-row.hecho .tour-check::after { content: ""; position: absolute; left: 50%; top: 45%; width: .28em; height: .55em; border: solid var(--c-ink); border-width: 0 2px 2px 0; transform: translate(-50%, -50%) rotate(45deg); }
.tour-list-row.omitido .tour-check::after { content: ""; position: absolute; left: 50%; top: 50%; width: .5em; height: 2px; background: var(--c-ink); transform: translate(-50%, -50%); }

/* JSON */
.tour-json { position: absolute; inset: 0; padding: 5cqw 6cqw; display: flex; flex-direction: column; gap: 3cqw; font-size: clamp(.72rem, 2cqw, .92rem); }
.tour-json-head { display: flex; align-items: center; gap: .7em; }
.tour-json-head strong { margin-right: auto; font-size: 1.15em; color: var(--olive-900); }
.tour-json-btn { position: relative; display: inline-flex; align-items: center; gap: .35em; padding: .5em .85em; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-weight: 600; }
.tour-json-btn.primary { background: var(--orange); border-color: var(--orange); color: var(--olive-900); }
.tour-json-code { position: relative; flex: 1; min-height: 0; }
.tour-json pre { height: 100%; margin: 0; padding: 1.2em 1.4em; border-radius: 12px; background: #2b2d24; color: #e9eadf; font-size: 1em; line-height: 1.65; overflow: hidden; }
.tour-json pre b { color: #b5d48e; font-weight: 500; }
.tour-json pre s { text-decoration: none; color: #ffc48f; }
.tour-json pre i { font-style: normal; color: #8b8e7c; }

/* Lado derecho: qué es la vista y qué hace cada punto */
.tour-notes { animation: lp-rise .4s ease both; }
.tour-notes-kicker { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--rust); }
.tour-notes-title { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; color: var(--olive-900); margin: .5rem 0 1.6rem; }
.tour-notes ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.tour-notes li { display: flex; align-items: flex-start; gap: .75rem; margin: 0; font-size: 1rem; line-height: 1.45; color: var(--text); }
.tour-notes li .tour-dot { flex-shrink: 0; margin-top: .05rem; }
.tour-notes-always { margin-top: 1.4rem !important; padding-top: 1.4rem !important; border-top: 1px solid var(--line); gap: .7rem !important; }
.tour-notes-always li { font-size: .9rem; color: var(--muted); }
@media (max-width: 1000px) {
    .tour { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 900px) {
    .lp-tour-head { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .tour-progress, .tour-bar small, .tour-versions em:not(.save) { display: none; }
    .tour-toolbar { flex-direction: column; align-items: stretch; }
    .tour-tabs { justify-content: space-between; }
    .tour-tabs button { padding: .4rem .45rem; }
}

@media (prefers-reduced-motion: reduce) {
    .lp-noise-cloud span, .lp-who-show > *, .lp-who-fronts span, .tour-stage, .tour-pin, .tour-svg-dot circle, .tour-notes, .tour-hint, .tour-cursor { animation: none; }
}
@media (max-width: 900px) {
    .lp-noise-stage { grid-template-columns: 1fr; }
    .lp-noise-arrow { flex-direction: row; justify-content: center; }
    .lp-noise-arrow-dot { transform: rotate(90deg); }
    .lp-who-grid, .lp-blind-grid { grid-template-columns: 1fr; gap: 2rem; }
    .lp-blind-head { position: static; }
    .lp-who-list { flex-direction: row; flex-wrap: wrap; gap: .4rem; }
    .lp-who-list button { border-left: none; border-radius: 999px; padding: .5rem .9rem; font-size: .92rem; }
}
@media (max-width: 640px) {
    .lp-noise-cloud { height: 300px; }
    .lp-noise-cloud span { font-size: .8rem; }
    .lp-noise-clear, .lp-who-fronts { grid-template-columns: 1fr; }
    .lp-who-show { padding: 1.4rem; }
}

.lp-footer { background: var(--olive-900); color: rgba(255,255,255,.6); padding: 1.6rem 0; font-size: .85rem; }
.lp-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }

/* ============ Checkout ============ */
.co { padding: 3.5rem 0; }
.co-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 1.5rem; align-items: start; max-width: 940px; }
.co-card { background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 2rem; }
.co-card h1 { font-size: 1.6rem; color: var(--olive-800); margin-bottom: 1.2rem; }
.co-plans { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.co-plan { font: inherit; text-align: left; display: flex; flex-direction: column; gap: .15rem; padding: .9rem 1rem; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; color: var(--text); }
.co-plan span { font-size: .85rem; color: var(--muted); }
.co-plan.selected { border-color: var(--orange); background: #fff7ef; }
.co-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: .7rem; }
.co-pay { width: 100%; justify-content: center; margin-top: 1.4rem; }
.co-sim { font-size: .8rem; color: var(--muted); text-align: center; margin: .9rem 0 0; }
.co-summary h2 { font-size: 1.1rem; color: var(--olive-800); margin-bottom: 1rem; }
.co-line { display: flex; justify-content: space-between; padding: .5rem 0; font-size: .95rem; }
.co-total { border-top: 1px solid var(--line); margin-top: .4rem; padding-top: .9rem; font-size: 1.05rem; }
.co-perks { list-style: none; padding: 0; margin: 1rem 0 0; font-size: .9rem; }
.co-perks li { position: relative; padding-left: 1.5rem; }
.co-perks li::before { content: ""; position: absolute; left: 3px; top: .5em; width: 9px; height: 4.5px; border-left: 2px solid var(--olive-2); border-bottom: 2px solid var(--olive-2); transform: rotate(-45deg); }
.co-done { grid-column: 1 / -1; text-align: center; max-width: 520px; margin: 0 auto; }
.co-check { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; display: grid; place-content: center; background: var(--olive-2); color: #fff; font-size: 2rem; font-weight: 700; }
.co-done .btn { margin-top: .6rem; }

@media (max-width: 900px) {
    .lp-hero-grid, .co-grid { grid-template-columns: 1fr; }
    .lp-mock { transform: none; }
}
@media (max-width: 640px) {
    .lp-nav nav { display: none; }
    .lp-nav-inner .btn { margin-left: auto; }
    .lp-hero { padding: 3rem 0; }
    .lp-pricing { grid-template-columns: 1fr; }
    .lp-shot { grid-template-columns: 1.2fr 1fr; }
    .lp-shot .lp-pane:last-child { display: none; }
    .lp-shot .lp-pane:nth-child(2) { border-right: none; }
    .lp-section { padding: 3.5rem 0; }
    .co-card { padding: 1.4rem; }
}

/* ============ Login ============ */
.auth-card { max-width: 420px; margin: 0 auto; text-align: center; }
.auth-card h1 { margin: .8rem 0 .3rem; }
.auth-card form { text-align: left; }
.auth-google { width: 100%; justify-content: center; gap: .6rem; background: #fff; border-color: var(--line); color: var(--text); margin-top: 1rem; }
.auth-google:hover { background: var(--tint); }
.auth-note { margin: 1.2rem 0 0; font-size: .8rem; color: var(--muted); }
.lp-signin { color: var(--text); text-decoration: none; font-weight: 500; font-size: .92rem; }
.lp-signin:hover { color: var(--rust); }
/* Selector de idioma ES | EN */
.lang-switch { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: #fff; margin-left: .3rem; }
.lang-switch button { font: inherit; font-size: .72rem; font-weight: 700; letter-spacing: .04em; border: none; background: none; color: var(--muted); padding: .22rem .5rem; border-radius: 999px; cursor: pointer; }
.lang-switch button:hover { color: var(--text); }
.lang-switch button.active { background: var(--tint); color: var(--brand); }
.lp-nav .lang-switch { margin-left: 0; }
.user-chip { display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .85rem; color: var(--muted); border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .2rem .7rem .2rem .2rem; cursor: pointer; margin-left: .3rem; }
.user-chip:hover { color: var(--text); border-color: var(--olive-2); }
.user-chip img, .user-chip span { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.user-chip span { display: grid; place-content: center; background: var(--olive-2); color: #fff; font-weight: 600; font-size: .8rem; }
@media (max-width: 640px) {
    .lp-signin { margin-left: auto; }
    .lp-signin + .btn { margin-left: 0; }
}
.co-account { margin: 1rem 0 0; }

/* ============ Íconos en títulos y pestañas ============ */
.assistant-head h3, .panel-ai h4 { display: flex; align-items: center; gap: .45rem; }
.assistant-head h3 .icon, .panel-ai h4 .icon { color: var(--olive-2); }
.co-sim .icon { color: var(--olive-2); vertical-align: -.2em; }
.co-check .icon { vertical-align: 0; }

/* ============ Mi cuenta ============ */
.account { padding-bottom: 4rem; }
.account-tabs { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; overflow-x: auto; }
.account-tabs a { padding: .65rem .9rem; font-weight: 500; font-size: .92rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.account-tabs a:hover { color: var(--text); }
.account-tabs a.active { color: var(--olive); border-bottom-color: var(--olive); font-weight: 600; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; align-items: start; }
.account-card { margin-bottom: 1rem; }
.account-card h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.account-card .actions { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; }
.profile-head { display: flex; align-items: center; gap: .9rem; margin-bottom: 1rem; }
.profile-head img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.profile-head strong { display: block; font-size: 1.05rem; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1rem; margin: 0 0 1rem; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.license-line { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.badge.ok { background: #d5e8d4; color: #3f6b2a; }
.badge.danger { background: #fee2e2; color: #991b1b; }
.table-wrap { overflow-x: auto; margin: .8rem 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: .55rem .6rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: .7rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.row-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.row-actions a, .link-action { font: inherit; font-size: .85rem; font-weight: 600; color: var(--rust); text-decoration: none; background: none; border: none; padding: 0; cursor: pointer; white-space: nowrap; }
.row-actions a:hover, .link-action:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: .82rem; }
.nowrap { white-space: nowrap; }
.capitalize { text-transform: capitalize; }
.upper { text-transform: uppercase; }
.sub-list, .req-list, .legal-links { list-style: none; padding: 0; margin: .8rem 0 1rem; }
.sub-item, .req-list li { padding: .85rem 0; border-bottom: 1px solid var(--line); margin: 0; }
.sub-item:last-child, .req-list li:last-child { border-bottom: none; }
.sub-main, .req-main { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sub-meta, .req-meta { display: flex; flex-wrap: wrap; gap: .3rem 1.2rem; font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.req-response { margin: .5rem 0 0; padding: .6rem .8rem; background: var(--tint); border-radius: 8px; font-size: .88rem; }
.legal-links li { margin: .4rem 0; }
.danger-zone { border-color: #fecaca; }

/* ============ Páginas legales ============ */
.legal { padding: 3.5rem 0 5rem; }
.legal-wrap { max-width: 760px; }
.legal-eyebrow { color: var(--rust); }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.02em; color: var(--olive-900); }
.legal-updated { color: var(--muted); font-size: .9rem; margin-bottom: 2rem; }
.legal-note { font-size: .85rem; color: var(--muted); background: var(--tint); border-radius: 10px; padding: .6rem .8rem; }
.legal h2 { font-size: 1.2rem; margin: 2.2rem 0 .7rem; color: var(--olive-900); }
.legal p, .legal li { line-height: 1.7; }
.legal ul { margin-bottom: 1rem; }
.legal-pending { background: #ffe4cc; color: #8a3b00; padding: 0 .3rem; border-radius: 4px; font-weight: 600; }

.co-consent { display: flex; gap: .6rem; align-items: flex-start; margin-top: 1.2rem; font-size: .85rem; color: var(--muted); line-height: 1.5; cursor: pointer; }
.co-consent input { margin-top: .2rem; width: 16px; height: 16px; flex-shrink: 0; }
.auth-note a { color: var(--rust); }
.lp-footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.lp-footer-links a { color: rgba(255,255,255,.75); text-decoration: none; }
.lp-footer-links a:hover { color: #fff; }
@media (max-width: 640px) {
    .account-card .actions { flex-direction: column; align-items: stretch; }
}

/* ============ Panel de administrador ============ */
.admin-shell { min-height: 100vh; display: flex; flex-direction: column; }
.admin-top { display: flex; align-items: center; gap: .8rem; padding: .7rem 20px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.admin-tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #fff; background: var(--olive-800); padding: .25rem .55rem; border-radius: 6px; }
.admin-main { width: 100%; max-width: 1280px; margin: 0 auto; padding: 1.5rem 20px 4rem; }
.admin-main .account-tabs { align-items: center; }
.admin-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: .3rem; border-radius: 999px; background: var(--orange); color: var(--olive-900); font-size: .72rem; font-weight: 700; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .6rem; }
.admin-head h2 { margin: 0; }
.admin-search { max-width: 280px; padding: .5rem .75rem; }
.admin-filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.admin-filter { width: auto; padding: .45rem .7rem; font-size: .88rem; }
.admin-user { display: flex; align-items: center; gap: .6rem; }
.admin-user img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.admin-user strong, .admin-user span { display: block; }
.data-table tr.is-disabled td { opacity: .55; }
.link-action.danger { color: var(--err); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi { display: flex; flex-direction: column; gap: .2rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; color: inherit; text-decoration: none; }
.kpi span { font-size: .82rem; color: var(--muted); }
.kpi strong { font-size: 1.8rem; letter-spacing: -.02em; color: var(--olive-900); }
.kpi small { font-size: .8rem; color: var(--muted); }
.kpi.attention { border-color: var(--orange); background: #fff7ef; }
.admin-req { border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem; margin-top: .8rem; }
.admin-req .req-main { margin-bottom: .5rem; }
.admin-req p { margin: .3rem 0; }
.admin-req-detail { white-space: pre-wrap; }
.admin-fiscal { background: var(--tint); border-radius: 8px; padding: .7rem .9rem; margin: .6rem 0; font-size: .88rem; }
.admin-req-actions { justify-content: flex-end; margin-top: .6rem; }

/* ============ Ayuda y soporte ============ */
.help { padding-bottom: 4rem; }
.help .page-head { align-items: flex-end; }
.help .page-head p { margin: .3rem 0 0; }
.help-card { margin-bottom: 1rem; }
.help-group { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--rust); margin: 1.6rem 0 .6rem; }
.help-menu { display: grid; gap: .6rem; }
.help-option { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
.help-option:hover { border-color: var(--olive); background: var(--tint); }
.help-option-icon { display: grid; place-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--tint); color: var(--olive); flex-shrink: 0; }
.help-option-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.help-closed { text-align: center; color: var(--muted); font-size: .92rem; padding: 1rem; }
.back-link { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: .4rem; }
.back-link:hover { color: var(--olive); }

.ticket-list { list-style: none; padding: 0; margin: 0; }
.ticket-list li { margin: 0; border-top: 1px solid var(--line); }
.ticket-list li:first-child { border-top: none; }
.ticket-list a { display: flex; align-items: center; gap: .8rem; padding: .75rem .2rem; color: inherit; text-decoration: none; }
.ticket-list a:hover { background: var(--bg); }
.ticket-folio { font-family: ui-monospace, monospace; font-size: .8rem; color: var(--muted); }
.ticket-subject { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ticket-new, .ticket-waiting { color: var(--rust); font-weight: 700; }

.reply-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: .8rem; }

.img-picker { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.img-picker .img-thumbs { width: 100%; }
.img-add { cursor: pointer; }
.img-add.disabled { opacity: .5; pointer-events: none; }
.img-error { color: var(--err); }
.img-thumbs { display: flex; flex-wrap: wrap; gap: .5rem; }
.img-thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); padding: 0; cursor: pointer; display: grid; place-content: center; font-size: .72rem; color: var(--muted); }
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-thumb.loading { cursor: default; }
.img-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(0,0,0,.6); color: #fff; display: grid; place-content: center; cursor: pointer; }
.img-zoom { cursor: zoom-out; }
.img-zoom img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: var(--shadow-lg); }
.img-zoom .icon-btn { position: fixed; top: 16px; right: 16px; background: #fff; }

.thread { display: flex; flex-direction: column; gap: 1rem; }
.msg { max-width: 80%; display: flex; flex-direction: column; gap: .25rem; }
.msg.mine { align-self: flex-end; align-items: flex-end; }
.msg-meta { font-size: .78rem; color: var(--muted); }
.msg-bubble { padding: .7rem .9rem; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.msg.mine .msg-bubble { background: var(--tint); border-color: var(--lime-soft); }
.msg.support.theirs .msg-bubble { background: #fff; border-color: var(--peach); }
.msg-bubble p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: .93rem; }
.msg-bubble p + .img-thumbs { margin-top: .6rem; }

.ticket-admin-head { margin-top: .8rem; align-items: flex-start; }
.ticket-admin-head p { margin: .2rem 0 0; }
.ticket-admin-actions { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; margin-top: 1rem; }
.ticket-admin-actions select { margin-left: .4rem; }
.ticket-admin-status { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover td { background: var(--bg); }
.clamp-1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 380px; }

.faq-page { max-width: 820px; }
.faq-search { margin-bottom: .6rem; }
.faq-section { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--rust); margin: 1.6rem 0 .4rem; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary { cursor: pointer; font-weight: 600; padding: .8rem 0; list-style-position: outside; }
.faq-item summary:hover { color: var(--olive); }
.faq-item p { color: var(--muted); font-size: .93rem; margin: 0 0 .9rem; }

/* Aviso: los mapas viven solo en este navegador */
.storage-notice { display: flex; gap: .8rem; align-items: flex-start; padding: 1rem 1.1rem; margin-bottom: 1.2rem; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; color: #7c2d12; }
.storage-notice > .icon { color: var(--rust); margin-top: .1rem; }
.storage-notice strong { display: block; margin-bottom: .25rem; }
.storage-notice p { margin: 0; font-size: .9rem; line-height: 1.5; }
.storage-notice.compact { align-items: center; gap: .6rem; padding: .45rem .6rem .45rem 16px; margin: 0; border-radius: 0; border-width: 0 0 1px; font-size: .85rem; }
.storage-notice.compact strong { display: inline; margin: 0; }
.storage-notice.compact span { flex: 1; }
.onb .storage-notice.compact { border-radius: 10px; border-width: 1px; margin-bottom: 1rem; }
