/* ============================================================
   CSiBridge — Startup overlay
   WinUI 3 / Fluent design tokens

   Ported from the standalone startup mock-up. Theme tokens are
   scoped to .startup-overlay (rather than :root) so the overlay
   can sit on top of the main app without leaking its variables
   into the rest of the document. Theme is switched by toggling
   the data-theme attribute on the .startup-overlay element.
   ============================================================ */

.startup-overlay {
  /* Geometry */
  --radius-control: 4px;
  --radius-card: 6px;
  --radius-flyout: 7px;
  --titlebar-h: 30px;
  --nav-w: 290px;
  --nav-w-collapsed: 44px;

  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI",
    -apple-system, system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI Variable",
    "Segoe UI", -apple-system, system-ui, sans-serif;
  --font-mono: "Cascadia Code", "Cascadia Mono", ui-monospace, "Consolas",
    "SF Mono", monospace;

  /* Overlay placement — sits above the main app */
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: hidden;
  font-family: var(--font);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.startup-overlay *,
.startup-overlay *::before,
.startup-overlay *::after { box-sizing: border-box; }

/* ---------- LIGHT (default) ----------
   Light is the default token set. Dark is applied via the
   @media (prefers-color-scheme: dark) query below, which the host drives
   through CoreWebView2.Profile.PreferredColorScheme from the native title
   bar's theme toggle (see App.xaml.cs / WebBridge). */
.startup-overlay {
  --accent: #0067c0;
  --accent-hover: #1975c5;
  --accent-pressed: #3183cb;
  --accent-text: #003e92;
  --accent-fill-text: #ffffff;

  --text-primary: rgba(0, 0, 0, 0.8956);
  --text-secondary: rgba(0, 0, 0, 0.6063);
  --text-tertiary: rgba(0, 0, 0, 0.4458);
  --text-disabled: rgba(0, 0, 0, 0.3614);

  /* Mica window base — desktop-tinted neutral */
  --mica-base: #f3f3f3;
  --mica-tint: rgba(0, 103, 192, 0.05);
  --mica-tint-2: rgba(0, 103, 192, 0.035);

  /* Surfaces */
  --layer: #ffffff;               /* content frame */
  --card: #ffffff;
  --card-secondary: #fbfbfb;
  --card-stroke: rgba(0, 0, 0, 0.0578);

  /* Controls */
  --control-fill: rgba(255, 255, 255, 0.7);
  --control-fill-hover: rgba(249, 249, 249, 0.5);
  --control-fill-pressed: rgba(249, 249, 249, 0.3);
  --control-stroke: rgba(0, 0, 0, 0.0578);
  --control-stroke-bottom: rgba(0, 0, 0, 0.1622);

  --subtle-hover: rgba(0, 0, 0, 0.0373);
  --subtle-pressed: rgba(0, 0, 0, 0.0241);
  --subtle-selected: rgba(0, 0, 0, 0.0606);

  --divider: rgba(0, 0, 0, 0.0803);
  --flyout: #fcfcfc;
  --flyout-stroke: rgba(0, 0, 0, 0.0578);

  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08), 0 0.3px 0.9px rgba(0, 0, 0, 0.06);
  --shadow-flyout: 0 8px 16px rgba(0, 0, 0, 0.14), 0 0 1px rgba(0, 0, 0, 0.12);
  --shadow-card-hover: 0 4px 10px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);

  --caption-hover: rgba(0, 0, 0, 0.06);
  --caption-pressed: rgba(0, 0, 0, 0.04);

  --grid-line: rgba(0, 80, 160, 0.13);
  --grid-bg: #eef3f8;
}

/* ---------- DARK ---------- */
@media (prefers-color-scheme: dark) {
  .startup-overlay {
    --accent: #4cc2ff;
    --accent-hover: #47b1e8;
    --accent-pressed: #42a1d2;
    --accent-text: #99ebff;
    --accent-fill-text: #00131f;

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.786);
    --text-tertiary: rgba(255, 255, 255, 0.5442);
    --text-disabled: rgba(255, 255, 255, 0.3628);

    --mica-base: #202020;
    --mica-tint: rgba(76, 194, 255, 0.06);
    --mica-tint-2: rgba(76, 194, 255, 0.04);

    --layer: #272727;
    --card: #2b2b2b;
    --card-secondary: #2d2d2d;
    --card-stroke: rgba(255, 255, 255, 0.0837);

    --control-fill: rgba(255, 255, 255, 0.0605);
    --control-fill-hover: rgba(255, 255, 255, 0.0837);
    --control-fill-pressed: rgba(255, 255, 255, 0.0326);
    --control-stroke: rgba(255, 255, 255, 0.0698);
    --control-stroke-bottom: rgba(255, 255, 255, 0.0954);

    --subtle-hover: rgba(255, 255, 255, 0.0605);
    --subtle-pressed: rgba(255, 255, 255, 0.0419);
    --subtle-selected: rgba(255, 255, 255, 0.0837);

    --divider: rgba(255, 255, 255, 0.0837);
    --flyout: #2c2c2c;
    --flyout-stroke: rgba(255, 255, 255, 0.0698);

    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.28), 0 0.3px 0.9px rgba(0, 0, 0, 0.22);
    --shadow-flyout: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 1px rgba(0, 0, 0, 0.5);
    --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.38), 0 1px 3px rgba(0, 0, 0, 0.3);

    --caption-hover: rgba(255, 255, 255, 0.0605);
    --caption-pressed: rgba(255, 255, 255, 0.0419);

    --grid-line: rgba(120, 190, 255, 0.16);
    --grid-bg: #1c2530;
  }
}

/* The window — Mica backdrop */
.startup-overlay .window {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(135% 110% at 12% -10%, var(--mica-tint), transparent 55%),
    radial-gradient(120% 130% at 105% 115%, var(--mica-tint-2), transparent 50%),
    var(--mica-base);
}

/* ============================================================
   Shell: nav + content
   ============================================================ */
.startup-overlay .shell {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
  padding-left: 4px;
}

/* ---- NavigationView pane (sits on Mica, transparent) ---- */
.startup-overlay .nav {
  width: var(--nav-w);
  flex: 0 0 var(--nav-w);
  display: flex;
  flex-direction: column;
  padding: 0 4px 8px 4px;
  transition: width 0.2s cubic-bezier(0.1, 0.9, 0.2, 1), flex-basis 0.2s cubic-bezier(0.1, 0.9, 0.2, 1);
  overflow: hidden;
}
.startup-overlay .window.nav-collapsed .nav { width: var(--nav-w-collapsed); flex-basis: var(--nav-w-collapsed); }

.startup-overlay .nav-top { display: flex; align-items: center; height: 36px; padding: 0 2px; margin-bottom: 2px; }
.startup-overlay .hamburger {
  width: 36px; height: 32px; border: 0; background: transparent;
  display: grid; place-items: center; cursor: pointer;
  border-radius: var(--radius-control); color: var(--text-primary);
}
.startup-overlay .hamburger:hover { background: var(--subtle-hover); }
.startup-overlay .hamburger:active { background: var(--subtle-pressed); color: var(--text-secondary); }
.startup-overlay .hamburger.disabled { color: var(--text-disabled); pointer-events: none; cursor: default; }
.startup-overlay .hamburger svg { width: 16px; height: 16px; }

.startup-overlay .nav-list { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; overflow-x: hidden; padding-right: 2px; }
.startup-overlay .nav-list::-webkit-scrollbar { width: 6px; }
.startup-overlay .nav-list::-webkit-scrollbar-thumb { background: var(--text-disabled); border-radius: 3px; }
.startup-overlay .nav-list::-webkit-scrollbar-track { background: transparent; }

.startup-overlay .nav-item {
  position: relative;
  display: flex; align-items: center; gap: 0;
  height: 30px; min-height: 30px;
  border-radius: var(--radius-control);
  border: 0; background: transparent;
  color: var(--text-primary);
  cursor: pointer; width: 100%;
  padding: 0; text-align: left;
  font-family: inherit; font-size: 12px;
}
.startup-overlay .nav-item:hover { background: var(--subtle-hover); }
.startup-overlay .nav-item:active { background: var(--subtle-pressed); color: var(--text-secondary); }
.startup-overlay .nav-item.disabled { color: var(--text-disabled); pointer-events: none; }
.startup-overlay .nav-item.selected { background: var(--subtle-selected); }
.startup-overlay .nav-item.selected::before {
  content: ""; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 16px; border-radius: 2px;
  background: var(--accent);
}
.startup-overlay .ni-icon { width: 34px; flex: 0 0 34px; display: grid; place-items: center; }
.startup-overlay .ni-icon svg { width: 15px; height: 15px; }
.startup-overlay .ni-label { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.startup-overlay .window.nav-collapsed .ni-label,
.startup-overlay .window.nav-collapsed .ni-chevron,
.startup-overlay .window.nav-collapsed .nav-sub { opacity: 0; pointer-events: none; }
.startup-overlay .ni-chevron {
  width: 32px; flex: 0 0 32px; display: grid; place-items: center;
  color: var(--text-secondary);
  transition: transform 0.18s ease;
}
.startup-overlay .ni-chevron svg { width: 12px; height: 12px; }
.startup-overlay .nav-group.open > .nav-item .ni-chevron { transform: rotate(180deg); }

.startup-overlay .nav-sub {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.2s ease;
}
.startup-overlay .nav-group.open .nav-sub { grid-template-rows: 1fr; }
.startup-overlay .nav-sub-inner { overflow: hidden; }
.startup-overlay .nav-subitem {
  display: flex; align-items: center; height: 28px; min-height: 28px;
  padding-left: 16px; padding-right: 8px;
  border-radius: var(--radius-control);
  color: var(--text-secondary); cursor: pointer;
  border: 0; background: transparent; width: 100%;
  font-family: inherit; font-size: 12px; text-align: left;
}
.startup-overlay .nav-subitem:hover { background: var(--subtle-hover); color: var(--text-primary); }
.startup-overlay .nav-subitem:active { background: var(--subtle-pressed); }
.startup-overlay .nav-subitem.selected { background: var(--subtle-selected); color: var(--text-primary); }
.startup-overlay .nsi-icon { width: 30px; flex: 0 0 30px; display: grid; place-items: center; }
.startup-overlay .nsi-icon svg { width: 15px; height: 15px; }
.startup-overlay .nsi-label { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.startup-overlay .window.nav-collapsed .nsi-label { opacity: 0; pointer-events: none; }

.startup-overlay .nav-divider { height: 1px; background: var(--divider); margin: 5px 10px; }

/* ---- Content frame (solid Layer with rounded top-left) ---- */
.startup-overlay .content {
  flex: 1 1 auto;
  min-width: 0;
  background: var(--layer);
  border-top-left-radius: 8px;
  border-left: 1px solid var(--card-stroke);
  border-top: 1px solid var(--card-stroke);
  overflow-y: auto;
  overflow-x: hidden;
}
.startup-overlay .content::-webkit-scrollbar { width: 14px; }
.startup-overlay .content::-webkit-scrollbar-thumb {
  background: var(--text-disabled); border-radius: 7px;
  border: 4px solid transparent; background-clip: padding-box;
}
.startup-overlay .content::-webkit-scrollbar-thumb:hover { background: var(--text-tertiary); background-clip: padding-box; border: 3px solid transparent; }
.startup-overlay .content::-webkit-scrollbar-track { background: transparent; }

.startup-overlay .content-inner { padding: 14px 28px 36px 28px; max-width: 1600px; }

/* ============================================================
   Save Project view (filename + folder browser)
   ============================================================ */
.startup-overlay .save-view {
  display: flex; flex-direction: column; height: 100%;
  padding: 14px 28px 18px 28px; box-sizing: border-box;
}
.startup-overlay .save-hint { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.startup-overlay .save-row { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.startup-overlay .save-name {
  flex: 1 1 auto; max-width: 520px; height: 34px; padding: 0 12px;
  font-family: inherit; font-size: 14px; color: var(--text-primary);
  background: var(--card); border: 1px solid var(--control-stroke, rgba(0,0,0,0.16)); border-radius: 4px;
}
.startup-overlay .save-name:focus { outline: none; border-color: var(--accent); }
.startup-overlay .save-btn {
  height: 34px; min-width: 84px; padding: 0 18px; cursor: pointer;
  font-family: inherit; font-size: 14px; color: var(--accent-fill-text);
  background: var(--accent); border: 1px solid var(--accent); border-radius: 4px;
}
.startup-overlay .save-btn:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.startup-overlay .save-btn:disabled { opacity: 0.5; cursor: default; }
.startup-overlay .save-status { font-size: 13px; color: var(--text-secondary); margin: 2px 0 8px; }
.startup-overlay .save-status.error { color: #c42b1c; }
.startup-overlay .save-browser { flex: 1 1 auto; min-height: 0; position: relative; }

/* ---- FilePickerView extras (the Save view above is its frame) ----
   Lives here rather than in FilePickerView.razor.css because the per-command
   Options block is passed IN as a render fragment: scoped CSS only ever tags a
   component's own markup, so a scoped rule would never reach those fields. */
.startup-overlay .fp-options {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin-bottom: 12px;
}
.startup-overlay .fp-options label,
.startup-overlay .gge-fields label {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 4px;
}
.startup-overlay .gge-fields { display: flex; gap: 16px; }
.startup-overlay .fp-options input,
.startup-overlay .fp-options select {
  height: 32px; min-width: 180px; padding: 0 8px;
  font-family: inherit; font-size: 14px; color: var(--text-primary);
  background: var(--card); border: 1px solid var(--control-stroke, rgba(0,0,0,0.16)); border-radius: 4px;
}
.startup-overlay .fp-options input:focus,
.startup-overlay .fp-options select:focus { outline: none; border-color: var(--accent); }

/* Folder mode: the chosen folder stands in for the filename box, so it takes the
   same height and alignment as .save-name. */
.startup-overlay .fp-folder {
  flex: 1 1 auto; max-width: 520px; height: 34px; box-sizing: border-box;
  display: flex; align-items: center; padding: 0 12px;
  font-size: 14px; color: var(--text-primary);
  background: var(--card-secondary, #fbfbfb);
  border: 1px solid var(--control-stroke, rgba(0,0,0,0.16)); border-radius: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================
   Headings
   ============================================================ */
.startup-overlay .h-page {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600;
  margin: 6px 0 14px; letter-spacing: -0.2px;
}
.startup-overlay .h-section {
  font-family: var(--font-display);
  font-size: 16px; font-weight: 600;
  margin: 0 0 10px; letter-spacing: -0.1px;
}

/* ============================================================
   Settings row (dropdowns)
   ============================================================ */
.startup-overlay .settings-row { background-color: var(--mica-base); border: var(--control-stroke-bottom); display: flex; flex-wrap: wrap; gap: 18px 28px; margin-bottom: 18px; padding: 12px; }
.startup-overlay .field { display: flex; flex-direction: column; gap: 4px; }
.startup-overlay .field-label { font-size: 11px; color: var(--text-secondary); padding-left: 2px; }

/* ComboBox */
.startup-overlay .combo { position: relative; }
.startup-overlay .combo-btn {
  min-width: 168px; height: 28px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 9px 0 10px;
  background: var(--control-fill);
  border: 1px solid var(--control-stroke);
  border-bottom-color: var(--control-stroke-bottom);
  border-radius: var(--radius-control);
  color: var(--text-primary); cursor: pointer;
  font-family: inherit; font-size: 12px; text-align: left;
}
.startup-overlay .combo-btn:hover { background: var(--control-fill-hover); }
.startup-overlay .combo-btn:active { background: var(--control-fill-pressed); color: var(--text-secondary); }
.startup-overlay .combo.open .combo-btn { background: var(--control-fill-pressed); }
.startup-overlay .combo-val { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.startup-overlay .combo-caret { color: var(--text-secondary); flex: 0 0 auto; display: grid; place-items: center; }
.startup-overlay .combo-caret svg { width: 12px; height: 12px; }

.startup-overlay .combo-pop {
  position: absolute; top: calc(100% + 2px); left: 0;
  min-width: 100%;
  background: var(--flyout);
  border: 1px solid var(--flyout-stroke);
  border-radius: var(--radius-flyout);
  box-shadow: var(--shadow-flyout);
  padding: 2px; z-index: 60;
  opacity: 0; transform: scaleY(0.9) translateY(-4px);
  transform-origin: top; pointer-events: none;
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.startup-overlay .combo.open .combo-pop { opacity: 1; transform: none; pointer-events: auto; }
.startup-overlay .combo-opt {
  position: relative;
  display: flex; align-items: center;
  height: 28px; padding: 0 10px 0 13px;
  border-radius: var(--radius-control); cursor: pointer;
  white-space: nowrap; color: var(--text-primary);
}
.startup-overlay .combo-opt:hover { background: var(--subtle-hover); }
.startup-overlay .combo-opt:active { background: var(--subtle-pressed); }
.startup-overlay .combo-opt.sel::before {
  content: ""; position: absolute; left: 4px; top: 50%;
  transform: translateY(-50%); width: 3px; height: 16px;
  border-radius: 2px; background: var(--accent);
}

/* ============================================================
   Category tabs (pivot)
   ============================================================ */
/* Template groups (section per category) */
.startup-overlay .tmpl-group { margin-bottom: 4px; }
.startup-overlay .tmpl-group-title {
  margin: 2px 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--divider);
}

/* Collapsible variant (Bridge Components) — a button styled like .tmpl-group-title
   with a chevron, and a grid-rows collapse for the body (same technique as
   .nav-group/.nav-sub above: 0fr/1fr animates height without measuring content). */
.startup-overlay .tmpl-group-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; margin: 2px 0 12px; padding: 0 0 6px;
  border: 0; border-bottom: 1px solid var(--divider);
  background: none; cursor: pointer;
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
  letter-spacing: -0.1px; color: var(--text-primary); text-align: left;
}
.startup-overlay .tmpl-group-chevron {
  color: var(--text-secondary); display: grid; place-items: center;
  transition: transform 0.18s ease;
}
.startup-overlay .tmpl-group-chevron svg { width: 12px; height: 12px; }
.startup-overlay .tmpl-group-toggle.open .tmpl-group-chevron { transform: rotate(180deg); }
.startup-overlay .tmpl-group-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.2s ease;
}
.startup-overlay .tmpl-group-body.open { grid-template-rows: 1fr; }
.startup-overlay .tmpl-group-body-inner { overflow: hidden; }

/* ============================================================
   Template gallery
   ============================================================ */
.startup-overlay .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.startup-overlay .tmpl {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-card);
  overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}
.startup-overlay .tmpl:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.startup-overlay .tmpl:active { transform: translateY(-1px); }
.startup-overlay .tmpl.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow-card-hover); }

.startup-overlay .tmpl-thumb {
  display: block;
  aspect-ratio: 16 / 10;
  position: relative;
  /* Grid backdrop shows through while the image loads (and behind any
     transparent edges of the thumbnail). */
  background-color: var(--grid-bg);
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 16px 16px;
  border-bottom: 1px solid var(--card-stroke);
}
.startup-overlay .tmpl-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.startup-overlay .tmpl-name {
  padding: 7px 10px 9px;
  font-size: 12px; font-weight: 600; color: var(--text-primary);
  text-align: center;
}

/* Bridge Components cards ship no thumbnail artwork: the thumb's grid backdrop
   plus a centred glyph is the placeholder, with a Bridge/Bundle kind badge. */
.startup-overlay .tmpl-thumb-glyph {
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  opacity: 0.75;
}
.startup-overlay .tmpl-thumb-glyph svg { width: 56%; height: auto; }
.startup-overlay .tmpl-badge {
  position: absolute; top: 6px; right: 6px;
  padding: 1px 6px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-secondary);
  background: var(--card);
  border: 1px solid var(--card-stroke);
  border-radius: 999px;
}

/* ============================================================
   Recent Projects (widened)
   ============================================================ */
.startup-overlay .recent-empty {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: var(--card-secondary);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-card);
  max-width: 640px;
}
.startup-overlay .recent-empty .glyph {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: grid; place-items: center; border-radius: 7px;
  background: var(--subtle-selected); color: var(--text-tertiary);
}
.startup-overlay .recent-empty .glyph svg { width: 19px; height: 19px; }
.startup-overlay .recent-empty .re-text { display: flex; flex-direction: column; gap: 2px; }
.startup-overlay .recent-empty .re-title { font-size: 12.5px; font-weight: 600; }
.startup-overlay .recent-empty .re-sub { font-size: 11.5px; color: var(--text-secondary); }
.startup-overlay .recent-empty .re-sub a { color: var(--accent); cursor: pointer; text-decoration: none; }
.startup-overlay .recent-empty .re-sub a:hover { text-decoration: underline; }

/* Populated MRU list — one clickable row per project (see RecentProjects). */
.startup-overlay .recent-list {
  display: flex; flex-direction: column; gap: 4px;
  max-width: 640px;
}
.startup-overlay .recent-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 9px 12px; text-align: left;
  background: var(--card-secondary);
  border: 1px solid var(--card-stroke);
  border-radius: var(--radius-card);
  color: inherit; font-family: inherit; cursor: pointer;
}
.startup-overlay .recent-item:hover { background: var(--subtle-hover); border-color: var(--accent); }
.startup-overlay .recent-item .glyph {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center; border-radius: 6px;
  background: var(--subtle-selected); color: var(--text-tertiary);
}
.startup-overlay .recent-item .glyph svg { width: 17px; height: 17px; }
/* min-width: 0 lets the long folder path ellipsize instead of stretching the row. */
.startup-overlay .recent-item .ri-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.startup-overlay .recent-item .ri-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600;
}
.startup-overlay .recent-item .ri-sub {
  font-size: 11.5px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.startup-overlay .recent-item .ri-time { flex: 0 0 auto; font-size: 11px; color: var(--text-tertiary); }

/* Entry whose file has since been moved or deleted — clicking it drops the row. */
.startup-overlay .recent-item.missing .ri-title,
.startup-overlay .recent-item.missing .ri-sub { color: var(--text-tertiary); }
.startup-overlay .recent-item .ri-badge {
  padding: 1px 6px; border-radius: 999px;
  font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px;
  background: var(--subtle-selected); color: var(--text-tertiary);
}

.startup-overlay .recent-status { max-width: 640px; margin: 0 0 8px; font-size: 11.5px; color: var(--text-secondary); }

.startup-overlay .hint { font-size: 11px; color: var(--text-tertiary); margin-top: 10px; }
