/* ============ 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; }

/* Wizard */
.wizard-steps { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.wizard-steps li { margin: 0; flex: 1; min-width: 110px; }
.wizard-steps button {
    width: 100%; font: inherit; font-size: .85rem; font-weight: 600; text-align: left;
    background: #f8fafc; border: 1px solid var(--line); color: var(--muted);
    padding: .55rem .7rem; border-radius: 10px; cursor: pointer; display: flex; align-items: center; gap: .45rem;
}
.wizard-steps button:disabled { cursor: default; opacity: .7; }
.wizard-steps .num { width: 22px; height: 22px; border-radius: 50%; display: grid; place-content: center; background: #e2e8f0; font-size: .75rem; }
.wizard-steps .current button { border-color: var(--brand); color: var(--brand); background: var(--tint); }
.wizard-steps .current .num { background: var(--brand); color: #fff; }
.wizard-steps .done .num { background: var(--ok); color: #fff; }

.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 (los verdes son los de draw.io) */
:root {
    --st-pend-bg: #ffffff; --st-pend-line: #94a3b8;
    --st-prog-bg: #fef3c7; --st-prog-line: #f59e0b;
    --st-done-bg: #d5e8d4; --st-done-line: #82b366;
}
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--st-pend-line); background: var(--st-pend-bg); flex-shrink: 0; }
.dot.en-progreso { border-color: var(--st-prog-line); background: var(--st-prog-bg); }
.dot.hecho { border-color: var(--st-done-line); background: var(--st-done-line); }
.tag.en-progreso { background: var(--st-prog-bg); color: #92400e; }
.tag.hecho { background: var(--st-done-bg); color: #3f6b2a; }

/* ============ 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: #3f6b2a; }
.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(--st-pend-bg); border: 1.5px solid var(--st-pend-line); color: var(--text);
    transition: box-shadow .15s, transform .15s;
}
.mm-node:hover { box-shadow: 0 4px 14px rgba(15,23,42,.15); }
.mm-node.en-progreso { background: var(--st-prog-bg); border-color: var(--st-prog-line); }
.mm-node.hecho { background: var(--st-done-bg); border-color: var(--st-done-line); }
.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: #3f6b2a; }
.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; }
.status-picker button.active.hecho { background: var(--st-done-bg); color: #3f6b2a; }
.status-picker button.active.en-progreso { background: var(--st-prog-bg); color: #92400e; }
.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.hecho .cl-pct { color: #3f6b2a; }
.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); }
.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; }
.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-bg); color: #3f6b2a; }
.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); }

/* ============ 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; }
    .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: #3f6b2a; }
.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: var(--st-done-bg); 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; }
.lp-mock-body { display: grid; grid-template-columns: 150px 1fr; min-height: 300px; }
.lp-mock-side { display: flex; flex-direction: column; gap: .3rem; padding: 14px 10px; border-right: 1px solid var(--line); font-size: .78rem; }
.lp-mock-side .logo { font-size: .7rem; margin-bottom: .8rem; }
.lp-mock-side span:not(.logo):not(.logo *) { padding: .4rem .6rem; border-radius: 8px; color: var(--muted); }
.lp-mock-side span.on { background: var(--tint); color: var(--text); font-weight: 500; }
.lp-mock-canvas { position: relative; display: flex; align-items: center; gap: 70px; padding: 20px 24px;
    background-image: radial-gradient(#e6e4d8 1px, transparent 1px); background-size: 16px 16px; }
.lp-mock-lines { position: absolute; inset: 20px 24px; width: calc(100% - 48px); height: calc(100% - 40px); }
.lp-mock-lines path { fill: none; stroke: #8a8c7a; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.lp-mock-root { position: relative; padding: .8rem 1rem; border-radius: 18px; border: 1.5px solid var(--olive-2); background: var(--tint); font-size: .82rem; font-weight: 600; text-align: center; }
.lp-mock-kids { position: relative; display: flex; flex-direction: column; gap: 14px; margin-left: auto; }
.lp-mock-kids span { display: flex; align-items: center; gap: .45rem; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .9rem; font-size: .78rem; box-shadow: 0 2px 6px rgba(0,0,0,.05); }
.lp-mock-kids i { width: 9px; height: 9px; border-radius: 50%; }

.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-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.lp-feature { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 1.5rem; }
.lp-feature-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-content: center; background: var(--peach); color: var(--rust); margin-bottom: 1rem; }
.lp-feature h3 { font-size: 1.05rem; color: var(--olive-800); }
.lp-feature p { color: var(--muted); font-size: .92rem; margin: 0; }

.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.4rem; }
.lp-step { text-align: center; padding: 0 1rem; }
.lp-step-num { display: inline-grid; place-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--olive); color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; }
.lp-step h3 { font-size: 1.1rem; color: var(--olive-800); }
.lp-step p { color: var(--muted); }

.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-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.6rem, 3.5vw, 2.3rem); margin-bottom: 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; }
    .lp-features { grid-template-columns: repeat(2, 1fr); }
    .lp-steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .lp-nav nav { display: none; }
    .lp-nav-inner .btn { margin-left: auto; }
    .lp-hero { padding: 3rem 0; }
    .lp-features, .lp-pricing { grid-template-columns: 1fr; }
    .lp-mock-body { grid-template-columns: 1fr; }
    .lp-mock-side { display: none; }
    .lp-mock-canvas { gap: 30px; }
    .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); }
.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: var(--st-done-bg); 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 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; }
