/* Společná kostra nástrojů: přepínač aplikací a účet vlevo dole (app-shell.js). */
:root {
    --bt-surface: #ffffff;
    --bt-ink: #404041;
    --bt-muted: #6b7280;
    --bt-line: #e1e5ea;
    --bt-hover: #f1f3f5;
    --bt-current: #e6f5fc;
    --bt-accent: #1d90c4;
    --bt-shadow: 0 8px 28px rgba(9, 30, 66, 0.18), 0 0 1px rgba(9, 30, 66, 0.31);
}
/* Stránka bez tmavého vzhledu (IFC Merge) si dá <html data-bt-theme="light">. */
@media (prefers-color-scheme: dark) {
    :root:not([data-bt-theme="light"]) {
        --bt-surface: #26272b;
        --bt-ink: #e3e1df;
        --bt-muted: #8b8f94;
        --bt-line: #3a3d42;
        --bt-hover: #33363b;
        --bt-current: #1f3a48;
        --bt-accent: #7fd4f5;
        --bt-shadow: 0 8px 28px rgba(0, 0, 0, 0.5), 0 0 1px rgba(255, 255, 255, 0.2);
    }
}

/* ── spouštěč: logo s názvem ─────────────────────────────────────────────── */
.bt-switcher {
    cursor: pointer !important;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    text-align: left;
    border-radius: 6px;
}
.bt-switcher:hover, .bt-switcher[aria-expanded="true"] { background: var(--bt-hover) !important; }
.bt-switcher:focus-visible { outline: 2px solid var(--bt-accent); outline-offset: 1px; }

/* Lišta s logem pro jednoduché nástroje bez vlastního ribbonu (IFC Merge…). */
.bt-topbar {
    display: flex;
    align-items: center;
    height: 60px;
    margin: 0 calc(-1 * var(--bt-gutter, 24px)) 16px;
    padding: 0 12px;
    border-bottom: 1px solid var(--bt-line);
}
.bt-brand { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 4px; }
.bt-brand img { width: 34px; height: 34px; display: block; }
.bt-brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
    font-weight: 600;
}
.bt-brand-a { color: var(--bt-ink); font-size: 14px; letter-spacing: 0.02em; }
.bt-brand-b { color: #57c0ed; font-size: 13px; font-weight: 700; letter-spacing: 0.18em; }

/* ── panel se seznamem ───────────────────────────────────────────────────── */
.bt-apps {
    position: fixed;
    z-index: 10000;
    width: 290px;
    overflow-y: auto;
    padding: 8px;
    background: var(--bt-surface);
    color: var(--bt-ink);
    border-radius: 8px;
    box-shadow: var(--bt-shadow);
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
    font-size: 14px;
}
.bt-apps[hidden] { display: none; }
.bt-apps-title {
    padding: 8px 8px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--bt-muted);
}
.bt-app {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--bt-ink);
    text-decoration: none;
}
.bt-app:hover, .bt-app:focus-visible { background: var(--bt-hover); outline: none; }
.bt-app.is-current { background: var(--bt-current); font-weight: 600; }
.bt-app-name { flex: 1; min-width: 0; }
.bt-app-mark { display: grid; place-items: center; color: var(--bt-muted); }
.bt-app-mark svg { width: 14px; height: 14px; fill: currentColor; }
.bt-tile {
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}
.bt-tile svg { width: 18px; height: 18px; fill: #fff; }
.bt-tile--plain { background: var(--bt-hover); }
.bt-tile--plain svg { fill: var(--bt-muted); width: 16px; height: 16px; }
.bt-sep { height: 1px; margin: 8px -8px; background: var(--bt-line); }

/* ── účet vlevo dole ─────────────────────────────────────────────────────── */
.bt-account {
    position: fixed;
    left: 12px;
    bottom: 12px;
    z-index: 900;
    font-family: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
    font-size: 13px;
}
.bt-account-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 240px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--bt-line);
    border-radius: 999px;
    background: var(--bt-surface);
    color: var(--bt-ink);
    font: inherit;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(9, 30, 66, 0.12);
}
.bt-account-btn:hover { background: var(--bt-hover); }
.bt-account-btn:focus-visible { outline: 2px solid var(--bt-accent); outline-offset: 1px; }
.bt-account-btn svg { width: 18px; height: 18px; margin: 3px; fill: var(--bt-muted); }
.bt-account-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #57c0ed;
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.bt-avatar--big { width: 32px; height: 32px; font-size: 12px; }
.bt-account-menu {
    position: absolute;
    left: 0;
    bottom: calc(100% + 8px);
    min-width: 250px;
    padding: 8px;
    background: var(--bt-surface);
    color: var(--bt-ink);
    border-radius: 8px;
    box-shadow: var(--bt-shadow);
}
.bt-account-menu[hidden] { display: none; }
.bt-account-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 2px; }
.bt-account-who { display: grid; gap: 1px; min-width: 0; }
.bt-account-who strong { font-size: 13px; overflow-wrap: anywhere; }
.bt-account-who small { font-size: 11.5px; color: var(--bt-muted); overflow-wrap: anywhere; }
.bt-account-menu form { margin: 0; }
.bt-menu-item {
    display: block;
    width: 100%;
    padding: 7px 8px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.bt-menu-item:hover { background: var(--bt-hover); }

/* --- Přepínač jako samostatná ikona (interní aplikace s vlastní lištou, tag ikona_aplikaci) --- */
.bt-ikona-aplikaci { align-items: center; background: transparent; border: 0; border-radius: 6px; color: var(--bt-muted);
  cursor: pointer; display: inline-flex; flex: none; height: 34px; justify-content: center; padding: 0; width: 34px; }
.bt-ikona-aplikaci svg { fill: currentColor; height: 18px; width: 18px; }
.bt-ikona-aplikaci:hover, .bt-ikona-aplikaci[aria-expanded="true"] { color: var(--bt-ink); }
