/* ================================================================
   LUZOcrm — luzokit.css  v2.0
   Shell único: reset, tokens, layout, topbar, nav, popups.
   NO contiene CSS de módulos (ag-*, p360-*, fc-*, etc.)
================================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0 }
html, body { height: 100% }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
}
a { color: var(--c-brand); text-decoration: none }
a:hover { opacity: .8 }

/* ── Font scale ── */
:root[data-font="sm"] { font-size: 13px }
:root[data-font="md"] { font-size: 14px }
:root[data-font="lg"] { font-size: 15px }

/* ── Tokens — light (default) ── */
:root {
  --accent:       #6d28d9;
  --accent-lt:    rgba(109,40,217,.10);
  --accent-bd:    rgba(109,40,217,.20);
  --accent-hov:   rgba(109,40,217,.85);

  /* Aliases usados por módulos legacy */
  --c-brand:      var(--accent);
  --c-brand-lt:   var(--accent-lt);
  --c-brand-bd:   var(--accent-bd);
  --c-brand-hov:  var(--accent-hov);
  --tx-blue:      var(--accent);
  --tx-blue-lt:   var(--accent-lt);
  --tx-blue-bd:   var(--accent-bd);
  --tx-blue-hover:var(--accent-hov);
  --lk-brand:     var(--accent);
  --lk-brand-lt:  var(--accent-lt);
  --lk-brand-bd:  var(--accent-bd);
  --luzo-accent:  var(--accent);
  --luzo-accent-light:  var(--accent-lt);
  --luzo-accent-border: var(--accent-bd);

  --tx-text:     #0f172a;
  --tx-muted:    #64748b;
  --tx-line:     #e2e8f0;
  --tx-surface:  #f8fafc;
  --tx-surface-2:#f1f5f9;
  --tx-green:    #16a34a;
  --tx-red:      #dc2626;
  --tx-amber:    #b45309;
  --tx-purple:   var(--accent);

  --bg-body:     #f1f5f9;
  --bg-sidebar:  #ffffff;
  --bg-topbar:   rgba(255,255,255,.92);
  --bg-card:     #ffffff;

  --sb-width:    220px;
  --top-h:       52px;
  --footer-h:    32px;
  --radius:      10px;
}

:root[data-theme="dark"] {
  --tx-text:     #e2e8f0;
  --tx-muted:    #94a3b8;
  --tx-line:     rgba(255,255,255,.10);
  --tx-surface:  #1e2435;
  --tx-surface-2:#252d3d;
  --bg-body:     #111827;
  --bg-sidebar:  #1a2030;
  --bg-topbar:   rgba(26,32,48,.94);
  --bg-card:     #1e2435;
}

:root[data-theme="midnight"] {
  --tx-text:     #e2e8f0;
  --tx-muted:    #8b949e;
  --tx-line:     rgba(255,255,255,.08);
  --tx-surface:  #0d1117;
  --tx-surface-2:#161b22;
  --bg-body:     #0a0d14;
  --bg-sidebar:  #0d1117;
  --bg-topbar:   rgba(13,17,23,.97);
  --bg-card:     #161b22;
}

/* ── Utilidades ── */
.hidden { display: none !important }

/* ── Shell ── */
#lz-shell {
  display: flex;
  flex: 1;
  min-height: 0;
  background: var(--bg-body);
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════
   UL0 — Rail 52px
═══════════════════════════════════════════════════════ */
.ul0-rail {
  width: 52px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--tx-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  z-index: 100;
  position: relative;
}

.ul0-logo-area {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 6px 0 10px;
}

.ul0-logo-mini {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  cursor: pointer;
}

/* Logo flotante expandido */
.ul0-logo-full {
  position: absolute;
  left: 52px; top: 0;
  height: 52px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  text-decoration: none;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s;
  z-index: 10;
}
:root:not(.ul-collapsed) .ul0-logo-full { pointer-events: auto; opacity: 1 }

.logo-full-name { font-size: 14px; font-weight: 800; color: var(--tx-text); letter-spacing: -.03em }
.logo-full-ver  { font-size: 10px; color: var(--tx-muted) }

/* Grupos */
.ul0-groups {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  padding: 0 6px;
}

.ul0-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx-muted);
  transition: background .13s, color .13s;
  position: relative;
}
.ul0-btn:hover     { background: var(--accent-lt); color: var(--accent) }
.ul0-btn.ul0-active{ background: var(--accent-lt); color: var(--accent) }
.ul0-btn-bg        { display: none }
.ul0-btn-ico svg   { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }

/* Sistema */
.ul0-system {
  width: 100%;
  padding: 6px 6px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.ul0-expand-btn {
  width: 40px; height: 36px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  color: var(--tx-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .13s, color .13s;
}
.ul0-expand-btn:hover { background: var(--accent-lt); color: var(--accent) }
.ul0-expand-btn svg   { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; transition: transform .2s }
:root:not(.ul-collapsed) .ul0-expand-btn svg { transform: rotate(180deg) }

/* Tooltip */
.ul0-tooltip {
  position: fixed;
  left: 58px;
  background: #0f172a;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  opacity: 0;
  transition: opacity .12s;
}
.ul0-tooltip.is-visible { opacity: 1 }

/* ═══════════════════════════════════════════════════════
   UL1 — Panel 210px
═══════════════════════════════════════════════════════ */
.ul1-panel {
  width: 210px;
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--tx-line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width .2s ease, opacity .18s;
}
:root.ul-collapsed .ul1-panel { width: 0; opacity: 0; pointer-events: none }

.ul1-logo-spacer { height: 52px; flex-shrink: 0 }

.ul1-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 8px 8px 0;
}
.ul1-scroll::-webkit-scrollbar { display: none }

.ul1-section        { margin-bottom: 12px }
.ul1-section-label  {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--tx-muted);
  padding: 0 8px 5px;
}

.ul1-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-radius: 9px;
  min-height: 40px;
  font-size: 13.3px;
  font-weight: 500;
  color: var(--tx-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background .12s, color .12s;
  white-space: nowrap;
  overflow: hidden;
}
.ul1-item:hover    { background: rgba(109,40,217,.06); color: var(--tx-text) }
.ul1-item.is-active{ background: var(--accent-lt); color: var(--accent); font-weight: 650 }
.ul1-item.is-soon  { opacity: .55; cursor: default }
.ul1-item.is-soon:hover { background: transparent; color: var(--tx-muted) }

.ul1-item-ico { width: 22px; height: 22px; flex-shrink: 0; display: grid; place-items: center }
.ul1-item-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }
.ul1-item-label { flex: 1 }

/* Badge pronto */
.badge-soon {
  flex-shrink: 0;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  background: rgba(100,116,139,.10);
  color: var(--tx-muted);
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: auto;
}

/* ═══════════════════════════════════════════════════════
   TX-MAIN
═══════════════════════════════════════════════════════ */
.tx-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Topbar ── */
.tx-top {
  height: var(--top-h);
  background: var(--bg-topbar);
  border-bottom: 1px solid var(--tx-line);
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 16px;
  backdrop-filter: saturate(120%) blur(8px);
  flex-shrink: 0;
  z-index: 40;
}

.top-hello  { flex-shrink: 0; min-width: 0 }
.top-greet  { font-size: 12.5px; font-weight: 700; color: var(--tx-text); white-space: nowrap }
.top-sub    { font-size: 11px; color: var(--tx-muted); white-space: nowrap }
.top-sub strong { color: var(--tx-text); font-weight: 600 }

.top-center { flex: 1; max-width: 480px; margin: 0 auto; position: relative; z-index: 500 }

.top-right  { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto }

.top-clock  { text-align: right }
.top-date   { font-size: 10.5px; color: var(--tx-muted); white-space: nowrap }
.top-time   { font-size: 12px; font-weight: 700; color: var(--tx-text); letter-spacing: -.02em }

/* ── Spotlight ── */
.spotlight { position: relative; width: 100% }
.spotlight-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--tx-surface);
  border: 1.5px solid var(--tx-line);
  border-radius: 10px;
  padding: 0 10px;
  height: 34px;
  transition: border-color .15s, box-shadow .15s;
}
.spotlight-bar:focus-within {
  border-color: var(--accent-bd);
  box-shadow: 0 0 0 3px var(--accent-lt);
}
.spotlight-ico { display: flex; color: var(--tx-muted); flex-shrink: 0 }
.spotlight-ico svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round }
.spotlight-input {
  flex: 1; border: none; background: transparent;
  font-size: 12.5px; color: var(--tx-text); outline: none; font-family: inherit;
}
.spotlight-input::placeholder { color: var(--tx-muted) }
.spotlight-kbd {
  font-size: 10px; color: var(--tx-muted);
  background: var(--tx-surface-2); border: 1px solid var(--tx-line);
  border-radius: 5px; padding: 2px 6px; flex-shrink: 0;
}
.spotlight-drop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--bg-card); border: 1.5px solid var(--tx-line);
  border-radius: 12px; box-shadow: 0 8px 32px rgba(15,23,42,.12);
  max-height: 360px; overflow-y: auto; z-index: 500; display: none;
}
.spotlight-drop.is-open { display: block }

/* ── Icon button ── */
.icon-btn {
  width: 34px; height: 34px;
  border: none; background: transparent; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--tx-muted); transition: background .13s, color .13s;
  position: relative;
}
.icon-btn:hover { background: var(--tx-surface-2); color: var(--tx-text) }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }

.notif-badge {
  position: absolute; top: 4px; right: 4px;
  min-width: 16px; height: 16px;
  background: var(--tx-red); color: #fff;
  border-radius: 999px; font-size: 9px; font-weight: 800;
  display: grid; place-items: center; padding: 0 3px;
  border: 2px solid var(--bg-topbar);
}
.notif-badge:empty { display: none }

/* ── Avatar ── */
.avatar-btn {
  width: 32px; height: 32px;
  border-radius: 50%; border: none;
  cursor: pointer; background: var(--accent);
  overflow: hidden; padding: 0; flex-shrink: 0;
}
.avatar-photo   { width: 100%; height: 100%; object-fit: cover; border-radius: 50% }
.avatar-letters {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800; color: #fff; border-radius: 50%;
}

/* ── Popups ── */
.pop-anchor { position: relative }
.pop {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--bg-card); border: 1.5px solid var(--tx-line);
  border-radius: 14px; box-shadow: 0 8px 32px rgba(15,23,42,.13);
  min-width: 200px; z-index: 9500; padding: 8px;
  display: none;
}
.pop.open { display: block }

.pop-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--tx-muted); padding: 4px 8px 8px;
}
.pop-sub {
  font-size: 10.5px; font-weight: 600; color: var(--tx-muted);
  padding: 4px 8px; text-transform: uppercase; letter-spacing: .06em;
}
.pop-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px; border: none;
  background: transparent; border-radius: 9px; cursor: pointer;
  font-size: 13px; color: var(--tx-text); font-family: inherit;
  text-align: left; transition: background .12s;
}
.pop-btn:hover       { background: var(--tx-surface-2) }
.pop-btn--danger     { color: var(--tx-red) }
.pop-btn--danger:hover { background: rgba(220,38,38,.07) }
.pop-btn-ico { width: 16px; height: 16px; display: grid; place-items: center; color: var(--tx-muted); flex-shrink: 0 }
.pop-btn-ico svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round }
.pop-sep { height: 1px; background: var(--tx-line); margin: 6px 0 }

/* User pop */
.user-pop  { min-width: 230px }
.user-name { font-size: 14px; font-weight: 700; color: var(--tx-text) }
.user-email{ font-size: 11.5px; color: var(--tx-muted); margin-top: 2px }
.user-role {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; padding: 3px 8px; border-radius: 999px;
  margin-top: 6px; background: var(--accent-lt); color: var(--accent);
  display: inline-block;
}

/* Theme switcher */
.theme-opt {
  display: flex; align-items: center; gap: 8px;
  width: 100%; padding: 7px 10px; border: none;
  background: transparent; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--tx-text); font-family: inherit;
  text-align: left; transition: background .12s;
}
.theme-opt:hover { background: var(--tx-surface-2) }
.theme-opt svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; color: var(--tx-muted) }
.theme-opt-chk { margin-left: auto; font-size: 12px; color: var(--accent); font-weight: 700 }

/* Font segmented */
.font-seg {
  display: flex; gap: 2px; background: var(--tx-surface-2);
  border-radius: 8px; padding: 2px; margin: 4px 8px;
}
.font-seg button {
  flex: 1; padding: 5px; border: none; background: transparent;
  border-radius: 6px; cursor: pointer; font-size: 12px; font-weight: 600;
  color: var(--tx-muted); font-family: inherit; transition: all .12s;
}
.font-seg button.is-active,
.font-seg button:hover {
  background: var(--bg-card); color: var(--accent);
  box-shadow: 0 1px 4px rgba(15,23,42,.08);
}

/* Notif popup */
.nf-pop-wrap    { display: flex; flex-direction: column }
.nf-pop-header  { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; border-bottom: 1px solid var(--tx-line) }
.nf-pop-htitle  { font-size: 12px; font-weight: 700; color: var(--tx-text); display: flex; align-items: center; gap: 7px }
.nf-count-pill  { background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 20px }
.nf-pop-list    { display: flex; flex-direction: column; max-height: 320px; overflow-y: auto; padding: 4px 0 }
.nf-pop-item    { display: flex; align-items: flex-start; gap: 10px; padding: 9px 12px; background: none; border: none; cursor: pointer; text-align: left; transition: background .12s; width: 100%; border-radius: 8px }
.nf-pop-item:hover { background: var(--accent-lt) }
.nf-pop-footer  { display: flex; gap: 6px; padding: 8px 12px; border-top: 1px solid var(--tx-line) }
.nf-pop-act     { flex: 1; padding: 6px 10px; border-radius: 8px; border: none; cursor: pointer; font-size: 11px; font-weight: 600; background: var(--bg-body); color: var(--tx-muted); transition: background .12s }
.nf-pop-act:hover { background: var(--accent-lt); color: var(--tx-text) }
.nf-pop-act--primary { background: var(--accent) !important; color: #fff !important }
.ap-empty { padding: 24px 16px; text-align: center; font-size: 12px; color: var(--tx-muted) }

/* ── Content ── */
.tx-content {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  flex: 1;
  display: flex;
  flex-direction: column;
}
#moduleContent { height: 100%; overflow: hidden }

/* ── Footer ── */
.tx-footer {
  height: var(--footer-h);
  border-top: 1px solid var(--tx-line);
  display: flex; align-items: center;
  padding: 0 16px; gap: 8px;
  font-size: 10.5px; color: var(--tx-muted);
  flex-shrink: 0; background: var(--bg-topbar);
}
.tx-footer a { color: var(--tx-muted); transition: color .12s }
.tx-footer a:hover { color: var(--tx-text) }
.footer-sep    { color: var(--tx-line) }
.footer-spacer { flex: 1 }
.footer-powered { font-size: 10px }
.footer-powered a { color: var(--accent) }

/* ── Spotlight overlay ── */
.sp-overlay {
  position: fixed; inset: 0; z-index: 9800;
  background: rgba(0,0,0,.25);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 15vh;
  opacity: 0; pointer-events: none;
  transition: opacity .18s;
}
.sp-overlay.open { opacity: 1; pointer-events: auto }
.sp-modal {
  width: min(560px, 92vw);
  background: var(--bg-card);
  border-radius: 16px;
  border: 1px solid var(--tx-line);
  box-shadow: 0 20px 50px rgba(15,23,42,.20);
  overflow: hidden;
  transform: translateY(8px) scale(.97);
  transition: transform .2s cubic-bezier(.22,.68,0,1.12);
}
.sp-overlay.open .sp-modal { transform: none }
.sp-modal-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-bottom: 1px solid var(--tx-line);
}
.sp-modal-bar svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent); stroke-width: 2 }
.sp-modal-input {
  flex: 1; border: none; background: transparent; outline: none;
  font-size: 16px; font-weight: 500; color: var(--tx-text); font-family: inherit;
}
.sp-modal-input::placeholder { color: var(--tx-muted); font-weight: 400 }
.sp-modal-esc {
  font-size: 10px; font-weight: 700; color: var(--tx-muted);
  background: var(--tx-surface-2); border: 1px solid var(--tx-line);
  padding: 2px 7px; border-radius: 5px; font-family: inherit;
}
.sp-modal-results { max-height: 360px; overflow-y: auto; padding: 6px 0 }
.sp-grp { padding: 10px 18px 4px; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--tx-muted) }
.sp-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; margin: 0 4px; border-radius: 10px;
  cursor: pointer; border: 1px solid transparent; transition: background .08s;
}
.sp-row:hover { background: var(--tx-line) }
.sp-row.on    { background: var(--accent-lt); color: var(--accent); border-color: var(--accent-bd) }
.sp-row-ico   { width: 30px; height: 30px; border-radius: 8px; background: var(--tx-surface-2); border: 1px solid var(--tx-line); display: grid; place-items: center; flex-shrink: 0 }
.sp-row-ico svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round }
.sp-row.on .sp-row-ico { background: var(--accent-lt); border-color: var(--accent-bd); color: var(--accent) }
.sp-row-label  { font-size: 13px; font-weight: 550; color: var(--tx-text) }
.sp-row.on .sp-row-label { color: var(--accent) }
.sp-modal-foot {
  padding: 8px 18px; border-top: 1px solid var(--tx-line);
  display: flex; align-items: center; gap: 14px;
  font-size: 10px; color: var(--tx-muted);
}
.sp-modal-foot kbd { font-size: 9px; font-weight: 700; background: var(--tx-surface-2); border: 1px solid var(--tx-line); padding: 1px 4px; border-radius: 3px; font-family: inherit }

/* ── Blade dimmer (no taskbar) ── */
.ld-dimmer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.40);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.ld-dimmer.on {
  opacity: 1;
  pointer-events: all;
}
.ld-dimmer.on { opacity: 1; visibility: visible; pointer-events: auto }

/* ── Módulo base ── */
.mod-page    { display: flex; height: 100%; overflow: hidden }
.mod-left    { flex-shrink: 0; overflow-y: auto; scrollbar-width: none }
.mod-left::-webkit-scrollbar { display: none }
.mod-right   { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden }
.mod-toolbar { display: flex; align-items: center; gap: 8px; padding: 0 16px; min-height: 52px; border-bottom: 1px solid var(--tx-line); flex-shrink: 0 }
.mod-board   { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column }

/* ── Animación módulo ── */
@keyframes mod-fade-in {
  from { opacity: 0; transform: translateY(4px) }
  to   { opacity: 1; transform: translateY(0) }
}

/* ── Responsive ── */
@media(max-width:768px) {
  .top-hello, .top-clock { display: none }
  .ul0-rail, .ul1-panel  { display: none }
  .tx-top { padding: 0 12px }
}

/* ── Compatibilidad módulos legacy ── */
.lz-btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; background: var(--accent); color: #fff;
  border: none; border-radius: 9px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: inherit; transition: opacity .13s;
}
.lz-btn-primary:hover { opacity: .88 }

.ld-blade {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 540px;
  max-width: 92vw;
  background: var(--bg-card, #1c1b2e);
  border-left: 1px solid rgba(255,255,255,0.07);
  box-shadow: -12px 0 48px rgba(0,0,0,0.45);
  z-index: 9100;
  transform: translateX(100%);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ld-blade.open {
  transform: translateX(0);
}
.ld-blade-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}
.ld-blade-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--tx-text, #e2e0f0);
  letter-spacing: -0.01em;
}
.ld-blade-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ── Staff inline panel — scoped inside .tx-content (position:absolute) ── */
.st-side-panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 480px;
  max-width: 100%;
  background: var(--bg-card, #1c1b2e);
  border-left: 1px solid rgba(255,255,255,0.07);
  box-shadow: -4px 0 24px rgba(0,0,0,0.28);
  z-index: 10;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.st-side-panel.open {
  transform: translateX(0);
}
.st-panel-dimmer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s;
}
.st-panel-dimmer.on {
  opacity: 1;
  pointer-events: all;
}