/* GRAFYNX Hub V1.6.4.2 | Header-only refinement, previous UI restored.
   The rest of the application deliberately uses its existing V1.6.1 visual system.
   No business screens, modals, forms, tables or dashboard styles are overridden here. */

/* Classic light header — matching the original Grafynx interface. */
.grafynx-workspace .topbar{
  height:70px; min-height:70px;
  background:var(--surface); color:var(--ink);
  border-bottom:1px solid var(--line);
  box-shadow:0 3px 16px rgba(31,15,24,.035);
  padding-inline:clamp(15px,2.8vw,39px);
  z-index:10;
  align-items:center;
}
.grafynx-workspace .topbar-left{gap:10px;min-width:0;}
.grafynx-workspace .topbar .topbar-brand{gap:10px;min-width:0;white-space:nowrap;}
/* Transparent official logo — no tile, border, or glowing background. */
.grafynx-workspace .topbar .brand-symbol.brand-mark{
  width:29px;height:40px;min-width:29px;
  padding:0;border:0;border-radius:0;background:transparent;
  box-shadow:none;overflow:visible;display:flex;align-items:center;justify-content:center;
}
.grafynx-workspace .topbar .brand-symbol.brand-mark img{
  width:100%;height:100%;object-fit:contain;display:block;
}
.grafynx-workspace .topbar .brand-name{gap:1px;line-height:1.15;min-width:0;}
.grafynx-workspace .topbar .brand-name strong{display:flex;align-items:center;min-height:22px;}
.grafynx-workspace .topbar .brand-wordmark img{width:112px;height:auto;max-height:25px;object-fit:contain;}
.grafynx-workspace .topbar .brand-name small{color:var(--muted);font-size:9px;letter-spacing:.045em;margin-top:1px;}
/* Light/dark marks follow the user's in-app theme setting. */
.grafynx-workspace .topbar .brand-mark-dark,
.grafynx-workspace .topbar .brand-wordmark-dark{display:none!important;}
html[data-theme="dark"] .grafynx-workspace .topbar .brand-mark-light,
html[data-theme="dark"] .grafynx-workspace .topbar .brand-wordmark-light{display:none!important;}
html[data-theme="dark"] .grafynx-workspace .topbar .brand-mark-dark,
html[data-theme="dark"] .grafynx-workspace .topbar .brand-wordmark-dark{display:block!important;}
.grafynx-workspace .topbar .top-nav{background:var(--bg);border:1px solid var(--line);border-radius:24px;}
.grafynx-workspace .topbar .top-nav .nav-link{color:var(--muted);}
.grafynx-workspace .topbar .top-nav .nav-link:hover{color:var(--ink);background:var(--chip);}
.grafynx-workspace .topbar .top-nav .nav-link.active{
  color:#fff;background:var(--pink);box-shadow:none;
}
.grafynx-workspace .topbar .search-launch,
.grafynx-workspace .topbar .header-actions .icon-button{
  background:var(--surface);color:var(--muted);
  border:1px solid var(--line);box-shadow:none;
}
.grafynx-workspace .topbar .search-launch:hover,
.grafynx-workspace .topbar .header-actions .icon-button:hover{background:var(--chip);color:var(--ink);}
.grafynx-workspace .topbar .search-launch kbd{border-color:var(--line);color:var(--muted);}
.grafynx-workspace .topbar .top-create{background:var(--pink);box-shadow:none;}

/* Sidebar overlay: unchanged main-shell width, header never moves. */
.grafynx-workspace .sidebar{position:fixed;z-index:26;}
@media(min-width:801px){
  .grafynx-workspace .sidebar{top:96px;max-height:calc(100dvh - 120px);}
  .grafynx-workspace .sidebar.is-expanded{top:12px;max-height:calc(100dvh - 24px);}
  .grafynx-workspace .main-shell{margin-left:91px!important;min-width:0;}
}
/* Existing magenta sidebar styling and navigation remain as in previous version. */
.grafynx-workspace .rail-brand-mark{display:none!important;}
@media(max-width:800px){
  .grafynx-workspace .topbar{height:66px;min-height:66px;padding-inline:13px;gap:7px;}
  .grafynx-workspace .topbar-left{gap:8px;}
  .grafynx-workspace .topbar .topbar-brand{gap:7px;}
  .grafynx-workspace .topbar .mobile-menu{
    display:grid;place-items:center;width:39px;height:39px;flex:none;
    background:var(--chip);color:var(--ink);border:1px solid var(--line);border-radius:11px;
  }
  .grafynx-workspace .topbar .brand-symbol.brand-mark{width:24px;height:34px;min-width:24px;}
  .grafynx-workspace .topbar .brand-wordmark img{width:98px;max-height:24px;}
  .grafynx-workspace .topbar .brand-name small{font-size:8px;}
  .grafynx-workspace .main-shell{margin-left:0!important;}
  .grafynx-workspace .sidebar{top:0;bottom:0;left:0;max-height:100dvh;z-index:27;}
  .grafynx-workspace .nav-scrim.is-visible{z-index:26;}
}
@media(max-width:380px){
  .grafynx-workspace .topbar{padding-inline:9px;gap:5px;}
  .grafynx-workspace .topbar .brand-symbol.brand-mark{width:21px;min-width:21px;height:31px;}
  .grafynx-workspace .topbar .brand-wordmark img{width:85px;max-height:21px;}
  .grafynx-workspace .topbar .topbar-brand{gap:6px;}
  .grafynx-workspace .topbar-left{gap:6px;}
}
@media(prefers-reduced-motion:reduce){
  .grafynx-workspace .topbar *{transition:none!important;animation:none!important;}
}
