/* ═══════════════════════════════════════════════════════════════
   Blobe Laptop — dashboard view for controlling a paired laptop.
   Uses main.css tokens (--bg, --card, --border, --accent …) so it follows light/dark.
═══════════════════════════════════════════════════════════════ */

.lp-overlay {
  position: fixed; inset: 0; z-index: 900; overflow-y: auto;
  background: var(--bg);
  animation: lpFade .25s ease both;
  --lp-ok: #10b981; --lp-warn: #f59e0b; --lp-bad: #ef4444;
}
@keyframes lpFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.lp-wrap { max-width: 980px; margin: 0 auto; padding: 1.5rem 1.25rem 6rem; }

/* ---------- top bar ---------- */
.lp-top { display: flex; align-items: center; gap: .875rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.lp-title { font-family: 'Syne', sans-serif; font-size: 1.625rem; font-weight: 700; letter-spacing: -.03em; color: var(--text); margin: 0; }
.lp-beta { font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-soft2); padding: .2rem .55rem; border-radius: 99px; }
.lp-spacer { flex: 1; }
.lp-usage { display: none; align-items: center; gap: .5rem; font-size: .75rem; font-weight: 600; color: var(--text2); background: var(--card); border: 1px solid var(--border); padding: .4rem .75rem; border-radius: 99px; }
.lp-usage.show { display: inline-flex; }
.lp-usage-bar { width: 54px; height: 5px; border-radius: 9px; background: var(--border); overflow: hidden; }
.lp-usage-bar i { display: block; height: 100%; background: linear-gradient(90deg, #1b7fd6, #1045b7); border-radius: inherit; transition: width .4s; }
.lp-usage.low .lp-usage-bar i { background: var(--lp-warn); }
.lp-usage.out .lp-usage-bar i { background: var(--lp-bad); }

/* ---------- hero / device ---------- */
.lp-hero {
  position: relative; overflow: hidden; border-radius: 24px; padding: 1.75rem;
  background:
    radial-gradient(520px 260px at 85% -20%, rgba(42,139,234,.42), transparent 70%),
    radial-gradient(380px 240px at 0% 120%, rgba(139,92,246,.25), transparent 70%),
    linear-gradient(135deg, #0b0f1a 0%, #14204a 100%);
  color: #fff; border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 60px rgba(16,69,183,.22);
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: center;
}
.lp-laptop { width: 150px; flex: none; }
.lp-laptop svg { width: 100%; height: auto; display: block; filter: drop-shadow(0 14px 22px rgba(0,0,0,.4)); }
.lp-hero h2 { font-family: 'Syne', sans-serif; font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; margin: 0 0 .35rem; color: #fff; }
.lp-hero p { margin: 0; color: rgba(255,255,255,.62); font-size: .9rem; line-height: 1.6; max-width: 46ch; }
.lp-status { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; margin-top: .75rem; color: rgba(255,255,255,.75); }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: #64748b; flex: none; }
.lp-dot.on { background: var(--lp-ok); box-shadow: 0 0 0 0 rgba(16,185,129,.6); animation: lpPulse 2s infinite; }
@keyframes lpPulse { 70% { box-shadow: 0 0 0 7px rgba(16,185,129,0); } 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); } }
.lp-hero-actions { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }

.lp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; height: 42px; padding: 0 1.1rem; border-radius: 12px; border: 0; cursor: pointer; font: 600 .875rem/1 inherit; font-family: inherit; transition: transform .12s, filter .15s, background .15s; }
.lp-btn:active { transform: scale(.98); }
.lp-btn.primary { color: #fff; background: linear-gradient(135deg, #1b7fd6, #1045b7); box-shadow: 0 8px 22px rgba(16,107,187,.4), inset 0 1px 0 rgba(255,255,255,.22); }
.lp-btn.primary:hover { filter: brightness(1.1); }
.lp-btn.glass { color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); }
.lp-btn.glass:hover { background: rgba(255,255,255,.18); }
.lp-btn.ghost { color: var(--text2); background: var(--card); border: 1px solid var(--border); }
.lp-btn.ghost:hover { border-color: var(--border2); color: var(--text); }
.lp-btn:disabled { opacity: .45; cursor: not-allowed; }

/* device chips */
.lp-devices { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0 0; }
.lp-chip { display: inline-flex; align-items: center; gap: .5rem; padding: .45rem .8rem; border-radius: 99px; font-size: .8rem; font-weight: 600; color: var(--text2); background: var(--card); border: 1.5px solid var(--border); cursor: pointer; transition: all .15s; }
.lp-chip:hover { border-color: var(--border2); }
.lp-chip.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.lp-chip .lp-dot { width: 7px; height: 7px; }
.lp-chip-x { margin-left: .15rem; opacity: .45; font-size: 1rem; line-height: 1; }
.lp-chip-x:hover { opacity: 1; color: var(--lp-bad); }

/* ---------- pairing ---------- */
.lp-pair { margin-top: 1.25rem; border-radius: 22px; border: 1px solid var(--border); background: var(--card); padding: 1.75rem; display: grid; grid-template-columns: 1.1fr 1fr; gap: 2rem; box-shadow: var(--shadow-sm); }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.lp-steps li { display: flex; gap: .9rem; align-items: flex-start; }
.lp-steps .n { width: 28px; height: 28px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 700 .8rem/1 inherit; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-soft2); }
.lp-steps b { display: block; font-size: .95rem; color: var(--text); margin-bottom: .15rem; }
.lp-steps span.d { font-size: .85rem; color: var(--muted); line-height: 1.55; }
.lp-soon { display: inline-block; margin-top: .4rem; font-size: .7rem; font-weight: 700; color: var(--muted); background: var(--bg); border: 1px dashed var(--border2); padding: .15rem .55rem; border-radius: 99px; }

.lp-codebox { border-radius: 18px; padding: 1.5rem 1.25rem; text-align: center; background: linear-gradient(160deg, var(--accent-soft), transparent 70%), var(--bg); border: 1px solid var(--border); display: grid; gap: .9rem; align-content: center; }
.lp-code { display: flex; justify-content: center; gap: .4rem; }
.lp-code i { font-style: normal; width: 42px; height: 54px; display: grid; place-items: center; font: 700 1.6rem/1 'Syne', sans-serif; color: var(--text); background: var(--card); border: 1.5px solid var(--border2); border-radius: 12px; box-shadow: var(--shadow-sm); animation: lpPop .4s cubic-bezier(.2,.8,.2,1) both; }
.lp-code i:nth-child(3) { margin-right: .5rem; }
@keyframes lpPop { from { opacity: 0; transform: translateY(8px) scale(.9); } to { opacity: 1; transform: none; } }
.lp-wait { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; font-size: .82rem; color: var(--muted); font-weight: 600; }
.lp-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: lpSpin .7s linear infinite; }
@keyframes lpSpin { to { transform: rotate(360deg); } }
.lp-exp { font-size: .75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.lp-success { display: grid; gap: .5rem; justify-items: center; color: var(--text); animation: lpPop .4s both; }
.lp-success svg { width: 44px; height: 44px; color: var(--lp-ok); }
.lp-success b { font-family: 'Syne', sans-serif; font-size: 1.15rem; }

/* ---------- command center ---------- */
.lp-cmd { margin-top: 1.25rem; border-radius: 22px; border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow-sm); overflow: hidden; }
.lp-feed { padding: 1.25rem; display: grid; gap: .75rem; min-height: 120px; max-height: 52vh; overflow-y: auto; align-content: start; }
.lp-empty { text-align: center; padding: 1.5rem 1rem; color: var(--muted); }
.lp-empty h3 { font-family: 'Syne', sans-serif; font-size: 1.15rem; color: var(--text); margin: 0 0 .35rem; letter-spacing: -.02em; }
.lp-empty p { margin: 0 auto; max-width: 42ch; font-size: .875rem; line-height: 1.6; }
.lp-sugs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: 1rem; }
.lp-sug { font: 600 .8rem/1 inherit; font-family: inherit; color: var(--text2); background: var(--bg); border: 1px solid var(--border); padding: .55rem .85rem; border-radius: 99px; cursor: pointer; transition: all .15s; }
.lp-sug:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.lp-msg { max-width: 86%; padding: .7rem .95rem; border-radius: 16px; font-size: .9rem; line-height: 1.6; word-break: break-word; white-space: pre-wrap; animation: lpFade .25s both; }
.lp-msg.user { justify-self: end; background: linear-gradient(135deg, #1b7fd6, #1045b7); color: #fff; border-bottom-right-radius: 4px; }
.lp-msg.ai { justify-self: start; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.lp-msg.err { justify-self: stretch; max-width: none; background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.28); color: var(--lp-bad); display: flex; gap: .75rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }

.lp-step { display: flex; align-items: center; gap: .8rem; padding: .65rem .8rem; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); animation: lpFade .25s both; }
.lp-step-ic { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.lp-step-ic svg { width: 18px; height: 18px; }
.lp-step-body { flex: 1; min-width: 0; }
.lp-step-title { font-weight: 700; font-size: .85rem; color: var(--text); }
.lp-step-sub { font: 500 .75rem/1.4 ui-monospace, 'Cascadia Code', Consolas, monospace; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-step-st { flex: none; display: inline-flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 99px; }
.lp-step-st svg { width: 11px; height: 11px; stroke-width: 3; }
.lp-step-st.run { color: var(--accent); background: var(--accent-soft); }
.lp-step-st.ok { color: var(--lp-ok); background: rgba(16,185,129,.12); }
.lp-step-st.bad { color: var(--lp-bad); background: rgba(239,68,68,.1); }
.lp-step-st.den { color: var(--lp-warn); background: rgba(245,158,11,.12); }
.lp-shot { display: block; margin: .5rem 0 0; max-width: 100%; width: 360px; border-radius: 10px; border: 1px solid var(--border); }
.t-blue   { color: #2a8bea; background: rgba(42,139,234,.12); }
.t-violet { color: #8b6cf6; background: rgba(139,108,246,.13); }
.t-teal   { color: #14b8a6; background: rgba(20,184,166,.12); }
.t-amber  { color: #d98a06; background: rgba(245,158,11,.13); }
.t-red    { color: #ef4444; background: rgba(239,68,68,.11); }

.lp-bar { display: flex; align-items: flex-end; gap: .6rem; padding: .9rem 1rem; border-top: 1px solid var(--border); background: var(--card); }
.lp-input { flex: 1; resize: none; min-height: 46px; max-height: 140px; padding: .8rem 1rem; border-radius: 14px; border: 1.5px solid var(--border); background: var(--bg); color: var(--text); font: 400 .9375rem/1.5 inherit; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
.lp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-glow); }
.lp-input::placeholder { color: var(--muted); }
.lp-send { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; border: 0; cursor: pointer; color: #fff; background: linear-gradient(135deg, #1b7fd6, #1045b7); box-shadow: 0 6px 18px rgba(16,107,187,.35); transition: transform .12s, filter .15s; }
.lp-send:hover:not(:disabled) { filter: brightness(1.1); }
.lp-send:active:not(:disabled) { transform: scale(.95); }
.lp-send:disabled { opacity: .45; cursor: not-allowed; }
.lp-send.stop { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: 0 6px 18px rgba(220,38,38,.3); }
.lp-send svg { width: 20px; height: 20px; }
.lp-hint { padding: 0 1.1rem .9rem; font-size: .72rem; color: var(--muted); display: flex; gap: .4rem; align-items: center; }
.lp-hint svg { width: 12px; height: 12px; flex: none; }

.lp-offline { margin-top: 1rem; padding: .85rem 1rem; border-radius: 14px; font-size: .85rem; color: var(--lp-warn); background: rgba(245,158,11,.09); border: 1px solid rgba(245,158,11,.28); display: none; }
.lp-offline.show { display: block; }

@media (max-width: 760px) {
  .lp-hero { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 1.5rem 1.25rem; }
  .lp-hero p { margin: 0 auto; }
  .lp-hero-actions { width: 100%; }
  .lp-pair { grid-template-columns: 1fr; padding: 1.25rem; }
  .lp-msg { max-width: 94%; }
  .lp-laptop { width: 120px; }
}
@media (prefers-reduced-motion: reduce) { .lp-overlay *, .lp-overlay { animation: none !important; } }
.lp-soon { display: block; width: fit-content; margin-top: .55rem; }
