/* ============================================================
   Shell — AppShell, Topbar, Sidebar (rail + flyouts), TabBar,
   UserMenu. Fiel a handoff/reference/shell.jsx.
   ============================================================ */

/* Layout raiz */
.wf-shell {
    display: grid;
    grid-template-columns: var(--wf-h-sidebar) 1fr;
    grid-template-rows: var(--wf-h-topbar) var(--wf-h-tabbar) 1fr;
    grid-template-areas:
        "brand topbar"
        "sidebar tabbar"
        "sidebar main";
    height: 100vh;
    overflow: hidden;
}

.wf-shell-brand {
    grid-area: brand;
    background: var(--wf-sidebar);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.wf-shell-topbar {
    grid-area: topbar;
    background: var(--wf-topbar);
    border-bottom: 1px solid var(--wf-topbar-border);
    display: flex;
    align-items: center;
    padding: 0 12px 0 0;
    position: relative;
    z-index: 10;
}

.wf-shell-tabbar {
    grid-area: tabbar;
    background: var(--wf-tabbar);
    border-bottom: 1px solid var(--wf-border);
    display: flex;
    align-items: stretch;
    padding: 0 12px;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    z-index: 9;
}

.wf-shell-sidebar {
    grid-area: sidebar;
    background: var(--wf-sidebar);
    overflow: visible;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 0;
    gap: 2px;
    position: relative;
    z-index: 20;
}

.wf-shell-main {
    grid-area: main;
    background: var(--wf-bg);
    overflow: auto;
    position: relative;
}

/* Topbar */
.wf-topbar-wordmark {
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    border-right: 1px solid var(--wf-topbar-border);
    min-width: 180px;
}

/* No tema escuro o topbar é navy (#0A1628); a haste navy do glifo color
   ficaria invisível. Renderiza o glifo em branco para garantir contraste. */
[data-theme="dark"] .wf-topbar-wordmark img {
    filter: brightness(0) invert(1);
}

.wf-topbar-search {
    padding: 0 12px;
    flex-shrink: 0;
}

.wf-topbar-search-btn {
    height: 32px;
    background: var(--wf-bg-sunken);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    cursor: pointer;
    transition: background 120ms ease-out;
    font-family: var(--wf-font);
    color: var(--wf-text-subtle);
}

.wf-topbar-search-btn:hover { background: var(--wf-hover); }
.wf-topbar-search-btn-label { font-size: 12px; font-weight: 500; }

.wf-topbar-center {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wf-topbar-right {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.wf-topbar-divider {
    width: 1px;
    height: 22px;
    background: var(--wf-border);
    margin: 0 8px;
}

.wf-topbar-icon-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--wf-radius-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wf-text-muted);
    position: relative;
    transition: background 120ms ease-out;
}

.wf-topbar-icon-btn:hover { background: var(--wf-hover); }

.wf-topbar-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    background: var(--wf-danger);
    color: #fff;
    border-radius: 7px;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--wf-topbar);
    box-sizing: content-box;
    line-height: 1;
}

.wf-theme-topbar-claro { display: none; }
[data-theme="dark"] .wf-theme-topbar-claro { display: inline-flex; }
[data-theme="dark"] .wf-theme-topbar-escuro { display: none; }

/* Company indicator placeholder */
.wf-company-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    height: 34px;
    border-radius: var(--wf-radius-md);
    max-width: 360px;
    min-width: 0;
}

.wf-company-indicator-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(77, 163, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wf-company-indicator-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.wf-company-indicator-label {
    font-size: 10px;
    color: var(--wf-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 600;
}

.wf-company-indicator-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--wf-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Sync status */
.wf-sync-status {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--wf-radius-md);
    position: relative;
}

.wf-sync-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wf-success);
    box-shadow: 0 0 0 4px var(--wf-success-bg);
}

/* Sidebar rail */
.wf-sidebar-rail-item {
    width: 40px;
    height: 40px;
    border-radius: var(--wf-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wf-sidebar-text);
    transition: all 120ms ease-out;
    position: relative;
    border: none;
    background: transparent;
    padding: 0;
}

.wf-sidebar-rail-item:hover {
    background: var(--wf-sidebar-hover);
    color: var(--wf-sidebar-text-active);
}

.wf-sidebar-rail-item.active {
    background: var(--wf-sidebar-active);
    color: var(--wf-sidebar-text-active);
}

.wf-sidebar-rail-item.active::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 22px;
    background: var(--wf-brand-accent);
    border-radius: 2px;
}

.wf-sidebar-rail-item.highlight {
    background: var(--wf-sidebar-hover);
    color: var(--wf-sidebar-text-active);
}

.wf-sidebar-divider {
    width: 30px;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0 4px;
}

.wf-sidebar-spacer { flex: 1; min-height: 20px; }

/* ─── Shell drawer (substitui o flyout antigo) ─────────────────────── */

.wf-shell-drawer-backdrop {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 48px;       /* rail tem 48px; backdrop começa logo após */
    right: 0;
    background: transparent;
    z-index: 1099;
}

.wf-shell-drawer {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 48px;
    width: 260px;
    background: var(--wf-surface);
    border-right: 1px solid var(--wf-border);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.10);
    display: flex;
    flex-direction: column;
    z-index: 1100;
    animation: wf-shell-drawer-in 140ms ease-out;
}

@keyframes wf-shell-drawer-in {
    from { transform: translateX(-100%); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

.wf-shell-drawer-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--wf-border);
    background: var(--wf-bg-sunken);
    flex-shrink: 0;
}

.wf-shell-drawer-header-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: var(--wf-bg-sunken);
    color: var(--wf-text);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--wf-border);
}

.wf-shell-drawer-header-title {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--wf-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-shell-drawer-header-btn {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--wf-text-subtle);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 80ms;
}

.wf-shell-drawer-header-btn:hover {
    background: var(--wf-hover);
    color: var(--wf-text);
}

.wf-shell-drawer-header-btn.ativo {
    color: var(--wf-brand-accent);
}

.wf-shell-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.wf-shell-drawer-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--wf-text-subtle);
    padding: 12px 12px 4px;
    font-weight: 600;
}

.wf-shell-drawer-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin: 0 6px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--wf-text);
    font-size: 13px;
    transition: background 80ms;
    position: relative;
}

.wf-shell-drawer-item:hover {
    background: var(--wf-hover);
}

.wf-shell-drawer-item.ativo {
    background: var(--wf-hover);
}

.wf-shell-drawer-item.ativo::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--wf-brand-accent);
    border-radius: 2px;
}

.wf-shell-drawer-item-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-shell-drawer-item-fav {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: var(--wf-text-subtle);
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 80ms, color 80ms;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wf-shell-drawer-item:hover .wf-shell-drawer-item-fav {
    opacity: 1;
}

.wf-shell-drawer-item-fav.ativo {
    opacity: 1;
    color: var(--wf-warning);
}

.wf-shell-drawer-item-fav:hover {
    color: var(--wf-text);
}

/* TabBar */
.wf-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px 0 14px;
    height: 100%;
    min-width: 80px;
    max-width: 200px;
    background: transparent;
    color: var(--wf-text-muted);
    border: none;
    border-right: 1px solid transparent;
    border-left: 1px solid transparent;
    font-family: var(--wf-font);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
    transition: background 100ms ease-out, color 100ms ease-out;
}

.wf-tab:hover {
    background: var(--wf-tab-hover);
    color: var(--wf-text);
}

.wf-tab.active {
    background: var(--wf-tab-active);
    color: var(--wf-text);
    border-left-color: var(--wf-border);
    border-right-color: var(--wf-border);
    box-shadow: 0 -2px 0 var(--wf-brand-accent) inset;
}

.wf-tab-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-tab-close {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    color: var(--wf-text-subtle);
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
    opacity: 0;
    transition: opacity 100ms;
}

.wf-tab:hover .wf-tab-close,
.wf-tab.active .wf-tab-close { opacity: 1; }

.wf-tab-close:hover {
    background: var(--wf-hover);
    color: var(--wf-text);
}

.wf-tab-icon {
    flex-shrink: 0;
    color: var(--wf-text-subtle);
}

.wf-tab.active .wf-tab-icon { color: var(--wf-brand-accent); }

/* UserMenu */
.wf-usermenu { position: relative; }

.wf-usermenu-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 8px 0 4px;
    height: 36px;
    border-radius: var(--wf-radius-md);
    cursor: pointer;
    background: transparent;
    border: none;
    transition: background 120ms;
    font-family: var(--wf-font);
}

.wf-usermenu-trigger:hover,
.wf-usermenu-trigger.open { background: var(--wf-hover); }

.wf-usermenu-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    align-items: flex-start;
}

.wf-usermenu-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--wf-text);
}

.wf-usermenu-role {
    font-size: 10px;
    color: var(--wf-text-subtle);
}

.wf-usermenu-chevron {
    transition: transform 160ms;
}

.wf-usermenu-chevron.open { transform: rotate(180deg); }

.wf-usermenu-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 280px;
    background: var(--wf-surface);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-lg);
    box-shadow: var(--wf-shadow-lg);
    z-index: 600;
    overflow: hidden;
    animation: wfFade 140ms ease-out;
}

@keyframes wfFade {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.wf-um-header {
    padding: 14px 14px 12px;
    border-bottom: 1px solid var(--wf-border);
    background: var(--wf-surface-alt);
}

.wf-um-header-top { display: flex; gap: 10px; align-items: center; }

.wf-um-header-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--wf-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-um-header-email {
    font-size: 11px;
    color: var(--wf-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wf-um-section { padding: 4px 0; }

.wf-um-divider {
    padding: 8px 14px 4px;
    font-size: 10px;
    color: var(--wf-text-subtle);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    border-top: 1px solid var(--wf-border);
    background: var(--wf-surface-alt);
}

.wf-um-divider-line {
    height: 1px;
    background: var(--wf-border);
    margin: 2px 0;
}

.wf-um-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--wf-text);
    cursor: pointer;
    transition: background 100ms ease-out;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: var(--wf-font);
    text-decoration: none;
}

.wf-um-item:hover {
    background: var(--wf-hover);
    text-decoration: none;
}

.wf-um-item.danger { color: var(--wf-danger); }

.wf-um-item-label { flex: 1; }

.wf-um-item-hint {
    display: block;
    font-size: 11px;
    color: var(--wf-text-subtle);
    margin-top: 1px;
}

.wf-um-footer {
    padding: 8px 14px;
    border-top: 1px solid var(--wf-border);
    background: var(--wf-surface-alt);
    font-size: 10px;
    color: var(--wf-text-subtle);
    display: flex;
    justify-content: space-between;
    font-family: var(--wf-font-mono);
}

/* Stub pages */
.wf-stub {
    padding: var(--wf-space-8);
    max-width: 640px;
}

.wf-stub h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.6px;
    margin: 0 0 12px;
}

.wf-stub p {
    color: var(--wf-text-muted);
    font-size: 14px;
    line-height: 22px;
    margin: 0 0 12px;
}

/* CommandPalette */
.wf-cmd-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(5, 13, 28, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 120px 16px 16px;
    z-index: 1000;
}

.wf-cmd-panel {
    width: 620px;
    max-width: 100%;
    max-height: 70vh;
    background: var(--wf-surface);
    border-radius: var(--wf-radius-lg);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--wf-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.wf-cmd-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--wf-border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.wf-cmd-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 15px;
    color: var(--wf-text);
    font-family: var(--wf-font);
}

.wf-cmd-input::placeholder { color: var(--wf-text-subtle); }

.wf-cmd-body {
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
}

.wf-cmd-group-label {
    font-size: 10px;
    color: var(--wf-text-subtle);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 10px;
    font-weight: 600;
}

.wf-cmd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: var(--wf-radius-md);
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    font-family: var(--wf-font);
    text-align: left;
    color: var(--wf-text);
}

.wf-cmd-item.selected { background: var(--wf-selected); }

.wf-cmd-item-icon {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: var(--wf-bg-sunken);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wf-text-muted);
    flex-shrink: 0;
}

.wf-cmd-item-label { flex: 1; font-size: 13px; }
.wf-cmd-item-hint { font-size: 11px; color: var(--wf-text-subtle); }

.wf-cmd-empty {
    padding: 40px;
    text-align: center;
    color: var(--wf-text-subtle);
    font-size: 13px;
}

.wf-cmd-footer {
    padding: 8px 16px;
    border-top: 1px solid var(--wf-border);
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--wf-text-subtle);
    background: var(--wf-surface-alt);
    align-items: center;
}

/* CompanyIndicator clickable */
.wf-company-indicator {
    background: transparent;
    border: 1px solid transparent;
    transition: all 120ms;
    font-family: var(--wf-font);
}

.wf-company-indicator.clickable { cursor: pointer; }
.wf-company-indicator.clickable:hover {
    background: var(--wf-hover);
    border: 1px solid var(--wf-border);
}

/* CompanySwitcherModal */
.wf-switcher-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 40, 0.45);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
}

.wf-switcher-panel {
    width: 520px;
    max-width: calc(100vw - 32px);
    background: var(--wf-surface);
    border-radius: var(--wf-radius-lg);
    border: 1px solid var(--wf-border);
    box-shadow: var(--wf-shadow-lg);
    overflow: hidden;
}

.wf-switcher-header {
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--wf-border);
}

.wf-switcher-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.wf-switcher-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(77, 163, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wf-brand-accent);
}

.wf-switcher-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--wf-text);
    letter-spacing: -0.2px;
}

.wf-switcher-subtitle {
    font-size: 12px;
    color: var(--wf-text-muted);
    margin-top: 1px;
}

.wf-switcher-search {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    height: 32px;
    background: var(--wf-bg);
    border: 1px solid var(--wf-border);
    border-radius: var(--wf-radius-md);
}

.wf-switcher-search input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13px;
    color: var(--wf-text);
    font-family: var(--wf-font);
}

.wf-switcher-body {
    padding: 8px;
    max-height: 50vh;
    overflow-y: auto;
}

.wf-switcher-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--wf-radius-md);
    cursor: pointer;
    border: 1px solid transparent;
    background: transparent;
    margin-bottom: 2px;
    width: 100%;
    text-align: left;
    font-family: var(--wf-font);
}

.wf-switcher-item:hover { background: var(--wf-hover); }

.wf-switcher-item.active {
    background: var(--wf-selected);
    border-color: rgba(77, 163, 255, 0.18);
    cursor: default;
}

.wf-switcher-initials {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: var(--wf-bg-sunken);
    color: var(--wf-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.3px;
    flex-shrink: 0;
}

.wf-switcher-item.active .wf-switcher-initials {
    background: var(--wf-brand-accent);
    color: #fff;
}

.wf-switcher-item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--wf-text);
}

.wf-switcher-item-unit {
    font-size: 12px;
    color: var(--wf-text-muted);
    margin-top: 2px;
}

.wf-switcher-item-meta {
    font-size: 11px;
    color: var(--wf-text-subtle);
    margin-top: 2px;
    font-family: var(--wf-font-mono);
    letter-spacing: 0.2px;
}

.wf-switcher-footer {
    padding: 10px 20px;
    border-top: 1px solid var(--wf-border);
    background: var(--wf-surface-alt);
    font-size: 11px;
    color: var(--wf-text-subtle);
    display: flex;
    align-items: center;
    gap: 6px;
}

.wf-switcher-empty {
    padding: 24px;
    text-align: center;
    color: var(--wf-text-subtle);
    font-size: 13px;
}

/* ============================================================
   Favoritos (flyout do rail)
   Fiel a handoff/reference/shell.jsx FavoritesFlyout.
   Secoes: "Fixados no rail · X/5" + "Outros favoritos".
   ============================================================ */

.wf-fav-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px 4px;
}

.wf-fav-section-title {
    font-size: 10px;
    color: var(--wf-text-subtle);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.wf-fav-empty {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--wf-text-subtle);
    font-style: italic;
}

.wf-fav-item-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px 7px 10px;
    margin: 0 6px;
    border-radius: var(--wf-radius-md);
    background: transparent;
    color: var(--wf-text);
    cursor: pointer;
    transition: background 100ms ease-out;
}

.wf-fav-item-row:hover {
    background: var(--wf-hover);
}

.wf-fav-item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.wf-fav-item-label {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--wf-text);
}

.wf-fav-item-sub {
    font-size: 10px;
    color: var(--wf-text-subtle);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wf-fav-item-actions {
    display: flex;
    gap: 2px;
    opacity: 0.5;
    transition: opacity 100ms ease-out;
    flex-shrink: 0;
}

.wf-fav-item-row:hover .wf-fav-item-actions {
    opacity: 1;
}

.wf-fav-action-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: transparent;
    color: var(--wf-text-subtle);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background 100ms ease-out, color 100ms ease-out;
}

.wf-fav-action-btn:hover:not(:disabled) {
    background: var(--wf-hover);
    color: var(--wf-text);
}

.wf-fav-action-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Pin ativo (item já está fixado no rail) — colore com warning pra indicar estado ligado.
   Clique desativa (DesafixarDoRailAsync). */
.wf-fav-action-btn.fixado {
    color: var(--wf-warning);
}

.wf-fav-action-btn.fixado:hover:not(:disabled) {
    background: var(--wf-warning-bg);
    color: var(--wf-warning);
}

/* Sugestões baseadas no uso — card azul destacado no final do drawer. */
.wf-fav-sugestoes {
    margin: 14px 10px 10px;
    padding: 10px 10px 8px;
    background: rgba(77, 163, 255, 0.08);
    border: 1px solid rgba(77, 163, 255, 0.2);
    border-radius: var(--wf-radius-md);
}

.wf-fav-sugestoes-title {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--wf-brand-accent);
    margin-bottom: 6px;
}

.wf-fav-sugestao-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    font-size: 12px;
    color: var(--wf-text);
}

.wf-fav-sugestao-label {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wf-fav-sugestao-usos {
    font-size: 10px;
    color: var(--wf-text-subtle);
    margin-right: 6px;
    font-family: var(--wf-font-mono);
}

.wf-fav-sugestao-btn {
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    background: var(--wf-brand-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: var(--wf-font);
    transition: background 100ms ease-out;
    flex-shrink: 0;
}

.wf-fav-sugestao-btn:hover {
    background: var(--wf-brand-accent-deep, var(--wf-brand-accent));
}

/* Drag of tabs */
.wf-tab.dragging { opacity: 0.5; }
.wf-tab[draggable="true"] { cursor: grab; }
.wf-tab[draggable="true"]:active { cursor: grabbing; }

/* Dark theme — sombra mais marcante pro drawer */
@media (prefers-color-scheme: dark) {
    .wf-shell-drawer {
        box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.05),
            4px 0 12px rgba(0, 0, 0, 0.4);
    }
}
