/* Uygulama kabuğu (sol menü, üst bar, breadcrumb) stilleri; hq-tokens.css token'larıyla. */
/* Kabuk yükseklikleri (100vh) zoom telafisi için zoom-control.css'tedir; burada yazılırsa telafiyi ezer. */

/* ------------------------------------------------------------------ */
/*  İskelet                                                            */
/* ------------------------------------------------------------------ */

.hq-app {
    display: flex;
    align-items: stretch;
    background-color: var(--bg);
}

.hq-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.hq-content {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 16px 20px 0;
}

.hq-content > #page {
    flex: 1 0 auto;
}

.hq-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 16px;
    margin-top: 16px;
    padding: 14px 0 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--muted);
}

.hq-footer a {
    color: var(--muted);
    text-decoration: none;
}

.hq-footer a:hover {
    color: var(--text);
}

/* Ortak ikon düğmesi (üst bar ve menü başlığı). */
.hq-iconbtn {
    position: relative;
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-2);
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.hq-iconbtn:hover,
.hq-iconbtn[aria-expanded="true"] {
    background: var(--hover);
    color: var(--text);
}

.hq-iconbtn:focus-visible,
.hq-seg-btn:focus-visible,
.hq-account:focus-visible,
.hq-nav-link:focus-visible,
.breadcrumb-switcher-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* Kabuk açılır menüleri (kullanıcı, zoom, bildirim, breadcrumb seçici). hq-components.css bu dosyadan sonra yüklenir ve .dropdown-menu
   değişkenlerini yazar; kabuk menüsünün değerleri daha özgül seçiciyle kazanır. */
.dropdown-menu.hq-menu {
    --bs-dropdown-font-size: 0.8125rem;
    --bs-dropdown-color: var(--text);
    --bs-dropdown-bg: var(--surface);
    --bs-dropdown-border-color: var(--border);
    --bs-dropdown-border-radius: var(--radius-lg);
    --bs-dropdown-link-color: var(--text);
    --bs-dropdown-link-hover-color: var(--text);
    --bs-dropdown-link-hover-bg: var(--hover);
    --bs-dropdown-link-active-color: var(--accent-text);
    --bs-dropdown-link-active-bg: var(--accent-soft);
    --bs-dropdown-header-color: var(--text);
    --bs-dropdown-divider-bg: var(--border);
    --bs-dropdown-item-padding-y: 0.3rem;
    box-shadow: var(--shadow);
}

/* ------------------------------------------------------------------ */
/*  Sol menü                                                           */
/* ------------------------------------------------------------------ */

/* z-index: sticky menü içerik kartlarının üstünde kalsın (daraltılmış menüde hesap menüsü içeriğin üstüne açılır), üst barın
   (1030) altında. Mobil panel değeri aşağıdaki media'dadır. */
.hq-sidebar {
    position: sticky;
    top: 0;
    z-index: 1025;
    flex: none;
    display: flex;
    flex-direction: column;
    width: 224px;
    padding: 10px 8px 8px;
    border-right: 1px solid var(--border);
    background: var(--side);
}

.hq-sidebar-head {
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 34px;
    margin-bottom: 4px;
}

.hq-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    padding: 0 6px;
}

.hq-logo {
    display: block;
    max-width: 100%;
    width: auto;
}

/* Logo lacivert; koyu temada açık renkli varyantı gösterilir. */
.hq-logo-dark,
[data-bs-theme=dark] .hq-logo-light {
    display: none;
}

[data-bs-theme=dark] .hq-logo-dark {
    display: block;
}

/* Sembol logo yalnız daraltılmış menüde (tam logo 56px'e sığmaz). */
.hq-brand-symbol {
    display: none;
}

.hq-sidebar-collapse {
    margin-left: auto;
}

.hq-collapse-icon {
    display: inline-flex;
    transition: transform 0.15s ease;
}

.hq-sidebar-close {
    display: none;
    margin-left: auto;
}

.hq-sidebar-body {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 -8px;
    padding: 0 8px;
    overflow-y: auto;
}

.hq-nav,
.hq-nav-list,
.hq-nav-sub {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hq-nav-label {
    padding: 14px 8px 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

.hq-nav-group:first-child .hq-nav-label {
    padding-top: 6px;
}

.hq-sidebar .hq-nav-link {
    display: flex;
    align-items: center;
    gap: 9px;
    height: var(--nav-h);
    margin-bottom: 1px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    color: var(--text-2);
    text-decoration: none;
    white-space: nowrap;
}

.hq-sidebar .hq-nav-link:hover {
    background: var(--hover);
    color: var(--text);
}

.hq-sidebar .hq-nav-link.active {
    background: var(--active);
    color: var(--text);
}

/* Açılır grubun başlığı, içindeki sayfa aktifken yalnız açık kalır; vurguyu alt öğe taşır. */
.hq-sidebar .hq-nav-toggle.active {
    background: transparent;
}

.hq-nav-icon {
    flex: none;
    display: inline-flex;
    justify-content: center;
    width: 16px;
    font-size: 13px;
    color: var(--muted);
}

.hq-nav-link.active .hq-nav-icon {
    color: var(--accent-text);
}

.hq-nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Bağlantının line-height: 1'i kutuyu yazı boyutuna eşitler; overflow: hidden da g/ğ/y'nin alt kuyruğunu keserdi. */
    line-height: 1.4;
}

.hq-nav-caret {
    display: inline-flex;
    margin-left: auto;
    font-size: 10px;
    color: var(--muted);
    transition: transform 0.15s ease;
}

.hq-nav-toggle[aria-expanded="true"] .hq-nav-caret {
    transform: rotate(90deg);
}

/* Bootstrap .nav yatay flex'tir; alt menü dikey dizilir. */
.hq-sidebar .hq-nav-sub.nav {
    flex-direction: column;
    flex-wrap: nowrap;
}

.hq-nav-sub .hq-nav-link {
    padding-left: 22px;
}

.hq-sidebar-foot {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.hq-account {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 5px 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 13px;
    text-align: left;
}

.hq-account:hover,
.hq-account[aria-expanded="true"] {
    background: var(--hover);
}

.hq-avatar {
    flex: none;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 10px;
    font-weight: 600;
}

.hq-account-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.25;
}

.hq-account-name,
.hq-account-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hq-account-name {
    font-weight: 600;
}

.hq-account-role {
    font-size: 11.5px;
    color: var(--muted);
}

.hq-account-more {
    display: inline-flex;
    margin-left: auto;
    color: var(--muted);
}

.hq-account-menu {
    min-width: 15rem;
}

.hq-account-menu-name {
    font-size: 13px;
    font-weight: 600;
}

.hq-account-menu-meta {
    font-size: 12px;
    color: var(--muted);
}

.hq-sidebar-backdrop {
    display: none;
}

/* Masaüstünde ikon-only daraltma (durum: <html class="hq-sidebar-collapsed">, shell/sidebar.ts). */
@media (min-width: 1200px) {
    .hq-sidebar-collapsed .hq-sidebar {
        width: 56px;
    }

    .hq-sidebar-collapsed .hq-brand-full,
    .hq-sidebar-collapsed .hq-nav-text,
    .hq-sidebar-collapsed .hq-nav-caret,
    .hq-sidebar-collapsed .hq-account-text,
    .hq-sidebar-collapsed .hq-account-more {
        display: none;
    }

    .hq-sidebar-collapsed .hq-brand-symbol {
        display: block;
    }

    /* Sembol ve daraltma düğmesi 40px'lik iç genişliğe yan yana sığmaz; alt alta dizilir. */
    .hq-sidebar-collapsed .hq-sidebar-head {
        flex-direction: column;
        justify-content: center;
        gap: 6px;
    }

    .hq-sidebar-collapsed .hq-sidebar-collapse {
        margin-left: 0;
    }

    .hq-sidebar-collapsed .hq-collapse-icon {
        transform: rotate(180deg);
    }

    /* Grup adı yerine ince ayraç: gruplar daraltılmış menüde de ayrışır. */
    .hq-sidebar-collapsed .hq-nav-label {
        height: 0;
        margin: 8px 6px;
        padding: 0;
        overflow: hidden;
        border-top: 1px solid var(--border);
    }

    .hq-sidebar-collapsed .hq-sidebar .hq-nav-link,
    .hq-sidebar-collapsed .hq-nav-sub .hq-nav-link {
        justify-content: center;
        padding: 0;
    }

    .hq-sidebar-collapsed .hq-account {
        justify-content: center;
        padding: 5px 0;
    }
}

/* 1200px altında sol menü açılır paneldir (offcanvas). */
@media (max-width: 1199.98px) {
    .hq-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1045;
        width: 264px;
        max-width: 85vw;
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform 0.2s ease, visibility 0.2s;
        box-shadow: var(--shadow);
    }

    .hq-sidebar-open .hq-sidebar {
        visibility: visible;
        transform: none;
    }

    .hq-sidebar-open .hq-sidebar-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1040;
        background: var(--bs-black);
        opacity: 0.4;
    }

    /* hq-sidebar-open sınıfı <html>'e eklenir (shell/sidebar.ts); kilit doğrudan kök öğede ki arka plan kaymasın. */
    html.hq-sidebar-open {
        overflow: hidden;
    }

    .hq-sidebar-collapse {
        display: none;
    }

    .hq-sidebar-close {
        display: inline-grid;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hq-sidebar,
    .hq-collapse-icon,
    .hq-nav-caret {
        transition: none;
    }
}

/* ------------------------------------------------------------------ */
/*  Üst bar                                                            */
/* ------------------------------------------------------------------ */

/* Falcon üst barı gibi yapışkan: sayfa içi sticky-top özetlerin (1020) üstünde, mobil menü panelinin (1045) altında. Zemin opak
   kalmalı ki kaydırılan içerik altından görünmesin. Yükseklik vh'ye bağlı olmadığı için zoom telafisi gerekmez. */
.hq-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: var(--hq-topbar-h);
    padding: 8px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.hq-menu-toggle {
    display: none;
}

/* Menü panel olduğunda (1200px altı) logo üst barda görünür; masaüstünde sol menünün başındadır. */
.hq-topbar-brand {
    display: none;
    align-items: center;
    flex: none;
}

.hq-crumbs {
    flex: 1 1 auto;
    min-width: 0;
}

.hq-topbar-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.hq-zoom-toggle {
    display: inline-flex;
    gap: 5px;
    width: auto;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 500;
}

.hq-zoom-label {
    font-variant-numeric: tabular-nums;
}

/* Tema segmenti: Sistem / Açık / Koyu (seçili düğme aria-pressed="true" + .active). */
.hq-seg {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}

.hq-seg-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 24px;
    padding: 0 9px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.hq-seg-btn:hover {
    color: var(--text);
}

.hq-seg-btn.active {
    background: var(--surface);
    color: var(--text);
    box-shadow: 0 0 0 1px var(--border), var(--shadow);
}

.hq-notification-count {
    position: absolute;
    top: 0;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--bad);
    color: var(--bg);
    font-size: 10px;
    font-weight: 600;
    line-height: 16px;
    text-align: center;
}

@media (max-width: 1199.98px) {
    .hq-menu-toggle {
        display: inline-grid;
    }

    .hq-topbar-brand {
        display: flex;
    }
}

@media (max-width: 575.98px) {
    .hq-topbar {
        padding: 8px 12px;
    }

    .hq-content {
        padding: 12px 12px 0;
    }

    .hq-seg-text {
        display: none;
    }
}

/* ------------------------------------------------------------------ */
/*  Breadcrumb ve kayıt seçici (custom.css'ten token'larla taşındı)    */
/* ------------------------------------------------------------------ */

/* Ayraç Falcon'daki gibi '»' (Bootstrap varsayılanı '/'). */
.hq-breadcrumb {
    --bs-breadcrumb-divider: '»';
    --bs-breadcrumb-margin-bottom: 0;
    --bs-breadcrumb-divider-color: var(--muted);
    --bs-breadcrumb-item-active-color: var(--text);
    --bs-breadcrumb-item-padding-x: 0.4rem;
    flex-wrap: wrap;
    row-gap: 2px;
    font-weight: 500;
    color: var(--muted);
}

.hq-breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.hq-breadcrumb a:hover {
    color: var(--text);
}

.hq-breadcrumb .breadcrumb-item.active {
    font-weight: 600;
}

.breadcrumb-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Ad bağlantısı ve yanındaki açılır menü düğmesi; menü yalnız düğmeyle açılır. */
.breadcrumb-switcher-group {
    display: inline-flex;
    align-items: center;
}

.breadcrumb-switcher-toggle {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    margin-left: 0.25rem;
    padding: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    font-size: 9px;
    line-height: 1;
    color: var(--muted);
    text-decoration: none;
    box-shadow: none;
}

.breadcrumb-switcher-toggle:hover,
.breadcrumb-switcher-toggle[aria-expanded="true"] {
    background-color: var(--hover);
    color: var(--accent-text);
}

.breadcrumb-switcher-menu {
    width: 20rem;
    max-width: calc(100vw - 2rem);
}

.breadcrumb-switcher-search {
    padding: 8px;
    border-bottom: 1px solid var(--border);
}

.breadcrumb-switcher-list {
    max-height: 22rem;
    padding: 4px 0;
    overflow-y: auto;
}

.breadcrumb-switcher-status {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--muted);
}

.breadcrumb-switcher-check {
    visibility: hidden;
    width: 1rem;
    flex-shrink: 0;
}

.breadcrumb-switcher-menu .dropdown-item.active .breadcrumb-switcher-check {
    visibility: visible;
}

.breadcrumb-switcher-spinner {
    flex-shrink: 0;
}

/* ------------------------------------------------------------------ */
/*  Bildirim menüsü ve öğesi (öğe Bildirimler sayfasında da kullanılır) */
/* ------------------------------------------------------------------ */

.hq-notification-menu {
    width: 22rem;
    max-width: calc(100vw - 2rem);
    overflow: hidden;
}

.hq-notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.hq-notification-head h6 {
    font-size: 13px;
    font-weight: 600;
}

.hq-notification-action {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-text);
    text-decoration: none;
}

.hq-notification-action.disabled {
    color: var(--muted);
    cursor: default;
}

.hq-notification-list {
    max-height: 30rem;
}

.hq-notification-item {
    padding: 0;
    border-color: var(--border);
    background: transparent;
}

.hq-notification-link {
    display: flex;
    gap: 10px;
    padding: 10px 14px;
    color: var(--text);
    text-decoration: none;
}

.hq-notification-link:hover {
    background: var(--hover);
    color: var(--text);
}

.hq-notification-link.notification-unread {
    background: var(--accent-soft);
}

.hq-notification-icon {
    flex: none;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--surface-2);
    font-size: 14px;
}

.hq-notification-body {
    flex: 1 1 auto;
    min-width: 0;
}

.hq-notification-subject {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
    font-weight: 600;
}

.hq-notification-text {
    font-size: 12px;
    color: var(--text-2);
    overflow-wrap: anywhere;
}

.hq-notification-text p:last-child {
    margin-bottom: 0;
}

.hq-notification-time {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    font-size: 11px;
    color: var(--muted);
}

.hq-notification-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--muted);
}

.hq-notification-empty .fa-bell-slash,
.hq-notification-empty svg {
    margin-bottom: 12px;
    font-size: 2.5rem;
    opacity: 0.3;
}

.hq-notification-empty h6 {
    font-size: 13px;
    color: var(--muted);
}

.hq-notification-empty p {
    font-size: 12px;
}

.hq-notification-foot {
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.hq-notification-foot a {
    font-size: 12px;
    font-weight: 500;
    color: var(--accent-text);
    text-decoration: none;
}

/* ------------------------------------------------------------------ */
/*  Giriş ekranları kabuğu                                             */
/* ------------------------------------------------------------------ */

.hq-auth {
    background: var(--bg);
}

.hq-auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 16px;
}

.hq-auth-col {
    width: 100%;
    max-width: 460px;
}

.hq-auth-brand {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

/* ------------------------------------------------------------------ */
/*  Falcon scrollbarInit karşılığı: kaydırılabilir alanlar ince çubuk  */
/* ------------------------------------------------------------------ */

.scrollbar,
.scrollbar-overlay {
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border-strong) transparent;
}

/* ------------------------------------------------------------------ */
/*  Arama paleti (Cmd/Ctrl+K) ve üst bar tetikleyicisi                 */
/* ------------------------------------------------------------------ */

.hq-search-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 5px 0 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    cursor: pointer;
}

.hq-search-trigger:hover {
    background: var(--hover);
    color: var(--text);
}

.hq-search-trigger:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.hq-search-text {
    min-width: 56px;
    text-align: left;
}

/* Bootstrap kbd koyu zeminlidir; palet ipuçları ve tetikleyici kabuk yüzeyiyle uyumlu çerçeveli tuş görünümü kullanır. */
.hq-search-kbd,
.hq-palette kbd {
    padding: 1px 5px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--surface-2);
    color: var(--text-2);
    font-family: var(--font-sans);
    font-size: 11px;
    line-height: 1.4;
    box-shadow: none;
}

@media (max-width: 767.98px) {
    .hq-search-trigger {
        justify-content: center;
        width: 30px;
        padding: 0;
        border-color: transparent;
        background: transparent;
        font-size: 14px;
    }

    .hq-search-text,
    .hq-search-kbd {
        display: none;
    }
}

/* Bootstrap modal'ının (1055) ve toast'ların üstünde; arka plan modal karartmasıyla aynı karışım. */
.hq-palette {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 16px 16px;
    background-color: color-mix(in srgb, var(--bs-black) 38%, transparent);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

[data-bs-theme=dark] .hq-palette {
    background-color: color-mix(in srgb, var(--bs-black) 60%, transparent);
}

body.hq-palette-open {
    overflow: hidden;
}

.hq-palette-box {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 560px;
    max-height: min(580px, 76vh);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--bs-black) 18%, transparent);
}

.hq-palette-search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    margin: 12px;
    padding: 0 12px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 0 0 3px var(--accent-soft);
    color: var(--muted);
    cursor: text;
}

.hq-palette-input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 15px;
}

.hq-palette-input::placeholder {
    color: var(--muted);
}

.hq-palette-body {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 8px 8px;
}

.hq-palette-heading {
    padding: 4px 10px 6px;
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 600;
}

.hq-palette-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.hq-palette-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 6px 10px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
}

.hq-palette-item:hover {
    color: var(--text);
}

.hq-palette-item.active {
    background: var(--accent-soft);
    color: var(--accent-text);
}

/* Odak sağdaki kayıtlardayken satır hangi ekranın kayıtlarının açık olduğunu soluk vurguyla gösterir. */
.hq-palette-item.is-parent {
    background: var(--hover);
}

.hq-palette-icon {
    flex: none;
    width: 18px;
    color: var(--muted);
    text-align: center;
}

.hq-palette-item.active .hq-palette-icon,
.hq-palette-item.active .hq-palette-count,
.hq-palette-item.active .hq-palette-group {
    color: inherit;
}

.hq-palette-title {
    flex: 1 1 auto;
    min-width: 0;
}

.hq-palette-group {
    flex: 0 1 auto;
    max-width: 45%;
    color: var(--muted);
    font-size: 12px;
}

.hq-palette-count {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.hq-palette-count .fas {
    font-size: 10px;
}

.hq-palette-empty {
    padding: 24px 8px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.hq-palette-flyout {
    position: absolute;
    top: 0;
    left: calc(100% + 8px);
    display: flex;
    flex-direction: column;
    width: 300px;
    max-height: 360px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: 0 12px 32px color-mix(in srgb, var(--bs-black) 18%, transparent);
}

.hq-palette-flyout[hidden] {
    display: none;
}

.hq-palette-flyout-title {
    flex: none;
    padding: 6px 10px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.hq-palette-flyout-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 0;
}

/* Kayıt satırı: ad (en son açılan sayfaya gider) + gezilen sayfaların rozetleri (en son açılan başta). */
.hq-palette-record {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 0;
    padding: 6px 10px 8px;
    border-radius: var(--radius);
}

.hq-palette-record.active {
    background: var(--hover);
}

.hq-palette-record-name {
    color: var(--text);
    font-size: 13px;
    text-decoration: none;
}

.hq-palette-record.active .hq-palette-record-name,
.hq-palette-record-name:hover {
    color: var(--accent-text);
}

.hq-palette-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.hq-palette-page {
    max-width: 100%;
    padding: 0 7px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.7;
    text-decoration: none;
}

.hq-palette-page:hover {
    border-color: var(--border-strong);
    color: var(--text);
}

/* Klavyeyle seçili sayfa (Enter bunu açar). */
.hq-palette-page.active,
.hq-palette-page.active:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent-text);
}

/* Dar ekranda (sağda panel sığmaz) kayıtlar aktif satırın altında girintili listelenir. */
.hq-palette-inline {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 2px 0 6px 28px;
    padding-left: 8px;
    border-left: 2px solid var(--border);
}

.hq-palette-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.hq-palette-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.hq-palette-total {
    margin-left: auto;
    padding: 1px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
    .hq-palette {
        padding-top: 16px;
    }

    .hq-palette-hint {
        display: none;
    }
}
