/* Konsilito Ghost desktop app: own window title bar (Tauri window has no system frame). */
html.kg-desktop { --kg-tb: 32px; background: #050506; }
html.kg-desktop body {
    margin-top: var(--kg-tb);
    height: calc(100dvh - var(--kg-tb));
    overflow: hidden;
    transform: translateZ(0); /* fixed overlays are laid out under the title bar */
}
html.kg-desktop #login, html.kg-desktop #chat, html.kg-desktop #sidebar,
html.kg-desktop .chat-main, html.kg-desktop #task-panel { max-height: calc(100dvh - var(--kg-tb)); }

#kg-titlebar {
    position: fixed; top: 0; left: 0; right: 0; height: var(--kg-tb); z-index: 2147483647;
    display: flex; align-items: center; gap: 8px; padding-left: 12px;
    background: linear-gradient(180deg, #0d0d10 0%, #08080a 100%);
    border-bottom: 1px solid #1c1c20; box-shadow: inset 0 -1px 0 rgba(224,165,42,.18);
    color: #a2a2ac; font: 600 11px/1 -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
    letter-spacing: 2.5px; user-select: none; -webkit-user-select: none; cursor: default;
}
#kg-titlebar.kg-mac { padding-left: 80px; justify-content: center; }
#kg-titlebar .kg-tb-logo { width: 16px; height: 16px; pointer-events: none; }
#kg-titlebar .kg-tb-title { pointer-events: none; white-space: nowrap; }
#kg-titlebar .kg-tb-title b { color: #e0a52a; font-weight: 700; }
#kg-titlebar .kg-tb-ctl { margin-left: auto; display: flex; height: 100%; }
#kg-titlebar .kg-tb-btn {
    width: 46px; height: 100%; display: flex; align-items: center; justify-content: center;
    background: transparent; border: 0; padding: 0; color: #a2a2ac; cursor: default;
    transition: background .12s, color .12s;
}
#kg-titlebar .kg-tb-btn svg { width: 10px; height: 10px; stroke: currentColor; fill: none; stroke-width: 1.2; }
#kg-titlebar .kg-tb-btn:hover { background: rgba(255,255,255,.07); color: #f2f2f2; }
#kg-titlebar .kg-tb-btn.kg-close:hover { background: #c42b1c; color: #fff; }
#kg-titlebar .kg-tb-btn:focus-visible { outline: 1px solid #e0a52a; outline-offset: -2px; }
