:root {
  --bg-0: #16171f;
  --bg-1: #1b1c26;
  --bg-2: #21222e;
  --bg-3: #292a3a;
  --border: #35364a;
  --border-soft: #2a2b3a;
  --text: #e8e8ee;
  --text-dim: #9a9ab0;
  --accent: #6c8cff;
  --accent-soft: rgba(108, 140, 255, 0.15);
  --green: #2e9c5b;
  --green-hover: #34b167;
  --red: #d64550;
  --red-hover: #e5555f;
  --radius: 7px;
  --shadow-1: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-2: 0 8px 28px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  position: relative;
  z-index: 10;
}
.topbar h1 {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  letter-spacing: 0.2px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-actions .divider { width: 1px; height: 22px; background: var(--border); margin: 0 4px; }

.btn {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.06s ease;
}
.btn:hover { background: #34364a; border-color: #4a4c66; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-run { background: var(--green); border-color: var(--green-hover); color: #eafff1; }
.btn-run:hover { background: var(--green-hover); }
.btn-stop { background: var(--red); border-color: var(--red-hover); color: #fff0f0; }
.btn-stop:hover { background: var(--red-hover); }
.btn-secondary { background: transparent; }
.btn-secondary:hover { background: var(--bg-3); }
.btn-tiny { padding: 2px 8px; font-size: 11px; margin-left: 8px; }
.btn-danger { background: var(--red); border-color: var(--red-hover); width: 100%; margin-top: 8px; margin-left: 0; }
.btn-danger:hover { background: var(--red-hover); }
.btn-flash-error { background: var(--red) !important; border-color: var(--red-hover) !important; }

select {
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 8px;
  font-size: 13px;
  cursor: pointer;
}

.color-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9a9ab0;
}
.color-field input[type="color"] {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: none;
  cursor: pointer;
}

.tool-group {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  background: var(--bg-2);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
}
.tool-group-label { font-size: 10px; color: var(--text-dim); margin-right: 2px; }
.zoom-label {
  font-size: 11px;
  color: var(--text-dim);
  min-width: 38px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}
.zoom-label:hover { color: var(--text); }

.status {
  font-size: 11px;
  font-weight: 600;
  color: #f0b23a;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(240, 178, 58, 0.12);
}
.status.ready { color: #4fd884; background: rgba(79, 216, 132, 0.12); }
.status.error { color: #ff6b6b; background: rgba(255, 107, 107, 0.12); }

.layout {
  display: flex;
  align-items: stretch;
  height: calc(100vh - 49px);
  min-height: 0;
}

.splitter {
  flex: 0 0 auto;
  background: var(--border-soft);
  position: relative;
  z-index: 5;
}
.splitter::after {
  content: "";
  position: absolute;
  background: var(--border);
  border-radius: 2px;
}
.splitter-v {
  width: 6px;
  cursor: col-resize;
}
.splitter-v::after { top: 50%; left: 1.5px; width: 3px; height: 40px; transform: translateY(-50%); }
.splitter-h {
  height: 6px;
  cursor: row-resize;
}
.splitter-h::after { left: 50%; top: 1.5px; height: 3px; width: 40px; transform: translateX(-50%); }
.splitter:hover, .splitter.dragging { background: var(--accent-soft); }
.splitter:hover::after, .splitter.dragging::after { background: var(--accent); }

.board-panel {
  display: flex;
  flex-direction: column;
  min-width: 320px;
  flex: 1 1 60%;
  min-height: 0;
}
.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--bg-1);
}
.hint { font-size: 11px; color: var(--text-dim); margin-left: auto; text-align: right; max-width: 380px; }

.board-scroll { flex: 1; overflow: auto; padding: 24px; min-height: 0; }
.board {
  position: relative;
  width: 900px;
  min-height: 660px;
  transform-origin: 0 0;
}

/* Pi board: vertical/portrait, GPIO header on its right edge facing the
   breadboard beside it — so wire runs stay short and direct. */
.pi-board {
  position: absolute;
  top: 0;
  left: 0;
  width: 320px;
  height: 620px;
  z-index: 2;
  transform-origin: 160px 310px;
}
.pi-board-art,
.pi-photo {
  position: absolute;
  inset: 0;
  width: 320px;
  height: 620px;
  display: block;
  border-radius: 16px;
}
.pi-photo {
  object-fit: cover;
  display: none; /* shown automatically via JS only if assets/pi-photo.png actually loads */
}

.pin-strip {
  position: absolute;
  left: 276px;
  top: 50px;
  width: 30px;
  height: 520px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(20, 1fr);
  gap: 1px;
  z-index: 3;
}
.pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  font-size: 5.5px;
  line-height: 1;
  color: #dfe;
  cursor: pointer;
  border-radius: 3px;
  user-select: none;
}
.pin:hover { background: rgba(255,255,255,0.18); }
.pin .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f4d160;
  border: 1px solid #8a7000;
  flex-shrink: 0;
}
.pin[data-kind="power"] .dot { background: #ff6b6b; border-color: #8a0000; }
.pin[data-kind="ground"] .dot { background: #666; border-color: #222; }
.pin[data-kind="gpio"] .dot { background: #61dafb; border-color: #0f6a8a; }
.pin.selected .dot { outline: 2px solid #fff; }
.pin.active .dot { background: #ffd54f; box-shadow: 0 0 8px 2px #ffd54f; }
.pin-label { white-space: nowrap; }

.tool-group.pin-legend { gap: 10px; font-size: 10px; color: var(--text-dim); cursor: help; }
.pin-legend span { display: inline-flex; align-items: center; gap: 4px; }
.pin-legend .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pin-legend .dot.power { background: #ff6b6b; }
.pin-legend .dot.ground { background: #666; }
.pin-legend .dot.gpio { background: #61dafb; }

.breadboard {
  position: absolute;
  top: 0;
  left: 350px;
  right: 0;
  min-height: 620px;
  background:
    radial-gradient(circle, rgba(0, 0, 0, 0.16) 1.1px, transparent 1.3px) 0 0/16px 16px,
    #d8cdb0;
  border-radius: 8px;
  border: 2px solid #8f8567;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
}
.breadboard-label {
  position: absolute;
  top: 6px;
  left: 10px;
  font-size: 11px;
  color: #6b6248;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #d8cdb0;
  padding: 0 4px;
}

.component {
  --led-color: #ff3b3b;
  --seg-color: #ff3b3b;
  position: absolute;
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.component:active { cursor: grabbing; }
.comp-label {
  text-align: center;
  font-size: 10px;
  color: #333;
  margin-top: 4px;
}
.lcd-addr { color: #6b6248; font-size: 9px; }
.terminal-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}
.terminal-row.wrap { max-width: 118px; margin-left: auto; margin-right: auto; }
.terminal {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #b0a074;
  border: 2px solid #6b6248;
  cursor: crosshair;
  flex-shrink: 0;
}
.terminal.selected { outline: 2px solid #fff; }
.terminal.anode { background: #e8b923; }
.terminal.cathode { background: #999; }
.terminal-tag {
  position: absolute;
  top: 17px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  color: #4a4330;
  white-space: nowrap;
  pointer-events: none;
}
.comp-remove,
.comp-gear {
  position: absolute;
  top: -8px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  color: #fff;
  border: none;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: none;
  z-index: 4;
}
.comp-remove { right: -8px; background: #b71c1c; }
.comp-gear { left: -8px; background: #33344a; }
.component:hover .comp-remove,
.component:hover .comp-gear { display: block; }

/* --- LED: 5mm dome with glossy highlight, flat cathode-side rim, and two legs --- */
.led-bulb {
  position: relative;
  width: 34px;
  height: 42px;
  margin: 4px auto 0;
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  background: radial-gradient(
    circle at 32% 24%,
    color-mix(in srgb, var(--led-color) 32%, #6a6a6a) 0%,
    color-mix(in srgb, var(--led-color) 42%, #333) 45%,
    color-mix(in srgb, var(--led-color) 55%, #0a0a0a) 100%
  );
  border: 1px solid color-mix(in srgb, var(--led-color) 25%, #050505);
  box-shadow:
    inset -4px -5px 7px rgba(0, 0, 0, 0.45),
    inset 2px 2px 3px rgba(255, 255, 255, 0.12);
  transition: background 0.1s, box-shadow 0.1s;
  overflow: hidden;
}
.led-glint {
  position: absolute;
  top: 14%;
  left: 20%;
  width: 30%;
  height: 20%;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  filter: blur(0.5px);
}
.led-bulb::after {
  /* flat notch marking the cathode side, like a real 5mm LED's rim */
  content: "";
  position: absolute;
  left: 1px;
  bottom: 22%;
  width: 2px;
  height: 26%;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 1px;
}
.comp-led.on .led-bulb {
  background: radial-gradient(
    circle at 32% 24%,
    #ffffff 0%,
    var(--led-color) 50%,
    var(--led-color) 100%
  );
  box-shadow:
    0 0 22px 9px color-mix(in srgb, var(--led-color) 65%, transparent),
    inset -3px -4px 6px rgba(0, 0, 0, 0.2);
}
.led-legs {
  display: flex;
  justify-content: center;
  gap: 13px;
  margin-top: -1px;
}
.leg {
  width: 3px;
  background: linear-gradient(180deg, #e2e2e2, #8a8a8a);
  border-radius: 0 0 1px 1px;
}
.leg-anode { height: 24px; }
.leg-cathode { height: 15px; margin-top: 9px; }

/* --- 7-segment display: black epoxy DIP body, dark-red unlit segments --- */
.sevenseg-body {
  width: 62px;
  margin: 6px auto 0;
  padding: 9px 6px 7px;
  background: linear-gradient(155deg, #333 0%, #161616 55%, #030303 100%);
  border-radius: 5px;
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.1),
    inset 0 -2px 3px rgba(0, 0, 0, 0.5),
    0 2px 4px rgba(0, 0, 0, 0.35);
}
.sevenseg-digit {
  position: relative;
  width: 50px;
  height: 90px;
}
.seg {
  position: absolute;
  background: color-mix(in srgb, var(--seg-color) 16%, #250808);
  transition: background 0.08s, box-shadow 0.08s;
}
.seg.on {
  background: var(--seg-color);
  box-shadow: 0 0 7px 1.5px color-mix(in srgb, var(--seg-color) 75%, transparent);
}
.seg-a { top: 8px; left: 10px; width: 30px; height: 7px; clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%); }
.seg-g { top: 41px; left: 10px; width: 30px; height: 7px; clip-path: polygon(6% 50%, 18% 0, 82% 0, 94% 50%, 82% 100%, 18% 100%); }
.seg-d { top: 74px; left: 10px; width: 30px; height: 7px; clip-path: polygon(0 0, 100% 0, 88% 100%, 12% 100%); }
.seg-f { top: 15px; left: 6px; width: 7px; height: 26px; clip-path: polygon(0 12%, 100% 0, 100% 88%, 0 100%); }
.seg-b { top: 15px; left: 37px; width: 7px; height: 26px; clip-path: polygon(0 0, 100% 12%, 100% 100%, 0 88%); }
.seg-e { top: 48px; left: 6px; width: 7px; height: 26px; clip-path: polygon(0 12%, 100% 0, 100% 88%, 0 100%); }
.seg-c { top: 48px; left: 37px; width: 7px; height: 26px; clip-path: polygon(0 0, 100% 12%, 100% 100%, 0 88%); }
.seg-dp { top: 76px; left: 42px; width: 7px; height: 7px; border-radius: 50%; }

/* --- LCD: green PCB frame, pixel-grid glass, contrast pot, mounting holes --- */
.lcd-module {
  position: relative;
  width: 226px;
  margin: 0 auto;
  padding: 8px;
  background: linear-gradient(160deg, #12854a, #095c31 70%);
  border: 1px solid #063d20;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
}
.lcd-hole {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfcfcf;
  border: 1px solid #6b6b6b;
}
.lcd-hole.tl { top: 4px; left: 4px; }
.lcd-hole.tr { top: 4px; right: 4px; }
.lcd-hole.bl { bottom: 4px; left: 4px; }
.lcd-hole.br { bottom: 4px; right: 4px; }
.lcd-screen {
  width: 100%;
  height: 58px;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.16) 0,
      rgba(0, 0, 0, 0.16) 1px,
      transparent 1px,
      transparent 13.3px
    ),
    #17307a;
  border: 2px solid #0a1a4a;
  border-radius: 3px;
  padding: 6px 8px;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.08);
  white-space: pre;
  overflow: hidden;
  transition: background-color 0.15s, color 0.15s;
}
.lcd-screen.powered {
  color: #eaf1ff;
  text-shadow: 0 0 4px rgba(150, 190, 255, 0.6);
}
.lcd-pot {
  position: absolute;
  bottom: 7px;
  right: 9px;
  width: 11px;
  height: 11px;
  background: #2b6fd1;
  border: 1px solid #123a80;
  border-radius: 2px;
}
.lcd-pot::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 1px;
  width: 9px;
  height: 1.5px;
  background: #0a1a4a;
}
.lcd-line { height: 18px; overflow: hidden; }

.wire-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
  overflow: visible;
}
.wire-layer path {
  fill: none;
  stroke-width: 3;
  pointer-events: stroke;
  cursor: pointer;
}
.wire-layer path:hover { filter: brightness(1.35); }

.popover {
  position: fixed;
  z-index: 50;
  background: #26273a;
  border: 1px solid #4a4b66;
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
  width: 190px;
}
.popover-title {
  font-size: 10px;
  color: #9a9ab0;
  margin: 6px 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.popover-title:first-child { margin-top: 0; }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
}
.swatch:hover { border-color: #fff; }
.rotate-row { display: flex; align-items: center; gap: 6px; }
.rotate-row input[type="range"] { flex: 1; }
.addr-select {
  width: 100%;
  background: var(--bg-3);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 12px;
}

.palette-popover { width: 260px; }
.palette-list { display: flex; flex-direction: column; gap: 4px; }
.palette-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 6px 8px;
  cursor: pointer;
  text-align: left;
  color: var(--text);
}
.palette-item:hover { background: var(--bg-3); border-color: var(--border); }
.palette-icon { font-size: 20px; flex-shrink: 0; width: 24px; text-align: center; }
.palette-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.palette-name { font-size: 13px; font-weight: 500; }
.palette-desc { font-size: 10.5px; color: var(--text-dim); line-height: 1.3; }

.code-panel {
  display: flex;
  flex-direction: column;
  min-width: 280px;
  flex: 1 1 40%;
  min-height: 0;
}
.code-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--text-dim);
}
.file-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f0b23a;
  display: inline-block;
}
.editor-wrap {
  flex: 1 1 auto;
  min-height: 80px;
  overflow: hidden;
  position: relative;
}
.editor-wrap .CodeMirror {
  position: absolute;
  inset: 0;
  height: 100% !important;
  font-size: 13px;
}
.console-wrap {
  flex: 0 0 240px;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-soft);
}
.console-toolbar {
  display: flex;
  align-items: center;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-dim);
  background: var(--bg-1);
}
.console-output {
  flex: 1;
  margin: 0;
  padding: 10px 12px;
  overflow: auto;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 12px;
  background: var(--bg-0);
  white-space: pre-wrap;
  line-height: 1.5;
}
.console-output .err { color: #ff6b6b; }
.console-output .sys { color: var(--text-dim); font-style: italic; }

/* Smooth transitions only for users who haven't asked to reduce motion —
   also sidesteps a Chromium quirk where transition+transform can otherwise
   freeze the rotated/scaled state instead of animating or snapping to it. */
@media (prefers-reduced-motion: no-preference) {
  .board { transition: transform 0.15s ease; }
  .pi-board { transition: transform 0.2s ease; }
  .breadboard { transition: min-height 0.15s ease, transform 0.2s ease; }
  .comp-visual { transition: transform 0.15s ease; }
}

/* ==================== Auth: modal, form, user chip ==================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 9, 14, 0.6);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}
#auth-modal-overlay[hidden] {
    display: none !important;
}
.modal {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-2);
  padding: 28px 26px 24px;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
}
.modal-close:hover { background: var(--bg-3); color: var(--text); }

.auth-modal { width: 340px; }
.auth-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-2);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 18px;
}
.auth-tab {
  flex: 1;
  padding: 8px 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.auth-tab.active { background: var(--bg-3); color: var(--text); }

.google-btn-slot { display: flex; justify-content: center; min-height: 40px; }
.google-btn-disabled {
  width: 100%;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-2);
  border: 1px dashed var(--border);
  border-radius: 6px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--text-dim); }
.field input {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--text);
  font-size: 13px;
}
.field input:focus { outline: none; border-color: var(--accent); }
.auth-error {
  font-size: 12px;
  color: #ff8a8a;
  background: rgba(214, 69, 80, 0.12);
  border-radius: 6px;
  padding: 8px 10px;
}
.auth-submit { width: 100%; margin-top: 4px; }

.auth-area { display: flex; align-items: center; }
.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  cursor: pointer;
  color: var(--text);
}
.user-chip:hover { background: var(--bg-3); }
.user-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.user-name { font-size: 12.5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.projects-popover { width: 260px; }
.project-list { display: flex; flex-direction: column; gap: 2px; max-height: 220px; overflow-y: auto; margin-top: 4px; }
.project-list-empty { font-size: 12px; color: var(--text-dim); padding: 8px 2px; }
.project-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
}
.project-item:hover { background: var(--bg-3); }
.project-item.current { background: var(--accent-soft); }
.project-item-info { flex: 1; min-width: 0; }
.project-item-name { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-item-time { font-size: 10px; color: var(--text-dim); }
.project-item-delete {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 4px;
  border-radius: 4px;
  flex-shrink: 0;
}
.project-item-delete:hover { background: rgba(214, 69, 80, 0.2); color: #ff8a8a; }
.popover-divider { height: 1px; background: var(--border-soft); margin: 8px 0; }
.saveas-row { display: flex; gap: 6px; margin-top: 4px; }
.saveas-row input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  color: var(--text);
  font-size: 12px;
  min-width: 0;
}
