/* ============== ALLBASE — Cierre · 3 caminos (canvas de variantes) ============== */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&display=swap');

:root{
  --bg:#0e0b1a; --bg-2:#140f26; --node-bg:#1a1040;
  --violet:#a855f7; --violet-2:#c084fc; --pink:#ec4899;
  --ink:#f4f0ff; --muted:#9a8fbf; --red:#ff5470; --green:#3ee08e;
  --brand:#bd32c2; --brand-lite:#d24fd7; --wa:#25D366; --wa-deep:#128C7E;
  --grad:linear-gradient(135deg,#a855f7 0%,#ec4899 100%);
  --font:"Sora",-apple-system,BlinkMacSystemFont,sans-serif;
  --ease:cubic-bezier(.2,.8,.2,1); /* [ENC #4] curva firma del movimiento */
  --vol-white:
    .016em .02em 0 #7a4fb8, .032em .04em 0 #6438a4, .05em .062em 0 #512c8a,
    .067em .083em 0 #3f2170, .084em .104em 0 #2f1857, .1em .125em 0 #221140,
    .11em .15em .26em rgba(0,0,0,.62), 0 0 .5em rgba(168,85,247,.42);
  --vol-pink:
    .016em .02em 0 #9c2aa0, .032em .04em 0 #87238b, .05em .062em 0 #721c76,
    .067em .083em 0 #5d1661, .084em .104em 0 #48104b, .1em .125em 0 #340b37,
    .11em .15em .28em rgba(0,0,0,.62), 0 0 .54em rgba(216,90,221,.6);
}

/* ===== stage (shared cinematic backdrop, matches the landing) ===== */
.ab-stage{
  position:relative; width:100%; height:100%; overflow:hidden;
  font-family:var(--font); color:var(--ink);
  background:
    radial-gradient(120% 86% at 50% 8%, rgba(168,85,247,.16), transparent 55%),
    radial-gradient(90% 70% at 84% 100%, rgba(236,72,153,.12), transparent 60%),
    var(--bg);
  -webkit-font-smoothing:antialiased;
}
.ab-stage .grid-floor{
  position:absolute; inset:0; pointer-events:none; opacity:.5;
  background-image:
    linear-gradient(rgba(168,85,247,.06) 1px,transparent 1px),
    linear-gradient(90deg,rgba(168,85,247,.06) 1px,transparent 1px);
  background-size:46px 46px;
  -webkit-mask-image:radial-gradient(90% 80% at 50% 40%,#000,transparent 78%);
          mask-image:radial-gradient(90% 80% at 50% 40%,#000,transparent 78%);
}
.ab-stage .stars{position:absolute;inset:0;pointer-events:none}
.ab-stage .stars i{position:absolute;width:2px;height:2px;border-radius:50%;
  background:var(--violet-2);opacity:.5;box-shadow:0 0 6px rgba(192,132,252,.8)}
.ab-stage .wrap{position:relative;z-index:2;width:100%;height:100%;
  display:flex;flex-direction:column;box-sizing:border-box}

/* ===== shared head ===== */
.ab-kicker{font-size:13px;font-weight:700;letter-spacing:.2em;text-transform:uppercase;
  color:var(--violet-2);display:inline-flex;align-items:center;gap:9px}
.ab-kicker::before{content:"";width:26px;height:1.5px;background:linear-gradient(90deg,transparent,var(--violet-2))}
.ab-h2{font-size:46px;font-weight:700;line-height:1.04;letter-spacing:-.02em;
  text-shadow:var(--vol-white);text-wrap:balance}
.ab-h2 .pink{color:var(--brand-lite);text-shadow:var(--vol-pink)}
.ab-sub{color:var(--muted);font-size:16.5px;line-height:1.55;font-weight:400;text-wrap:pretty}

/* ===== buttons ===== */
.ab-btn{font-family:var(--font);font-weight:600;text-decoration:none;cursor:pointer;
  border:1px solid transparent;border-radius:13px;display:inline-flex;align-items:center;
  justify-content:center;gap:10px;white-space:nowrap;
  transition:transform .2s var(--ease),box-shadow .3s var(--ease),background .3s} /* [ENC #4] */
.ab-btn svg{width:18px;height:18px;flex:none}
.ab-btn.lg{font-size:16px;padding:15px 26px}
.ab-btn.md{font-size:14.5px;padding:12px 20px}
.ab-btn.wa{background:var(--wa);color:#06231a;box-shadow:0 12px 34px rgba(37,211,102,.4)}
.ab-btn.wa:hover{transform:translateY(-2px);box-shadow:0 18px 48px rgba(37,211,102,.55)}
.ab-btn.brand{background:var(--brand);color:#fff;box-shadow:0 12px 36px rgba(189,50,194,.45)}
.ab-btn.brand:hover{transform:translateY(-2px);background:var(--brand-lite)}
.ab-btn.ghost{background:rgba(168,85,247,.08);border-color:rgba(168,85,247,.5);color:var(--ink)}
.ab-btn.ghost:hover{background:rgba(168,85,247,.18);border-color:var(--violet);transform:translateY(-2px)}

/* ===== glass card ===== */
.ab-card{position:relative;background:linear-gradient(160deg,rgba(48,33,82,.72),rgba(22,15,44,.82));
  border:1px solid rgba(168,85,247,.26);border-radius:22px;
  /* [ENC #2] luz top-left: canto superior claro + fondo de cavidad oscuro */
  box-shadow:0 26px 70px rgba(0,0,0,.46),
    inset 0 1.5px 0 rgba(255,255,255,.09),
    inset 0 -22px 40px rgba(0,0,0,.32);
  backdrop-filter:blur(6px)}
.ab-card.star{border-color:rgba(37,211,102,.5);
  box-shadow:0 30px 80px rgba(0,0,0,.5),0 0 0 1px rgba(37,211,102,.2),
    0 0 60px rgba(37,211,102,.18),inset 0 1px 0 rgba(255,255,255,.08)}
.ab-icon{width:46px;height:46px;border-radius:13px;display:grid;place-items:center;flex:none}
.ab-icon svg{width:24px;height:24px}
.ab-icon.wa{background:rgba(37,211,102,.16);color:var(--wa);box-shadow:inset 0 0 0 1px rgba(37,211,102,.3)}
.ab-icon.violet{background:rgba(168,85,247,.16);color:var(--violet-2);box-shadow:inset 0 0 0 1px rgba(168,85,247,.32)}
.ab-icon.pink{background:rgba(236,72,153,.16);color:#f48fc4;box-shadow:inset 0 0 0 1px rgba(236,72,153,.32)}

/* badge / chips */
.ab-badge{display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:700;
  letter-spacing:.04em;padding:5px 11px;border-radius:999px;text-transform:uppercase}
.ab-badge.wa{background:rgba(37,211,102,.16);color:#5ef0a0;box-shadow:inset 0 0 0 1px rgba(37,211,102,.34)}
.ab-badge svg{width:14px;height:14px;flex:none}
.ab-badge.nowrap{white-space:nowrap}
.ab-eyebrow{font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--muted)}
.ab-micro{font-size:12.5px;color:var(--muted);display:inline-flex;align-items:center;gap:7px}
.ab-micro svg{width:14px;height:14px;color:var(--wa)}

/* ===== 3-step strip (Escribí → Conectá → Responde) ===== */
.ab-steps{display:flex;align-items:stretch;gap:10px}
.ab-step{flex:1;display:flex;flex-direction:column;gap:7px;padding:13px 14px;border-radius:14px;
  background:rgba(168,85,247,.06);border:1px solid rgba(168,85,247,.18)}
.ab-step .n{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;
  font-size:12px;font-weight:800;color:#fff;background:var(--brand);flex:none}
.ab-step.wa .n{background:var(--wa);color:#06231a}
.ab-step .st{font-size:13.5px;font-weight:700;line-height:1.2}
.ab-step .ss{font-size:11.5px;color:var(--muted);line-height:1.35}
.ab-arrow{align-self:center;color:var(--violet);opacity:.6}

/* ===== instruction box (give the AI an instruction) ===== */
.ab-instr{background:rgba(11,8,24,.6);border:1px solid rgba(168,85,247,.3);border-radius:14px;
  padding:13px 15px;display:flex;flex-direction:column;gap:10px}
.ab-instr .lab{font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--violet-2)}
.ab-instr .field{font-size:14px;line-height:1.5;color:#e9e2ff;min-height:1.5em}
.ab-instr .field .ph{color:#6f6396}
.ab-caret{display:inline-block;width:2px;height:1.05em;background:var(--violet-2);
  vertical-align:-2px;margin-left:1px;animation:abblink 1s steps(1) infinite}
@keyframes abblink{50%{opacity:0}}

/* ===== WhatsApp phone preview ===== */
.wa-phone{position:relative;width:300px;border-radius:34px;padding:9px;flex:none;
  background:linear-gradient(160deg,#241634,#120b22);
  /* [ENC #2] inset inferior para que el chasis tenga fondo, no solo canto */
  box-shadow:0 40px 90px rgba(0,0,0,.6),0 0 0 1px rgba(168,85,247,.25),
    inset 0 1px 0 rgba(255,255,255,.08),inset 0 -18px 30px rgba(0,0,0,.4);}
/* [ENC #3] under-glow WhatsApp: ancla el teléfono con su color propio */
.wa-phone::after{content:"";position:absolute;left:50%;bottom:-18px;transform:translateX(-50%);
  width:74%;height:54px;border-radius:50%;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse,rgba(37,211,102,.4),rgba(37,211,102,.14) 55%,transparent 72%);
  filter:blur(22px);opacity:.7}
.wa-screen{border-radius:26px;overflow:hidden;background:#0b141a;position:relative;
  display:flex;flex-direction:column;height:420px}
.wa-notch{position:absolute;top:8px;left:50%;transform:translateX(-50%);
  width:92px;height:20px;background:#0a0712;border-radius:0 0 14px 14px;z-index:5}
.wa-top{display:flex;align-items:center;gap:10px;padding:16px 14px 11px;
  background:linear-gradient(180deg,#202c33,#1b262d)}
.wa-av{width:38px;height:38px;border-radius:50%;flex:none;display:grid;place-items:center;
  background:radial-gradient(circle at 40% 35%,#3a1d6b,#160a30);box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.wa-av img{width:24px;height:24px;display:block}
.wa-name{font-size:14.5px;font-weight:700;color:#e9edef;line-height:1.1}
.wa-status{font-size:11px;color:#8aa6a0;display:flex;align-items:center;gap:5px;margin-top:1px}
.wa-status .live{width:6px;height:6px;border-radius:50%;background:var(--wa);box-shadow:0 0 7px var(--wa)}
.wa-head-ic{margin-left:auto;display:flex;gap:15px;color:#8696a0}
.wa-head-ic svg{width:18px;height:18px}
.wa-body{padding:16px 13px 15px;display:flex;flex-direction:column;gap:9px;flex:1;overflow-y:auto;
  background:
    radial-gradient(circle at 18% 12%,rgba(37,211,102,.05),transparent 40%),
    repeating-linear-gradient(135deg,rgba(255,255,255,.012) 0 2px,transparent 2px 22px),
    #0b141a}
.wa-day{align-self:center;font-size:10.5px;color:#8696a0;background:#1d282f;
  padding:4px 11px;border-radius:8px;margin-bottom:2px}
.wa-msg{max-width:80%;padding:8px 11px;font-size:13px;line-height:1.4;border-radius:9px;position:relative;
  box-shadow:0 1px 1px rgba(0,0,0,.25)}
.wa-msg .tm{font-size:9.5px;color:rgba(255,255,255,.45);float:right;margin:6px 0 -2px 8px}
.wa-in{align-self:flex-start;background:#202c33;color:#e9edef;border-top-left-radius:3px}
.wa-out{align-self:flex-end;background:#005c4b;color:#e9f7ef;border-top-right-radius:3px}
.wa-out .tm{color:rgba(173,232,197,.7)}
.wa-typing{align-self:flex-start;background:#202c33;border-radius:9px;border-top-left-radius:3px;
  padding:11px 14px;display:flex;gap:4px}
.wa-typing i{width:6px;height:6px;border-radius:50%;background:#8696a0;animation:wabounce 1.3s infinite}
.wa-typing i:nth-child(2){animation-delay:.16s}.wa-typing i:nth-child(3){animation-delay:.32s}
@keyframes wabounce{0%,60%,100%{opacity:.35;transform:translateY(0)}30%{opacity:1;transform:translateY(-4px)}}
.wa-inputbar{display:flex;align-items:center;gap:9px;padding:9px 12px;background:#1b262d}
.wa-inputbar .box{flex:1;height:34px;border-radius:18px;background:#2a3942;display:flex;align-items:center;
  padding:0 14px;font-size:12.5px;color:#8696a0}
.wa-inputbar .send{width:34px;height:34px;border-radius:50%;background:var(--wa);display:grid;place-items:center;flex:none}
.wa-inputbar .send svg{width:16px;height:16px;color:#06231a}

/* ===== secondary path row (demo / planes) ===== */
.ab-path{display:flex;align-items:center;gap:15px;padding:16px 18px;border-radius:16px;
  background:rgba(40,28,72,.4);border:1px solid rgba(168,85,247,.2);
  transition:background .25s,border-color .25s,transform .25s var(--ease);cursor:pointer} /* [ENC #4] */
.ab-path:hover{background:rgba(48,33,82,.6);border-color:rgba(168,85,247,.45);transform:translateX(3px)}
.ab-path .tt{font-size:16px;font-weight:700;line-height:1.15}
.ab-path .ds{font-size:12.5px;color:var(--muted);margin-top:2px;line-height:1.3}
.ab-path .go{margin-left:auto;color:var(--violet-2);flex:none}
.ab-path .go svg{width:20px;height:20px}

/* upsell teaser chips */
.ab-teaser{display:flex;flex-wrap:wrap;gap:8px}
.ab-chip{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:500;color:#cdbff0;
  padding:7px 12px;border-radius:999px;background:rgba(168,85,247,.1);border:1px solid rgba(168,85,247,.22)}
.ab-chip svg{width:14px;height:14px;color:var(--violet-2)}

/* logo lockup */
.ab-logo{display:flex;align-items:center;gap:11px}
.ab-logo img{height:30px;width:auto;filter:drop-shadow(0 0 18px rgba(189,50,194,.5))}
.ab-logo .wm{font-size:21px;font-weight:800;letter-spacing:-.01em}

/* ============================================================
   FLOW VIEWS — Escribir · Conectar · Responder
============================================================ */
.flow-shell{padding:40px 50px;display:flex;flex-direction:column;gap:26px;height:100%;box-sizing:border-box}
.flow-top{display:flex;align-items:center;justify-content:space-between;gap:20px}

/* stepper */
.stepper{display:flex;align-items:center;gap:0}
.stepper .stp{display:flex;align-items:center;gap:9px;opacity:.5;transition:opacity .3s}
.stepper .stp.on{opacity:1}
.stepper .stp.done{opacity:1}
.stepper .num{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;flex:none;
  font-size:13px;font-weight:800;color:var(--muted);background:rgba(168,85,247,.1);
  box-shadow:inset 0 0 0 1.5px rgba(168,85,247,.3)}
.stepper .stp.on .num{color:#fff;background:var(--brand);box-shadow:0 0 18px rgba(189,50,194,.55)}
.stepper .stp.done .num{color:#06231a;background:var(--wa);box-shadow:0 0 16px rgba(37,211,102,.4)}
.stepper .stp.done.wa-on .num{background:var(--wa)}
.stepper .lbl{font-size:14px;font-weight:700;color:var(--ink)}
.stepper .stp:not(.on):not(.done) .lbl{color:var(--muted)}
.stepper .bar{width:40px;height:2px;margin:0 14px;border-radius:2px;background:rgba(168,85,247,.2)}
.stepper .bar.fill{background:linear-gradient(90deg,var(--brand),var(--wa))}

.flow-body{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0}
.flow-h{font-size:38px;font-weight:700;letter-spacing:-.02em;line-height:1.05;text-shadow:var(--vol-white)}
.flow-h .pink{color:var(--brand-lite);text-shadow:var(--vol-pink)}
.flow-sub{color:var(--muted);font-size:16px;line-height:1.55;text-wrap:pretty}

/* big instruction textarea */
.ta{background:rgba(11,8,24,.66);border:1.5px solid rgba(168,85,247,.4);border-radius:18px;
  padding:20px 22px;min-height:150px;font-size:18px;line-height:1.55;color:#ede7ff;
  box-shadow:inset 0 2px 18px rgba(0,0,0,.4),0 0 30px rgba(168,85,247,.08);position:relative}
.ta .ph{color:#6f6396}
.ta .lab{position:absolute;top:-10px;left:18px;background:var(--bg);padding:0 9px;
  font-size:11.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--violet-2)}
.ex-row{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.ex-row .t{font-size:12.5px;color:var(--muted);font-weight:600}
.ex{font-size:13px;font-weight:600;color:#cdbff0;padding:8px 14px;border-radius:999px;cursor:pointer;
  background:rgba(168,85,247,.1);border:1px solid rgba(168,85,247,.26);transition:background .2s,border-color .2s}
.ex:hover{background:rgba(168,85,247,.2);border-color:var(--violet)}

/* generated agent card */
.agent-card{position:relative;background:linear-gradient(165deg,rgba(48,33,82,.8),rgba(20,13,40,.9));
  border:1px solid rgba(168,85,247,.34);border-radius:20px;padding:24px;
  /* [ENC #2] par de inset rim (canto claro + cavidad oscura) */
  box-shadow:0 30px 70px rgba(0,0,0,.5),
    inset 0 1.5px 0 rgba(255,255,255,.09),
    inset 0 -22px 40px rgba(0,0,0,.34);
  will-change:transform; /* [ENC #7] */
  transition:transform .38s var(--ease),box-shadow .38s var(--ease)} /* [ENC #4] */
/* [ENC #3] under-glow: ancla la tarjeta al piso con el color de marca */
.agent-card::after{content:"";position:absolute;left:50%;bottom:-14px;transform:translateX(-50%);
  width:78%;height:60px;border-radius:50%;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse,rgba(168,85,247,.5),rgba(236,72,153,.2) 55%,transparent 72%);
  filter:blur(20px);opacity:.55;transition:opacity .38s var(--ease)}
/* [ENC #5] hover: la pieza sube y prende, la sombra de contacto crece */
.agent-card:hover{transform:translateY(-4px);
  box-shadow:0 40px 90px rgba(0,0,0,.55),
    inset 0 1.5px 0 rgba(255,255,255,.12),
    inset 0 -22px 40px rgba(0,0,0,.34),
    0 0 34px rgba(168,85,247,.28)}
.agent-card:hover::after{opacity:.9}
.agent-card .gen{font-size:11.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;
  color:var(--violet-2);display:flex;align-items:center;gap:8px}
.agent-card .gen svg{width:15px;height:15px;color:var(--green)}
@keyframes spin{to{transform:rotate(360deg)}}
.agent-id{display:flex;align-items:center;gap:13px;margin-top:16px}
.agent-id .av{width:50px;height:50px;border-radius:14px;flex:none;display:grid;place-items:center;
  background:radial-gradient(circle at 38% 32%,#3a1d6b,#160a30);box-shadow:inset 0 0 0 1px rgba(168,85,247,.4)}
.agent-id .av img{width:30px;height:30px}
.agent-id .nm{font-size:18px;font-weight:700;line-height:1.15}
.agent-id .rl{font-size:12.5px;color:var(--violet-2);font-weight:600;margin-top:2px}
.agent-feat{display:flex;flex-direction:column;gap:10px;margin-top:18px}
.agent-feat .f{display:flex;align-items:center;gap:10px;font-size:14px;color:#e6ddff}
.agent-feat .f .ck{width:20px;height:20px;border-radius:50%;flex:none;display:grid;place-items:center;
  background:rgba(62,224,142,.16);color:var(--green)}
.agent-feat .f .ck svg{width:12px;height:12px}
.agent-tone{margin-top:18px;padding-top:16px;border-top:1px solid rgba(168,85,247,.18);
  font-size:13px;color:var(--muted)}
.agent-tone b{color:#e6ddff;font-weight:600}

/* QR connect */
.qr-card{background:#fff;border-radius:22px;padding:22px;box-shadow:0 30px 70px rgba(0,0,0,.5);
  position:relative}
/* [ENC #3] under-glow: la tarjeta blanca apoya sobre el piso, no flota */
.qr-card::after{content:"";position:absolute;left:50%;bottom:-16px;transform:translateX(-50%);
  width:82%;height:56px;border-radius:50%;z-index:-1;pointer-events:none;
  background:radial-gradient(ellipse,rgba(168,85,247,.5),rgba(236,72,153,.22) 55%,transparent 72%);
  filter:blur(22px);opacity:.6}
.qr{display:grid;gap:0;width:230px;height:230px}
.qr i{width:100%;height:100%}
.qr i.on{background:#0a0712}
.qr-logo{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  width:54px;height:54px;border-radius:13px;background:#fff;display:grid;place-items:center;
  box-shadow:0 0 0 6px #fff}
.qr-logo img{width:40px;height:40px}
.conn-steps{display:flex;flex-direction:column;gap:16px}
.conn-step{display:flex;gap:13px;align-items:flex-start}
.conn-step .cn{width:26px;height:26px;border-radius:8px;flex:none;display:grid;place-items:center;
  font-size:13px;font-weight:800;color:#fff;background:rgba(168,85,247,.22);
  box-shadow:inset 0 0 0 1px rgba(168,85,247,.4)}
.conn-step .ct{font-size:15px;font-weight:600;color:#e6ddff;line-height:1.4}
.conn-step .ct b{color:#fff;font-weight:700}
.conn-status{display:inline-flex;align-items:center;gap:10px;padding:11px 18px;border-radius:13px;
  font-size:14.5px;font-weight:600}
.conn-status.wait{background:rgba(168,85,247,.1);border:1px solid rgba(168,85,247,.3);color:var(--violet-2)}
.conn-status.wait .sp{width:15px;height:15px;color:var(--violet-2)}
.conn-status.wait .sp svg{animation:spin 1.6s linear infinite}
.conn-status.ok{background:rgba(37,211,102,.14);border:1px solid rgba(37,211,102,.4);color:#5ef0a0}
.conn-status .num-chip{font-weight:700;color:#e6ddff}

/* live timer (20 min) */
.timer{display:flex;align-items:center;gap:13px;padding:15px 18px;border-radius:16px;
  background:rgba(37,211,102,.08);border:1px solid rgba(37,211,102,.32)}
.timer .ring{width:42px;height:42px;flex:none;position:relative;display:grid;place-items:center}
.timer .ring svg{position:absolute;inset:0;transform:rotate(-90deg)}
.timer .ring .tt{font-size:11px;font-weight:800;color:var(--wa)}
.timer .big{font-size:22px;font-weight:800;font-variant-numeric:tabular-nums;color:#eafff4;letter-spacing:.01em}
.timer .cap{font-size:12px;color:#7fcfa6;font-weight:600;margin-top:1px}
.live-tag{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:700;
  color:#5ef0a0;letter-spacing:.02em}
.live-tag .d{width:8px;height:8px;border-radius:50%;background:var(--wa);box-shadow:0 0 9px var(--wa);
  animation:lp 1.4s ease-in-out infinite}
@keyframes lp{0%,100%{opacity:1}50%{opacity:.35}}

/* convert panel */
.convert{background:linear-gradient(165deg,rgba(48,33,82,.7),rgba(20,13,40,.86));
  border:1px solid rgba(168,85,247,.3);border-radius:20px;padding:22px;
  display:flex;flex-direction:column;gap:16px;box-shadow:0 26px 60px rgba(0,0,0,.45)}
.lock-note{font-size:12.5px;color:var(--muted);display:flex;align-items:center;gap:8px;line-height:1.4}
.lock-note svg{width:15px;height:15px;color:var(--violet-2);flex:none}

/* URL Input & Prompt Card Editor styles */
.ta.compact {
  min-height: auto !important;
  padding: 14px 18px;
  font-size: 14px;
  margin-top: -8px;
}
.ta.compact input {
  width: 100%;
  background: transparent;
  border: none;
  font-size: 14px;
  color: #ede7ff;
  font-family: var(--font);
  outline: none;
}
.ta.compact input::placeholder {
  color: #6f6396;
}

.prompt-sections {
  margin-top: 14px;
  border: 1px solid rgba(168,85,247,.2);
  border-radius: 12px;
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
  background: rgba(11,8,24,.4);
}

.prompt-sec {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(168,85,247,.12);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #cdbff0;
  transition: background 0.2s;
}
.prompt-sec:last-child {
  border-bottom: none;
}
.prompt-sec:hover {
  background: rgba(168,85,247,.08);
}
.prompt-sec .chv {
  width: 14px;
  height: 14px;
  color: var(--muted);
  transition: transform 0.2s;
}
.prompt-sec.open .chv {
  transform: rotate(180deg);
}

.prompt-sec-body {
  display: none;
  padding: 0 14px 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(11,8,24,.2);
  border-bottom: 1px solid rgba(168,85,247,.06);
}
.prompt-sec.open + .prompt-sec-body {
  display: block;
}

.prompt-edit-input {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.prompt-edit-input input {
  flex: 1;
  background: rgba(11,8,24,.66);
  border: 1px solid rgba(168,85,247,.3);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12.5px;
  color: #ede7ff;
  font-family: var(--font);
  outline: none;
  transition: border-color 0.2s;
}
.prompt-edit-input input::placeholder {
  color: #6f6396;
}
.prompt-edit-input input:focus {
  border-color: var(--violet);
}
.prompt-edit-input button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex: none;
  transition: background 0.2s, transform 0.1s;
}
.prompt-edit-input button:hover {
  background: var(--brand-lite);
}
.prompt-edit-input button:active {
  transform: scale(0.95);
}
.prompt-edit-input button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

/* --- INTERACTIVE PROMPT EDITOR STYLES --- */
.editor-chat-col, .editor-preview-col {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  height: 100%;
  max-height: 430px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Chat Bubbles */
.editor-msg {
  display: flex;
  gap: 10px;
  max-width: 85%;
  align-self: flex-start;
}
.editor-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.editor-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: grid;
  place-items: center;
  flex: none;
  font-size: 11px;
}
.editor-msg.user .editor-msg-avatar {
  background: var(--brand);
  border-color: transparent;
  color: #fff;
}
.editor-msg-bubble {
  background: rgba(20, 15, 40, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 4px 14px 14px 14px;
  padding: 10px 12px;
  line-height: 1.5;
  color: #ede7ff;
  font-size: 12.5px;
}
.editor-msg.user .editor-msg-bubble {
  background: rgba(189, 50, 194, 0.15);
  border-color: rgba(189, 50, 194, 0.35);
  border-radius: 14px 4px 14px 14px;
}

/* AI loader anim */
.editor-loader {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 8px 12px;
}
.editor-loader span {
  width: 6px;
  height: 6px;
  background: var(--brand-lite);
  border-radius: 50%;
  animation: pulse-dot 1.2s infinite;
}
.editor-loader span:nth-child(2) { animation-delay: 0.2s; }
.editor-loader span:nth-child(3) { animation-delay: 0.4s; }

@keyframes pulse-dot {
  0%, 100% { transform: scale(0.6); opacity: 0.4; }
  50% { transform: scale(1.1); opacity: 1; }
}

/* Block Cards */
.editor-block-card {
  border: 1px solid rgba(168, 85, 247, 0.18);
  background: rgba(11, 8, 24, 0.5);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.editor-block-card.removed {
  opacity: 0.55;
  border-color: rgba(239, 68, 68, 0.4) !important;
  background: rgba(239, 68, 68, 0.05) !important;
}
.editor-block-card.added {
  border-color: rgba(34, 197, 94, 0.4) !important;
  background: rgba(34, 197, 94, 0.05) !important;
}
.editor-block-card.modified {
  border-color: rgba(234, 179, 8, 0.4) !important;
  background: rgba(234, 179, 8, 0.05) !important;
}

.editor-card-header {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(168, 85, 247, 0.12);
  background: rgba(20, 15, 40, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.editor-card-title-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  color: #c0b3eb;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 0;
  outline: none;
  width: 100%;
  transition: border-bottom-color 0.2s;
}
.editor-card-title-input:focus {
  border-bottom-color: var(--brand-lite);
  color: #ede7ff;
}

.editor-card-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.editor-card-btn {
  background: transparent;
  border: none;
  color: #8e84b0;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}
.editor-card-btn:hover:not(:disabled) {
  background: rgba(168, 85, 247, 0.15);
  color: #ede7ff;
}
.editor-card-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}
.editor-card-btn.del:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

.editor-card-body {
  padding: 12px;
  font-family: monospace;
  font-size: 11px;
  color: #c0b3eb;
  white-space: pre-wrap;
  line-height: 1.45;
  word-break: break-word;
}

.editor-card-badge {
  font-size: 8.5px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex-shrink: 0;
}
.editor-card-badge.added {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}
.editor-card-badge.modified {
  background: rgba(234, 179, 8, 0.15);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.3);
}
.editor-card-badge.removed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.editor-card-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.editor-card-edit-form label {
  font-size: 9px;
  color: #8e84b0;
  font-family: var(--font);
  font-weight: 700;
  text-transform: uppercase;
}
.editor-card-edit-form input {
  background: rgba(11, 8, 24, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  color: #ede7ff;
  font-family: var(--font);
  outline: none;
}
.editor-card-edit-form textarea {
  background: rgba(11, 8, 24, 0.6);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 11px;
  color: #ede7ff;
  font-family: monospace;
  resize: vertical;
  outline: none;
  min-height: 80px;
}
.editor-card-edit-form input:focus, .editor-card-edit-form textarea:focus {
  border-color: var(--brand-lite);
}

/* View Mode buttons */
#btn-mode-cards, #btn-mode-raw {
  outline: none;
}
#btn-mode-cards.on, #btn-mode-raw.on {
  background: var(--brand) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(189,50,194,0.3);
}

/* Custom scrollbars */
#editor-chat-messages::-webkit-scrollbar, #editor-blocks-container::-webkit-scrollbar {
  width: 5px;
}
#editor-chat-messages::-webkit-scrollbar-track, #editor-blocks-container::-webkit-scrollbar-track {
  background: transparent;
}
#editor-chat-messages::-webkit-scrollbar-thumb, #editor-blocks-container::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.18);
  border-radius: 4px;
}
#editor-chat-messages::-webkit-scrollbar-thumb:hover, #editor-blocks-container::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.35);
}


.close-final { pointer-events: auto; }
