/* ========================================================= */
/* SCOPE WORK GRID — TOP BAR, BRAND & SETTINGS MENU          */
/* ========================================================= */

.scope-frame {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 90px);
  min-height: calc(100dvh - 90px);
  background: var(--main-bg-2, var(--sg-bg, #0b1120));
  color: var(--ink, var(--sg-text, #e2e8f0));
  font-family: Outfit, -apple-system, BlinkMacSystemFont, sans-serif;
  transition: background 0.25s ease, color 0.25s ease;
}
.scope-frame > .scope-grid-app,
.scope-frame > #scopeAppContainer {
  flex: 1 1 auto;
}

.scope-frame .top {
  position: sticky;
  top: 72px;
  z-index: 200;
  background: var(--toolbar-bg, rgba(15, 23, 42, 0.96));
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  padding: 10px 24px;
  backdrop-filter: blur(16px);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.scope-frame .top-in {
  max-width: 1600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.scope-brand-area {
  display: flex;
  align-items: center;
  gap: 12px;
}
.scope-brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--accent-soft, rgba(45, 212, 191, 0.12));
  border: 1px solid var(--warm-line, rgba(45, 212, 191, 0.25));
}
.scope-brand-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.scope-brand-text {
  display: flex;
  flex-direction: column;
}
.scope-brand-h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink, #fff);
}
.scope-beta-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--amber-soft, rgba(245, 158, 11, 0.2));
  color: var(--amber, #fbbf24);
  letter-spacing: 0.05em;
}
.scope-brand-meta {
  font-size: 11px;
  color: var(--muted, #94a3b8);
  display: flex;
  align-items: center;
  gap: 8px;
}
.scope-sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--accent, #2dd4bf);
}
.scope-sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #2dd4bf);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Actions in top bar */
.scope-top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.scope-top-actions .btn {
  white-space: nowrap !important;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.scope-top-actions .btn-main {
  background: var(--btn-main-grad, #0073ea);
  color: var(--btn-main-ink, #ffffff);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 14px var(--accent-soft, rgba(0, 115, 234, 0.35));
}
.scope-top-actions .btn-main:hover {
  background: var(--btn-main-grad-hover, #0060c4);
  color: var(--btn-main-ink, #ffffff);
}
.scope-top-actions .btn-ghost {
  background: var(--surface-2, rgba(255, 255, 255, 0.06));
  color: var(--ink-2, #cbd5e1);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
}
.scope-top-actions .btn-ghost:hover {
  background: var(--warm-soft, rgba(255, 255, 255, 0.12));
  border-color: var(--warm-line, rgba(255, 255, 255, 0.12));
  color: var(--ink, #fff);
}

.sg-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.sg-search-wrap i {
  position: absolute;
  left: 11px;
  color: var(--muted, #94a3b8);
  font-size: 13px;
  pointer-events: none;
}
.sg-search-input {
  background: var(--surface-2, rgba(15, 23, 42, 0.6));
  border: 1px solid var(--line, rgba(255, 255, 255, 0.14));
  border-radius: 8px;
  padding: 7px 12px 7px 32px;
  color: var(--ink, #f8fafc);
  font-size: 13px;
  font-family: inherit;
  width: 180px;
  outline: none;
  transition: width 0.2s ease, border-color 0.2s ease;
}
.sg-search-input:focus {
  width: 240px;
  border-color: var(--accent, #0073ea);
  box-shadow: 0 0 0 3px var(--accent-soft, transparent);
}

/* Settings Gear Button & Dropdown */
.sg-settings-wrap {
  position: relative;
  display: inline-block;
}
.sg-settings-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.14));
  background: var(--surface-2, rgba(255, 255, 255, 0.06));
  color: var(--ink, #e2e8f0);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 16px;
}
.sg-settings-btn:hover {
  background: var(--accent-soft, rgba(255, 255, 255, 0.14));
  color: var(--accent, #fff);
  border-color: var(--accent);
  transform: rotate(30deg);
}

.sg-settings-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  max-width: min(420px, calc(100vw - 24px));
  max-height: min(80vh, 720px);
  background: var(--surface, #111a2e);
  border: 1px solid var(--line-strong, rgba(255, 255, 255, 0.16));
  border-radius: 12px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line-2, rgba(255, 255, 255, 0.08));
  padding: 12px;
  z-index: 99999 !important;
  display: none;
  flex-direction: column;
  gap: 6px;
  animation: popDown 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.sg-settings-menu.sg-settings-menu--wide {
  width: 420px;
}
.sg-settings-menu:not([hidden]),
.sg-settings-menu.open {
  display: flex !important;
}
.sg-settings-menu[hidden] {
  display: none !important;
}

.sg-settings-tabs {
  display: flex;
  gap: 4px;
  padding: 2px;
  margin: -2px 0 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}
.sg-settings-tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.sg-settings-tab:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}
.sg-settings-tab.is-on {
  color: #e0f2fe;
  background: rgba(45, 212, 191, 0.16);
  box-shadow: inset 0 0 0 1px rgba(45, 212, 191, 0.28);
}
.sg-settings-panel {
  display: none;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}
.sg-settings-panel.is-on {
  display: flex;
}
.sg-registru-mount {
  min-height: 0;
}
.sg-registru {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 4px;
}
.sg-registru-stats {
  margin: 0 !important;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.sg-registru .scope-cloud-box {
  margin: 0;
}
.sg-registru .scope-cloud-box h4 {
  margin: 0 0 6px;
  font-size: 13px;
}
.sg-registru .scope-cloud-box p {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.4;
}
.sg-registru-file-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sg-registru-file-actions .btn {
  width: 100%;
  justify-content: center;
}
.sg-settings-registru-hint{
  margin: 4px 2px 10px;
  font-size: 12px;
  line-height: 1.4;
  color: #94a3b8;
}

/* Registru slide-over drawer */
.sg-drawer-veil{
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(2, 8, 20, 0.55);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.sg-drawer-veil.open{
  opacity: 1;
  pointer-events: auto;
}
.sg-drawer-veil[hidden]{ display: none !important; }
.sg-drawer-veil.open[hidden]{ display: flex !important; }
.sg-drawer{
  width: min(440px, 100vw);
  height: 100%;
  background: #111a2e;
  border-left: 1px solid rgba(255,255,255,0.1);
  box-shadow: -18px 0 48px rgba(0,0,0,0.45);
  display: flex;
  flex-direction: column;
  transform: translateX(16px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.sg-drawer-veil.open .sg-drawer{ transform: translateX(0); }
.sg-drawer-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.sg-drawer-head h3{
  margin: 0;
  font-family: Outfit, sans-serif;
  font-size: 1.2rem;
  font-weight: 750;
  color: #f8fafc;
  letter-spacing: -0.02em;
}
.sg-drawer-sub{
  margin: 4px 0 0;
  font-size: 12px;
  color: #94a3b8;
}
.sg-drawer-close{
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: #e2e8f0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.sg-drawer-close:hover{
  background: rgba(255,255,255,0.1);
  color: #fff;
}
.sg-drawer-body{
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 28px;
  overscroll-behavior: contain;
}
.sg-drawer-body .sg-registru-stats{
  margin-bottom: 4px !important;
}
body.sg-drawer-open{ overflow: hidden; }

@keyframes popDown {
  from { opacity: 0; transform: translateY(-8px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.sg-menu-head {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 4px 8px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sg-theme-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.12s ease;
  width: 100%;
}
.sg-theme-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.sg-theme-option.active {
  background: rgba(0, 115, 234, 0.2);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.35);
}
.sg-theme-opt-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sg-theme-dot {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.sg-theme-opt-desc {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted, #94a3b8);
}
.sg-theme-accent-label {
  font-size: 10px;
  color: var(--accent, #2dd4bf);
}
.sg-menu-footer {
  margin-top: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-left: 6px;
  padding-right: 6px;
}

/* Status Picker Popover */
.status-picker-popover {
  position: absolute;
  z-index: 99999;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 200px;
}
.pop-status-item {
  padding: 9px 14px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: filter 0.12s ease;
  user-select: none;
}
.pop-status-item:hover {
  filter: brightness(1.14);
}

/* Daylight / Mist Top Bar overrides (match on frame itself) */
.scope-frame[data-theme="daylight"] .top,
.scope-frame[data-theme="mist"] .top,
[data-theme="daylight"] .scope-frame .top,
[data-theme="mist"] .scope-frame .top {
  background: rgba(255, 255, 255, 0.95);
  border-bottom-color: #e6e9ef;
}
.scope-frame[data-theme="daylight"] .scope-brand-h1,
.scope-frame[data-theme="mist"] .scope-brand-h1,
[data-theme="daylight"] .scope-brand-h1,
[data-theme="mist"] .scope-brand-h1 {
  color: #1f2328;
}
.scope-frame[data-theme="daylight"] .scope-brand-meta,
.scope-frame[data-theme="mist"] .scope-brand-meta,
[data-theme="daylight"] .scope-brand-meta,
[data-theme="mist"] .scope-brand-meta {
  color: #676879;
}
[data-theme="daylight"] .sg-settings-btn, [data-theme="mist"] .sg-settings-btn {
  background: #ffffff;
  border-color: #c3c6d4;
  color: #323338;
}
[data-theme="daylight"] .sg-settings-btn:hover, [data-theme="mist"] .sg-settings-btn:hover {
  background: #f5f6f8;
}
[data-theme="daylight"] .sg-settings-menu, [data-theme="mist"] .sg-settings-menu {
  background: #ffffff;
  border-color: #e6e9ef;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.15);
}
[data-theme="daylight"] .sg-menu-head, [data-theme="mist"] .sg-menu-head {
  color: #676879;
  border-bottom-color: #e6e9ef;
}
[data-theme="daylight"] .sg-theme-option, [data-theme="mist"] .sg-theme-option {
  color: #323338;
}
[data-theme="daylight"] .sg-theme-option:hover, [data-theme="mist"] .sg-theme-option:hover {
  background: #f0f3f8;
}
[data-theme="daylight"] .sg-theme-option.active, [data-theme="mist"] .sg-theme-option.active {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #7dd3fc;
}
[data-theme="daylight"] .sg-menu-footer, [data-theme="mist"] .sg-menu-footer {
  border-top-color: #e6e9ef;
  color: #676879;
}
[data-theme="daylight"] .scope-top-actions .btn-ghost, [data-theme="mist"] .scope-top-actions .btn-ghost {
  background: #f5f6f8;
  border-color: #c3c6d4;
  color: #323338;
}
[data-theme="daylight"] .scope-top-actions .btn-ghost:hover, [data-theme="mist"] .scope-top-actions .btn-ghost:hover {
  background: #e6e9ef;
}
[data-theme="daylight"] .status-picker-popover, [data-theme="mist"] .status-picker-popover {
  background: #ffffff;
  border-color: #e6e9ef;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}


/* Scope Grid Architecture Variables */
    :root {
      --sg-blue: #0073ea;
      --sg-green: #00c875;
      --sg-orange: #fdab3d;
      --sg-red: #e2445c;
      --sg-purple: #a25ddc;
      --sg-cyan: #06b6d4;
      --sg-teal: #2dd4bf;
      --sg-amber: #f59e0b;
      --sg-gray: #c4c4c4;
    }

    * { box-sizing: border-box; }
    body.scope-grid-showcase {
      margin: 0;
      padding: 0;
      background: #0b1120;
      color: #e2e8f0;
      font-family: Outfit, -apple-system, BlinkMacSystemFont, sans-serif;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    /* Top Showcase Bar */
    .showcase-header {
      background: rgba(15, 23, 42, 0.95);
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      padding: 16px 24px;
      position: sticky;
      top: 0;
      z-index: 1000;
      backdrop-filter: blur(16px);
    }
    .showcase-header-in {
      max-width: 1540px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      flex-wrap: wrap;
    }
    .showcase-title {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .showcase-title img {
      width: 32px;
      height: 32px;
      border-radius: 8px;
    }
    .showcase-title h1 {
      margin: 0;
      font-size: 20px;
      font-weight: 800;
      letter-spacing: -0.02em;
      color: #fff;
    }
    .showcase-title .badge {
      background: linear-gradient(135deg, #0073ea, #2dd4bf);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 999px;
      letter-spacing: 0.05em;
      text-transform: uppercase;
    }
    .showcase-desc {
      font-size: 13px;
      color: #94a3b8;
      margin: 0;
    }

    /* Theme Switcher Segmented Control in Top Bar */
    .theme-selector-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      background: rgba(0, 0, 0, 0.4);
      padding: 4px;
      border-radius: 12px;
      border: 1px solid rgba(255, 255, 255, 0.08);
    }
    .theme-opt-btn {
      appearance: none;
      background: transparent;
      border: 1px solid transparent;
      color: #94a3b8;
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      padding: 7px 14px;
      border-radius: 8px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: all 0.2s ease;
    }
    .theme-opt-btn:hover {
      color: #fff;
      background: rgba(255, 255, 255, 0.05);
    }
    .theme-opt-btn.active {
      background: #0073ea;
      color: #ffffff;
      box-shadow: 0 4px 14px rgba(0, 115, 234, 0.35);
    }
    .theme-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
    }

    .btn-return {
      color: #94a3b8;
      text-decoration: none;
      font-size: 13px;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 6px;
      padding: 6px 12px;
      border-radius: 8px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      transition: all 0.15s ease;
    }
    .btn-return:hover {
      color: #fff;
      border-color: rgba(255, 255, 255, 0.25);
    }

    /* Container for the Unified App Stage */
    .app-stage-wrapper {
      flex: 1;
      max-width: 1540px;
      width: 100%;
      margin: 20px auto 48px;
      padding: 0 20px;
    }
    .app-viewport-card {
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.08);
      transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* ========================================================= */
    /* UNIFIED SCOPE GRID APPLICATION (SHARED ENGINE)            */
    /* ========================================================= */

    .scope-grid-app {
      display: flex;
      flex: 1 1 auto;
      min-height: calc(100vh - 120px);
      min-height: calc(100dvh - 120px);
      align-items: stretch;
      font-family: Outfit, system-ui, sans-serif;
      transition: background-color 0.25s ease, color 0.25s ease;
      border-radius: 0 0 14px 14px;
      overflow: hidden;
    }

    /* Left Sidebar */
    .sg-sidebar {
      width: 248px;
      flex: 0 0 248px;
      align-self: stretch;
      display: flex;
      flex-direction: column;
      min-height: 0;
      padding: 14px 10px 12px;
      user-select: none;
      border-right: 1px solid transparent;
      box-sizing: border-box;
      transition: background-color 0.25s ease, border-color 0.25s ease;
    }
    .sg-mobile-bar{ display: none; }
    .sg-nav-veil{ display: none; }
    #nav {
      display: flex;
      flex-direction: column;
      flex: 1 1 auto;
      min-height: 0;
      height: auto;
    }
    .sg-nav-body {
      display: flex;
      flex-direction: column;
      flex: 1 1 auto;
      min-height: 0;
    }
    .sg-ws-wrap {
      position: relative;
      margin-bottom: 12px;
    }
    .sg-ws-select {
      display: flex;
      align-items: center;
      justify-content: space-between;
      width: 100%;
      padding: 9px 12px;
      border-radius: 10px;
      border: 1px solid transparent;
      background: rgba(255,255,255,.04);
      color: inherit;
      font-weight: 700;
      font-size: 15.5px;
      font-family: inherit;
      cursor: pointer;
      transition: all 0.15s ease;
      text-align: left;
    }
    .sg-ws-wrap:not(.is-single) .sg-ws-select:hover {
      background: rgba(255,255,255,.07);
      border-color: rgba(148,163,184,.2);
    }
    .sg-ws-wrap.is-single .sg-ws-select {
      cursor: default;
    }
    .sg-ws-title {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .sg-ws-title span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .sg-ws-avatar {
      width: 28px;
      height: 28px;
      border-radius: 7px;
      background: #0073ea;
      color: #fff;
      display: grid;
      place-items: center;
      font-size: 13px;
      font-weight: 800;
      flex-shrink: 0;
    }
    .sg-ws-menu {
      position: absolute;
      left: 0;
      right: 0;
      top: calc(100% + 4px);
      z-index: 40;
      display: flex;
      flex-direction: column;
      gap: 2px;
      padding: 6px;
      border-radius: 10px;
      background: var(--panel, #0f172a);
      border: 1px solid rgba(148,163,184,.22);
      box-shadow: 0 12px 28px rgba(0,0,0,.35);
    }
    .sg-ws-menu[hidden] { display: none !important; }
    .sg-ws-option {
      display: flex;
      align-items: center;
      gap: 8px;
      width: 100%;
      padding: 9px 10px;
      border: 0;
      border-radius: 8px;
      background: transparent;
      color: var(--ink, #e2e8f0);
      font: inherit;
      font-size: 13.5px;
      font-weight: 600;
      text-align: left;
      cursor: pointer;
    }
    .sg-ws-option:hover { background: rgba(255,255,255,.06); }
    .sg-ws-option.is-on {
      background: rgba(45,212,191,.14);
      color: #5eead4;
    }
    .sg-ws-check {
      width: 14px;
      flex: none;
      font-size: 12px;
      opacity: 0.9;
    }
    .sg-nav-group-title {
      font-size: 12.5px;
      font-weight: 750;
      text-transform: uppercase;
      letter-spacing: 0.07em;
      padding: 14px 10px 6px;
      color: var(--muted);
    }
    .sg-nav-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 9px 12px;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 500;
      cursor: pointer;
      margin-bottom: 3px;
      min-height: 40px;
      transition: all 0.15s ease;
      box-sizing: border-box;
    }
    .sg-nav-item-left {
      display: flex;
      align-items: center;
      gap: 10px;
      min-width: 0;
    }
    .sg-nav-item-left span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .sg-nav-item-left i {
      font-size: 17px;
      width: 20px;
      text-align: center;
      flex-shrink: 0;
    }
    .sg-nav-badge {
      font-size: 12.5px;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 999px;
      flex-shrink: 0;
    }
    .sg-nav-tree-branch{
      display:flex;flex-direction:column;gap:2px;
      margin:2px 0 4px;padding:0 0 2px;
    }
    .sg-nav-proj-scopes{
      margin:0 0 4px;
      padding-left:4px;
    }
    .sg-nav-proj-scope{
      padding-left:28px !important;
      min-height:32px !important;
      font-size:13px !important;
      color:var(--muted) !important;
    }
    .sg-nav-proj-scope.active{
      color:var(--accent) !important;
      font-weight:650 !important;
    }
    .sg-nav-proj-scope .sg-nav-item-left span{
      font-size:13px;
    }
    .sg-nav-proj{
      padding-left:26px !important;
      min-height:34px !important;
      font-size:13.5px !important;
    }
    .sg-nav-proj .sg-nav-item-left span{
      max-width:160px;
      font-weight:400;
    }
    .sg-nav-proj.active .sg-nav-item-left span{font-weight:650}
    .sg-nav-proj-search-wrap{
      display:flex;align-items:center;gap:6px;
      margin:2px 8px 6px 18px;padding:0 8px;
      height:32px;border-radius:8px;
      background:rgba(255,255,255,.04);
      border:1px solid rgba(148,163,184,.14);
    }
    .sg-nav-proj-search-wrap i{
      font-size:12px;color:var(--muted);flex-shrink:0;
    }
    .sg-nav-proj-search{
      flex:1;min-width:0;height:100%;border:0;background:transparent;
      color:var(--ink);font:inherit;font-size:12.5px;outline:none;
    }
    .sg-nav-proj-search::placeholder{color:var(--muted)}
    .sg-nav-proj-more{
      display:block;width:calc(100% - 26px);margin:2px 0 4px 14px;
      padding:6px 10px;border:0;border-radius:7px;
      background:transparent;color:var(--accent);
      font:inherit;font-size:12.5px;font-weight:650;
      text-align:left;cursor:pointer;
    }
    .sg-nav-proj-more:hover{background:rgba(45,212,191,.08)}
    .sg-nav-proj-empty{
      padding:6px 12px 8px 28px;font-size:12px;color:var(--muted);
    }
    .sg-nav-new-proj{
      color:#00ca9d !important;font-weight:600 !important;
      padding-left:14px !important;margin-bottom:6px;
    }
    .sg-nav-new-proj i{color:#00ca9d !important}
    .sg-nav-details {
      margin-top: 14px;
      background: rgba(255, 255, 255, 0.025);
      border: 1px solid rgba(255, 255, 255, 0.06);
      border-radius: 10px;
      overflow: hidden;
      transition: all 0.15s ease;
    }
    .sg-nav-details[open] {
      background: rgba(255, 255, 255, 0.035);
      border-color: rgba(255, 255, 255, 0.09);
    }
    .sg-nav-details summary {
      font-size: 12.5px;
      font-weight: 700;
      color: var(--muted);
      text-transform: uppercase;
      letter-spacing: .06em;
      padding: 10px 12px;
      cursor: pointer;
      user-select: none;
      display: flex;
      align-items: center;
      justify-content: space-between;
      transition: color 0.15s ease;
    }
    .sg-nav-details summary:hover {
      color: #fff;
    }
    .sg-nav-details-body {
      padding: 4px 6px 8px;
      border-top: 1px solid rgba(255, 255, 255, 0.04);
    }
    .sg-nav-footer {
      margin-top: auto;
      flex-shrink: 0;
      padding: 14px 4px 4px;
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      display: flex;
      flex-direction: column;
      gap: 8px;
    }
    .sg-nav-footer-status {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 4px 6px;
      font-size: 11px;
      color: var(--muted);
      font-family: "JetBrains Mono", monospace;
    }
    .sg-footer-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #2dd4bf;
      box-shadow: 0 0 8px rgba(45, 212, 191, 0.6);
      flex-shrink: 0;
    }
    .sg-nav-footer-status{
      justify-content: center;
      width: 100%;
    }
    .sg-collab-signal{
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 2px;
      width: 100%;
      margin: 0;
      padding: 8px 8px;
      border: 1px solid rgba(255,255,255,0.06);
      border-radius: 8px;
      background: rgba(255,255,255,0.03);
      color: #94a3b8;
      font: inherit;
      text-align: left;
      cursor: pointer;
      transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
    }
    .sg-collab-signal:hover{
      background: rgba(45,212,191,0.08);
      border-color: rgba(45,212,191,0.22);
      color: #e2e8f0;
    }
    .sg-collab-who{
      font-size: 11px;
      font-weight: 600;
      color: #cbd5e1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .sg-collab-when{
      font-size: 10px;
      font-family: "JetBrains Mono", monospace;
      color: #64748b;
    }

    /* Main Board Space */
    .sg-board-space {
      flex: 1;
      display: flex;
      flex-direction: column;
      overflow-x: auto;
      min-width: 0;
      transition: background-color 0.25s ease;
    }

    /* Board Top Title Bar */
    .sg-board-header {
      padding: 22px 28px 12px;
      border-bottom: 1px solid transparent;
      transition: background-color 0.25s ease, border-color 0.25s ease;
    }
    .sg-board-title-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      margin-bottom: 6px;
    }
    .sg-board-title-left {
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .sg-board-star {
      font-size: 18px;
      color: #fbbf24;
      cursor: pointer;
    }
    .sg-board-h1 {
      margin: 0;
      font-size: 24px;
      font-weight: 800;
      letter-spacing: -0.02em;
    }
    .sg-board-info-pill {
      font-size: 12px;
      padding: 3px 10px;
      border-radius: 999px;
      font-weight: 600;
    }
    .sg-board-subtitle {
      font-size: 14px;
      margin: 0 0 16px;
    }

    /* Views Switcher Tabs (Tabel, Kanban, Gantt, Sinteză) */
    .sg-tabs-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-top: 12px;
    }
    .sg-tab {
      appearance: none;
      background: transparent;
      border: none;
      border-bottom: 3px solid transparent;
      padding: 8px 16px 10px;
      font-family: inherit;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: all 0.15s ease;
    }
    .sg-tab i { font-size: 13px; }

    /* Controls Bar */
    .sg-control-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 28px;
      flex-wrap: wrap;
    }
    .sg-control-left {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .sg-btn-new-item {
      display: inline-flex;
      align-items: center;
      background: #0073ea;
      color: #fff;
      border: none;
      font-family: inherit;
      font-size: 14px;
      font-weight: 700;
      border-radius: 8px;
      padding: 8px 16px;
      cursor: pointer;
      gap: 8px;
      transition: all 0.15s ease;
      box-shadow: 0 2px 8px rgba(0, 115, 234, 0.3);
    }
    .sg-btn-new-item:hover {
      filter: brightness(1.1);
      transform: translateY(-1px);
    }
    .sg-search-wrap {
      position: relative;
      display: flex;
      align-items: center;
    }
    .sg-search-wrap i {
      position: absolute;
      left: 12px;
      font-size: 13px;
      pointer-events: none;
    }
    .sg-search-input {
      font-family: inherit;
      font-size: 14px;
      padding: 7px 12px 7px 34px;
      border-radius: 8px;
      border: 1px solid transparent;
      outline: none;
      width: 220px;
      transition: width 0.2s ease, border-color 0.2s ease;
    }
    .sg-search-input:focus {
      width: 270px;
    }
    .sg-filter-btn {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-family: inherit;
      font-size: 13px;
      font-weight: 600;
      padding: 7px 12px;
      border-radius: 8px;
      border: 1px solid transparent;
      cursor: pointer;
      background: transparent;
      transition: all 0.15s ease;
    }

    /* Grid Table Workspace */
    .sg-table-container {
      padding: 10px 28px 40px;
    }
    .sg-group {
      margin-bottom: 34px;
    }
    .sg-group-header {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 8px;
      cursor: pointer;
      user-select: none;
    }
    .sg-group-chevron {
      font-size: 13px;
      transition: transform 0.2s ease;
      width: 18px;
      height: 18px;
      display: grid;
      place-items: center;
    }
    .sg-group.collapsed .sg-group-chevron {
      transform: rotate(-90deg);
    }
    .sg-group-title {
      font-size: 18px;
      font-weight: 800;
      letter-spacing: -0.01em;
      margin: 0;
    }
    .sg-group-count {
      font-size: 12px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 999px;
    }

    /* Table Grid */
    .sg-table-wrap {
      border-radius: 12px;
      overflow: hidden;
      border: 1px solid transparent;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
      transition: all 0.2s ease;
    }
    .sg-group.collapsed .sg-table-wrap {
      display: none;
    }

    .sg-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
      table-layout: fixed;
    }
    .sg-th, .sg-td {
      padding: 0;
      text-align: center;
      vertical-align: middle;
      height: 40px;
      border-right: 1px solid transparent;
      border-bottom: 1px solid transparent;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .sg-th:last-child, .sg-td:last-child {
      border-right: none;
    }
    .sg-th {
      font-size: 12px;
      font-weight: 700;
      text-transform: capitalize;
      height: 36px;
      user-select: none;
    }

    /* Column Sizing */
    .col-sel { width: 38px; }
    .col-code { width: 85px; }
    .col-task { width: 320px; text-align: left; }
    .col-person { width: 135px; }
    .col-status { width: 150px; }
    .col-format { width: 75px; }
    .col-rev { width: 65px; }
    .col-date { width: 125px; }
    .col-spec { width: 115px; }
    .col-pri { width: 105px; }
    .col-time { width: 90px; }

    /* Task Cell Details */
    .sg-task-cell {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 14px;
      height: 100%;
      text-align: left;
    }
    .sg-task-name {
      font-weight: 600;
      color: inherit;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .sg-comment-bubble {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 999px;
      cursor: pointer;
      opacity: 0.6;
      transition: opacity 0.15s ease;
    }
    .sg-comment-bubble:hover, .sg-comment-bubble.active {
      opacity: 1;
    }

    /* Person Avatar */
    .sg-person-badge {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 3px 8px;
      border-radius: 999px;
      font-weight: 600;
      font-size: 12px;
      cursor: pointer;
    }
    .sg-avatar {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      font-size: 11px;
      font-weight: 700;
      color: #fff;
    }

    /* Interactive Status Chips — premium, semi-transparent */
    .sg-status-cell {
      height: 100%;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 700;
      font-size: 11px;
      cursor: pointer;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      transition: filter 0.15s ease;
    }
    .sg-status-cell:hover { filter: brightness(1.12); }
    .st-gata  { background: rgba(0, 200, 117, 0.13) !important; color: #00c875 !important; box-shadow: inset 0 0 0 1px rgba(0,200,117,0.4); }
    .st-lucru { background: rgba(253,171,61, 0.13) !important; color: #e8961e !important; box-shadow: inset 0 0 0 1px rgba(253,171,61,0.4); }
    .st-blocat { background: rgba(226,68,92, 0.13) !important; color: #e2445c !important; box-shadow: inset 0 0 0 1px rgba(226,68,92,0.4); }
    .st-asteptare { background: rgba(0,115,234, 0.13) !important; color: #4db6f9 !important; box-shadow: inset 0 0 0 1px rgba(0,115,234,0.4); }
    .st-revizie { background: rgba(162,93,220, 0.13) !important; color: #c084fc !important; box-shadow: inset 0 0 0 1px rgba(162,93,220,0.4); }
    .st-aprobat { background: rgba(16,185,129, 0.13) !important; color: #10b981 !important; box-shadow: inset 0 0 0 1px rgba(16,185,129,0.4); }
    .st-tipar { background: rgba(6,182,212, 0.13) !important; color: #06b6d4 !important; box-shadow: inset 0 0 0 1px rgba(6,182,212,0.4); }
    .st-verificare { background: rgba(245,158,11, 0.13) !important; color: #f59e0b !important; box-shadow: inset 0 0 0 1px rgba(245,158,11,0.4); }
    .st-respins { background: rgba(239,68,68, 0.13) !important; color: #f87171 !important; box-shadow: inset 0 0 0 1px rgba(239,68,68,0.4); }

    /* Technical Badges */
    .sg-code-badge {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 4px;
      letter-spacing: 0.04em;
    }
    .sg-format-pill {
      font-size: 11px;
      font-weight: 800;
      padding: 2px 6px;
      border-radius: 4px;
    }
    .sg-rev-pill {
      font-family: 'JetBrains Mono', monospace;
      font-size: 11px;
      font-weight: 700;
    }
    .sg-date-pill {
      font-size: 12px;
      font-weight: 600;
      padding: 4px 10px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }
    .sg-date-pill.overdue {
      background: rgba(226, 68, 92, 0.15);
      color: #e2445c;
      font-weight: 700;
    }
    .sg-spec-pill {
      font-size: 11px;
      font-weight: 700;
      padding: 3px 8px;
      border-radius: 6px;
      letter-spacing: 0.04em;
    }
    .sg-pri-pill {
      font-size: 11px;
      font-weight: 700;
      padding: 3px 9px;
      border-radius: 4px;
      display: inline-flex;
      align-items: center;
      letter-spacing: 0.04em;
    }
    .sg-pri-dot {
      display: none;
    }

    /* Add Row */
    .sg-add-row {
      display: flex;
      align-items: center;
      height: 38px;
      padding: 0 14px;
      border-top: 1px solid transparent;
      gap: 10px;
    }
    .sg-add-input {
      flex: 1;
      border: none;
      background: transparent;
      font-family: inherit;
      font-size: 14px;
      outline: none;
    }

    /* Group Footer Battery Bar */
    .sg-group-footer {
      display: flex;
      align-items: center;
      height: 38px;
      font-size: 12px;
      font-weight: 600;
      border-top: 1px solid transparent;
    }
    .sg-battery-wrap {
      width: 100%;
      height: 18px;
      border-radius: 4px;
      overflow: hidden;
      display: flex;
      box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
    }
    .sg-battery-seg {
      height: 100%;
      transition: width 0.3s ease;
      position: relative;
    }
    .sg-battery-seg:hover::after {
      content: attr(data-tip);
      position: absolute;
      bottom: 22px;
      left: 50%;
      transform: translateX(-50%);
      background: #1e293b;
      color: #fff;
      padding: 3px 7px;
      font-size: 11px;
      border-radius: 4px;
      white-space: nowrap;
      pointer-events: none;
      z-index: 10;
    }

    /* Kanban, Gantt, Dashboard Views */
    .sg-kanban-board {
      display: flex;
      gap: 20px;
      overflow-x: auto;
      padding: 10px 0 20px;
    }
    .sg-k-col {
      width: 310px;
      flex-shrink: 0;
      border-radius: 12px;
      padding: 14px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    .sg-k-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-size: 14px;
      font-weight: 800;
      padding-bottom: 6px;
      border-bottom: 2px solid transparent;
    }
    .sg-k-card {
      border-radius: 10px;
      padding: 14px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
      border: 1px solid transparent;
      cursor: grab;
      transition: transform 0.15s ease, box-shadow 0.15s ease;
    }
    .sg-k-card:hover {
      transform: translateY(-2px);
      box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
    }
    .sg-k-title {
      font-size: 14px;
      font-weight: 700;
      margin: 6px 0 8px;
    }
    .sg-k-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 10px;
    }

    .sg-gantt-board {
      border-radius: 12px;
      padding: 18px;
      border: 1px solid transparent;
      overflow-x: auto;
    }
    .sg-g-timeline-header {
      display: grid;
      grid-template-columns: 280px repeat(8, 1fr);
      padding: 8px 0;
      font-size: 12px;
      font-weight: 700;
      text-align: center;
      border-bottom: 1px solid transparent;
    }
    .sg-g-row {
      display: grid;
      grid-template-columns: 280px 1fr;
      align-items: center;
      padding: 10px 0;
      border-bottom: 1px solid transparent;
    }
    .sg-g-bar-track {
      position: relative;
      height: 24px;
      border-radius: 6px;
      display: flex;
      align-items: center;
    }
    .sg-g-bar {
      position: absolute;
      height: 18px;
      border-radius: 999px;
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      display: flex;
      align-items: center;
      padding: 0 10px;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    }

    .sg-dash-board {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 20px;
      padding: 10px 0;
    }
    .sg-dash-card {
      border-radius: 14px;
      padding: 20px;
      border: 1px solid transparent;
    }
    .sg-dash-kpi {
      font-size: 34px;
      font-weight: 800;
      letter-spacing: -0.03em;
      margin: 8px 0 4px;
    }

    /* Floating Status Popover */
    .status-picker-popover {
      position: absolute;
      background: #ffffff;
      border-radius: 10px;
      box-shadow: 0 12px 36px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0,0,0,0.06);
      padding: 10px;
      z-index: 2000;
      display: none;
      flex-direction: column;
      gap: 6px;
      width: 190px;
      animation: popIn 0.15s ease-out;
    }
    @keyframes popIn {
      from { opacity: 0; transform: scale(0.95); }
      to { opacity: 1; transform: scale(1); }
    }
    .pop-status-item {
      padding: 9px 14px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 11px;
      text-align: center;
      cursor: pointer;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      transition: filter 0.12s ease, opacity 0.12s ease;
    }
    .pop-status-item:hover {
      filter: brightness(1.14);
    }

    /* ========================================================= */
    /* THEME 1: DAYLIGHT VIVID (LIGHT MODE)                      */
    /* ========================================================= */
[data-theme="daylight"] .scope-grid-app, [data-theme="mist"] .scope-grid-app {
      background: #f6f7fb;
      color: #292f4c;
    }
[data-theme="daylight"] .sg-sidebar, [data-theme="mist"] .sg-sidebar {
      background: #ffffff;
      border-right-color: #e6e9ef;
    }
[data-theme="daylight"] .sg-ws-select, [data-theme="mist"] .sg-ws-select {
      background: #f5f6f8;
      color: #323338;
      border: 1px solid #e6e9ef;
    }
[data-theme="daylight"] .sg-nav-group-title, [data-theme="mist"] .sg-nav-group-title { color: #676879; }
[data-theme="daylight"] .sg-nav-item, [data-theme="mist"] .sg-nav-item { color: #323338; }
[data-theme="daylight"] .sg-nav-item:hover, [data-theme="mist"] .sg-nav-item:hover { background: #f0f3f8; }
[data-theme="daylight"] .sg-nav-item.active, [data-theme="mist"] .sg-nav-item.active {
      background: #dff0ff;
      color: #0073ea;
      font-weight: 700;
    }
[data-theme="daylight"] .sg-nav-badge, [data-theme="mist"] .sg-nav-badge { background: #e6e9ef; color: #323338; }
[data-theme="daylight"] .sg-board-space, [data-theme="mist"] .sg-board-space { background: #ffffff; }
[data-theme="daylight"] .sg-board-header, [data-theme="mist"] .sg-board-header { background: #ffffff; border-bottom-color: #e6e9ef; }
[data-theme="daylight"] .sg-board-h1, [data-theme="mist"] .sg-board-h1 { color: #1f2328; }
[data-theme="daylight"] .sg-board-info-pill, [data-theme="mist"] .sg-board-info-pill { background: #e8f5e9; color: #2e7d32; }
[data-theme="daylight"] .sg-board-subtitle, [data-theme="mist"] .sg-board-subtitle { color: #676879; }
[data-theme="daylight"] .sg-tab, [data-theme="mist"] .sg-tab { color: #676879; }
[data-theme="daylight"] .sg-tab:hover, [data-theme="mist"] .sg-tab:hover { color: #0073ea; }
[data-theme="daylight"] .sg-tab.active, [data-theme="mist"] .sg-tab.active { color: #0073ea; border-bottom-color: #0073ea; }
[data-theme="daylight"] .sg-search-input, [data-theme="mist"] .sg-search-input { background: #f5f6f8; border-color: #c3c6d4; color: #323338; }
[data-theme="daylight"] .sg-filter-btn, [data-theme="mist"] .sg-filter-btn { color: #323338; border-color: #c3c6d4; background: #ffffff; }
[data-theme="daylight"] .sg-filter-btn:hover, [data-theme="mist"] .sg-filter-btn:hover { background: #f5f6f8; }
[data-theme="daylight"] .sg-table-wrap, [data-theme="mist"] .sg-table-wrap { background: #ffffff; border-color: #e6e9ef; }
[data-theme="daylight"] .sg-th, [data-theme="mist"] .sg-th { background: #f5f6f8; color: #676879; border-right-color: #e6e9ef; border-bottom-color: #e6e9ef; }
[data-theme="daylight"] .sg-td, [data-theme="mist"] .sg-td { border-right-color: #e6e9ef; border-bottom-color: #e6e9ef; color: #323338; }
[data-theme="daylight"] .sg-code-badge, [data-theme="mist"] .sg-code-badge { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
[data-theme="daylight"] .sg-format-pill, [data-theme="mist"] .sg-format-pill { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }
[data-theme="daylight"] .sg-rev-pill, [data-theme="mist"] .sg-rev-pill { color: #d97706; }
[data-theme="daylight"] .sg-add-row, [data-theme="mist"] .sg-add-row { background: #fbfcfd; border-top-color: #e6e9ef; color: #676879; }
[data-theme="daylight"] .sg-add-input, [data-theme="mist"] .sg-add-input { color: #323338; }
[data-theme="daylight"] .sg-group-footer, [data-theme="mist"] .sg-group-footer { background: #f5f6f8; border-top-color: #e6e9ef; color: #676879; }
[data-theme="daylight"] .sg-comment-bubble, [data-theme="mist"] .sg-comment-bubble { background: #f0f3f8; color: #0073ea; }
[data-theme="daylight"] .sg-person-badge, [data-theme="mist"] .sg-person-badge { background: #f5f6f8; color: #323338; }
[data-theme="daylight"] .sg-date-pill, [data-theme="mist"] .sg-date-pill { background: #f0f3f8; color: #323338; }
[data-theme="daylight"] .sg-k-col, [data-theme="mist"] .sg-k-col { background: #f5f6f8; border: 1px solid #e6e9ef; }
[data-theme="daylight"] .sg-k-card, [data-theme="mist"] .sg-k-card { background: #ffffff; border-color: #e6e9ef; color: #323338; }
    [data-theme="daylight"] .sg-gantt-board,
[data-theme="daylight"] .sg-dash-card, [data-theme="mist"] .sg-dash-card { background: #ffffff; border: 1px solid #e6e9ef; color: #323338; }
    [data-theme="daylight"] .sg-g-timeline-header,
[data-theme="daylight"] .sg-g-row, [data-theme="mist"] .sg-g-row { border-bottom-color: #e6e9ef; }
[data-theme="daylight"] .sg-g-bar-track, [data-theme="mist"] .sg-g-bar-track { background: #f5f6f8; }

    /* ========================================================= */
    /* THEME 2: DARK STUDIO (DARK SLATE)                         */
    /* ========================================================= */
    [data-theme="dark-studio"] .scope-grid-app {
      background: #0f172a;
      color: #f1f5f9;
    }
    [data-theme="dark-studio"] .sg-sidebar {
      background: #0b1324;
      border-right-color: rgba(255, 255, 255, 0.08);
    }
    [data-theme="dark-studio"] .sg-ws-select {
      background: rgba(30, 41, 59, 0.6);
      color: #f8fafc;
      border: 1px solid rgba(255, 255, 255, 0.08);
    }
    [data-theme="dark-studio"] .sg-nav-group-title { color: #94a3b8; }
    [data-theme="dark-studio"] .sg-nav-item { color: #cbd5e1; }
    [data-theme="dark-studio"] .sg-nav-item:hover { background: rgba(255, 255, 255, 0.05); color: #fff; }
    [data-theme="dark-studio"] .sg-nav-item.active {
      background: rgba(0, 115, 234, 0.2);
      color: #38bdf8;
      font-weight: 700;
      border: 1px solid rgba(56, 189, 248, 0.3);
    }
    [data-theme="dark-studio"] .sg-nav-badge { background: rgba(255, 255, 255, 0.1); color: #cbd5e1; }
    [data-theme="dark-studio"] .sg-board-space { background: #111a2e; }
    [data-theme="dark-studio"] .sg-board-header { background: #111a2e; border-bottom-color: rgba(255, 255, 255, 0.08); }
    [data-theme="dark-studio"] .sg-board-h1 { color: #f8fafc; }
    [data-theme="dark-studio"] .sg-board-info-pill { background: rgba(45, 212, 191, 0.15); color: #2dd4bf; border: 1px solid rgba(45, 212, 191, 0.3); }
    [data-theme="dark-studio"] .sg-board-subtitle { color: #94a3b8; }
    [data-theme="dark-studio"] .sg-tab { color: #94a3b8; }
    [data-theme="dark-studio"] .sg-tab:hover { color: #38bdf8; }
    [data-theme="dark-studio"] .sg-tab.active { color: #38bdf8; border-bottom-color: #38bdf8; }
    [data-theme="dark-studio"] .sg-search-input { background: rgba(15, 23, 42, 0.6); border-color: rgba(255, 255, 255, 0.14); color: #f8fafc; }
    [data-theme="dark-studio"] .sg-filter-btn { color: #e2e8f0; border-color: rgba(255, 255, 255, 0.14); background: rgba(30, 41, 59, 0.5); }
    [data-theme="dark-studio"] .sg-filter-btn:hover { background: rgba(255, 255, 255, 0.1); }
    [data-theme="dark-studio"] .sg-table-wrap { background: #162238; border-color: rgba(255, 255, 255, 0.08); box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
    [data-theme="dark-studio"] .sg-th { background: #131d31; color: #94a3b8; border-right-color: rgba(255, 255, 255, 0.06); border-bottom-color: rgba(255, 255, 255, 0.06); }
    [data-theme="dark-studio"] .sg-td { border-right-color: rgba(255, 255, 255, 0.06); border-bottom-color: rgba(255, 255, 255, 0.06); color: #e2e8f0; }
    [data-theme="dark-studio"] .sg-code-badge { background: rgba(56, 189, 248, 0.15); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); }
    [data-theme="dark-studio"] .sg-format-pill { background: rgba(255, 255, 255, 0.06); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.1); }
    [data-theme="dark-studio"] .sg-rev-pill { color: #facc15; }
    [data-theme="dark-studio"] .sg-add-row { background: #121b2d; border-top-color: rgba(255, 255, 255, 0.06); color: #94a3b8; }
    [data-theme="dark-studio"] .sg-add-input { color: #f8fafc; }
    [data-theme="dark-studio"] .sg-group-footer { background: #131d31; border-top-color: rgba(255, 255, 255, 0.06); color: #94a3b8; }
    [data-theme="dark-studio"] .sg-comment-bubble { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
    [data-theme="dark-studio"] .sg-person-badge { background: rgba(255, 255, 255, 0.06); color: #e2e8f0; }
    [data-theme="dark-studio"] .sg-date-pill { background: rgba(255, 255, 255, 0.06); color: #cbd5e1; }
    [data-theme="dark-studio"] .sg-k-col { background: #131d31; border: 1px solid rgba(255, 255, 255, 0.06); }
    [data-theme="dark-studio"] .sg-k-card { background: #1a2740; border-color: rgba(255, 255, 255, 0.08); color: #e2e8f0; }
    [data-theme="dark-studio"] .sg-gantt-board,
    [data-theme="dark-studio"] .sg-dash-card { background: #162238; border: 1px solid rgba(255, 255, 255, 0.08); color: #e2e8f0; }
    [data-theme="dark-studio"] .sg-g-timeline-header,
    [data-theme="dark-studio"] .sg-g-row { border-bottom-color: rgba(255, 255, 255, 0.06); }
    [data-theme="dark-studio"] .sg-g-bar-track { background: rgba(0, 0, 0, 0.25); }

    /* ========================================================= */
    /* THEME 3: COMPACT WBS — OLED BLACK + EMERALD              */
    /* ========================================================= */
    [data-theme="compact-wbs"] .scope-grid-app {
      background: #000000;
      color: #fafafa;
    }
    [data-theme="compact-wbs"] .sg-sidebar {
      background: #050505;
      border-right-color: rgba(255, 255, 255, 0.08);
    }
    [data-theme="compact-wbs"] .sg-ws-select {
      background: #121212;
      color: #fafafa;
      border: 1px solid rgba(255, 255, 255, 0.1);
    }
    [data-theme="compact-wbs"] .sg-nav-group-title { color: #71717a; font-size: 11px; }
    [data-theme="compact-wbs"] .sg-nav-item { color: #a1a1aa; font-size: 13px; padding: 6px 10px; }
    [data-theme="compact-wbs"] .sg-nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
    [data-theme="compact-wbs"] .sg-nav-item.active {
      background: rgba(52, 211, 153, 0.14);
      color: #34d399;
      font-weight: 700;
      border: 1px solid rgba(52, 211, 153, 0.35);
    }
    [data-theme="compact-wbs"] .sg-board-space { background: #0a0a0a; }
    [data-theme="compact-wbs"] .sg-board-header { background: #0a0a0a; border-bottom-color: rgba(255,255,255,0.08); padding: 16px 24px 8px; }
    [data-theme="compact-wbs"] .sg-board-h1 { color: #fafafa; font-size: 21px; }
    [data-theme="compact-wbs"] .sg-board-info-pill { background: rgba(52, 211, 153, 0.14); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.32); }
    [data-theme="compact-wbs"] .sg-tab { color: #a1a1aa; font-size: 13px; padding: 6px 14px 8px; }
    [data-theme="compact-wbs"] .sg-tab:hover { color: #fbbf24; }
    [data-theme="compact-wbs"] .sg-tab.active { color: #34d399; border-bottom-color: #34d399; }
    [data-theme="compact-wbs"] .sg-control-bar { padding: 10px 24px; }
    [data-theme="compact-wbs"] .sg-table-container { padding: 8px 24px 32px; }
    [data-theme="compact-wbs"] .sg-table-wrap { background: #121212; border-color: rgba(255,255,255,0.08); }
    [data-theme="compact-wbs"] .sg-th {
      background: #0a0a0a;
      color: #a1a1aa;
      font-size: 11px;
      height: 32px;
      font-family: 'JetBrains Mono', monospace;
      letter-spacing: 0.04em;
    }
    [data-theme="compact-wbs"] .sg-td {
      height: 33px;
      font-size: 12px;
      border-right-color: rgba(255,255,255,0.06);
      border-bottom-color: rgba(255,255,255,0.06);
    }
    [data-theme="compact-wbs"] .sg-task-cell { padding: 0 10px; }
    [data-theme="compact-wbs"] .sg-task-name { font-size: 13px; }
    [data-theme="compact-wbs"] .sg-code-badge {
      background: rgba(52, 211, 153, 0.14);
      color: #34d399;
      border: 1px solid rgba(52, 211, 153, 0.28);
    }
    [data-theme="compact-wbs"] .sg-format-pill {
      font-size: 10px;
      background: rgba(255,255,255,0.06);
      color: #d4d4d8;
      border: 1px solid rgba(255,255,255,0.1);
    }
    [data-theme="compact-wbs"] .sg-rev-pill { color: #fbbf24; }
    [data-theme="compact-wbs"] .sg-add-row { background: #050505; border-top-color: rgba(255,255,255,0.06); height: 32px; font-size: 12px; }
    [data-theme="compact-wbs"] .sg-group-footer { background: #0a0a0a; border-top-color: rgba(255,255,255,0.06); height: 32px; font-size: 12px; }

    /* ========================================================= */
    /* THEME 4: CYAN GLASS — NORD POLAR NIGHT                    */
    /* ========================================================= */
    [data-theme="cyan-glass"] .scope-grid-app {
      background:
        radial-gradient(1000px 480px at 15% -5%, rgba(136, 192, 208, 0.14), transparent 55%),
        radial-gradient(900px 420px at 85% 5%, rgba(94, 129, 172, 0.12), transparent 52%),
        #0a0e14;
      color: #eceff4;
    }
    [data-theme="cyan-glass"] .sg-sidebar {
      background: rgba(12, 16, 24, 0.88);
      border-right: 1px solid rgba(136, 192, 208, 0.18);
      backdrop-filter: blur(16px);
    }
    [data-theme="cyan-glass"] .sg-ws-select {
      background: rgba(46, 52, 64, 0.7);
      border: 1px solid rgba(136, 192, 208, 0.28);
      color: #eceff4;
      box-shadow: 0 4px 16px rgba(0,0,0,0.25);
    }
    [data-theme="cyan-glass"] .sg-ws-avatar {
      background: linear-gradient(135deg, #5e81ac, #88c0d0);
      color: #2e3440;
    }
    [data-theme="cyan-glass"] .sg-nav-group-title { color: #88c0d0; letter-spacing: 0.08em; }
    [data-theme="cyan-glass"] .sg-nav-item { color: #d8dee9; }
    [data-theme="cyan-glass"] .sg-nav-item:hover { background: rgba(136, 192, 208, 0.1); color: #fff; }
    [data-theme="cyan-glass"] .sg-nav-item.active {
      background: rgba(136, 192, 208, 0.16);
      color: #88c0d0;
      border: 1px solid rgba(136, 192, 208, 0.35);
      box-shadow: none;
    }
    [data-theme="cyan-glass"] .sg-board-space { background: transparent; }
    [data-theme="cyan-glass"] .sg-board-header {
      background: rgba(26, 31, 41, 0.75);
      backdrop-filter: blur(14px);
      border-bottom: 1px solid rgba(136, 192, 208, 0.14);
    }
    [data-theme="cyan-glass"] .sg-board-h1 {
      color: #ffffff;
      background: linear-gradient(135deg, #ffffff, #93c5fd);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
    }
    [data-theme="cyan-glass"] .sg-board-info-pill {
      background: rgba(45, 212, 191, 0.16);
      color: #2dd4bf;
      border: 1px solid rgba(45, 212, 191, 0.35);
      box-shadow: 0 0 12px rgba(45, 212, 191, 0.2);
    }
    [data-theme="cyan-glass"] .sg-tab { color: #94a3b8; }
    [data-theme="cyan-glass"] .sg-tab:hover { color: #2dd4bf; }
    [data-theme="cyan-glass"] .sg-tab.active {
      color: #2dd4bf;
      border-bottom: 3px solid #2dd4bf;
      text-shadow: 0 0 12px rgba(45, 212, 191, 0.5);
    }
    [data-theme="cyan-glass"] .sg-btn-new-item {
      background: linear-gradient(135deg, #2dd4bf, #22d3ee);
      color: #042f2e;
      box-shadow: 0 4px 14px rgba(45, 212, 191, 0.35);
      border: none;
    }
    [data-theme="cyan-glass"] .sg-table-wrap {
      background: rgba(18, 28, 46, 0.78);
      backdrop-filter: blur(14px);
      border: 1px solid rgba(148, 163, 184, 0.14);
      box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.5);
    }
    [data-theme="cyan-glass"] .sg-th {
      background: rgba(15, 23, 42, 0.85);
      color: #94a3b8;
      border-right-color: rgba(148, 163, 184, 0.1);
      border-bottom-color: rgba(148, 163, 184, 0.1);
    }
    [data-theme="cyan-glass"] .sg-td {
      border-right-color: rgba(148, 163, 184, 0.1);
      border-bottom-color: rgba(148, 163, 184, 0.1);
    }
    [data-theme="cyan-glass"] .sg-code-badge {
      background: rgba(34, 211, 238, 0.15);
      color: #22d3ee;
      border: 1px solid rgba(34, 211, 238, 0.3);
    }
    [data-theme="cyan-glass"] .sg-add-row {
      background: rgba(13, 22, 37, 0.6);
      border-top-color: rgba(148, 163, 184, 0.1);
    }
    [data-theme="cyan-glass"] .sg-group-footer {
      background: rgba(15, 23, 42, 0.85);
      border-top-color: rgba(148, 163, 184, 0.1);
    }

    /* Explanation Section */
    .unified-explanation {
      max-width: 1540px;
      margin: 32px auto 48px;
      padding: 0 20px;
    }
    .info-card {
      background: rgba(15, 23, 42, 0.85);
      border: 1px solid rgba(255, 255, 255, 0.08);
      border-radius: 16px;
      padding: 24px;
    }
    .info-card h3 {
      margin: 0 0 12px;
      font-size: 18px;
      color: #fff;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .info-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 16px;
    }
    .info-col {
      background: rgba(255, 255, 255, 0.03);
      border-radius: 10px;
      padding: 16px;
      border: 1px solid rgba(255, 255, 255, 0.05);
    }
    .info-col h4 {
      margin: 0 0 6px;
      font-size: 15px;
    }
    .info-col p {
      margin: 0;
      color: #94a3b8;
      font-size: 13px;
      line-height: 1.5;
    }

    /* ========================================================= */
    /* MOBILE & TABLET RESPONSIVENESS                            */
    /* ========================================================= */
    @media (max-width: 900px) {
      .showcase-header {
        padding: 12px 16px;
      }
      .showcase-header-in {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
      }
      .theme-selector-wrap {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
        padding: 4px;
      }
      .theme-selector-wrap::-webkit-scrollbar {
        display: none;
      }
      .theme-opt-btn {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 12px;
        padding: 6px 12px;
      }
      .scope-grid-app .sg-sidebar {
        display: flex !important;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 90050;
        width: min(300px, 88vw);
        flex: none;
        transform: translateX(-105%);
        transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: 16px 0 40px rgba(0,0,0,0.45);
        border-right: 1px solid rgba(255,255,255,0.1);
        padding-top: max(14px, env(safe-area-inset-top));
        padding-bottom: max(12px, env(safe-area-inset-bottom));
      }
      body.sg-nav-open .scope-grid-app .sg-sidebar {
        transform: translateX(0);
      }
      .sg-nav-veil{
        display: none;
        position: fixed;
        inset: 0;
        z-index: 90040;
        background: rgba(2, 8, 20, 0.5);
        backdrop-filter: blur(2px);
      }
      body.sg-nav-open .sg-nav-veil{
        display: block;
      }
      .sg-nav-veil[hidden]{ display: none !important; }
      body.sg-nav-open .sg-nav-veil[hidden]{ display: block !important; }
      .sg-mobile-bar{
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 90030;
        height: calc(58px + env(safe-area-inset-bottom));
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        background: rgba(11, 19, 36, 0.96);
        border-top: 1px solid rgba(255,255,255,0.1);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        justify-content: space-around;
        align-items: flex-start;
        gap: 2px;
      }
      .sg-mbar-item{
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        border: 0;
        background: transparent;
        color: #94a3b8;
        font: inherit;
        font-size: 10px;
        font-weight: 650;
        padding: 6px 2px;
        border-radius: 10px;
        cursor: pointer;
      }
      .sg-mbar-item i{ font-size: 18px; }
      .sg-mbar-item.is-on{ color: #2dd4bf; }
      .sg-mbar-item:active{ background: rgba(255,255,255,0.06); }
      .scope-grid-app {
        overflow: visible;
        min-height: 0;
      }
      body.sg-nav-open {
        overflow: hidden;
        overscroll-behavior: none;
      }
      .scope-grid-app .sg-board-space,
      #main.sg-board-space {
        padding: 16px 12px calc(88px + env(safe-area-inset-bottom, 0px));
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
      }
      .sg-tabs-row {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 16px;
        padding-bottom: 2px;
      }
      .sg-tabs-row::-webkit-scrollbar {
        display: none;
      }
      .sg-tab {
        flex-shrink: 0;
        white-space: nowrap;
      }
    }

    @media (max-width: 768px) {
      html.scope-html,
      html:has(body.scope-page),
      body.scope-page {
        overflow-x: clip;
        max-width: 100%;
        overscroll-behavior-y: none;
      }
      .app-stage-wrapper {
        margin: 8px auto 20px !important;
        padding: 0 4px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
      }
      .app-viewport-card,
      .scope-frame,
      .scope-grid-app,
      #scopeAppContainer {
        border-radius: 10px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: clip;
      }
      .scope-grid-app {
        overflow: visible !important;
      }
      .scope-frame .top {
        padding: 8px 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
      }
      .scope-frame .top-in {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        gap: 8px !important;
        padding: 0 !important;
      }
      .scope-brand-area {
        gap: 8px !important;
      }
      .scope-brand-h1 {
        font-size: 17px !important;
      }
      .scope-top-actions {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 6px !important;
      }
      .scope-top-actions .sg-search-wrap {
        flex: 1 1 100% !important;
        order: 10 !important;
        margin-top: 4px !important;
        width: 100% !important;
      }
      .scope-top-actions .sg-search-input {
        width: 100% !important;
        box-sizing: border-box !important;
      }
      .scope-top-actions .btn {
        font-size: 12px !important;
        padding: 6px 10px !important;
        min-height: 34px !important;
      }

      .sg-board-space,
      .scope-grid-app .sg-board-space,
      #main.sg-board-space {
        padding: 10px 8px calc(92px + env(safe-area-inset-bottom, 0px)) !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
      }
      .sg-board-header {
        padding: 12px 10px 8px !important;
        border-radius: 10px 10px 0 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
      }
      .sg-board-title-row,
      .sg-board-header-top {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
      }
      .sg-board-title-left {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
      }
      .sg-board-title-row > div:last-child {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
      }
      .sg-board-title-row > div:last-child .sg-filter-btn {
        flex: 1 1 auto !important;
        justify-content: center !important;
        min-height: 36px !important;
      }
      .sg-board-h1 {
        font-size: 18px !important;
        word-break: break-word !important;
        line-height: 1.3 !important;
        max-width: 100% !important;
      }
      .sg-board-subtitle {
        font-size: 12px !important;
        margin-bottom: 10px !important;
        line-height: 1.45 !important;
        word-break: break-word !important;
      }
      .sg-tabs-row {
        gap: 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
      }
      .sg-tab {
        font-size: 13px !important;
        padding: 6px 10px 8px !important;
      }

      /* Controls */
      .sg-control-bar {
        padding: 10px 8px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
      }
      .sg-control-left {
        width: 100% !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        box-sizing: border-box !important;
      }
      .sg-btn-new-item {
        width: 100% !important;
        justify-content: center !important;
        padding: 9px 16px !important;
        box-sizing: border-box !important;
      }
      .sg-search-wrap {
        width: 100% !important;
        box-sizing: border-box !important;
      }
      .sg-search-input {
        width: 100% !important;
        box-sizing: border-box !important;
      }

      /* Workspace Container — nu bloca scroll-ul vertical pe telefon */
      .sg-table-container {
        padding: 6px 0 28px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
      }
      .sg-group {
        margin-bottom: 18px !important;
        width: 100% !important;
        box-sizing: border-box !important;
      }
      .sg-group-header {
        padding: 6px 10px !important;
        width: 100% !important;
        box-sizing: border-box !important;
      }
      .sg-group-title {
        font-size: 15px !important;
        word-break: break-word !important;
      }

      /* Work Grid converted to Touch-Friendly Mobile Task Cards */
      .sg-table-wrap {
        border-radius: 10px;
        overflow: hidden;
      }
      .sg-table,
      .sg-table tbody {
        display: flex;
        flex-direction: column;
        width: 100% !important;
      }
      .sg-table thead {
        display: none !important;
      }
      .sg-tr {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        padding: 12px 10px !important;
        border-bottom: 1px solid var(--sg-cell-border, rgba(255, 255, 255, 0.08)) !important;
        background: transparent !important;
        height: auto !important;
        gap: 8px 6px !important;
        box-sizing: border-box !important;
      }
      .sg-tr:hover {
        background: rgba(255, 255, 255, 0.02) !important;
      }

      /* Line 1: Checkbox + Code + Task Title + Comments */
      .sg-td.col-sel {
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
      }
      .sg-td.col-code {
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
      }
      .sg-td.col-task {
        flex: 1 1 calc(100% - 90px) !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        text-align: left !important;
        display: flex !important;
        align-items: center !important;
      }
      .sg-task-cell {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
      }
      .sg-task-name {
        font-size: 14px !important;
        font-weight: 600 !important;
        line-height: 1.35 !important;
        white-space: normal !important;
        word-break: break-word !important;
        text-align: left !important;
      }

      /* Line 2: Touch Meta Row */
      .sg-td.col-status {
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        display: inline-flex !important;
        margin-left: 24px;
      }
      .sg-status-cell {
        min-width: 80px !important;
        padding: 5px 10px !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        border-radius: 6px !important;
        height: 28px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
      }
      .sg-td.col-person {
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        display: inline-flex !important;
      }
      .sg-person-badge {
        padding: 3px 8px !important;
        font-size: 11px !important;
      }
      .sg-avatar {
        width: 18px !important;
        height: 18px !important;
        font-size: 10px !important;
      }
      .sg-td.col-pri {
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        display: inline-flex !important;
      }
      .sg-pri-pill {
        padding: 3px 8px !important;
        font-size: 11px !important;
      }
      .sg-td.col-date {
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        display: inline-flex !important;
      }
      .sg-date-pill {
        font-size: 11px !important;
        padding: 3px 7px !important;
      }
      .sg-td.col-spec {
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        display: inline-flex !important;
      }
      .sg-spec-pill {
        font-size: 10px !important;
        padding: 3px 6px !important;
      }
      .sg-td.col-format,
      .sg-td.col-rev {
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        display: inline-flex !important;
      }
      .sg-format-pill,
      .sg-rev-pill {
        font-size: 10px !important;
        padding: 2px 5px !important;
      }
      .sg-td.col-time {
        flex: 0 0 auto !important;
        width: auto !important;
        height: auto !important;
        border: none !important;
        padding: 0 !important;
        display: inline-flex !important;
        font-size: 11px !important;
        opacity: 0.65;
        margin-left: auto;
      }

      /* Add row on mobile */
      .sg-add-row {
        height: auto !important;
        padding: 8px 10px !important;
        gap: 8px !important;
      }
      .sg-add-input {
        font-size: 13px !important;
      }
      .sg-add-submit-btn {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        flex-shrink: 0;
      }

      /* Footer summary & battery on mobile */
      .sg-group-footer {
        flex-direction: column !important;
        align-items: stretch !important;
        height: auto !important;
        padding: 12px 12px !important;
        gap: 8px !important;
      }
      .sg-group-footer > div {
        width: 100% !important;
        text-align: left !important;
        padding: 0 !important;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }
      .sg-group-footer > div:empty {
        display: none !important;
      }
      .sg-battery-wrap {
        width: 100% !important;
        height: 10px !important;
        margin-top: 4px;
      }

      /* Mobile Bottom Sheet for Status Picker */
      #statusPickerPopover.status-picker-popover {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 20px 20px 0 0 !important;
        padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 14px)) !important;
        box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.7) !important;
        display: none;
        flex-direction: column !important;
        gap: 8px !important;
        z-index: 9999 !important;
        box-sizing: border-box !important;
        animation: slideUpMobileSheet 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
      }
      #statusPickerPopover.status-picker-popover.open {
        display: flex !important;
      }
      #statusPickerPopover.status-picker-popover::before {
        content: "";
        display: block;
        width: 42px;
        height: 4px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.3);
        margin: 0 auto 8px;
      }
      @keyframes slideUpMobileSheet {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
      }
      .pop-status-item {
        padding: 12px 16px !important;
        font-size: 14px !important;
        border-radius: 9px !important;
        text-align: center !important;
      }
    }



/* ========================================================= */
/* CRITICAL OVERRIDES TO PREVENT #main & DAYLIGHT CONFLICTS  */
/* ========================================================= */

#scopeAppContainer #main,
.scope-frame #main,
#main.sg-board-space,
#main {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Hide wsSwitch if hidden attribute or empty */
.ws-switch[hidden],
select#wsSwitch[hidden] {
  display: none !important;
}

/* ── DAYLIGHT THEME: CRISP, COHESIVE & HARMONIOUS ── */
[data-theme="daylight"] .scope-frame,
[data-theme="daylight"] .scope-grid-app,
[data-theme="daylight"] #scopeAppContainer, [data-theme="mist"] #scopeAppContainer {
  background: #f1f5f9 !important;
  color: #1e293b !important;
}

[data-theme="daylight"] #main,
[data-theme="daylight"] .rep-dashboard,
[data-theme="daylight"] .rep-dash-title-group h2,
[data-theme="daylight"] .rep-dash-date-sub,
[data-theme="daylight"] .rep-card-title,
[data-theme="daylight"] .rep-card-sub,
[data-theme="daylight"] .rep-prio-title,
[data-theme="daylight"] .panel > header h2, [data-theme="mist"] .panel > header h2 {
  color: #0f172a !important;
}
[data-theme="daylight"] .rep-dash-date-sub,
[data-theme="daylight"] .rep-card-sub,
[data-theme="daylight"] .rep-updated-pill,
[data-theme="daylight"] .rep-kpi-desc, [data-theme="mist"] .rep-kpi-desc {
  color: #64748b !important;
}
[data-theme="daylight"] .rep-card,
[data-theme="daylight"] .panel,
[data-theme="daylight"] .stat, [data-theme="mist"] .stat {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.12) !important;
}
[data-theme="daylight"] .rep-kpi-box, [data-theme="mist"] .rep-kpi-box {
  box-shadow:none !important;
}
[data-theme="daylight"] .rep-kpi-box.kpi-red, [data-theme="mist"] .rep-kpi-box.kpi-red {
  background:linear-gradient(145deg,rgba(239,68,68,.12) 0%,#fff 60%) !important;
  border-color:rgba(239,68,68,.22) !important;
}
[data-theme="daylight"] .rep-kpi-box.kpi-cyan, [data-theme="mist"] .rep-kpi-box.kpi-cyan {
  background:linear-gradient(145deg,rgba(13,148,136,.1) 0%,#fff 60%) !important;
  border-color:rgba(13,148,136,.22) !important;
}
[data-theme="daylight"] .rep-kpi-box.kpi-amber, [data-theme="mist"] .rep-kpi-box.kpi-amber {
  background:linear-gradient(145deg,rgba(217,119,6,.1) 0%,#fff 60%) !important;
  border-color:rgba(217,119,6,.22) !important;
}
[data-theme="daylight"] .rep-kpi-box.kpi-green, [data-theme="mist"] .rep-kpi-box.kpi-green {
  background:linear-gradient(145deg,rgba(5,150,105,.1) 0%,#fff 60%) !important;
  border-color:rgba(5,150,105,.22) !important;
}
[data-theme="daylight"] .rep-next7-card, [data-theme="mist"] .rep-next7-card {
  background: #f8fafc !important;
}
[data-theme="daylight"] .rep-nora-card, [data-theme="mist"] .rep-nora-card {
  background: linear-gradient(155deg, rgba(13, 148, 136, 0.12) 0%, #f0fdfa 45%, #ffffff 100%) !important;
  border: 1px solid rgba(13, 148, 136, 0.22) !important;
}
[data-theme="daylight"] .rep-nora-content, [data-theme="mist"] .rep-nora-content {
  background: linear-gradient(160deg, rgba(13, 148, 136, 0.1) 0%, #ffffff 100%) !important;
  border: 1px solid rgba(13, 148, 136, 0.18) !important;
  color: #334155 !important;
}
[data-theme="daylight"] .rep-prio-row, [data-theme="mist"] .rep-prio-row {
  border-bottom-color: #e2e8f0 !important;
}
[data-theme="daylight"] .rep-prio-row:hover, [data-theme="mist"] .rep-prio-row:hover {
  background: #f0fdfa !important;
}
[data-theme="daylight"] .rep-next7-item, [data-theme="mist"] .rep-next7-item {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
}
[data-theme="daylight"] .cal-nav .btn:hover, [data-theme="mist"] .cal-nav .btn:hover {
  color: #0f172a !important;
}

.scope-frame[data-theme="daylight"] .top,
.scope-frame[data-theme="mist"] .top,
[data-theme="daylight"] .scope-frame .top,
[data-theme="mist"] .scope-frame .top {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.scope-frame[data-theme="daylight"] .scope-brand-h1,
.scope-frame[data-theme="mist"] .scope-brand-h1,
[data-theme="daylight"] .scope-brand-h1,
[data-theme="mist"] .scope-brand-h1 {
  color: #0f172a !important;
}

.scope-frame[data-theme="daylight"] .scope-brand-meta,
.scope-frame[data-theme="mist"] .scope-brand-meta,
[data-theme="daylight"] .scope-brand-meta,
[data-theme="mist"] .scope-brand-meta {
  color: #64748b !important;
}

[data-theme="daylight"] .sg-sidebar, [data-theme="mist"] .sg-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
}

[data-theme="daylight"] .sg-ws-select, [data-theme="mist"] .sg-ws-select {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="daylight"] .sg-nav-group-title, [data-theme="mist"] .sg-nav-group-title {
  color: #64748b !important;
}

[data-theme="daylight"] .sg-nav-item, [data-theme="mist"] .sg-nav-item {
  color: #475569 !important;
}

[data-theme="daylight"] .sg-nav-item:hover, [data-theme="mist"] .sg-nav-item:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

[data-theme="daylight"] .sg-nav-item.active, [data-theme="mist"] .sg-nav-item.active {
  background: #eff6ff !important;
  color: #0073ea !important;
  font-weight: 700 !important;
}

[data-theme="daylight"] .sg-nav-badge, [data-theme="mist"] .sg-nav-badge {
  background: #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="daylight"] .sg-board-space,
[data-theme="daylight"] #main.sg-board-space, [data-theme="mist"] #main.sg-board-space {
  background: #f8fafc !important;
}

[data-theme="daylight"] .sg-board-header, [data-theme="mist"] .sg-board-header {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="daylight"] .sg-board-h1, [data-theme="mist"] .sg-board-h1 {
  color: #0f172a !important;
}

[data-theme="daylight"] .sg-board-subtitle, [data-theme="mist"] .sg-board-subtitle {
  color: #64748b !important;
}

[data-theme="daylight"] .sg-board-info-pill, [data-theme="mist"] .sg-board-info-pill {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}

[data-theme="daylight"] .sg-tab, [data-theme="mist"] .sg-tab {
  color: #64748b !important;
}

[data-theme="daylight"] .sg-tab:hover, [data-theme="mist"] .sg-tab:hover {
  color: #0073ea !important;
}

[data-theme="daylight"] .sg-tab.active, [data-theme="mist"] .sg-tab.active {
  color: #0073ea !important;
  border-bottom-color: #0073ea !important;
}

[data-theme="daylight"] .sg-control-bar, [data-theme="mist"] .sg-control-bar {
  background: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="daylight"] .sg-control-bar .sg-search-input, [data-theme="mist"] .sg-control-bar .sg-search-input {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="daylight"] .sg-control-bar .sg-search-input::placeholder, [data-theme="mist"] .sg-control-bar .sg-search-input::placeholder {
  color: #94a3b8 !important;
}

[data-theme="daylight"] .sg-control-bar .sg-filter-btn, [data-theme="mist"] .sg-control-bar .sg-filter-btn {
  background: #ffffff !important;
  color: #334155 !important;
  border: 1px solid #cbd5e1 !important;
}

[data-theme="daylight"] .sg-control-bar .sg-filter-btn:hover, [data-theme="mist"] .sg-control-bar .sg-filter-btn:hover {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

[data-theme="daylight"] .sg-table-container, [data-theme="mist"] .sg-table-container {
  background: #f8fafc !important;
  padding: 24px 28px 48px !important;
}

[data-theme="daylight"] .sg-group, [data-theme="mist"] .sg-group {
  margin-bottom: 32px !important;
}

[data-theme="daylight"] .sg-group-header, [data-theme="mist"] .sg-group-header {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px 10px 0 0 !important;
  padding: 10px 18px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="daylight"] .sg-table-wrap, [data-theme="mist"] .sg-table-wrap {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-top: none !important;
  border-radius: 0 0 10px 10px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="daylight"] .sg-table, [data-theme="mist"] .sg-table {
  background: #ffffff !important;
}

[data-theme="daylight"] .sg-th, [data-theme="mist"] .sg-th {
  background: #f8fafc !important;
  color: #475569 !important;
  border-bottom: 1px solid #e2e8f0 !important;
  border-right: 1px solid #f1f5f9 !important;
  font-weight: 700 !important;
}

[data-theme="daylight"] .sg-td, [data-theme="mist"] .sg-td {
  background: #ffffff !important;
  color: #0f172a !important;
  border-bottom: 1px solid #f1f5f9 !important;
  border-right: 1px solid #f1f5f9 !important;
}

[data-theme="daylight"] .sg-tr:hover .sg-td, [data-theme="mist"] .sg-tr:hover .sg-td {
  background: #f8fafc !important;
}

[data-theme="daylight"] .sg-task-name, [data-theme="mist"] .sg-task-name {
  color: #0f172a !important;
  font-weight: 500 !important;
}

[data-theme="daylight"] .sg-comment-bubble, [data-theme="mist"] .sg-comment-bubble {
  background: #f1f5f9 !important;
  color: #64748b !important;
}
[data-theme="daylight"] .sg-comment-bubble.active, [data-theme="mist"] .sg-comment-bubble.active {
  background: #eff6ff !important;
  color: #0073ea !important;
}

[data-theme="daylight"] .sg-person-badge, [data-theme="mist"] .sg-person-badge {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

[data-theme="daylight"] .sg-date-pill, [data-theme="mist"] .sg-date-pill {
  background: #f1f5f9 !important;
  color: #334155 !important;
}

[data-theme="daylight"] .sg-date-pill.overdue, [data-theme="mist"] .sg-date-pill.overdue {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

[data-theme="daylight"] .sg-add-row, [data-theme="mist"] .sg-add-row {
  background: #fbfcfd !important;
  border-top: 1px solid #e2e8f0 !important;
}

[data-theme="daylight"] .sg-add-input, [data-theme="mist"] .sg-add-input {
  color: #0f172a !important;
}
[data-theme="daylight"] .sg-add-input::placeholder, [data-theme="mist"] .sg-add-input::placeholder {
  color: #94a3b8 !important;
}

[data-theme="daylight"] .sg-add-submit-btn, [data-theme="mist"] .sg-add-submit-btn {
  background: #e2e8f0 !important;
  color: #475569 !important;
}
[data-theme="daylight"] .sg-add-submit-btn:hover, [data-theme="mist"] .sg-add-submit-btn:hover {
  background: #0073ea !important;
  color: #ffffff !important;
}

[data-theme="daylight"] .sg-group-footer, [data-theme="mist"] .sg-group-footer {
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

[data-theme="daylight"] .sg-kanban-board,
[data-theme="daylight"] .sg-k-col, [data-theme="mist"] .sg-k-col {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
}

[data-theme="daylight"] .sg-k-card, [data-theme="mist"] .sg-k-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="daylight"] .sg-gantt-board,
[data-theme="daylight"] .sg-dash-card, [data-theme="mist"] .sg-dash-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #0f172a !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="daylight"] .sg-g-timeline-header,
[data-theme="daylight"] .sg-g-row, [data-theme="mist"] .sg-g-row {
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="daylight"] .sg-g-bar-track, [data-theme="mist"] .sg-g-bar-track {
  background: #f1f5f9 !important;
}

[data-theme="daylight"] .status-picker-popover, [data-theme="mist"] .status-picker-popover {
  background: #ffffff !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.15) !important;
}

/* ── DARK STUDIO THEME: DEEP, ELEGANT & REFINED ── */
[data-theme="dark-studio"] .scope-frame,
.scope-frame[data-theme="dark-studio"],
[data-theme="dark-studio"] .scope-grid-app,
[data-theme="dark-studio"] #scopeAppContainer {
  background: #0b1120 !important;
  color: #e2e8f0 !important;
}

.scope-frame[data-theme="dark-studio"] .top,
[data-theme="dark-studio"] .scope-frame .top {
  background: rgba(15, 23, 42, 0.96) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

/* Compact WBS — OLED header */
.scope-frame[data-theme="compact-wbs"] .top,
[data-theme="compact-wbs"] .scope-frame .top {
  background: rgba(0, 0, 0, 0.96) !important;
  border-bottom: 1px solid rgba(52, 211, 153, 0.18) !important;
}
.scope-frame[data-theme="compact-wbs"],
[data-theme="compact-wbs"] .scope-frame,
[data-theme="compact-wbs"] .scope-grid-app,
[data-theme="compact-wbs"] #scopeAppContainer {
  background: #000000 !important;
  color: #fafafa !important;
}

/* Cyan Glass — Nord frost header */
.scope-frame[data-theme="cyan-glass"] .top,
[data-theme="cyan-glass"] .scope-frame .top {
  background: rgba(10, 14, 20, 0.94) !important;
  border-bottom: 1px solid rgba(136, 192, 208, 0.22) !important;
}
.scope-frame[data-theme="cyan-glass"],
[data-theme="cyan-glass"] .scope-frame,
[data-theme="cyan-glass"] .scope-grid-app,
[data-theme="cyan-glass"] #scopeAppContainer {
  background: #0a0e14 !important;
  color: #eceff4 !important;
}

[data-theme="dark-studio"] .sg-sidebar {
  background: #0f172a !important;
  border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark-studio"] .sg-board-space,
[data-theme="dark-studio"] #main.sg-board-space {
  background: #0b1120 !important;
}

[data-theme="dark-studio"] .sg-board-header {
  background: #0f172a !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark-studio"] .sg-control-bar {
  background: #0b1120 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark-studio"] .sg-table-container {
  background: #0b1120 !important;
}

[data-theme="dark-studio"] .sg-group-header {
  background: #111a2e !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 10px 10px 0 0 !important;
}

[data-theme="dark-studio"] .sg-table-wrap {
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-top: none !important;
  border-radius: 0 0 10px 10px !important;
}

[data-theme="dark-studio"] .sg-th {
  background: #111a2e !important;
  color: #94a3b8 !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark-studio"] .sg-td {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark-studio"] .sg-tr:hover .sg-td {
  background: #162238 !important;
}

/* ── MIST SOFT: contrast + neutre curate (nu griul „stricat” din Daylight) ── */
.scope-frame[data-theme="mist"],
[data-theme="mist"] .scope-frame,
[data-theme="mist"] .scope-grid-app,
[data-theme="mist"] #scopeAppContainer {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
.scope-frame[data-theme="mist"] .top,
[data-theme="mist"] .scope-frame .top {
  background: rgba(255, 255, 255, 0.98) !important;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06) !important;
}
[data-theme="mist"] .sg-sidebar {
  background: #ffffff !important;
  border-right: 1px solid rgba(15, 23, 42, 0.1) !important;
}
[data-theme="mist"] .sg-ws-select {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}
[data-theme="mist"] .sg-nav-group-title { color: #475569 !important; }
[data-theme="mist"] .sg-nav-item { color: #334155 !important; }
[data-theme="mist"] .sg-nav-item:hover { background: #eff6ff !important; color: #0f172a !important; }
[data-theme="mist"] .sg-nav-item.active {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border: 1px solid rgba(29, 78, 216, 0.28) !important;
  font-weight: 700;
}
[data-theme="mist"] .sg-nav-badge {
  background: #e2e8f0 !important;
  color: #334155 !important;
}
[data-theme="mist"] .sg-board-space,
[data-theme="mist"] #main.sg-board-space {
  background: #f1f5f9 !important;
}
[data-theme="mist"] .sg-board-header {
  background: #ffffff !important;
  border-bottom-color: rgba(15, 23, 42, 0.1) !important;
}
[data-theme="mist"] .sg-board-h1 { color: #0f172a !important; }
[data-theme="mist"] .sg-board-subtitle { color: #475569 !important; }
[data-theme="mist"] .sg-search-input,
[data-theme="mist"] .sg-control-bar .sg-search-input {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}
[data-theme="mist"] .sg-search-input::placeholder,
[data-theme="mist"] .sg-control-bar .sg-search-input::placeholder {
  color: #64748b !important;
}
[data-theme="mist"] .sg-filter-btn {
  color: #334155 !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  background: #ffffff !important;
}
[data-theme="mist"] .sg-filter-btn:hover,
[data-theme="mist"] .sg-filter-btn.is-on {
  background: #eff6ff !important;
  border-color: rgba(29, 78, 216, 0.35) !important;
  color: #1d4ed8 !important;
}
[data-theme="mist"] .panel,
[data-theme="mist"] .rep-card {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  box-shadow: 0 8px 24px -12px rgba(15, 23, 42, 0.12) !important;
}
[data-theme="mist"] .scope-sync-indicator,
[data-theme="mist"] .sync.is-ok {
  color: #0f766e !important;
}
[data-theme="mist"] .scope-sync-dot {
  background: #0f766e !important;
}

/* ── Accent split: Daylight teal vs Mist blue (nu Monday #0073ea) ── */
[data-theme="daylight"] .sg-nav-item.active,
.scope-frame[data-theme="daylight"] .sg-nav-item.active {
  background: rgba(13, 148, 136, 0.14) !important;
  color: #0d9488 !important;
  border-color: rgba(13, 148, 136, 0.32) !important;
}
[data-theme="daylight"] .sg-tab:hover,
[data-theme="daylight"] .sg-tab.active,
.scope-frame[data-theme="daylight"] .sg-tab:hover,
.scope-frame[data-theme="daylight"] .sg-tab.active {
  color: #0d9488 !important;
  border-bottom-color: #0d9488 !important;
}
[data-theme="daylight"] .sg-comment-bubble,
.scope-frame[data-theme="daylight"] .sg-comment-bubble {
  color: #0d9488 !important;
  background: rgba(13, 148, 136, 0.12) !important;
}
[data-theme="daylight"] .sg-search-input:focus,
.scope-frame[data-theme="daylight"] .sg-search-input:focus {
  border-color: #0d9488 !important;
}

[data-theme="mist"] .sg-nav-item.active,
.scope-frame[data-theme="mist"] .sg-nav-item.active {
  background: #dbeafe !important;
  color: #1d4ed8 !important;
  border-color: rgba(29, 78, 216, 0.28) !important;
}
[data-theme="mist"] .sg-tab:hover,
[data-theme="mist"] .sg-tab.active,
.scope-frame[data-theme="mist"] .sg-tab:hover,
.scope-frame[data-theme="mist"] .sg-tab.active {
  color: #1d4ed8 !important;
  border-bottom-color: #1d4ed8 !important;
}
[data-theme="mist"] .sg-comment-bubble,
.scope-frame[data-theme="mist"] .sg-comment-bubble {
  color: #1d4ed8 !important;
  background: rgba(29, 78, 216, 0.1) !important;
}
[data-theme="mist"] .sg-search-input:focus,
.scope-frame[data-theme="mist"] .sg-search-input:focus {
  border-color: #1d4ed8 !important;
}

/* Dark Studio — aliniază grid pe teal token (nu sky #38bdf8) */
[data-theme="dark-studio"] .sg-nav-item.active,
.scope-frame[data-theme="dark-studio"] .sg-nav-item.active {
  background: rgba(45, 212, 191, 0.16) !important;
  color: #2dd4bf !important;
  border: 1px solid rgba(45, 212, 191, 0.32) !important;
}
[data-theme="dark-studio"] .sg-tab:hover,
[data-theme="dark-studio"] .sg-tab.active,
.scope-frame[data-theme="dark-studio"] .sg-tab:hover,
.scope-frame[data-theme="dark-studio"] .sg-tab.active {
  color: #2dd4bf !important;
  border-bottom-color: #2dd4bf !important;
}
[data-theme="dark-studio"] .sg-code-badge,
.scope-frame[data-theme="dark-studio"] .sg-code-badge {
  background: rgba(45, 212, 191, 0.14) !important;
  color: #2dd4bf !important;
  border-color: rgba(45, 212, 191, 0.3) !important;
}
[data-theme="dark-studio"] .sg-comment-bubble,
.scope-frame[data-theme="dark-studio"] .sg-comment-bubble {
  background: rgba(45, 212, 191, 0.14) !important;
  color: #2dd4bf !important;
}

/* Cyan Glass Nord — frost blue accents in grid shell */
[data-theme="cyan-glass"] .sg-nav-item.active,
.scope-frame[data-theme="cyan-glass"] .sg-nav-item.active {
  background: rgba(136, 192, 208, 0.16) !important;
  color: #88c0d0 !important;
  border: 1px solid rgba(136, 192, 208, 0.35) !important;
}
[data-theme="cyan-glass"] .sg-tab.active,
.scope-frame[data-theme="cyan-glass"] .sg-tab.active {
  color: #88c0d0 !important;
  border-bottom-color: #88c0d0 !important;
  text-shadow: none !important;
}
[data-theme="cyan-glass"] .scope-grid-app,
[data-theme="cyan-glass"] #scopeAppContainer {
  background:
    radial-gradient(1000px 480px at 15% -5%, rgba(136, 192, 208, 0.14), transparent 55%),
    radial-gradient(900px 420px at 85% 5%, rgba(94, 129, 172, 0.12), transparent 52%),
    #0a0e14 !important;
  color: #eceff4 !important;
}
