/* Technify · demo interactiva (demo.html)
 * Réplica estática del panel de propietario de app.technify.es. Los tokens y
 * las clases salen de technify.es/src/app/globals.css (tf-*), con prefijo tx-
 * para no chocar con el Tailwind compilado de la landing. No usa Tailwind: se
 * puede tocar sin rebuildar styles.css.
 */
.tx {
  --ink:#0B1220; --ink-2:#1F2A44; --muted:#5B6577; --line:#E6EAF2; --bg:#F6F8FC;
  --brand:#1F5EFF; --brand-2:#0B3FD1; --brand-soft:#EAF0FF;
  --ok:#0FA958; --warn:#F59E0B; --danger:#E53E3E; --pink:#FF5A8A;
  font-family:Inter,system-ui,-apple-system,'Segoe UI',Arial,sans-serif;
  color:var(--ink); font-size:16px; line-height:1.5; text-align:left;
  position:relative; background:var(--bg);
}
.tx *, .tx *::before, .tx *::after { box-sizing:border-box; }
.tx[data-diseno="grande"] { font-size:18px; }
.tx[data-diseno="extra"] { font-size:20px; }
:where(.tx) button { font:inherit; color:inherit; background:none; border:0; cursor:pointer; padding:0; }
:where(.tx) input, :where(.tx) select, :where(.tx) textarea { font:inherit; color:inherit; }
:where(.tx) a { color:inherit; text-decoration:none; }
:where(.tx) h1, :where(.tx) h2, :where(.tx) h3, :where(.tx) h4 { font-weight:700; }
.tx svg.lucide { width:1em; height:1em; flex-shrink:0; }
.tx .i4 { width:16px; height:16px; } .tx .i3 { width:14px; height:14px; } .tx .i5 { width:20px; height:20px; }
.tx-mono { font-family:'JetBrains Mono',ui-monospace,monospace; }
.tx-muted { color:var(--muted); }

/* ── Marco: ventana (landing) o pantalla completa (#app) ── */
#tx-app { height:820px; border:1px solid var(--line); border-radius:14px; overflow:hidden; box-shadow:0 30px 80px -40px rgba(11,18,32,.3); display:flex; flex-direction:column; }
body.app-mode #tx-app { position:fixed; inset:0; z-index:40; height:auto; border:0; border-radius:0; box-shadow:none; }
.tx-demobar { flex-shrink:0; display:flex; align-items:center; gap:10px; padding:7px 16px; background:var(--ink); color:rgba(255,255,255,.75); font-size:.78rem; }
.tx-demobar b { color:#fff; font-weight:600; white-space:nowrap; }
.tx-demobar .dot { width:7px; height:7px; border-radius:50%; background:#3DDC84; box-shadow:0 0 0 3px rgba(61,220,132,.2); }
.tx-demobar .sp { margin-left:auto; }
.tx-demobar a, .tx-demobar button { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:8px; color:#fff; font-weight:600; font-size:.76rem; white-space:nowrap; }
.tx-demobar .ghost { background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.14); }
.tx-demobar .ghost:hover { background:rgba(255,255,255,.16); }
.tx-demobar .cta { background:var(--brand); }
.tx-demobar .cta:hover { background:var(--brand-2); }
.tx-demobar .hide-sm { display:inline; }
.tx-shell { flex:1; min-height:0; display:flex; }

/* ── Sidebar (desktop-sidebar.tsx) ── */
.tx-side { width:16rem; flex-shrink:0; background:#fff; border-right:1px solid var(--line); display:flex; flex-direction:column; overflow-y:auto; }
.tx-side-logo { display:flex; flex-direction:column; align-items:center; gap:.5rem; padding:1.25rem 1rem; border-bottom:1px solid var(--line); }
.tx-side-logo .org { font-size:1.25rem; font-weight:800; letter-spacing:-.025em; color:var(--ink); }
.tx-side-logo .sub { font-size:.72rem; font-weight:600; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); }
.tx-side nav { padding:.75rem; display:flex; flex-direction:column; gap:1rem; }
.tx-label { font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-weight:600; }
.tx-side .tx-label { margin-bottom:.5rem; padding-left:.25rem; }
.tx-side ul { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.25rem; }
.tx-link { width:100%; display:flex; align-items:center; gap:.65rem; padding:.55rem .8rem; border-radius:10px; color:#5B6577; font-weight:500; font-size:.9rem; transition:background .15s,color .15s; }
.tx-link svg { width:16px; height:16px; }
.tx-link:hover { background:#F2F5FB; color:var(--ink); }
.tx-link.on { background:var(--ink); color:#fff; box-shadow:0 1px 2px rgba(11,18,32,.15); }
.tx-link .badge { margin-left:auto; border-radius:999px; background:var(--brand); padding:.1rem .4rem; font-size:.68rem; font-weight:700; color:#fff; }
.tx-fav-empty { font-size:.75rem; color:var(--muted); padding:0 .5rem; }

/* ── Main + topbar ── */
.tx-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.tx-top { height:3.5rem; flex-shrink:0; border-bottom:1px solid var(--line); background:#fff; padding:0 1.5rem; display:flex; align-items:center; gap:1rem; }
.tx-top h1 { font-size:.875rem; font-weight:600; margin:0; color:var(--ink); }
.tx-burger { display:none; padding:6px; border-radius:8px; }
.tx-burger:hover { background:var(--bg); }
.tx-user { margin-left:auto; position:relative; }
.tx-user > button { display:flex; align-items:center; gap:.6rem; border-radius:8px; padding:.375rem .5rem; }
.tx-user > button:hover { background:#F9FAFB; }
.tx-user .who { text-align:left; line-height:1.2; }
.tx-user .who b { display:block; font-size:.875rem; font-weight:600; }
.tx-user .who span { font-size:.7rem; color:var(--muted); }
.tx-menu { position:absolute; right:0; top:calc(100% + 6px); width:14rem; background:#fff; border:1px solid #E5E7EB; border-radius:12px; box-shadow:0 20px 40px -12px rgba(11,18,32,.25); overflow:hidden; z-index:30; display:none; }
.tx-menu.open { display:block; }
.tx-menu .hd { padding:.75rem 1rem; background:rgba(249,250,251,.7); border-bottom:1px solid #F3F4F6; font-size:.875rem; }
.tx-menu .hd span { display:block; font-size:.72rem; color:var(--muted); }
.tx-menu button { width:100%; display:flex; align-items:center; gap:.6rem; padding:.6rem 1rem; font-size:.875rem; }
.tx-menu button:hover { background:#F9FAFB; }
.tx-menu .brand { color:var(--brand); font-weight:600; }
.tx-menu .red { color:#B91C1C; border-top:1px solid #F3F4F6; }
.tx-menu .red:hover { background:#FEF2F2; }
.tx-content { flex:1; overflow:auto; padding:1.5rem; background:var(--bg); }
.tx-page { max-width:1400px; margin:0 auto; }

/* ── Piezas comunes (globals.css) ── */
.tx-card { background:#fff; border:1px solid var(--line); border-radius:14px; }
.tx-lift { transition:transform .18s, box-shadow .18s; }
.tx-lift:hover { transform:translateY(-2px); box-shadow:0 10px 30px -15px rgba(11,18,32,.2); }
.tx-btn { display:inline-flex; align-items:center; justify-content:center; gap:.5rem; padding:.625rem 1rem; border-radius:10px; font-weight:600; font-size:.9rem; transition:background .15s, box-shadow .15s; white-space:nowrap; }
.tx-btn svg { width:16px; height:16px; }
.tx-btn-primary { background:var(--ink) !important; color:#fff !important; }
.tx-btn-primary:hover { background:#000 !important; }
.tx-btn-brand { background:var(--brand) !important; color:#fff !important; }
.tx-btn-brand:hover { background:var(--brand-2) !important; }
.tx-btn-ghost { background:#fff !important; box-shadow:inset 0 0 0 1px var(--line); }
.tx-btn-ghost:hover { background:#fafbff !important; }
.tx-btn-sm { padding:.35rem .65rem; font-size:.72rem; border-radius:8px; }
.tx-btn-sm svg { width:14px; height:14px; }
.tx-btn[disabled] { opacity:.5; cursor:not-allowed; }
.tx-tag { display:inline-flex; align-items:center; gap:.25rem; font-size:.7rem; font-weight:600; padding:.2rem .55rem; border-radius:6px; white-space:nowrap; }
.tx-chip { display:inline-flex; align-items:center; gap:.35rem; border-radius:999px; font-size:.72rem; font-weight:600; padding:.3rem .6rem; white-space:nowrap; }
.tx-dot { width:7px; height:7px; border-radius:50%; display:inline-block; flex-shrink:0; }
.tx-input { width:100%; border-radius:10px; border:1px solid var(--line); background:#fff; padding:.5rem .75rem; font-size:.875rem; outline:none; transition:border-color .15s, box-shadow .15s; }
.tx-input:focus { border-color:var(--brand); box-shadow:0 0 0 3px var(--brand-soft); }
textarea.tx-input { resize:vertical; min-height:110px; line-height:1.5; }
.tx-sel { border-radius:6px; border:1px solid var(--line); background:#fff; font-size:.72rem; font-weight:600; padding:.2rem .35rem; outline:none; cursor:pointer; }
.tx-flabel { display:block; font-size:.65rem; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); font-weight:600; margin-bottom:.3rem; }

.tx-head { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:1rem; margin-bottom:1.25rem; }
.tx-head h2 { font-size:1.5rem; font-weight:700; letter-spacing:-.025em; margin:0; line-height:1.2; display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.tx-head p { margin:.25rem 0 0; font-size:.875rem; color:var(--muted); }
.tx-head .acts { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.tx-crumb { font-size:.8rem; color:var(--muted); margin-bottom:.35rem; }
.tx-crumb button:hover { color:var(--ink); text-decoration:underline; }
.tx-star { color:#CBD2DF; padding:2px; }
.tx-star:hover { color:var(--warn); }

.tx-grid { display:grid; gap:1rem; }
.tx-g4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.tx-g3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.tx-g7 { grid-template-columns:repeat(7,minmax(0,1fr)); }
.tx-g12 { grid-template-columns:repeat(12,minmax(0,1fr)); }
.c8 { grid-column:span 8; } .c7 { grid-column:span 7; } .c5 { grid-column:span 5; } .c4 { grid-column:span 4; } .c12 { grid-column:span 12; }

.tx-kpi { padding:1.25rem; }
.tx-kpi .top { display:flex; align-items:flex-start; justify-content:space-between; gap:.5rem; }
.tx-kpi .lb { font-size:.75rem; font-weight:600; color:var(--muted); }
.tx-kpi .ic { width:2rem; height:2rem; border-radius:8px; display:flex; align-items:center; justify-content:center; }
.tx-kpi .ic svg { width:16px; height:16px; }
.tx-kpi .v { font-size:1.9rem; font-weight:800; letter-spacing:-.025em; line-height:1.1; margin-top:.5rem; }
.tx-kpi .s { font-size:.75rem; color:var(--muted); margin-top:.15rem; }
.tx-kpi.sm { padding:1rem; }
.tx-kpi.sm .v { font-size:1.5rem; }
.tx-kpi.sm .lb { font-size:.66rem; text-transform:uppercase; letter-spacing:.08em; }

.tx-ctitle { display:flex; align-items:center; gap:.5rem; font-size:1rem; font-weight:700; margin:0; }
.tx-ctitle svg { width:16px; height:16px; color:var(--brand); }
.tx-chead { display:flex; align-items:center; justify-content:space-between; gap:.75rem; padding:1rem 1.25rem; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.tx-chead p { margin:.15rem 0 0; font-size:.75rem; color:var(--muted); }
.tx-lnk { font-size:.75rem; font-weight:600; color:var(--brand); display:inline-flex; align-items:center; gap:.25rem; }
.tx-lnk:hover { text-decoration:underline; }

/* Tablas */
.tx-tablewrap { overflow-x:auto; }
table.tx-table { width:100%; border-collapse:collapse; font-size:.875rem; }
.tx-table th { padding:.625rem 1rem; text-align:left; font-size:.7rem; font-weight:600; text-transform:uppercase; letter-spacing:.1em; color:var(--muted); background:var(--bg); white-space:nowrap; }
.tx-table td { padding:.75rem 1rem; border-top:1px solid var(--line); vertical-align:middle; }
.tx-table tbody tr:hover td { background:var(--bg); }
.tx-table tr.late td { background:#FEF2F2; }
.tx-table tr.click { cursor:pointer; }
.tx-table .r { text-align:right; }
.tx-trunc { max-width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.tx-av { border-radius:50%; color:#fff; font-weight:600; display:inline-flex; align-items:center; justify-content:center; flex-shrink:0; background:var(--brand); }
.tx-av.xs { width:1.25rem; height:1.25rem; font-size:.55rem; }
.tx-av.sm { width:1.75rem; height:1.75rem; font-size:.66rem; }
.tx-av.md { width:2.25rem; height:2.25rem; font-size:.8rem; }
.tx-av.lg { width:2.75rem; height:2.75rem; font-size:.95rem; }
.tx-who { display:flex; align-items:center; gap:.5rem; white-space:nowrap; }

.tx-empty { padding:2.5rem 1rem; text-align:center; color:var(--muted); font-size:.875rem; }
.tx-row { display:flex; align-items:center; gap:.75rem; }
.tx-list > * + * { border-top:1px solid var(--line); }
.tx-bar { height:6px; border-radius:999px; background:#EEF1F7; overflow:hidden; }
.tx-bar > span { display:block; height:100%; border-radius:999px; }
.tx-note { font-size:.75rem; color:var(--muted); }
.tx-warnbox { display:flex; align-items:center; gap:.75rem; padding:.9rem 1.1rem; border:1px solid #FCD34D; border-radius:14px; background:#fff; margin-bottom:1rem; cursor:pointer; }
.tx-warnbox:hover { background:#FFFBEB; }

/* Gantt (super-admin/page.tsx) */
.tx-gantt { overflow-x:auto; }
.tx-gantt-in { min-width:720px; }
.tx-grow { display:flex; height:54px; border-top:1px solid var(--line); }
.tx-grow .nm { width:160px; flex-shrink:0; display:flex; align-items:center; gap:.5rem; padding:0 1rem; font-size:.82rem; font-weight:500; border-right:1px solid var(--line); }
.tx-grow .tl { flex:1; position:relative; background-image:linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size:calc(100% / 6) 100%; }
.tx-gaxis { display:flex; height:28px; }
.tx-gaxis .nm { width:160px; flex-shrink:0; border-right:1px solid var(--line); }
.tx-gaxis .tl { flex:1; position:relative; }
.tx-gaxis .tl span { position:absolute; top:7px; transform:translateX(-50%); font-size:.65rem; color:var(--muted); }
.tx-gbar { position:absolute; top:9px; bottom:9px; border-radius:8px; font-size:.7rem; font-weight:600; color:#fff; display:flex; align-items:center; gap:.3rem; padding:0 .5rem; overflow:hidden; white-space:nowrap; cursor:pointer; box-shadow:0 2px 6px rgba(0,0,0,.08); }
.tx-gbar:hover { filter:brightness(1.07); }
.tx-gbar svg { width:12px; height:12px; flex-shrink:0; }
.tx-gbar.unas { background:#fff !important; color:var(--muted); border:1px dashed #B9C3DB; box-shadow:none; }
.tx-gbar.done { opacity:.55; }
.tx-now { position:absolute; top:0; bottom:0; width:2px; background:var(--danger); z-index:2; }
.tx-now::before { content:""; position:absolute; top:-3px; left:-3px; width:8px; height:8px; border-radius:50%; background:var(--danger); }

/* Mapa (teselas OSM sin Leaflet: el CSP de la landing no deja cargar su CSS) */
.tx-map { position:relative; overflow:hidden; background:#E8EEF5; min-height:240px; }
.tx-map .tiles { position:absolute; left:0; top:0; }
.tx-map .tiles img { position:absolute; width:256px; height:256px; max-width:none; user-select:none; pointer-events:none; }
.tx-mk { position:absolute; width:34px; height:34px; margin:-17px 0 0 -17px; border-radius:50%; color:#fff; font-size:.7rem; font-weight:700; display:flex; align-items:center; justify-content:center; border:3px solid #fff; box-shadow:0 4px 12px rgba(11,18,32,.35); z-index:2; cursor:default; }
.tx-mk.off { filter:grayscale(1); opacity:.75; }
.tx-mk.live::after { content:""; position:absolute; inset:-8px; border-radius:50%; border:2px solid currentColor; opacity:0; animation:txpulse 2s infinite; color:inherit; }
.tx-mk .tip { display:none; position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); background:#fff; color:var(--ink); font-size:.72rem; font-weight:500; padding:.35rem .55rem; border-radius:8px; box-shadow:0 6px 18px rgba(11,18,32,.2); white-space:nowrap; }
.tx-mk:hover .tip { display:block; }
.tx-map .attr { position:absolute; right:0; bottom:0; font-size:.6rem; background:rgba(255,255,255,.8); padding:1px 5px; z-index:3; }
@keyframes txpulse { 0% { transform:scale(.6); opacity:.7 } 100% { transform:scale(1.4); opacity:0 } }

/* Detalle de parte */
.tx-dl { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }
.tx-dl .k, .tx-field .k { font-size:.7rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-weight:600; margin-bottom:.2rem; }
.tx-dl .v, .tx-field .v { font-size:.875rem; }
.tx-field { padding-top:.9rem; margin-top:.9rem; border-top:1px solid var(--line); }
.tx-det { border-top:1px solid var(--line); }
.tx-det summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:.5rem; padding:1rem 1.25rem; font-weight:700; }
.tx-det summary::-webkit-details-marker { display:none; }
.tx-det summary .chev { margin-left:auto; transition:transform .15s; color:var(--muted); }
.tx-det[open] summary .chev { transform:rotate(180deg); }
.tx-det summary svg:first-child { color:var(--brand); width:16px; height:16px; }
.tx-tl { position:relative; padding-left:1.25rem; }
.tx-tl::before { content:""; position:absolute; left:5px; top:4px; bottom:4px; width:2px; background:var(--line); }
.tx-tl > div { position:relative; padding-bottom:.9rem; }
.tx-tl > div::before { content:""; position:absolute; left:-1.2rem; top:.35rem; width:10px; height:10px; border-radius:50%; background:#fff; border:2px solid var(--brand); }
.tx-photo { aspect-ratio:4/3; border-radius:10px; overflow:hidden; position:relative; }
.tx-photo span { position:absolute; left:6px; bottom:6px; font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.06em; background:rgba(11,18,32,.7); color:#fff; padding:2px 6px; border-radius:5px; }
.tx-sign { height:8rem; border:1px solid var(--line); border-radius:8px; background:#fff; display:flex; align-items:center; justify-content:center; }
.tx-kv { display:flex; justify-content:space-between; align-items:center; gap:.5rem; font-size:.875rem; padding:.4rem 0; }
.tx-ibox { width:2rem; height:2rem; border-radius:8px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.tx-ibox svg { width:15px; height:15px; }

/* Presupuestos IA */
.tx-pgrid { display:grid; grid-template-columns:400px 1fr; gap:1.25rem; align-items:start; }
.tx-thumbs { display:flex; gap:.5rem; flex-wrap:wrap; }
.tx-thumb { width:6rem; height:6rem; border-radius:8px; overflow:hidden; position:relative; }
.tx-thumb button { position:absolute; top:3px; right:3px; background:rgba(11,18,32,.65); color:#fff; border-radius:6px; padding:2px; line-height:0; }
.tx-addph { width:6rem; height:6rem; border-radius:8px; border:1.5px dashed #B9C3DB; color:var(--muted); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.25rem; font-size:.7rem; font-weight:600; }
.tx-addph:hover { border-color:var(--brand); color:var(--brand); background:var(--brand-soft); }
.tx-or { display:flex; align-items:center; gap:.75rem; font-size:.75rem; color:var(--muted); margin:1rem 0; }
.tx-or::before, .tx-or::after { content:""; flex:1; height:1px; background:var(--line); }
.tx-q { padding:1rem 0; border-top:1px solid var(--line); }
.tx-q h4 { margin:0 0 .6rem; font-size:.9rem; font-weight:600; display:flex; gap:.5rem; align-items:flex-start; }
.tx-q h4 svg { color:var(--brand); width:16px; height:16px; margin-top:2px; }
.tx-opts { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:.5rem; }
.tx-opt { border:1px solid var(--line); border-radius:10px; padding:.55rem .75rem; font-size:.82rem; text-align:left; }
.tx-opt:hover { border-color:#B9C3DB; }
.tx-opt.on { border-color:var(--brand); background:rgba(31,94,255,.05); color:var(--brand); font-weight:600; }
.tx-steps { display:flex; flex-direction:column; gap:.7rem; margin:1.25rem 0; }
.tx-step { display:flex; align-items:center; gap:.7rem; font-size:.875rem; color:var(--muted); }
.tx-step .c { width:20px; height:20px; border-radius:50%; display:flex; align-items:center; justify-content:center; background:#EEF1F7; flex-shrink:0; }
.tx-step .c i { width:6px; height:6px; border-radius:50%; background:#B9C3DB; }
.tx-step.done { color:var(--ink); }
.tx-step.done .c { background:var(--brand); color:#fff; }
.tx-step.done .c svg { width:12px; height:12px; }
.tx-step.act { color:var(--ink); font-weight:600; }
.tx-step.act .c { background:transparent; border:2px solid var(--brand-soft); border-top-color:var(--brand); animation:txspin .8s linear infinite; }
@keyframes txspin { to { transform:rotate(360deg) } }
.tx-spin { width:28px; height:28px; border-radius:50%; border:3px solid var(--brand-soft); border-top-color:var(--brand); animation:txspin .8s linear infinite; }
.tx-optcard { border:2px solid var(--line); border-radius:14px; padding:1rem; background:#fff; }
.tx-optcard.rec { border-color:var(--brand); background:var(--brand-soft); }
.tx-optcard.pick { border-color:var(--ok); background:#F3FBF6; }
.tx-optcard .num { width:1.6rem; height:1.6rem; border-radius:50%; background:var(--ink); color:#fff; font-size:.75rem; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.tx-grp summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:.4rem; padding:.45rem 0; font-size:.85rem; }
.tx-grp summary::-webkit-details-marker { display:none; }
.tx-grp summary svg { width:14px; height:14px; color:var(--muted); transition:transform .15s; }
.tx-grp[open] summary svg { transform:rotate(90deg); }
.tx-grp summary b { margin-left:auto; }
.tx-line { display:flex; gap:.75rem; font-size:.78rem; padding:.35rem 0 .35rem 1.2rem; color:var(--ink-2); }
.tx-line.est { color:#92400E; }
.tx-line .q { margin-left:auto; white-space:nowrap; color:var(--muted); }
.tx-amber { display:flex; gap:.6rem; align-items:flex-start; background:#FFFBEB; border:1px solid #FDE68A; color:#92400E; border-radius:10px; padding:.7rem .9rem; font-size:.8rem; }
.tx-amber svg { width:16px; height:16px; flex-shrink:0; margin-top:1px; }
.tx-bluebox { background:#EFF6FF; border:1px solid #BFDBFE; color:#1E3A8A; border-radius:10px; padding:.7rem .9rem; font-size:.84rem; }
.tx-rec { color:#fff !important; background:#DC2626 !important; }

/* Pills / tabs */
.tx-pills { display:flex; gap:.35rem; flex-wrap:wrap; }
.tx-pill { border-radius:999px; padding:.3rem .75rem; font-size:.78rem; font-weight:600; color:var(--muted); box-shadow:inset 0 0 0 1px var(--line); background:#fff; }
.tx-pill.on { background:var(--brand-soft); color:var(--brand); box-shadow:inset 0 0 0 1px #C7D6FF; }
.tx-tabs { display:flex; gap:1.25rem; border-bottom:1px solid var(--line); margin-bottom:1rem; }
.tx-tabs button { padding:.6rem 0; font-size:.875rem; font-weight:600; color:var(--muted); border-bottom:2px solid transparent; margin-bottom:-1px; }
.tx-tabs button.on { color:var(--ink); border-color:var(--brand); }
.tx-switch { width:36px; height:20px; border-radius:999px; background:#D5DCEC; position:relative; transition:background .15s; flex-shrink:0; }
.tx-switch::after { content:""; position:absolute; top:2px; left:2px; width:16px; height:16px; border-radius:50%; background:#fff; transition:left .15s; box-shadow:0 1px 2px rgba(0,0,0,.2); }
.tx-switch.on { background:var(--brand); }
.tx-switch.on::after { left:18px; }

/* Vista técnico: teléfono */
.tx-tecwrap { display:grid; grid-template-columns:auto 1fr; gap:2.5rem; align-items:start; }
.tx-phone { width:360px; height:740px; border-radius:44px; background:var(--ink); padding:12px; box-shadow:0 30px 60px -20px rgba(11,18,32,.45); }
.tx-screen { width:100%; height:100%; border-radius:34px; overflow:hidden; background:var(--bg); display:flex; flex-direction:column; position:relative; font-size:15px; }
.tx-ph-top { background:#fff; border-bottom:1px solid var(--line); padding:14px 16px 12px; display:flex; align-items:center; gap:.5rem; font-weight:700; flex-shrink:0; }
.tx-ph-top.back { font-weight:600; font-size:.9rem; }
.tx-ph-body { flex:1; overflow-y:auto; padding:14px; }
.tx-ph-nav { display:flex; background:#fff; border-top:1px solid #E5E7EB; padding:6px 6px 10px; flex-shrink:0; }
.tx-ph-nav button { flex:1; display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 0 5px; border-radius:10px; font-size:.6875rem; font-weight:500; color:#6B7280; position:relative; }
.tx-ph-nav button svg { width:20px; height:20px; }
.tx-ph-nav button.on { color:#171717; background:#EFF6FF; font-weight:700; }
.tx-ph-nav button.on::after { content:""; position:absolute; bottom:2px; width:22px; height:2px; border-radius:2px; background:#171717; }
.tx-hero { border-radius:1rem; padding:1.25rem 1.1rem; color:#fff; position:relative; overflow:hidden; box-shadow:0 18px 45px -22px rgba(11,18,32,.55); background:radial-gradient(circle at top right, rgba(31,94,255,.35), transparent 55%), linear-gradient(135deg,#0B1220 0%,#1F2A44 100%); }
.tx-hero::after { content:""; position:absolute; left:-40px; bottom:-60px; width:160px; height:160px; border-radius:50%; background:var(--brand); opacity:.3; filter:blur(48px); }
.tx-hero .d { font-size:11px; text-transform:uppercase; letter-spacing:.12em; color:#D1D5DB; font-weight:600; }
.tx-hero h3 { margin:.2rem 0 .1rem; font-size:1.45rem; font-weight:700; }
.tx-hero p { margin:0; font-size:.84rem; color:#D1D5DB; }
.tx-hero .stats { position:relative; z-index:1; display:grid; grid-template-columns:repeat(3,1fr); margin-top:1rem; border-radius:.75rem; background:rgba(255,255,255,.06); box-shadow:inset 0 0 0 1px rgba(255,255,255,.1); }
.tx-hero .stats > div { padding:.6rem .75rem; }
.tx-hero .stats > div + div { border-left:1px solid rgba(255,255,255,.1); }
.tx-hero .stats b { display:block; font-size:1.3rem; font-weight:800; }
.tx-hero .stats span { font-size:10px; text-transform:uppercase; letter-spacing:.1em; color:#9CA3AF; font-weight:600; }
.tx-agenda { padding:1rem; margin-bottom:.6rem; cursor:pointer; }
.tx-agenda.fin { opacity:.65; }
.tx-agenda .t { display:flex; justify-content:space-between; align-items:center; margin-bottom:.35rem; }
.tx-agenda h4 { margin:0; font-size:.95rem; font-weight:600; line-height:1.3; }
.tx-agenda p { margin:.2rem 0 0; font-size:.78rem; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tx-achip { border-radius:999px; padding:.15rem .6rem; font-size:.62rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; }
.tx-startbox { border-radius:1rem; border:1px solid #C7D2FE; background:#EEF2FF; padding:1rem; }
.tx-startbox.run { border-color:#A7F3D0; background:#ECFDF5; }
.tx-startbox h3 { margin:.15rem 0 .6rem; font-size:1.1rem; }
.tx-bigbtn { width:100%; display:flex; align-items:center; justify-content:center; gap:.5rem; border-radius:12px; padding:.8rem; font-weight:700; color:#fff; background:#4F46E5; }
.tx-bigbtn:hover { background:#4338CA; }
.tx-bigbtn.green { background:#059669; } .tx-bigbtn.green:hover { background:#047857; }
.tx-pulse { width:8px; height:8px; border-radius:50%; background:#10B981; display:inline-block; animation:txblink 1.2s infinite; }
@keyframes txblink { 50% { opacity:.3 } }
.tx-pad { width:100%; height:150px; border:1.5px dashed #B9C3DB; border-radius:10px; background:#fff; touch-action:none; display:block; cursor:crosshair; }
.tx-explain h3 { font-size:1.35rem; letter-spacing:-.02em; margin:0 0 .5rem; }
.tx-explain ol { list-style:decimal; padding-left:1.1rem; margin:.75rem 0; font-size:.9rem; color:var(--ink-2); }
.tx-explain li { margin-bottom:.45rem; }

/* Tecni */
.tx-tecni { position:absolute; right:24px; bottom:96px; z-index:20; }
.tx-tecni-btn { width:64px; height:64px; border-radius:50%; background:var(--brand) !important; box-shadow:0 10px 24px -6px rgba(31,94,255,.55), 0 0 0 2px #fff; overflow:hidden; position:relative; }
.tx-tecni-btn img { width:100%; height:100%; object-fit:cover; display:block; }
.tx-tecni-btn .ping { position:absolute; top:4px; right:4px; width:12px; height:12px; border-radius:50%; background:var(--pink); border:2px solid #fff; }
.tx-tecni-tip { position:absolute; right:74px; top:50%; transform:translateY(-50%); background:var(--ink); color:#fff; font-size:.75rem; font-weight:600; padding:.35rem .6rem; border-radius:8px; white-space:nowrap; opacity:0; pointer-events:none; transition:opacity .15s; }
.tx-tecni:hover .tx-tecni-tip { opacity:1; }
.tx-tecni-panel { position:absolute; right:0; bottom:76px; width:400px; max-width:calc(100vw - 32px); height:520px; max-height:calc(100vh - 200px); background:#fff; border:1px solid var(--line); border-radius:1rem; box-shadow:0 25px 50px -12px rgba(11,18,32,.35); display:none; flex-direction:column; overflow:hidden; }
.tx-tecni-panel.open { display:flex; }
.tx-tecni-hd { display:flex; align-items:center; gap:.7rem; padding:.8rem 1rem; border-bottom:1px solid var(--line); }
.tx-tecni-hd img { width:44px; height:44px; border-radius:50%; background:var(--brand); }
.tx-tecni-body { flex:1; overflow-y:auto; padding:1rem; display:flex; flex-direction:column; gap:.6rem; }
.tx-bub { max-width:85%; padding:.6rem .85rem; border-radius:1rem; font-size:.85rem; line-height:1.45; }
.tx-bub.ai { background:var(--bg); border-bottom-left-radius:4px; }
.tx-bub.me { background:var(--brand); color:#fff; border-bottom-right-radius:4px; margin-left:auto; }
.tx-sugs { display:flex; flex-direction:column; gap:.35rem; }
.tx-sugs button { text-align:left; font-size:.8rem; font-weight:500; padding:.45rem .7rem; border-radius:10px; box-shadow:inset 0 0 0 1px var(--line); color:var(--ink-2); }
.tx-sugs button:hover { background:var(--brand-soft); color:var(--brand); }
.tx-tecni-ft { border-top:1px solid var(--line); padding:.7rem; display:flex; gap:.5rem; }

/* Modal + toast */
.tx-modal { position:absolute; inset:0; background:rgba(11,18,32,.45); z-index:50; display:flex; align-items:center; justify-content:center; padding:1rem; }
.tx-modal > div { background:#fff; border-radius:14px; width:100%; max-width:520px; max-height:100%; overflow:auto; box-shadow:0 25px 50px -12px rgba(11,18,32,.4); }
.tx-toast { position:absolute; left:50%; bottom:24px; transform:translateX(-50%) translateY(20px); background:var(--ink); color:#fff; font-size:.84rem; font-weight:500; padding:.65rem 1rem; border-radius:10px; box-shadow:0 12px 30px -10px rgba(11,18,32,.5); opacity:0; transition:.2s; z-index:60; pointer-events:none; display:flex; align-items:center; gap:.5rem; max-width:90%; }
.tx-toast.on { opacity:1; transform:translateX(-50%); }
.tx-toast svg { width:16px; height:16px; color:#3DDC84; }

/* Responsive */
@media (max-width:1200px) {
  .c8, .c7, .c5, .c4 { grid-column:span 12; }
  .tx-g7 { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:1024px) {
  .tx-pgrid { grid-template-columns:1fr; }
  .tx-tecwrap { grid-template-columns:1fr; justify-items:center; }
  .tx-explain { max-width:520px; }
}
@media (max-width:900px) {
  .tx-g4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tx-dl { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:767px) {
  #tx-app { height:760px; }
  .tx-side { position:absolute; top:0; bottom:0; left:0; z-index:45; transform:translateX(-100%); transition:transform .2s; box-shadow:0 0 40px rgba(11,18,32,.3); }
  .tx-side.open { transform:none; }
  .tx-burger { display:inline-flex; }
  .tx-top { padding:0 1rem; }
  .tx-user .who { display:none; }
  .tx-content { padding:1rem; }
  .tx-g3, .tx-g7 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .tx-demobar .hide-sm { display:none; }
  .tx-phone { width:100%; max-width:360px; height:680px; padding:8px; border-radius:36px; }
  .tx-screen { border-radius:28px; }
  .tx-tecni { right:16px; bottom:88px; }
  .tx-tecni-btn { width:52px; height:52px; }
}
@media (max-width:480px) {
  .tx-g4 { grid-template-columns:1fr 1fr; }
  .tx-kpi .v { font-size:1.5rem; }
}
