/* =============================================================================
   Lumifig — top bar polish (loaded after theme.css; selectors are prefixed with
   `html #app-topbar` so they also win over the rules injected by studio_plus.js)
   ============================================================================= */
html #app-topbar { gap: 4px; padding: 0 12px 0 14px; }
html.theme-light #app-topbar { --tb-sep: rgba(0, 0, 0, .09); --tb-ink: #3a3a3c; --tb-ink-strong: #1d1d1f; --tb-hover: rgba(0, 0, 0, .055); }
html:not(.theme-light) #app-topbar { --tb-sep: rgba(255, 255, 255, .09); --tb-ink: #c7c7cc; --tb-ink-strong: #fff; --tb-hover: rgba(255, 255, 255, .08); }

/* Brand */
html #app-topbar .tb-brand { border-right: 0; padding-right: 6px; margin-right: 4px; gap: 10px; }
html #app-topbar .tb-logo { width: 30px; height: 30px; border-radius: 8px; box-shadow: none; background: transparent; }
html #app-topbar .tb-brand-text b { font-size: 13.5px; font-weight: 700; letter-spacing: -.1px; }

/* Groups: no boxes, just a thin hairline between them */
html #app-topbar > .tb-group,
html #app-topbar .tb-right > .tb-group { background: transparent; border: 0; box-shadow: none; padding: 0 6px; gap: 2px; position: relative; }
html #app-topbar > .tb-group + .tb-group::before,
html #app-topbar > .tb-brand + .tb-group::before {
    content: ""; position: absolute; left: -2px; top: 50%; height: 20px; margin-top: -10px; width: 1px; background: var(--tb-sep);
}

/* Icon buttons */
html #app-topbar .tb-btn { height: 32px; min-width: 32px; padding: 0 8px; border: 0; border-radius: 8px; color: var(--tb-ink); background: transparent; font-size: 12.5px; font-weight: 500; gap: 6px; }
html #app-topbar .tb-btn svg { width: 18px; height: 18px; stroke-width: 1.75; }
html #app-topbar .tb-btn:hover { background: var(--tb-hover); color: var(--tb-ink-strong); }
html #app-topbar .tb-btn:active { transform: none; background: var(--tb-hover); }
html #app-topbar .tb-btn:focus-visible { outline: 2px solid #0a84ff; outline-offset: 1px; }
html #app-topbar #us-more-btn { font-size: 18px; line-height: 1; letter-spacing: 1px; }

/* Selects: quiet, button-like, with a proper chevron */
html #app-topbar .tb-select {
    -webkit-appearance: none; appearance: none; height: 32px; border-radius: 8px; border: 0; box-shadow: none;
    background-color: transparent; color: var(--tb-ink); font-size: 12.5px; font-weight: 500; padding: 0 26px 0 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; max-width: none;
    field-sizing: content;   /* width follows the chosen option (Chrome/Edge); others keep the default */
}
html #app-topbar .tb-select:hover { background-color: var(--tb-hover); color: var(--tb-ink-strong); }
html #app-topbar .tb-select:focus { box-shadow: none; outline: none; }
html #app-topbar .tb-select:focus-visible { outline: 2px solid #0a84ff; outline-offset: 1px; }
html:not(.theme-light) #app-topbar .tb-select option { background: #1c1c1e; color: #f5f5f7; }

/* Right side: status · projects · Export · account */
html #app-topbar .tb-right { gap: 6px; }
html #app-topbar .lf-status { font-weight: 500; font-size: 12px; color: #8e8e93; padding: 0 8px; }
html #app-topbar .lf-status i { width: 6px; height: 6px; }

/* Export: calm, solid ink button instead of a loud blue block */
html #app-topbar .tb-btn.primary {
    height: 32px; padding: 0 14px 0 12px; margin-left: 4px; border-radius: 8px; font-size: 13px; font-weight: 600; letter-spacing: -.1px; gap: 7px;
    background: #1d1d1f; color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .14), inset 0 1px 0 rgba(255, 255, 255, .08);
}
html #app-topbar .tb-btn.primary svg { width: 16px; height: 16px; stroke-width: 2; }
html #app-topbar .tb-btn.primary:hover { background: #000; color: #fff; }
html #app-topbar .tb-btn.primary:active { background: #2c2c2e; }
html:not(.theme-light) #app-topbar .tb-btn.primary { background: #f5f5f7; color: #1d1d1f; box-shadow: none; }
html:not(.theme-light) #app-topbar .tb-btn.primary:hover { background: #fff; color: #000; }

/* Account avatar sits at the far right, after Export */
html #app-topbar .lf-avatar { width: 30px; height: 30px; margin: 0 0 0 6px; box-shadow: 0 0 0 1px var(--tb-sep); transition: box-shadow .12s; }
html #app-topbar .lf-avatar:hover { box-shadow: 0 0 0 3px var(--tb-hover), 0 0 0 1px var(--tb-sep); }

/* Narrow screens / tablets: the toolbar scrolls sideways under a solid right-hand group */
html #app-topbar .tb-brand-text span { white-space: nowrap; }
@media (max-width: 1366px) {
    html #app-topbar .tb-brand-text span { display: none; }
    html #app-topbar { padding-right: 0; }
    html #app-topbar .tb-right { padding-right: 12px; }
    html.theme-light #app-topbar .tb-right { background: #fafafc !important; box-shadow: -18px 0 14px -6px #fafafc !important; }
    html:not(.theme-light) #app-topbar .tb-right { background: #15171c !important; box-shadow: -18px 0 14px -6px #15171c !important; }
}
/* Export is the main action: keep its label, also on tablets */
html #app-topbar .tb-btn.primary .lbl { display: inline !important; }

html.theme-light #app-topbar .tb-beta{color:#2f47c9;background:rgba(61,90,254,0.08);border-color:rgba(61,90,254,0.3)}
@media (max-width:1100px){#app-topbar .tb-beta{display:none}}
