/* ==========================================
   00 — AUTH GUARD: Hide body until authenticated
   ========================================== */

/* Hide body by default on protected pages - auth-guard.js will show it */
body:not(.auth-ready) {
    visibility: hidden;
}

/* IMPORTANT: Loading overlay must be visible even before auth is ready */
body:not(.auth-ready) .page-loading-overlay {
    visibility: visible;
}

/* Login page doesn't need to wait for auth */
body.login-page,
body.public-page,
body.pricing-page,
body.cb-page {
    visibility: visible !important;
}

/* ==========================================
   00.1 — PAGE LOADING: Ensure no flash of content
   ========================================== */

/* For pages with loading overlay, hide content until fully loaded */
/* This works with page-loading class to prevent flash before overlay appears */
body.page-loading .app-layout {
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Show content only when BOTH auth-ready AND page-loading is removed */
body.auth-ready:not(.page-loading) .app-layout {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-in;
}

/* ==========================================
   01 — THEME & TOKENS GLOBALES (Supabase-inspired)
   ========================================== */

:root {
    /* ==========================================
       BACKGROUNDS - Dark surface hierarchy
       Supabase-inspired: body darkest, menus lighter
       ========================================== */
    --bg-deep: #111111;
    --bg-main: #171717;
    --bg-body: #171717;
    --ngm-bg-topbar: #1e1e1e;
    --ngm-bg-sidebar: #1c1c1c;
    --ngm-bg-surface: #1a1a1a;
    --ngm-bg-surface-soft: #1e1e1e;
    --ngm-bg-card: #1e1e1e;
    --bg-elevated: #262628;
    --bg-input: #1a1a1a;
    --bg-input-hover: #222222;

    /* Overlay tints (white on dark) */
    --bg-hover: rgba(255, 255, 255, 0.04);
    --bg-hover-strong: rgba(255, 255, 255, 0.06);
    --bg-active: rgba(255, 255, 255, 0.08);

    /* ==========================================
       TEXT - Gray scale, never pure white
       ========================================== */
    --text-primary: #ededed;
    --text-secondary: #888888;
    --text-tertiary: #6b7280;
    --text-muted: #666666;
    --text-faint: #444444;
    /* Legacy aliases (kept for backwards compat) */
    --ngm-text-main: #ededed;
    --ngm-text-soft: #888888;
    --ngm-text-muted: #666666;
    --ngm-text-subtle: #444444;

    /* ==========================================
       ACCENT - Supabase emerald green
       ========================================== */
    --accent: #3dca8b;
    --accent-hover: #2bb478;
    --accent-soft: rgba(61, 202, 139, 0.15);
    --accent-strong: #3dca8b;

    /* ==========================================
       STATUS COLORS - Semantic palette
       ========================================== */
    --color-success: #22c55e;
    --color-success-soft: rgba(34, 197, 94, 0.15);
    --color-danger: #ef4444;
    --color-danger-soft: rgba(239, 68, 68, 0.15);
    --color-warning: #f59e0b;
    --color-warning-soft: rgba(245, 158, 11, 0.15);
    --color-info: #3b82f6;
    --color-info-soft: rgba(59, 130, 246, 0.15);
    --color-purple: #8b5cf6;
    --color-purple-soft: rgba(139, 92, 246, 0.15);
    --color-orange: #fb923c;
    --color-orange-soft: rgba(251, 146, 60, 0.15);
    --color-yellow: #eab308;

    /* ==========================================
       BORDERS
       ========================================== */
    --border-soft: #2a2a2a;
    --border-medium: #333333;
    --border-strong: #3a3a3a;
    --border-hover: #444444;
    --border-layout: #2f2f2f;
    --border-focus: rgba(61, 202, 139, 0.3);

    /* ==========================================
       BORDER RADIUS
       ========================================== */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-pill: 9999px;
    --radius-full: 50%;

    /* ==========================================
       SPACING SCALE (4px base unit)
       ========================================== */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;

    /* ==========================================
       TYPOGRAPHY SCALE
       ========================================== */
    --font-xs: 9px;
    --font-sm: 11px;
    --font-base: 13px;
    --font-md: 14px;
    --font-lg: 16px;
    --font-xl: 18px;
    --font-2xl: 20px;
    --font-3xl: 24px;
    --font-4xl: 32px;

    /* ==========================================
       Z-INDEX SCALE
       ========================================== */
    --z-base: 1;
    --z-above: 10;
    --z-float: 50;
    --z-backdrop: 60;
    --z-dialog: 70;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 500;
    --z-modal-backdrop: 600;
    --z-modal: 700;
    --z-popover: 800;
    --z-toast: 900;
    --z-tooltip: 1000;
    --z-widget: 9000;
    --z-top: 9999;

    /* ==========================================
       LAYOUT DIMENSIONS
       ========================================== */
    --topbar-height: 48px;

    /* ==========================================
       SHADOWS
       ========================================== */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.25), 0 1px 3px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35), 0 2px 4px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45), 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.55);
    --shadow-2xl: 0 22px 50px rgba(0, 0, 0, 0.7);
    --shadow-accent: 0 0 8px rgba(61, 202, 139, 0.5);
    --shadow-focus: 0 0 0 3px rgba(61, 202, 139, 0.1);
    /* Legacy aliases */
    --ngm-shadow-soft: var(--shadow-md);
    --ngm-shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.5);

    /* ==========================================
       TRANSITIONS
       ========================================== */
    --transition-fast: all 0.1s ease;
    --transition-base: all 0.15s ease;
    --transition-slow: all 0.2s ease;
    --transition-slower: all 0.3s ease;

    /* ==========================================
       SCROLLBAR
       ========================================== */
    --scrollbar-width: 0px;
    --scrollbar-track: transparent;
    --scrollbar-thumb: transparent;
    --scrollbar-thumb-visible: transparent;
    --scrollbar-thumb-hover: transparent;
    --scrollbar-sidebar-width: 0px;
}

/* Reset básico */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: var(--bg-body);
    color: var(--text-primary);
    scrollbar-width: none;           /* Firefox: hide scrollbar */
    -ms-overflow-style: none;        /* IE/Edge: hide scrollbar */
}

/* Webkit: hide all scrollbars globally (Supabase style - scroll works, no visual bar) */
::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Links base */

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
}

/* ==========================================
   02 — LAYOUT GLOBAL (APP, SIDEBAR, MAIN)
   ========================================== */

.app-layout {
    height: 100vh;
    height: 100dvh;
    display: flex;
    overflow: hidden;
    background: var(--bg-main);
}

/* ---------- SIDEBAR GLOBAL ---------- */

/* --- Sidebar: collapsible on desktop, expands on hover --- */

.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    height: calc(100vh - var(--topbar-height));
    height: calc(100dvh - var(--topbar-height));
    width: var(--sidebar-collapsed, 64px);
    background: var(--ngm-bg-sidebar);
    border-right: 1px solid var(--border-layout);
    display: flex;
    flex-direction: column;
    padding: 12px 10px;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 50;
}

.sidebar:hover {
    width: var(--sidebar-expanded, 240px);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
}

/* Sidebar scrollbar hidden (Supabase style) */

/* --- Logo in topbar (Supabase style) --- */

.ngm-topbar-logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: var(--sidebar-collapsed, 64px);
    margin-left: -20px;
    margin-right: 0;
    text-decoration: none;
}

.ngm-topbar-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
    transition: opacity 0.15s ease;
}

.ngm-topbar-logo-link:hover .ngm-topbar-logo {
    opacity: 0.75;
}

/* --- Nav card container --- */
.sidebar-nav-card {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

/* --- Navigation --- */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 0;
    padding-inline: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 400;
    cursor: pointer;
    border: none;
    background: transparent;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-item-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity 0.15s ease;
}

.nav-item-icon svg {
    width: 20px;
    height: 20px;
}

.nav-item-label {
    flex: 1;
    opacity: 0;
    transition: opacity 0.15s ease 0.05s;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar:hover .nav-item-label {
    opacity: 1;
}

.nav-item:hover {
    background: rgba(61, 202, 139, 0.08);
    color: var(--accent);
}

.nav-item:hover .nav-item-icon {
    opacity: 1;
}

.nav-item-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.nav-item-active .nav-item-icon {
    opacity: 1;
}

/* --- Unread badge (messages) --- */
.nav-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--color-danger);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    flex-shrink: 0;
}

/* When collapsed, show badge as dot */
.sidebar:not(:hover) .nav-unread-badge {
    min-width: 8px;
    height: 8px;
    padding: 0;
    font-size: 0;
    position: absolute;
    top: 4px;
    right: 4px;
}

.sidebar:not(:hover) .nav-item {
    position: relative;
}

/* --- Category group headers --- */
.nav-group-header {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 8px 12px 4px;
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    /* Always reserve space; only toggle text visibility */
    opacity: 0;
    transition: opacity 0.15s ease;
}

.sidebar:hover .nav-group-header {
    opacity: 1;
}

.nav-group-header:first-child {
    margin-top: 0;
}

.nav-group-separator {
    height: 1px;
    background: var(--border-soft);
    margin: 6px 8px;
}

/* --- Sidebar footer --- */

.sidebar-footer {
    margin-top: auto;
    padding: 12px 8px 4px;
    border-top: 1px solid var(--border-soft);
    font-size: 11px;
    color: var(--text-faint);
}

/* ---------- MAIN AREA (derecha) ---------- */

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    background: var(--bg-main);
    margin-left: var(--sidebar-collapsed, 64px);
    margin-top: var(--topbar-height);
}

/* Contenido debajo de la topbar */
.main-content {
    flex: 1;
    padding: 0 24px 24px;
    border-top: 12px solid var(--bg-main);
    max-width: 1400px;
    margin-inline: auto;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* ==========================================
   02.1 — PAGE SHELL: Shared layout for 2-column pages
   (workspace, tree panel, content panel, page header)
   Used by: vault, ngm-cam, messages, expenses, etc.
   ========================================== */

/* Full-width override for shell pages */
.page-shell .main-content {
    max-width: none;
    padding: 0;
    margin-inline: 0;
    width: 100%;
    border-top: 0;
}

/* Workspace: fills available height, flex column */
.shell-workspace {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Page header: title + actions bar above the 2-column body */
.shell-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    flex-shrink: 0;
}

.shell-page-header-left .page-title {
    margin: 0 0 2px;
}

.shell-page-header-left .page-subtitle {
    margin: 0;
    color: rgba(255,255,255,0.45);
    font-size: 12px;
}

.shell-page-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Body: horizontal 2-column flex (tree + content) */
.shell-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ---- Tree Panel (left sidebar) ---- */
.shell-tree-panel {
    width: 240px;
    min-width: 180px;
    max-width: 400px;
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
    transition: width 0.2s ease, min-width 0.2s ease;
}

.shell-tree-panel.collapsed {
    width: 36px;
    min-width: 36px;
    overflow: hidden;
}

.shell-tree-panel.collapsed .shell-tree-scroll {
    display: none;
}

.shell-tree-panel.collapsed .shell-tree-header span {
    display: none;
}

.shell-tree-panel.collapsed .shell-tree-header {
    justify-content: center;
    padding: 10px 6px;
}

.shell-tree-panel.collapsed .shell-tree-toggle svg {
    transform: rotate(180deg);
}

.shell-tree-panel.resizing {
    transition: none;
}

.shell-tree-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255,255,255,0.4);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.shell-tree-toggle {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.4);
    cursor: pointer;
    padding: 2px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
}

.shell-tree-toggle:hover {
    background: var(--bg-active);
    color: #fff;
}

.shell-tree-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
    contain: layout style;
    will-change: scroll-position;
}

/* Tree node base */
.shell-tree-node {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    cursor: pointer;
    transition: background 0.08s ease-out, color 0.08s ease-out;
    user-select: none;
    contain: content;
}

.shell-tree-node:hover {
    background: rgba(255,255,255,0.05);
}

.shell-tree-node.active {
    background: var(--accent-soft);
    color: var(--accent);
    transition: background 0s, color 0s;
}

.shell-tree-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.shell-tree-badge {
    margin-left: auto;
    padding: 0 6px;
    font-size: 10px;
    line-height: 16px;
    border-radius: 8px;
    background: rgba(255,255,255,0.07);
    color: rgba(255,255,255,0.4);
    flex-shrink: 0;
}

.shell-tree-arrow {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: rgba(255,255,255,0.3);
    transition: transform 0.12s cubic-bezier(0.4, 0, 0.2, 1);
}

.shell-tree-arrow.expanded {
    transform: rotate(90deg);
}

.shell-tree-icon {
    flex-shrink: 0;
    color: rgba(255,255,255,0.4);
    transition: color 0.15s;
}

.shell-tree-node:hover .shell-tree-icon {
    color: var(--accent);
}

.shell-tree-node.active .shell-tree-icon {
    color: var(--accent);
}

/* ---- Panel Resizer (optional, for draggable split) ---- */
.shell-resizer {
    width: 4px;
    cursor: col-resize;
    background: transparent;
    transition: background 0.15s;
    flex-shrink: 0;
}

.shell-resizer:hover,
.shell-resizer.active {
    background: var(--accent);
    opacity: 0.3;
}

/* ---- Content Panel (right side) ---- */
.shell-content-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Content header inside the content panel */
.shell-content-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.shell-content-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    white-space: nowrap;
}

/* Content scrollable area */
.shell-content-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    contain: layout style;
    will-change: scroll-position;
}

/* ---- Scrollbar (subtle, 6px) ---- */
.shell-tree-scroll::-webkit-scrollbar,
.shell-content-scroll::-webkit-scrollbar {
    width: 6px;
}

.shell-tree-scroll::-webkit-scrollbar-thumb,
.shell-content-scroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

.shell-tree-scroll::-webkit-scrollbar-thumb:hover,
.shell-content-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* ---- Discrete Scroll Utility ----
   Overlay scrollbar: no reserved space, appears only while scrolling.
   Add class "discrete-scroll" to any scrollable container.
   JS adds/removes "is-scrolling" on scroll events.
   ------------------------------------------------ */
.discrete-scroll {
  overflow: overlay;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.discrete-scroll.is-scrolling {
  scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.discrete-scroll::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.discrete-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.discrete-scroll::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 99px;
}

.discrete-scroll.is-scrolling::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}

.discrete-scroll.is-scrolling::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

.discrete-scroll::-webkit-scrollbar-corner {
  background: transparent;
}

/* ---- Page Shell Responsive ---- */
@media (max-width: 768px) {
    .shell-tree-panel {
        display: none;
    }

    .shell-resizer {
        display: none;
    }

    .shell-page-header {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .shell-page-header-actions {
        flex-wrap: wrap;
        width: 100%;
    }

    .shell-content-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
        padding: 12px 12px;
    }
}

/* ==========================================
   03 — NGM GLOBAL TOPBAR
   (Next Generation Management + search + pills + user)
   ========================================== */

.ngm-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-layout);
    background: var(--ngm-bg-topbar);
    z-index: 60;
}

/* Estructura en 3 zonas: left (brand), center (search), right (meta + user) */

.ngm-topbar-left,
.ngm-topbar-center,
.ngm-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---------- BRAND NGM (texto only, icon moved to sidebar) ---------- */

.ngm-brand {
    display: flex;
    align-items: center;
    gap: 0;
}

.ngm-brand-avatar {
    width: 24px;
    height: 24px;
    border-radius: var(--radius-pill);
    background: var(--ngm-bg-surface);
    border: 1px solid var(--border-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--accent);
}

.ngm-brand-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-left: 10px;
}

.ngm-brand-org {
    font-size: 0.75rem;
    color: var(--ngm-text-muted);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ngm-brand-context {
    font-size: 0.9rem;
    color: var(--ngm-text-main);
    font-weight: 500;
}

/* ---------- SEARCH PILL GLOBAL ---------- */

.ngm-topbar-center {
    flex: 1;
    justify-content: center;
}

.ngm-search-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 9999px;
    background: var(--bg-deep);
    border: 1px solid var(--border-medium);
    box-shadow: var(--shadow-lg);
    min-width: 260px;
    max-width: 420px;
    width: 100%;
}

.ngm-search-icon {
    font-size: 14px;
    color: var(--ngm-text-muted);
}

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

.ngm-search-input::placeholder {
    color: var(--ngm-text-muted);
}

/* ---------- ZONA DERECHA: pills de contexto + usuario ---------- */

.ngm-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Pills de contexto (env, modo, status, etc.) */

.ngm-pill {
    font-size: 11px;
    border-radius: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border-soft);
    background: var(--ngm-bg-surface);
    color: var(--text-secondary);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ngm-pill-label {
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 10px;
    color: var(--text-muted);
}

.ngm-pill-value {
    font-weight: 500;
    color: var(--text-primary);
}

/* Estados especiales de pill */

.ngm-pill--env {
    border-color: var(--border-soft);
}

.ngm-pill--status-live {
    border-color: rgba(61, 202, 139, 0.3);
    color: var(--accent);
}

/* User avatar button + dropdown */

.user-avatar-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.user-avatar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid var(--border-soft);
    background: var(--ngm-bg-surface);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: border-color 0.15s, background 0.15s;
}

.user-avatar-btn:hover {
    border-color: var(--ngm-accent, #4ade80);
    background: rgba(74, 222, 128, 0.08);
}

.user-avatar-initials {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1;
    letter-spacing: 0.02em;
    pointer-events: none;
    user-select: none;
}

.user-avatar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 260px;
    background: var(--ngm-bg-card, #1e1e20);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
    overflow: hidden;
}

.user-avatar-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
}

.user-dropdown-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: var(--ngm-accent, #4ade80);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.user-dropdown-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.user-dropdown-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-role {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

.user-dropdown-email {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-dropdown-divider {
    height: 1px;
    background: var(--border-soft);
    margin: 0;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary, #b0b0b0);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.user-dropdown-item:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
}

.user-dropdown-item-icon {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-dropdown-item-icon svg {
    width: 16px;
    height: 16px;
}

.user-dropdown-signout {
    color: #f87171;
}

.user-dropdown-signout:hover {
    background: rgba(248, 113, 113, 0.08);
    color: #fca5a5;
}

/* ---------- Responsive topbar ---------- */

@media (max-width: 900px) {
    .ngm-topbar {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 10px;
    }

    .ngm-topbar-center {
        order: 3;
        width: 100%;
        justify-content: flex-start;
    }

    .ngm-search-pill {
        width: 100%;
    }
}

/* ==========================================
   04 — COMPONENTES BASE REUTILIZABLES
   (botones, inputs, cards, tablas, modal)
   ========================================== */

/* Botones: see buttons.css for base .btn, .btn-primary, .btn-secondary */

/* Cards / surfaces */

.ngm-card {
    background: var(--ngm-bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-medium);
    box-shadow: none;
    padding: 16px;
}

/* Tablas genéricas */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table thead {
    background: var(--ngm-bg-surface);
}

.table th {
    text-align: left;
    padding: 10px 12px;
    font-weight: 500;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--text-primary);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Inputs dentro de tabla */

.table .cell-input {
    width: 100%;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
    background: var(--bg-input);
    color: var(--text-primary);
    padding: 6px 8px;
    font-size: 12px;
}

.table .cell-input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Modal genérico */

.modal.hidden {
  display: none;
}

/* ==========================================
   MODAL BACKDROP — Frosted overlay
   ========================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-float);
    animation: modalBackdropIn 0.2s ease;
}

@keyframes modalBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ==========================================
   MODAL CONTAINER — Liquid Glass Panel
   ========================================== */
.modal {
    background:
        linear-gradient(160deg,
            rgba(30, 30, 32, 0.92) 0%,
            rgba(22, 22, 24, 0.95) 50%,
            rgba(26, 26, 28, 0.92) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.15),
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 8px 24px rgba(0, 0, 0, 0.3);
    padding: 0;
    max-width: 520px;
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Top glass highlight */
.modal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(255, 255, 255, 0.12),
        transparent);
    pointer-events: none;
    z-index: 1;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================
   SHARED MODAL COMPONENTS
   ========================================== */

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(180deg,
            rgba(255, 255, 255, 0.03) 0%,
            transparent 100%);
}

.modal-header h2,
.modal-header h3,
.modal-header .modal-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    letter-spacing: -0.01em;
}

.modal-body {
    padding: 22px;
    overflow-y: auto;
    flex: 1;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.modal-body:hover {
    scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background:
        linear-gradient(0deg,
            rgba(255, 255, 255, 0.02) 0%,
            transparent 100%);
}

/* Close button — glass circle */
.modal-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
}

/* Legacy close button (.modal-btn.header-action) */
.modal-btn.header-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    transition: all 0.2s ease;
}

.modal-btn.header-action:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
}

/* ==========================================
   MODAL FORM ELEMENTS — Glass inputs
   ========================================== */
.modal-body input[type="text"],
.modal-body input[type="number"],
.modal-body input[type="email"],
.modal-body input[type="date"],
.modal-body input[type="url"],
.modal-body textarea,
.modal-body select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.modal-body input:focus,
.modal-body textarea:focus,
.modal-body select:focus {
    border-color: rgba(61, 202, 139, 0.4);
    background: rgba(255, 255, 255, 0.05);
}

.modal-body input::placeholder,
.modal-body textarea::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.modal-body label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
}

/* Modal overlay (Pattern 2 — legacy) */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px) saturate(1.2);
    -webkit-backdrop-filter: blur(8px) saturate(1.2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-float);
}

.modal-container {
    background:
        linear-gradient(160deg,
            rgba(30, 30, 32, 0.92) 0%,
            rgba(22, 22, 24, 0.95) 50%,
            rgba(26, 26, 28, 0.92) 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px) saturate(1.5);
    -webkit-backdrop-filter: blur(40px) saturate(1.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 24px 80px rgba(0, 0, 0, 0.5),
        0 8px 24px rgba(0, 0, 0, 0.3);
    width: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Modal footer button pair — Liquid Glass */
.modal-footer .btn-secondary,
.modal-footer .btn-primary {
    appearance: none;
    border-radius: var(--btn-radius);
    padding: var(--btn-padding-lg);
    font-size: var(--btn-font-md);
    font-weight: var(--btn-weight);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    transition:
        background 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        color 0.2s;
}

.modal-footer .btn-secondary {
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0.02) 50%,
            rgba(255, 255, 255, 0.04) 100%);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--text-primary, #ededed);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.modal-footer .btn-secondary:hover {
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.05) 50%,
            rgba(255, 255, 255, 0.08) 100%);
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(0, 0, 0, 0.2);
}

.modal-footer .btn-primary {
    background:
        linear-gradient(135deg,
            rgba(61, 202, 139, 0.12) 0%,
            rgba(61, 202, 139, 0.05) 50%,
            rgba(61, 202, 139, 0.09) 100%);
    border: 1px solid rgba(61, 202, 139, 0.22);
    color: #6ee7a0;
    font-weight: var(--btn-weight-strong);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(61, 202, 139, 0.1);
}

.modal-footer .btn-primary:hover {
    color: #86efac;
    background:
        linear-gradient(135deg,
            rgba(61, 202, 139, 0.20) 0%,
            rgba(61, 202, 139, 0.10) 50%,
            rgba(61, 202, 139, 0.16) 100%);
    border-color: rgba(61, 202, 139, 0.40);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(61, 202, 139, 0.18),
        0 0 0 1px rgba(61, 202, 139, 0.08);
}

.modal-footer .btn-secondary:disabled,
.modal-footer .btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    pointer-events: none;
}

/* Toolbar buttons: see buttons.css for .btn-toolbar, .btn-toolbar-primary, .btn-toolbar-secondary */

/* ==========================================
   SCROLLBAR UTILITIES
   ========================================== */

/* All scrollbar utilities: hidden (Supabase style - no visible scrollbar, scroll still works) */

.scrollbar-heavy,
.scrollbar-subtle,
.scrollbar-panel,
.scrollbar-dropdown,
.scrollbar-micro,
.scrollbar-chat {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scrollbar-heavy::-webkit-scrollbar,
.scrollbar-subtle::-webkit-scrollbar,
.scrollbar-panel::-webkit-scrollbar,
.scrollbar-dropdown::-webkit-scrollbar,
.scrollbar-micro::-webkit-scrollbar,
.scrollbar-chat::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

/* Discrete scrollbar: all major scrollable containers use the .discrete-scroll
   utility class defined above. For containers not yet marked in HTML, this block
   auto-applies the same overlay + is-scrolling behavior via their specific selectors. */
.expenses-table-container,
.reconcile-table-wrapper,
.permissions-table-wrapper,
.pm-group-body,
.om-grid,
.gantt-grid-pane,
.gantt-chart-pane,
.pbw-content,
.cam-comments-list,
.vault-version-list,
#addExpenseModal .modal-table-container,
#qboMappingModal .mapping-table-container,
#layoutModal .modal-body,
#newTaskModal .modal-body,
#automationsModal .modal-body,
#companyModal .modal-body,
#teamUserModal .modal-body,
.csv-mapping-container,
#editSingleExpenseModal .modal-body,
.pending-receipts-grid,
.audit-trail-list,
.filter-dropdown-options,
.mentions-drawer-body,
.cmd-palette-results,
.process-navigator-list,
#timelineContent {
    overflow: overlay;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

/* Webkit: thin scrollbar, hidden by default */
.expenses-table-container::-webkit-scrollbar,
.reconcile-table-wrapper::-webkit-scrollbar,
.permissions-table-wrapper::-webkit-scrollbar,
.pm-group-body::-webkit-scrollbar,
.om-grid::-webkit-scrollbar,
.gantt-grid-pane::-webkit-scrollbar,
.gantt-chart-pane::-webkit-scrollbar,
.pbw-content::-webkit-scrollbar,
.cam-comments-list::-webkit-scrollbar,
.vault-version-list::-webkit-scrollbar,
#addExpenseModal .modal-table-container::-webkit-scrollbar,
#qboMappingModal .mapping-table-container::-webkit-scrollbar,
#layoutModal .modal-body::-webkit-scrollbar,
#newTaskModal .modal-body::-webkit-scrollbar,
#automationsModal .modal-body::-webkit-scrollbar,
#companyModal .modal-body::-webkit-scrollbar,
#teamUserModal .modal-body::-webkit-scrollbar,
.csv-mapping-container::-webkit-scrollbar,
#editSingleExpenseModal .modal-body::-webkit-scrollbar,
.pending-receipts-grid::-webkit-scrollbar,
.audit-trail-list::-webkit-scrollbar,
.filter-dropdown-options::-webkit-scrollbar,
.mentions-drawer-body::-webkit-scrollbar,
.cmd-palette-results::-webkit-scrollbar,
.process-navigator-list::-webkit-scrollbar,
#timelineContent::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.expenses-table-container::-webkit-scrollbar-track,
.reconcile-table-wrapper::-webkit-scrollbar-track,
.permissions-table-wrapper::-webkit-scrollbar-track,
.pm-group-body::-webkit-scrollbar-track,
.om-grid::-webkit-scrollbar-track,
.gantt-grid-pane::-webkit-scrollbar-track,
.gantt-chart-pane::-webkit-scrollbar-track,
.pbw-content::-webkit-scrollbar-track,
.cam-comments-list::-webkit-scrollbar-track,
.vault-version-list::-webkit-scrollbar-track,
#addExpenseModal .modal-table-container::-webkit-scrollbar-track,
#qboMappingModal .mapping-table-container::-webkit-scrollbar-track,
#layoutModal .modal-body::-webkit-scrollbar-track,
#newTaskModal .modal-body::-webkit-scrollbar-track,
#automationsModal .modal-body::-webkit-scrollbar-track,
#companyModal .modal-body::-webkit-scrollbar-track,
#teamUserModal .modal-body::-webkit-scrollbar-track,
.csv-mapping-container::-webkit-scrollbar-track,
#editSingleExpenseModal .modal-body::-webkit-scrollbar-track,
.pending-receipts-grid::-webkit-scrollbar-track,
.audit-trail-list::-webkit-scrollbar-track,
.filter-dropdown-options::-webkit-scrollbar-track,
.mentions-drawer-body::-webkit-scrollbar-track,
.cmd-palette-results::-webkit-scrollbar-track,
.process-navigator-list::-webkit-scrollbar-track,
#timelineContent::-webkit-scrollbar-track {
    background: transparent;
}

.expenses-table-container::-webkit-scrollbar-thumb,
.reconcile-table-wrapper::-webkit-scrollbar-thumb,
.permissions-table-wrapper::-webkit-scrollbar-thumb,
.pm-group-body::-webkit-scrollbar-thumb,
.om-grid::-webkit-scrollbar-thumb,
.gantt-grid-pane::-webkit-scrollbar-thumb,
.gantt-chart-pane::-webkit-scrollbar-thumb,
.pbw-content::-webkit-scrollbar-thumb,
.cam-comments-list::-webkit-scrollbar-thumb,
.vault-version-list::-webkit-scrollbar-thumb,
#addExpenseModal .modal-table-container::-webkit-scrollbar-thumb,
#qboMappingModal .mapping-table-container::-webkit-scrollbar-thumb,
#layoutModal .modal-body::-webkit-scrollbar-thumb,
#newTaskModal .modal-body::-webkit-scrollbar-thumb,
#automationsModal .modal-body::-webkit-scrollbar-thumb,
#companyModal .modal-body::-webkit-scrollbar-thumb,
#teamUserModal .modal-body::-webkit-scrollbar-thumb,
.csv-mapping-container::-webkit-scrollbar-thumb,
#editSingleExpenseModal .modal-body::-webkit-scrollbar-thumb,
.pending-receipts-grid::-webkit-scrollbar-thumb,
.audit-trail-list::-webkit-scrollbar-thumb,
.filter-dropdown-options::-webkit-scrollbar-thumb,
.mentions-drawer-body::-webkit-scrollbar-thumb,
.cmd-palette-results::-webkit-scrollbar-thumb,
.process-navigator-list::-webkit-scrollbar-thumb,
#timelineContent::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 99px;
}

.expenses-table-container::-webkit-scrollbar-corner,
.reconcile-table-wrapper::-webkit-scrollbar-corner,
.om-grid::-webkit-scrollbar-corner,
.gantt-chart-pane::-webkit-scrollbar-corner {
    background: transparent;
}

/* Show scrollbar while scrolling (Firefox) */
.expenses-table-container.is-scrolling,
.reconcile-table-wrapper.is-scrolling,
.permissions-table-wrapper.is-scrolling,
.pm-group-body.is-scrolling,
.om-grid.is-scrolling,
.gantt-grid-pane.is-scrolling,
.gantt-chart-pane.is-scrolling,
.pbw-content.is-scrolling,
.cam-comments-list.is-scrolling,
.vault-version-list.is-scrolling,
#addExpenseModal .modal-table-container.is-scrolling,
#qboMappingModal .mapping-table-container.is-scrolling,
#layoutModal .modal-body.is-scrolling,
#newTaskModal .modal-body.is-scrolling,
#automationsModal .modal-body.is-scrolling,
#companyModal .modal-body.is-scrolling,
#teamUserModal .modal-body.is-scrolling,
.csv-mapping-container.is-scrolling,
#editSingleExpenseModal .modal-body.is-scrolling,
.pending-receipts-grid.is-scrolling,
.audit-trail-list.is-scrolling,
.filter-dropdown-options.is-scrolling,
.mentions-drawer-body.is-scrolling,
.cmd-palette-results.is-scrolling,
.process-navigator-list.is-scrolling,
#timelineContent.is-scrolling {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Show scrollbar while scrolling (Webkit) */
.expenses-table-container.is-scrolling::-webkit-scrollbar-thumb,
.reconcile-table-wrapper.is-scrolling::-webkit-scrollbar-thumb,
.permissions-table-wrapper.is-scrolling::-webkit-scrollbar-thumb,
.pm-group-body.is-scrolling::-webkit-scrollbar-thumb,
.om-grid.is-scrolling::-webkit-scrollbar-thumb,
.gantt-grid-pane.is-scrolling::-webkit-scrollbar-thumb,
.gantt-chart-pane.is-scrolling::-webkit-scrollbar-thumb,
.pbw-content.is-scrolling::-webkit-scrollbar-thumb,
.cam-comments-list.is-scrolling::-webkit-scrollbar-thumb,
.vault-version-list.is-scrolling::-webkit-scrollbar-thumb,
#addExpenseModal .modal-table-container.is-scrolling::-webkit-scrollbar-thumb,
#qboMappingModal .mapping-table-container.is-scrolling::-webkit-scrollbar-thumb,
#layoutModal .modal-body.is-scrolling::-webkit-scrollbar-thumb,
#newTaskModal .modal-body.is-scrolling::-webkit-scrollbar-thumb,
#automationsModal .modal-body.is-scrolling::-webkit-scrollbar-thumb,
#companyModal .modal-body.is-scrolling::-webkit-scrollbar-thumb,
#teamUserModal .modal-body.is-scrolling::-webkit-scrollbar-thumb,
.csv-mapping-container.is-scrolling::-webkit-scrollbar-thumb,
#editSingleExpenseModal .modal-body.is-scrolling::-webkit-scrollbar-thumb,
.pending-receipts-grid.is-scrolling::-webkit-scrollbar-thumb,
.audit-trail-list.is-scrolling::-webkit-scrollbar-thumb,
.filter-dropdown-options.is-scrolling::-webkit-scrollbar-thumb,
.mentions-drawer-body.is-scrolling::-webkit-scrollbar-thumb,
.cmd-palette-results.is-scrolling::-webkit-scrollbar-thumb,
.process-navigator-list.is-scrolling::-webkit-scrollbar-thumb,
#timelineContent.is-scrolling::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

.expenses-table-container.is-scrolling::-webkit-scrollbar-thumb:hover,
.reconcile-table-wrapper.is-scrolling::-webkit-scrollbar-thumb:hover,
.permissions-table-wrapper.is-scrolling::-webkit-scrollbar-thumb:hover,
.pm-group-body.is-scrolling::-webkit-scrollbar-thumb:hover,
.om-grid.is-scrolling::-webkit-scrollbar-thumb:hover,
.gantt-grid-pane.is-scrolling::-webkit-scrollbar-thumb:hover,
.gantt-chart-pane.is-scrolling::-webkit-scrollbar-thumb:hover,
.pbw-content.is-scrolling::-webkit-scrollbar-thumb:hover,
.cam-comments-list.is-scrolling::-webkit-scrollbar-thumb:hover,
.vault-version-list.is-scrolling::-webkit-scrollbar-thumb:hover,
#addExpenseModal .modal-table-container.is-scrolling::-webkit-scrollbar-thumb:hover,
#qboMappingModal .mapping-table-container.is-scrolling::-webkit-scrollbar-thumb:hover,
#layoutModal .modal-body.is-scrolling::-webkit-scrollbar-thumb:hover,
#newTaskModal .modal-body.is-scrolling::-webkit-scrollbar-thumb:hover,
#automationsModal .modal-body.is-scrolling::-webkit-scrollbar-thumb:hover,
#companyModal .modal-body.is-scrolling::-webkit-scrollbar-thumb:hover,
#teamUserModal .modal-body.is-scrolling::-webkit-scrollbar-thumb:hover,
.csv-mapping-container.is-scrolling::-webkit-scrollbar-thumb:hover,
#editSingleExpenseModal .modal-body.is-scrolling::-webkit-scrollbar-thumb:hover,
.pending-receipts-grid.is-scrolling::-webkit-scrollbar-thumb:hover,
.audit-trail-list.is-scrolling::-webkit-scrollbar-thumb:hover,
.filter-dropdown-options.is-scrolling::-webkit-scrollbar-thumb:hover,
.mentions-drawer-body.is-scrolling::-webkit-scrollbar-thumb:hover,
.cmd-palette-results.is-scrolling::-webkit-scrollbar-thumb:hover,
.process-navigator-list.is-scrolling::-webkit-scrollbar-thumb:hover,
#timelineContent.is-scrolling::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Títulos de sección reutilizables */

.ngm-section-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.ngm-section-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}


/* NGM Topbar - overrides handled in first declaration */

/* Alineación global */
.ngm-bar-left {
    display: flex;
    align-items: center;
    gap: 0;
}

.ngm-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ngm-search {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-soft);
    background: var(--ngm-bg-surface);
}

.ngm-search-input {
    border: none;
    outline: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.85rem;
    min-width: 180px;
}

.ngm-search-input::placeholder {
    color: var(--text-muted);
}

.ngm-global-search-icon {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.ngm-brand-icon-small {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    background: var(--ngm-bg-surface);
    border: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: var(--accent);
    overflow: hidden;
    padding: 3px;
}

.ngm-brand-icon-small img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Filtro verde Supabase */
    filter: brightness(0) saturate(100%) invert(75%) sepia(41%) saturate(506%) hue-rotate(101deg) brightness(92%) contrast(89%);
}

.ngm-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ngm-brand-org {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.ngm-brand-context {
    font-size: 0.85rem;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0;
}

.ngm-breadcrumb-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.15s ease;
}

.ngm-breadcrumb-link:hover {
    color: var(--text-primary);
}

.ngm-breadcrumb-sep {
    color: var(--text-faint);
    margin: 0 7px;
    font-weight: 300;
    font-size: 0.9em;
    user-select: none;
}

.ngm-breadcrumb-current {
    color: var(--text-primary);
    font-weight: 500;
}

.ngm-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-right: 4px;
}

/* --- Status indicator icons (replace pills) --- */
.ngm-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: default;
    position: relative;
    transition: background 0.15s ease;
}

.ngm-status-icon:hover {
    background: var(--bg-hover-strong);
}

.ngm-status-icon svg {
    width: 16px;
    height: 16px;
}

/* Tooltip on hover */
.ngm-status-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--ngm-bg-card);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 50;
}

.ngm-status-icon:hover::after {
    opacity: 1;
}

/* Environment icon states */
.ngm-status-env svg {
    color: var(--text-faint);
}

.ngm-status-env-staging svg {
    color: #eab308;
}

.ngm-status-env-dev svg {
    color: #818cf8;
}

.ngm-status-env-prod svg {
    color: var(--text-faint);
}

/* Server status icon states */
.ngm-status-server svg {
    color: var(--text-faint);
}

.ngm-status-server-live svg {
    color: var(--accent);
}

.ngm-status-server-offline svg {
    color: var(--color-danger);
}

/* Legacy pill styles kept for backwards compat */
.ngm-meta-pill {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    border: 1px solid var(--border-soft);
    background: var(--ngm-bg-surface);
    color: var(--text-secondary);
    white-space: nowrap;
    display: none;
}

/* ==========================================
   PAGE LOADING OVERLAY
   Shows only the spinner until content is ready
   ========================================== */

.page-loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-main, #0d0d0d);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: var(--z-top);
    gap: 16px;
}

.page-loading-overlay.hidden {
    display: none;
}

/* Hide main content while loading */
.page-loading .main-area {
    visibility: hidden;
}

/* Keep sidebar visible during load */
.page-loading .sidebar {
    visibility: visible;
}

/* ==========================================
   GLOBAL UTILITY CLASSES
   ========================================== */

/* Generic hidden class for show/hide functionality */
.hidden {
    display: none !important;
}

/* ==========================================
   NGM LOGO LOADING ANIMATION SYSTEM
   ========================================== */

/* Base loading logo class - pulse effect */
.loading-logo {
    display: inline-block;
    position: relative;
    object-fit: contain;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Size variants */
.loading-logo-xs {
    width: 24px;
    height: 24px;
}

.loading-logo-sm {
    width: 36px;
    height: 36px;
}

.loading-logo-md {
    width: 72px;
    height: 72px;
}

.loading-logo-lg {
    width: 96px;
    height: 96px;
}

.loading-logo-xl {
    width: 160px;
    height: 160px;
}

/* Default size if no size class specified */
.loading-logo:not([class*="loading-logo-"]) {
    width: 120px;
    height: 120px;
}

/* Pulse animation - consistent across all pages */
@keyframes pulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Loading text styling */
.loading-text {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-family: system-ui, -apple-system, sans-serif;
    letter-spacing: 0.05em;
}

/* ==========================================
   MOBILE RESPONSIVE LAYOUT
   ========================================== */

/* Mobile menu button - hidden by default */
.mobile-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
    padding: 0;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-btn svg {
    width: 24px;
    height: 24px;
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

/* Mobile back button in sidebar header */
.sidebar-mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 8px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-close-btn svg {
    width: 20px;
    height: 20px;
}

.sidebar-mobile-title {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .sidebar {
        --sidebar-collapsed: 56px;
        --sidebar-expanded: 220px;
    }

    .main-area {
        margin-left: 56px;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Show mobile menu button */
    .mobile-menu-btn {
        display: flex;
    }

    /* Show sidebar overlay */
    .sidebar-overlay {
        display: block;
    }

    .sidebar-overlay.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Sidebar becomes slide-out drawer on mobile (no collapse behavior) */
    .sidebar {
        width: 280px;
        max-width: 85vw;
        z-index: var(--z-dropdown);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        padding: 0 12px 12px;
    }

    .sidebar:hover {
        box-shadow: none;
    }

    .main-area {
        margin-left: 0;
    }

    /* Override collapse: always expanded on mobile */
    .sidebar,
    .sidebar:hover {
        --sidebar-collapsed: 280px;
        --sidebar-expanded: 280px;
    }

    .sidebar .nav-item-label {
        opacity: 1;
    }

    .sidebar .nav-group-header {
        opacity: 1;
        height: auto;
        padding: 8px 12px 4px;
        margin-top: 4px;
    }

    .sidebar.is-open {
        transform: translateX(0);
    }

    /* Show mobile header in sidebar */
    .sidebar-mobile-header {
        display: flex;
    }

    /* Main content takes full width */
    .main-content,
    .art-main,
    .page-content {
        width: 100%;
        margin-left: 0;
    }

    /* Topbar adjustments */
    .ngm-topbar {
        padding: 12px 16px;
    }

    .ngm-topbar-left {
        gap: 8px;
    }

    .ngm-topbar-title {
        font-size: 16px;
    }

    /* Hide less important topbar elements on mobile */
    .ngm-search-pill {
        display: none;
    }

    /* User avatar compact on mobile */
    .user-avatar-btn {
        width: 28px;
        height: 28px;
    }

    .user-avatar-initials {
        font-size: 11px;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    .sidebar,
    .sidebar:hover {
        --sidebar-collapsed: 100%;
        --sidebar-expanded: 100%;
        max-width: none;
    }

    .ngm-topbar {
        padding: 10px 12px;
    }

    .ngm-topbar-title {
        font-size: 14px;
    }
}

/* PWA standalone mode */
@media (display-mode: standalone) {
    .sidebar {
        padding-top: env(safe-area-inset-top);
    }

    .ngm-topbar {
        padding-top: calc(12px + env(safe-area-inset-top));
    }

    .main-content,
    .art-main,
    .page-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* iOS specific - prevent zoom on inputs */
@supports (-webkit-touch-callout: none) {
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* ============================================
   COMPANY PICKER — Reusable company selector
   ============================================ */

.company-picker-bar {
    display: flex;
    align-items: center;
    padding: 16px 24px 0;
    gap: 12px;
}

.company-picker {
    position: relative;
}

.company-picker-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.08);
    color: rgba(255,255,255,0.88);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s cubic-bezier(0.4,0,0.2,1),
                border-color 0.3s cubic-bezier(0.4,0,0.2,1),
                box-shadow 0.3s cubic-bezier(0.4,0,0.2,1),
                color 0.2s;
    white-space: nowrap;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.company-picker-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    pointer-events: none;
}

.company-picker-btn:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.18);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.10),
        inset 0 -1px 0 rgba(0,0,0,0.08),
        0 4px 16px rgba(0,0,0,0.12);
}

.company-picker.open .company-picker-btn {
    border-color: rgba(61, 202, 139, 0.4);
    background: rgba(255,255,255,0.08);
}

.company-picker-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
    background: var(--accent);
}

.company-picker-chevron {
    color: rgba(255,255,255,0.35);
    flex-shrink: 0;
    transition: transform 0.15s;
}

.company-picker.open .company-picker-chevron {
    transform: rotate(180deg);
}

.company-picker-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    max-height: 320px;
    overflow-y: auto;
    background: rgba(18, 18, 22, 0.75);
    backdrop-filter: blur(40px) saturate(1.6);
    -webkit-backdrop-filter: blur(40px) saturate(1.6);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 6px;
    z-index: var(--z-sticky);
    display: flex;
    flex-direction: column;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.08),
        inset 0 -1px 0 rgba(0,0,0,0.12),
        0 8px 32px rgba(0,0,0,0.35),
        0 2px 8px rgba(0,0,0,0.2);
}

.company-picker-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255,255,255,0.72);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.12s ease, color 0.12s ease;
    white-space: nowrap;
}

.company-picker-option:hover {
    background: rgba(255,255,255,0.08);
    color: #ededed;
}

.company-picker-option.active {
    background: rgba(61, 202, 139, 0.10);
    color: #6ee7a0;
    font-weight: 600;
}

.company-picker-opt-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* ==========================================
   WIDGET DOCK — Hide/show floating widgets
   ========================================== */

/* Dock toggle button (sits between the two widget buttons) */
.widget-dock-toggle {
    position: fixed;
    bottom: 78px;
    right: 14px;
    z-index: 9999;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.06) 0%,
            rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    color: rgba(255, 255, 255, 0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.35;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 1px 3px rgba(0, 0, 0, 0.15);
}

/* Show toggle when hovering it directly */
.widget-dock-toggle:hover,
.widget-dock-toggle:focus-visible {
    opacity: 1;
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.05) 100%);
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.18);
    transform: scale(1.15);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 12px rgba(0, 0, 0, 0.25);
}

.widget-dock-toggle svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Docked state — push almost entirely off-screen ── */
body.widgets-docked .art-widget-btn,
body.widgets-docked .chat-widget-btn {
    transform: translateX(72px);
    opacity: 0.4;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Peek on hover — bouncy spring */
body.widgets-docked .art-widget-btn:hover {
    transform: translateX(0) scale(1.05);
    opacity: 1;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.widgets-docked .chat-widget-btn:hover {
    transform: translateX(0) scale(1.08);
    opacity: 1;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dock toggle in docked state — slightly more visible */
body.widgets-docked .widget-dock-toggle {
    opacity: 0.5;
    right: 18px;
}

body.widgets-docked .widget-dock-toggle:hover {
    opacity: 1;
    transform: scale(1.15);
}

body.widgets-docked .widget-dock-toggle svg {
    transform: rotate(180deg);
}

/* Subtle breathing glow on docked buttons to hint they're there */
@keyframes widgetDockGlow {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 8px 2px rgba(61, 202, 139, 0.15); }
}

body.widgets-docked .art-widget-btn {
    animation: widgetDockGlow 4s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes widgetDockGlowBlue {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    50% { box-shadow: 0 0 8px 2px rgba(59, 130, 246, 0.15); }
}

body.widgets-docked .chat-widget-btn {
    animation: widgetDockGlowBlue 4s ease-in-out infinite;
    animation-delay: 3s;
}

/* When docked and hovered, stop glow and use glass shadow */
body.widgets-docked .art-widget-btn:hover {
    animation: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12),
        0 6px 28px rgba(61, 202, 139, 0.3),
        0 0 0 1px rgba(61, 202, 139, 0.1);
}

body.widgets-docked .chat-widget-btn:hover {
    animation: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12),
        0 6px 24px rgba(59, 130, 246, 0.3),
        0 0 0 1px rgba(59, 130, 246, 0.1);
}

/* Dock slide-in animation */
@keyframes widgetUndock {
    0% { transform: translateX(72px); opacity: 0.4; }
    60% { transform: translateX(-6px); opacity: 1; }
    100% { transform: translateX(0); opacity: 1; }
}

body.widgets-undocking .art-widget-btn,
body.widgets-undocking .chat-widget-btn {
    animation: widgetUndock 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Hover zone — invisible wide area to detect mouse near docked widgets */
body.widgets-docked .widget-dock-zone {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 140px;
    z-index: 9996;
    pointer-events: auto;
}

body.widgets-docked .widget-dock-zone:hover ~ .art-widget-btn,
body.widgets-docked .widget-dock-zone:hover ~ .chat-widget-btn {
    transform: translateX(40px);
    opacity: 0.6;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Page exclusions — hide dock toggle too */
.page-art .widget-dock-toggle,
.page-art .widget-dock-zone,
.page-messages .widget-dock-toggle,
.page-messages .widget-dock-zone {
    display: none !important;
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .widget-dock-toggle {
        bottom: 72px;
        right: 12px;
    }

    body.widgets-docked .art-widget-btn,
    body.widgets-docked .chat-widget-btn {
        transform: translateX(68px);
    }
}