/* =============================================================================
   DarkBeam UI — Futuristic Precision CAD / Engineering Takeoff Interface (v34)
   Loaded after app.css, claude.css, and revu.css.
   Supports both DarkBeam Dark (default: body.darkbeam.th-claude) and
   DarkBeam Light (body.darkbeam.th-claude.th-claude-light).
   ============================================================================= */

/* ---- 1. Color Tokens & Typography ---- */
html body.darkbeam.th-claude:not(#_):not(#__) {
  --bg: #080b10;
  --bg-elev: #0d121b;
  --panel: #0e141e;
  --surf: #151d2b;
  --surf2: #1c2738;
  --line: #1e2a3d;
  --line2: #2d3e58;
  --text: #edf4ff;
  --text2: #c5d3e8;
  --muted: #7c90ad;
  --acc: #38bdf8;
  --acch: #7dd3fc;
  --acc-solid: #0ea5e9;
  --acc2: rgba(56, 189, 248, 0.14);
  --acc3: rgba(56, 189, 248, 0.24);
  --acc-glow: rgba(56, 189, 248, 0.35);
  --hov: rgba(148, 163, 184, 0.10);
  --page: #05070b;
  --ok: #34d399;
  --warn: #fbbf24;
  --err: #f87171;
  --ic: #d8e4f5;
  --ic-acc: #38bdf8;
  --glass: rgba(16, 23, 35, 0.94);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 22px 60px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.12);
  --font: "Segoe UI Variable Text", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
  font-family: var(--font) !important;
  font-size: 12px !important;
  background: var(--bg) !important;
  color: var(--text) !important;
}

html body.darkbeam.th-claude.th-claude-light:not(#_):not(#__) {
  --bg: #eef2f7;
  --bg-elev: #f5f8fc;
  --panel: #f9fbfd;
  --surf: #ffffff;
  --surf2: #ebf0f6;
  --line: #d6e0ec;
  --line2: #b8c7da;
  --text: #0f172a;
  --text2: #334155;
  --muted: #64748b;
  --acc: #0284c7;
  --acch: #0369a1;
  --acc-solid: #0284c7;
  --acc2: rgba(2, 132, 199, 0.11);
  --acc3: rgba(2, 132, 199, 0.20);
  --acc-glow: rgba(2, 132, 199, 0.25);
  --hov: rgba(15, 23, 42, 0.06);
  --page: #cfd8e4;
  --ok: #059669;
  --warn: #d97706;
  --err: #dc2626;
  --ic: #1e293b;
  --ic-acc: #0284c7;
  --glass: rgba(255, 255, 255, 0.96);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.20), 0 0 0 1px rgba(2, 132, 199, 0.12);
  color-scheme: light;
}

/* ---- 2. Menubar & Futuristic DarkBeam Brand Mark ---- */
html body.darkbeam.th-claude:not(#_):not(#__) #menubar {
  background: linear-gradient(180deg, var(--bg-elev), var(--bg)) !important;
  border-bottom: 1px solid var(--line) !important;
  height: 32px !important;
  padding: 0 10px !important;
  gap: 2px;
  align-items: center;
}

html body.darkbeam.th-claude:not(#_):not(#__) #menubar > .menu {
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 500;
  color: var(--text2) !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  transition: background-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) #menubar > .menu:hover,
html body.darkbeam.th-claude:not(#_):not(#__) #menubar > .menu.open {
  background: var(--acc2) !important;
  color: var(--text) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #menubar > .menu[data-m="bb"] {
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  color: var(--text) !important;
  padding-left: 8px !important;
  padding-right: 11px !important;
  margin-right: 4px;
  background: linear-gradient(135deg, var(--acc2), transparent) !important;
  border: 1px solid color-mix(in srgb, var(--acc) 28%, transparent);
}

html body.darkbeam.th-claude:not(#_):not(#__) #menubar > .menu[data-m="bb"]::before {
  content: "";
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: url("icon.png") center / contain no-repeat;
  box-shadow: 0 0 8px var(--acc-glow);
  flex: none;
  margin-right: 1px;
}

html body.darkbeam.th-claude:not(#_):not(#__) #menubar > .menu .dd {
  top: 28px !important;
}

/* Top-right Theme Toggle & Claude AI Pill */
html body.darkbeam.th-claude:not(#_):not(#__) #dbThemeBtn {
  order: 998;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px !important;
  border-radius: 999px !important;
  border: 1px solid var(--line2) !important;
  background: var(--surf) !important;
  color: var(--text2) !important;
  font-size: 11.5px !important;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) #dbThemeBtn:hover {
  border-color: var(--acc) !important;
  color: var(--text) !important;
  background: var(--acc2) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #clMenuBtn {
  order: 999;
  margin-left: 6px !important;
  height: 24px;
  padding: 0 11px !important;
  border-radius: 999px !important;
  border: 1px solid color-mix(in srgb, #60a5fa 50%, #818cf8 50%) !important;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(129, 140, 248, 0.18)) !important;
  color: var(--acch, #7dd3fc) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
}

html body.darkbeam.th-claude.th-claude-light:not(#_):not(#__) #clMenuBtn {
  color: #0369a1 !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #clMenuBtn:hover {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.26), rgba(129, 140, 248, 0.28)) !important;
  box-shadow: 0 0 14px var(--acc-glow) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .cllogin {
  background: linear-gradient(135deg, #0ea5e9, #4f46e5) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 3px 10px !important;
  border-radius: 999px !important;
}

/* Segmented AI Provider Switcher (Gemini · Claude · ChatGPT) */
html body.darkbeam.th-claude:not(#_):not(#__) .clprov {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 6px 8px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  flex: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) .clptab {
  height: 26px;
  padding: 0 8px !important;
  border-radius: 7px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) .clptab:hover {
  background: var(--hov) !important;
  color: var(--text2) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .clptab.on {
  background: var(--acc2) !important;
  border-color: color-mix(in srgb, var(--acc) 65%, transparent) !important;
  color: var(--text) !important;
  box-shadow: 0 0 10px color-mix(in srgb, var(--acc) 22%, transparent) !important;
}

/* Agent / Ask Mode Segmented Pill & Compact Two-Row AI Header */
html body.darkbeam.th-claude:not(#_):not(#__) .clhead {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  padding: 6px 8px;
}

html body.darkbeam.th-claude:not(#_):not(#__) .clrow {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  flex-wrap: nowrap;
}

html body.darkbeam.th-claude:not(#_):not(#__) .clmodel {
  flex: 1 1 auto;
  min-width: 0;
  height: 24px;
  font-size: 11px !important;
  padding: 0 4px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .clnew,
html body.darkbeam.th-claude:not(#_):not(#__) .clmore {
  flex: none;
  height: 24px;
  padding: 0 7px !important;
  font-size: 11px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .clmode {
  flex: none;
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line2);
}

html body.darkbeam.th-claude:not(#_):not(#__) .clmode button {
  height: 20px;
  padding: 0 8px !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
}

html body.darkbeam.th-claude:not(#_):not(#__) .clmode button.on {
  background: var(--acc-solid) !important;
  color: #ffffff !important;
  box-shadow: 0 0 8px var(--acc-glow) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .cltool {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  border-radius: 6px;
  background: var(--surf);
  border: 1px solid var(--line);
  color: var(--acc);
  font-style: normal;
  font-size: 11px;
}

html body.darkbeam.th-claude:not(#_):not(#__) .clundo {
  margin-top: 6px;
  height: 22px;
  padding: 0 10px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 600;
  color: var(--warn) !important;
  border-color: color-mix(in srgb, var(--warn) 45%, var(--line2)) !important;
}

/* ---- 3. Primary Toolbar ---- */
html body.darkbeam.th-claude:not(#_):not(#__) #toolbar {
  background: var(--panel) !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 3px 8px !important;
  min-height: 32px;
  gap: 2px;
}

html body.darkbeam.th-claude:not(#_):not(#__) #toolbar .grp,
html body.darkbeam.th-claude:not(#_):not(#__) #toolbar .seg {
  border-right: 1px solid var(--line) !important;
  padding: 0 5px !important;
  gap: 2px;
  background: transparent !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #toolbar :is(button, .tb) {
  border-radius: 6px !important;
  height: 26px;
  min-width: 26px;
  padding: 2px 5px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--ic) !important;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease, transform 0.1s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) #toolbar :is(button, .tb):hover {
  background: var(--hov) !important;
  border-color: var(--line2) !important;
  color: var(--text) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #toolbar :is(button.on, button.active, .on) {
  background: var(--acc2) !important;
  border-color: color-mix(in srgb, var(--acc) 70%, transparent) !important;
  color: var(--text) !important;
  box-shadow: 0 0 12px color-mix(in srgb, var(--acc) 22%, transparent), inset 0 -2px 0 var(--acc) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #toolbar button.on::after {
  display: none !important;
}

/* ---- 4. Subbar: Document Tabs & Properties Ribbon ---- */
html body.darkbeam.th-claude:not(#_):not(#__) #subbar {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--line) !important;
  min-height: 30px;
  align-items: center;
}

html body.darkbeam.th-claude:not(#_):not(#__) #subbar #tabs,
html body.darkbeam.th-claude:not(#_):not(#__) #tabs {
  background: transparent !important;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 3px 6px 0 !important;
  overflow-x: auto;
  scrollbar-width: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tabs::-webkit-scrollbar {
  display: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tabs .tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 210px;
  height: 26px;
  padding: 0 10px !important;
  border-radius: 7px 7px 0 0 !important;
  border: 1px solid transparent !important;
  border-bottom: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 11.5px !important;
  transition: background-color 0.14s ease, color 0.14s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tabs .tab .tname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tabs .tab .tdot {
  color: var(--acc);
  font-size: 13px;
  line-height: 1;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tabs .tab i {
  margin-left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted) !important;
  font-size: 11px;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tabs .tab i:hover {
  background: var(--hov);
  color: var(--err) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tabs .tab:hover {
  background: var(--hov) !important;
  color: var(--text2) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tabs .tab.on {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
  font-weight: 600;
  box-shadow: inset 0 2px 0 var(--acc) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #propbar {
  background: transparent !important;
  border-bottom: 0 !important;
  padding: 2px 10px !important;
  gap: 8px;
  min-height: 28px;
}

html body.darkbeam.th-claude:not(#_):not(#__) #v32doc {
  color: var(--text2);
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surf);
  border: 1px solid var(--line);
}

html body.darkbeam.th-claude:not(#_):not(#__) #v32doc b {
  color: var(--muted);
  font-weight: 500;
}

/* ---- 5. Dock Panels & Scrollable Tab Strips (Zero Clipping) ---- */
html body.darkbeam.th-claude:not(#_):not(#__) .dock,
html body.darkbeam.th-claude:not(#_):not(#__) .panel,
html body.darkbeam.th-claude:not(#_):not(#__) .pnl,
html body.darkbeam.th-claude:not(#_):not(#__) .dbody {
  background: var(--panel) !important;
  border-color: var(--line) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .dtabs {
  background: var(--bg) !important;
  border-bottom: 1px solid var(--line) !important;
  min-height: 30px !important;
  padding: 0 2px;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  gap: 1px;
}

html body.darkbeam.th-claude:not(#_):not(#__) .dtabs::-webkit-scrollbar {
  display: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) .dtab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px !important;
  border: 0 !important;
  border-radius: 6px 6px 0 0 !important;
  color: var(--muted) !important;
  font-size: 11.5px !important;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.14s ease, color 0.14s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) .dtab:hover {
  background: var(--hov) !important;
  color: var(--text2) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .dtab.on,
html body.darkbeam.th-claude:not(#_):not(#__) .dtab.active {
  background: var(--panel) !important;
  color: var(--text) !important;
  font-weight: 600 !important;
  box-shadow: inset 0 -2px 0 var(--acc) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .dtab .tico {
  color: var(--muted);
  flex: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) .dtab.on .tico {
  color: var(--acc);
}

html body.darkbeam.th-claude:not(#_):not(#__) .dtabs .dbtn {
  flex: none;
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  padding: 0 6px !important;
  border-radius: 5px !important;
  font-size: 11px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .dtabs .dbtn:hover {
  background: var(--hov) !important;
  color: var(--text) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .split {
  background: var(--line) !important;
  transition: background-color 0.15s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) .split:hover,
html body.darkbeam.th-claude:not(#_):not(#__) .split.drag {
  background: var(--acc) !important;
}

/* ---- 6. Measurements Panel (.mtools fixed!) & Tool Chest ---- */
html body.darkbeam.th-claude:not(#_):not(#__) #measPanel .mtools {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center;
  gap: 3px !important;
  padding: 6px !important;
  background: var(--bg-elev) !important;
  border-bottom: 1px solid var(--line) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #measPanel .mtools .mtb {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 0 !important;
  background: var(--surf) !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  overflow: hidden;
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) #measPanel .mtools .mtb:hover {
  border-color: var(--line2) !important;
  background: var(--surf2) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #measPanel .mtools .mtb.on {
  background: var(--acc2) !important;
  border-color: var(--acc) !important;
  box-shadow: 0 0 10px color-mix(in srgb, var(--acc) 22%, transparent) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #measPanel .mtools .mtb > button {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 3px 4px !important;
  height: 24px;
  min-width: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ic) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #measPanel .mtools .mtb > button.mdd {
  padding: 0 3px !important;
  min-width: 13px;
  font-size: 9px !important;
  color: var(--muted) !important;
  border-left: 1px solid color-mix(in srgb, var(--line) 75%, transparent) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #measPanel .mtools .mtb > button.mdd:hover {
  background: var(--hov) !important;
  color: var(--text) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #measPanel .mtools .more {
  background: var(--surf) !important;
  border: 1px solid var(--line) !important;
  border-radius: 6px !important;
  height: 26px;
  padding: 0 7px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #measPanel .mtools .more:hover {
  border-color: var(--acc) !important;
  color: var(--text) !important;
}

/* Section Headers */
html body.darkbeam.th-claude:not(#_):not(#__) :is(.phead, .sec > .sh, .tch) {
  background: var(--bg-elev) !important;
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  color: var(--text2) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  padding: 5px 8px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tcMenu.tcm {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 5px !important;
  padding: 1px 6px !important;
  box-shadow: none !important;
  color: var(--muted) !important;
  font-size: 11px;
}

html body.darkbeam.th-claude:not(#_):not(#__) #tcMenu.tcm:hover {
  background: var(--hov) !important;
  color: var(--text) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .sec .sb {
  padding: 5px 8px !important;
  background: var(--panel) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .fr {
  gap: 5px;
  margin: 2px 0;
  min-height: 22px;
}

html body.darkbeam.th-claude:not(#_):not(#__) #measPanel {
  max-height: 62% !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .fr > label:first-child {
  width: 68px;
  color: var(--muted) !important;
  font-size: 11.5px;
}

html body.darkbeam.th-claude:not(#_):not(#__) .tcsearch {
  padding: 6px !important;
  background: var(--panel) !important;
  border-bottom: 1px solid var(--line) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .tcsearch input {
  height: 26px !important;
  padding: 0 8px !important;
  border-radius: 6px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .tct th {
  background: var(--bg-elev) !important;
  color: var(--muted) !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  padding: 4px 6px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .tct td {
  padding: 4px 6px !important;
  height: 24px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .tcrow.on td {
  background: var(--acc2) !important;
  box-shadow: inset 2px 0 0 var(--acc);
}

/* ---- 7. Modern Form Controls ---- */
html body.darkbeam.th-claude:not(#_):not(#__) :is(
  button:not(.sw2):not([data-col]):not(.mdd):not(.dbtn):not(#dbThemeBtn):not(#clMenuBtn),
  input:not([type="color"]):not([type="checkbox"]):not([type="radio"]):not([type="range"]),
  select,
  textarea,
  .dropb,
  .dashbtn,
  .mlfb
) {
  background: var(--surf) !important;
  color: var(--text) !important;
  border: 1px solid var(--line2) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) :is(input, select, textarea):focus {
  border-color: var(--acc) !important;
  outline: 0 !important;
  box-shadow: 0 0 0 2px var(--acc2) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) :is(button:not(.sw2):not([data-col]):not(.mdd), .dropb, .mlfb):hover {
  background: var(--surf2) !important;
  border-color: color-mix(in srgb, var(--acc) 50%, var(--line2)) !important;
}

/* ---- 8. Canvas & Futuristic Empty-State Hero ---- */
html body.darkbeam.th-claude:not(#_):not(#__) #view,
html body.darkbeam.th-claude:not(#_):not(#__) #splitwrap,
html body.darkbeam.th-claude:not(#_):not(#__) .spane {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--acc) 7%, transparent), transparent 62%),
    linear-gradient(to right, color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 28%, transparent) 1px, transparent 1px),
    var(--page) !important;
  background-size: 100% 100%, 36px 36px, 36px 36px, 100% 100% !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #empty {
  padding: 16px;
  pointer-events: auto;
  overflow-y: auto;
  align-items: safe center;
}

.db-hero {
  max-width: 500px;
  width: 100%;
  padding: 26px 32px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid color-mix(in srgb, var(--acc) 26%, var(--line2));
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.db-hero-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--acc);
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--acc2);
  border: 1px solid color-mix(in srgb, var(--acc) 35%, transparent);
}

.db-hero-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 32px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.1;
}

.db-hero-logo b {
  font-weight: 700;
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.db-orb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: url("icon.png") center / contain no-repeat;
  box-shadow: 0 8px 26px rgba(34, 211, 238, 0.30), 0 0 0 1px rgba(56, 189, 248, 0.22);
  flex: none;
}

.db-hero-sub {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 400px;
}

.db-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
}

html body.darkbeam.th-claude:not(#_):not(#__) .db-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) .db-cta:hover {
  transform: translateY(-1px);
}

html body.darkbeam.th-claude:not(#_):not(#__) .db-cta.pri {
  background: linear-gradient(135deg, #0ea5e9, #2563eb) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.32) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .db-cta.pri:hover {
  box-shadow: 0 10px 28px rgba(56, 189, 248, 0.45) !important;
}

.db-cta kbd {
  font-family: var(--mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
}

.db-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  width: 100%;
  font-size: 11px;
  color: var(--muted);
}

.db-hero-meta span::before {
  content: "◆ ";
  color: var(--acc);
  font-size: 8px;
  vertical-align: 1px;
}

/* ---- 9. Markups List (Crisp Sticky Header, No Native Resize Corners, Tabular Numbers) ---- */
html body.darkbeam.th-claude:not(#_):not(#__) .mltools {
  background: var(--bg-elev) !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 4px 8px !important;
  gap: 5px;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) .mltools::-webkit-scrollbar {
  display: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #mlSearch {
  height: 24px;
  padding: 0 8px;
  width: 135px;
  flex: none;
  border-radius: 6px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .mltools button {
  flex: none;
  height: 24px;
  padding: 0 8px !important;
  font-size: 11.5px !important;
  white-space: nowrap;
}

html body.darkbeam.th-claude:not(#_):not(#__) .mltools button.on {
  background: var(--acc2) !important;
  border-color: var(--acc) !important;
  color: var(--text) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #mlist table {
  border-collapse: separate;
  border-spacing: 0;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

html body.darkbeam.th-claude:not(#_):not(#__) #mlist th[data-c] {
  resize: none !important;
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--bg-elev) !important;
  color: var(--muted) !important;
  border-bottom: 1px solid var(--line2) !important;
  border-right: 1px solid var(--line) !important;
  border-top: 0 !important;
  border-left: 0 !important;
  padding: 6px 8px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em;
}

html body.darkbeam.th-claude:not(#_):not(#__) #mlist tr.mlfilt td {
  background: var(--panel) !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 3px 4px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #mlist tr.mltot.top td {
  background: color-mix(in srgb, var(--acc) 14%, var(--panel)) !important;
  color: var(--text) !important;
  border-bottom: 2px solid var(--acc) !important;
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #mlist tr.mlgrp td {
  background: var(--surf) !important;
  color: var(--text) !important;
  font-weight: 600;
  padding: 5px 8px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #mlist td {
  padding: 4px 8px !important;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent) !important;
  border-right: 1px solid color-mix(in srgb, var(--line) 45%, transparent) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #mlist tr.sel td {
  background: var(--acc2) !important;
  color: var(--text) !important;
  box-shadow: inset 0 1px color-mix(in srgb, var(--acc) 55%, transparent), inset 0 -1px color-mix(in srgb, var(--acc) 55%, transparent) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #mlist tr.sel td:first-child {
  box-shadow: inset 3px 0 0 var(--acc), inset 0 1px color-mix(in srgb, var(--acc) 55%, transparent), inset 0 -1px color-mix(in srgb, var(--acc) 55%, transparent) !important;
}

/* ---- 10. Navigation Bar & Status Telemetry Bar ---- */
html body.darkbeam.th-claude:not(#_):not(#__) #navbar {
  background: var(--bg-elev) !important;
  border-top: 1px solid var(--line) !important;
  height: 32px !important;
  padding: 0 8px !important;
  overflow-x: auto;
  scrollbar-width: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #navbar::-webkit-scrollbar {
  display: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #navbar button {
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 6px !important;
  padding: 3px 5px !important;
  color: var(--ic) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #navbar button:hover {
  background: var(--hov) !important;
  border-color: var(--line2) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #navbar button.on {
  background: var(--acc2) !important;
  border-color: var(--acc) !important;
  color: var(--acc) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #navbar #v32Zoom {
  font-family: var(--mono) !important;
  font-size: 11.5px !important;
  text-align: center;
  height: 24px !important;
  border-radius: 6px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #navbar #v32Page {
  width: clamp(110px, 16vw, 220px) !important;
  max-width: 220px !important;
  height: 24px !important;
  border-radius: 6px !important;
  font-size: 11.5px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #navbar #nbScale {
  font-family: var(--mono);
  font-size: 11.5px !important;
  padding: 2px 9px !important;
  border-radius: 6px !important;
  border: 1px solid color-mix(in srgb, var(--acc) 35%, var(--line2)) !important;
  background: var(--acc2) !important;
  color: var(--acc) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #status {
  background: var(--bg) !important;
  border-top: 1px solid var(--line) !important;
  height: 26px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-variant-numeric: tabular-nums;
  flex-wrap: nowrap !important;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #status::-webkit-scrollbar {
  display: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #stTool {
  font-weight: 600;
  color: var(--acc) !important;
  white-space: nowrap;
  flex: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #stSnap {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #status :is(#stCoord, #stScale, #stSize, #stUnits) {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2) !important;
  flex: none;
}

html body.darkbeam.th-claude:not(#_):not(#__) #status :is(#stGrid, #stSnapGrid, #stReuse, #stSync, #stSeq, #stSnap .snapst) {
  flex: none;
  white-space: nowrap;
  border-radius: 999px !important;
  padding: 1px 9px !important;
  height: 19px;
  font-size: 10.5px !important;
  font-weight: 600;
  border: 1px solid var(--line2) !important;
  background: var(--surf) !important;
  color: var(--muted) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #status :is(#stGrid, #stSnapGrid, #stReuse, #stSync, #stSnap .snapst).on {
  background: var(--acc-solid) !important;
  border-color: var(--acc) !important;
  color: #ffffff !important;
  box-shadow: 0 0 10px var(--acc-glow) !important;
}

/* ---- 11. Glassmorphic Dropdowns, Popovers, Modals & Toasts ---- */
html body.darkbeam.th-claude:not(#_):not(#__) :is(.dd, .sdd, .popmenu, .dashpop) {
  background: var(--glass) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line2) !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 5px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) :is(.dd, .sdd, .popmenu, .dashpop) :is(a, .subhd) {
  border-radius: 6px !important;
  padding: 5px 12px 5px 28px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .popmenu a {
  padding: 5px 14px 5px 10px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) :is(.dd, .sdd, .popmenu, .dashpop) :is(a, .subhd):hover {
  background: var(--acc2) !important;
  color: var(--text) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #modal {
  background: rgba(4, 7, 12, 0.68) !important;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

html body.darkbeam.th-claude:not(#_):not(#__) #modal .box {
  background: var(--bg-elev) !important;
  border: 1px solid var(--line2) !important;
  border-radius: 14px !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 18px 22px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #modal h3 {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--line) !important;
  padding-bottom: 10px !important;
  margin-bottom: 12px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #modal .btns {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

html body.darkbeam.th-claude:not(#_):not(#__) #modal .btns .ok {
  background: linear-gradient(135deg, #0ea5e9, #2563eb) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 5px 16px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #modal .btns .cancel {
  padding: 5px 14px !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) #toast {
  background: var(--glass) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--acc) 45%, var(--line2)) !important;
  border-radius: 10px !important;
  box-shadow: var(--shadow-sm) !important;
  padding: 9px 16px !important;
  font-weight: 500;
}

/* ---- 12. Thumbnails & Scrollbars ---- */
html body.darkbeam.th-claude:not(#_):not(#__) .thumb {
  border-radius: 9px !important;
  padding: 6px !important;
  background: var(--surf) !important;
  border: 1px solid var(--line) !important;
  transition: border-color 0.14s ease, transform 0.12s ease, box-shadow 0.14s ease;
}

html body.darkbeam.th-claude:not(#_):not(#__) .thumb:hover {
  border-color: var(--line2) !important;
  transform: translateY(-1px);
}

html body.darkbeam.th-claude:not(#_):not(#__) .thumb.cur {
  border: 2px solid var(--acc) !important;
  background: var(--acc2) !important;
  box-shadow: 0 0 14px color-mix(in srgb, var(--acc) 22%, transparent) !important;
}

html body.darkbeam.th-claude:not(#_):not(#__) .thumb canvas {
  border-radius: 4px;
}

html body.darkbeam.th-claude:not(#_):not(#__) ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

html body.darkbeam.th-claude:not(#_):not(#__) ::-webkit-scrollbar-thumb {
  background: var(--line2);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

html body.darkbeam.th-claude:not(#_):not(#__) ::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
  border: 2px solid transparent;
  background-clip: padding-box;
}

/* ---- 13. Futuristic Precision Vector Icon Styling (.dbico / .i4) ---- */
svg.dbico,
svg.tcprev svg.i4 {
  overflow: visible;
}

svg.dbico .db-s,
svg.tcprev svg.i4 .db-s {
  stroke: currentColor;
  fill: none;
}

svg.dbico .db-a,
svg.tcprev svg.i4 .db-a {
  stroke: var(--acc, #38bdf8);
  fill: none;
}

svg.dbico .db-af,
svg.tcprev svg.i4 .db-af {
  fill: var(--acc, #38bdf8);
  fill-opacity: 0.17;
  stroke: none;
}

svg.dbico .db-as,
svg.tcprev svg.i4 .db-as {
  fill: var(--acc, #38bdf8);
  stroke: none;
}

svg.dbico .db-w,
svg.tcprev svg.i4 .db-w {
  stroke: var(--warn, #fbbf24);
  fill: none;
}

svg.dbico .db-wf,
svg.tcprev svg.i4 .db-wf {
  fill: var(--warn, #fbbf24);
  fill-opacity: 0.16;
  stroke: none;
}

svg.dbico .db-mf,
svg.tcprev svg.i4 .db-mf {
  fill: #818cf8;
  fill-opacity: 0.22;
  stroke: none;
}

svg.dbico .db-n,
svg.tcprev svg.i4 .db-n {
  fill: var(--bg, #080b10);
  stroke: var(--acc, #38bdf8);
  stroke-width: 1.5;
}

svg.dbico .db-d,
svg.tcprev svg.i4 .db-d {
  stroke: var(--acc, #38bdf8);
  stroke-width: 1;
  stroke-dasharray: 1.8 1.6;
  fill: none;
}

svg.dbico .db-txt,
svg.tcprev svg.i4 .db-txt {
  fill: var(--acc, #38bdf8);
  stroke: none;
  font-family: var(--mono, Consolas, monospace);
  font-size: 6.2px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* Subtle luminous hover & active glow on futuristic icons */
html body.darkbeam.th-claude:not(#_):not(#__) :is(#toolbar button:hover, #measPanel .mtb:hover, #navbar button:hover) svg.dbico {
  filter: drop-shadow(0 0 4px var(--acc-glow));
}

html body.darkbeam.th-claude:not(#_):not(#__) :is(#toolbar button.on, #measPanel .mtb.on, #navbar button.on) svg.dbico {
  filter: drop-shadow(0 0 6px var(--acc-glow));
}

