/* ==========================================
   OXLYN-BOSSMENU | UI System
   ==========================================
   Design tokens + base components.
   Toda a polidez visual passa por aqui. */

:root {
    /* Cores base */
    --bg-base:        #0a0a0c;
    --bg-1:           rgba(28, 28, 30, .72);
    --bg-2:           rgba(36, 36, 40, .82);
    --bg-3:           rgba(48, 48, 52, .92);
    --bg-elevated:    rgba(255,255,255,.06);
    --bg-elevated-h:  rgba(255,255,255,.10);

    --line-1:         rgba(255,255,255,.06);
    --line-2:         rgba(255,255,255,.10);
    --line-3:         rgba(255,255,255,.14);

    --text-1:         rgba(255,255,255,.96);
    --text-2:         rgba(255,255,255,.72);
    --text-3:         rgba(255,255,255,.50);
    --text-4:         rgba(255,255,255,.30);

    --accent:         #007aff;
    --accent-h:       #0a84ff;
    --accent-soft:    rgba(0,122,255,.16);
    --success:        #34c759;
    --warning:        #ff9f0a;
    --danger:         #ff453a;
    --pink:           #ff375f;
    --purple:         #af52de;
    --teal:           #5ac8fa;

    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-pill: 999px;

    --shadow-sm: 0 2px 6px rgba(0,0,0,.25);
    --shadow-md: 0 6px 20px rgba(0,0,0,.32);
    --shadow-lg: 0 18px 60px rgba(0,0,0,.55), 0 0 0 .5px rgba(0,0,0,.5);
    --shadow-xl: 0 30px 90px rgba(0,0,0,.6), 0 0 0 .5px rgba(0,0,0,.6);
    --shadow-inset: inset 0 1px 0 rgba(255,255,255,.06), inset 0 0 0 1px rgba(255,255,255,.04);

    /* ==========================================
       Liquid Glass tokens (Apple-style)
       ==========================================
       Cada superfície "glass" usa uma combinação de:
       - cor base com alfa
       - blur (raio)
       - saturação ligeira (faz cores por trás "viverem")
       - highlight superior + edge inset
       O backdrop-filter é o maior custo da NUI; estes valores
       já estão calibrados para parecer Liquid Glass mas sem
       matar GPUs fracas (raio máximo 22px, saturate 160-180%).

       PERFORMANCE MODE: body.perf-low desliga todos os blurs
       e substitui por cores opacas equivalentes. Toggle em
       Definições → Aparência → Reduzir efeitos visuais. */

    /* Raios de blur — três tiers únicos, reutilizáveis em tudo */
    --blur-thin:  blur(10px) saturate(140%);
    --blur-md:    blur(16px) saturate(160%);
    --blur-strong: blur(22px) saturate(180%);
    /* Aliases legacy */
    --blur-lg: var(--blur-md);
    --blur-xl: var(--blur-strong);

    /* Cores base do Liquid Glass — adaptam-se conforme a profundidade */
    --glass-thin:    rgba(28,28,32,.55);
    --glass-md:      rgba(32,32,36,.65);
    --glass-strong:  rgba(38,38,44,.75);
    --glass-popover: rgba(46,46,52,.78);
    --glass-tint:    rgba(255,255,255,.06);

    /* Highlight no topo (lambe a luz) — usado em todos os glass */
    --glass-shine:    inset 0 1px 0 rgba(255,255,255,.10);
    --glass-shine-2:  inset 0 1px 0 rgba(255,255,255,.16);
    --glass-edge:     inset 0 0 0 1px rgba(255,255,255,.06);
    --glass-edge-2:   inset 0 0 0 1px rgba(255,255,255,.10);
    --glass-hairline: 0 0 0 .5px rgba(0,0,0,.4);

    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* ==========================================
   PERFORMANCE MODE (body.perf-low)
   ==========================================
   Quando o user activa "Reduzir efeitos visuais" em Definições:
   - desliga TODOS os backdrop-filter (o maior custo da NUI)
   - substitui camadas glass por cores opacas (visivelmente mate, sem refração)
   - força gradients translucidos a ficarem opacos
   - elimina shadows ambient pesadas e brightness/drop-shadow filters
   - reduz duração de animações spring para movimento mais directo */

body.perf-low *,
body.perf-low *::before,
body.perf-low *::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.perf-low {
    --glass-thin:    rgba(32,32,36,.98);
    --glass-md:      rgba(36,36,40,.98);
    --glass-strong:  rgba(42,42,46,.99);
    --glass-popover: rgba(48,48,52,.99);
}

/* Substitui as superfícies glass pelas cores opacas equivalentes —
   o backdrop-filter está off, então a transparência mostraria o que está
   por trás de forma feia. Fica visivelmente "mate". */
body.perf-low #menu-bar          { background: #1c1c20 !important; }
body.perf-low #dock              { background: #2a2a32 !important; }
body.perf-low .dropdown          { background: #2c2c30 !important; }
body.perf-low .menu-panel        { background: #2a2a30 !important; }
body.perf-low .modal-card        { background: #2c2c32 !important; }
body.perf-low .notification      { background: #2a2a30 !important; }
body.perf-low .sidebar-app .sidebar { background: #1f1f24 !important; }
body.perf-low .notes-sidebar,
body.perf-low .rem-sidebar       { background: #1f1f24 !important; }
body.perf-low .browser-toolbar   { background: #2a2a30 !important; }
body.perf-low .cal-header,
body.perf-low .clock-tabs,
body.perf-low .notes-editor-toolbar { background: #1f1f24 !important; }
body.perf-low .window-titlebar   { background: #2c2c32 !important; }

/* Cards da Loja em perf-low — opacos, sem blur */
body.perf-low .store-card,
body.perf-low .store-bigcard,
body.perf-low .store-search,
body.perf-low .pill-btn,
body.perf-low .store-hero-secondary {
    background: rgba(255,255,255,.06) !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08) !important;
}
body.perf-low .pill-btn { color: var(--accent) !important; }
body.perf-low .pill-btn:hover { background: rgba(255,255,255,.10) !important; }

/* Sombras pesadas → simplificadas */
body.perf-low .os-window,
body.perf-low .notification,
body.perf-low .menu-panel,
body.perf-low .modal-card,
body.perf-low .dropdown {
    box-shadow: 0 8px 22px rgba(0,0,0,.5), 0 0 0 .5px rgba(0,0,0,.55) !important;
}
body.perf-low #dock {
    box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.10) !important;
}

/* Filtros pesados (drop-shadow, brightness) → off */
body.perf-low .dock-item { filter: none !important; }
body.perf-low .dock-item:not(.dragging):hover {
    transform: scale(1.22) translateY(-6px) !important;
    filter: none !important;
}
body.perf-low .download-ring .ring-fill { filter: none !important; }

/* Animações spring → reduzidas para movimento limpo */
body.perf-low * { animation-duration: .18s !important; }

/* Background do desktop em perf-low — sem o gradient costly do .main */
body.perf-low .sidebar-app .main {
    background:
        radial-gradient(ellipse at 80% 0%, rgba(60,80,160,.06) 0%, transparent 50%),
        #1a1a1f !important;
}

/* Indicador subtil no canto da menu-bar (debug) */
body.perf-low #menu-bar::after {
    content: 'Modo Performance';
    position: absolute;
    bottom: -18px;
    right: 8px;
    font-size: 9px;
    color: rgba(255,255,255,.35);
    pointer-events: none;
    letter-spacing: .5px;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0;
    animation: perfHint 3s ease-out forwards;
}
@keyframes perfHint {
    0%   { opacity: 0; }
    20%  { opacity: 1; }
    80%  { opacity: 1; }
    100% { opacity: 0; }
}

/* ==========================================
   THEME: LIGHT MODE (body.theme-light)
   ==========================================
   Inverte a paleta — cores quase brancas em superfícies, texto escuro.
   Os blurs continuam Liquid Glass mas com tinta clara. */
body.theme-light {
    --bg-base:        #f5f5f7;
    --bg-1:           rgba(245,245,247,.78);
    --bg-2:           rgba(238,238,242,.84);
    --bg-3:           rgba(228,228,232,.92);
    --bg-elevated:    rgba(0,0,0,.05);
    --bg-elevated-h:  rgba(0,0,0,.09);

    --line-1:         rgba(0,0,0,.06);
    --line-2:         rgba(0,0,0,.10);
    --line-3:         rgba(0,0,0,.14);

    --text-1:         rgba(0,0,0,.92);
    --text-2:         rgba(0,0,0,.66);
    --text-3:         rgba(0,0,0,.46);
    --text-4:         rgba(0,0,0,.28);

    --glass-thin:    rgba(255,255,255,.55);
    --glass-md:      rgba(248,248,250,.65);
    --glass-strong:  rgba(240,240,244,.75);
    --glass-popover: rgba(252,252,254,.82);

    --glass-shine:    inset 0 1px 0 rgba(255,255,255,.45);
    --glass-shine-2:  inset 0 1px 0 rgba(255,255,255,.55);
    --glass-edge:     inset 0 0 0 1px rgba(0,0,0,.05);
    --glass-edge-2:   inset 0 0 0 1px rgba(0,0,0,.08);
    --glass-hairline: 0 0 0 .5px rgba(0,0,0,.10);
}
/* Em light mode, alguns elementos opacos têm de mudar para fundo claro */
body.theme-light #screen { background: #f5f5f7; }
body.theme-light .os-window { background: #ffffff; }
body.theme-light .window-content { background: #ffffff; color: #1a1a1a; }
body.theme-light .sidebar-app  { background: #ffffff; color: #1a1a1a; }
body.theme-light .sidebar-app .main {
    background:
        radial-gradient(ellipse 60% 80% at 80% 0%, rgba(120,140,255,.10) 0%, transparent 55%),
        radial-gradient(ellipse 50% 70% at 0% 100%, rgba(180,80,200,.08) 0%, transparent 55%),
        linear-gradient(180deg, #ffffff 0%, #f4f4f7 100%) !important;
    color: #1a1a1a;
}
body.theme-light .notes-app,
body.theme-light .reminders-app,
body.theme-light .browser-app,
body.theme-light .cal-app,
body.theme-light .clock-app { background: #ffffff; color: #1a1a1a; }
body.theme-light .calc-app  {
    background: linear-gradient(180deg, #f0f0f3 0%, #e2e2e7 100%);
}
body.theme-light .calc-display { background: linear-gradient(180deg, #1a1a1c 0%, #2a2a2e 100%); }
body.theme-light .menu-bar-trigger.menu-active-trigger { background: rgba(0,0,0,.08); }

/* ==========================================
   Liquid Glass — utility classes (.glass / .glass-strong / .glass-thin)
   Para uso em qualquer app. translateZ(0) força layer GPU isolada,
   o blur só re-renderiza quando o conteúdo por trás muda. */
.glass, .glass-thin, .glass-strong {
    position: relative;
    transform: translateZ(0);
    contain: layout paint;
}
.glass {
    background: var(--glass-md);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    box-shadow:
        var(--glass-shine),
        var(--glass-edge);
}
.glass-thin {
    background: var(--glass-thin);
    backdrop-filter: var(--blur-thin);
    -webkit-backdrop-filter: var(--blur-thin);
    box-shadow:
        var(--glass-shine),
        var(--glass-edge);
}
.glass-strong {
    background: var(--glass-strong);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    box-shadow:
        var(--glass-shine-2),
        var(--glass-edge-2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

input, textarea, [contenteditable="true"] {
    -webkit-user-select: text !important;
    user-select: text !important;
}

/* Remove as setinhas (spinner) dos input type="number" em TODO o sistema.
   Por defeito Chromium/CEF mostra duas setas brancas que não combinam
   com a UI escura — feio. Mantemos a interactividade do input (números
   + Enter + setas do teclado), só escondemos o widget visual. */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
    font-family: "GTAArtDeco", Arial, sans-serif;
    color: var(--text-1);
    letter-spacing: -.005em;
}

/* ==========================================
   Cursor — versão NATIVA (CSS url) sem div JS.
   Renderizado pelo compositor do SO → zero lag,
   independente da thread do JS. */
html, body, *, *::before, *::after {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 16 22' width='18' height='22'><path d='M0 0 L0 16.5 L3.6 13.1 L6.4 19.5 L8.6 18.5 L5.9 12.1 L11 12.1 Z' fill='white' stroke='black' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/></svg>") 0 0, default;
}

/* Pointer (mão) em elementos clicáveis — não precisa de JS */
button, a,
.menu-item, .menu-icon, .traffic-light,
.dropdown-item, .login-arrow, .sidebar-item,
.browser-suggestion, .calc-btn,
.toggle, .clock-tab, .cal-day,
.pill-btn, .kebab-btn, .kebab-item,
.detail-back, .detail-shot,
.row-action, .toolbar-btn, .panel-row,
.panel-tile, .modal-btn,
.desktop-icon, .store-card, .wp-thumb,
.settings-segmented button,
.cap-link, .browser-bookmark,
.cm-tx-summary tbody tr, .cm-tx-summary tbody tr * {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 28' width='22' height='26'><path d='M9 4 V14 L7 12.4 C6 11.6 4.6 12.4 5 13.6 L8 22 C8.6 23.4 9.6 24 11 24 H16.4 C18 24 19 23 19 21.4 V14.6 C19 13.4 18 12.6 16.6 12.6 H15.6 V11.6 C15.6 10.4 14.6 9.6 13.4 9.6 H13 V8.6 C13 7.4 12 6.6 10.6 6.6 V4 C10.6 2.6 9 2.6 9 4 Z' fill='white' stroke='black' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/></svg>") 8 4, pointer;
}

/* Text I-beam em campos de texto */
input, textarea, [contenteditable="true"] {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 24' width='12' height='24'><g stroke='black' stroke-width='2.4' stroke-linecap='round' fill='none'><line x1='6' y1='3' x2='6' y2='21'/><line x1='3' y1='3' x2='9' y2='3'/><line x1='3' y1='21' x2='9' y2='21'/></g><g stroke='white' stroke-width='1.2' stroke-linecap='round' fill='none'><line x1='6' y1='3' x2='6' y2='21'/><line x1='3' y1='3' x2='9' y2='3'/><line x1='3' y1='21' x2='9' y2='21'/></g></svg>") 6 12, text;
}

/* Grab (mão aberta) em elementos arrastáveis */
.window-titlebar,
.dock-item:not(.dock-trash) {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26' width='24' height='24'><path d='M5 12 V8 C5 6.6 7 6.6 7 8 V11 V6 C7 4.6 9 4.6 9 6 V11 V5 C9 3.6 11 3.6 11 5 V11 V6 C11 4.6 13 4.6 13 6 V12 H14 C16 12 17 13 17 15 V19 C17 22 14.6 24 12 24 H10 C7.4 24 5.6 22.4 4.4 20 L2.6 16 C1.6 13.6 4 12 5 14 Z' fill='white' stroke='black' stroke-width='1.3' stroke-linejoin='round'/></svg>") 12 10, grab;
}

/* Grabbing (mão fechada) durante drag */
.dragging,
.dragging *,
body.body-dragging,
body.body-dragging * {
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26' width='24' height='24'><path d='M5 13 V11 C5 9.6 7 9.6 7 11 V12 C7 11 9 11 9 12 V11 C9 10 11 10 11 11 V12 C11 11 13 11 13 12 V14 H15 C17 14 17 16 17 17 V20 C17 22.4 14.6 24 12 24 H10 C7.4 24 5.6 22.4 4.4 20 L2.6 16 C1.6 13.6 4 12 5 14 Z' fill='white' stroke='black' stroke-width='1.3' stroke-linejoin='round'/></svg>") 12 10, grabbing !important;
}

#os-root {
    position: fixed;
    inset: 0;
    overflow: hidden;
    /* Sem fundo — o monitor "flutua" sobre o mundo do jogo. */
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}
#os-root.hidden { display: none; }
.hidden { display: none !important; }

/* ==========================================
   Monitor (bezel + suporte + animação)
   ========================================== */
#monitor-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform-origin: center 60%;
    /* Animação de zoom-in tipo "entrar no PC" */
    animation: monitorIn .5s cubic-bezier(.2,.85,.25,1) both;
}
#os-root.closing #monitor-wrap {
    animation: monitorOut .26s cubic-bezier(.4,0,.85,.4) forwards;
}
@keyframes monitorIn {
    0%   { transform: scale(.55); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}
@keyframes monitorOut {
    0%   { transform: scale(1);   opacity: 1; }
    100% { transform: scale(.6);  opacity: 0; }
}

#monitor {
    position: relative;
    width: min(99vw, calc(96vh * 16 / 9));
    aspect-ratio: 16 / 9;
    /* Bezel realista: pequeno highlight no topo (light source de cima) */
    background:
        radial-gradient(ellipse 60% 25% at 50% 0%, rgba(255,255,255,.05), transparent 60%),
        linear-gradient(180deg, #1c1c20 0%, #0a0a0d 100%);
    padding: 12px 12px 20px;
    border-radius: 16px;
    /* Sombra realista em camadas: ambient + projeção + chão */
    box-shadow:
        0 60px 130px rgba(0,0,0,.7),
        0 30px 60px rgba(0,0,0,.45),
        0 12px 24px rgba(0,0,0,.3),
        inset 0 0 0 1px rgba(255,255,255,.04),
        inset 0 1px 0 rgba(255,255,255,.10),
        inset 0 -1px 0 rgba(0,0,0,.5);
}

#monitor-cam {
    position: absolute;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    /* Lente real: highlight de luz no canto sup. esq. + glow cyan subtil */
    background:
        radial-gradient(circle at 32% 32%, rgba(255,255,255,.45), transparent 35%),
        radial-gradient(circle at 50% 50%, #1a1a1c 0%, #050507 80%);
    box-shadow:
        inset 0 0 0 .5px rgba(255,255,255,.10),
        0 0 0 1px rgba(0,0,0,.4),
        0 0 6px rgba(0, 200, 255, .12);
}

#monitor-brand {
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 4.5px;
    color: rgba(255,255,255,.22);
}

#screen {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
    background: #000;
    /* Recess effect — ecrã encaixado no bezel */
    box-shadow:
        inset 0 0 0 1px rgba(0,0,0,.95),
        inset 0 1px 2px rgba(0,0,0,.9),
        inset 0 0 40px rgba(0,0,0,.55);
}

/* Suporte realista — neck com sombra interior + base com sombra de chão */
#monitor-stand-arm {
    width: 80px;
    height: 28px;
    /* Highlight central no neck (efeito de superfície curva) */
    background:
        linear-gradient(90deg,
            rgba(0,0,0,.5) 0%,
            rgba(0,0,0,.1) 18%,
            transparent 35%,
            transparent 65%,
            rgba(0,0,0,.1) 82%,
            rgba(0,0,0,.5) 100%),
        linear-gradient(180deg, #2a2a30 0%, #15151b 100%);
    clip-path: polygon(28% 0, 72% 0, 92% 100%, 8% 100%);
    margin-top: -3px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        inset 0 -1px 0 rgba(0,0,0,.4);
    position: relative;
    z-index: 1;
}
#monitor-stand-base {
    width: 250px;
    height: 10px;
    /* Base metálica: gradient horizontal escurecendo nas pontas (curvatura) */
    background:
        linear-gradient(90deg,
            rgba(0,0,0,.45) 0%,
            transparent 8%,
            transparent 92%,
            rgba(0,0,0,.45) 100%),
        linear-gradient(180deg, #2e2e34 0%, #1a1a20 50%, #0a0a0d 100%);
    border-radius: 5px;
    margin-top: -2px;
    box-shadow:
        0 4px 12px rgba(0,0,0,.6),
        0 16px 40px rgba(0,0,0,.5),
        0 32px 60px rgba(0,0,0,.3),
        inset 0 1px 0 rgba(255,255,255,.14),
        inset 0 -1px 0 rgba(0,0,0,.5);
    position: relative;
    z-index: 2;
}
/* Sombra do monitor no chão (atrás da base) */
#monitor-stand-base::after {
    content: '';
    position: absolute;
    top: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    width: 110%;
    height: 24px;
    background: radial-gradient(ellipse at center top, rgba(0,0,0,.5), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    filter: blur(2px);
}

/* Layers DENTRO do #screen — antes eram inset:0 do viewport, agora
   são inset:0 do screen (que é o pai com position:relative). */
.layer { position: absolute; inset: 0; }

/* ==========================================
   Scrollbars (estilo macOS - overlay slim)
   ========================================== */
*::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}
*::-webkit-scrollbar-track {
    background: transparent;
}
*::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.18);
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
    transition: background-color .15s ease;
}
*::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,.32);
    background-clip: content-box;
}
*::-webkit-scrollbar-corner { background: transparent; }

/* light scrollbar variant for white surfaces */
.scroll-light::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.22);
    background-clip: content-box;
}

/* ==========================================
   Cursor personalizado (SVG mais refinados)
   ========================================== */
#custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 18px;
    height: 22px;
    pointer-events: none;
    z-index: 999999;
    /* viewBox alterado para -2 -2 16 22: a ponta da seta fica em (0,0)
       do elemento, alinhada com a posição real do cursor → cliques
       certeiros mesmo em alvos pequenos como os traffic lights. */
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='-2 -2 16 22'><path d='M0 0 L0 16.5 L3.6 13.1 L6.4 19.5 L8.6 18.5 L5.9 12.1 L11 12.1 Z' fill='white' stroke='black' stroke-width='1.4' stroke-linejoin='round' stroke-linecap='round'/></svg>") no-repeat;
    background-size: contain;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.45));
    will-change: transform;
}
#custom-cursor.pointer {
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 28'><path d='M9 4 V14 L7 12.4 C6 11.6 4.6 12.4 5 13.6 L8 22 C8.6 23.4 9.6 24 11 24 H16.4 C18 24 19 23 19 21.4 V14.6 C19 13.4 18 12.6 16.6 12.6 H15.6 V11.6 C15.6 10.4 14.6 9.6 13.4 9.6 H13 V8.6 C13 7.4 12 6.6 10.6 6.6 V4 C10.6 2.6 9 2.6 9 4 Z' fill='white' stroke='black' stroke-width='1.3' stroke-linejoin='round' stroke-linecap='round'/></svg>") no-repeat;
    background-size: contain;
    width: 22px;
    height: 26px;
}
#custom-cursor.text {
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 24'><g stroke='black' stroke-width='2.4' stroke-linecap='round' fill='none'><line x1='6' y1='3' x2='6' y2='21'/><line x1='3' y1='3' x2='9' y2='3'/><line x1='3' y1='21' x2='9' y2='21'/></g><g stroke='white' stroke-width='1.2' stroke-linecap='round' fill='none'><line x1='6' y1='3' x2='6' y2='21'/><line x1='3' y1='3' x2='9' y2='3'/><line x1='3' y1='21' x2='9' y2='21'/></g></svg>") no-repeat;
    background-size: contain;
    width: 12px;
    height: 24px;
    transform: translate(-6px, -12px);
}
#custom-cursor.grab {
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'><path d='M5 12 V8 C5 6.6 7 6.6 7 8 V11 V6 C7 4.6 9 4.6 9 6 V11 V5 C9 3.6 11 3.6 11 5 V11 V6 C11 4.6 13 4.6 13 6 V12 H14 C16 12 17 13 17 15 V19 C17 22 14.6 24 12 24 H10 C7.4 24 5.6 22.4 4.4 20 L2.6 16 C1.6 13.6 4 12 5 14 Z' fill='white' stroke='black' stroke-width='1.3' stroke-linejoin='round'/></svg>") no-repeat;
    background-size: contain;
    width: 24px;
    height: 24px;
    transform: translate(-12px, -10px);
}
#custom-cursor.grabbing {
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26'><path d='M5 13 V11 C5 9.6 7 9.6 7 11 V12 C7 11 9 11 9 12 V11 C9 10 11 10 11 11 V12 C11 11 13 11 13 12 V14 H15 C17 14 17 16 17 17 V20 C17 22.4 14.6 24 12 24 H10 C7.4 24 5.6 22.4 4.4 20 L2.6 16 C1.6 13.6 4 12 5 14 Z' fill='white' stroke='black' stroke-width='1.3' stroke-linejoin='round'/></svg>") no-repeat;
    background-size: contain;
    width: 24px;
    height: 24px;
    transform: translate(-12px, -10px);
}

/* ==========================================
   Boot Screen
   ========================================== */
#boot-screen {
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.apple-logo {
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}
.apple-logo svg { animation: logoFade 1.4s ease-out; }
@keyframes logoFade {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: .98; transform: scale(1); }
}
.boot-text {
    font-size: 12px;
    letter-spacing: .8px;
    color: rgba(255,255,255,.55);
    font-weight: 400;
}
.boot-bar {
    width: 220px;
    height: 4px;
    background: rgba(255,255,255,.08);
    border-radius: 4px;
    overflow: hidden;
}
.boot-bar-fill {
    height: 100%;
    width: 0%;
    background: rgba(255,255,255,.85);
    border-radius: 4px;
    transition: width 2s ease-in-out;
}

/* ==========================================
   Login / Lock Screen
   ========================================== */
#login-screen { z-index: 90; overflow: hidden; }

.login-bg {
    position: absolute;
    inset: 0;
    background-color: #1a1240;
    background-image:
        radial-gradient(ellipse at 20% 20%, #ff7e6b 0%, transparent 45%),
        radial-gradient(ellipse at 80% 30%, #f9a36b 0%, transparent 45%),
        radial-gradient(ellipse at 50% 80%, #6f4cdc 0%, transparent 50%),
        radial-gradient(ellipse at 90% 90%, #2b3a8c 0%, transparent 50%),
        linear-gradient(180deg, #2a1f5c 0%, #4a1f7c 50%, #1a1240 100%);
    background-size: cover;
    background-position: center;
    filter: blur(28px) brightness(.55);
    transform: scale(1.08);
}
/* quando JS define background-image inline, esta regra deixa de aplicar
   por specificity (inline > classe), mas o fundo continua sempre a aparecer */
.login-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,.18) 0%, rgba(0,0,0,.55) 100%);
}
.login-clock {
    position: absolute;
    top: 11%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #fff;
    animation: clockFadeIn .8s var(--ease-out) both;
}
@keyframes clockFadeIn {
    from { opacity: 0; transform: translate(-50%, -8px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}
.login-day {
    font-size: 20px;
    font-weight: 500;
    opacity: .95;
    text-shadow: 0 2px 12px rgba(0,0,0,.6);
    letter-spacing: -.2px;
}
.login-time {
    font-size: 120px;
    font-weight: 100;
    line-height: 1;
    letter-spacing: -5px;
    margin-top: 6px;
    font-feature-settings: 'tnum' 1;
    text-shadow:
        0 4px 24px rgba(0,0,0,.5),
        0 0 60px rgba(255,255,255,.04);
}

.login-card {
    position: absolute;
    bottom: 14%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: min(640px, 80%);
}

/* Row de tiles de utilizadores */
.login-users-row {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 100%;
}

.login-user-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 14px;
    transition: opacity .22s var(--ease-out), transform .22s var(--ease-spring);
    opacity: .55;
    position: relative;
    animation: userTileIn .5s var(--ease-spring) backwards;
}
.login-user-tile:nth-child(1) { animation-delay: .05s; }
.login-user-tile:nth-child(2) { animation-delay: .12s; }
.login-user-tile:nth-child(3) { animation-delay: .19s; }
.login-user-tile:nth-child(4) { animation-delay: .26s; }
.login-user-tile:nth-child(5) { animation-delay: .33s; }
@keyframes userTileIn {
    from { opacity: 0; transform: translateY(20px) scale(.92); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-user-tile:hover {
    opacity: .92;
    transform: translateY(-3px);
}
.login-user-tile.selected {
    opacity: 1;
    transform: translateY(-2px);
}

.login-user-avatar {
    width: 82px;
    height: 82px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, #4a90e2, #7b61ff);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 34px;
    font-weight: 300;
    text-shadow: 0 2px 6px rgba(0,0,0,.3);
    box-shadow:
        0 8px 28px rgba(0,0,0,.5),
        inset 0 0 0 1.5px rgba(255,255,255,.14),
        inset 0 -2px 4px rgba(0,0,0,.15);
    transition:
        box-shadow .25s var(--ease-out),
        transform .22s var(--ease-spring);
    position: relative;
}
.login-user-avatar img { width: 100%; height: 100%; object-fit: cover; }

.login-user-tile:hover .login-user-avatar {
    transform: scale(1.04);
}
.login-user-tile.selected .login-user-avatar {
    transform: scale(1.06);
    box-shadow:
        0 0 0 3px rgba(255,255,255,.96),
        0 0 30px rgba(255,255,255,.18),
        0 14px 36px rgba(0,0,0,.55),
        inset 0 0 0 1px rgba(255,255,255,.18);
}

.login-user-name {
    font-size: 13.5px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 6px rgba(0,0,0,.55);
    text-align: center;
    max-width: 90px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Tile "Adicionar" */
.login-user-add .login-user-avatar {
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px dashed rgba(255,255,255,.35);
    color: rgba(255,255,255,.7);
    font-size: 28px;
    font-weight: 300;
    box-shadow: none;
}
.login-user-add:hover .login-user-avatar {
    border-color: rgba(255,255,255,.65);
    color: rgba(255,255,255,.95);
    background: rgba(255,255,255,.10);
}
.login-user-add .login-user-name {
    color: rgba(255,255,255,.7);
    font-style: italic;
}

/* Botão remover (canto sup. direito do tile) só aparece no hover de utilizadores custom */
.login-user-remove {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(20, 20, 24, .85);
    color: #fff;
    border: none;
    font-size: 16px;
    line-height: 1;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.4);
    transition: background .12s;
}
.login-user-tile:hover .login-user-remove { display: flex; }
.login-user-remove:hover { background: var(--danger); }

/* Área da password (estilo unificado com inset card) */
.login-password-area {
    min-height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-input-wrap {
    position: relative;
    margin-top: 6px;
}
.login-input-wrap input {
    width: 256px;
    height: 36px;
    border-radius: 18px;
    border: none;
    background: rgba(255,255,255,.14);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    padding: 0 40px 0 18px;
    font-size: 14px;
    outline: none;
    text-align: center;
    letter-spacing: 0;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.10),
        inset 0 1px 0 rgba(255,255,255,.06),
        0 4px 12px rgba(0,0,0,.2);
    font-family: inherit;
    transition: background .15s, box-shadow .2s;
}
.login-input-wrap input:focus {
    background: rgba(255,255,255,.20);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.30),
        inset 0 1px 0 rgba(255,255,255,.10),
        0 0 0 4px rgba(255,255,255,.10),
        0 4px 16px rgba(0,0,0,.25);
}
.login-input-wrap input::placeholder { color: rgba(255,255,255,.50); }

.login-arrow {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%) scale(.85);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, #ffffff, #f0f0f4 70%);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .2s, transform .2s var(--ease-spring);
    box-shadow:
        0 2px 6px rgba(0,0,0,.3),
        inset 0 -1px 0 rgba(0,0,0,.08);
}
.login-input-wrap input:not(:placeholder-shown) + .login-arrow,
.login-card.no-password .login-arrow {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}
.login-arrow:hover { transform: translateY(-50%) scale(1.10); background: #fff; }
.login-arrow:active { transform: translateY(-50%) scale(.96); }

.login-error {
    height: 14px;
    font-size: 11px;
    color: #ff5b5b;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
    opacity: 0;
    transition: opacity .15s;
}
.login-error.show { opacity: 1; }

.login-hint {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    margin-top: 4px;
}
.login-card.no-password .login-input-wrap { display: none; }

/* ==========================================
   Desktop
   ========================================== */
#desktop {
    z-index: 10;
    background-color: #1a1240;
    background-image:
        radial-gradient(ellipse at 20% 20%, #ff7e6b 0%, transparent 45%),
        radial-gradient(ellipse at 80% 30%, #f9a36b 0%, transparent 45%),
        radial-gradient(ellipse at 50% 80%, #6f4cdc 0%, transparent 50%),
        radial-gradient(ellipse at 90% 90%, #2b3a8c 0%, transparent 50%),
        linear-gradient(180deg, #2a1f5c 0%, #4a1f7c 50%, #1a1240 100%);
    background-size: cover;
    background-position: center;
}

/* Top Menu Bar */
#menu-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 28px;
    /* Liquid Glass: usa tokens globais para consistência + perf-mode */
    background:
        linear-gradient(180deg, rgba(28,28,32,.62) 0%, rgba(20,20,24,.58) 100%),
        var(--glass-md);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    transform: translateZ(0);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    z-index: 50;
    /* Hairline shadow embaixo + highlight subtil em cima */
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.04),
        0 1px 0 rgba(0,0,0,.4);
    letter-spacing: -.01em;
    contain: layout paint;
}

.menu-left, .menu-right {
    display: flex;
    align-items: center;
    gap: 14px;
}
.menu-item {
    padding: 2px 8px;
    border-radius: 4px;
    transition: background .12s;
}
.menu-item:hover { background: rgba(255,255,255,.16); }
.menu-apple { padding: 2px 6px; }
.menu-active { font-weight: 700; }
.menu-bar-trigger.menu-active-trigger {
    background: rgba(255,255,255,.20);
}

.menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    padding: 2px;
    border-radius: 4px;
}
.menu-icon:hover { background: rgba(255,255,255,.16); }
.menu-text { font-size: 12px; font-weight: 400; }

/* Dropdown */
.dropdown {
    position: absolute;
    top: 30px;
    left: 8px;
    width: 230px;
    /* Liquid Glass popover */
    background:
        linear-gradient(180deg, rgba(60,60,68,.50) 0%, rgba(38,38,46,.50) 100%),
        var(--glass-popover);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border-radius: 12px;
    transform: translateZ(0);
    contain: layout paint;
    box-shadow:
        0 18px 38px rgba(0,0,0,.45),
        0 3px 10px rgba(0,0,0,.25),
        var(--glass-edge-2),
        var(--glass-shine-2),
        var(--glass-hairline);
    padding: 5px;
    z-index: 60;
    color: #fff;
    font-size: 13px;
    transform-origin: top left;
    animation: dropdownIn .18s cubic-bezier(.16, 1.1, .3, 1) both;
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
#context-menu { width: 220px; }
.dropdown-item {
    padding: 6px 12px;
    border-radius: 5px;
    transition: background .08s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dropdown-item:hover {
    background: linear-gradient(180deg, #3884f0, #1366d5);
}
.dropdown-item.disabled {
    color: var(--text-4);
    pointer-events: none;
}
.dropdown-sep {
    height: 1px;
    background: rgba(255,255,255,.10);
    margin: 5px 8px;
}
.dropdown-shortcut {
    margin-left: auto;
    color: rgba(255,255,255,.4);
    font-size: 12px;
}

/* Desktop Icons */
#desktop-icons {
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    bottom: 92px;
    z-index: 5;
    pointer-events: none;
}
.desktop-icon {
    position: absolute;
    width: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 6px 6px;
    border-radius: 10px;
    transition: background .12s, transform .05s;
    pointer-events: auto;
}
.desktop-icon:hover { background: rgba(255,255,255,.10); }
.desktop-icon.selected {
    background: rgba(80,140,255,.32);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.desktop-icon.dragging {
    opacity: .85;
    z-index: 50;
    transform: scale(1.05);
    transition: none;
}
.desktop-icon-img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0,0,0,.45), 0 0 0 .5px rgba(0,0,0,.4);
    transition: transform .15s var(--ease-spring);
}
.desktop-icon:hover .desktop-icon-img { transform: scale(1.05); }
.desktop-icon-label {
    margin-top: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.7);
    text-align: center;
    line-height: 1.2;
    letter-spacing: -.01em;
}

/* ==========================================
   Dock (estilo glass com ampliação)
   ========================================== */
#dock {
    position: absolute;
    bottom: 10px;
    left: 50%;
    display: flex;
    align-items: flex-end;
    gap: 6px;
    padding: 6px 10px;
    /* Liquid Glass dock */
    background:
        linear-gradient(180deg, rgba(80,80,90,.42) 0%, rgba(40,40,50,.34) 100%),
        var(--glass-md);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border-radius: 22px;
    transform: translateX(-50%) translateZ(0);
    /* Auto-hide: por defeito o dock está visível. Só esconde quando
       há uma janela MAXIMIZADA aberta (body.has-maximized + dock-hidden).
       Janelas pequenas/flutuantes não tapam o dock — fica visível.
       O dock revela-se ao passar com o cursor pela trigger zone do fundo. */
    transition: transform .28s cubic-bezier(.34, 1.2, .5, 1), opacity .2s;
    /* SEM contain: paint — os items ao fazer hover (scale 1.42 + translateY -12px)
       saem dos limites do dock e seriam cortados. Só layout (que não corta render). */
    contain: layout;
    overflow: visible;
    box-shadow:
        0 16px 40px rgba(0,0,0,.42),
        0 3px 10px rgba(0,0,0,.22),
        inset 0 1px 0 rgba(255,255,255,.20),
        inset 0 -1px 0 rgba(0,0,0,.22),
        var(--glass-edge);
    z-index: 30;
    height: 70px;
}
.dock-item {
    position: relative;
    width: 54px;
    height: 54px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .26s cubic-bezier(.25, 1.4, .5, 1), margin .22s, filter .22s;
    transform-origin: bottom center;
    /* Sombra subtil dá sensação de "flutuar" sobre o dock */
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.dock-item:not(.dragging):hover {
    transform: scale(1.42) translateY(-12px);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,.5));
}
.dock-item:not(.dragging):hover ~ .dock-item:not(.dragging),
.dock-item:not(.dragging):has(+ .dock-item:not(.dragging):hover) {
    transform: scale(1.14) translateY(-3px);
}
.dock-item.dragging {
    z-index: 40;
    transform: scale(1.16) translateY(-4px);
    opacity: .92;
    transition: none;
}
.dock-item img,
.dock-item svg,
.dock-icon-inner,
.dock-item > div:first-child {
    width: 100%;
    height: 100%;
    border-radius: 13px;
    box-shadow:
        0 4px 10px rgba(0,0,0,.45),
        0 0 0 .5px rgba(0,0,0,.5);
}
.dock-item .tooltip {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(50,50,52,.96);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .12s;
    box-shadow: 0 4px 12px rgba(0,0,0,.45);
}
.dock-item:not(.dragging):hover .tooltip { opacity: 1; }

.dock-item.is-open::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,.85);
}
/* Indicador diferente para janelas minimizadas (cinzento) */
.dock-item.is-minimized::after {
    background: rgba(255,255,255,.40);
    width: 5px;
    height: 5px;
}
.dock-divider {
    width: 1px;
    height: 38px;
    background: rgba(255,255,255,.18);
    margin: 0 4px;
    align-self: center;
}

/* ==========================================
   Window Manager
   ========================================== */
#window-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 20;
}
.os-window {
    position: absolute;
    /* Liquid Glass body (apps com fundo escuro recobrem-no, mas o
       border + corners ficam glass) */
    background: #1f1f23;
    border-radius: 12px;
    box-shadow:
        0 0 0 .5px rgba(0,0,0,.6),
        0 1px 3px rgba(0,0,0,.4),
        0 24px 64px rgba(0,0,0,.55),
        var(--glass-shine),
        inset 0 0 0 .5px rgba(255,255,255,.06);
    overflow: hidden;
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    color: var(--text-1);
    min-width: 320px;
    min-height: 220px;
    /* Spring com leve overshoot — sente-se "vivo" ao abrir */
    animation: windowOpen .42s cubic-bezier(.34, 1.45, .5, 1) both;
    transform-origin: center 40%;
    /* contain: isolation perfeita → render desta janela não afecta as outras.
       translateZ: força layer GPU própria → blurs internos não pagam custo composição. */
    contain: layout paint style;
    transform: translateZ(0);
}
@keyframes windowOpen {
    0%   { opacity: 0; transform: scale(.80) translateY(20px); }
    60%  { opacity: 1; transform: scale(1.02) translateY(-2px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}
.os-window.closing { animation: windowClose .22s cubic-bezier(.4, 0, .85, .4) forwards; }
@keyframes windowClose {
    0%   { opacity: 1; transform: scale(1) translateY(0); }
    100% { opacity: 0; transform: scale(.86) translateY(12px); }
}

/* ==========================================
   Skeleton loaders (shimmer) — reutilizáveis
   ========================================== */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,.04) 0%,
        rgba(255,255,255,.10) 50%,
        rgba(255,255,255,.04) 100%
    );
    background-size: 200% 100%;
    animation: skelShimmer 1.4s ease-in-out infinite;
    border-radius: 6px;
    display: block;
}
@keyframes skelShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.skel-line { height: 12px; margin-bottom: 8px; }
.skel-line.short { width: 40%; }
.skel-line.med   { width: 70%; }
.skel-line.full  { width: 100%; }
.skel-circle {
    width: 40px; height: 40px;
    border-radius: 50%;
}
.skel-card {
    height: 120px;
    border-radius: 14px;
}

/* Loading spinner moderno (anel com gradient) */
.app-spinner {
    width: 36px; height: 36px;
    border-radius: 50%;
    background:
        conic-gradient(from 0deg,
            transparent 0deg,
            transparent 280deg,
            #fff 360deg);
    -webkit-mask: radial-gradient(circle at center, transparent 11px, #000 12px);
    mask: radial-gradient(circle at center, transparent 11px, #000 12px);
    animation: spinAnim .9s linear infinite;
}
@keyframes spinAnim { to { transform: rotate(360deg); } }

.app-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 60px 20px;
    color: var(--text-3);
    font-size: 13px;
}

/* ==========================================
   App: NOTAS
   ========================================== */
.notes-app {
    width: 100%; height: 100%;
    display: flex;
    background: #1a1a1d;
    color: var(--text-1);
    contain: layout paint;
}
.notes-sidebar {
    width: 260px;
    flex: 0 0 260px;
    /* Liquid Glass — igual à sidebar das outras apps */
    background:
        linear-gradient(180deg, rgba(48,48,54,.55) 0%, rgba(28,28,32,.55) 100%),
        var(--glass-md);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: var(--glass-shine), inset -1px 0 0 rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    transform: translateZ(0);
    contain: layout paint;
}
.notes-side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 10px;
}
.notes-side-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.2px;
}
.notes-new-btn {
    width: 26px; height: 26px;
    border-radius: 7px;
    background: rgba(255,255,255,.06);
    border: none;
    color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
    transition: background .12s, color .12s, transform .08s;
}
.notes-new-btn:hover  { background: var(--accent); color: #fff; }
.notes-new-btn:active { transform: scale(.92); }

.notes-search-wrap {
    margin: 0 14px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.06);
    padding: 6px 10px;
    border-radius: 7px;
    color: var(--text-3);
}
.notes-search-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 12.5px;
    font-family: inherit;
}
.notes-search-wrap input::placeholder { color: var(--text-3); }

.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 14px;
}
.notes-section-head {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 12px 10px 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.notes-item {
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 2px;
    transition: background .12s;
}
.notes-item:hover { background: rgba(255,255,255,.04); }
.notes-item.active {
    background: var(--accent);
    color: #fff;
}
.notes-item.active .notes-item-time,
.notes-item.active .notes-item-preview { color: rgba(255,255,255,.75); }

.notes-item-title {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.notes-item-meta {
    display: flex;
    gap: 6px;
    font-size: 11px;
    color: var(--text-3);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.notes-item-time { font-weight: 600; flex: 0 0 auto; }
.notes-item-preview {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.notes-list-empty {
    padding: 40px 14px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
}

.notes-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background:
        radial-gradient(ellipse at top right, rgba(255,200,80,.06) 0%, transparent 55%),
        #1a1a1d;
}
.notes-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    /* Liquid Glass thin para o toolbar — blur muito ligeiro */
    background: rgba(28,28,32,.55);
    backdrop-filter: var(--blur-thin);
    -webkit-backdrop-filter: var(--blur-thin);
    border-bottom: 1px solid rgba(255,255,255,.06);
    box-shadow: var(--glass-shine);
    transform: translateZ(0);
}
.notes-editor-date {
    font-size: 11.5px;
    color: var(--text-3);
    font-weight: 600;
}
.notes-editor-actions { display: flex; gap: 4px; }
.notes-tool-btn {
    width: 28px; height: 28px;
    border-radius: 7px;
    background: transparent;
    border: none;
    color: var(--text-2);
    display: flex; align-items: center; justify-content: center;
    transition: background .12s, transform .08s;
}
.notes-tool-btn:hover  { background: rgba(255,255,255,.08); color: #fff; }
.notes-tool-btn:active { transform: scale(.92); }

.notes-title-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.5px;
    padding: 24px 28px 12px;
    outline: none;
    font-family: inherit;
    width: 100%;
}
.notes-title-input::placeholder { color: var(--text-3); }

.notes-body-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-1);
    font-size: 14px;
    line-height: 1.65;
    padding: 0 28px 24px;
    outline: none;
    font-family: inherit;
    resize: none;
    overflow-y: auto;
}
.notes-body-input::placeholder { color: var(--text-3); }

.notes-editor-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-3);
    padding: 40px;
    text-align: center;
}
.notes-editor-empty-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-2);
    margin-top: 4px;
}
.notes-editor-empty-msg {
    font-size: 12.5px;
    max-width: 320px;
    line-height: 1.5;
}

/* ==========================================
   App: LEMBRETES
   ========================================== */
.reminders-app {
    width: 100%; height: 100%;
    display: flex;
    background: #1a1a1d;
    color: var(--text-1);
    contain: layout paint;
}
.rem-sidebar {
    width: 260px;
    flex: 0 0 260px;
    background:
        linear-gradient(180deg, rgba(48,48,54,.55) 0%, rgba(28,28,32,.55) 100%),
        var(--glass-md);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border-right: 1px solid rgba(255,255,255,.06);
    box-shadow: var(--glass-shine), inset -1px 0 0 rgba(0,0,0,.18);
    display: flex;
    flex-direction: column;
    padding: 14px;
    overflow-y: auto;
    transform: translateZ(0);
    contain: layout paint;
}

.rem-smart-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
}
.rem-smart-card {
    --smart-color: #0ea5e9;
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    padding: 10px 12px;
    transition: background .12s, transform .12s;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.rem-smart-card:hover { background: rgba(255,255,255,.06); }
.rem-smart-card.active {
    background: var(--smart-color);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18), 0 4px 12px rgba(0,0,0,.25);
}
.rem-smart-icon {
    font-size: 18px;
    margin-bottom: 2px;
}
.rem-smart-count {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 18px;
    font-weight: 700;
    color: var(--smart-color);
    line-height: 1;
}
.rem-smart-card.active .rem-smart-count { color: #fff; }
.rem-smart-name {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-2);
    margin-top: 6px;
}
.rem-smart-card.active .rem-smart-name { color: #fff; }

.rem-lists-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 4px 6px 8px;
}
.rem-add-list {
    width: 22px; height: 22px;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--text-3);
    display: flex; align-items: center; justify-content: center;
    transition: background .12s, color .12s;
}
.rem-add-list:hover { background: rgba(255,255,255,.06); color: var(--text-1); }

.rem-lists { display: flex; flex-direction: column; gap: 2px; }
.rem-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 7px;
    transition: background .12s;
}
.rem-list-item:hover { background: rgba(255,255,255,.04); }
.rem-list-item.active {
    background: rgba(255,255,255,.08);
}
.rem-list-icon {
    width: 24px; height: 24px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    flex: 0 0 24px;
}
.rem-list-name {
    flex: 1;
    font-size: 12.5px;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.rem-list-count {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 600;
}

.rem-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.rem-main-head {
    --list-color: #0ea5e9;
    padding: 22px 28px 14px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.rem-main-title-wrap {
    display: flex;
    align-items: baseline;
    gap: 10px;
}
.rem-main-icon { font-size: 24px; }
.rem-main-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--list-color);
    letter-spacing: -.5px;
    margin: 0;
}
.rem-main-count {
    margin-left: auto;
    font-size: 14px;
    color: var(--text-3);
    font-weight: 700;
    font-feature-settings: 'tnum' 1;
}

.rem-add-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.rem-add-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 14px;
    outline: none;
    font-family: inherit;
}
.rem-add-input::placeholder { color: var(--text-3); }

.rem-items {
    flex: 1;
    overflow-y: auto;
    padding: 4px 0;
}

.rem-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 28px;
    border-bottom: 1px solid rgba(255,255,255,.03);
    transition: background .1s;
}
.rem-item:hover { background: rgba(255,255,255,.02); }
.rem-item.completed { opacity: .5; }
.rem-item.completed .rem-item-title { text-decoration: line-through; }

.rem-check {
    width: 20px; height: 20px;
    border-radius: 50%;
    border: 2px solid var(--text-3);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    margin-top: 2px;
    transition: all .15s var(--ease-spring);
    cursor: pointer;
    padding: 0;
}
.rem-check:hover { transform: scale(1.1); border-color: var(--text-1); }
.rem-check.checked { transform: scale(1); }
.rem-check-add {
    border: 2px dashed var(--text-3);
    color: var(--text-3);
}

.rem-item-body { flex: 1; min-width: 0; }
.rem-item-title {
    background: transparent;
    border: none;
    color: var(--text-1);
    font-size: 14px;
    font-family: inherit;
    width: 100%;
    outline: none;
    padding: 2px 0;
    line-height: 1.3;
}
.rem-item-title:focus {
    background: rgba(255,255,255,.04);
    border-radius: 4px;
    padding: 2px 6px;
    margin: 0 -6px;
}

.rem-item-meta {
    display: flex;
    gap: 6px;
    margin-top: 4px;
    font-size: 11.5px;
    color: var(--text-3);
    flex-wrap: wrap;
}
.rem-meta-date.overdue { color: #ff453a; font-weight: 700; }

.rem-item-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity .15s;
}
.rem-item:hover .rem-item-actions { opacity: 1; }
.rem-item-action {
    width: 26px; height: 26px;
    border-radius: 6px;
    background: transparent;
    border: none;
    font-size: 14px;
    line-height: 1;
    transition: background .12s, transform .08s;
    opacity: .5;
    padding: 0;
}
.rem-item-action:hover  { background: rgba(255,255,255,.08); opacity: 1; }
.rem-item-action.active { opacity: 1; }
.rem-item-action.danger:hover { background: rgba(255,69,58,.18); }
.rem-item-action:active { transform: scale(.92); }

.rem-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--text-3);
    padding: 40px;
    text-align: center;
}
.rem-empty-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-2);
    margin-top: 4px;
}
.rem-empty-msg {
    font-size: 12.5px;
    max-width: 320px;
    line-height: 1.5;
}

.os-window.maximized {
    top: 28px !important;
    left: 0 !important;
    width: 100% !important;
    /* Por defeito ocupa o espaço entre menu-bar e dock.
       Quando o dock está auto-hidden (.dock-hidden no body), ocupa tudo
       até ao fundo do ecrã (cobre a zona onde o dock estava). */
    height: calc(100% - 92px) !important;
    border-radius: 0;
    box-shadow: none;
    transition: height .25s var(--ease-out);
}
body.dock-hidden .os-window.maximized {
    height: calc(100% - 28px) !important;
}

/* ==========================================
   DOCK AUTO-HIDE
   ==========================================
   Quando há uma janela MAXIMIZADA (body.has-maximized + dock-hidden),
   o dock recolhe-se automaticamente para fora do ecrã. Só volta a
   aparecer quando o cursor entra na "trigger zone" nos últimos 24px do
   fundo do ecrã. Janelas flutuantes não escondem o dock. */
body.dock-hidden #dock {
    transform: translateX(-50%) translateY(calc(100% + 14px));
    opacity: 0;
    pointer-events: none;
}
/* Ao revelar o dock, slide para cima */
body:not(.dock-hidden) #dock {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}
/* Trigger invisível nos últimos 24px do screen — sempre presente, capta
   o mouseenter para mostrar o dock. */
.dock-trigger {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 24px;
    z-index: 28;
    pointer-events: auto;
}

.window-titlebar {
    height: 34px;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    /* Liquid Glass titlebar — gradient + highlight + edge.
       O blur fica subtil porque o conteúdo da janela é opaco. */
    background:
        linear-gradient(180deg,
            rgba(72,72,80,.78) 0%,
            rgba(54,54,62,.78) 50%,
            rgba(42,42,50,.80) 100%);
    backdrop-filter: var(--blur-thin);
    -webkit-backdrop-filter: var(--blur-thin);
    box-shadow:
        var(--glass-shine),
        inset 0 -1px 0 rgba(0,0,0,.5);
    user-select: none;
    position: relative;
}
.traffic-lights {
    display: flex;
    gap: 8px;
    padding: 6px 0;
    margin: -6px 0;
}
.traffic-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Inner highlight no topo + shadow no fundo (efeito de bolinha glossy) */
    box-shadow:
        inset 0 .5px 0 rgba(255,255,255,.5),
        inset 0 -.5px 0 rgba(0,0,0,.25),
        0 0 0 .5px rgba(0,0,0,.4),
        0 1px 2px rgba(0,0,0,.2);
    transition: filter .1s, transform .08s;
    position: relative;
}
/* Hitbox invisível MUITO maior que a bolinha visível para o utilizador
   conseguir clicar sem precisar de mira ao pixel. */
.traffic-light::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
}
.traffic-light:hover { filter: brightness(1.08); }
.traffic-light svg {
    opacity: 0;
    transition: opacity .08s;
    pointer-events: none;
}
.traffic-lights:hover .traffic-light svg { opacity: 1; }
/* Traffic lights com efeito de bola glossy (radial gradient) */
.tl-close {
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 40%),
        radial-gradient(circle at 50% 50%, #ff7066 0%, #ff4d40 60%, #d23a30 100%);
}
.tl-min {
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 40%),
        radial-gradient(circle at 50% 50%, #ffcc4d 0%, #ffa826 60%, #c97f0a 100%);
}
.tl-max {
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 40%),
        radial-gradient(circle at 50% 50%, #5cd86c 0%, #2db542 60%, #1d8a32 100%);
}
.traffic-light:active { transform: scale(.92); }

.window-title {
    flex: 1;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    margin-left: -52px;
    pointer-events: none;
    letter-spacing: -.01em;
}
.window-content {
    flex: 1;
    overflow: hidden;
    background: #1c1c1e;
    position: relative;
}

/* ==========================================
   App: Calculadora
   ========================================== */
.calc-app {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #1c1c1e 0%, #141416 100%);
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 10px;
}
.calc-display {
    flex: 0 0 auto;
    min-height: 96px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    background: linear-gradient(180deg, #0d0d0f 0%, #16161a 100%);
    border-radius: 14px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), inset 0 0 0 1px rgba(255,255,255,.04);
    overflow: hidden;
}
.calc-expression {
    font-size: 13px;
    color: rgba(255,255,255,.4);
    margin-bottom: 4px;
    min-height: 16px;
    text-align: right;
    font-weight: 400;
    letter-spacing: .2px;
    word-break: break-all;
    max-height: 16px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 100%;
    font-feature-settings: 'tnum' 1;
}
.calc-display-text {
    font-size: 54px;
    font-weight: 300;
    color: #fff;
    line-height: 1;
    word-break: break-all;
    text-align: right;
    letter-spacing: -1.5px;
    font-feature-settings: 'tnum' 1;
}
.calc-display-text.shrink-1 { font-size: 42px; }
.calc-display-text.shrink-2 { font-size: 32px; }
.calc-display-text.shrink-3 { font-size: 24px; }

.calc-grid {
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(5, 1fr);
    gap: 8px;
    min-height: 0;
}
.calc-btn {
    border: none;
    font-size: 21px;
    font-weight: 500;
    color: #fff;
    background: linear-gradient(180deg, #3a3a3e 0%, #2c2c30 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .08s ease, filter .12s ease;
    border-radius: 14px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        inset 0 -1px 0 rgba(0,0,0,.30),
        0 1px 2px rgba(0,0,0,.4);
    font-family: inherit;
    letter-spacing: -.3px;
}
.calc-btn:hover { filter: brightness(1.20); }
.calc-btn:active { transform: scale(.94); filter: brightness(1.4); }
.calc-btn.func {
    background: linear-gradient(180deg, #5e5e66 0%, #494950 100%);
    font-weight: 500;
}
.calc-btn.op {
    background: linear-gradient(180deg, #ff9f0a 0%, #e6840a 100%);
    color: #fff;
    font-size: 25px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.20),
        inset 0 -1px 0 rgba(0,0,0,.20),
        0 2px 8px rgba(255, 130, 0, .35);
}
.calc-btn.op.active {
    background: linear-gradient(180deg, #fff 0%, #f0f0f0 100%);
    color: #ff9f0a;
}
.calc-btn.zero {
    grid-column: span 2;
    justify-content: flex-start;
    padding-left: 32px;
}

/* ==========================================
   Browser
   ========================================== */
.browser-app {
    width: 100%; height: 100%;
    background: #1a1a1d;
    display: flex;
    flex-direction: column;
    color: #fff;
    contain: layout paint;
}
.browser-toolbar {
    flex: 0 0 auto;
    height: 46px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    /* Liquid Glass toolbar */
    background:
        linear-gradient(180deg, rgba(60,60,68,.55) 0%, rgba(40,40,46,.55) 100%),
        var(--glass-md);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border-bottom: 1px solid rgba(0,0,0,.4);
    box-shadow: var(--glass-shine);
    transform: translateZ(0);
}
.browser-nav { display: flex; gap: 4px; }
.browser-btn {
    width: 30px; height: 28px;
    border-radius: 7px;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.95);
    display: flex; align-items: center; justify-content: center;
    transition: background .12s;
}
.browser-btn svg { display: block; }
.browser-btn:hover:not(:disabled) { background: rgba(255,255,255,.14); }
/* Disabled visivelmente (.55) — antes era .3 e ficavam invisíveis no fundo escuro */
.browser-btn:disabled { opacity: .55; pointer-events: none; }

.browser-address-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    height: 30px;
    background: rgba(0,0,0,.35);
    border-radius: 8px;
    padding: 0 14px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.browser-address-wrap svg { color: rgba(255,255,255,.55); margin-right: 6px; }
.browser-address {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 13px;
    text-align: center;
    font-family: inherit;
}
.browser-address::placeholder { color: rgba(255,255,255,.4); }

.browser-content {
    flex: 1;
    overflow-y: auto;
    background: #1c1c1e;
    padding: 50px 32px;
}
.browser-home { text-align: center; color: #fff; }
.browser-home h1 {
    font-size: 38px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -1px;
}
.browser-home p {
    font-size: 14px;
    color: rgba(255,255,255,.6);
    margin-bottom: 36px;
}
.browser-search-box {
    max-width: 560px;
    margin: 0 auto 38px;
    height: 48px;
    border-radius: 24px;
    background: rgba(255,255,255,.08);
    backdrop-filter: var(--blur-thin);
    -webkit-backdrop-filter: var(--blur-thin);
    display: flex;
    align-items: center;
    padding: 0 22px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
    transition: background .12s;
}
.browser-search-box:focus-within {
    background: rgba(255,255,255,.14);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}
.browser-search-box svg { color: rgba(255,255,255,.5); margin-right: 10px; }
.browser-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 15px;
    font-family: inherit;
}
.browser-search-box input::placeholder { color: rgba(255,255,255,.4); }

.browser-suggestions {
    max-width: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}
.browser-suggestion {
    background: rgba(255,255,255,.06);
    border-radius: 12px;
    padding: 16px;
    color: rgba(255,255,255,.85);
    font-size: 13px;
    text-align: center;
    transition: background .12s, transform .12s;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.browser-suggestion:hover {
    background: rgba(255,255,255,.12);
    transform: translateY(-1px);
}

/* Bookmarks na home do navegador */
.browser-bookmarks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 16px;
}
.browser-bookmark {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 6px;
    border-radius: 10px;
    transition: background .12s;
}
.browser-bookmark:hover { background: rgba(255,255,255,.06); }
.bm-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,.3);
}
.bm-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-1);
    text-align: center;
}
.bm-url {
    font-size: 10px;
    color: var(--text-3);
    text-align: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Páginas dentro do navegador (Notícias, Bleeter, etc.) */
.cap-page { color: var(--text-1); animation: pageFade .2s var(--ease-out); }
.cap-nav {
    padding: 14px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.cap-brand { font-size: 18px; font-weight: 700; }
.cap-nav-links { display: flex; gap: 20px; font-size: 13px; color: var(--text-2); }
.cap-link { padding: 4px 0; transition: color .1s; }
.cap-link:hover { color: var(--text-1); }

/* Notícias */
.cap-hero {
    padding: 32px 22px 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.cap-hero-tag {
    display: inline-block;
    background: #dc2626;
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.cap-hero h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -.5px;
}
.cap-hero p {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
    margin-bottom: 12px;
}
.cap-hero-meta { font-size: 12px; color: var(--text-3); }

.cap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    padding: 22px;
}
.cap-card {
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    overflow: hidden;
    transition: transform .12s, background .12s;
}
.cap-card:hover { transform: translateY(-2px); background: rgba(255,255,255,.06); }
.cap-card-img { height: 120px; }
.cap-card-body { padding: 14px; }
.cap-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.cap-card h3 {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 0 6px !important;
}
.cap-card p {
    font-size: 12px;
    color: var(--text-3);
    line-height: 1.4;
    margin-bottom: 8px;
}
.cap-meta { font-size: 11px; color: var(--text-3); }

/* Bleeter / posts */
.cap-feed { max-width: 640px; margin: 0 auto; padding: 14px; }
.cap-compose {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    margin-bottom: 14px;
}
.cap-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    color: #fff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    font-size: 16px;
}
.cap-compose-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    outline: none;
    font-size: 14px;
    font-family: inherit;
}
.cap-bleet {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 6px 16px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    font-family: inherit;
}
.cap-bleet:hover { background: var(--accent-h); }

.cap-post {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    transition: background .1s;
}
.cap-post:hover { background: rgba(255,255,255,.02); }
.cap-post-body { flex: 1; min-width: 0; }
.cap-post-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 4px;
}
.cap-handle, .cap-time { color: var(--text-3); font-weight: 400; }
.cap-dot { color: var(--text-3); }
.cap-post-text { font-size: 14px; line-height: 1.5; margin-bottom: 8px; }
.cap-post-actions {
    display: flex;
    gap: 24px;
    color: var(--text-3);
    font-size: 12px;
}
.cap-post-actions span:hover { color: var(--accent); }

.browser-result {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
    color: rgba(255,255,255,.7);
    padding-top: 40px;
}
.browser-result-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.6);
}
.browser-result h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #fff;
    letter-spacing: -.5px;
}
.browser-result p { font-size: 14px; line-height: 1.5; }

/* ==========================================
   App icons (versão refinada)
   ========================================== */
.dock-item .app-icon-wrap,
.desktop-icon-img > .app-icon-wrap,
.app-icon-wrap {
    width: 100%;
    height: 100%;
    border-radius: 13px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Glass overlay comum aos ícones */
.app-icon-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 60%);
    border-radius: inherit;
}
.app-icon-wrap > svg { width: 100%; height: 100%; display: block; position: relative; z-index: 1; }

/* ==========================================
   Apps com sidebar (usado em Loja, Definições, Empresa)
   ========================================== */
.sidebar-app {
    width: 100%; height: 100%;
    display: flex;
    background: #1a1a1d;
    color: var(--text-1);
    contain: layout paint;
}
.sidebar-app .sidebar {
    width: 220px;
    flex: 0 0 220px;
    /* Liquid Glass sidebar — tinta translucida + blur forte para revelar
       o wallpaper subtil do .main através. Visivelmente "vidro fosco". */
    background:
        linear-gradient(180deg, rgba(40,40,46,.45) 0%, rgba(22,22,28,.45) 100%);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border-right: 1px solid rgba(255,255,255,.06);
    padding: 16px 10px;
    display: flex; flex-direction: column;
    gap: 1px;
    overflow-y: auto;
    box-shadow: var(--glass-shine), inset -1px 0 0 rgba(0,0,0,.18);
    transform: translateZ(0);
    contain: layout paint;
}
.sidebar-app .sidebar-section {
    padding: 14px 10px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .6px;
}
.sidebar-app .sidebar-item {
    padding: 8px 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background .1s, color .1s;
    color: var(--text-2);
}
.sidebar-app .sidebar-item:hover {
    background: var(--bg-elevated);
    color: var(--text-1);
}
.sidebar-app .sidebar-item.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.sidebar-app .sidebar-item .si-icon {
    width: 22px; height: 22px;
    border-radius: 5px;
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 22px;
}
.sidebar-app .sidebar-item.active .si-icon { background: rgba(255,255,255,.12); }
.sidebar-app .sidebar-item .si-icon svg {
    width: 14px; height: 14px;
}

.sidebar-app .main {
    flex: 1;
    overflow-y: auto;
    padding: 32px 38px;
    /* Wallpaper subtil — cria profundidade para o glass dos cards/botões
       acima ter algo "atrás" para fazer refração. Sem isto, o glass
       parece um quadrado opaco. */
    background:
        radial-gradient(ellipse 60% 80% at 80% 0%, rgba(120,140,255,.10) 0%, transparent 55%),
        radial-gradient(ellipse 50% 70% at 0% 100%, rgba(180,80,200,.08) 0%, transparent 55%),
        radial-gradient(ellipse 80% 60% at 50% 50%, rgba(60,80,160,.05) 0%, transparent 60%),
        linear-gradient(180deg, #1a1a1f 0%, #15151a 100%);
    contain: layout paint;
}
.sidebar-app .main > * {
    content-visibility: auto;
    contain-intrinsic-size: 0 400px;
}
.sidebar-app .main h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -.5px;
}
.sidebar-app .main h2 {
    font-size: 15px;
    font-weight: 600;
    margin: 26px 0 12px;
    color: var(--text-1);
    letter-spacing: -.2px;
}
.sidebar-app .main p.muted {
    color: var(--text-3);
    font-size: 13px;
    margin-bottom: 22px;
    line-height: 1.5;
}

/* ==========================================
   Loja de Apps
   ========================================== */
.store-hero {
    background: linear-gradient(135deg, #2470d8 0%, #6a3ed8 50%, #af52de 100%);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 26px;
    margin-bottom: 30px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(36, 18, 80, .3);
}
.store-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(255,255,255,.18), transparent 50%);
    pointer-events: none;
}
.store-hero-icon {
    width: 110px; height: 110px;
    border-radius: 24px;
    flex: 0 0 110px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,.4);
    position: relative;
    z-index: 1;
}
.store-hero-icon > * { width: 100% !important; height: 100% !important; }
.store-hero-text { flex: 1; position: relative; z-index: 1; }
.store-hero-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: .8;
    margin-bottom: 6px;
    font-weight: 600;
}
.store-hero h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 4px !important;
    margin-top: 0 !important;
    color: #fff;
    letter-spacing: -.5px;
}
.store-hero-dev {
    font-size: 14px;
    opacity: .85;
    margin-bottom: 14px;
}
.store-hero-btn {
    border: none;
    background: rgba(255,255,255,.92);
    color: #1d1d1f;
    padding: 7px 22px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    transition: transform .1s, background .12s;
    font-family: inherit;
}
.store-hero-btn:hover { background: #fff; transform: scale(1.03); }

.store-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.store-card {
    /* Liquid Glass card — vê o wallpaper subtil do .main por trás */
    background:
        linear-gradient(180deg, rgba(255,255,255,.06) 0%, rgba(255,255,255,.02) 100%);
    backdrop-filter: var(--blur-thin);
    -webkit-backdrop-filter: var(--blur-thin);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: center;
    transition: background .15s, transform .15s, box-shadow .15s;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 0 0 1px rgba(255,255,255,.05),
        0 1px 2px rgba(0,0,0,.15);
    transform: translateZ(0);
}
.store-card:hover {
    background:
        linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.04) 100%);
    transform: translateY(-2px) translateZ(0);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        inset 0 0 0 1px rgba(255,255,255,.10),
        0 8px 18px rgba(0,0,0,.25);
}
.store-card-icon {
    width: 60px; height: 60px;
    flex: 0 0 60px;
    border-radius: 14px;
    overflow: hidden;
}
.store-card-icon > * { width: 100% !important; height: 100% !important; }
.store-card-info { flex: 1; min-width: 0; }
.store-card-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    letter-spacing: -.1px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
    overflow-wrap: anywhere;
}
.store-card-info h3 .store-tag-badge { flex-shrink: 0; }
.store-card-info .dev {
    font-size: 11px;
    color: var(--text-3);
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.store-card-info .desc {
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.store-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    flex: 0 0 auto;
}
.store-btn {
    border: none;
    background: rgba(255,255,255,.14);
    color: #fff;
    padding: 5px 16px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    transition: background .12s, transform .08s;
    min-width: 76px;
    height: 26px;
    font-family: inherit;
}
.store-btn:hover { background: rgba(255,255,255,.22); }
.store-btn:active { transform: scale(.96); }
.store-btn.primary {
    background: var(--accent);
    color: #fff;
}
.store-btn.primary:hover { background: var(--accent-h); }
.store-btn.success { background: rgba(52,199,89,.18); color: var(--success); }
.store-btn.danger  { background: rgba(255,69,58,.16); color: var(--danger); min-width: auto; padding: 5px 11px; }
.store-card-rating {
    font-size: 11px;
    color: var(--text-3);
}

/* ==========================================
   Store - Botão pill + Ring de download
   ========================================== */
.install-button-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pill-btn {
    border: none;
    /* Liquid Glass pill — gradient subtil + blur + highlight no topo */
    background:
        linear-gradient(180deg, rgba(0,122,255,.20) 0%, rgba(0,122,255,.10) 100%);
    backdrop-filter: var(--blur-thin);
    -webkit-backdrop-filter: var(--blur-thin);
    color: var(--accent);
    padding: 6px 20px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    transition: background .15s, transform .08s, box-shadow .15s;
    font-family: inherit;
    min-width: 80px;
    height: 28px;
    letter-spacing: .3px;
    text-transform: uppercase;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.15),
        inset 0 0 0 1px rgba(0,122,255,.30);
}
.pill-btn:hover {
    background:
        linear-gradient(180deg, rgba(0,122,255,.32) 0%, rgba(0,122,255,.18) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        inset 0 0 0 1px rgba(0,122,255,.45),
        0 4px 10px rgba(0,122,255,.18);
}
.pill-btn:active { transform: scale(.95); }
.pill-btn-installed {
    background:
        linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 100%);
    color: var(--text-1);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        inset 0 0 0 1px rgba(255,255,255,.10);
}
.pill-btn-installed:hover {
    background:
        linear-gradient(180deg, rgba(255,255,255,.24) 0%, rgba(255,255,255,.10) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        inset 0 0 0 1px rgba(255,255,255,.18),
        0 4px 10px rgba(0,0,0,.20);
}

/* Ring circular de download (substitui o botão durante o download) */
.download-ring {
    position: relative;
    width: 40px;
    height: 40px;
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.download-ring svg {
    position: absolute;
    inset: 0;
}
.download-ring .ring-fill {
    transition: stroke-dashoffset .12s linear;
    filter: drop-shadow(0 0 4px rgba(10,132,255,.6));
}
.download-ring .ring-stop {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 1px;
    opacity: 0;
    transition: opacity .15s;
    position: absolute;
    pointer-events: none;
}
.download-ring:hover .ring-stop { opacity: .85; }
.download-ring:hover .ring-pct  { opacity: 0; }
.download-ring .ring-pct {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -.3px;
    transition: opacity .15s;
    pointer-events: none;
}
.download-ring.installing svg { animation: ringSpin 1.2s linear infinite; }
.download-ring.installing .ring-stop { display: none; }
.download-ring.done .ring-stop { display: none; }
.download-ring.done .ring-pct  { display: none; }
@keyframes ringSpin   { to { transform: rotate(360deg); } }
@keyframes ringPulse  { 50% { opacity: .35; } }

/* Kebab menu (••• ao lado de "Abrir") */
.kebab-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.kebab-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(255,255,255,.06);
    color: var(--text-2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, color .12s;
}
.kebab-btn:hover { background: rgba(255,255,255,.14); color: var(--text-1); }

.kebab-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 200px;
    background: rgba(40,40,46,.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow:
        0 12px 32px rgba(0,0,0,.45),
        inset 0 0 0 1px rgba(255,255,255,.08);
    padding: 4px;
    z-index: 100;
    animation: dropdownIn .14s var(--ease-out);
}
.kebab-dropdown.hidden { display: none; }
.kebab-item {
    padding: 7px 10px;
    font-size: 12.5px;
    border-radius: 6px;
    color: var(--text-1);
    transition: background .1s, color .1s;
    display: flex;
    align-items: center;
    cursor: none;
    white-space: nowrap;
}
.kebab-item:hover { background: rgba(255,255,255,.08); }
.kebab-item.kebab-danger { color: var(--danger); }
.kebab-item.kebab-danger:hover { background: rgba(255,69,58,.16); }
.kebab-sep {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 4px 8px;
}

/* ==========================================
   Store - Página de Detalhe da App
   ========================================== */
.store-page { animation: pageFade .2s var(--ease-out); }
@keyframes pageFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.detail-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .1s;
    width: fit-content;
}
.detail-back:hover { background: rgba(0,122,255,.10); }

.detail-hero {
    display: flex;
    gap: 26px;
    align-items: flex-start;
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.detail-hero-icon {
    width: 130px;
    height: 130px;
    flex: 0 0 130px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 10px 32px rgba(0,0,0,.5);
}
.detail-hero-icon > * { width: 100% !important; height: 100% !important; }
.detail-hero-text { flex: 1; min-width: 0; }
.detail-name {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.5px;
    margin-bottom: 4px;
}
.detail-dev {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 14px;
    font-weight: 500;
}
.detail-rating {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
    font-size: 13px;
    color: var(--text-2);
}
.detail-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.detail-meta-inline {
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-3);
}

.detail-quick {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin-bottom: 32px;
    padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,.08);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.quick-cell {
    text-align: center;
    padding: 4px 12px;
    border-right: 1px solid rgba(255,255,255,.06);
}
.quick-cell:last-child { border-right: none; }
.quick-label {
    font-size: 10.5px;
    color: var(--text-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 6px;
}
.quick-value {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-2);
    letter-spacing: -.5px;
}
.quick-value small { font-size: 12px; color: var(--text-3); font-weight: 400; }
.quick-value-sm {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-2);
    margin-top: 6px;
}
.quick-sub {
    font-size: 10px;
    color: var(--text-3);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.detail-section {
    margin-bottom: 32px;
}
.detail-section h2 {
    font-size: 17px !important;
    font-weight: 700 !important;
    margin: 0 0 14px !important;
}
.detail-text {
    font-size: 13.5px;
    color: var(--text-2);
    line-height: 1.65;
    white-space: pre-line;
}

.detail-shots {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
}
.detail-shot {
    flex: 0 0 280px;
    aspect-ratio: 16/10;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    overflow: hidden;
    position: relative;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
}
.shot-fake-titlebar {
    height: 22px;
    background: rgba(0,0,0,.35);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 5px;
}
.shot-tl {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
}
.shot-fake-content {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.shot-bar {
    height: 10px;
    background: rgba(255,255,255,.18);
    border-radius: 3px;
    width: 100%;
}
.shot-bar.short { width: 40%; }
.shot-bar.med   { width: 70%; }
.shot-label {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: 10px;
    color: rgba(255,255,255,.4);
    text-transform: uppercase;
    letter-spacing: .5px;
}

.detail-info-table {
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.detail-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.detail-info-row:last-child { border-bottom: none; }
.info-key { color: var(--text-3); font-weight: 500; }
.info-val { color: var(--text-1); font-weight: 500; }

/* override antiga store-progress (legacy) */
.store-progress      { display: none !important; }
.store-progress-fill { display: none !important; }

.store-search {
    margin-bottom: 22px;
    height: 38px;
    /* Liquid Glass search box */
    background: rgba(255,255,255,.08);
    backdrop-filter: var(--blur-md);
    -webkit-backdrop-filter: var(--blur-md);
    border-radius: 999px;
    display: flex; align-items: center;
    padding: 0 16px;
    gap: 10px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        inset 0 0 0 1px rgba(255,255,255,.06);
    transition: background .15s, box-shadow .15s, transform .12s;
    transform: translateZ(0);
}
.store-search:focus-within {
    background: rgba(255,255,255,.14);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.16),
        inset 0 0 0 1px rgba(0,122,255,.55),
        0 0 0 4px rgba(0,122,255,.18);
}
.store-search svg { color: var(--text-3); flex: 0 0 auto; }
.store-search input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: 13.5px;
    font-family: inherit;
}
.store-search input::placeholder { color: var(--text-3); }

/* ==========================================
   Calendário
   ========================================== */
.cal-app {
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at top right, rgba(255,90,80,.07) 0%, transparent 60%),
        #1a1a1d;
    color: #fff;
    display: flex;
    flex-direction: column;
    contain: layout paint;
}
.cal-header {
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Liquid Glass header */
    background: rgba(28,28,32,.55);
    backdrop-filter: var(--blur-thin);
    -webkit-backdrop-filter: var(--blur-thin);
    border-bottom: 1px solid rgba(255,255,255,.06);
    box-shadow: var(--glass-shine);
    transform: translateZ(0);
}
.cal-header .month-title {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -.3px;
}
.cal-header .nav { display: flex; gap: 6px; }
.cal-header .nav button {
    width: 28px; height: 28px;
    background: rgba(255,255,255,.08);
    border: none;
    border-radius: 7px;
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background .1s, transform .08s;
}
.cal-header .nav button:hover { background: rgba(255,255,255,.16); }
.cal-header .nav button:active { transform: scale(.94); }
.cal-header .nav button.today {
    width: auto;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
}

.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 10px 18px 6px;
}
.cal-weekdays > div {
    font-size: 11px;
    color: var(--text-3);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
}

.cal-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 1fr;
    padding: 4px 14px 18px;
    gap: 2px;
    min-height: 0;
}
.cal-day {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    border-radius: 8px;
    transition: background .1s;
    min-height: 0;
    font-feature-settings: 'tnum' 1;
}
.cal-day:hover { background: rgba(255,255,255,.06); }
.cal-day.muted { color: var(--text-4); }
.cal-day.today {
    background: var(--danger);
    color: #fff;
    font-weight: 700;
}
.cal-day.today:hover { background: #ff5b50; }

/* ==========================================
   Relógio
   ========================================== */
.clock-app {
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at center, rgba(120,120,140,.10) 0%, transparent 60%),
        #1a1a1d;
    color: #fff;
    display: flex;
    flex-direction: column;
    contain: layout paint;
}
.clock-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 14px;
    background: rgba(28,28,32,.55);
    backdrop-filter: var(--blur-thin);
    -webkit-backdrop-filter: var(--blur-thin);
    border-bottom: 1px solid rgba(255,255,255,.06);
    box-shadow: var(--glass-shine);
    transform: translateZ(0);
}
.clock-tab {
    padding: 7px 14px;
    border: none;
    background: transparent;
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 7px;
    transition: background .1s, color .1s;
    font-family: inherit;
}
.clock-tab:hover { background: rgba(255,255,255,.06); color: #fff; }
.clock-tab.active { background: rgba(255,255,255,.14); color: #fff; }

.clock-content {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
}

.world-clock-list { display: flex; flex-direction: column; gap: 8px; }
.wc-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    background: rgba(255,255,255,.05);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.wc-city { font-size: 14px; font-weight: 500; }
.wc-tz   { font-size: 11px; color: var(--text-3); }
.wc-time {
    font-size: 30px;
    font-weight: 200;
    letter-spacing: -1px;
    font-feature-settings: 'tnum' 1;
}

.stopwatch-display {
    text-align: center;
    font-size: 68px;
    font-weight: 100;
    letter-spacing: -2.5px;
    padding: 36px 0 22px;
    color: #fff;
    font-feature-settings: 'tnum' 1;
    transition: color .3s;
}
.stopwatch-controls {
    display: flex;
    gap: 16px;
    justify-content: center;
}
.sw-btn {
    width: 78px; height: 78px;
    border-radius: 50%;
    border: none;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    transition: filter .1s, transform .08s;
    font-family: inherit;
    box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.08);
}
.sw-btn:hover { filter: brightness(1.18); }
.sw-btn:active { transform: scale(.94); }
.sw-btn.start {
    background: rgba(52,199,89,.2);
    color: var(--success);
    box-shadow: inset 0 0 0 1.5px rgba(52,199,89,.35);
}
.sw-btn.stop {
    background: rgba(255,69,58,.2);
    color: var(--danger);
    box-shadow: inset 0 0 0 1.5px rgba(255,69,58,.35);
}
.sw-btn.reset { background: rgba(255,255,255,.1); }

.timer-input-row {
    display: flex; gap: 12px; justify-content: center;
    margin: 18px 0 26px;
}
.timer-input-row input {
    width: 70px; text-align: center;
    background: rgba(255,255,255,.08);
    border: none;
    color: #fff;
    font-size: 24px;
    font-weight: 300;
    padding: 10px;
    border-radius: 10px;
    outline: none;
    font-feature-settings: 'tnum' 1;
    font-family: inherit;
}
.timer-input-row label {
    align-self: center;
    font-size: 11px;
    color: var(--text-3);
    margin-right: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}

/* ==========================================
   Definições
   ========================================== */
.settings-grid-wallpapers {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 14px;
}
.wp-thumb {
    aspect-ratio: 16 / 10;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,.4);
    border: 2px solid transparent;
    background-size: cover;
    background-position: center;
    transition: transform .15s var(--ease-spring), border-color .12s, box-shadow .15s;
    position: relative;
}
.wp-thumb:hover {
    transform: scale(1.04) translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.5);
}
.wp-thumb.selected {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(0,122,255,.18), 0 6px 18px rgba(0,0,0,.5);
}
.wp-thumb-name {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px 10px 6px;
    font-size: 11px;
    font-weight: 500;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
    background: linear-gradient(0deg, rgba(0,0,0,.5), transparent);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    margin-bottom: 6px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.settings-row .label {
    font-size: 13px;
    font-weight: 500;
}
.settings-row .label .sub {
    display: block;
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 2px;
    font-weight: 400;
}
.settings-row .value {
    font-size: 12.5px;
    color: var(--text-2);
}
.settings-rows-group {
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
    margin-bottom: 8px;
}
.settings-rows-group .settings-row {
    background: transparent;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: none;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.settings-rows-group .settings-row:last-child { border-bottom: none; }

.toggle {
    width: 42px; height: 24px;
    background: rgba(255,255,255,.18);
    border-radius: 12px;
    position: relative;
    transition: background .2s ease;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.1);
}
.toggle.on { background: var(--success); }
.toggle::after {
    content: '';
    position: absolute;
    top: 2px; left: 2px;
    width: 20px; height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: left .22s var(--ease-spring), transform .15s;
    box-shadow: 0 1.5px 4px rgba(0,0,0,.35), 0 0 0 .5px rgba(0,0,0,.06);
}
.toggle.on::after { left: 20px; }
.toggle:active::after { transform: scaleX(1.1); }

.settings-slider-wrap {
    display: flex; align-items: center; gap: 10px;
    width: 200px;
}
.settings-slider {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,.16);
    border-radius: 999px;
    outline: none;
}
.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px; height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,.4);
    transition: transform .1s;
}
.settings-slider::-webkit-slider-thumb:hover { transform: scale(1.1); }

.settings-segmented {
    display: inline-flex;
    background: rgba(255,255,255,.08);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
}
.settings-segmented button {
    background: transparent;
    border: none;
    color: var(--text-2);
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    transition: background .12s, color .12s;
    font-family: inherit;
}
.settings-segmented button.active {
    background: rgba(255,255,255,.14);
    color: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.18);
}

/* ==========================================
   Company Management
   ========================================== */
.company-stat {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}
.stat-card {
    flex: 1;
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    padding: 16px 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.stat-card .stat-label {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 600;
}
.stat-card .stat-value {
    font-size: 24px;
    font-weight: 600;
    margin-top: 6px;
    font-feature-settings: 'tnum' 1;
    letter-spacing: -.5px;
}

.company-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255,255,255,.03);
    border-radius: 10px;
    overflow: hidden;
    font-size: 13px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.company-table th, .company-table td {
    padding: 11px 16px;
    text-align: left;
}
.company-table th {
    background: rgba(255,255,255,.04);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.company-table tr + tr td { border-top: 1px solid rgba(255,255,255,.05); }

/* ==========================================
   Company Management - polish total
   ========================================== */
/* A app injeta --company-accent via JS conforme o gradient da empresa.
   Tudo o que tiver "tinta" da empresa usa esta variável. */
.company-app {
    --company-accent: #0ea5e9;
    --company-accent-soft: rgba(14, 165, 233, .14);
}

.company-app .sidebar-item.active {
    background: var(--company-accent);
}

.company-app h1 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 26px !important;
}
.company-app h2 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px !important;
    font-weight: 700 !important;
    margin: 28px 0 12px !important;
    color: var(--text-1) !important;
}
.company-app h2 .h2-icon {
    width: 24px; height: 24px;
    border-radius: 6px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.company-app h2 .h2-icon svg { width: 14px; height: 14px; }

/* Stat cards melhorados (com ícone canto sup. direito + barra de cor lateral) */
.company-app .stat-card {
    position: relative;
    overflow: hidden;
    padding: 18px 20px;
}
.company-app .stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--company-accent);
    opacity: .8;
}
.company-app .stat-card .stat-icon {
    position: absolute;
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}
.company-app .stat-card .stat-icon svg { width: 16px; height: 16px; }
.company-app .stat-card.success::before { background: #34c759; }
.company-app .stat-card.success .stat-icon { background: rgba(52,199,89,.16); color: #34c759; }
.company-app .stat-card.danger::before  { background: #ff453a; }
.company-app .stat-card.danger .stat-icon { background: rgba(255,69,58,.16); color: #ff453a; }
.company-app .stat-card.warning::before { background: #ff9f0a; }
.company-app .stat-card.warning .stat-icon { background: rgba(255,159,10,.16); color: #ff9f0a; }

/* Tabela com hover tintado */
.company-app .company-table tbody tr:hover {
    background: var(--company-accent-soft);
}
.company-app .company-table th {
    padding: 12px 16px;
    background: rgba(0,0,0,.18);
}

/* Toolbar primary button usa cor da empresa */
.company-app .toolbar-btn:not(.secondary):not(.danger) {
    background: var(--company-accent);
}
.company-app .toolbar-btn:not(.secondary):not(.danger):hover {
    filter: brightness(1.1);
}

/* Sidebar items com indicador antes do texto */
.company-app .sidebar-item {
    padding-left: 14px;
    position: relative;
}

/* Empty state ilustrado */
.company-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 50px 20px;
    text-align: center;
    color: var(--text-3);
}
.company-empty .empty-icon {
    width: 56px; height: 56px;
    border-radius: 16px;
    background: rgba(255,255,255,.04);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-3);
    margin-bottom: 4px;
}
.company-empty .empty-icon svg { width: 28px; height: 28px; }
.company-empty .empty-title { font-size: 14px; color: var(--text-1); font-weight: 600; }
.company-empty .empty-msg { font-size: 12.5px; max-width: 340px; line-height: 1.5; }

/* Online employee chip (verde discreto) */
.company-app .chip.online {
    background: rgba(52,199,89,.16);
    color: #34c759;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.company-app .chip.online::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 8px rgba(52,199,89,.6);
}
.company-app .chip.offline {
    background: rgba(255,255,255,.06);
    color: var(--text-3);
}

/* Boss badge proeminente */
.company-app .chip.boss {
    background: linear-gradient(135deg, rgba(255,159,10,.22), rgba(255,159,10,.10));
    color: #ff9f0a;
    box-shadow: inset 0 0 0 1px rgba(255,159,10,.3);
    font-weight: 700;
    letter-spacing: .3px;
}

/* Distribuição por patente (bar chart horizontal) */
.rank-distribution {
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.rank-dist-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12.5px;
}
.rank-dist-name {
    flex: 0 0 110px;
    font-weight: 600;
    color: var(--text-1);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.rank-dist-bar {
    flex: 1;
    height: 8px;
    background: rgba(255,255,255,.06);
    border-radius: 4px;
    overflow: hidden;
}
.rank-dist-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--company-accent), color-mix(in srgb, var(--company-accent) 60%, transparent));
    border-radius: 4px;
    transition: width .3s var(--ease-out);
}
.rank-dist-count {
    flex: 0 0 36px;
    text-align: right;
    color: var(--text-3);
    font-feature-settings: 'tnum' 1;
}

/* Ações de linha — hover/active mais polidos */
.company-app .row-action {
    transition: background .12s, transform .08s, color .12s;
}
.company-app .row-action:active:not(:disabled) { transform: scale(.92); }
.company-app .row-action:not(.danger):hover {
    background: var(--company-accent-soft);
    color: var(--company-accent);
}

/* ==========================================
   Modern polish — Hero, donut, profile cards
   ========================================== */

/* Animação de entrada subtil em cada vista */
.company-app .main > * {
    animation: cmFadeUp .25s var(--ease-out) backwards;
}
.company-app .main > *:nth-child(2) { animation-delay: .03s; }
.company-app .main > *:nth-child(3) { animation-delay: .06s; }
.company-app .main > *:nth-child(4) { animation-delay: .09s; }
.company-app .main > *:nth-child(5) { animation-delay: .12s; }
@keyframes cmFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Sidebar item ativo com gradient */
.company-app .sidebar-item.active {
    background: linear-gradient(135deg, var(--company-accent), color-mix(in srgb, var(--company-accent), black 25%));
    box-shadow: 0 4px 14px var(--company-accent-soft), inset 0 0 0 1px rgba(255,255,255,.08);
    transform: translateX(2px);
}

/* HERO CARD (Visão Geral) */
.company-hero {
    position: relative;
    background: linear-gradient(135deg, var(--company-accent) 0%, color-mix(in srgb, var(--company-accent), black 45%) 100%);
    border-radius: 18px;
    padding: 26px 28px;
    color: #fff;
    margin-bottom: 22px;
    overflow: hidden;
    box-shadow:
        0 12px 36px rgba(0,0,0,.32),
        inset 0 0 0 1px rgba(255,255,255,.08);
}
.company-hero::before {
    content: '';
    position: absolute;
    top: -120px; right: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.18), transparent 65%);
    pointer-events: none;
}
.company-hero::after {
    content: '';
    position: absolute;
    bottom: -100px; left: 30%;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.10), transparent 65%);
    pointer-events: none;
}
.hero-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: .82;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    position: relative;
}
.hero-tag-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255,255,255,.18);
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%,100% { box-shadow: 0 0 0 3px rgba(255,255,255,.18); }
    50%     { box-shadow: 0 0 0 6px rgba(255,255,255,.10); }
}
.hero-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1.1;
    margin-bottom: 4px;
    position: relative;
}
.hero-subtitle {
    font-size: 13px;
    opacity: .85;
    position: relative;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 24px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,.16);
    position: relative;
}
.hero-stat-label {
    font-size: 10.5px;
    opacity: .80;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 6px;
    font-weight: 600;
}
.hero-stat-value {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -.8px;
    font-feature-settings: 'tnum' 1;
    line-height: 1;
}
.hero-stat-sub {
    font-size: 11px;
    opacity: .75;
    margin-top: 4px;
}

/* Two-column section abaixo do hero */
.cm-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 8px;
}
.cm-card {
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.cm-card-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--text-3);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cm-card-title svg { width: 14px; height: 14px; }

/* DONUT CHART */
.donut-wrap {
    display: flex;
    align-items: center;
    gap: 22px;
}
.donut {
    position: relative;
    width: 130px; height: 130px;
    flex: 0 0 130px;
    border-radius: 50%;
    /* background é injetado via JS com conic-gradient */
}
.donut::after {
    content: '';
    position: absolute;
    inset: 16px;
    background: #1c1c1e;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}
.donut-center-num {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.5px;
}
.donut-center-label {
    font-size: 10px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-top: 2px;
}

.donut-legend {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}
.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
}
.donut-legend-dot {
    width: 9px; height: 9px;
    border-radius: 3px;
    flex: 0 0 9px;
}
.donut-legend-name {
    flex: 1;
    color: var(--text-2);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.donut-legend-count {
    color: var(--text-3);
    font-weight: 600;
    font-feature-settings: 'tnum' 1;
}

/* Online team list (compacto) */
.online-team-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow-y: auto;
}
.online-team-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background .12s;
}
.online-team-item:hover { background: var(--company-accent-soft); }
.online-team-info { flex: 1; min-width: 0; }
.online-team-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.online-team-rank {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 1px;
}

/* PROFILE CARDS de empregados (substituem tabela) */
.emp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}
.emp-card {
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    padding: 16px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    transition: background .15s, transform .12s, box-shadow .15s;
    position: relative;
    cursor: default;
}
.emp-card:hover {
    background: rgba(255,255,255,.06);
    transform: translateY(-2px);
    box-shadow:
        0 10px 28px rgba(0,0,0,.28),
        inset 0 0 0 1px var(--company-accent);
}
.emp-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.emp-card-info { flex: 1; min-width: 0; }
.emp-card-name {
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}
.emp-card-rank {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.emp-card-stats {
    display: flex;
    gap: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.emp-card-stat {
    flex: 1;
    text-align: center;
    padding: 0 4px;
    border-right: 1px solid rgba(255,255,255,.05);
}
.emp-card-stat:last-child { border-right: none; }
.emp-card-stat-label {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-3);
    font-weight: 600;
    margin-bottom: 3px;
}
.emp-card-stat-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-1);
    font-feature-settings: 'tnum' 1;
}
/* Action bar — agora colocada abaixo dos stats (antes ficava em cima do
   nome no canto superior direito, sobrepondo texto e bloqueando cliques
   no nome). Sempre visível para ser óbvio que é interactivo. */
.emp-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.06);
    justify-content: flex-end;
}
.emp-card-action {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.06);
    color: var(--text-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, color .12s, transform .08s, border-color .12s;
    cursor: none;
}
.emp-card-action svg { width: 14px; height: 14px; }
.emp-card-action:hover {
    background: var(--company-accent);
    color: #fff;
    border-color: var(--company-accent);
}
.emp-card-action.danger:hover {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}
.emp-card-action:active:not(:disabled) { transform: scale(.92); }
.emp-card-action:disabled {
    opacity: .35;
    pointer-events: none;
    background: transparent;
    border-color: rgba(255,255,255,.04);
}

/* View toggle (List ⇄ Grid) */
.view-toggle {
    display: inline-flex;
    background: rgba(255,255,255,.06);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
    margin-left: auto;
}
.view-toggle button {
    background: transparent;
    border: none;
    color: var(--text-3);
    width: 30px; height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .12s, color .12s;
}
.view-toggle button.active {
    background: var(--company-accent);
    color: #fff;
}
.view-toggle button:not(.active):hover { background: rgba(255,255,255,.06); color: var(--text-1); }

/* Hierarquia — versão polida */
.rank-block-modern {
    background: rgba(255,255,255,.03);
    border-radius: 14px;
    padding: 18px 22px;
    margin-bottom: 14px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    transition: background .15s, transform .12s;
}
.rank-block-modern:hover { background: rgba(255,255,255,.05); }
.rank-block-modern.boss {
    background: linear-gradient(135deg, rgba(255,159,10,.10), rgba(255,159,10,.02));
    box-shadow: inset 0 0 0 1px rgba(255,159,10,.25);
}
.rank-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}
.rank-block-name {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rank-block-num {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px var(--company-accent-soft);
}
.rank-block-modern.boss .rank-block-num {
    background: rgba(255,159,10,.15);
    color: #ff9f0a;
    box-shadow: inset 0 0 0 1px rgba(255,159,10,.35);
}
.rank-block-title {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.3px;
}
.rank-block-meta {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 2px;
}
.rank-block-salary {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -.5px;
    font-feature-settings: 'tnum' 1;
}
.rank-block-modern.boss .rank-block-salary { color: #ff9f0a; }
.rank-block-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}
.rank-mem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    transition: background .12s;
}
.rank-mem:hover { background: var(--company-accent-soft); }
.rank-mem-name {
    flex: 1;
    font-size: 12.5px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.rank-mem-status {
    font-size: 10px;
    color: var(--text-3);
}
.rank-mem-status.online { color: #34c759; }

/* ==========================================
   Dashboard Moderno (Visão Geral redesign)
   ========================================== */

/* Header strip compacto (substitui o hero gigante) */
.cm-header-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.cm-header-info { display: flex; align-items: center; gap: 14px; }
/* Badge LSPD/etc — suavizado, sem glow azul exagerado.
   Antes tinha "0 6px 18px var(--company-accent-soft)" que criava aquele
   halo azul gigante atrás. Agora é só um card sólido com tinta da empresa
   e um highlight subtil no topo. */
.cm-header-badge {
    width: 46px; height: 46px;
    border-radius: 11px;
    background:
        linear-gradient(160deg,
            color-mix(in srgb, var(--company-accent) 90%, white 10%) 0%,
            var(--company-accent) 50%,
            color-mix(in srgb, var(--company-accent) 70%, black 30%) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .4px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        inset 0 -1px 0 rgba(0,0,0,.20),
        0 1px 2px rgba(0,0,0,.30);
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.cm-header-text h1 {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    letter-spacing: -.5px;
    display: block !important;
}
.cm-header-text .cm-header-meta {
    font-size: 12.5px;
    color: var(--text-3);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cm-header-meta .live-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 6px rgba(52,199,89,.45);
    /* Pulse subtil: 3.6s ease-in-out, brilho discreto em vez de tamanho */
    animation: livePulse 3.6s ease-in-out infinite;
    display: inline-block;
    flex: 0 0 7px;
}
@keyframes livePulse {
    0%, 100% { box-shadow: 0 0 6px rgba(52,199,89,.45); opacity: 1; }
    50%      { box-shadow: 0 0 10px rgba(52,199,89,.75); opacity: .85; }
}
.cm-header-actions { display: flex; gap: 8px; }

/* 4-coluna stat cards com sparkline */
.cm-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
@media (max-width: 1100px) {
    .cm-stats-row { grid-template-columns: repeat(2, 1fr); }
}
.cm-stat {
    background:
        linear-gradient(180deg, rgba(255,255,255,.045) 0%, rgba(255,255,255,.02) 100%);
    border-radius: 14px;
    padding: 16px 18px 12px;
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.05),
        inset 0 1px 0 rgba(255,255,255,.04);
    position: relative;
    overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.cm-stat:hover {
    transform: translateY(-2px);
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.08),
        inset 0 1px 0 rgba(255,255,255,.06),
        0 8px 20px rgba(0,0,0,.25);
}

.cm-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.cm-stat-icon-box {
    width: 32px; height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.18);
}
.cm-stat-icon-box svg { width: 16px; height: 16px; }
.cm-stat-icon-box.blue   { background: linear-gradient(135deg, #0ea5e9, #1e40af); }
.cm-stat-icon-box.green  { background: linear-gradient(135deg, #34c759, #1a8d3a); }
.cm-stat-icon-box.purple { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.cm-stat-icon-box.orange { background: linear-gradient(135deg, #ff9f0a, #c2750a); }
.cm-stat-icon-box.pink   { background: linear-gradient(135deg, #ec4899, #be123c); }

.cm-stat-trend {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1;
}
.cm-stat-trend.up   { background: rgba(52,199,89,.16); color: #34c759; }
.cm-stat-trend.down { background: rgba(255,69,58,.16); color: #ff453a; }
.cm-stat-trend.neutral { background: rgba(255,255,255,.06); color: var(--text-3); }
.cm-stat-trend svg { width: 10px; height: 10px; }

.cm-stat-label {
    font-size: 11.5px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 600;
    margin-bottom: 4px;
}
.cm-stat-value {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.6px;
    line-height: 1.1;
    font-feature-settings: 'tnum' 1;
}
.cm-stat-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 3px;
}

.cm-stat-spark {
    margin-top: 10px;
    height: 36px;
    margin-left: -18px;
    margin-right: -18px;
    margin-bottom: -12px;
}
.cm-stat-spark svg { width: 100%; height: 100%; display: block; }

/* Layout principal: 2/3 + 1/3 */
.cm-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
@media (max-width: 1100px) {
    .cm-main-grid { grid-template-columns: 1fr; }
}

.cm-panel {
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.cm-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.cm-panel-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -.1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cm-panel-title-icon {
    width: 24px; height: 24px;
    border-radius: 7px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.cm-panel-title-icon svg { width: 13px; height: 13px; }
.cm-panel-action {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 600;
}

/* Donut redesign — maior, mais legível */
.cm-donut-block {
    display: flex;
    align-items: center;
    gap: 28px;
    flex: 1;
    min-height: 200px;
}
.cm-donut-big {
    position: relative;
    width: 180px; height: 180px;
    flex: 0 0 180px;
    border-radius: 50%;
}
.cm-donut-big::after {
    content: '';
    position: absolute;
    inset: 22px;
    background: linear-gradient(180deg, rgba(40,40,44,1), rgba(28,28,32,1));
    border-radius: 50%;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}
.cm-donut-center {
    position: absolute; inset: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 1;
}
.cm-donut-num {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -1.2px;
    color: #fff;
}
.cm-donut-sub {
    font-size: 10.5px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-top: 2px;
    font-weight: 600;
}

.cm-donut-leg {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}
.cm-donut-leg-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255,255,255,.03);
    border-radius: 8px;
    transition: background .12s;
}
.cm-donut-leg-item:hover { background: rgba(255,255,255,.05); }
.cm-donut-leg-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
    flex: 0 0 10px;
}
.cm-donut-leg-name {
    flex: 1;
    font-size: 12.5px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.cm-donut-leg-value {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 600;
}
.cm-donut-leg-bar {
    width: 60px;
    height: 4px;
    background: rgba(255,255,255,.06);
    border-radius: 2px;
    overflow: hidden;
}
.cm-donut-leg-bar-fill {
    height: 100%;
    border-radius: 2px;
}

/* Activity Feed (lateral direita) */
.cm-feed {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
    margin: 0 -8px;
    max-height: 340px;
}
.cm-feed-item {
    display: flex;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 8px;
    transition: background .12s;
}
.cm-feed-item:hover { background: rgba(255,255,255,.04); }
.cm-feed-icon {
    width: 34px; height: 34px;
    border-radius: 50%;
    flex: 0 0 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.15);
}
.cm-feed-icon svg { width: 14px; height: 14px; }
.cm-feed-icon.green  { background: linear-gradient(135deg, #34c759, #1a8d3a); }
.cm-feed-icon.red    { background: linear-gradient(135deg, #ff453a, #c2261c); }
.cm-feed-icon.blue   { background: linear-gradient(135deg, #0ea5e9, #1e40af); }
.cm-feed-icon.orange { background: linear-gradient(135deg, #ff9f0a, #c2750a); }
.cm-feed-icon.purple { background: linear-gradient(135deg, #a855f7, #6d28d9); }
.cm-feed-info { flex: 1; min-width: 0; }
.cm-feed-text {
    font-size: 12.5px;
    color: var(--text-1);
    line-height: 1.4;
}
.cm-feed-time {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}
.cm-feed-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-3);
    font-size: 12px;
}

/* Online team — versão mais densa em row inferior */
.cm-online-strip {
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
    margin-bottom: 14px;
}
.cm-online-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
}
.cm-online-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,.03);
    border-radius: 10px;
    transition: background .12s;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.03);
}
.cm-online-card:hover { background: var(--company-accent-soft); }
.cm-online-card-info { flex: 1; min-width: 0; }
.cm-online-card-name {
    font-size: 12.5px;
    font-weight: 700;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.cm-online-card-rank {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.cm-online-card-rank::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 6px rgba(52,199,89,.5);
}

/* Sidebar com ícones (dentro de .company-app) */
.company-app .sidebar-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px 9px 12px;
}
.company-app .sidebar-item .si-icon-w {
    width: 18px; height: 18px;
    flex: 0 0 18px;
    color: currentColor;
    opacity: .85;
    display: flex;
    align-items: center;
    justify-content: center;
}
.company-app .sidebar-item .si-icon-w svg { width: 16px; height: 16px; }
.company-app .sidebar-item.active .si-icon-w { opacity: 1; }

/* ==========================================
   PATENTES — Organograma piramidal + matriz de permissões
   ========================================== */
.cm-pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 30px 20px 24px;
    background:
        radial-gradient(ellipse at 50% 0%, var(--company-accent-soft), transparent 60%),
        rgba(255,255,255,.02);
    border-radius: 16px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    margin-bottom: 22px;
    position: relative;
}
.cm-pyramid-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
    transition: background .15s, transform .15s;
    position: relative;
    width: 100%;
    max-width: 320px;
}
.cm-pyramid-row:hover {
    background: var(--company-accent-soft);
}
/* Cada nível mais largo (efeito pirâmide) */
.cm-pyramid-row[data-level="0"] { max-width: 240px; }
.cm-pyramid-row[data-level="1"] { max-width: 320px; }
.cm-pyramid-row[data-level="2"] { max-width: 400px; }
.cm-pyramid-row[data-level="3"] { max-width: 480px; }
.cm-pyramid-row[data-level="4"] { max-width: 560px; }
.cm-pyramid-row[data-level="5"] { max-width: 640px; }

/* Topo (boss) com cor especial */
.cm-pyramid-row.boss {
    background: linear-gradient(135deg, rgba(255,159,10,.18), rgba(255,159,10,.06));
    box-shadow: inset 0 0 0 1px rgba(255,159,10,.30), 0 6px 16px rgba(255,159,10,.12);
}

/* Linha conectora vertical entre níveis */
.cm-pyramid-row::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 14px;
    background: rgba(255,255,255,.10);
}
.cm-pyramid-row:last-child::after { display: none; }

.cm-pyramid-rank-num {
    width: 30px; height: 30px;
    border-radius: 8px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex: 0 0 30px;
}
.cm-pyramid-row.boss .cm-pyramid-rank-num {
    background: rgba(255,159,10,.20);
    color: #ff9f0a;
}
.cm-pyramid-rank-info { flex: 1; min-width: 0; }
.cm-pyramid-rank-name {
    font-size: 14px;
    font-weight: 700;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.cm-pyramid-rank-meta {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}
.cm-pyramid-rank-members {
    display: flex;
    align-items: center;
    gap: -6px;
}
.cm-pyramid-rank-members .ped-avatar {
    margin-left: -8px;
    box-shadow: 0 0 0 2px rgba(28,28,32,1);
}
.cm-pyramid-rank-members .ped-avatar:first-child { margin-left: 0; }
.cm-pyramid-rank-empty {
    font-size: 11px;
    color: var(--text-3);
    font-style: italic;
}

/* Tabela de patentes editável (abaixo do organograma) */
.cm-rank-row {
    display: grid;
    grid-template-columns: 50px 1.5fr 1fr 80px 80px;
    gap: 16px;
    padding: 14px 16px;
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    margin-bottom: 8px;
    align-items: center;
    transition: background .12s;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.cm-rank-row:hover { background: var(--company-accent-soft); }

.cm-rank-row-grade {
    width: 36px; height: 36px;
    border-radius: 8px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    font-weight: 800;
}
.cm-rank-row-name {
    font-size: 14px;
    font-weight: 700;
}
.cm-rank-row-name-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
    font-family: inherit;
}
.cm-rank-row-salary {
    font-size: 16px;
    font-weight: 700;
    font-feature-settings: 'tnum' 1;
    color: var(--text-1);
}
.cm-rank-row-salary-sub {
    font-size: 10px;
    color: var(--text-3);
    margin-top: 1px;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.cm-rank-row-members {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
}
.cm-rank-row-members-sub {
    font-size: 10px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.cm-rank-row-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
    align-items: center;
}
.cm-rank-row-actions .row-action[data-act="rename"] svg,
.cm-rank-row-actions .row-action[data-act="salary"] svg { color: var(--company-accent); }
.cm-rank-row-actions .row-action.danger:not(:disabled):hover svg { color: #fff; }

/* ==========================================
   SALÁRIOS — Payroll dashboard
   ========================================== */
.cm-payroll-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}
@media (max-width: 1100px) {
    .cm-payroll-stats { grid-template-columns: repeat(2, 1fr); }
}
.cm-payroll-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 100%);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.cm-payroll-card-label {
    font-size: 10.5px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
    margin-bottom: 6px;
}
.cm-payroll-card-value {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -.5px;
    font-feature-settings: 'tnum' 1;
}
.cm-payroll-card-sub {
    font-size: 10.5px;
    color: var(--text-3);
    margin-top: 4px;
}

/* Salary distribution chart (horizontal bars) */
.cm-salary-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.cm-salary-bar-row {
    display: grid;
    grid-template-columns: 130px 1fr 100px;
    align-items: center;
    gap: 14px;
}
.cm-salary-bar-name {
    font-size: 12.5px;
    font-weight: 600;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.cm-salary-bar-track {
    height: 10px;
    background: rgba(255,255,255,.05);
    border-radius: 5px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.2);
}
.cm-salary-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--company-accent), color-mix(in srgb, var(--company-accent), white 25%));
    border-radius: 5px;
    box-shadow: 0 0 12px color-mix(in srgb, var(--company-accent), transparent 60%);
}
.cm-salary-bar-value {
    text-align: right;
    font-size: 13px;
    font-weight: 700;
    font-feature-settings: 'tnum' 1;
}

/* Tabela de salários por empregado */
.cm-payroll-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}
.cm-payroll-table thead th {
    font-size: 10.5px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
    padding: 10px 14px;
    text-align: left;
}
.cm-payroll-table tbody tr {
    background: rgba(255,255,255,.03);
    transition: background .12s;
}
.cm-payroll-table tbody tr:hover { background: var(--company-accent-soft); }
.cm-payroll-table tbody td {
    padding: 12px 14px;
    font-size: 13px;
    border-top: none;
}
.cm-payroll-table tbody tr td:first-child { border-radius: 8px 0 0 8px; }
.cm-payroll-table tbody tr td:last-child  { border-radius: 0 8px 8px 0; text-align: right; }
.cm-payroll-emp-info {
    display: flex; align-items: center; gap: 10px;
}
.cm-payroll-emp-info-text { min-width: 0; }
.cm-payroll-emp-info-name { font-weight: 700; font-size: 13px; }
.cm-payroll-emp-info-rank { font-size: 11px; color: var(--text-3); margin-top: 1px; }

.cm-bonus-btn {
    background: linear-gradient(180deg, rgba(255,159,10,.25), rgba(255,159,10,.12));
    color: #ff9f0a;
    border: none;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 700;
    box-shadow: inset 0 0 0 1px rgba(255,159,10,.30);
    transition: background .12s, transform .08s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.cm-bonus-btn:hover  { background: linear-gradient(180deg, rgba(255,159,10,.35), rgba(255,159,10,.20)); }
.cm-bonus-btn:active { transform: scale(.95); }
.cm-bonus-btn svg { width: 12px; height: 12px; }

/* ==========================================
   FROTA — Vehicle grid
   ========================================== */
/* ==========================================
   FOLHA DE PONTO — Clock-In/Out + histórico
   ========================================== */

/* Painel "Folha do Dia" no dashboard — turnos abertos AGORA */
.cm-shift-empty {
    text-align: center;
    padding: 40px 20px 24px;
    color: var(--text-3);
}
.cm-shift-empty-icon {
    width: 56px; height: 56px;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex; align-items: center; justify-content: center;
}
.cm-shift-empty-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-2);
    margin-bottom: 4px;
}
.cm-shift-empty-sub {
    font-size: 12.5px;
    line-height: 1.5;
}
.cm-shift-empty-sub strong { color: var(--text-2); }

.cm-shift-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cm-shift-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 10px;
    transition: background .12s, border-color .12s;
}
.cm-shift-row:hover {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.10);
}
.cm-shift-row-info { flex: 1; min-width: 0; }
.cm-shift-row-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-shift-row-meta {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-shift-row-dur {
    text-align: right;
    flex: 0 0 auto;
}
.cm-shift-row-dur-val {
    font-size: 14px;
    font-weight: 800;
    color: #34c759;
    font-feature-settings: 'tnum' 1;
}
.cm-shift-row-dur-lbl {
    font-size: 10px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.cm-shift-end-btn {
    background: rgba(255,69,58,.14);
    color: #ff453a;
    border: 1px solid rgba(255,69,58,.20);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .12s, transform .08s;
    cursor: none;
    flex: 0 0 auto;
    font-family: inherit;
}
.cm-shift-end-btn:hover { background: rgba(255,69,58,.24); }
.cm-shift-end-btn:active { transform: scale(.95); }

/* Picker para iniciar turno (folha de ponto principal) */
.cm-clock-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    padding: 6px 0;
}
.cm-clock-tile {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 11px;
    color: var(--text-1);
    text-align: left;
    transition: background .12s, border-color .12s, transform .08s;
    cursor: none;
    font-family: inherit;
    width: 100%;
}
.cm-clock-tile:hover {
    background: rgba(255,255,255,.07);
    border-color: var(--company-accent);
}
.cm-clock-tile:active { transform: scale(.99); }
.cm-clock-tile.on-shift {
    background: rgba(52,199,89,.12);
    border-color: rgba(52,199,89,.35);
}
.cm-clock-tile.on-shift:hover {
    background: rgba(52,199,89,.18);
}
.cm-clock-tile-info { flex: 1; min-width: 0; }
.cm-clock-tile-name {
    font-size: 13px;
    font-weight: 700;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-clock-tile-meta {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-clock-tile.on-shift .cm-clock-tile-meta {
    color: #34c759;
    font-weight: 600;
}
.cm-clock-tile-action {
    width: 28px; height: 28px;
    border-radius: 7px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
}
.cm-clock-tile.on-shift .cm-clock-tile-action {
    background: rgba(255,69,58,.16);
    color: #ff453a;
}

/* Pill "EU" — destaca o próprio utilizador na lista de turnos */
.cm-pill-me {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .5px;
    background: var(--company-accent);
    color: #fff;
    margin-left: 4px;
    vertical-align: middle;
}
.cm-shift-row.is-mine {
    background: var(--company-accent-soft);
    border-color: color-mix(in srgb, var(--company-accent) 30%, transparent);
}

/* Big card para o empregado marcar o seu próprio ponto.
   Card grande, claro, com estado actual (Em serviço / Fora de serviço) */
.cm-clock-bigcard {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto auto;
    grid-template-areas:
        "state  button"
        "time   button"
        "meta   button";
    gap: 4px 24px;
    align-items: center;
    padding: 24px 28px;
    border-radius: 14px;
    margin: 8px 0 4px;
    transition: background .25s, border-color .25s;
}
.cm-clock-bigcard.off-shift {
    background:
        linear-gradient(135deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.02) 100%);
    border: 1px solid rgba(255,255,255,.06);
}
.cm-clock-bigcard.on-shift {
    background:
        linear-gradient(135deg, rgba(52,199,89,.16) 0%, rgba(52,199,89,.06) 100%);
    border: 1px solid rgba(52,199,89,.30);
}
.cm-clock-bigcard-state {
    grid-area: state;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: .5px;
}
.cm-clock-bigcard-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: #34c759;
    box-shadow: 0 0 10px rgba(52,199,89,.55);
    animation: livePulse 3.6s ease-in-out infinite;
}
.cm-clock-bigcard-dot.off {
    background: var(--text-4);
    box-shadow: none;
    animation: none;
}
.cm-clock-bigcard-time {
    grid-area: time;
    font-size: 42px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -1px;
    line-height: 1.1;
    font-feature-settings: 'tnum' 1;
}
.cm-clock-bigcard.on-shift .cm-clock-bigcard-time { color: #34c759; }
.cm-clock-bigcard-meta {
    grid-area: meta;
    font-size: 13px;
    color: var(--text-3);
}
.cm-clock-bigcard-btn {
    grid-area: button;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 26px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: none;
    transition: transform .1s, filter .15s, box-shadow .15s;
    color: #fff;
}
.cm-clock-bigcard-btn.start {
    background: linear-gradient(135deg, #34c759, #1a8d3a);
    box-shadow: 0 6px 18px rgba(52,199,89,.30), inset 0 1px 0 rgba(255,255,255,.20);
}
.cm-clock-bigcard-btn.end {
    background: linear-gradient(135deg, #ff453a, #c2261c);
    box-shadow: 0 6px 18px rgba(255,69,58,.30), inset 0 1px 0 rgba(255,255,255,.20);
}
.cm-clock-bigcard-btn:hover  { filter: brightness(1.10); transform: translateY(-1px); }
.cm-clock-bigcard-btn:active { transform: scale(.97); }

/* ==========================================
   PERMISSÕES POR PATENTE (Definições)
   ========================================== */
.cm-perm-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.cm-perm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.05);
    border-radius: 10px;
    transition: background .12s, border-color .12s;
}
.cm-perm-row:hover {
    background: rgba(255,255,255,.05);
    border-color: rgba(255,255,255,.10);
}
.cm-perm-row.is-boss {
    background: rgba(255,159,10,.08);
    border-color: rgba(255,159,10,.18);
}
.cm-perm-row-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.cm-perm-grade {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    flex: 0 0 36px;
    letter-spacing: -.3px;
}
.cm-perm-row.is-boss .cm-perm-grade {
    background: rgba(255,159,10,.20);
    color: #ff9f0a;
}
.cm-perm-info { flex: 1; min-width: 0; }
.cm-perm-name {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-perm-meta {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 2px;
}
.cm-perm-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}
.cm-perm-lock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #ff9f0a;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 10px;
    background: rgba(255,159,10,.10);
    border-radius: 7px;
}
.cm-perm-lock svg { width: 12px; height: 12px; }

/* ==========================================
   FINANÇAS V2 — Hero compacto integrado (saldo + 4 KPIs em linha)
   ========================================== */
.cm-finance-hero-v2 {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 2.4fr;
    gap: 18px;
    align-items: stretch;
    padding: 18px 22px;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--company-accent) 16%, transparent) 0%,
            rgba(255,255,255,.02) 60%);
    border: 1px solid color-mix(in srgb, var(--company-accent) 16%, transparent);
    border-radius: 14px;
    margin: 14px 0 16px;
    position: relative;
    overflow: hidden;
}
.cm-finance-hero-v2::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--company-accent) 22%, transparent) 0%, transparent 60%);
    pointer-events: none;
    opacity: .55;
}
.cm-finance-hero-v2 > * { position: relative; z-index: 1; }

.cm-finance-balance {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 18px;
    border-right: 1px solid rgba(255,255,255,.08);
    min-width: 0;
}
.cm-finance-balance-label {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
    margin-bottom: 4px;
}
.cm-finance-balance-value {
    font-size: 36px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -1px;
    line-height: 1.05;
    font-feature-settings: 'tnum' 1;
}
.cm-finance-balance-meta {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 6px;
}
.cm-finance-balance-account {
    font-family: inherit;
    background: rgba(0,0,0,.20);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 10.5px;
    color: var(--text-2);
}

.cm-finance-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}
@media (max-width: 1100px) {
    .cm-finance-hero-v2 { grid-template-columns: 1fr; }
    .cm-finance-balance { padding-right: 0; border-right: none; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
    .cm-finance-kpis { grid-template-columns: repeat(2, 1fr); }
}
.cm-finance-kpi {
    background: rgba(0,0,0,.22);
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), inset 0 0 0 1px rgba(255,255,255,.04);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}
.cm-finance-kpi.highlight {
    background: rgba(255,159,10,.10);
    box-shadow: inset 0 1px 0 rgba(255,159,10,.18), inset 0 0 0 1px rgba(255,159,10,.18);
}
.cm-finance-kpi-icon {
    width: 28px; height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cm-finance-kpi-icon svg { width: 14px; height: 14px; }
.cm-finance-kpi-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -.3px;
    font-feature-settings: 'tnum' 1;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    width: 100%;
}
.cm-finance-kpi-lbl {
    font-size: 10.5px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    width: 100%;
}

/* Mini stats inline no header do gráfico (substitui o painel "Resumo" separado) */
.cm-finance-mini-stats {
    display: flex;
    gap: 6px;
}
.cm-mini-pill {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 999px;
    font-feature-settings: 'tnum' 1;
    background: rgba(255,255,255,.06);
    color: var(--text-2);
}
.cm-mini-pill.in  { background: rgba(52,199,89,.16);  color: #34c759; }
.cm-mini-pill.out { background: rgba(255,69,58,.14);  color: #ff453a; }

/* ==========================================
   FINANÇAS — livro de transações partilhado
   ========================================== */
.company-table .cm-tx-num {
    text-align: right;
    font-weight: 700;
    font-feature-settings: 'tnum' 1;
    white-space: nowrap;
}
.company-table .cm-tx-num.in  { color: #34c759; }
.company-table .cm-tx-num.out { color: #ff453a; }
.company-table .cm-tx-num.muted-cell { color: var(--text-2); font-weight: 600; }
.cm-tx-table td { vertical-align: top; }
.cm-tx-who { font-weight: 600; color: var(--text-1); }
.cm-tx-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    margin-top: 2px;
}
.cm-tx-note { max-width: 260px; overflow-wrap: anywhere; }
.cm-tx-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 5px 12px;
    border: none;
    border-radius: 999px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
}
.cm-tx-active-filter span { opacity: .75; }
.cm-tx-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--text-3);
}

/* ==========================================
   FINANÇAS — Hero saldo + breakdown (legacy, mantido por compat)
   ========================================== */
.cm-finance-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 22px 26px;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--company-accent) 18%, transparent) 0%,
            rgba(255,255,255,.02) 60%);
    border: 1px solid color-mix(in srgb, var(--company-accent) 18%, transparent);
    border-radius: 16px;
    margin-top: 14px;
    position: relative;
    overflow: hidden;
}
.cm-finance-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--company-accent) 25%, transparent) 0%, transparent 60%);
    pointer-events: none;
    opacity: .55;
}
.cm-finance-hero > * { position: relative; z-index: 1; }
.cm-finance-hero-side { min-width: 0; }
.cm-finance-hero-label {
    font-size: 12px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
}
.cm-finance-hero-value {
    font-size: 44px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -1.2px;
    line-height: 1.1;
    margin-top: 4px;
    font-feature-settings: 'tnum' 1;
}
.cm-finance-hero-meta {
    font-size: 12.5px;
    color: var(--text-3);
    margin-top: 6px;
}
.cm-finance-hero-stats {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 0 0 auto;
}
@media (max-width: 900px) {
    .cm-finance-hero { grid-template-columns: 1fr; }
    .cm-finance-hero-value { font-size: 36px; }
    .cm-finance-hero-stats { flex-direction: row; }
}
.cm-finance-hero-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(0,0,0,.20);
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
    min-width: 220px;
}
.cm-finance-hero-stat-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
}
.cm-finance-hero-stat-icon svg { width: 18px; height: 18px; }
.cm-finance-hero-stat-val {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -.3px;
    font-feature-settings: 'tnum' 1;
}
.cm-finance-hero-stat-lbl {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

/* Card destaque (folha mensal) */
.cm-payroll-card.highlight {
    background:
        linear-gradient(180deg, rgba(255,159,10,.16) 0%, rgba(255,159,10,.04) 100%);
    border: 1px solid rgba(255,159,10,.25);
    box-shadow: inset 0 1px 0 rgba(255,159,10,.15);
}

/* Breakdown da folha por patente */
.cm-finance-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 6px 0;
}
.cm-finance-break-row {
    display: grid;
    grid-template-columns: 1fr 2fr auto;
    gap: 14px;
    align-items: center;
    padding: 10px 12px;
    background: rgba(255,255,255,.03);
    border-radius: 9px;
    transition: background .12s;
}
.cm-finance-break-row:hover { background: rgba(255,255,255,.05); }
.cm-finance-break-rank {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.cm-finance-break-grade {
    width: 30px; height: 30px;
    border-radius: 7px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    flex: 0 0 30px;
}
.cm-finance-break-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-finance-break-meta {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}
.cm-finance-break-bar {
    height: 8px;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    overflow: hidden;
}
.cm-finance-break-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--company-accent), color-mix(in srgb, var(--company-accent) 60%, #ff9f0a));
    border-radius: 999px;
    transition: width .55s var(--ease-out);
}
.cm-finance-break-val {
    text-align: right;
    font-weight: 700;
    color: var(--text-1);
    font-size: 14px;
    font-feature-settings: 'tnum' 1;
    min-width: 110px;
}
.cm-finance-break-pct {
    display: block;
    font-size: 10.5px;
    color: var(--text-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-top: 2px;
}

/* ==========================================
   ENGAJAMENTO DA EQUIPA (dashboard)
   ========================================== */
.cm-panel-wide { margin-top: 16px; }
.cm-engage-body {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 6px 0;
}
@media (max-width: 900px) {
    .cm-engage-body { grid-template-columns: 1fr; }
}
.cm-engage-bar-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cm-engage-bar {
    height: 12px;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.3);
}
.cm-engage-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--company-accent), color-mix(in srgb, var(--company-accent) 70%, #34c759));
    border-radius: 999px;
    box-shadow: 0 0 12px var(--company-accent-soft);
    transition: width .55s cubic-bezier(.16,1,.3,1);
}
.cm-engage-bar-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.cm-engage-bar-pct {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -.5px;
    font-feature-settings: 'tnum' 1;
}
.cm-engage-bar-lbl {
    font-size: 12px;
    color: var(--text-3);
}
.cm-engage-stats {
    display: flex;
    gap: 20px;
    align-items: center;
    padding-left: 20px;
    border-left: 1px solid rgba(255,255,255,.06);
}
@media (max-width: 900px) {
    .cm-engage-stats { padding-left: 0; border-left: none; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.06); }
}
.cm-engage-stat {
    text-align: center;
    min-width: 76px;
}
.cm-engage-stat-val {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -.3px;
    font-feature-settings: 'tnum' 1;
}
.cm-engage-stat-lbl {
    font-size: 10.5px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
}

/* ==========================================
   ANÚNCIOS — Comunicação
   ========================================== */
.cm-announce-compose {
    background:
        linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 100%);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.cm-announce-textarea {
    width: 100%;
    min-height: 80px;
    background: rgba(0,0,0,.25);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    color: #fff;
    padding: 12px 14px;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
    outline: none;
    transition: border-color .15s, background .15s;
    margin-bottom: 12px;
}
.cm-announce-textarea:focus {
    border-color: var(--company-accent);
    background: rgba(0,0,0,.35);
    box-shadow: 0 0 0 3px var(--company-accent-soft);
}
.cm-announce-textarea::placeholder { color: var(--text-3); }
.cm-announce-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
/* Botão custom de target (substitui o <select> nativo branco/feio) */
.cm-announce-target-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 8px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 9px;
    color: var(--text-1);
    font-family: inherit;
    cursor: none;
    transition: background .12s, border-color .12s;
    min-width: 200px;
}
.cm-announce-target-btn:hover {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.14);
}
.cm-announce-target-icon {
    width: 30px; height: 30px;
    border-radius: 7px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
}
.cm-announce-target-icon svg { width: 14px; height: 14px; }
.cm-announce-target-label {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.cm-announce-target-cap {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-3);
    font-weight: 700;
}
.cm-announce-target-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-1);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cm-announce-target-chev {
    color: var(--text-3);
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

/* Items do floating menu com ícones (genérico) */
.kebab-item-icon {
    width: 22px; height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-2);
    flex: 0 0 22px;
    margin-right: 8px;
}
.kebab-item-icon svg { width: 14px; height: 14px; }
.kebab-item:hover .kebab-item-icon { color: #fff; }

.cm-announce-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cm-announce-item {
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    border-left: 3px solid var(--company-accent);
}
.cm-announce-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.cm-announce-author {
    font-size: 12px;
    font-weight: 700;
}
.cm-announce-time {
    font-size: 10.5px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
}
.cm-announce-body {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-1);
    white-space: pre-wrap;
}
.cm-announce-target-badge {
    display: inline-block;
    font-size: 10px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    padding: 2px 8px;
    border-radius: 5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-top: 8px;
}

/* ==========================================
   Filter Chips (reutilizável em todas as tabs)
   ========================================== */
.cm-filter-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.cm-filter-chips {
    display: inline-flex;
    gap: 4px;
    background: rgba(255,255,255,.04);
    padding: 4px;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.cm-filter-chip {
    background: transparent;
    border: none;
    color: var(--text-3);
    padding: 6px 14px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    transition: background .12s, color .12s, transform .08s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.cm-filter-chip:hover { color: var(--text-1); background: rgba(255,255,255,.05); }
.cm-filter-chip.active {
    background: var(--company-accent);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.20),
        0 2px 6px var(--company-accent-soft);
}
.cm-filter-chip:active:not(.active) { transform: scale(.96); }
.cm-filter-chip-count {
    background: rgba(255,255,255,.10);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
}
.cm-filter-chip.active .cm-filter-chip-count {
    background: rgba(255,255,255,.20);
}

/* Search input polido */
.cm-search-input {
    flex: 1;
    min-width: 200px;
    background: rgba(255,255,255,.04);
    border: 1px solid transparent;
    color: #fff;
    padding: 8px 12px 8px 36px;
    border-radius: 8px;
    font-size: 12.5px;
    outline: none;
    font-family: inherit;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.4)' stroke-width='2' stroke-linecap='round'><circle cx='11' cy='11' r='8'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
    background-repeat: no-repeat;
    background-position: 11px center;
    background-size: 14px;
    transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.cm-search-input:focus {
    background-color: rgba(255,255,255,.06);
    border-color: var(--company-accent);
    box-shadow: 0 0 0 3px var(--company-accent-soft);
}
.cm-search-input::placeholder { color: var(--text-3); }

/* ==========================================
   Page transitions entre tabs
   ========================================== */
.cm-tab-page {
    animation: cmTabIn .26s cubic-bezier(.16, 1, .3, 1) both;
}
@keyframes cmTabIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   Histórico melhorado (day groups + sticky headers)
   ========================================== */
.cm-history-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.cm-history-day {
    margin-bottom: 18px;
}
.cm-history-day-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 0 4px;
    position: sticky;
    top: -32px;
    background: linear-gradient(180deg, #1c1c1e 60%, transparent);
    padding-top: 8px;
    z-index: 1;
}
.cm-history-day-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .8px;
}
.cm-history-day-count {
    font-size: 11px;
    color: var(--text-3);
    font-weight: 600;
}
.cm-history-events {
    background: rgba(255,255,255,.03);
    border-radius: 12px;
    padding: 6px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.cm-history-event {
    display: flex;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    transition: background .12s;
    align-items: center;
}
.cm-history-event:hover { background: rgba(255,255,255,.04); }
.cm-history-event-icon {
    width: 32px; height: 32px;
    border-radius: 9px;
    flex: 0 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: inset 0 -1px 0 rgba(0,0,0,.15), inset 0 1px 0 rgba(255,255,255,.15);
}
.cm-history-event-icon svg { width: 14px; height: 14px; }
.cm-history-event-info { flex: 1; min-width: 0; }
.cm-history-event-text { font-size: 13px; line-height: 1.4; }
.cm-history-event-time {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .4px;
    font-weight: 600;
    margin-top: 2px;
}

/* ==========================================
   Finanças — Line chart + breakdown
   ========================================== */
.cm-finance-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 14px;
    margin-bottom: 20px;
}
@media (max-width: 1100px) { .cm-finance-grid { grid-template-columns: 1fr; } }

.cm-line-chart {
    height: 220px;
    margin: 8px -10px 0;
    position: relative;
}
.cm-line-chart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cm-line-chart-tooltip {
    position: absolute;
    background: rgba(28,28,32,.96);
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.4);
    transform: translate(-50%, -100%);
    margin-top: -8px;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,.08);
}

/* Breakdown circular (entradas vs saídas) */
.cm-breakdown {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 6px 4px;
}
.cm-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(255,255,255,.03);
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    transition: transform .12s;
}
.cm-breakdown-row:hover { transform: translateX(2px); }
.cm-breakdown-side {
    display: flex; align-items: center; gap: 12px;
    min-width: 0;
}
.cm-breakdown-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    flex: 0 0 36px;
}
.cm-breakdown-icon.in  { background: linear-gradient(135deg, #34c759, #1a8d3a); }
.cm-breakdown-icon.out { background: linear-gradient(135deg, #ff453a, #c2261c); }
.cm-breakdown-icon svg { width: 16px; height: 16px; }
.cm-breakdown-label {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}
.cm-breakdown-count { font-size: 11px; color: var(--text-3); }
.cm-breakdown-value {
    font-size: 18px;
    font-weight: 700;
    font-feature-settings: 'tnum' 1;
}
.cm-breakdown-value.in  { color: #34c759; }
.cm-breakdown-value.out { color: #ff453a; }
.cm-breakdown-net {
    background: rgba(255,255,255,.02);
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    margin-top: 4px;
}
.cm-breakdown-net-label {
    font-size: 11px;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 700;
}
.cm-breakdown-net-value {
    font-size: 24px;
    font-weight: 700;
    margin-top: 4px;
    font-feature-settings: 'tnum' 1;
    letter-spacing: -.5px;
}

/* ==========================================
   Definições — layout em cards visuais
   ========================================== */
.cm-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 14px;
}
.cm-settings-card {
    background:
        linear-gradient(180deg, rgba(255,255,255,.05) 0%, rgba(255,255,255,.02) 100%);
    border-radius: 14px;
    padding: 18px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
    transition: transform .12s, box-shadow .15s;
}
.cm-settings-card:hover {
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.10);
}
.cm-settings-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.cm-settings-card-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--company-accent-soft);
    color: var(--company-accent);
    display: flex; align-items: center; justify-content: center;
    flex: 0 0 38px;
}
.cm-settings-card-icon svg { width: 18px; height: 18px; }
.cm-settings-card-title {
    font-size: 14px;
    font-weight: 700;
}
.cm-settings-card-sub {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 2px;
}
.cm-settings-card-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.cm-settings-card .settings-row {
    background: transparent;
    margin-bottom: 0;
    padding: 10px 0;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
}
.cm-settings-card .settings-row:last-child { border-bottom: none; }
.cm-settings-card .settings-row .label { font-size: 12.5px; }
.cm-settings-card .settings-row .label .sub { font-size: 11px; }

/* ==========================================
   Company Management - Brand sidebar + extras
   ========================================== */
/* Brand profissional — card discreto, integrado com a sidebar glass.
   Sem stick-out, sem gradient saturado a estourar limites. */
.company-brand {
    margin: -4px 0 14px;
    padding: 12px;
    color: var(--text-1);
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}
/* Tinta subtil da cor da empresa no fundo (sem ofuscar) */
.company-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--company-accent-soft) 0%, transparent 60%);
    pointer-events: none;
    opacity: .9;
    z-index: 0;
}
.company-brand > * { position: relative; z-index: 1; }
.brand-short {
    width: 36px; height: 36px;
    border-radius: 9px;
    /* Sem glow externo — só gradient suave + highlight interno */
    background: linear-gradient(160deg,
        color-mix(in srgb, var(--company-accent) 90%, white 10%) 0%,
        var(--company-accent) 50%,
        color-mix(in srgb, var(--company-accent) 70%, black 30%) 100%);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 12px;
    letter-spacing: .3px;
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        inset 0 -1px 0 rgba(0,0,0,.20),
        0 1px 2px rgba(0,0,0,.25);
    flex: 0 0 36px;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.brand-text { flex: 1; min-width: 0; }
.brand-name {
    font-size: 13px; font-weight: 700;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
    color: var(--text-1);
    letter-spacing: -.1px;
}
.brand-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}

/* Avatar de ped (deterministic gradient) */
.ped-avatar {
    overflow: hidden;
    isolation: isolate;
}

/* Gráfico de barras simples */
.company-chart {
    background: rgba(255,255,255,.04);
    border-radius: 12px;
    padding: 18px 18px 14px;
    margin-bottom: 14px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: 140px auto;
    gap: 8px;
    position: relative;
}
.bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}
.bar-stack {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 100%;
    width: 100%;
    justify-content: center;
}
.bar {
    width: 14px;
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: filter .15s;
}
.bar:hover { filter: brightness(1.2); }
.bar-in  { background: linear-gradient(180deg, #34c759, #1a8d3a); }
.bar-out { background: linear-gradient(180deg, #ff453a, #c2261c); }
.bar-label {
    font-size: 10px;
    color: var(--text-3);
    font-feature-settings: 'tnum' 1;
}
.chart-legend {
    grid-column: 1 / -1;
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-top: 6px;
    font-size: 11px;
    color: var(--text-3);
}
.chart-legend .dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}
.chart-legend .dot-in  { background: #34c759; }
.chart-legend .dot-out { background: #ff453a; }

/* Hierarquia (árvore de patentes) */
.rank-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
}
.rank-block {
    width: 100%;
    background: rgba(255,255,255,.04);
    border-radius: 14px;
    padding: 16px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.rank-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.rank-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.10), transparent);
}
.rank-pill {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 7px 18px;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.rank-pill.rank-boss {
    background: linear-gradient(135deg, rgba(255,159,10,.25), rgba(255,159,10,.12));
    box-shadow: inset 0 0 0 1px rgba(255,159,10,.3);
}
.rank-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.2px;
}
.rank-grade { font-size: 11px; color: var(--text-3); }
.rank-salary {
    font-size: 12px;
    color: var(--text-2);
    font-weight: 600;
    font-feature-settings: 'tnum' 1;
}

.rank-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.rank-empty {
    grid-column: 1 / -1;
    padding: 14px;
    text-align: center;
    color: var(--text-3);
    font-size: 12px;
    font-style: italic;
}
.rank-member {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.rank-member-info { flex: 1; min-width: 0; }
.rank-member-name {
    font-size: 13px;
    font-weight: 600;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.rank-member-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}
.rank-arrow {
    font-size: 18px;
    color: var(--text-3);
    line-height: 1;
    margin: -2px 0;
}

/* Histórico - timeline */
.timeline {
    position: relative;
    padding-left: 16px;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: rgba(255,255,255,.08);
}
.timeline-item {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
    align-items: flex-start;
    position: relative;
}
.timeline-marker {
    width: 28px; height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.4);
    z-index: 1;
}
.timeline-marker svg { width: 14px; height: 14px; }
.timeline-body {
    flex: 1;
    padding-top: 4px;
}
.timeline-text {
    font-size: 13.5px;
    color: var(--text-1);
    line-height: 1.4;
}
.timeline-time {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}

/* Lista de hire (modal Contratar) */
.hire-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
}
.hire-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,.04);
    border-radius: 10px;
    transition: background .12s;
}
.hire-item:hover { background: rgba(255,255,255,.07); }
.hire-info { flex: 1; min-width: 0; }
.hire-name {
    font-size: 13.5px;
    font-weight: 600;
}
.hire-sub {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 2px;
}
.hire-item .modal-btn { min-width: auto; padding: 5px 14px; font-size: 12px; }

/* ==========================================
   Notification Center — estilo macOS (Liquid Glass)
   ========================================== */
#notification-stack {
    position: absolute;
    top: 38px;
    right: 12px;
    width: 360px;
    max-width: calc(100% - 24px);
    z-index: 99800;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.notification {
    /* Liquid Glass real: gradient + blur calibrado + tinta alta para legibilidade.
       Antes: blur(40px) saturate(220%) — pesado em GPUs fracas.
       Agora: usa o token global --blur-strong (22px sat 180%) que parece igual
       no FiveM mas é ~3x mais barato a compor. */
    background:
        linear-gradient(180deg,
            rgba(60,60,68,.50) 0%,
            rgba(38,38,46,.50) 100%),
        var(--glass-popover);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border-radius: 18px;
    padding: 14px 16px 14px 14px;
    box-shadow:
        0 18px 42px rgba(0,0,0,.38),
        0 3px 10px rgba(0,0,0,.18),
        var(--glass-shine-2),
        inset 0 -1px 0 rgba(0,0,0,.10),
        var(--glass-edge-2),
        var(--glass-hairline);
    pointer-events: auto;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    /* Spring com bounce subtil + slide */
    animation: notifIn .55s cubic-bezier(.34, 1.4, .5, 1) both;
    transition: transform .25s cubic-bezier(.16, 1, .3, 1), opacity .2s;
    position: relative;
    transform: translateZ(0);
    contain: layout paint;
    will-change: transform, opacity;
}
.notification:hover {
    transform: translateX(-4px) scale(1.01) translateZ(0);
}
.notification.removing { animation: notifOut .26s cubic-bezier(.4, 0, .8, .4) forwards; }

@keyframes notifIn {
    0%   { opacity: 0; transform: translateX(120%) scale(.85); }
    60%  { opacity: 1; transform: translateX(-6px) scale(1.02); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes notifOut {
    0%   { opacity: 1; transform: translateX(0) scale(1); }
    100% { opacity: 0; transform: translateX(120%) scale(.92); }
}

/* Stack effect — notificações antigas ficam mais pequenas/atrás */
#notification-stack .notification:nth-child(n+4) {
    transform: scale(.97);
    opacity: .85;
}
#notification-stack .notification:nth-child(n+5) {
    transform: scale(.94);
    opacity: .7;
}

.notif-icon {
    width: 38px; height: 38px;
    flex: 0 0 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    /* Highlight interior + glow subtil da cor */
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.25),
        inset 0 -1px 0 rgba(0,0,0,.20),
        0 4px 10px rgba(0,0,0,.30);
}
.notif-icon.notif-info {
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 50%),
        linear-gradient(135deg, #0ea5e9, #1e40af);
}
.notif-icon.notif-success {
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 50%),
        linear-gradient(135deg, #34c759, #1a8d3a);
}
.notif-icon.notif-warning {
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 50%),
        linear-gradient(135deg, #ff9f0a, #c2750a);
}
.notif-icon.notif-error {
    background:
        radial-gradient(circle at 30% 20%, rgba(255,255,255,.25), transparent 50%),
        linear-gradient(135deg, #ff453a, #c2261c);
}

.notif-body { flex: 1; min-width: 0; padding-top: 1px; }
.notif-app {
    font-size: 10.5px;
    font-weight: 700;
    color: rgba(255,255,255,.55);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 3px;
}
.notif-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    letter-spacing: -.1px;
    overflow: hidden;
    word-break: break-word;
}
.notif-message {
    font-size: 12.5px;
    color: rgba(255,255,255,.78);
    margin-top: 3px;
    line-height: 1.42;
    word-break: break-word;
}
.notif-close {
    position: absolute;
    top: 8px; right: 8px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,.30);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    color: rgba(255,255,255,.85);
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity .18s, background .12s, transform .1s;
    padding: 0;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.notification:hover .notif-close {
    opacity: 1;
    transform: scale(1);
}
.notif-close:hover {
    background: rgba(0,0,0,.55);
    color: #fff;
    transform: scale(1.08);
}
.notif-close:active { transform: scale(.92); }

/* Loading state da Gestão de Empresa */
.company-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 80px 20px;
    color: var(--text-3);
    font-size: 13px;
}
.company-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================
   Menu Bar Panels (Wi-Fi, Bateria, Volume, Controlo)
   ========================================== */
.menu-panel {
    position: absolute;
    top: 32px;
    /* Liquid Glass: tinta + blur + highlight + edge */
    background:
        linear-gradient(180deg, rgba(60,60,68,.40) 0%, rgba(38,38,46,.40) 100%),
        var(--glass-popover);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border-radius: 14px;
    transform: translateZ(0);
    contain: layout paint;
    box-shadow:
        0 16px 40px rgba(0,0,0,.45),
        var(--glass-shine-2),
        var(--glass-edge-2),
        var(--glass-hairline);
    padding: 12px;
    z-index: 70;
    color: #fff;
    width: 290px;
    animation: dropdownIn .14s var(--ease-out);
    font-size: 13px;
}
.menu-panel.hidden { display: none !important; }

.panel-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .6px;
    margin: 4px 8px 8px;
}

.panel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background .1s;
    gap: 10px;
}
.panel-row:hover { background: rgba(255,255,255,.06); }
.panel-row .row-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}
.panel-row .row-icon {
    width: 22px; height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-1);
    flex: 0 0 22px;
}
.panel-row .row-name {
    font-size: 13px;
    font-weight: 500;
}
.panel-row .row-sub {
    font-size: 11px;
    color: var(--text-3);
}
.panel-row .row-meta { font-size: 11px; color: var(--text-3); }
.panel-row.active { background: rgba(0,122,255,.18); }

.panel-sep {
    height: 1px;
    background: rgba(255,255,255,.08);
    margin: 6px 4px;
}

.panel-slider-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 4px;
}
.panel-slider-row svg { color: var(--text-2); flex: 0 0 16px; }
.panel-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: rgba(255,255,255,.16);
    border-radius: 999px;
    outline: none;
}
.panel-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 14px; height: 14px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,.4);
}

.panel-tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px;
}
.panel-tile {
    background: rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 12px;
    transition: background .1s;
}
.panel-tile.on { background: var(--accent); }
.panel-tile-title {
    font-size: 11px;
    color: rgba(255,255,255,.7);
    font-weight: 600;
}
.panel-tile-value {
    font-size: 13px;
    font-weight: 600;
    margin-top: 2px;
}
.panel-tile.on .panel-tile-title,
.panel-tile.on .panel-tile-value { color: #fff; }

.menu-icon.active { background: rgba(255,255,255,.18); }

/* ==========================================
   Modais
   ========================================== */
#modal-root {
    /* Absolute (não fixed) para ficar contido dentro do #screen */
    position: absolute;
    inset: 0;
    z-index: 99000;
    pointer-events: none;
}
.modal-overlay {
    position: absolute;
    inset: 0;
    /* Overlay com blur subtil (4px é barato) — dá foco ao modal sem
       custar performance porque o área é pequena e estática. */
    background: rgba(0,0,0,.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    animation: modalFade .14s var(--ease-out);
    contain: layout paint;
}
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
    /* Liquid Glass modal */
    background:
        linear-gradient(180deg, rgba(60,60,68,.50) 0%, rgba(38,38,46,.55) 100%),
        var(--glass-popover);
    backdrop-filter: var(--blur-strong);
    -webkit-backdrop-filter: var(--blur-strong);
    border-radius: 16px;
    transform: translateZ(0);
    contain: layout paint;
    box-shadow:
        0 24px 60px rgba(0,0,0,.55),
        var(--glass-shine-2),
        var(--glass-edge-2),
        var(--glass-hairline);
    min-width: 380px;
    max-width: 480px;
    overflow: hidden;
    animation: modalIn .18s var(--ease-spring);
    color: #fff;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.94); }
    to   { opacity: 1; transform: scale(1); }
}
.modal-header { padding: 18px 22px 6px; }
.modal-title  { font-size: 16px; font-weight: 700; letter-spacing: -.2px; }
.modal-subtitle {
    font-size: 12.5px;
    color: var(--text-3);
    margin-top: 4px;
    line-height: 1.4;
}
.modal-body {
    padding: 14px 22px 18px;
    max-height: 60vh;
    overflow-y: auto;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(255,255,255,.03);
    border-top: 1px solid rgba(255,255,255,.06);
}
.modal-btn {
    border: none;
    /* Gradient subtil + inner highlight + close shadow (botão "real") */
    background:
        linear-gradient(180deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.06) 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition:
        transform .12s cubic-bezier(.16, 1, .3, 1),
        background .15s,
        box-shadow .15s,
        filter .12s;
    font-family: inherit;
    min-width: 88px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        inset 0 -1px 0 rgba(0,0,0,.18),
        0 1px 2px rgba(0,0,0,.25),
        0 0 0 .5px rgba(0,0,0,.3);
}
.modal-btn:hover  {
    background:
        linear-gradient(180deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.10) 100%);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.22),
        inset 0 -1px 0 rgba(0,0,0,.18),
        0 4px 10px rgba(0,0,0,.3),
        0 0 0 .5px rgba(0,0,0,.3);
}
.modal-btn:active {
    transform: translateY(0) scale(.97);
    box-shadow: inset 0 2px 4px rgba(0,0,0,.25);
}
.modal-btn.primary {
    background: linear-gradient(180deg, #1ea4ff 0%, #0a77d8 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.30),
        inset 0 -1px 0 rgba(0,0,0,.22),
        0 2px 6px rgba(10,119,216,.4),
        0 0 0 .5px rgba(0,0,0,.4);
}
.modal-btn.primary:hover {
    background: linear-gradient(180deg, #34b1ff 0%, #1383e8 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.32),
        inset 0 -1px 0 rgba(0,0,0,.22),
        0 6px 16px rgba(10,119,216,.5),
        0 0 0 .5px rgba(0,0,0,.4);
}
.modal-btn.danger  {
    background: linear-gradient(180deg, rgba(255,69,58,.30) 0%, rgba(255,69,58,.16) 100%);
    color: var(--danger);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        inset 0 0 0 1px rgba(255,69,58,.30),
        0 2px 6px rgba(255,69,58,.18);
}
.modal-btn.danger:hover {
    background: linear-gradient(180deg, rgba(255,69,58,.42) 0%, rgba(255,69,58,.22) 100%);
    transform: translateY(-1px);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}
.field label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.field input,
.field select {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    color: #fff;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13.5px;
    outline: none;
    font-family: inherit;
    transition: border-color .1s, background .1s;
}
.field input:focus,
.field select:focus {
    border-color: var(--accent);
    background: rgba(255,255,255,.10);
}
.field input::placeholder { color: var(--text-3); }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }

.toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    align-items: center;
    flex-wrap: wrap;
}
.toolbar-btn {
    border: none;
    background: linear-gradient(180deg, #1ea4ff 0%, #0a77d8 100%);
    color: #fff;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    transition:
        transform .12s cubic-bezier(.16, 1, .3, 1),
        background .15s,
        box-shadow .15s,
        filter .12s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.28),
        inset 0 -1px 0 rgba(0,0,0,.20),
        0 2px 4px rgba(10,119,216,.3),
        0 0 0 .5px rgba(0,0,0,.4);
}
.toolbar-btn:hover  {
    background: linear-gradient(180deg, #34b1ff 0%, #1383e8 100%);
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.32),
        inset 0 -1px 0 rgba(0,0,0,.20),
        0 6px 14px rgba(10,119,216,.45),
        0 0 0 .5px rgba(0,0,0,.4);
}
.toolbar-btn:active {
    transform: translateY(0) scale(.97);
}
.toolbar-btn.secondary {
    background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.06) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.18),
        inset 0 -1px 0 rgba(0,0,0,.18),
        0 1px 2px rgba(0,0,0,.2);
}
.toolbar-btn.secondary:hover {
    background: linear-gradient(180deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.10) 100%);
}
.toolbar-btn.danger {
    background: linear-gradient(180deg, rgba(255,69,58,.30) 0%, rgba(255,69,58,.16) 100%);
    color: var(--danger);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        inset 0 0 0 1px rgba(255,69,58,.30),
        0 2px 6px rgba(255,69,58,.18);
}
.toolbar-btn.danger:hover {
    background: linear-gradient(180deg, rgba(255,69,58,.42) 0%, rgba(255,69,58,.22) 100%);
    transform: translateY(-1px);
}
.toolbar-btn svg { width: 14px; height: 14px; }
.toolbar-search {
    flex: 1;
    min-width: 180px;
    background: rgba(255,255,255,.06);
    border: none;
    color: #fff;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    outline: none;
    font-family: inherit;
}

.row-actions { display: inline-flex; gap: 4px; }
.row-action {
    width: 26px; height: 26px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--text-2);
    transition: background .1s, color .1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.row-action:hover { background: rgba(255,255,255,.08); color: #fff; }
.row-action.danger:hover { background: rgba(255,69,58,.16); color: var(--danger); }
.row-action svg { width: 14px; height: 14px; }

.chip {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,.10);
    color: var(--text-2);
}
.chip.success { background: rgba(52,199,89,.18); color: var(--success); }
.chip.warning { background: rgba(255,159,10,.18); color: var(--warning); }
.chip.danger  { background: rgba(255,69,58,.18); color: var(--danger); }

/* ==========================================
   Wallpaper fallback
   ========================================== */
.fallback-wallpaper {
    background:
        radial-gradient(ellipse at 20% 20%, #ff7e6b 0%, transparent 45%),
        radial-gradient(ellipse at 80% 30%, #f9a36b 0%, transparent 45%),
        radial-gradient(ellipse at 50% 80%, #6f4cdc 0%, transparent 50%),
        radial-gradient(ellipse at 90% 90%, #2b3a8c 0%, transparent 50%),
        linear-gradient(180deg, #2a1f5c 0%, #4a1f7c 50%, #1a1240 100%);
    background-size: cover;
}
.fallback-avatar { background: linear-gradient(135deg, #4a90e2, #7b61ff); }

/* ==========================================
   App Store V3 — Hero Carousel
   ========================================== */
.store-hero-carousel {
    position: relative;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 8px 28px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.06) inset;
}
.store-hero-slides {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform .55s cubic-bezier(.65,.05,.36,1);
}
.store-hero-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 38px;
    color: #fff;
    overflow: hidden;
}
.store-hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 50%, rgba(255,255,255,.18) 0%, transparent 55%),
        linear-gradient(180deg, rgba(0,0,0,0) 60%, rgba(0,0,0,.25) 100%);
    pointer-events: none;
}
.store-hero-content {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 200px);
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}
.store-hero-content .store-hero-tag {
    display: inline-block;
    align-self: flex-start;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
    box-shadow: 0 1px 0 rgba(255,255,255,.25) inset;
}
.store-hero-name {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.6px;
    margin: 0;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,.25);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.15;
}
.store-hero-tagline {
    font-size: 14.5px;
    line-height: 1.45;
    color: rgba(255,255,255,.92);
    max-width: 100%;
    text-shadow: 0 1px 4px rgba(0,0,0,.2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.store-hero-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12.5px;
    color: rgba(255,255,255,.85);
    margin-top: 2px;
    flex-wrap: wrap;
    min-width: 0;
}
.store-hero-meta .store-stars {
    color: #ffd60a;
    font-size: 13px;
    letter-spacing: 1px;
}
.store-hero-meta-rating { font-weight: 700; color: #fff; }
.store-hero-meta-dot { opacity: .55; padding: 0 2px; }
.store-hero-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
}
.store-hero-actions .install-button-wrap .pill-btn-get {
    background: #fff;
    color: #1a1a1a;
    font-weight: 800;
    padding: 8px 22px;
    font-size: 13px;
    box-shadow: 0 4px 14px rgba(0,0,0,.18);
}
.store-hero-actions .install-button-wrap .pill-btn-get:hover {
    background: #fff;
    transform: scale(1.04);
}
.store-hero-actions .install-button-wrap .pill-btn-installed {
    background: rgba(255,255,255,.22);
    color: #fff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.store-hero-secondary {
    background: rgba(255,255,255,.18);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background .15s, transform .12s;
}
.store-hero-secondary:hover { background: rgba(255,255,255,.28); transform: translateY(-1px); }
.store-hero-icon {
    width: 170px;
    height: 170px;
    flex: 0 0 170px;
    margin-left: auto;
    position: relative;
    z-index: 2;
    border-radius: 36px;
    box-shadow: 0 18px 40px rgba(0,0,0,.35), 0 1px 0 rgba(255,255,255,.18) inset;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transform: rotate(-4deg) translateZ(0);
    transition: transform .35s var(--ease-out);
    /* GPU layer + isolation: o ícone com gradient não bloqueia o blur do hero */
    will-change: transform;
    contain: layout paint;
}
.store-hero-slide:hover .store-hero-icon {
    transform: rotate(0deg) scale(1.04);
}
.store-hero-icon > * {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
}
.store-hero-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}
.store-hero-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.35);
    cursor: none;
    transition: background .2s, width .2s;
    padding: 0;
}
.store-hero-dot.active {
    background: #fff;
    width: 22px;
    border-radius: 999px;
}

/* ==========================================
   App Store V3 — Section Heads
   ========================================== */
.store-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin: 28px 0 14px;
    gap: 14px;
    min-width: 0;
}
.store-section-head > * {
    min-width: 0;
    overflow: hidden;
}
.store-section-title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: var(--text-1);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.store-section-sub {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================
   App Store V3 — Horizontal Scroll
   ========================================== */
.store-hscroll {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px 14px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}
.store-hscroll::-webkit-scrollbar { height: 8px; }
.store-hscroll::-webkit-scrollbar-track { background: transparent; }
.store-hscroll::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.16);
    border-radius: 999px;
}
.store-hscroll::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.26); }

.store-bigcard {
    flex: 0 0 320px;
    scroll-snap-align: start;
    /* Liquid Glass big card */
    background:
        linear-gradient(180deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.025) 100%);
    backdrop-filter: var(--blur-thin);
    -webkit-backdrop-filter: var(--blur-thin);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: none;
    transition: background .18s, transform .18s, box-shadow .18s;
    position: relative;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 0 0 1px rgba(255,255,255,.06),
        0 2px 6px rgba(0,0,0,.18);
    transform: translateZ(0);
}
.store-bigcard:hover {
    background:
        linear-gradient(180deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.05) 100%);
    transform: translateY(-3px) translateZ(0);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.14),
        inset 0 0 0 1px rgba(255,255,255,.12),
        0 10px 24px rgba(0,0,0,.30);
}
.store-bigcard-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0,0,0,.3);
    flex: 0 0 72px;
}
.store-bigcard-icon > * {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
}
.store-bigcard-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.store-bigcard-cat {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: .4px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    min-width: 0;
    overflow: hidden;
    line-height: 1.4;
}
.store-bigcard-cat .store-tag-badge {
    flex-shrink: 0;
}
.store-bigcard-name {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-1);
    margin: 0;
    letter-spacing: -.2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.store-bigcard-desc {
    font-size: 12.5px;
    line-height: 1.4;
    color: var(--text-2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.store-bigcard-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-top: 2px;
}
.store-bigcard-meta .store-stars {
    color: #ffb340;
    letter-spacing: 1px;
}
.store-bigcard-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 4px;
}

/* ==========================================
   App Store V3 — Category Tiles
   ========================================== */
.store-cat-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 8px;
}
.store-cat-tile {
    --cat-color: #5b9bff;
    background:
        linear-gradient(135deg,
            color-mix(in srgb, var(--cat-color) 28%, transparent) 0%,
            color-mix(in srgb, var(--cat-color) 8%, transparent) 100%);
    border: 1px solid color-mix(in srgb, var(--cat-color) 22%, transparent);
    border-radius: 14px;
    padding: 18px 16px;
    cursor: none;
    transition: transform .18s, border-color .18s, background .2s;
    position: relative;
    overflow: hidden;
}
.store-cat-tile::before {
    content: "";
    position: absolute;
    inset: -40% 50% auto auto;
    width: 140%;
    height: 140%;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--cat-color) 35%, transparent) 0%, transparent 60%);
    pointer-events: none;
    opacity: .5;
    transition: opacity .25s;
}
.store-cat-tile:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--cat-color) 45%, transparent);
}
.store-cat-tile:hover::before { opacity: .85; }
.store-cat-icon {
    font-size: 24px;
    line-height: 1;
    margin-bottom: 8px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}
.store-cat-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-1);
    letter-spacing: -.1px;
}
.store-cat-count {
    font-size: 11.5px;
    color: var(--text-3);
    margin-top: 2px;
}

/* ==========================================
   App Store V3 — Tag Badges
   ========================================== */
.store-tag-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .55px;
    text-transform: uppercase;
    line-height: 1.3;
    vertical-align: middle;
}
.store-tag-badge.tag-editor {
    background: linear-gradient(135deg, #6a3ed8, #af52de);
    color: #fff;
}
.store-tag-badge.tag-new {
    background: linear-gradient(135deg, #34c759, #30d158);
    color: #fff;
}
.store-tag-badge.tag-trending {
    background: linear-gradient(135deg, #ff9500, #ff6b00);
    color: #fff;
}

/* ==========================================
   App Store V3 — Star Rating
   ========================================== */
.store-stars {
    color: #ffb340;
    font-size: 12px;
    letter-spacing: 1.5px;
    white-space: nowrap;
}

/* ==========================================
   App Store V3 — Reviews Section
   ========================================== */
.review-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0 18px;
    align-items: center;
    padding: 16px 18px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    margin-bottom: 14px;
}
.review-summary-num {
    grid-row: span 2;
    font-size: 48px;
    font-weight: 800;
    color: var(--text-1);
    letter-spacing: -1.5px;
    line-height: 1;
}
.review-summary-stars {
    font-size: 18px;
    letter-spacing: 2px;
    color: #ffb340;
    align-self: end;
}
.review-summary-stars .store-stars {
    font-size: 18px;
    letter-spacing: 2px;
}
.review-summary-count {
    font-size: 12.5px;
    color: var(--text-3);
    align-self: start;
    margin-top: 2px;
}
.review-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.review-item {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 10px;
    padding: 13px 15px;
    transition: background .15s;
}
.review-item:hover { background: rgba(255,255,255,.05); }
.review-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.review-author {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-1);
}
.review-stars {
    color: #ffb340;
    font-size: 12px;
    letter-spacing: 1px;
}
.review-stars .store-stars { font-size: 12px; }
.review-date {
    font-size: 11.5px;
    color: var(--text-3);
    margin-left: auto;
}
.review-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-2);
}

/* ==========================================
   World 3D Icon + Interact Prompt
   ==========================================
   Overlays independentes do OS — renderizam fora de #os-root e podem
   aparecer com o computador fechado. Controlados pelo client/main.lua
   via SendNUIMessage. Tudo construído com Liquid Glass real:
   backdrop-filter pesado + alfa baixíssimo + multi-layered shine. */

/* ----- Ícone 3D flutuante (ancorado em coords do mundo) ----- */
#world-icon {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%) scale(0.8);
    pointer-events: none;
    z-index: 99998;
    opacity: 0;
    transition: opacity .22s var(--ease-out);
    will-change: transform, left, top, opacity;
    color: rgba(255, 255, 255, 0.95);
    font-family: "GTAArtDeco", Arial, sans-serif;
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.45));
}
#world-icon.wi-show { opacity: 1; }

.wi-glass {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    /* Liquid Glass real — alfa baixíssimo, blur forte, saturação extrema */
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(24px) saturate(220%);
    -webkit-backdrop-filter: blur(24px) saturate(220%);
    box-shadow:
        /* edge inset (1px white border feel) */
        inset 0 0 0 1px rgba(255, 255, 255, 0.22),
        /* top specular highlight */
        inset 0 1.5px 0 rgba(255, 255, 255, 0.35),
        /* bottom darkening for depth */
        inset 0 -1px 0 rgba(0, 0, 0, 0.18),
        /* outer drop shadow */
        0 12px 32px rgba(0, 0, 0, 0.38),
        /* hairline */
        0 0 0 .5px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    animation: wiBob 2.0s ease-in-out infinite;
}

/* Refração interna — gradiente que simula a curvatura óptica do glass */
.wi-glass::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse 70% 50% at 30% 0%, rgba(255,255,255,0.28), transparent 60%),
        linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,0.12) 100%);
    pointer-events: none;
}

/* Specular sliver no topo */
.wi-glass::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 18%;
    right: 18%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.65), transparent);
    border-radius: 999px;
    pointer-events: none;
}

.wi-svg {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.96);
}

.wi-arrow {
    margin-top: 2px;
    display: flex;
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    animation: wiArrowBob 2.0s ease-in-out infinite;
}

@keyframes wiBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}
@keyframes wiArrowBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

/* ----- Pílula "Premir E" no fundo-centro do ecrã ----- */
#interact-prompt {
    position: fixed;
    bottom: 9.5%;
    left: 50%;
    transform: translateX(-50%) translateY(14px) scale(0.96);
    pointer-events: none;
    z-index: 99999;
    opacity: 0;
    transition: opacity .22s var(--ease-out),
                transform .38s var(--ease-spring);
    font-family: "GTAArtDeco", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    will-change: opacity, transform;
}
#interact-prompt.ip-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

.ip-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 18px 9px 9px;
    border-radius: var(--radius-pill);
    /* Liquid Glass real — branco com pouca opacidade + blur muito forte */
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(28px) saturate(220%);
    -webkit-backdrop-filter: blur(28px) saturate(220%);
    box-shadow:
        /* outer shadow */
        0 14px 40px rgba(0, 0, 0, 0.42),
        /* hairline preta para contrast em fundos claros */
        0 0 0 .5px rgba(0, 0, 0, 0.5),
        /* edge inset branco */
        inset 0 0 0 1px rgba(255, 255, 255, 0.22),
        /* top specular */
        inset 0 1.5px 0 rgba(255, 255, 255, 0.38),
        /* bottom shadow inset */
        inset 0 -1.5px 0 rgba(0, 0, 0, 0.22);
    color: var(--text-1);
    user-select: none;
    overflow: hidden;
}

/* Refração interna — gradiente claro→escuro de cima para baixo */
.ip-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(ellipse 60% 60% at 30% -10%, rgba(255,255,255,0.28), transparent 65%),
        linear-gradient(180deg, rgba(255,255,255,0.10) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,0.10) 100%);
    pointer-events: none;
}

/* Specular highlight superior — risquinha brilhante a indicar a curvatura */
.ip-card::after {
    content: '';
    position: absolute;
    top: 1.5px;
    left: 14%;
    right: 14%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.7), transparent);
    border-radius: 999px;
    pointer-events: none;
}

.ip-key {
    position: relative;
    z-index: 1;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    /* mini "tecla" com glass próprio — mais escuro que o card para destacar */
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.40),
        inset 0 -2px 0 rgba(0,0,0,0.30),
        inset 0 0 0 1px rgba(255,255,255,0.18),
        0 2px 6px rgba(0,0,0,0.30);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: rgba(255,255,255,0.98);
    letter-spacing: 0.02em;
    flex: 0 0 38px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.ip-divider {
    position: relative;
    z-index: 1;
    width: 1px;
    height: 22px;
    background: linear-gradient(180deg, transparent, rgba(255,255,255,0.22), transparent);
    flex: 0 0 1px;
}

.ip-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding-right: 4px;
    line-height: 1.15;
    text-shadow: 0 1px 3px rgba(0,0,0,0.45);
}

.ip-label {
    font-size: 13.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.98);
    letter-spacing: 0.005em;
}

.ip-hint {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.72);
    letter-spacing: 0.01em;
}

/* Performance mode: substitui o blur por cor opaca em GPUs fracas */
body.perf-low .ip-card,
body.perf-low .wi-glass {
    background: rgba(38, 38, 44, 0.92) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}
body.perf-low .ip-card::before,
body.perf-low .ip-card::after,
body.perf-low .wi-glass::before,
body.perf-low .wi-glass::after { display: none; }
