/* FL Buddy 7 · Phase 1 – Workspace shell */
:root{--flb7-bg:#061c24;--flb7-panel:#0a2731;--flb7-panel2:#0c303b;--flb7-line:rgba(104,206,201,.16);--flb7-accent:#16c3c7;--flb7-text:#f2f8f8;--flb7-muted:#9bb7bc}
body.flb7-workspace{background:radial-gradient(circle at 40% -20%,var(--flb-light-teal-soft, rgba(20,141,151,.13)),transparent 34%),var(--flb7-bg)}
body.flb7-workspace .app-shell{grid-template-columns:264px minmax(0,1fr)}
body.flb7-workspace .sidebar{width:264px;background:linear-gradient(180deg,var(--flb-light-surface, #07252e) 0%,var(--flb-light-surface, #061d25) 100%);border-right:1px solid var(--flb7-line);padding:16px 10px 12px}
.flb7-brand{display:flex;align-items:center;gap:10px;padding:2px 10px 15px}.flb7-brand img{width:38px;height:38px;border-radius:12px}.flb7-brand strong{font-size:18px;letter-spacing:.02em}.flb7-brand small{display:block;color:var(--flb-light-accent-ink, #4bd9d3);font-size:9px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;margin-top:2px}
body.flb7-workspace .brand-block{display:none}
.flb7-nav{display:grid;gap:3px;overflow:auto;padding:2px 0 10px}.flb7-nav-section{border-radius:12px}.flb7-nav-main{width:100%;min-height:42px;border:0;background:transparent;color:var(--flb-light-ink, #edf8f7);border-radius:10px;display:flex;align-items:center;gap:11px;padding:0 11px;font:inherit;font-weight:800;cursor:pointer;text-align:left}.flb7-nav-main:hover,.flb7-nav-main.is-active{background:linear-gradient(90deg,var(--flb-light-teal-soft, rgba(13,177,183,.23)),var(--flb-light-teal-soft, rgba(13,177,183,.08)));color:var(--flb-light-ink, #fff)}.flb7-nav-main svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8}.flb7-nav-main .chev{margin-left:auto;font-size:15px;color:var(--flb-light-muted, #8fb0b5);transition:.2s}.flb7-nav-section.open .chev{transform:rotate(90deg)}
.flb7-subnav{display:none;padding:2px 0 5px 37px}.flb7-nav-section.open .flb7-subnav{display:grid}.flb7-subnav button{border:0;background:transparent;color:var(--flb-light-muted, #a8c0c4);min-height:31px;text-align:left;padding:4px 8px;border-radius:8px;font:inherit;font-size:13px;cursor:pointer}.flb7-subnav button:hover,.flb7-subnav button.is-active{color:var(--flb-light-ink, #fff);background:var(--flb-light-teal-soft, rgba(28,172,177,.12))}
body.flb7-workspace .side-nav{display:none}body.flb7-workspace .sidebar-bottom>.nav-item{display:none}
.flb7-side-wordmark{margin-top:auto;padding:12px 12px 5px;color:var(--flb-light-accent-ink, #37d1d0);font-size:11px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.flb7-side-wordmark small{display:block;color:var(--flb-light-muted, #789ba1);font-size:9px;margin-top:5px;letter-spacing:.12em}
body.flb7-workspace .main-content{padding-top:116px;position:relative;min-width:0}
.flb7-globalbar{position:fixed;left:264px;right:0;top:0;height:58px;z-index:600;background:var(--flb-light-surface, rgba(6,28,36,.94));backdrop-filter:blur(16px);border-bottom:1px solid var(--flb7-line);display:flex;align-items:center;gap:14px;padding:8px 18px}.flb7-search{position:relative;flex:1;max-width:660px}.flb7-search input{width:100%;height:40px;border-radius:10px;border:1px solid var(--flb-light-outline, rgba(114,190,192,.2));background:var(--flb-light-surface, #0a2832);color:var(--flb-light-ink, #edf8f7);padding:0 90px 0 40px;outline:none}.flb7-search input:focus{border-color:var(--flb-light-outline, rgba(35,208,207,.65));box-shadow:0 0 0 3px rgba(35,208,207,.08)}.flb7-search .mag{position:absolute;left:13px;top:10px;color:var(--flb-light-muted, #9eb8bc)}.flb7-search kbd{position:absolute;right:9px;top:9px;border:1px solid var(--flb-light-line, #36545b);background:var(--flb-light-surface, #102f38);color:var(--flb-light-muted, #9db5ba);border-radius:6px;padding:3px 7px;font-size:11px}.flb7-global-spacer{flex:1}.flb7-user{display:flex;align-items:center;gap:9px;color:var(--flb-light-ink, #f1f8f8)}.flb7-user .avatar{width:34px;height:34px}.flb7-user small{display:block;color:var(--flb-light-muted, #8faeb3);font-size:11px}
.flb7-tabsbar{position:fixed;left:264px;right:0;top:58px;height:54px;z-index:590;background:var(--flb-light-surface, #071f28);border-bottom:1px solid var(--flb7-line);display:flex;align-items:end;padding:6px 14px 0;gap:5px;overflow-x:auto;overflow-y:hidden}.flb7-tab{height:42px;min-width:130px;max-width:220px;border:1px solid var(--flb-light-outline, rgba(110,190,192,.14));border-bottom:0;background:var(--flb-light-surface, #0a2832);color:var(--flb-light-muted, #b9cccf);border-radius:10px 10px 0 0;display:flex;align-items:center;gap:8px;padding:0 10px;font:inherit;font-size:12px;font-weight:750;cursor:pointer;white-space:nowrap}.flb7-tab.active{background:linear-gradient(180deg,var(--flb-light-teal-soft, #0c5962),var(--flb-light-surface, #0a3944));color:var(--flb-light-ink, #fff);border-color:var(--flb-light-outline, rgba(31,210,210,.42));box-shadow:inset 0 -2px 0 #18c9cc}.flb7-tab-label{overflow:hidden;text-overflow:ellipsis}.flb7-tab-close{margin-left:auto;color:var(--flb-light-muted, #91aeb2);font-size:17px;line-height:1}.flb7-tab-close:hover{color:var(--flb-light-ink, #fff)}.flb7-tab-add{min-width:42px;width:42px;justify-content:center;font-size:21px}.flb7-tabs-empty{color:var(--flb-light-muted, #76979d);padding:10px 8px;font-size:12px}
.flb7-search-results{position:fixed;z-index:900;top:52px;left:282px;width:min(660px,calc(100vw - 310px));max-height:420px;overflow:auto;background:var(--flb-light-surface, #092731);border:1px solid var(--flb-light-outline, rgba(69,201,201,.25));border-radius:0 0 14px 14px;box-shadow:0 24px 70px rgba(0,0,0,.48);padding:8px}.flb7-search-results[hidden]{display:none}.flb7-search-group{padding:7px 9px 4px;color:var(--flb-light-accent-ink, #5fd5d1);font-size:10px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}.flb7-search-hit{width:100%;border:0;background:transparent;color:var(--flb-light-ink, #e9f4f4);border-radius:9px;padding:10px;display:flex;align-items:center;gap:10px;text-align:left;cursor:pointer}.flb7-search-hit:hover,.flb7-search-hit.active{background:var(--flb-light-teal-soft, rgba(24,188,191,.14))}.flb7-search-hit small{margin-left:auto;color:var(--flb-light-muted, #7f9fa5)}.flb7-search-empty{padding:18px;color:var(--flb-light-muted, #92adb2);text-align:center}
body.flb7-workspace .page-view{padding-top:0}body.flb7-workspace .page-view>.topbar:first-child{display:none}
body.flb7-workspace .profile-mini{border-top:1px solid var(--flb-light-outline, rgba(104,206,201,.12));margin-top:8px}
@media(max-width:980px){body.flb7-workspace .app-shell{grid-template-columns:1fr}body.flb7-workspace .sidebar{width:min(310px,88vw)}.flb7-globalbar,.flb7-tabsbar{left:0}.flb7-globalbar{padding-left:58px}.flb7-user>div:not(.avatar){display:none}.flb7-search{max-width:none}.flb7-search kbd{display:none}.flb7-search-results{left:58px;width:calc(100vw - 76px)}body.flb7-workspace .main-content{padding-top:116px}}
@media(max-width:640px){.flb7-globalbar{height:54px;padding-right:10px;gap:7px}.flb7-tabsbar{top:54px;height:49px;padding-left:8px}.flb7-tab{height:38px;min-width:112px}.flb7-tab-add{min-width:38px}.flb7-search input{height:38px;font-size:13px;padding-right:12px}.flb7-global-spacer,.flb7-user{display:none}body.flb7-workspace .main-content{padding-top:105px}}

/* Phase 19A – persistent workspace polish */
.flb7-tabsbar{scrollbar-width:thin;scroll-behavior:smooth}.flb7-tab{flex:0 0 auto}.flb7-tab.active{position:relative}.flb7-tab.active:after{content:'';position:absolute;left:10px;right:10px;bottom:0;height:2px;border-radius:2px;background:currentColor;opacity:.65}.flb7-tab:focus-visible{outline:2px solid var(--flb7-accent);outline-offset:-2px}.flb7-tab-close{border-radius:5px;padding:0 2px}.flb7-tab-close:hover{background:rgba(255,255,255,.09)}
@media(max-width:640px){.flb7-tabsbar{scroll-snap-type:x proximity}.flb7-tab{scroll-snap-align:start;max-width:170px}}

/* Desktop: search can shrink while the account controls stay within the header. */
@media (min-width: 981px) {
  body.flb7-workspace .flb7-globalbar {
    box-sizing: border-box;
    width: auto;
    min-width: 0;
    flex-wrap: nowrap;
    gap: 10px;
  }
  body.flb7-workspace .flb7-globalbar > .flb7-search {
    flex: 1 1 660px;
    min-width: 0;
  }
  body.flb7-workspace .flb7-globalbar > .flb7-global-spacer {
    flex: 1 1 0;
    min-width: 0;
  }
  body.flb7-workspace .flb7-header-controls,
  body.flb7-workspace .flb7-globalbar > .flb7-user {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
  }
  body.flb7-workspace .flb7-globalbar :is(.flb7-header-controls > button, .flb7-globalbar > .flb7-event-bell, .flb7-quick-trigger) {
    position: relative;
    inset: auto;
    margin: 0;
    height: 36px;
    max-height: 36px;
    width: auto;
    flex: 0 0 auto;
    align-self: center;
    white-space: nowrap;
  }
  body.flb7-workspace .flb7-globalbar > .flb7-user > .avatar {
    flex: 0 0 34px;
  }
  body.flb7-workspace .flb7-globalbar > .flb7-user > div:last-child {
    max-width: clamp(90px, 12vw, 175px);
  }
  body.flb7-workspace .flb7-globalbar > .flb7-user :is(strong, small) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
