@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&family=Nunito+Sans:wght@400;500;600;700;800&display=swap');

/* === Fontes === */
/* ----- Tipografia do sistema ----- */
/* === Design System === */
/* ----- Tokens estruturais ----- */
/* === Geometria === */
/* ----- Raios de borda ----- */
:root {
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

/* === Tipografia === */
/* ----- Famílias oficiais ----- */
:root {
  --font-interface: 'Nunito Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

/* === Espaçamento === */
/* ----- Escala compartilhada ----- */
:root {
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}

/* === Controles === */
/* ----- Dimensões mínimas ----- */
:root {
  --control-height-sm: 32px;
  --control-height-md: 40px;
  --control-height-lg: 44px;
}

/* === Transições === */
/* ----- Durações compartilhadas ----- */
:root {
  --transition-fast: 120ms;
  --transition-normal: 200ms;
}

/* === Acessibilidade === */
/* ----- Movimento reduzido ----- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
  }
}
/* ----- Paletas dos temas ----- */
/* === Tema Dark === */
/* ----- Configuração do navegador ----- */
:root,
:root[data-theme='dark'] {
  color-scheme: dark;
}

/* === Superfícies === */
/* ----- Fundos e áreas de conteúdo ----- */
:root,
:root[data-theme='dark'] {
  --surface-canvas: #111925;
  --surface-primary: #1b2736;
  --surface-secondary: #26384a;
}

/* === Tipografia === */
/* ----- Cores de texto ----- */
:root,
:root[data-theme='dark'] {
  --text-primary: #ebf2fb;
  --text-secondary: #acbdcd;
}

/* === Bordas === */
/* ----- Contornos principais ----- */
:root,
:root[data-theme='dark'] {
  --border-default: #35465b;
}

/* === Destaques === */
/* ----- Paleta azul padrão ----- */
:root,
:root[data-theme='dark'] {
  --accent-primary: #378ce4;
  --accent-secondary: #65cde1;
}
/* === Tema Light === */
/* ----- Configuração do navegador ----- */
:root[data-theme='light'] {
  color-scheme: light;
}

/* === Superfícies === */
/* ----- Fundos e áreas de conteúdo ----- */
:root[data-theme='light'] {
  --surface-canvas: #f1f5f9;
  --surface-primary: #ffffff;
  --surface-secondary: #e2e8f0;
}

/* === Tipografia === */
/* ----- Cores de texto ----- */
:root[data-theme='light'] {
  --text-primary: #172334;
  --text-secondary: #506176;
}

/* === Bordas === */
/* ----- Contornos principais ----- */
:root[data-theme='light'] {
  --border-default: #cbd5e1;
}

/* === Destaques === */
/* ----- Paleta azul padrão ----- */
:root[data-theme='light'] {
  --accent-primary: #2876d0;
  --accent-secondary: #126b81;
}
/* ----- Personalização e efeitos ----- */
/* === Personalização de cores === */
/* ----- Azul Dark ----- */
:root,
:root[data-theme='dark'],
:root[data-theme='dark'][data-accent='blue'] {
  --accent-primary: #378ce4;
  --accent-secondary: #65cde1;
  --action-background: #1d5c96;
  --link-color: #8dc2ff;
}

/* ----- Azul Light ----- */
:root[data-theme='light'],
:root[data-theme='light'][data-accent='blue'] {
  --accent-primary: #2876d0;
  --accent-secondary: #126b81;
  --action-background: #1d5c96;
  --link-color: #185a9d;
}

/* === Verde === */
/* ----- Verde Dark ----- */
:root[data-theme='dark'][data-accent='green'] {
  --accent-primary: #229b83;
  --accent-secondary: #7de1c4;
  --action-background: #08634f;
  --link-color: #7de1c4;
}

/* ----- Verde Light ----- */
:root[data-theme='light'][data-accent='green'] {
  --accent-primary: #08775f;
  --accent-secondary: #08634f;
  --action-background: #08634f;
  --link-color: #08634f;
}

/* === Violeta === */
/* ----- Violeta Dark ----- */
:root[data-theme='dark'][data-accent='violet'] {
  --accent-primary: #9270ed;
  --accent-secondary: #c3abff;
  --action-background: #6439a9;
  --link-color: #c3abff;
}

/* ----- Violeta Light ----- */
:root[data-theme='light'][data-accent='violet'] {
  --accent-primary: #6942bb;
  --accent-secondary: #6439a9;
  --action-background: #6439a9;
  --link-color: #6439a9;
}
/* === Transparência === */
/* ----- Valores padrão ----- */
:root {
  --opacity-solid: 1;
  --opacity-glass: 0.92;

  --ws-glass-opacity: 0.88;
  --ws-window-opacity: 68%;

  --ws-glass-rgb: 24 34 48;
  --ws-glass: rgb(var(--ws-glass-rgb) / var(--ws-glass-opacity));

  --ws-window-background: color-mix(
    in srgb,
    var(--surface-secondary) var(--ws-window-opacity),
    transparent
  );
}

/* ----- Superfície adaptativa das janelas Dark ----- */
:root:not([data-theme='light']) {
  --ws-window-background: color-mix(
    in srgb,
    color-mix(in srgb, #252628 96%, var(--accent-primary) 4%) var(--ws-window-opacity),
    transparent
  );
}

/* ----- Superfícies do tema Light ----- */
:root[data-theme='light'] {
  --ws-glass-rgb: 255 255 255;
}

/* ----- Superfícies sólidas ----- */
:root[data-transparency='solid'] {
  --ws-glass-opacity: 1;
  --ws-window-opacity: 100%;
}

/* ----- Transparência elevada ----- */
:root[data-transparency='high'] {
  --ws-glass-opacity: 0.72;
  --ws-window-opacity: 48%;
}

/* === Desfoque === */
/* ----- Intensidades padrão ----- */
:root {
  --blur-none: 0px;
  --blur-light: 6px;
  --blur-medium: 14px;
  --blur-strong: 20px;

  --blur-strength: var(--blur-medium);
  --ws-glass-saturation: 135%;
}

/* ----- Desfoque desligado ----- */
:root[data-blur='off'] {
  --blur-light: 0px;
  --blur-medium: 0px;
  --blur-strong: 0px;
  --ws-glass-saturation: 100%;
}

/* ----- Desfoque suave ----- */
:root[data-blur='soft'] {
  --blur-light: 4px;
  --blur-medium: 8px;
  --blur-strong: 12px;
}

/* ----- Desfoque normal ----- */
:root[data-blur='normal'] {
  --blur-light: 6px;
  --blur-medium: 14px;
  --blur-strong: 20px;
}

/* ----- Desfoque intenso ----- */
:root[data-blur='strong'] {
  --blur-light: 12px;
  --blur-medium: 32px;
  --blur-strong: 36px;
}

/* ----- Superfícies sólidas sem desfoque ----- */
:root[data-transparency='solid'] {
  --blur-light: 0px;
  --blur-medium: 0px;
  --blur-strong: 0px;
  --ws-glass-saturation: 100%;
}

/* === Sombras === */
/* ----- Elevação do tema Dark ----- */
:root {
  --shadow-taskbar: 0 10px 30px rgb(0 0 0 / 25%), inset 0 1px 0 rgb(255 255 255 / 5%);

  --shadow-window: 0 18px 55px rgb(0 0 0 / 25%);
  --shadow-panel: 0 16px 45px rgb(0 0 0 / 28%);
  --shadow-floating: 0 16px 45px rgb(0 0 0 / 28%);

  --window-shadow: 0 18px 55px rgb(0 0 0 / 25%), 0 0 0 1px rgb(255 255 255 / 4%);

  --window-shadow-active:
    0 24px 70px rgb(0 0 0 / 38%),
    0 0 0 1px color-mix(in srgb, var(--accent-secondary) 12%, transparent);

  --panel-shadow: 0 22px 60px rgb(0 0 0 / 36%), inset 0 1px 0 rgb(255 255 255 / 5%);
}

/* ----- Elevação do tema Light ----- */
:root[data-theme='light'] {
  --shadow-taskbar: 0 10px 30px rgb(25 45 70 / 14%), inset 0 1px 0 rgb(255 255 255 / 65%);

  --shadow-window: 0 18px 55px rgb(25 45 70 / 16%);
  --shadow-panel: 0 16px 45px rgb(25 45 70 / 14%);
  --shadow-floating: 0 16px 45px rgb(25 45 70 / 16%);

  --window-shadow: 0 18px 55px rgb(25 45 70 / 16%), 0 0 0 1px rgb(25 45 70 / 8%);

  --window-shadow-active:
    0 24px 70px rgb(25 45 70 / 22%),
    0 0 0 1px color-mix(in srgb, var(--accent-primary) 20%, transparent);

  --panel-shadow: 0 22px 60px rgb(25 45 70 / 14%), inset 0 1px 0 rgb(255 255 255 / 65%);
}

/* === Superfícies compartilhadas === */
/* ----- Tema Dark ----- */
:root {
  --taskbar-background: var(--ws-glass);
  --taskbar-border: rgb(255 255 255 / 9%);

  --panel-background: var(--ws-glass);
  --panel-border: rgb(148 185 215 / 16%);
}

/* ----- Tema Light ----- */
:root[data-theme='light'] {
  --taskbar-background: var(--ws-glass);
  --taskbar-border: rgb(25 45 70 / 12%);

  --panel-background: var(--ws-glass);
  --panel-border: rgb(25 45 70 / 12%);
}

/* === Movimento === */
/* ----- Intensidade padrão ----- */
:root {
  --motion-scale: 1;
}

/* ----- Animações suaves ----- */
:root[data-motion-intensity='subtle'] {
  --motion-scale: 0.5;
  --transition-fast: 60ms;
  --transition-normal: 100ms;
}

/* ----- Animações desativadas ----- */
:root[data-motion-intensity='off'] *,
:root[data-motion-intensity='off'] *::before,
:root[data-motion-intensity='off'] *::after {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}

/* === Acessibilidade === */
/* ----- Transparência reduzida e efeitos mínimos ----- */
:root[data-reduced-transparency='true'],
:root[data-low-effects='true'] {
  --ws-glass-opacity: 1;
  --ws-window-opacity: 100%;
  --ws-glass: var(--surface-primary);
  --ws-window-background: var(--surface-primary);

  --blur-light: 0px;
  --blur-medium: 0px;
  --blur-strong: 0px;
  --ws-glass-saturation: 100%;

  --taskbar-background: var(--surface-primary);
  --panel-background: var(--surface-primary);
}

/* ----- Movimento reduzido ----- */
:root[data-reduced-motion='true'] *,
:root[data-reduced-motion='true'] *::before,
:root[data-reduced-motion='true'] *::after,
:root[data-low-effects='true'] *,
:root[data-low-effects='true'] *::before,
:root[data-low-effects='true'] *::after {
  transition: none !important;
  animation: none !important;
  scroll-behavior: auto !important;
}

/* ----- Preferência de transparência do sistema ----- */
@media (prefers-reduced-transparency: reduce) {
  :root {
    --ws-glass-opacity: 1;
    --ws-window-opacity: 100%;
    --ws-glass: var(--surface-primary);
    --ws-window-background: var(--surface-primary);

    --blur-light: 0px;
    --blur-medium: 0px;
    --blur-strong: 0px;
    --ws-glass-saturation: 100%;

    --taskbar-background: var(--surface-primary);
    --panel-background: var(--surface-primary);
  }
}

/* ----- Preferência de movimento do sistema ----- */
@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-scale: 0;
    --transition-fast: 0ms;
    --transition-normal: 0ms;
  }
}
/* === MOVIMENTO DO SISTEMA === */
/* ----- Preferência do dispositivo também interrompe animações contínuas ----- */
@media (prefers-reduced-motion: reduce) {
  :root *,
  :root *::before,
  :root *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* === VISIBILIDADE DO WALLPAPER === */
/* ----- Opção explícita independente dos efeitos e das seleções ----- */
:root[data-wallpaper-hidden='true'] :is(.desktop__wallpaper, .ws-mobile__wallpaper) {
  visibility: hidden;
}
/* ----- Estrutura do sistema ----- */
/* Ordem explícita preserva a cascata durante a migração dos módulos. */
/* === Estrutura do Desktop === */
/* ----- Área principal ----- */
.desktop {
  position: relative;
  display: flex;
  width: 100%;
  height: 100dvh;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

/* ----- Wallpaper ----- */
.desktop__wallpaper {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;

  background:
    radial-gradient(ellipse at 75% 20%,
      color-mix(in srgb, var(--accent-primary) 15%, transparent),
      transparent 45%),
    radial-gradient(ellipse at 20% 85%,
      color-mix(in srgb, var(--accent-secondary) 8%, transparent),
      transparent 45%),
    var(--surface-canvas);
}

/* ----- Área de trabalho ----- */
.desktop__workspace {
  position: relative;
  display: block;
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 0;
}

/* === Grade do Desktop === */
/* ----- Área compartilhada de atalhos e widgets ----- */
.desktop__shortcuts {
  position: relative;
  width: calc(100% - 16px);
  height: calc(100% - 38px);
  min-width: 90px;
  min-height: 82px;
  margin: 22px 8px 16px;
}

/* ----- Interação com a grade ----- */
.desktop__shortcut,
.desktop__widget-drag {
  touch-action: none;
}

/* === Atalhos do Desktop === */
/* ----- Estrutura dos atalhos ----- */
.desktop__shortcut {
  display: flex;
  width: 82px;
  height: 82px;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  padding: 3px 4px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  cursor: default;
  user-select: none;

  transition:
    background-color calc(var(--motion-scale, 1) * 120ms) ease,
    border-color calc(var(--motion-scale, 1) * 120ms) ease,
    transform calc(var(--motion-scale, 1) * 120ms) ease;
}

/* ----- Hover dos atalhos ----- */
@media (hover: hover) {
  .desktop__shortcut:hover {
    border-color: color-mix(in srgb,
        var(--border-default) 60%,
        transparent);

    background: color-mix(in srgb,
        var(--surface-primary) 7%,
        transparent);
  }
}

/* ----- Atalho selecionado ----- */
.desktop__shortcut--selected {
  border-color: var(--border-default);
  background: color-mix(in srgb,
      var(--accent-secondary) 12%,
      transparent);
}

/* ----- Atalho pressionado ----- */
.desktop__shortcut:active {
  transform: scale(0.97);
}

/* ----- Foco por teclado ----- */
.desktop__shortcut:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* === Ícones do Desktop === */
/* ----- Superfície dos ícones ----- */
.desktop__shortcut-icon {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  place-items: center;

  border: 1px solid var(--border-default);
  border-radius: 13px;
  background: var(--ws-glass);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgb(0 0 0 / 18%);

  -webkit-backdrop-filter:
    blur(var(--blur-light)) saturate(var(--ws-glass-saturation));
  backdrop-filter:
    blur(var(--blur-light)) saturate(var(--ws-glass-saturation));

  transition:
    background calc(var(--motion-scale, 1) * 120ms) ease,
    border-color calc(var(--motion-scale, 1) * 120ms) ease,
    box-shadow calc(var(--motion-scale, 1) * 120ms) ease,
    transform calc(var(--motion-scale, 1) * 120ms) ease;
}

/* ----- Hover dos ícones ----- */
@media (hover: hover) {
  .desktop__shortcut:hover .desktop__shortcut-icon {
    border-color: var(--accent-primary);
    transform: translateY(-1px);
  }
}

/* ----- Indicador de aplicativo aberto ----- */
.desktop__shortcut-indicator {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--surface-primary);
  border-radius: 50%;
  background: var(--accent-secondary);
  pointer-events: none;
}

/* ----- Aplicativo aberto sem foco ----- */
.desktop__shortcut-indicator[data-active='false'] {
  background: #8b929e;
}

/* ----- Aplicativo em foco ----- */
.desktop__shortcut-indicator[data-active='true'] {
  background: var(--accent-secondary);
}

/* ----- Nome do aplicativo ----- */
.desktop__shortcut-label {
  display: flex;
  width: 100%;
  height: 26px;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  overflow: hidden;

  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  box-shadow: none;
  font-size: 11px;
  font-weight: 500;
  line-height: 13px;
  text-align: center;
  text-shadow: 0 1px 4px rgb(0 0 0 / 65%);
  white-space: normal;
  overflow-wrap: normal;
}

/* === Organização da grade === */
/* ----- Área válida para soltura ----- */
.desktop__shortcut[data-drop-valid] {
  z-index: 2;
}

/* ----- Posição válida ----- */
.desktop__shortcut[data-drop-valid='true'],
.desktop__widget[data-drop-valid='true'] {
  outline: 2px solid var(--accent-secondary);
}

/* ----- Posição inválida ----- */
.desktop__shortcut[data-drop-valid='false'] {
  outline: 2px solid var(--text-primary);
  opacity: 0.5;
}

/* ----- Widget em posição inválida ----- */
.desktop__widget[data-drop-valid='false'] {
  opacity: 0.5;
}

/* ----- Seleção múltipla ----- */
.desktop__selection-box {
  position: absolute;
  z-index: 3;
  border: 1px solid var(--accent-secondary);
  background: color-mix(in srgb,
      var(--accent-secondary) 12%,
      transparent);
  pointer-events: none;
}

/* ----- Avisos de organização ----- */
.desktop__layout-notice {
  margin: 8px 20px 0;
  color: var(--text-secondary);
  font-size: 12px;
}

/* === Camada de janelas === */
/* ----- Posicionamento e encaixe ----- */
.desktop__window-layer {
  position: absolute;
  z-index: 10;
  inset: 0;
  --window-gap: 8px;
  pointer-events: none;
}

/* === Menu contextual === */
/* ----- Estrutura básica ----- */
.desktop__context {
  position: absolute;
  z-index: 20;
  display: flex;
  width: 210px;
  flex-direction: column;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-primary);
  color: var(--text-primary);
  box-shadow: 0 12px 30px rgb(0 0 0 / 25%);
}

/* ----- Títulos do menu ----- */
.desktop__context strong {
  padding: 7px 9px;
  font-size: 12px;
}

/* ----- Ações básicas ----- */
.desktop__context button {
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}

/* ----- Hover das ações ----- */
@media (hover: hover) {
  .desktop__context button:hover:not(:disabled) {
    background: var(--surface-secondary);
  }
}

/* ----- Ações desabilitadas ----- */
.desktop__context button:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ----- Divisores ----- */
.desktop__context-divider {
  height: 1px;
  margin: 4px 0;
  background: var(--border-default);
}

/* ----- Informações contextuais ----- */
.desktop__context-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 9px;
  border-top: 1px solid var(--border-default);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

/* === Menu contextual moderno === */
/* ----- Superfície principal ----- */
.desktop__context--modern {
  width: 248px;
  max-width: calc(100% - 16px);
  max-height: calc(100% - 16px);
  gap: 3px;
  padding: 7px;
  overflow-y: auto;
  border-radius: 13px;
  background: var(--ws-glass);

  -webkit-backdrop-filter: blur(var(--blur-medium));
  backdrop-filter: blur(var(--blur-medium));

  box-shadow:
    0 16px 40px rgb(0 0 0 / 24%),
    0 2px 8px rgb(0 0 0 / 12%);
}

/* ----- Cabeçalho do menu ----- */
.desktop__context--modern .desktop__context-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: var(--text-primary);
}

/* ----- Título do cabeçalho ----- */
.desktop__context--modern .desktop__context-header strong {
  padding: 0;
  font-size: 12px;
  font-weight: 650;
}

/* ----- Ações modernas ----- */
.desktop__context--modern button {
  display: flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  text-align: left;
  cursor: pointer;

  transition:
    background-color calc(var(--motion-scale, 1) * 120ms) ease,
    color calc(var(--motion-scale, 1) * 120ms) ease;
}

/* ----- Hover das ações modernas ----- */
@media (hover: hover) {
  .desktop__context--modern button:hover {
    background: var(--surface-secondary);
    color: var(--accent-secondary);
  }
}

/* ----- Foco por teclado ----- */
.desktop__context--modern button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

/* ----- Ações selecionadas ----- */
.desktop__context--modern button[aria-pressed='true'] {
  color: var(--accent-secondary);
}

/* ----- Indicador de ação selecionada ----- */
.desktop__context--modern button[aria-pressed='true']>svg:last-child {
  margin-left: auto;
}

/* ----- Conteúdo dos botões ----- */
.desktop__context--modern button>span {
  flex: 1;
  min-width: 0;
}

/* ----- Indicador de submenu ----- */
.desktop__context--modern .desktop__context-arrow {
  margin-left: auto;
  color: var(--text-secondary);
}

/* ----- Ação de retorno ----- */
.desktop__context--modern .desktop__context-back {
  font-weight: 600;
}

/* ----- Divisores modernos ----- */
.desktop__context--modern .desktop__context-divider {
  margin: 5px 4px;
  opacity: 0.65;
}

/* ----- Informações modernas ----- */
.desktop__context--modern .desktop__context-info {
  margin: 2px 4px 5px;
  padding: 10px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-secondary);
}

/* === Acessibilidade === */
/* ----- Conteúdo exclusivo para leitores de tela ----- */
.desktop__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ----- Transparência desabilitada ----- */
:root:is([data-blur='off'],
  [data-transparency='solid'],
  [data-reduced-transparency='true'],
  [data-low-effects='true']) .desktop__shortcut-icon,
:root:is([data-blur='off'],
  [data-transparency='solid'],
  [data-reduced-transparency='true'],
  [data-low-effects='true']) .desktop__context--modern {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

/* ----- Preferência do sistema por menos transparência ----- */
@media (prefers-reduced-transparency: reduce) {

  .desktop__shortcut-icon,
  .desktop__context--modern {
    background: var(--surface-primary);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

/* ----- Preferência do sistema por menos movimento ----- */
@media (prefers-reduced-motion: reduce) {

  .desktop__shortcut,
  .desktop__shortcut-icon,
  .desktop__context--modern button {
    transition: none;
  }
}

/* === Responsividade === */
/* ----- Área de atalhos em telas menores ----- */
@media (max-width: 720px) {
  .desktop__shortcuts {
    width: calc(100% - 28px);
    margin: 22px 14px 16px;
  }
}

/* ----- Área de atalhos em telas estreitas ----- */
@media (max-width: 480px) {
  .desktop__shortcuts {
    width: calc(100% - 20px);
    margin-inline: 10px;
  }
}
/* === PRÉVIA DE ENCAIXE === */
/* ----- INDICADOR DE POSICIONAMENTO ----- */
.desktop-snap-preview {
  z-index: 9999 !important;
  border: 1px solid var(--accent-secondary) !important;
  border-radius: var(--radius-lg) !important;
  background: color-mix(in srgb, var(--accent-primary) 16%, transparent) !important;
  box-shadow: inset 0 0 24px color-mix(in srgb, var(--accent-primary) 8%, transparent) !important;
  pointer-events: none !important;
  user-select: none;
}

/* === ESTRUTURA DAS JANELAS === */
/* ----- JANELA PRINCIPAL ----- */
.desktop-window {
  --initial-width: min(780px, calc(100% - 40px));

  position: absolute;
  top: max(16px, calc(9% + var(--window-offset, 0) * 24px));
  left: max(16px, calc((100% - var(--initial-width)) / 2 + var(--window-offset, 0) * 24px));

  display: flex;
  width: var(--initial-width);
  height: min(620px, calc(100% - 96px));
  min-height: 0;
  flex-direction: column;

  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--window-shadow);
  pointer-events: auto;
}

/* ----- JANELA ATIVA ----- */
.desktop-window--active {
  box-shadow: var(--window-shadow-active);
}

/* === DIMENSÕES INICIAIS === */
/* ----- APLICATIVOS DE MAIOR DIMENSÃO ----- */
.desktop-window:is(
  [data-app-id='files'],
  [data-app-id='settings'],
  [data-app-id='administration']
) {
  --initial-width: min(1020px, calc(100% - 40px));
  width: var(--initial-width);
  height: min(700px, calc(100% - 96px));
}

/* ----- PROJETOS E NOTAS ----- */
.desktop-window:is([data-app-id='projects'], [data-app-id='notes']) {
  --initial-width: min(900px, calc(100% - 40px));
}

/* ----- DEV INSIGHTS ----- */
.desktop-window[data-app-id='dev-insights'] {
  --initial-width: min(1100px, calc(100% - 40px));
  width: var(--initial-width);
  height: min(760px, calc(100% - 64px));
  top: max(16px, calc((100% - min(760px, calc(100% - 64px))) / 2));
  left: max(16px, calc((100% - var(--initial-width)) / 2));
}

/* ----- CALCULADORA ----- */
.desktop-window[data-app-id='calculator'] {
  --initial-width: min(430px, calc(100% - 40px));
  height: min(690px, calc(100% - 96px));
}

/* ----- TERMINAL ----- */
.desktop-window[data-app-id='terminal'] {
  height: min(530px, calc(100% - 96px));
}

/* === ORGANIZAÇÃO DAS JANELAS === */
/* ----- BORDAS DOS LAYOUTS ENCAIXADOS ----- */
.desktop-window--maximized,
.desktop-window--left,
.desktop-window--right,
.desktop-window--top-left,
.desktop-window--top-right,
.desktop-window--bottom-left,
.desktop-window--bottom-right {
  border-radius: var(--radius-lg);
}

/* ----- MAXIMIZADA ----- */
.desktop-window--maximized {
  top: var(--window-gap) !important;
  left: var(--window-gap) !important;
  width: calc(100% - 2 * var(--window-gap)) !important;
  height: calc(100% - 2 * var(--window-gap)) !important;
}

/* ----- METADE ESQUERDA ----- */
.desktop-window--left {
  top: var(--window-gap) !important;
  left: var(--window-gap) !important;
  width: calc(50% - 1.5 * var(--window-gap)) !important;
  height: calc(100% - 2 * var(--window-gap)) !important;
}

/* ----- METADE DIREITA ----- */
.desktop-window--right {
  top: var(--window-gap) !important;
  left: calc(50% + 0.5 * var(--window-gap)) !important;
  width: calc(50% - 1.5 * var(--window-gap)) !important;
  height: calc(100% - 2 * var(--window-gap)) !important;
}

/* ----- QUADRANTE SUPERIOR ESQUERDO ----- */
.desktop-window--top-left {
  top: var(--window-gap) !important;
  left: var(--window-gap) !important;
  width: calc(50% - 1.5 * var(--window-gap)) !important;
  height: calc(50% - 1.5 * var(--window-gap)) !important;
}

/* ----- QUADRANTE SUPERIOR DIREITO ----- */
.desktop-window--top-right {
  top: var(--window-gap) !important;
  left: calc(50% + 0.5 * var(--window-gap)) !important;
  width: calc(50% - 1.5 * var(--window-gap)) !important;
  height: calc(50% - 1.5 * var(--window-gap)) !important;
}

/* ----- QUADRANTE INFERIOR ESQUERDO ----- */
.desktop-window--bottom-left {
  top: calc(50% + 0.5 * var(--window-gap)) !important;
  left: var(--window-gap) !important;
  width: calc(50% - 1.5 * var(--window-gap)) !important;
  height: calc(50% - 1.5 * var(--window-gap)) !important;
}

/* ----- QUADRANTE INFERIOR DIREITO ----- */
.desktop-window--bottom-right {
  top: calc(50% + 0.5 * var(--window-gap)) !important;
  left: calc(50% + 0.5 * var(--window-gap)) !important;
  width: calc(50% - 1.5 * var(--window-gap)) !important;
  height: calc(50% - 1.5 * var(--window-gap)) !important;
}

/* === CABEÇALHO === */
/* ----- ESTRUTURA PRINCIPAL ----- */
.desktop-window__header {
  display: flex;
  height: 48px;
  min-height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  user-select: none;
}

/* ----- INDICADOR DE FOCO ----- */
.desktop-window__focus {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-secondary);
  opacity: 0.45;
}

/* ----- INDICADOR DA JANELA ATIVA ----- */
.desktop-window__focus[data-active='true'] {
  background: var(--accent-secondary);
  box-shadow: 0 0 10px color-mix(in srgb, var(--accent-secondary) 35%, transparent);
  opacity: 1;
}

/* ----- TÍTULO DA JANELA ----- */
.desktop-window__title {
  max-width: 160px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* === MOVIMENTAÇÃO === */
/* ----- ÁREA DE ARRASTE ----- */
.desktop-window__drag-area {
  height: 100%;
  min-width: 20px;
  flex: 1;
  cursor: grab;
  touch-action: none;
}

/* ----- ARRASTE ATIVO ----- */
.desktop-window[data-interacting='true'] .desktop-window__drag-area {
  cursor: grabbing;
}

/* === CONTROLES DA JANELA === */
/* ----- AGRUPAMENTO ----- */
.desktop-window__controls {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 2px;
}

/* ----- BOTÃO PADRÃO ----- */
.desktop-window__control {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgb(0 0 0 / 65%);
  cursor: pointer;
}

/* ----- INDICADOR CIRCULAR ----- */
.desktop-window__control::before {
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--control-color);
  content: '';
}

/* ----- FOCO POR TECLADO ----- */
.desktop-window__control:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

/* ----- ÍCONES DOS CONTROLES ----- */
.desktop-window__control svg {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  fill: none;
  stroke: #27313a;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity calc(var(--motion-scale, 1) * 120ms) ease;
}

/* ----- EXIBIÇÃO DOS ÍCONES ----- */
.desktop-window__controls:hover .desktop-window__control svg,
.desktop-window__control:focus-visible svg {
  opacity: 1;
}

/* ----- MINIMIZAR ----- */
.desktop-window__control--minimize {
  --control-color: #f5bf4f;
}

/* ----- MAXIMIZAR ----- */
.desktop-window__control--maximize {
  --control-color: #52c46a;
}

/* ----- FECHAR ----- */
.desktop-window__control--close {
  --control-color: #ee6464;
}

/* === CONTEÚDO DAS JANELAS === */
/* ----- ÁREA PRINCIPAL ----- */
.desktop-window__content {
  min-height: 0;
  flex: 1;
  padding: 24px;
  overflow: auto;
}

/* ----- TÍTULOS PRINCIPAIS ----- */
.desktop-window__content h2 {
  margin: 0 0 12px;
  font-size: 20px;
}

/* ----- TEXTOS SECUNDÁRIOS ----- */
.desktop-window__content p,
.desktop-window__content small {
  color: var(--text-secondary);
}

/* === REDIMENSIONAMENTO === */
/* ----- REGIÕES INTERATIVAS ----- */
.desktop-window__resize {
  position: absolute;
  z-index: 2;
  touch-action: none;
}

/* ----- FOCO POR TECLADO ----- */
.desktop-window__resize:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
  background: color-mix(in srgb, var(--accent-secondary) 12%, transparent);
}

/* ----- BORDA SUPERIOR ----- */
.desktop-window__resize--n {
  top: 0;
  right: 10px;
  left: 10px;
  height: 6px;
  cursor: ns-resize;
}

/* ----- BORDA INFERIOR ----- */
.desktop-window__resize--s {
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 6px;
  cursor: ns-resize;
}

/* ----- BORDA DIREITA ----- */
.desktop-window__resize--e {
  top: 10px;
  right: 0;
  bottom: 10px;
  width: 6px;
  cursor: ew-resize;
}

/* ----- BORDA ESQUERDA ----- */
.desktop-window__resize--w {
  top: 10px;
  bottom: 10px;
  left: 0;
  width: 6px;
  cursor: ew-resize;
}

/* ----- DIMENSÕES DOS CANTOS ----- */
.desktop-window__resize--ne,
.desktop-window__resize--nw,
.desktop-window__resize--se,
.desktop-window__resize--sw {
  width: 12px;
  height: 12px;
}

/* ----- CANTO SUPERIOR DIREITO ----- */
.desktop-window__resize--ne {
  top: 0;
  right: 0;
  cursor: nesw-resize;
}

/* ----- CANTO SUPERIOR ESQUERDO ----- */
.desktop-window__resize--nw {
  top: 0;
  left: 0;
  cursor: nwse-resize;
}

/* ----- CANTO INFERIOR DIREITO ----- */
.desktop-window__resize--se {
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
}

/* ----- CANTO INFERIOR ESQUERDO ----- */
.desktop-window__resize--sw {
  bottom: 0;
  left: 0;
  cursor: nesw-resize;
}

/* === PRÉVIA DA TASKBAR === */
/* ----- JANELA EM DESTAQUE ----- */
.desktop-window[data-taskbar-preview='true'] {
  z-index: 9998 !important;
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
  box-shadow:
    0 24px 70px rgb(0 0 0 / 42%),
    0 0 0 4px color-mix(in srgb, var(--accent-secondary) 14%, transparent),
    0 0 28px color-mix(in srgb, var(--accent-secondary) 12%, transparent);
}

/* === RESPONSIVIDADE === */
/* ----- TÍTULOS EM TELAS COMPACTAS ----- */
@media (max-width: 720px) {
  .desktop-window__title {
    max-width: 100px;
  }
}

/* === ACESSIBILIDADE === */
/* ----- MOVIMENTO REDUZIDO ----- */
@media (prefers-reduced-motion: reduce) {
  .desktop-window__control svg {
    transition: none;
  }
}
/* === CICLO VISUAL DAS JANELAS === */
/* ----- ANIMAR SOMENTE OPACIDADE E TRANSFORMAÇÃO, SEM INTERPOLAR GEOMETRIA ----- */
.desktop-window[data-window-motion='opening'],
.desktop-window[data-window-motion='restoring'] {
  animation: ws-window-enter var(--window-motion-duration, 180ms) ease-out both;
}

.desktop-window[data-window-motion='minimizing'],
.desktop-window[data-window-motion='closing'] {
  animation: ws-window-exit var(--window-motion-duration, 180ms) ease-in both;
  pointer-events: none;
}

.desktop-window[data-interacting] {
  animation: none;
}

@keyframes ws-window-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes ws-window-exit {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
}

/* ----- MOVIMENTO REDUZIDO NÃO ADIA O FECHAMENTO NEM OCULTA DADOS ----- */
@media (prefers-reduced-motion: reduce) {
  .desktop-window[data-window-motion] {
    animation: none;
  }
}
/* ==========================================================================
   WS OS — TASKBAR
   Barra flutuante, compacta e integrada ao sistema de temas
   ========================================================================== */
/* === 01. CONTAINER === */
/* ----- Posicionamento centralizado no Desktop ----- */
.taskbar-container {
  position: absolute;
  z-index: 5;
  bottom: 16px;
  left: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: min(850px, calc(100% - 32px));
  min-width: 0;
  transform: translateX(-50%);
}

/* === 02. ESTRUTURA DA BARRA === */
/* ----- Superfície flutuante com dimensões controladas ----- */
.taskbar {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  height: 54px;
  min-height: 54px;
  max-height: 54px;
  padding: 5px 9px;
  box-sizing: border-box;
  border: 1px solid var(--taskbar-border);
  border-radius: 16px;
  background: var(--taskbar-background);
  box-shadow:
    var(--shadow-taskbar),
    inset 0 1px 0 color-mix(in srgb,
      var(--text-primary) 5%,
      transparent);
  backdrop-filter: blur(var(--blur-medium));
  -webkit-backdrop-filter: blur(var(--blur-medium));
  transform: none;
}

/* === 03. SEÇÕES E SEPARADORES === */
/* ----- Todos os grupos permanecem na mesma linha ----- */
.taskbar__section {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 3px;
  height: 40px;
  min-width: 0;
}

.taskbar__section--start,
.taskbar__section--system,
.taskbar__section--status {
  flex-shrink: 0;
}

.taskbar__divider {
  display: block;
  width: 1px;
  height: 23px;
  flex: 0 0 1px;
  margin: 0 3px;
  background: color-mix(in srgb,
      var(--text-secondary) 23%,
      transparent);
}

/* === 04. BOTÕES DE SISTEMA === */
/* ----- WS Menu, notificações, controles e Wally ----- */
.taskbar__system-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-secondary);
  transition:
    background-color calc(var(--motion-scale, 1) * 150ms) ease,
    color calc(var(--motion-scale, 1) * 150ms) ease,
    border-color calc(var(--motion-scale, 1) * 150ms) ease,
    transform calc(var(--motion-scale, 1) * 150ms) ease;
}

.taskbar__system-button:not(:disabled) {
  cursor: pointer;
}

.taskbar__system-button:not(:disabled):hover,
.taskbar__system-button[aria-expanded='true'] {
  background: color-mix(in srgb,
      var(--accent-secondary) 10%,
      var(--surface-secondary));
  color: var(--accent-secondary);
  border-color: color-mix(in srgb,
      var(--accent-secondary) 14%,
      transparent);
}

.taskbar__system-button[aria-expanded='true'] {
  border-color: color-mix(in srgb,
      var(--accent-secondary) 18%,
      transparent);
}

.taskbar__system-button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

.taskbar__system-button:disabled {
  cursor: default;
  opacity: 0.5;
}

/* === 05. WS MENU === */
/* ----- Logo oficial dinâmico por tema e cor ----- */
.taskbar__menu-button {
  color: var(--accent-secondary);
}

.taskbar__menu-logo {
  display: block;
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

/* === 06. NAVEGAÇÃO DE APLICATIVOS === */
/* ----- Grupo de janelas abertas ----- */
.taskbar__apps-navigation {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 0 1 auto;
  gap: 3px;
  min-width: 0;
  height: 40px;
}

.taskbar__apps {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex: 0 1 auto;
  gap: 4px;
  min-width: 0;
  height: 40px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  scroll-behavior: smooth;
}

.taskbar__apps::-webkit-scrollbar {
  display: none;
}

/* === 07. BOTÕES DOS APLICATIVOS === */
/* ----- Estados normal, hover, ativo e minimizado ----- */
.taskbar__app {
  position: relative;
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: 0 0 39px;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  transition:
    background-color calc(var(--motion-scale, 1) * 150ms) ease,
    opacity calc(var(--motion-scale, 1) * 150ms) ease,
    border-color calc(var(--motion-scale, 1) * 150ms) ease;
}

.taskbar__app:hover {
  background: var(--surface-secondary);
}

.taskbar__app--active {
  background: color-mix(in srgb,
      var(--accent-secondary) 12%,
      var(--surface-secondary));
  border-color: color-mix(in srgb,
      var(--accent-secondary) 12%,
      transparent);
}

.taskbar__app--active:hover {
  background: color-mix(in srgb,
      var(--accent-secondary) 18%,
      var(--surface-secondary));
}

.taskbar__app:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

.taskbar__app-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  font-size: 14px;
  font-weight: 800;
}

/* ----- Indicador de janela aberta ----- */
.taskbar__app-indicator {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 5px;
  height: 3px;
  border-radius: 999px;
  background: var(--text-secondary);
  opacity: 0.6;
  transform: translateX(-50%);
  transition:
    width calc(var(--motion-scale, 1) * 150ms) ease,
    background-color calc(var(--motion-scale, 1) * 150ms) ease,
    opacity calc(var(--motion-scale, 1) * 150ms) ease;
}

.taskbar__app--active .taskbar__app-indicator {
  width: 17px;
  background: var(--accent-secondary);
  opacity: 1;
}

.taskbar__app--minimized {
  opacity: 0.65;
}

.taskbar__app--minimized.taskbar__app--active {
  opacity: 1;
}

/* === 08. NAVEGAÇÃO HORIZONTAL === */
/* ----- Setas quando existem muitos aplicativos ----- */
.taskbar__scroll-button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 36px;
  flex: 0 0 24px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.taskbar__scroll-button:hover:not(:disabled) {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.taskbar__scroll-button:disabled {
  cursor: default;
  opacity: 0.3;
}

.taskbar__scroll-button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

/* === 09. CLIMA E RELÓGIO === */
/* ----- Grupo horizontal, sem empilhamento acidental ----- */
.taskbar__weather-group {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  height: 40px;
  min-height: 0;
  min-width: 0;
  white-space: nowrap;
}

/* ----- Botão de previsão do tempo ----- */
/* ----- Ícone e temperatura compartilham uma área clicável ----- */
.taskbar__weather {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  gap: 7px;
  width: auto;
  min-width: 68px;
  height: 40px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition:
    background-color calc(var(--motion-scale, 1) * 150ms) ease,
    color calc(var(--motion-scale, 1) * 150ms) ease;
}

.taskbar__weather:hover,
.taskbar__weather[aria-expanded='true'] {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.taskbar__weather:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

.taskbar__temperature {
  display: inline-flex;
  align-items: center;
  height: auto;
  min-width: 0;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transform: translateY(2px);
}

/* ----- Botão do calendário e horário ----- */
button.taskbar__clock {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 65px;
  height: 40px;
  margin: 0;
  padding: 2px 7px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  transition:
    background-color calc(var(--motion-scale, 1) * 150ms) ease;
}

button.taskbar__clock:hover,
button.taskbar__clock[aria-expanded='true'] {
  background: var(--surface-secondary);
}

button.taskbar__clock:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* ----- Data e hora em duas linhas compactas ----- */
.taskbar__datetime {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  white-space: nowrap;
}

.taskbar__datetime time {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.1px;
}

.taskbar__date {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 400;
  text-transform: capitalize;
}

/* === 10. RESPONSIVIDADE === */
/* ----- Limites de largura sem quebrar o alinhamento ----- */
@media (max-width: 900px) {
  .taskbar-container {
    max-width: calc(100% - 24px);
  }

  .taskbar {
    gap: 4px;
    padding-inline: 7px;
  }

  .taskbar__divider {
    margin-inline: 1px;
  }

  .taskbar__section {
    gap: 1px;
  }
}

@media (max-width: 720px) {
  .taskbar-container {
    bottom: 10px;
    max-width: calc(100% - 20px);
  }

  .taskbar {
    max-width: 100%;
    gap: 3px;
    padding-inline: 6px;
  }

  .taskbar__apps {
    max-width: 120px;
  }

  .taskbar__system-button {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .taskbar__app {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .taskbar__weather-group {
    gap: 2px;
  }

  button.taskbar__clock {
    min-width: 55px;
    padding-inline: 4px;
  }
}

@media (max-width: 480px) {
  .taskbar__datetime {
    min-width: 0;
  }

  .taskbar__date {
    font-size: 9px;
  }
}

/* === 11. ACESSIBILIDADE === */
/* ----- Respeitar preferências de movimento reduzido ----- */
@media (prefers-reduced-motion: reduce) {

  .taskbar__app,
  .taskbar__app-indicator,
  .taskbar__system-button,
  .taskbar__weather,
  button.taskbar__clock {
    transition: none;
  }

  .taskbar__apps {
    scroll-behavior: auto;
  }
}

:root[data-reduced-motion='true'] .taskbar__app,
:root[data-reduced-motion='true'] .taskbar__app-indicator,
:root[data-reduced-motion='true'] .taskbar__system-button,
:root[data-reduced-motion='true'] .taskbar__weather,
:root[data-reduced-motion='true'] button.taskbar__clock {
  transition: none;
}

/* === Menu de contexto da Taskbar === */
/* ----- Superfície consistente com os menus dos aplicativos ----- */
.taskbar-context--system {
  min-width: 235px;
}

.taskbar-context--system .taskbar-context__actions button[aria-pressed='true'] {
  color: var(--accent-secondary);
}

/* === 12. ÍCONES DOS PAINÉIS === */
/* ----- Alinhamento dos botões do sistema ----- */
.taskbar__system-button--notifications,
.taskbar__system-button--controls,
.taskbar__system-button--wally {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  padding: 0;
}

/* ----- Dimensões dos ícones ----- */
.taskbar__system-button--notifications svg,
.taskbar__system-button--controls svg {
  display: block;
  width: 21px;
  height: 21px;
  flex-shrink: 0;
}

/* ----- Cores dos controles ----- */
.taskbar__system-button--notifications,
.taskbar__system-button--controls {
  color: var(--text-primary);
}

/* ----- Avatar do Wally ----- */
.taskbar__wally-avatar {
  display: block;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transform: translateY(-2px);
}

/* ----- Estado do Wally ----- */
.taskbar__system-button--wally {
  color: var(--accent-secondary);
}

/* ----- Interação com Wally ----- */
.taskbar__system-button--wally:not(:disabled):hover,
.taskbar__system-button--wally[aria-expanded='true'] {
  background: var(--surface-secondary);
}

/* === 13. INDICADOR DE NOTIFICAÇÕES === */
/* ----- Centralização do sino ----- */
.taskbar-notifications__trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin: 0;
  padding: 0;
  line-height: 1;
}

/* ----- Ícone do sino ----- */
.taskbar-notifications__trigger>svg {
  display: block;
  width: 21px;
  height: 21px;
}

/* ----- Ponto vermelho de notificação não lida ----- */
.taskbar-notifications__dot {
  position: absolute;
  top: 0;
  right: 0;
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--taskbar-background);
  border-radius: 50%;
  background: #ef4444;
  pointer-events: none;
}
.taskbar-floating-layer {
  position: fixed;
  z-index: 10000;
  bottom: 80px;
  left: 50%;
  display: flex;
  width: max-content;
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 96px);
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  pointer-events: none;
}

.taskbar-floating-layer > * {
  max-width: 100%;
  max-height: inherit;
  pointer-events: auto;
}

@media (max-width: 720px) {
  .taskbar-floating-layer {
    bottom: 74px;
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 90px);
  }
}

.taskbar-preview {
  width: max-content;
  max-width: min(640px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-primary);
  box-shadow: 0 16px 45px rgb(0 0 0 / 30%);
}

.taskbar-preview__list {
  display: flex;
  gap: 8px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: thin;
}

.taskbar-preview__item {
  position: relative;
  display: flex;
  width: 155px;
  min-width: 155px;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
  text-align: left;
}

.taskbar-preview__item:hover,
.taskbar-preview__item:focus-visible {
  border-color: var(--border-default);
  background: var(--surface-secondary);
}

.taskbar-preview__item strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taskbar-preview__placeholder {
  position: relative;
  display: grid;
  width: 100%;
  height: 86px;
  place-items: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent-secondary) 16%, transparent);
  border-radius: 9px;
  background:
    radial-gradient(
      circle at 50% 45%,
      color-mix(in srgb, var(--accent-secondary) 18%, transparent),
      transparent 65%
    ),
    linear-gradient(135deg, rgb(35 65 96 / 90%), rgb(16 27 43 / 96%));
}

.taskbar-preview__placeholder-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 14px;
  background: rgb(255 255 255 / 7%);
  color: var(--accent-secondary);
  box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
  font-size: 23px;
  font-weight: 800;
}

.taskbar-preview__item small {
  color: var(--text-secondary);
  font-size: 11px;
}

.taskbar-preview {
  position: relative;
  z-index: 1;
}

.taskbar-preview__header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.taskbar-preview__header strong {
  min-width: 0;
  flex: 1;
}

.taskbar-preview__close {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.taskbar-preview__close:hover,
.taskbar-preview__close:focus-visible {
  background: rgb(238 100 100 / 16%);
  color: #ee6464;
}

.taskbar-preview__open {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
}

.taskbar-preview__open:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
  border-radius: 6px;
}

.taskbar-preview__item:hover,
.taskbar-preview__item:focus-within {
  border-color: var(--border-default);
  background: var(--surface-secondary);
}

@media (max-width: 480px) {
  .taskbar-preview {
    max-width: calc(100vw - 20px);
  }
}

@media (max-width: 480px) {
  .taskbar-preview__item {
    width: 150px;
    min-width: 150px;
  }
}

/* === Miniatura estática da instância, descartada ao fechar a prévia === */
.taskbar-preview__snapshot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--surface-primary);
}
.taskbar-context {
  position: relative;
  z-index: 1;
}

.taskbar-context {
  width: min(260px, calc(100vw - 32px));
  padding: 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-primary);
  box-shadow: 0 16px 45px rgb(0 0 0 / 28%);
}

.taskbar-context__title {
  display: block;
  padding: 8px 10px 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.taskbar-context__actions {
  display: grid;
  gap: 3px;
}

.taskbar-context__actions button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-size: 12px;
  text-align: left;
}

.taskbar-context__actions button:hover:not(:disabled),
.taskbar-context__actions button:focus-visible {
  background: var(--surface-secondary);
}

.taskbar-context__actions button:disabled {
  cursor: default;
  opacity: 0.4;
}

.taskbar-context__divider {
  height: 1px;
  margin: 5px 0;
  background: var(--border-default);
}

.taskbar-context__actions .taskbar-context__danger {
  color: #f28b8b;
}

.taskbar-context__actions button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

/* === SUPERFÍCIE === */
.taskbar-launcher {
  position: relative;
  z-index: 1;
}

.taskbar-launcher--redesign.ws-menu {
  display: flex;
  flex-direction: column;
  isolation: isolate;
  width: min(540px, calc(100vw - 24px));
  height: min(480px, calc(100dvh - 100px));
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
}

/* === CABEÇALHO E BUSCA === */
.ws-menu__top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 14px 17px;
  border-bottom: 1px solid var(--border-default);
}

.ws-menu__search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  height: 39px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--border-control, var(--border-default));
  border-radius: 10px;
  background: var(--surface-primary);
  color: var(--text-secondary);
  transition: border-color calc(var(--motion-scale, 1) * 140ms) ease, box-shadow calc(var(--motion-scale, 1) * 140ms) ease;
}

.ws-menu__search:focus-within {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-secondary) 10%, transparent);
}

.ws-menu__search>svg {
  flex-shrink: 0;
}

.ws-menu__search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
}

.ws-menu__search input::placeholder {
  color: var(--text-secondary);
}

.ws-menu__search input::-webkit-search-cancel-button {
  display: none;
}

.ws-menu__clear {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.ws-menu__clear:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

.ws-menu__top-brand {
  flex: 0 0 auto;
  color: var(--accent-secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

/* === NAVEGAÇÃO LATERAL === */
.ws-menu__workspace {
  display: grid;
  grid-template-columns: 133px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.ws-menu__sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 19px 9px 15px;
  border-right: 1px solid var(--border-default);
  border-radius: 0 0 0 8px;
  background: transparent;
}

.ws-menu__sidebar-label,
.ws-menu__sidebar-caption {
  display: block;
  padding: 0 10px;
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ws-menu__sidebar-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 13px;
}

.ws-menu__nav-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 39px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ws-menu__nav-button>svg {
  flex-shrink: 0;
}

.ws-menu__nav-button:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--surface-primary);
}

.ws-menu__nav-button.is-active {
  color: var(--accent-secondary);
  background: var(--surface-primary);
  border-color: var(--border-default);
}

.ws-menu__nav-button:disabled {
  opacity: .45;
  cursor: default;
}

.ws-menu__sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-default);
}

.ws-menu__favorite-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.ws-menu__favorite-count svg {
  color: var(--accent-secondary);
}

/* === CONTEÚDO E ROLAGEM === */
.ws-menu__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 18px 14px 12px 16px;
}

.ws-menu__content-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 3px 15px;
}

.ws-menu__content-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ws-menu__eyebrow {
  color: var(--accent-secondary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ws-menu__content-title h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.ws-menu__result-count {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.ws-menu__results-scroll {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 2px 4px 6px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

.ws-menu__results-scroll::-webkit-scrollbar {
  width: 5px;
}

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

.ws-menu__results-scroll::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--border-default);
}

.ws-menu__apps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 0;
}

.ws-menu__app-item {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
}

.ws-menu__app {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 54px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background-color calc(var(--motion-scale, 1) * 140ms) ease, border-color calc(var(--motion-scale, 1) * 140ms) ease;
}

.ws-menu__app:hover,
.ws-menu__app:focus-visible {
  border-color: var(--border-default);
  background: var(--surface-secondary);
}

.ws-menu__app-icon {
  display: grid;
  place-items: center;
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.ws-menu__app-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.ws-menu__app-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 650;
}

.ws-menu__app-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 10px;
}

.ws-menu__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-height: 140px;
  padding: 15px;
  color: var(--text-secondary);
  text-align: center;
}

.ws-menu__empty>svg {
  opacity: .5;
}

.ws-menu__empty p {
  margin: 0;
  max-width: 245px;
  font-size: 11px;
  line-height: 1.55;
}

.ws-menu__empty-action {
  padding: 8px 11px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.ws-menu__empty-action:hover {
  border-color: var(--accent-secondary);
}

.ws-menu__app:focus-visible,
.ws-menu__nav-button:focus-visible,
.ws-menu__clear:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

/* === RODAPÉ === */
.ws-menu__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  min-height: 63px;
  padding: 10px 17px;
  border-top: 1px solid var(--border-default);
  border-radius: 0 0 17px 17px;
  background: transparent;
}

.ws-menu__user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ws-menu__user-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-primary);
  color: var(--accent-secondary);
}

.ws-menu__user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ws-menu__user-info strong {
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
}

.ws-menu__user-info small {
  color: var(--text-secondary);
  font-size: 10px;
}

.ws-menu__footer-brand {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
}

/* === MENU DE CONTEXTO === */
.ws-menu__context {
  position: absolute;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 220px;
  max-height: min(300px, calc(100dvh - 115px));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 12px;
  background: var(--panel-background);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

.ws-menu__context-header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 7px 9px;
}

.ws-menu__context-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.ws-menu__context-icon {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.ws-menu__context-divider {
  flex: 0 0 1px;
  height: 1px;
  margin: 4px 5px;
  background: var(--border-default);
}

.ws-menu__context button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.ws-menu__context button:hover:not(:disabled),
.ws-menu__context button:focus-visible {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.ws-menu__context button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

.ws-menu__context button:disabled {
  opacity: .4;
  cursor: default;
}

.ws-menu__context-action-icon {
  display: grid;
  place-items: center;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  color: var(--accent-secondary);
}

.ws-menu__context-action-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ws-menu__context-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 3px;
  padding: 10px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.5;
}

:root:is([data-blur='off'], [data-transparency='solid'], [data-reduced-transparency='true'], [data-low-effects='true']) .ws-menu__context {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* === RESPONSIVIDADE === */
@media (max-height: 600px) {
  .taskbar-launcher--redesign.ws-menu {
    height: min(390px, calc(100dvh - 85px));
  }

  .ws-menu__top {
    padding-block: 10px;
  }

  .ws-menu__content {
    padding-top: 12px;
  }

  .ws-menu__sidebar {
    padding-top: 12px;
  }
}

@media (max-width: 430px) {
  .taskbar-launcher--redesign.ws-menu {
    width: min(540px, calc(100vw - 16px));
  }

  .ws-menu__workspace {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .ws-menu__sidebar {
    padding-inline: 5px;
    align-items: center;
  }

  .ws-menu__sidebar-label,
  .ws-menu__sidebar-caption,
  .ws-menu__sidebar-bottom,
  .ws-menu__nav-button span {
    display: none;
  }

  .ws-menu__sidebar-items {
    width: 100%;
    margin-top: 0;
  }

  .ws-menu__nav-button {
    justify-content: center;
    padding: 9px;
  }

  .ws-menu__content {
    padding: 13px 9px 12px;
  }

  .ws-menu__top {
    padding: 12px;
  }

  .ws-menu__top-brand {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .ws-menu__search,
  .ws-menu__app {
    transition: none;
  }
}

/* === CENTRAL DE NOTIFICAÇÕES === */
/* ----- Estrutura do painel ----- */
.taskbar-notifications {
  display: flex;
  flex-direction: column;
  width: min(410px, calc(100vw - 24px));
  height: min(480px, calc(100dvh - 100px));
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
}

/* ----- Cabeçalho ----- */
.taskbar-notifications__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  padding: 17px 18px;
  border-bottom: 1px solid var(--border-default);
}

.taskbar-notifications__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.taskbar-notifications__heading-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.taskbar-notifications__heading>div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.taskbar-notifications__heading strong {
  font-size: 14px;
  font-weight: 750;
}

.taskbar-notifications__heading small {
  color: var(--text-secondary);
  font-size: 11px;
}

/* ----- Botões da Central ----- */
.taskbar-notifications__icon-button,
.taskbar-notifications__toolbar button,
.taskbar-notifications__item-actions button {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.taskbar-notifications__icon-button:hover,
.taskbar-notifications__toolbar button:hover:not(:disabled),
.taskbar-notifications__item-actions button:hover {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.taskbar-notifications button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

.taskbar-notifications button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* === NÃO PERTURBE === */
/* ----- Área de configuração ----- */
.taskbar-notifications__controls {
  flex: 0 0 auto;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-default);
}

.taskbar-notifications__dnd {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--surface-secondary);
}

.taskbar-notifications__dnd-icon {
  display: grid;
  place-items: center;
  flex: 0 0 33px;
  width: 33px;
  height: 33px;
  border-radius: 9px;
  background: var(--surface-primary);
  color: var(--accent-secondary);
}

.taskbar-notifications__dnd-label {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.taskbar-notifications__dnd-label strong {
  font-size: 12px;
  font-weight: 700;
}

.taskbar-notifications__dnd-label small {
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Interruptor ----- */
.taskbar-notifications__switch {
  position: relative;
  width: 39px;
  height: 23px;
  flex: 0 0 39px;
  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 999px;
  background: var(--surface-primary);
  cursor: pointer;
  transition: background-color calc(var(--motion-scale, 1) * 160ms) ease;
}

.taskbar-notifications__switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--text-secondary);
  transition:
    transform calc(var(--motion-scale, 1) * 160ms) ease,
    background-color calc(var(--motion-scale, 1) * 160ms) ease;
}

.taskbar-notifications__switch.is-active {
  border-color: var(--accent-secondary);
  background: var(--accent-secondary);
}

.taskbar-notifications__switch.is-active span {
  background: var(--surface-primary);
  transform: translateX(16px);
}

/* === LISTA DE NOTIFICAÇÕES === */
/* ----- Seção e cabeçalho ----- */
.taskbar-notifications__section {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}

.taskbar-notifications__section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 11px 16px 8px;
}

.taskbar-notifications__section-title>div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.taskbar-notifications__section-title strong {
  font-size: 12px;
  font-weight: 700;
}

.taskbar-notifications__section-title span {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 7px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 10px;
}

.taskbar-notifications__toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ----- Rolagem da lista ----- */
.taskbar-notifications__list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  padding: 4px 13px 14px 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

/* === CARTÕES DE NOTIFICAÇÃO === */
/* ----- Estrutura e estados ----- */
.taskbar-notifications__item {
  --notification-accent: var(--accent-secondary);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 100%;
  padding: 12px 9px 12px 11px;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: var(--surface-secondary);
  animation: ws-notification-enter calc(var(--motion-scale, 1) * 180ms) ease-out both;
}

.taskbar-notifications__item--success {
  --notification-accent: #38a875;
}

.taskbar-notifications__item--warning {
  --notification-accent: #d79b39;
}

.taskbar-notifications__item--error {
  --notification-accent: #d96470;
}

.taskbar-notifications__item--unread {
  border-left: 3px solid var(--notification-accent);
}

.taskbar-notifications__item--read {
  opacity: 0.78;
}

.taskbar-notifications__item-icon {
  display: grid;
  place-items: center;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: var(--surface-primary);
  color: var(--notification-accent);
}

.taskbar-notifications__item-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
}

/* ----- Origem e horário ----- */
.taskbar-notifications__item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.taskbar-notifications__source {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--notification-accent);
  font-size: 10px;
  font-weight: 700;
}

.taskbar-notifications__item-top time {
  flex-shrink: 0;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Título e mensagem com limite visual ----- */
.taskbar-notifications__item-title {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.35;
}

.taskbar-notifications__item-message {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* ----- Ações do cartão ----- */
.taskbar-notifications__item-actions {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.taskbar-notifications__item-actions button {
  width: 25px;
  height: 25px;
}

.taskbar-notifications__open-action {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  max-width: 100%;
  min-width: 0;
  margin-top: 5px;
  padding: 6px 8px;
  border: 1px solid var(--border-default);
  border-radius: 7px;
  background: var(--surface-primary);
  color: var(--accent-secondary);
  font-size: 10px;
  overflow-wrap: anywhere;
  cursor: pointer;
}

/* === ESTADO VAZIO === */
/* ----- Apresentação sem notificações ----- */
.taskbar-notifications__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  flex-direction: column;
  gap: 11px;
  padding: 20px;
  text-align: center;
}

.taskbar-notifications__empty>div {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid var(--border-default);
  border-radius: 20px;
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.taskbar-notifications__empty strong {
  font-size: 13px;
}

.taskbar-notifications__empty p {
  max-width: 230px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* === ANIMAÇÃO E RESPONSIVIDADE DA CENTRAL === */
/* ----- Entrada dos cartões ----- */
@keyframes ws-notification-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- Altura reduzida ----- */
@media (max-height: 620px) {
  .taskbar-notifications {
    height: min(390px, calc(100dvh - 85px));
  }
}

/* ----- Preferência por movimento reduzido ----- */
@media (prefers-reduced-motion: reduce) {
  .taskbar-notifications__item {
    animation: none;
  }

  .taskbar-notifications__switch,
  .taskbar-notifications__switch span {
    transition: none;
  }
}

:root[data-reduced-motion='true'] .taskbar-notifications__item,
:root[data-low-effects='true'] .taskbar-notifications__item {
  animation: none;
}

/* === FILA DE NOTIFICAÇÕES TEMPORÁRIAS === */
/* ----- Posicionamento geral ----- */
.ws-toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.ws-toast-queue {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
}

/* === NOTIFICAÇÃO TEMPORÁRIA PRINCIPAL === */
/* ----- Estrutura e aparência ----- */
.ws-toast {
  --toast-accent: var(--accent-secondary);
  --toast-expanded-width: min(330px, calc(100vw - 90px));
  --toast-expanded-height: 112px;
  position: relative;
  display: flex;
  align-items: center;
  width: 52px;
  min-width: 52px;
  max-width: 100%;
  min-height: 52px;
  height: auto;
  flex: 0 0 auto;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid var(--border-default);
  border-radius: 13px;
  background: var(--surface-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
  pointer-events: auto;
}

.ws-toast--success,
.ws-toast-queue__icon--success {
  --toast-accent: #38a875;
}

.ws-toast--warning,
.ws-toast-queue__icon--warning {
  --toast-accent: #d79b39;
}

.ws-toast--error,
.ws-toast-queue__icon--error {
  --toast-accent: #d96470;
}

/* ----- Altura conforme conteúdo ----- */
.ws-toast--size-medium {
  --toast-expanded-height: 132px;
}

.ws-toast--size-large {
  --toast-expanded-height: 164px;
}

/* ----- Ícone fixo à direita ----- */
.ws-toast__icon {
  position: absolute;
  right: 8px;
  bottom: 8px;
  top: auto;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  transform: none;
  color: var(--toast-accent);
  pointer-events: none;
}

.ws-toast__icon svg {
  display: block;
  width: 21px;
  height: 21px;
}

/* ----- Conteúdo expandido à esquerda ----- */
.ws-toast__body {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  order: 1;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  padding: 12px 44px 12px 13px;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
}

.ws-toast__content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 0;
}

.ws-toast__header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.ws-toast__source {
  color: var(--toast-accent);
  font-size: 10px;
  font-weight: 750;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ws-toast__type {
  color: var(--text-secondary);
  font-size: 9px;
  flex-shrink: 0;
}

.ws-toast__title {
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.ws-toast__message {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* ----- Conteúdo com altura adaptável ----- */
.ws-toast__body {
  height: auto;
  max-height: none;
  overflow: visible;
}

/* ----- Distribuição interna ----- */
.ws-toast__content {
  overflow: visible;
  min-width: 0;
}

/* ----- Mensagem sem truncamento de linhas ----- */
.ws-toast__message {
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
  -webkit-line-clamp: unset;
  line-clamp: unset;
}

/* === BOTÃO DE FECHAR DO TOAST === */
/* ----- Posicionado no canto superior direito, acima do ícone de gravidade ----- */
.ws-toast__close {
  position: absolute;
  top: 5px;
  right: 3px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.ws-toast__header {
  padding-right: 15px;
}

.ws-toast__close:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

/* ----- Botão de ação ----- */
.ws-toast__action {
  display: flex;
  align-items: center;
  gap: 5px;
  align-self: flex-start;
  margin-top: 4px;
  padding: 6px 9px;
  border: 1px solid var(--border-default);
  border-radius: 7px;
  background: var(--surface-secondary);
  color: var(--accent-secondary);
  font-size: 10px;
  cursor: pointer;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.ws-toast__close:focus-visible,
.ws-toast__action:focus-visible {
  outline: 2px solid var(--toast-accent);
  outline-offset: -2px;
}

/* === ESTADOS E TRANSIÇÕES DOS AVISOS === */
/* ----- Estado compacto ----- */
.ws-toast--compact {
  width: 52px;
  height: 52px;
  animation: ws-notify-icon-enter calc(var(--motion-scale, 1) * 220ms) ease-out both;
}

/* ----- Expansão ----- */
.ws-toast--expanding {
  width: 52px;
  height: 52px;
  min-height: 52px;
  animation: ws-notify-expand calc(var(--motion-scale, 1) * 300ms) cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* ----- Notificação expandida com altura dinâmica ----- */
.ws-toast--expanded {
  width: var(--toast-expanded-width);
  height: auto;
  min-height: 84px;
  max-height: min(320px, calc(100dvh - 100px));
  align-items: stretch;
}

/* ----- Recolhimento e saída ----- */
.ws-toast--collapsing {
  width: var(--toast-expanded-width);
  height: var(--toast-expanded-height);
  min-height: 52px;
  animation: ws-notify-collapse calc(var(--motion-scale, 1) * 200ms) ease-in both;
}

.ws-toast--leaving {
  width: 52px;
  height: 52px;
  animation: ws-notify-descend calc(var(--motion-scale, 1) * 260ms) ease-in both;
  pointer-events: none;
}

/* ----- Visibilidade do conteúdo ----- */
.ws-toast--expanding .ws-toast__body {
  animation: ws-notify-content-in calc(var(--motion-scale, 1) * 300ms) ease-out both;
}

.ws-toast--expanded .ws-toast__body {
  opacity: 1;
}

.ws-toast--collapsing .ws-toast__body {
  animation: ws-notify-content-out calc(var(--motion-scale, 1) * 200ms) ease-in both;
}

.ws-toast--leaving .ws-toast__body {
  opacity: 0;
  visibility: hidden;
}

/* === FILA DE ÍCONES PENDENTES === */
/* ----- Distribuição ----- */
.ws-toast-queue__pending {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}

.ws-toast-queue__icon,
.ws-toast-queue__more {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--surface-primary);
  color: var(--toast-accent, var(--accent-secondary));
  box-shadow: var(--shadow-floating);
  animation: ws-notify-pending-enter calc(var(--motion-scale, 1) * 250ms) ease-out both;
  animation-delay: calc(var(--queue-index, 0) * calc(var(--motion-scale, 1) * 80ms));
}

.ws-toast-queue__more {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}

/* === ANIMAÇÕES DOS AVISOS === */
/* ----- Entrada do ícone ----- */
@keyframes ws-notify-icon-enter {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.85);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ----- Expansão horizontal preservando altura dinâmica ----- */
@keyframes ws-notify-expand {
  0% {
    width: 52px;
  }

  35% {
    width: 52px;
  }

  100% {
    width: var(--toast-expanded-width);
  }
}

/* ----- Recolhimento horizontal ----- */
@keyframes ws-notify-collapse {
  from {
    width: var(--toast-expanded-width);
    height: var(--toast-expanded-height);
  }

  to {
    width: 52px;
    height: 52px;
  }
}

/* ----- Saída vertical ----- */
@keyframes ws-notify-descend {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(calc(100% + 26px));
  }
}

/* ----- Entrada do conteúdo ----- */
@keyframes ws-notify-content-in {

  0%,
  35% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

/* ----- Saída do conteúdo ----- */
@keyframes ws-notify-content-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* ----- Entrada dos ícones pendentes ----- */
@keyframes ws-notify-pending-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.85);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* === RESPONSIVIDADE E ACESSIBILIDADE DOS AVISOS === */
/* ----- Fila simplificada em telas menores ----- */
@media (max-width: 1000px) {
  .ws-toast-queue__pending {
    display: none;
  }
}

/* ----- Posicionamento para dispositivos móveis ----- */
@media (max-width: 600px) {
  .ws-toast-container {
    right: 12px;
    bottom: 76px;
  }
}

/* ----- Movimento reduzido pelo navegador ----- */
@media (prefers-reduced-motion: reduce) {

  .ws-toast--compact,
  .ws-toast--expanding,
  .ws-toast--collapsing,
  .ws-toast--leaving,
  .ws-toast-queue__icon,
  .ws-toast-queue__more,
  .ws-toast__body {
    animation: none !important;
  }

  .ws-toast--expanding,
  .ws-toast--expanded {
    width: var(--toast-expanded-width);
    height: auto;
  }
}

/* ----- Movimento reduzido pelas Configurações ----- */
:root[data-reduced-motion='true'] .ws-toast,
:root[data-low-effects='true'] .ws-toast,
:root[data-reduced-motion='true'] .ws-toast__body,
:root[data-low-effects='true'] .ws-toast__body,
:root[data-reduced-motion='true'] .ws-toast-queue__icon,
:root[data-low-effects='true'] .ws-toast-queue__icon {
  animation: none !important;
}

/* ----- Posicionamento intermediário ----- */
@media (min-width: 601px) and (max-width: 1100px) {
  .ws-toast-container {
    bottom: 84px;
  }
}
/* === CENTRAL DE CONTROLE === */
/* ----- Estrutura e vidro do painel ----- */
.taskbar-quick-controls.ws-controls {
  display: flex;
  flex-direction: column;
  width: min(405px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100dvh - 90px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
  backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
}

/* ----- Cabeçalho ----- */
.ws-controls__header {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border-default);
}

.ws-controls__heading-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-secondary) 55%, transparent);
  color: var(--accent-secondary);
}

.ws-controls__heading {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ws-controls__heading strong {
  font-size: 14px;
  font-weight: 750;
}

.ws-controls__heading small {
  color: var(--text-secondary);
  font-size: 11px;
}

.ws-controls__icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.ws-controls__icon-button:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

/* === CONTEÚDO DO PAINEL === */
/* ----- Organização sem rolagem ----- */
.ws-controls__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  overflow: visible;
}

.ws-controls__section-header strong {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ----- Grade de ações rápidas ----- */
.ws-controls__tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ws-control-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  min-height: 88px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-secondary) 65%, transparent);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: border-color calc(var(--motion-scale, 1) * 150ms) ease,
    background-color calc(var(--motion-scale, 1) * 150ms) ease,
    transform calc(var(--motion-scale, 1) * 150ms) ease;
}

.ws-control-tile:hover:not(:disabled) {
  border-color: var(--accent-secondary);
  transform: translateY(-1px);
}

.ws-control-tile--active {
  border-color: color-mix(in srgb, var(--accent-secondary) 65%, var(--border-default));
  background: color-mix(in srgb, var(--accent-secondary) 12%, var(--surface-secondary));
}

.ws-control-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ws-control-tile__icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-primary) 65%, transparent);
  color: var(--accent-secondary);
}

.ws-control-tile__check {
  color: var(--accent-secondary);
}

.ws-control-tile__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ws-control-tile__text strong {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ws-control-tile__text small {
  color: var(--text-secondary);
  font-size: 10px;
}

/* === IDIOMA === */
/* ----- Linha de seleção ----- */
.ws-controls__locale {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 9px 11px;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-secondary) 65%, transparent);
}

.ws-controls__locale-icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-primary) 65%, transparent);
  color: var(--accent-secondary);
}

.ws-controls__locale-label {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ws-controls__locale-label strong {
  font-size: 11px;
  font-weight: 650;
}

.ws-controls__locale select {
  width: 116px;
  max-width: 45%;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-primary);
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
}

/* === RODAPÉ === */
/* ----- Acesso às Configurações ----- */
.ws-controls__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-top: 1px solid var(--border-default);
  background: transparent;
}

.ws-controls__footer>span {
  color: var(--text-secondary);
  font-size: 10px;
}

.ws-controls__footer>button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.ws-controls__footer>button:hover {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

.ws-controls button:focus-visible,
.ws-controls select:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* === TASKBAR COM OCULTAÇÃO AUTOMÁTICA === */
/* ----- Preservar posicionamento existente ----- */
.taskbar-container--auto-hide {
  bottom: 16px;
  transform: translate(-50%, calc(100% + 8px));
  transition: transform calc(var(--motion-scale, 1) * 180ms) ease;
}

.taskbar-container--auto-hide:hover,
.taskbar-container--auto-hide:focus-within {
  transform: translate(-50%, 0);
}

/* === RESPONSIVIDADE E ACESSIBILIDADE === */
/* ----- Alturas reduzidas ----- */
@media (max-height: 650px) {
  .taskbar-quick-controls.ws-controls {
    max-height: calc(100dvh - 85px);
  }
}

/* ----- Larguras reduzidas ----- */
@media (max-width: 360px) {
  .ws-controls__content {
    padding: 11px;
  }

  .ws-control-tile {
    padding: 9px;
  }

  .ws-controls__footer>span {
    display: none;
  }
}

/* ----- Preferência de movimento reduzido ----- */
@media (prefers-reduced-motion: reduce) {

  .ws-control-tile,
  .taskbar-container--auto-hide {
    transition: none;
  }
}

:root[data-reduced-motion='true'] .ws-control-tile,
:root[data-low-effects='true'] .ws-control-tile {
  transition: none;
}

/* === PAINEL COMPACTO DO WALLY === */
/* ----- Estrutura e vidro global ----- */
.taskbar-wally.ws-wally {
  display: flex;
  flex-direction: column;
  width: min(410px, calc(100vw - 24px));
  height: min(490px, calc(100dvh - 100px));
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
}

/* === CABEÇALHO === */
/* ----- Estrutura ----- */
.ws-wally__header {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  padding: 14px 15px;
  border-bottom: 1px solid var(--border-default);
}

/* ----- Superfícies dos avatares ----- */
.ws-wally__avatar,
.ws-wally__message-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border-default);
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

/* ----- Avatar principal ----- */
.ws-wally__avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

/* ----- Identificação ----- */
.ws-wally__identity {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

/* ----- Nome ----- */
.ws-wally__identity strong {
  font-size: 14px;
  font-weight: 750;
}

/* ----- Estado ----- */
.ws-wally__identity small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Indicador de disponibilidade ----- */
.ws-wally__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #39b98a;
}

/* ----- Ações do cabeçalho ----- */
.ws-wally__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ----- Botões ----- */
.ws-wally__header-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ----- Interação dos botões ----- */
.ws-wally__header-actions button:hover:not(:disabled) {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

/* ----- Ações indisponíveis ----- */
.ws-wally__header-actions button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* === ÁREA DE CONVERSA === */
/* ----- Histórico com rolagem ----- */
.ws-wally__messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 15px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
  scrollbar-gutter: stable;
}

/* ----- Abertura inicial sem barra de rolagem ----- */
.ws-wally__messages:has(.ws-wally__welcome) {
  overflow-y: hidden;
  scrollbar-gutter: auto;
}

/* === APRESENTAÇÃO INICIAL === */
/* ----- Distribuição de conteúdo ----- */
.ws-wally__welcome {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 0;
  padding-block: 8px;
  text-align: center;
}

/* ----- Símbolo de boas-vindas ----- */
.ws-wally__welcome-symbol {
  display: grid;
  place-items: center;
  width: 59px;
  height: 59px;
  margin-bottom: 3px;
  border: 1px solid var(--border-default);
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent-secondary) 10%, var(--surface-secondary));
  color: var(--accent-secondary);
}

/* ----- Título ----- */
.ws-wally__welcome h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}

/* ----- Descrição ----- */
.ws-wally__welcome p {
  max-width: 260px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
}

/* ----- Título das sugestões ----- */
.ws-wally__suggestion-title {
  align-self: stretch;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
  text-align: left;
}

/* ----- Grade de sugestões ----- */
.ws-wally__suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

/* ----- Botões de sugestões ----- */
.ws-wally__suggestions button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

/* ----- Ícone inicial ----- */
.ws-wally__suggestions button svg:first-child {
  flex-shrink: 0;
  color: var(--accent-secondary);
}

/* ----- Indicador de navegação ----- */
.ws-wally__suggestions button svg:last-child {
  flex-shrink: 0;
  margin-left: auto;
}

/* ----- Interação ----- */
.ws-wally__suggestions button:hover {
  border-color: var(--accent-secondary);
}

/* === MENSAGENS === */
/* ----- Lista de mensagens ----- */
.ws-wally__conversation {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ----- Estrutura de mensagem ----- */
.ws-wally__message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
}

/* ----- Mensagens do visitante ----- */
.ws-wally__message--user {
  justify-content: flex-end;
}

/* ----- Avatar da resposta ----- */
.ws-wally__message-avatar {
  width: 27px;
  height: 27px;
  border-radius: 9px;
}

/* ----- Bolha de mensagem ----- */
.ws-wally__bubble {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  max-width: 84%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--surface-secondary);
}

/* ----- Bolha do visitante ----- */
.ws-wally__message--user .ws-wally__bubble {
  background: color-mix(in srgb, var(--accent-secondary) 13%, var(--surface-primary));
  border-color: color-mix(in srgb, var(--accent-secondary) 30%, var(--border-default));
  border-bottom-right-radius: 4px;
}

/* ----- Bolha do assistente ----- */
.ws-wally__message--assistant .ws-wally__bubble {
  max-width: 90%;
  border-bottom-left-radius: 4px;
}

/* ----- Texto das mensagens ----- */
.ws-wally__bubble p {
  margin: 0;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ----- Avisos nas mensagens ----- */
.ws-wally__bubble small {
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Ações sugeridas pelo Wally ----- */
.ws-wally__app-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-primary);
  color: var(--accent-secondary);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

/* ----- Interação nas ações ----- */
.ws-wally__app-action:hover {
  border-color: var(--accent-secondary);
}

/* === CAMPO DE PERGUNTA === */
/* ----- Área inferior ----- */
.ws-wally__composer-area {
  flex: 0 0 auto;
  padding: 12px 14px;
  border-top: 1px solid var(--border-default);
}

/* ----- Formulário ----- */
.ws-wally__composer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 5px 5px 5px 12px;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: var(--surface-secondary);
}

/* ----- Foco no campo ----- */
.ws-wally__composer:focus-within {
  border-color: var(--accent-secondary);
}

/* ----- Entrada de texto ----- */
.ws-wally__composer input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}

/* ----- Texto de orientação ----- */
.ws-wally__composer input::placeholder {
  color: var(--text-secondary);
}

/* ----- Botão de envio ----- */
.ws-wally__composer>button {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--accent-secondary);
  color: var(--surface-primary);
  cursor: pointer;
}

/* ----- Envio indisponível ----- */
.ws-wally__composer>button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ----- Rodapé do formulário ----- */
.ws-wally__composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

/* ----- Indicação de provedor ----- */
.ws-wally__composer-footer>span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Acesso ao Wally Estendido ----- */
.ws-wally__composer-footer>button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-secondary);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

/* ----- Interação com acesso estendido ----- */
.ws-wally__composer-footer>button:hover {
  text-decoration: underline;
}

/* === VALIDAÇÃO E RESPOSTA REMOTA === */
/* ----- Área de verificação ----- */
.ws-wally__verification {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}

/* ----- Largura do desafio ----- */
.ws-wally__verification>div {
  max-width: 100%;
}

/* ----- Mensagem de verificação ----- */
.ws-wally__verification-info,
.ws-wally__verification p {
  margin: 6px 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* ----- Espaçamento do aviso ----- */
.ws-wally__verification-info {
  padding: 7px 0;
}

/* ----- Resposta em andamento ----- */
.ws-wally__responding {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--text-secondary, #9ca3af);
  font-size: 12px;
}

/* ----- Texto de espera ----- */
.ws-wally__responding span {
  flex: 1;
  min-width: 0;
}

/* ----- Cancelamento de resposta ----- */
.ws-wally__responding button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* ----- Ícone de carregamento ----- */
.ws-wally__loading-icon {
  flex-shrink: 0;
  animation: ws-wally-spin 1s linear infinite;
}

/* ----- Animação de carregamento ----- */
@keyframes ws-wally-spin {
  to {
    transform: rotate(360deg);
  }
}

/* === ACESSIBILIDADE === */
/* ----- Foco visível ----- */
.ws-wally button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* ----- Preferência do sistema para reduzir movimento ----- */
@media (prefers-reduced-motion: reduce) {
  .ws-wally__loading-icon {
    animation: none;
  }
}

/* === RESPONSIVIDADE === */
/* ----- Altura reduzida ----- */
@media (max-height: 600px) {
  .taskbar-wally.ws-wally {
    height: min(390px, calc(100dvh - 85px));
  }

  .ws-wally__welcome {
    justify-content: flex-start;
  }
}

/* ----- Compactação da abertura inicial ----- */
@media (max-height: 650px) {
  .ws-wally__welcome {
    gap: 8px;
  }

  .ws-wally__welcome-symbol {
    width: 46px;
    height: 46px;
    margin-bottom: 0;
  }

  .ws-wally__suggestion-title {
    margin-top: 6px;
  }

  .ws-wally__suggestions button {
    min-height: 32px;
    padding: 6px;
  }
}
/* === PAINEL DE CLIMA === */
/* ----- Estrutura e superfície de vidro ----- */
.taskbar-weather-panel {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--panel-shadow, var(--shadow-floating));
}

/* === CABEÇALHO === */
/* ----- Título e ações ----- */
.taskbar-weather-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-default);
}

/* ----- Alinhamento dos grupos ----- */
.taskbar-weather-panel__title,
.taskbar-weather-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ----- Ícone do título ----- */
.taskbar-weather-panel__title svg {
  color: var(--accent-secondary);
}

/* ----- Texto do título ----- */
.taskbar-weather-panel__title strong {
  font-size: 13px;
  font-weight: 700;
}

/* ----- Botões do cabeçalho ----- */
.taskbar-weather-panel__header-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ----- Ações ao passar o ponteiro ----- */
.taskbar-weather-panel__header-actions button:hover:not(:disabled) {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

/* ----- Estado desativado ----- */
.taskbar-weather-panel__header-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* === CONTEÚDO === */
/* ----- Rolagem somente quando necessária ----- */
.taskbar-weather-panel__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

/* ----- Localização ----- */
.taskbar-weather-panel__location {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 11px;
}

/* ----- Ícone da localização ----- */
.taskbar-weather-panel__location svg {
  flex: 0 0 auto;
  color: var(--accent-secondary);
}

/* ----- Nome da localização ----- */
.taskbar-weather-panel__location span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* === CLIMA ATUAL === */
/* ----- Card de temperatura ----- */
.taskbar-weather-panel__current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-secondary) 7%, var(--surface-secondary));
}

/* ----- Bloco informativo ----- */
.taskbar-weather-panel__current-info {
  min-width: 0;
}

/* ----- Temperatura ----- */
.taskbar-weather-panel__temperature {
  display: block;
  font-size: 43px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

/* ----- Condição atual ----- */
.taskbar-weather-panel__current-info p {
  margin: 6px 0 0;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.4;
}

/* ----- Sensação térmica ----- */
.taskbar-weather-panel__current-info small {
  display: block;
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 11px;
}

/* ----- Ícone da condição ----- */
.taskbar-weather-panel__current-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  color: var(--accent-secondary);
}

/* === INDICADORES === */
/* ----- Grade de informações ----- */
.taskbar-weather-panel__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* ----- Card de indicador ----- */
.taskbar-weather-panel__metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 65px;
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-secondary) 75%, transparent);
}

/* ----- Rótulo e ícone ----- */
.taskbar-weather-panel__metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 11px;
}

/* ----- Cor do ícone ----- */
.taskbar-weather-panel__metric-label svg {
  flex: 0 0 auto;
  color: var(--accent-secondary);
}

/* ----- Valor do indicador ----- */
.taskbar-weather-panel__metric strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* === PREVISÃO === */
/* ----- Área de previsão ----- */
.taskbar-weather-panel__forecast {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* ----- Cabeçalho da previsão ----- */
.taskbar-weather-panel__forecast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ----- Título da previsão ----- */
.taskbar-weather-panel__forecast-header strong {
  font-size: 12px;
  font-weight: 700;
}

/* ----- Período ----- */
.taskbar-weather-panel__forecast-header span {
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Grade de cinco dias ----- */
.taskbar-weather-panel__days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

/* ----- Card de cada dia ----- */
.taskbar-weather-panel__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 3px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--surface-secondary);
}

/* ----- Dia da semana ----- */
.taskbar-weather-panel__day-label {
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 650;
  text-transform: capitalize;
  white-space: nowrap;
}

/* ----- Ícone diário ----- */
.taskbar-weather-panel__day-icon {
  display: grid;
  place-items: center;
  height: 25px;
  color: var(--accent-secondary);
}

/* ----- Máxima ----- */
.taskbar-weather-panel__day-max {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ----- Mínima ----- */
.taskbar-weather-panel__day-min {
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* === ESTADOS E ACESSIBILIDADE === */
/* ----- Informações e erros ----- */
.taskbar-weather-panel__empty,
.taskbar-weather-panel__status,
.taskbar-weather-panel__error {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* ----- Ausência de dados ----- */
.taskbar-weather-panel__empty {
  padding: 20px 10px;
  border: 1px dashed var(--border-default);
  border-radius: 10px;
  text-align: center;
}

/* ----- Erros ----- */
.taskbar-weather-panel__error {
  color: var(--status-error, var(--text-primary));
}

/* ----- Foco por teclado ----- */
.taskbar-weather-panel button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* ----- Atualização em andamento ----- */
.taskbar-weather-panel__spinning {
  animation: weather-spin 1s linear infinite;
}

/* ----- Animação ----- */
@keyframes weather-spin {
  to {
    transform: rotate(360deg);
  }
}

/* === RESPONSIVIDADE === */
/* ----- Largura reduzida ----- */
@media (max-width: 360px) {
  .taskbar-weather-panel__content {
    gap: 9px;
    padding: 10px;
  }

  .taskbar-weather-panel__days {
    gap: 3px;
  }

  .taskbar-weather-panel__day {
    padding: 8px 2px;
  }
}

/* ----- Preferência por movimento reduzido ----- */
@media (prefers-reduced-motion: reduce) {
  .taskbar-weather-panel__spinning {
    animation: none;
  }
}
/* === PAINEL DE CALENDÁRIO === */
/* ----- Superfície compartilhada com os painéis da V2 ----- */
.taskbar-calendar {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--panel-shadow, var(--shadow-floating));
}

/* ----- Dimensionamento interno ----- */
.taskbar-calendar *,
.taskbar-calendar *::before,
.taskbar-calendar *::after {
  box-sizing: border-box;
}

/* === CABEÇALHO === */
/* ----- Organização principal ----- */
.taskbar-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-default);
}

/* ----- Identidade do painel ----- */
.taskbar-calendar__heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

/* ----- Ícone do calendário ----- */
.taskbar-calendar__heading-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent-secondary) 10%, var(--surface-secondary));
  color: var(--accent-secondary);
}

/* ----- Título e mês ----- */
.taskbar-calendar__heading-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

/* ----- Título ----- */
.taskbar-calendar__heading-copy strong {
  font-size: 13px;
  font-weight: 750;
}

/* ----- Mês exibido ----- */
.taskbar-calendar__heading-copy small {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

/* ----- Grupo de ações ----- */
.taskbar-calendar__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

/* ----- Comportamento dos botões ----- */
.taskbar-calendar button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* ----- Ações do cabeçalho ----- */
.taskbar-calendar__actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
}

/* ----- Realce dos botões ----- */
.taskbar-calendar__actions button:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

/* ----- Botão de retorno ao dia atual ----- */
.taskbar-calendar__actions .taskbar-calendar__today-button {
  width: auto;
  padding: 0 9px;
  border-color: var(--border-default);
  background: color-mix(in srgb, var(--surface-secondary) 78%, transparent);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 650;
}

/* === CONTEÚDO === */
/* ----- Grade e agenda com rolagem apenas quando necessária ----- */
.taskbar-calendar__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

/* ----- Avisos dos eventos externos ----- */
.taskbar-calendar__notice {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* === GRADE MENSAL === */
/* ----- Sete colunas, começando pelo domingo ----- */
.taskbar-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  text-align: center;
}

/* ----- Estrutura das células ----- */
.taskbar-calendar__grid>span,
.taskbar-calendar__date {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ----- Dias da semana ----- */
.taskbar-calendar__grid>.taskbar-calendar__weekday {
  height: 25px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}

/* ----- Datas clicáveis ----- */
.taskbar-calendar__date {
  position: relative;
  background: color-mix(in srgb, var(--surface-secondary) 46%, transparent);
}

/* ----- Datas dos meses vizinhos ----- */
.taskbar-calendar__date.taskbar-calendar__outside {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* ----- Interação com meses vizinhos ----- */
.taskbar-calendar__date.taskbar-calendar__outside:hover {
  opacity: 0.85;
}

/* ----- Preservar destaque fora do mês atual ----- */
.taskbar-calendar__date.taskbar-calendar__outside.taskbar-calendar__today,
.taskbar-calendar__date.taskbar-calendar__outside.taskbar-calendar__selected {
  opacity: 1;
}

/* ----- Passagem do ponteiro ----- */
.taskbar-calendar__date:hover {
  background: var(--surface-secondary);
}

/* ----- Dia atual ----- */
.taskbar-calendar__date.taskbar-calendar__today {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  font-weight: 750;
}

/* ----- Dia selecionado ----- */
.taskbar-calendar__date.taskbar-calendar__selected {
  background: var(--action-background);
  color: var(--action-text);
  font-weight: 750;
}

/* ----- Marcadores de feriados e eventos ----- */
.taskbar-calendar__date.taskbar-calendar__holiday::after,
.taskbar-calendar__date.taskbar-calendar__event::after {
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 4px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--accent-secondary);
  content: '';
}

/* ----- Marcador de evento público ----- */
.taskbar-calendar__date.taskbar-calendar__event:not(.taskbar-calendar__holiday)::after {
  background: var(--text-secondary);
}

/* ----- Marcador do dia selecionado ----- */
.taskbar-calendar__date.taskbar-calendar__selected::after {
  background: currentColor;
}

/* === AGENDA === */
/* ----- Card da data selecionada ----- */
.taskbar-calendar__agenda {
  padding: 13px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-secondary) 76%, transparent);
}

/* ----- Cabeçalho da agenda ----- */
.taskbar-calendar__agenda-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ----- Data selecionada ----- */
.taskbar-calendar__agenda-heading strong {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: capitalize;
}

/* ----- Quantidade de eventos ----- */
.taskbar-calendar__agenda-heading span {
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Ausência de eventos ----- */
.taskbar-calendar__no-events {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* ----- Lista da agenda ----- */
.taskbar-calendar__agenda-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

/* ----- Linha de evento ----- */
.taskbar-calendar__agenda-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ----- Ícone de evento ----- */
.taskbar-calendar__agenda-item>svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--accent-secondary);
}

/* ----- Conteúdo de evento ----- */
.taskbar-calendar__agenda-item div {
  min-width: 0;
}

/* ----- Nome do evento ----- */
.taskbar-calendar__agenda-item strong {
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ----- Descrição do evento ----- */
.taskbar-calendar__agenda-item p {
  margin: 3px 0;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ----- Link externo ----- */
.taskbar-calendar__agenda-item a {
  color: var(--accent-secondary);
  font-size: 10px;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

/* === ACESSIBILIDADE === */
/* ----- Foco visível ----- */
.taskbar-calendar button:focus-visible,
.taskbar-calendar a:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* === RESPONSIVIDADE === */
/* ----- Telas estreitas ----- */
@media (max-width: 360px) {
  .taskbar-calendar__header {
    gap: 5px;
    padding: 11px 9px;
  }

  .taskbar-calendar__actions {
    gap: 2px;
  }

  .taskbar-calendar__actions button {
    width: 27px;
  }

  .taskbar-calendar__body {
    padding: 10px;
  }

  .taskbar-calendar__grid {
    gap: 3px;
  }

  .taskbar-calendar__grid>span,
  .taskbar-calendar__date {
    height: 34px;
  }
}
/* ==========================================================
   WS OS — Widgets
   Base visual compartilhada
   ========================================================== */

.desktop__widget {
  --widget-radius: 16px;
  --widget-gap: 10px;
  --widget-padding: 12px;

  position: absolute;
  display: flex;
  flex-direction: column;

  min-width: 0;
  min-height: 0;
  max-width: 100%;

  box-sizing: border-box;
  overflow: hidden;

  z-index: 1;

  color: var(--text-primary);
  background: var(--ws-glass, var(--surface-primary));

  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: var(--widget-radius);

  box-shadow: var(--panel-shadow, var(--shadow-floating));

  backdrop-filter: blur(var(--blur-medium, 12px)) saturate(var(--ws-glass-saturation, 135%));

  -webkit-backdrop-filter: blur(var(--blur-medium, 12px)) saturate(var(--ws-glass-saturation, 135%));

  isolation: isolate;

  transition:
    border-color calc(var(--motion-scale, 1) * 160ms) ease,
    box-shadow calc(var(--motion-scale, 1) * 160ms) ease,
    opacity calc(var(--motion-scale, 1) * 160ms) ease;
}

/* Estado de interação */

.desktop__widget:hover {
  border-color: var(--border-control, var(--border-default));
}

.desktop__widget:focus-within {
  border-color: var(--accent-secondary);
}

.desktop__widget[data-drop-valid='true'] {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

.desktop__widget[data-drop-valid='false'] {
  outline: 2px dashed var(--status-error);
  outline-offset: -2px;
  opacity: 0.72;
}
/* ==========================================================
   Conteúdo compartilhado
   ========================================================== */

.desktop__widget > .ws-widget {
  display: flex;
  flex-direction: column;

  flex: 1 1 auto;

  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;

  box-sizing: border-box;

  margin: 0;
  padding: var(--widget-padding);

  border: 0;
  border-radius: 0;
  box-shadow: none;

  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  color: var(--text-primary);

  overflow: auto;
  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color: var(--border-control) transparent;
}

.desktop__widget > .ws-widget::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

.desktop__widget > .ws-widget::-webkit-scrollbar-track {
  background: transparent;
}

.desktop__widget > .ws-widget::-webkit-scrollbar-thumb {
  background: var(--border-control);
  border-radius: 99px;
}

.desktop__widget > .ws-widget::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Tipografia interna */

.desktop__widget .ws-widget strong {
  color: var(--text-primary);
}

.desktop__widget .ws-widget button {
  color: var(--text-primary);
}

.desktop__widget .ws-widget button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ==========================================================
   Relógio
   ========================================================== */

.ws-widget--clock {
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
}

.ws-widget--clock time {
  display: block;

  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;

  color: var(--text-primary);
}

.ws-widget--clock > span {
  font-size: 12px;
  line-height: 1.4;
  font-weight: 500;
  text-transform: capitalize;

  color: var(--text-secondary);
}

/* ==========================================================
   Estados por tamanho
   ========================================================== */

.desktop__widget[data-widget-size='2x2'] {
  --widget-padding: 10px;
  --widget-gap: 7px;
}

.desktop__widget[data-widget-size='2x2'] .desktop__widget-controls {
  gap: 4px;
  padding-inline: 5px;
}

.desktop__widget[data-widget-size='2x2'] .desktop__widget-drag {
  padding-inline: 5px;
}

.desktop__widget[data-widget-size='2x2'] .desktop__widget-size > span {
  display: none;
}

.desktop__widget[data-widget-size='3x3'],
.desktop__widget[data-widget-size='4x3'],
.desktop__widget[data-widget-size='4x4'] {
  --widget-padding: 14px;
}

/* ==========================================================
   Acessibilidade e desempenho
   ========================================================== */

:root[data-blur='off'] .desktop__widget,
:root[data-reduced-transparency='true'] .desktop__widget,
:root[data-low-effects='true'] .desktop__widget {
  background: var(--surface-primary);

  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

:root[data-low-effects='true'] .desktop__widget {
  box-shadow: none;
}

:root[data-reduced-motion='true'] .desktop__widget,
:root[data-low-effects='true'] .desktop__widget {
  transition: none;
}

@media (prefers-reduced-transparency: reduce) {
  .desktop__widget {
    background: var(--surface-primary);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .desktop__widget,
  .desktop__widget * {
    transition: none;
    animation: none;
  }
}

@media (pointer: coarse) {
  .desktop__widget-controls {
    min-height: 40px;
  }

  .desktop__widget-drag,
  .desktop__widget-size select {
    min-height: 32px;
  }
}

/* ==========================================================
   W4.3 — Alça de movimentação dos widgets
   ========================================================== */

.desktop__widget-grip {
  position: absolute;
  right: 7px;
  bottom: 7px;
  z-index: 5;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;

  padding: 0;

  border: 1px solid var(--border-default);
  border-radius: 9px;

  background: var(--surface-secondary);
  color: var(--text-secondary);

  box-shadow: var(--panel-shadow);

  cursor: grab;
  touch-action: none;
  user-select: none;

  opacity: 0;
  transform: translateY(3px);

  transition:
    opacity calc(var(--motion-scale, 1) * 150ms) ease,
    transform calc(var(--motion-scale, 1) * 150ms) ease,
    background calc(var(--motion-scale, 1) * 150ms) ease,
    color calc(var(--motion-scale, 1) * 150ms) ease;
}

.desktop__widget:hover .desktop__widget-grip,
.desktop__widget:focus-within .desktop__widget-grip,
.desktop__widget-grip:active {
  opacity: 1;
  transform: translateY(0);
}

.desktop__widget-grip:hover {
  background: var(--surface-primary);
  color: var(--accent-secondary);
}

.desktop__widget-grip:active {
  cursor: grabbing;
}

.desktop__widget-grip:focus-visible {
  opacity: 1;
  transform: translateY(0);
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* Evita que a alça fique escondida em telas de toque. */
@media (hover: none) {
  .desktop__widget-grip {
    opacity: 1;
    transform: none;
  }
}

@media (pointer: coarse) {
  .desktop__widget-grip {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .desktop__widget-grip {
    transition: none;
    transform: none;
  }
}

:root[data-reduced-motion='true'] .desktop__widget-grip,
:root[data-low-effects='true'] .desktop__widget-grip {
  transition: none;
  transform: none;
}

.desktop__widget > .ws-widget {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: auto;
  overflow: auto;
}

/* ----- Fundamentos e superfícies ----- */

/* === Cores funcionais === */
/* ----- Estados do tema Dark ----- */
:root {
  --action-text: #ffffff;
  --border-control: #71869b;

  --status-success: #83d5ae;
  --status-warning: #f0cb7a;
  --status-error: #ffabb2;

  --badge-background: #b42338;
}

/* ----- Estados do tema Light ----- */
:root[data-theme='light'] {
  --border-control: #6b7a8b;

  --status-success: #176b45;
  --status-warning: #795000;
  --status-error: #9a2536;
}

/* === Elementos de formulário === */
/* ----- Campos compartilhados ----- */
:where(input, select, textarea) {
  font: inherit;
  color: var(--text-primary);
  background: var(--surface-primary);
}

/* ----- Dimensões mínimas ----- */
button,
select {
  min-width: 24px;
  min-height: 24px;
}

/* ----- Foco acessível ----- */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 3px;
}

/* ----- Elementos desativados ----- */
:where(button:disabled, input:disabled, select:disabled, textarea:disabled) {
  cursor: not-allowed;
}

/* === Links === */
/* ----- Cor de destaque ----- */
a {
  color: var(--link-color);
}

/* === Navegação acessível === */
/* ----- Atalho para conteúdo ----- */
.ws-skip-link {
  position: fixed;
  z-index: 30000;
  top: 8px;
  left: 8px;

  padding: 10px;
  background: var(--surface-primary);

  transform: translateY(-200%);
}

/* ----- Atalho em foco ----- */
.ws-skip-link:focus {
  transform: none;
}

/* === Componentes de inicialização === */
/* ----- Superfícies principais ----- */
.ws-boot,
.ws-welcome {
  background: var(--surface-primary);
  color: var(--text-primary);
}

/* ----- Janela de boas-vindas ----- */
.ws-welcome {
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  box-shadow: var(--shadow-floating);
}

/* ----- Botões das boas-vindas ----- */
.ws-welcome button {
  background: var(--action-background);
  color: var(--action-text);
}

/* === WS Menu === */
/* ----- Bordas compartilhadas ----- */
.taskbar-launcher--redesign {
  border-color: var(--border-default);
}

/* ----- Ícones e elementos de identificação ----- */
.ws-menu__avatar,
.ws-menu__app-icon,
.taskbar-preview__placeholder,
.taskbar-preview__placeholder-icon {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
  border-color: var(--border-default);
}

/* ----- Campo de pesquisa ----- */
.ws-menu__search {
  background: var(--surface-primary);
  border-color: var(--border-control);
}

/* ----- Pesquisa em foco ----- */
.ws-menu__search:focus-within {
  background: var(--surface-primary);
}

/* ----- Itens interativos ----- */
.ws-menu__app-item:hover,
.ws-menu__app-item:focus-within {
  background: var(--surface-secondary);
}

/* === Notificações === */
/* ----- Superfície das mensagens ----- */
.ws-toast {
  background: var(--surface-primary);
  color: var(--text-primary);
  border-color: var(--border-default);
  box-shadow: var(--shadow-floating);
}

/* ----- Textos secundários ----- */
.ws-toast__source,
.ws-toast__type,
.ws-toast__message,
.ws-toast__close {
  color: var(--text-secondary);
}

/* ----- Botão de fechar ----- */
.ws-toast__close:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

/* ----- Ações das notificações ----- */
.ws-toast__action {
  color: var(--link-color);
  border-color: var(--border-control);
  background: var(--surface-secondary);
}

/* ----- Foco das ações ----- */
.ws-toast__action:focus-visible {
  outline-color: var(--accent-secondary);
}

/* ----- Indicadores por categoria ----- */
.ws-toast--info {
  --toast-accent: var(--accent-secondary);
}

.ws-toast--success {
  --toast-accent: var(--status-success);
}

.ws-toast--warning {
  --toast-accent: var(--status-warning);
}

.ws-toast--error {
  --toast-accent: var(--status-error);
}

/* === Taskbar === */
/* ----- Contador de notificações ----- */
.taskbar-notifications__badge {
  background: var(--badge-background);
  color: #ffffff;
  border-color: var(--surface-primary);
}

/* ----- Conteúdo dos painéis ----- */
.taskbar-notifications__item,
.taskbar-quick-controls__section {
  background: var(--surface-primary);
  border-color: var(--border-default);
}

/* ----- Seções dos controles rápidos ----- */
.taskbar-quick-controls__section {
  min-width: 0;
  margin: 0;
}

/* ----- Títulos das seções ----- */
.taskbar-quick-controls__section legend {
  padding: 0;
  font-weight: 700;
}

/* ----- Controles de seleção ----- */
.taskbar-quick-controls__theme select,
.desktop__widget-size select {
  border-color: var(--border-control);
}

/* ----- Organização das opções de tema ----- */
.taskbar-quick-controls__theme {
  gap: 8px;
  flex-wrap: wrap;
}

/* === Controles de efeitos === */
/* ----- Organização das opções ----- */
.ws-effect-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-block: 8px;
}

/* ----- Campos de ativação ----- */
.ws-effect-option input {
  width: 20px;
  height: 20px;
  accent-color: var(--action-background);
}

/* === Desktop === */
/* ----- Indicação de posicionamento inválido ----- */
.desktop__shortcut[data-drop-valid='false'],
.desktop__widget[data-drop-valid='false'] {
  outline: 2px dashed var(--status-error);
  opacity: 0.7;
}

/* === Rolagem === */
/* ----- Áreas compartilhadas ----- */
:where(.desktop-window__content,
  .ws-app,
  .ws-mobile__app,
  .taskbar-floating-layer,
  .ws-mobile__panel) {
  scrollbar-width: thin;
  scrollbar-color: var(--border-control) transparent;
  overscroll-behavior: contain;
}

/* === Seleção de texto === */
/* ----- Superfícies do sistema ----- */
:where(.desktop-window,
  .taskbar-floating-layer,
  .ws-mobile__panel) ::selection {
  background: var(--action-background);
  color: var(--action-text);
}

/* === Responsividade === */
/* ----- Controles para dispositivos de toque ----- */
@media (pointer: coarse) {

  button,
  select {
    min-width: 44px;
    min-height: 44px;
  }

  .desktop-window__header {
    min-height: 52px;
  }

  .ws-effect-option {
    min-height: 44px;
  }
}

/* === Acessibilidade === */
/* ----- Modo de baixo custo ----- */
:root[data-low-effects='true'] *,
:root[data-low-effects='true'] *::before,
:root[data-low-effects='true'] *::after {
  box-shadow: none !important;
}

/* ----- Contraste forçado ----- */
@media (forced-colors: active) {
  :where(button, input, select, textarea, a, [tabindex]):focus-visible {
    outline: 2px solid Highlight;
  }

  :where(.desktop-window,
    .desktop__widget,
    .taskbar) {
    border-color: CanvasText;
  }
}
/* === Sistema de vidro === */
/* ----- Superfície principal das janelas ----- */
.desktop-window {
  border: 1px solid var(--panel-border);
  background: var(--ws-window-background);

  /* ----- Desfoque da janela ----- */
  -webkit-backdrop-filter: blur(var(--blur-medium)) saturate(var(--ws-glass-saturation));
  backdrop-filter: blur(var(--blur-medium)) saturate(var(--ws-glass-saturation));
}

/* ----- Cabeçalho das janelas ----- */
.desktop-window>.desktop-window__header {
  background:
    color-mix(in srgb, var(--surface-secondary) 45%, transparent);
}

/* ----- Conteúdo das janelas ----- */
.desktop-window>.desktop-window__content {
  background:
    color-mix(in srgb, var(--surface-primary) 16%, transparent);
}

/* ----- Superfície dos aplicativos dentro das janelas ----- */
.desktop-window>.desktop-window__content.ws-app {
  background:
    color-mix(in srgb, var(--surface-primary) 16%, transparent);
}

/* ----- Superfícies internas das Configurações ----- */
.desktop-window>.ws-settings,
.desktop-window .ws-settings__content,
.desktop-window .ws-settings__header,
.desktop-window .ws-settings__sidebar {
  background: transparent;
}

/* ----- Cards internos ----- */
.desktop-window .ws-settings__card,
.desktop-window .ws-app__card {
  background:
    color-mix(in srgb, var(--surface-primary) 68%, transparent);
}

/* === PAINÉIS FLUTUANTES === */
/* ----- Vidro compartilhado ----- */
.taskbar-launcher--redesign,
.taskbar-notifications,
.taskbar-quick-controls,
.taskbar-calendar,
.taskbar-weather-panel,
.taskbar-wally,
.taskbar-preview,
.taskbar-context,
.ws-mobile__panel {
  background: var(--ws-window-background);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
  backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
}

/* ----- Evitar camadas duplicadas no Mobile ----- */
.ws-mobile__panel>.taskbar-quick-controls,
.ws-mobile__panel>.taskbar-notifications,
.ws-mobile__panel>.taskbar-quick-controls.ws-controls {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* === Interação com janelas === */
/* ----- Movimento e redimensionamento ----- */
.desktop-window[data-interacting='true'] {
  background: var(--ws-window-background);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ----- Superfície grafite durante a interação no Dark ----- */
:root:not([data-theme='light']) .desktop-window[data-interacting='true'] {
  background: #252629;
}

/* ----- Prévia de encaixe ----- */
.desktop-snap-preview {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* === Acessibilidade === */
/* ----- Desativar desfoque conforme preferências ----- */
:root:is([data-blur='off'],
  [data-transparency='solid'],
  [data-reduced-transparency='true'],
  [data-low-effects='true']) :is(.desktop-window,
  .desktop__widget,
  .ws-widget,
  .taskbar,
  .desktop__context,
  .taskbar-launcher--redesign,
  .taskbar-notifications,
  .taskbar-quick-controls,
  .taskbar-calendar,
  .taskbar-weather-panel,
  .taskbar-wally,
  .taskbar-preview,
  .taskbar-context,
  .ws-mobile__panel) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ----- Preferência do sistema operacional ----- */
@media (prefers-reduced-transparency: reduce) {

  :is(.desktop-window,
    .desktop__widget,
    .ws-widget,
    .taskbar,
    .desktop__context,
    .taskbar-launcher--redesign,
    .taskbar-notifications,
    .taskbar-quick-controls,
    .taskbar-calendar,
    .taskbar-weather-panel,
    .taskbar-wally,
    .taskbar-preview,
    .taskbar-context,
    .ws-mobile__panel) {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

/* === Compatibilidade === */
/* ----- Navegadores sem suporte a backdrop-filter ----- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root {
    --ws-glass: var(--surface-primary);
    --ws-window-background: var(--surface-primary);
    --panel-background: var(--surface-primary);
    --taskbar-background: var(--surface-primary);
  }
}

/* === Legibilidade do Desktop === */
/* ----- Rótulos dos atalhos ----- */
.desktop__shortcut-label {
  padding: 0;
  border-radius: 0;
  color: #ffffff;
  background: transparent;

  text-shadow:
    0 1px 3px rgb(0 0 0 / 90%),
    0 2px 6px rgb(0 0 0 / 60%);
}

/* ----- Foco dos atalhos ----- */
.desktop__shortcut:focus-visible {
  background: rgb(17 25 37 / 92%);
  outline-color: #ffffff;
}
/* ----- Controles compartilhados ----- */
/* === Controles compartilhados === */
/* ----- Base dos botões ----- */
.ws-button {
    --ws-button-background: var(--surface-secondary);
    --ws-button-color: var(--text-primary);
    --ws-button-border: var(--border-control);

    display: inline-flex;
    min-width: 0;
    min-height: var(--control-height-md);
    align-items: center;
    justify-content: center;
    gap: var(--space-2);

    padding: 9px 16px;
    border: 1px solid var(--ws-button-border);
    border-radius: var(--radius-md);

    background: var(--ws-button-background);
    color: var(--ws-button-color);

    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;

    cursor: pointer;
    user-select: none;

    transition:
        background-color var(--transition-fast) ease,
        border-color var(--transition-fast) ease,
        color var(--transition-fast) ease,
        box-shadow var(--transition-fast) ease,
        opacity var(--transition-fast) ease;
}

/* === Hierarquia visual dos botões === */
/* ----- Primário ----- */
.ws-button--primary {
    --ws-button-background: var(--action-background);
    --ws-button-color: var(--action-text);
    --ws-button-border: var(--action-background);
}

/* ----- Secundário ----- */
.ws-button--secondary {
    --ws-button-background: var(--surface-secondary);
    --ws-button-color: var(--text-primary);
    --ws-button-border: var(--border-control);
}

/* ----- Discreto ----- */
.ws-button--ghost {
    --ws-button-background: transparent;
    --ws-button-color: var(--text-primary);
    --ws-button-border: transparent;
}

/* ----- Destrutivo ----- */
.ws-button--danger {
    --ws-button-background: var(--surface-primary);
    --ws-button-color: var(--status-error);
    --ws-button-border: var(--status-error);
}

/* === Estados interativos dos botões === */
/* ----- Hover ----- */
@media (hover: hover) {
    .ws-button:not(:disabled):not([aria-disabled='true']):not([aria-busy='true']):hover {
        background: color-mix(in srgb,
                var(--ws-button-background) 88%,
                var(--text-primary));
    }

    .ws-button--ghost:not(:disabled):not([aria-disabled='true']):not([aria-busy='true']):hover {
        background: var(--surface-secondary);
    }
}

/* ----- Pressionado ----- */
.ws-button:not(:disabled):not([aria-disabled='true']):not([aria-busy='true']):active {
    box-shadow: inset 0 2px 5px rgb(0 0 0 / 12%);
    transform: translateY(1px);
}

/* ----- Foco por teclado ----- */
.ws-button:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

/* ----- Desabilitado ----- */
.ws-button:disabled,
.ws-button[aria-disabled='true'] {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

/* ----- Carregando ----- */
.ws-button[aria-busy='true'] {
    position: relative;
    opacity: 0.8;
    cursor: progress;
    box-shadow: none;
}

/* ----- Indicador de carregamento ----- */
.ws-button[aria-busy='true']::after {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;

    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;

    content: '';
    animation: ws-button-loading 650ms linear infinite;
}

/* ----- Animação de carregamento ----- */
@keyframes ws-button-loading {
    to {
        transform: rotate(360deg);
    }
}

/* === Dimensões dos botões === */
/* ----- Pequeno ----- */
.ws-button--sm {
    min-height: var(--control-height-sm);
    padding: 6px 12px;
    font-size: 12px;
}

/* ----- Grande ----- */
.ws-button--lg {
    min-height: var(--control-height-lg);
    padding: 11px 20px;
    font-size: 14px;
}

/* ----- Largura completa ----- */
.ws-button--block {
    display: flex;
    width: 100%;
}

/* === Acessibilidade dos botões === */
/* ----- Áreas de toque ----- */
@media (pointer: coarse) {
    .ws-button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ----- Movimento reduzido do navegador ----- */
@media (prefers-reduced-motion: reduce) {
    .ws-button {
        transition: none;
    }

    .ws-button:active {
        transform: none;
    }

    .ws-button[aria-busy='true']::after {
        animation: none;
        border-top-color: transparent;
        border-right-color: currentColor;
    }
}

/* ----- Movimento reduzido nas Configurações ----- */
:root:is([data-reduced-motion='true'],
    [data-low-effects='true'],
    [data-motion-intensity='off']) .ws-button {
    transition: none;
}

/* ----- Pressionamento sem movimento ----- */
:root:is([data-reduced-motion='true'],
    [data-low-effects='true'],
    [data-motion-intensity='off']) .ws-button:active {
    transform: none;
}

/* ----- Carregamento estático ----- */
:root:is([data-reduced-motion='true'],
    [data-low-effects='true'],
    [data-motion-intensity='off']) .ws-button[aria-busy='true']::after {
    animation: none;
    border-top-color: transparent;
    border-right-color: currentColor;
}

/* === Campos compartilhados === */
/* ----- Estrutura dos formulários ----- */
.ws-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: var(--space-2);
}

/* ----- Rótulos ----- */
.ws-field__label {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

/* ----- Descrições auxiliares ----- */
.ws-field__hint {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

/* === Controles de entrada === */
/* ----- Base compartilhada ----- */
.ws-input,
.ws-textarea,
.ws-select {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: var(--control-height-md);

    padding: 9px 12px;
    border: 1px solid var(--border-control);
    border-radius: var(--radius-md);

    background: var(--surface-primary);
    color: var(--text-primary);

    font: inherit;
    font-size: 14px;
    line-height: 1.5;

    transition:
        border-color var(--transition-fast) ease,
        background-color var(--transition-fast) ease,
        box-shadow var(--transition-fast) ease;
}

/* ----- Texto de preenchimento ----- */
.ws-input::placeholder,
.ws-textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.8;
}

/* ----- Área de texto ----- */
.ws-textarea {
    min-height: 112px;
    resize: vertical;
}

/* ----- Seletor ----- */
.ws-select {
    padding-right: 32px;
    cursor: pointer;
}

/* === Estados dos campos === */
/* ----- Hover ----- */
@media (hover: hover) {
    :is(.ws-input, .ws-textarea, .ws-select):not(:disabled):hover {
        border-color: var(--accent-secondary);
    }
}

/* ----- Foco ----- */
:is(.ws-input, .ws-textarea, .ws-select):focus-visible {
    border-color: var(--accent-secondary);
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* ----- Erro indicado pelo controle ----- */
:is(.ws-input, .ws-textarea, .ws-select)[aria-invalid='true'] {
    border-color: var(--status-error);
}

/* ----- Erro indicado pelo grupo ----- */
.ws-field--error :is(.ws-input, .ws-textarea, .ws-select) {
    border-color: var(--status-error);
}

/* ----- Mensagem de erro ----- */
.ws-field__error {
    color: var(--status-error);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
}

/* ----- Desabilitado ----- */
:is(.ws-input, .ws-textarea, .ws-select):disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ----- Somente leitura ----- */
:is(.ws-input, .ws-textarea):read-only {
    background: var(--surface-secondary);
}

/* === Checkbox compartilhado === */
/* ----- Estrutura ----- */
.ws-checkbox {
    display: inline-flex;
    min-height: 32px;
    align-items: flex-start;
    gap: var(--space-2);

    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;

    cursor: pointer;
}

/* ----- Controle nativo personalizado ----- */
.ws-checkbox input[type='checkbox'] {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 1px 0 0;

    accent-color: var(--accent-primary);
    cursor: inherit;
}

/* ----- Desabilitado ----- */
.ws-checkbox:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ----- Foco por teclado ----- */
.ws-checkbox input[type='checkbox']:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

/* === Responsividade dos campos === */
/* ----- Áreas de toque ----- */
@media (pointer: coarse) {

    .ws-input,
    .ws-textarea,
    .ws-select {
        min-height: 44px;
    }

    .ws-checkbox {
        min-height: 44px;
        align-items: center;
    }

    .ws-checkbox input[type='checkbox'] {
        width: 22px;
        height: 22px;
        margin-top: 0;
    }
}

/* === Movimento dos campos === */
/* ----- Preferência do navegador ----- */
@media (prefers-reduced-motion: reduce) {

    .ws-input,
    .ws-textarea,
    .ws-select {
        transition: none;
    }
}

/* ----- Preferências internas ----- */
:root:is([data-reduced-motion='true'],
    [data-low-effects='true'],
    [data-motion-intensity='off']) :is(.ws-input,
    .ws-textarea,
    .ws-select) {
    transition: none;
}

/* === Superfícies compartilhadas === */
/* ----- Card padrão ----- */
.ws-card {
    min-width: 0;
    padding: var(--space-4);

    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);

    background: var(--surface-primary);
    color: var(--text-primary);
}

/* ----- Card secundário ----- */
.ws-card--secondary {
    background: var(--surface-secondary);
}

/* ----- Card com destaque ----- */
.ws-card--accent {
    border-color: var(--accent-primary);
    background: color-mix(in srgb,
            var(--accent-primary) 8%,
            var(--surface-primary));
}

/* ----- Card interativo ----- */
.ws-card--interactive {
    transition:
        border-color var(--transition-fast) ease,
        background-color var(--transition-fast) ease,
        box-shadow var(--transition-fast) ease;
}

/* ----- Hover ----- */
@media (hover: hover) {
    .ws-card--interactive:hover {
        border-color: var(--accent-secondary);
    }
}

/* ----- Foco ----- */
.ws-card--interactive:focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 3px;
}

/* === Organização dos cards === */
/* ----- Cabeçalho ----- */
.ws-card__header {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);

    margin-bottom: var(--space-3);
}

/* ----- Título ----- */
.ws-card__title {
    margin: 0;

    color: var(--text-primary);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

/* ----- Descrição ----- */
.ws-card__description {
    margin: 0;

    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

/* ----- Conteúdo ----- */
.ws-card__content {
    min-width: 0;
}

/* ----- Rodapé ----- */
.ws-card__footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--space-2);

    margin-top: var(--space-4);
}

/* === Mensagens compartilhadas === */
/* ----- Estrutura ----- */
.ws-message {
    --ws-message-accent: var(--accent-secondary);

    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: var(--space-3);

    padding: var(--space-3) var(--space-4);

    border: 1px solid var(--ws-message-accent);
    border-radius: var(--radius-md);

    background: color-mix(in srgb,
            var(--ws-message-accent) 8%,
            var(--surface-primary));

    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

/* ----- Informação ----- */
.ws-message--info {
    --ws-message-accent: var(--accent-secondary);
}

/* ----- Sucesso ----- */
.ws-message--success {
    --ws-message-accent: var(--status-success);
}

/* ----- Aviso ----- */
.ws-message--warning {
    --ws-message-accent: var(--status-warning);
}

/* ----- Erro ----- */
.ws-message--error {
    --ws-message-accent: var(--status-error);
}

/* === Conteúdo das mensagens === */
/* ----- Corpo ----- */
.ws-message__content {
    min-width: 0;
    flex: 1;
}

/* ----- Título ----- */
.ws-message__title {
    margin: 0 0 var(--space-1);

    font-size: 13px;
    font-weight: 800;
}

/* ----- Descrição ----- */
.ws-message__description {
    margin: 0;
}

/* === Badges compartilhadas === */
/* ----- Estrutura ----- */
.ws-badge {
    --ws-badge-accent: var(--accent-secondary);

    display: inline-flex;
    min-width: 0;
    min-height: 24px;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);

    padding: 3px 9px;

    border: 1px solid var(--ws-badge-accent);
    border-radius: 999px;

    background: color-mix(in srgb,
            var(--ws-badge-accent) 10%,
            var(--surface-primary));

    color: var(--text-primary);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.3;
    white-space: nowrap;
}

/* ----- Sucesso ----- */
.ws-badge--success {
    --ws-badge-accent: var(--status-success);
}

/* ----- Aviso ----- */
.ws-badge--warning {
    --ws-badge-accent: var(--status-warning);
}

/* ----- Erro ----- */
.ws-badge--error {
    --ws-badge-accent: var(--status-error);
}

/* === Acessibilidade das superfícies === */
/* ----- Movimento reduzido do navegador ----- */
@media (prefers-reduced-motion: reduce) {
    .ws-card--interactive {
        transition: none;
    }
}

/* ----- Preferências internas de movimento ----- */
:root:is([data-reduced-motion='true'],
    [data-low-effects='true'],
    [data-motion-intensity='off']) .ws-card--interactive {
    transition: none;
}

/* ----- Contraste forçado ----- */
@media (forced-colors: active) {

    .ws-card,
    .ws-message,
    .ws-badge {
        border-color: CanvasText;
    }
}

/* === Acessibilidade dos tooltips === */
/* ----- Tooltip sem animação ----- */
:root:is([data-reduced-motion='true'],
    [data-low-effects='true'],
    [data-motion-intensity='off']) .ws-tooltip {
    animation: none;
}
/* ----- Cursores personalizados ----- */
/* === Cursores personalizados === */
/* ----- Dispositivos com apontador preciso ----- */
@media (hover: hover) and (pointer: fine) {
  /* === Cursor padrão === */
  /* ----- Superfície do sistema ----- */
  html[data-cursor-mode='custom'],
  html[data-cursor-mode='custom'] body,
  html[data-cursor-mode='custom'] #root {
    cursor: var(--ws-cursor-default, default);
  }

  /* === Elementos interativos === */
  /* ----- Botões, links e seletores ----- */
  html[data-cursor-mode='custom']
    :is(button, a[href], select, summary, [role='button']):not(:disabled):not(
      [aria-disabled='true']
    ) {
    cursor: var(--ws-cursor-pointer, pointer);
  }

  /* === Arquivos === */
  /* ----- Itens selecionáveis e navegáveis ----- */
  html[data-cursor-mode='custom'] .ws-files .ws-files__entry {
    cursor: var(--ws-cursor-pointer, pointer);
  }

  /* ----- Conteúdo interno dos itens ----- */
  html[data-cursor-mode='custom'] .ws-files .ws-files__entry :is(span, strong, small, svg) {
    cursor: inherit;
  }

  /* === Entrada de texto === */
  /* ----- Campos editáveis ----- */
  html[data-cursor-mode='custom']
    :is(
      textarea,
      input:not([type]),
      input[type='text'],
      input[type='search'],
      input[type='email'],
      input[type='password'],
      input[type='url'],
      input[type='tel'],
      input[type='number'],
      [contenteditable='true']
    ):not(:disabled) {
    cursor: var(--ws-cursor-text, text);
  }

  /* === Controles indisponíveis === */
  /* ----- Elementos desabilitados ----- */
  html[data-cursor-mode='custom'] :is(button, input, textarea, select):disabled,
  html[data-cursor-mode='custom'] [aria-disabled='true'] {
    cursor: var(--ws-cursor-not-allowed, not-allowed);
  }

  /* === Interação com janelas === */
  /* ----- Área de arraste ----- */
  html[data-cursor-mode='custom'] .desktop-window .desktop-window__drag-area[role='button'] {
    cursor: var(--ws-cursor-grab, grab);
  }

  /* ----- Arraste ativo ----- */
  html[data-cursor-mode='custom']
    .desktop-window[data-interacting='true']
    .desktop-window__drag-area[role='button'] {
    cursor: var(--ws-cursor-grabbing, grabbing);
  }

  /* ----- Janela maximizada ----- */
  html[data-cursor-mode='custom']
    .desktop-window--maximized:not([data-interacting='true'])
    .desktop-window__drag-area[role='button'] {
    cursor: var(--ws-cursor-grab, grab);
  }

  /* === Globo de tecnologias === */
  /* ----- Cursor de interação ----- */
  html[data-cursor-mode='custom'] .ws-skills-globe__stage {
    cursor: var(--ws-cursor-grab, grab);
  }

  /* ----- Cursor durante o arraste ----- */
  html[data-cursor-mode='custom'] .ws-skills-globe__stage:active {
    cursor: var(--ws-cursor-grabbing, grabbing);
  }
}
/* === ESTADOS AUXILIARES === */
/* ----- Variantes sem comprometer o comportamento nativo no toque ----- */
@media (hover: hover) and (pointer: fine) {
  html[data-cursor-mode='custom'] [aria-busy='true'] {
    cursor: var(--ws-cursor-wait, wait);
  }
  html[data-cursor-mode='custom'] [data-cursor='help'] {
    cursor: var(--ws-cursor-help, help);
  }
  html[data-cursor-mode='custom'] [data-cursor='move'] {
    cursor: var(--ws-cursor-move, move);
  }
}

/* === REDIMENSIONAMENTO E ARRASTE === */
/* ----- Mesmos cursores nas oito alças, com fallback nativo ----- */
@media (hover: hover) and (pointer: fine) {
  html[data-cursor-mode='custom']
    .desktop-window__resize:is(.desktop-window__resize--n, .desktop-window__resize--s) {
    cursor: var(--ws-cursor-resize-vertical, ns-resize);
  }
  html[data-cursor-mode='custom']
    .desktop-window__resize:is(.desktop-window__resize--e, .desktop-window__resize--w) {
    cursor: var(--ws-cursor-resize-horizontal, ew-resize);
  }
  html[data-cursor-mode='custom']
    .desktop-window__resize:is(.desktop-window__resize--nw, .desktop-window__resize--se) {
    cursor: var(--ws-cursor-resize-diagonal-1, nwse-resize);
  }
  html[data-cursor-mode='custom']
    .desktop-window__resize:is(.desktop-window__resize--ne, .desktop-window__resize--sw) {
    cursor: var(--ws-cursor-resize-diagonal-2, nesw-resize);
  }
  html[data-cursor-mode='custom'] .ws-button[aria-busy='true'] {
    cursor: var(--ws-cursor-wait, wait);
  }
}
/* ----- Padrões responsivos ----- */
/* === Fundamentos responsivos === */
/* ----- Área adaptativa ----- */
.ws-layout {
    width: 100%;
    min-width: 0;
    min-height: 0;
    container-type: inline-size;
}

/* === Toolbars compartilhadas === */
/* ----- Estrutura principal ----- */
.ws-toolbar {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
}

/* ----- Grupos de ações ----- */
.ws-toolbar__group {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* ----- Área flexível ----- */
.ws-toolbar__main {
    min-width: 0;
    flex: 1 1 240px;
}

/* ----- Ações secundárias ----- */
.ws-toolbar__actions {
    display: flex;
    min-width: 0;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* === Grades compartilhadas === */
/* ----- Grade adaptativa ----- */
.ws-grid {
    --ws-grid-minimum: 220px;

    display: grid;
    min-width: 0;
    grid-template-columns:
        repeat(auto-fit, minmax(min(100%, var(--ws-grid-minimum)), 1fr));
    gap: var(--space-4);
}

/* ----- Grade compacta ----- */
.ws-grid--compact {
    --ws-grid-minimum: 160px;
    gap: var(--space-3);
}

/* ----- Grade ampla ----- */
.ws-grid--wide {
    --ws-grid-minimum: 300px;
}

/* ----- Elementos internos ----- */
.ws-grid>* {
    min-width: 0;
}

/* === Listas compartilhadas === */
/* ----- Organização vertical ----- */
.ws-list {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: var(--space-2);
}

/* ----- Itens de lista ----- */
.ws-list>* {
    min-width: 0;
}

/* === Formulários adaptativos === */
/* ----- Grade de campos ----- */
.ws-form-grid {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-4);
}

/* ----- Campo de largura completa ----- */
.ws-form-grid__full {
    grid-column: 1 / -1;
    min-width: 0;
}

/* ----- Ações do formulário ----- */
.ws-form-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--space-2);
}

/* === Layout com painel lateral === */
/* ----- Estrutura principal ----- */
.ws-master-detail {
    display: grid;
    min-width: 0;
    min-height: 0;
    grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
    gap: var(--space-4);
}

/* ----- Lista e detalhes ----- */
.ws-master-detail__master,
.ws-master-detail__detail {
    min-width: 0;
    min-height: 0;
}

/* === Áreas de leitura === */
/* ----- Conteúdo textual ----- */
.ws-reading-area {
    width: 100%;
    max-width: 760px;
    min-width: 0;
    margin-inline: auto;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

/* ----- Conteúdo fluido ----- */
.ws-reading-area--fluid {
    max-width: none;
}

/* === Adaptação ao contêiner === */
/* ----- Área intermediária ----- */
@container (max-width: 680px) {

    .ws-layout .ws-master-detail,
    .ws-layout .ws-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ----- Área compacta ----- */
@container (max-width: 420px) {
    .ws-layout .ws-toolbar {
        align-items: stretch;
    }

    .ws-layout .ws-toolbar__main,
    .ws-layout .ws-toolbar__actions {
        flex-basis: 100%;
    }

    .ws-layout .ws-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ws-layout .ws-form-actions>* {
        width: 100%;
    }
}

/* ----- Área extremamente estreita ----- */
@container (max-width: 360px) {

    .ws-layout .ws-toolbar__group,
    .ws-layout .ws-toolbar__actions {
        align-items: stretch;
    }

    .ws-layout .ws-toolbar__actions {
        flex-direction: column;
    }

    .ws-layout .ws-toolbar__actions>* {
        max-width: 100%;
    }

    .ws-layout .ws-reading-area {
        max-width: 100%;
    }
}

/* === Segurança de layout === */
/* ----- Conteúdo longo ----- */
.ws-toolbar,
.ws-grid,
.ws-list,
.ws-form-grid,
.ws-master-detail {
    overflow-wrap: anywhere;
}

/* === Regiões adaptativas === */
/* ----- Containers compartilhados ----- */
.ws-responsive-region {
    min-width: 0;
    min-height: 0;
    max-width: 100%;
}

/* ----- Região com rolagem independente ----- */
.ws-scroll-region {
    min-width: 0;
    min-height: 0;
    max-width: 100%;

    overflow: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--border-control) transparent;
}

/* ----- Rolagem vertical ----- */
.ws-scroll-region--vertical {
    overflow-x: hidden;
    overflow-y: auto;
}

/* === Conteúdo fluido === */
/* ----- Elementos extensos ----- */
.ws-content-fluid {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

/* ----- Textos longos ----- */
.ws-content-fluid :is(p,
    h1,
    h2,
    h3,
    h4,
    li,
    blockquote) {
    overflow-wrap: anywhere;
}

/* ----- Imagens e vídeos ----- */
.ws-content-fluid :is(img, video) {
    max-width: 100%;
}

/* === Tabelas responsivas === */
/* ----- Contêiner com rolagem horizontal ----- */
.ws-table-scroll {
    width: 100%;
    min-width: 0;
    max-width: 100%;

    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

/* ----- Estrutura da tabela ----- */
.ws-table {
    width: 100%;
    border-collapse: collapse;
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
}

/* ----- Células e cabeçalhos ----- */
.ws-table :is(th, td) {
    padding: var(--space-3);
    border-bottom: 1px solid var(--border-default);
    text-align: left;
    vertical-align: top;
}

/* ----- Cabeçalhos ----- */
.ws-table th {
    color: var(--text-primary);
    font-weight: 800;
}

/* ----- Conteúdo das células ----- */
.ws-table td {
    color: var(--text-secondary);
}

/* ----- Tabela sem quebra de colunas ----- */
.ws-table--nowrap {
    width: max-content;
    min-width: 100%;
}

.ws-table--nowrap :is(th, td) {
    white-space: nowrap;
}

/* ----- Tabela com quebra de texto ----- */
.ws-table--wrap {
    table-layout: fixed;
}

.ws-table--wrap :is(th, td) {
    overflow-wrap: anywhere;
}

/* === Estados interativos das tabelas === */
/* ----- Linhas destacáveis ----- */
@media (hover: hover) {
    .ws-table tbody tr:hover {
        background: var(--surface-secondary);
    }
}

/* ----- Foco dos elementos interativos ----- */
.ws-table :is(button, a, input, select):focus-visible {
    outline: 2px solid var(--accent-secondary);
    outline-offset: 2px;
}

/* === Acessibilidade === */
/* ----- Áreas de toque ----- */
@media (pointer: coarse) {
    .ws-toolbar__actions {
        row-gap: var(--space-3);
    }
}

/* ----- Contraste forçado ----- */
@media (forced-colors: active) {
    .ws-table :is(th, td) {
        border-bottom-color: CanvasText;
    }
}
/* === Configuração global === */
/* ----- Tipografia e aparência ----- */
:root {
  font-family: var(--font-interface);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;

  color: var(--text-primary);
  background: var(--surface-canvas);
}

/* === Reset global === */
/* ----- Dimensionamento dos elementos ----- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ----- Área principal do sistema ----- */
html,
body,
#root {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

/* ----- Largura mínima suportada ----- */
body {
  min-width: 320px;
}

/* === Elementos interativos === */
/* ----- Tipografia dos controles ----- */
button,
input,
textarea {
  font: inherit;
}

/* ----- Cursor nativo de segurança ----- */
button {
  cursor: pointer;
}

/* === Acessibilidade === */
/* ----- Seleção de texto ----- */
::selection {
  background: var(--accent-primary);
  color: #ffffff;
}

/* === Scrollbars globais === */
/* ----- Aparência padrão ----- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-control) transparent;
}

/* ----- Dimensões ----- */
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

/* ----- Indicador de rolagem ----- */
*::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 20px;
  background: var(--border-control);
  background-clip: padding-box;
}

/* ----- Trilho de rolagem ----- */
*::-webkit-scrollbar-track {
  background: transparent;
}/* === Sobreposição do diálogo === */
/* ----- Fundo e posicionamento ----- */
.ws-close-overlay {
  position: fixed;
  inset: 0;
  z-index: 40000;

  display: grid;
  place-items: center;

  padding: 20px;
  background: rgb(0 0 0 / 55%);
}

/* === Janela do diálogo === */
/* ----- Superfície principal ----- */
.ws-close-dialog {
  width: min(420px, 100%);
  max-height: 90dvh;
  overflow: auto;

  padding: 24px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-lg);

  background: var(--surface-primary);
  color: var(--text-primary);

  box-shadow: var(--shadow-floating);
}

/* === Conteúdo === */
/* ----- Título ----- */
.ws-close-dialog h2 {
  margin: 0 0 12px;

  font-size: 20px;
  font-weight: 800;
  line-height: 1.3;
}

/* ----- Descrição ----- */
.ws-close-dialog p {
  margin: 0;

  color: var(--text-secondary);
  line-height: 1.6;
}

/* === Ações === */
/* ----- Organização dos botões ----- */
.ws-close-dialog__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: var(--space-2);

  margin-top: var(--space-6);
}

/* ----- Ajustes específicos do diálogo ----- */
.ws-close-dialog__actions .ws-button {
  flex: 0 1 auto;
}

/* === Responsividade === */
/* ----- Janelas estreitas e dispositivos móveis ----- */
@media (max-width: 480px) {
  .ws-close-overlay {
    padding: 12px;
  }

  .ws-close-dialog {
    padding: 20px;
  }

  .ws-close-dialog__actions {
    flex-direction: column;
  }

  .ws-close-dialog__actions .ws-button {
    width: 100%;
  }
}

/* === Acessibilidade === */
/* ----- Contraste forçado ----- */
@media (forced-colors: active) {
  .ws-close-dialog {
    border-color: CanvasText;
  }
}/* === Tela de inicialização === */
/* ----- Estrutura principal ----- */
.ws-boot {
  --boot-duration: 1500ms;
  --boot-phase-duration: 500ms;

  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font-family: var(--font-interface);
}

/* === Ambiente visual === */
/* ----- Iluminação discreta ----- */
.ws-boot__ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 32% 38% at 50% 44%,
      color-mix(in srgb, var(--accent-secondary) 8%, transparent),
      transparent 86%);
}

/* ----- Grade tecnológica sutil ----- */
.ws-boot__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right,
      color-mix(in srgb, var(--text-secondary) 3%, transparent) 1px,
      transparent 1px),
    linear-gradient(to bottom,
      color-mix(in srgb, var(--text-secondary) 3%, transparent) 1px,
      transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at center,
      black 5%,
      transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at center,
      black 5%,
      transparent 72%);
}

/* === Conteúdo central === */
/* ----- Organização principal ----- */
.ws-boot__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(320px, calc(100vw - 36px));
  text-align: center;
  animation: ws-boot-enter 350ms ease-out both;
}

/* === Símbolo de inicialização === */
/* ----- Área principal do símbolo ----- */
.ws-boot__symbol {
  display: grid;
  place-items: center;
  width: 168px;
  height: 168px;
  margin-bottom: 15px;
}

/* ----- Estrutura do processador ----- */
.ws-boot__symbol-frame {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  box-sizing: border-box;
  border: 1px solid var(--border-default);
  border-radius: 35px;
  background: var(--surface-secondary);
  color: var(--accent-secondary);
  box-shadow:
    0 0 0 8px color-mix(in srgb,
      var(--accent-secondary) 4%,
      transparent),
    0 0 42px color-mix(in srgb,
      var(--accent-secondary) 11%,
      transparent);
}

/* ----- Ícone interno do processador ----- */
.ws-boot__symbol-frame svg {
  display: block;
  width: 76px;
  height: 76px;
  stroke-width: 1.5;
}

/* === Identidade WS OS === */
/* ----- Nome do sistema ----- */
.ws-boot__title {
  margin: 0;
  color: var(--text-primary);
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.07em;
}

.ws-boot__title span {
  color: var(--accent-secondary);
}

/* === Carregamento === */
/* ----- Área compacta ----- */
.ws-boot__loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 165px;
  margin-top: 27px;
  gap: 11px;
}

/* ----- Mensagens sequenciais ----- */
.ws-boot__messages {
  position: relative;
  width: 245px;
  max-width: calc(100vw - 36px);
  height: 20px;
  overflow: hidden;
}

.ws-boot__message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  animation: ws-boot-message var(--boot-phase-duration) ease-in-out both;
}

.ws-boot__message--1 {
  animation-delay: 0ms;
}

.ws-boot__message--2 {
  animation-delay: 500ms;
}

.ws-boot__message--3 {
  animation-delay: 1000ms;
}

/* ----- Barra de progresso ----- */
.ws-boot__progress {
  width: 100%;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-secondary);
}

.ws-boot__progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-secondary);
  transform: scaleX(0);
  transform-origin: left center;
  animation: ws-boot-progress var(--boot-duration) linear forwards;
}

/* === Rodapé === */
/* ----- Versão centralizada ----- */
.ws-boot__footer {
  position: absolute;
  right: 0;
  bottom: 24px;
  left: 0;
  display: flex;
  justify-content: center;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  opacity: 0.7;
}

/* === Acessibilidade === */
/* ----- Anúncio para leitores de tela ----- */
.ws-boot__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* === Animações === */
/* ----- Entrada do conteúdo ----- */
@keyframes ws-boot-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----- Alternância das mensagens ----- */
@keyframes ws-boot-message {
  0% {
    opacity: 0;
  }

  15%,
  85% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

/* ----- Preenchimento da barra ----- */
@keyframes ws-boot-progress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

/* === Responsividade === */
/* ----- Dispositivos móveis ----- */
@media (max-width: 480px) {
  .ws-boot__symbol {
    width: 132px;
    height: 132px;
    margin-bottom: 14px;
  }

  .ws-boot__symbol-frame {
    width: 118px;
    height: 118px;
    border-radius: 28px;
  }

  .ws-boot__symbol-frame svg {
    width: 60px;
    height: 60px;
  }

  .ws-boot__title {
    font-size: 29px;
  }

  .ws-boot__loading {
    max-width: 150px;
    margin-top: 24px;
  }

  .ws-boot__footer {
    bottom: 18px;
    font-size: 9px;
  }
}

/* === Movimento reduzido === */
/* ----- Preferências do dispositivo ----- */
@media (prefers-reduced-motion: reduce) {

  .ws-boot__content,
  .ws-boot__message,
  .ws-boot__progress-fill {
    animation: none;
  }

  .ws-boot__message--1 {
    opacity: 1;
  }

  .ws-boot__progress-fill {
    transform: scaleX(1);
  }
}

/* ----- Preferências internas ----- */
:root[data-reduced-motion='true'] .ws-boot__content,
:root[data-reduced-motion='true'] .ws-boot__message,
:root[data-reduced-motion='true'] .ws-boot__progress-fill,
:root[data-low-effects='true'] .ws-boot__content,
:root[data-low-effects='true'] .ws-boot__message,
:root[data-low-effects='true'] .ws-boot__progress-fill {
  animation: none;
}

:root[data-reduced-motion='true'] .ws-boot__message--1,
:root[data-low-effects='true'] .ws-boot__message--1 {
  opacity: 1;
}

:root[data-reduced-motion='true'] .ws-boot__progress-fill,
:root[data-low-effects='true'] .ws-boot__progress-fill {
  transform: scaleX(1);
}

/* ----- Redução de efeitos visuais ----- */
:root[data-low-effects='true'] .ws-boot__ambient,
:root[data-low-effects='true'] .ws-boot__grid {
  display: none;
}/* === Janela de boas-vindas === */
/* ----- Sobreposição ----- */
.ws-welcome-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: grid;
  place-items: center;
  padding: 18px;
  overflow-y: auto;
  background: rgb(0 0 0 / 60%);
  backdrop-filter: blur(8px);
}

/* ----- Estrutura principal ----- */
.ws-welcome {
  box-sizing: border-box;
  width: min(900px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-primary);
  color: var(--text-primary);
  font-family: var(--font-interface);
  box-shadow: var(--shadow-floating);
}

/* === Cabeçalho === */
/* ----- Marca e indicador de progresso ----- */
.ws-welcome__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border-default);
}

.ws-welcome__brand {
  font-size: 15px;
  letter-spacing: 0.07em;
}

.ws-welcome__progress {
  display: flex;
  align-items: center;
  gap: 7px;
}

.ws-welcome__progress>span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-default);
}

.ws-welcome__progress>span.is-active {
  background: var(--accent-secondary);
}

.ws-welcome__progress small {
  margin-left: 8px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
}

.ws-welcome__eyebrow {
  color: var(--accent-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
}

/* === Primeira etapa === */
/* ----- Distribuição principal ----- */
.ws-welcome__presentation {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  min-height: 440px;
}

/* ----- Identidade do Wally ----- */
.ws-welcome__mascot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 20px;
  overflow: hidden;
  border-right: 1px solid var(--border-default);
  background: var(--surface-secondary);
}

.ws-welcome__mascot-image {
  display: block;
  width: 100%;
  max-width: 340px;
  max-height: 370px;
  object-fit: contain;
}

.ws-welcome__mascot-name {
  position: absolute;
  right: 22px;
  bottom: 20px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

/* ----- Apresentação textual ----- */
.ws-welcome__presentation-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 30px;
  gap: 16px;
}

.ws-welcome h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(23px, 3vw, 30px);
  line-height: 1.25;
}

.ws-welcome h1:focus {
  outline: none;
}

/* ----- Balões de conversa ----- */
.ws-welcome__messages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ws-welcome__bubble {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: 5px 13px 13px 13px;
  background: var(--surface-secondary);
}

.ws-welcome__message-number {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-primary);
  color: var(--accent-secondary);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

.ws-welcome__bubble strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text-primary);
  font-size: 13px;
}

.ws-welcome__bubble p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.65;
}

/* === Segunda etapa === */
/* ----- Composição principal ----- */
.ws-welcome__customization {
  display: flex;
  flex-direction: column;
  padding: 27px 30px;
  gap: 22px;
}

.ws-welcome__intro {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ws-welcome__intro p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* ----- Área de preferências ----- */
.ws-welcome__preferences {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

/* ----- Organização interna dos cards ----- */
.ws-welcome__field {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 0;
  border-radius: var(--radius-md);
  background: var(--surface-secondary);
}

/* ----- Títulos internos dos cards ----- */
.ws-welcome__field legend {
  float: left;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border-default);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}

/* ----- Organizar conteúdo após o título ----- */
.ws-welcome__field legend+* {
  clear: both;
}

/* ----- Opções de tema e idioma ----- */
.ws-welcome__options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ws-welcome .ws-welcome__option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  gap: 9px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.ws-welcome .ws-welcome__option>span {
  color: inherit;
}

.ws-welcome .ws-welcome__option[aria-pressed='true'] {
  border-color: var(--accent-secondary);
  background: var(--surface-primary);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--accent-secondary);
}

.ws-welcome .ws-welcome__option:hover {
  border-color: var(--accent-secondary);
}

.ws-welcome__check {
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--accent-secondary);
}

.ws-welcome__flag {
  display: block;
  width: 31px;
  height: 22px;
  line-height: 0;
}

.ws-welcome__flag svg {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 3px;
}

/* === Cores de destaque === */
/* ----- Seletores de cor ----- */
.ws-welcome__accent-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ws-welcome .ws-welcome__accent-option {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 9px;
  gap: 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ws-welcome .ws-welcome__accent-option[aria-pressed='true'] {
  border-color: var(--accent-secondary);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--accent-secondary);
}

.ws-welcome__color {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border-default);
}

/* === Wallpapers === */
/* ----- Galeria de imagens oficiais ----- */
.ws-welcome__wallpapers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ws-welcome .ws-welcome__wallpaper-option {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 6px;
  gap: 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--surface-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
}

.ws-welcome .ws-welcome__wallpaper-option[aria-pressed='true'] {
  border-color: var(--accent-secondary);
  background: var(--surface-primary);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--accent-secondary);
}

.ws-welcome__wallpaper-preview {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 7px;
  box-sizing: border-box;
  border-radius: var(--radius-sm);
}

.ws-welcome__wallpaper-preview svg {
  box-sizing: content-box;
  padding: 3px;
  border-radius: 50%;
  background: var(--surface-primary);
  color: var(--accent-secondary);
}

/* === Navegação === */
/* ----- Botões principais ----- */
.ws-welcome__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
  padding-top: 8px;
  gap: 12px;
}

.ws-welcome__actions--split {
  justify-content: space-between;
}

.ws-welcome .ws-welcome__primary,
.ws-welcome .ws-welcome__back {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 20px;
  gap: 14px;
  border-radius: var(--radius-md);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ws-welcome .ws-welcome__primary {
  min-width: 160px;
  border: 1px solid transparent;
  background: var(--action-background);
  color: var(--action-text);
}

.ws-welcome .ws-welcome__back {
  border: 1px solid var(--border-default);
  background: var(--surface-secondary);
  color: var(--text-primary);
}

/* === Acessibilidade === */
/* ----- Foco visível ----- */
.ws-welcome button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 3px;
}

/* ----- Efeitos reduzidos ----- */
@media (prefers-reduced-transparency: reduce) {
  .ws-welcome-backdrop {
    backdrop-filter: none;
  }
}

:root[data-reduced-transparency='true'] .ws-welcome-backdrop,
:root[data-low-effects='true'] .ws-welcome-backdrop {
  backdrop-filter: none;
}

/* === Responsividade === */
/* ----- Telas intermediárias ----- */
@media (max-width: 760px) {
  .ws-welcome__presentation {
    grid-template-columns: 1fr;
  }

  .ws-welcome__mascot {
    height: 190px;
    border-right: 0;
    border-bottom: 1px solid var(--border-default);
  }

  .ws-welcome__mascot-image {
    max-height: 210px;
  }

  .ws-welcome__presentation-content {
    padding: 23px;
  }

  .ws-welcome__preferences {
    grid-template-columns: 1fr;
  }
}

/* ----- Mobile ----- */
@media (max-width: 480px) {
  .ws-welcome-backdrop {
    padding: 10px;
  }

  .ws-welcome {
    max-height: calc(100dvh - 20px);
  }

  .ws-welcome__header {
    padding: 15px 18px;
  }

  .ws-welcome__presentation-content,
  .ws-welcome__customization {
    padding: 19px;
  }

  .ws-welcome__accent-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ws-welcome__wallpapers {
    gap: 7px;
  }

  .ws-welcome__actions--split {
    flex-wrap: wrap;
  }
}

/* ----- Telas pequenas ----- */
@media (max-width: 350px) {
  .ws-welcome__options {
    grid-template-columns: 1fr;
  }
}.ws-tooltip {
  position: fixed;
  z-index: 2147483647;

  display: block;
  width: max-content;
  max-width: min(260px, calc(100vw - 16px));

  padding: 7px 10px;

  border: 1px solid var(--border-default);
  border-radius: 8px;

  background: var(--surface-primary);
  color: var(--text-primary);

  box-shadow:
    0 8px 24px rgb(0 0 0 / 20%),
    0 2px 6px rgb(0 0 0 / 10%);

  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;

  pointer-events: auto;
  user-select: none;

  animation: ws-tooltip-enter calc(var(--motion-scale, 1) * 120ms) ease-out both;
}

@keyframes ws-tooltip-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-tooltip {
    animation: none;
  }
}
/* =====================================================
   WS OS — Clock Widget
   Layouts 2x2, 3x2 e 3x3
   ===================================================== */

.desktop__widget[data-widget-id='clock']>.ws-widget {
    overflow: hidden;
    scrollbar-width: none;
    padding: 8px 12px;
}

.desktop__widget[data-widget-id='clock'] .ws-widget::-webkit-scrollbar {
    display: none;
}

.ws-widget--clock {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
}

.ws-clock__content {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    width: 100%;
    min-width: 0;
    min-height: 0;
    gap: 7px;
}

.ws-clock__caption {
    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.ws-widget--clock .ws-clock__time {
    display: block;
    max-width: 100%;
    color: var(--text-primary);

    font-size: 42px;
    font-weight: 750;
    line-height: 1.05;
    letter-spacing: -0.055em;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ws-clock__date {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ws-clock__weekday {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.ws-clock__full-date,
.ws-clock__short-date {
    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.35;
    text-transform: capitalize;
}

.ws-clock__timezone {
    max-width: 100%;
    color: var(--text-secondary);
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-clock__decoration {
    position: absolute;
    right: -35px;
    top: -35px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: radial-gradient(circle,
            color-mix(in srgb,
                var(--accent-secondary) 14%,
                transparent),
            transparent 70%);
    pointer-events: none;
}

/* =====================================================
   2x1 — Compacto: apenas hora
   ===================================================== */

.desktop__widget[data-widget-id='clock'][data-widget-size='2x1'] .ws-clock__content {
    align-items: center;
    justify-content: center;
    gap: 0;
}

.desktop__widget[data-widget-id='clock'][data-widget-size='2x1'] .ws-clock__time {
    font-size: clamp(26px, 3vw, 38px);
}

.desktop__widget[data-widget-id='clock'][data-widget-size='2x1'] .ws-clock__caption,
.desktop__widget[data-widget-id='clock'][data-widget-size='2x1'] .ws-clock__date,
.desktop__widget[data-widget-id='clock'][data-widget-size='2x1'] .ws-clock__timezone {
    display: none;
}

/* =====================================================
   2x2 — Normal: hora + data curta
   ===================================================== */

.desktop__widget[data-widget-id='clock'][data-widget-size='2x2'] .ws-clock__content {
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.desktop__widget[data-widget-id='clock'][data-widget-size='2x2'] .ws-clock__time {
    font-size: clamp(28px, 3vw, 40px);
}

.desktop__widget[data-widget-id='clock'][data-widget-size='2x2'] .ws-clock__caption,
.desktop__widget[data-widget-id='clock'][data-widget-size='2x2'] .ws-clock__weekday,
.desktop__widget[data-widget-id='clock'][data-widget-size='2x2'] .ws-clock__full-date,
.desktop__widget[data-widget-id='clock'][data-widget-size='2x2'] .ws-clock__timezone {
    display: none;
}

.desktop__widget[data-widget-id='clock'][data-widget-size='2x2'] .ws-clock__short-date {
    display: block;
    font-size: 12px;
    text-align: center;
}

/* =====================================================
   3x2 — Expandido: hora + data completa
   ===================================================== */

.desktop__widget[data-widget-id='clock'][data-widget-size='3x2'] .ws-clock__content {
    align-items: flex-start;
    justify-content: center;
    gap: 9px;
}

.desktop__widget[data-widget-id='clock'][data-widget-size='3x2'] .ws-clock__time {
    font-size: clamp(36px, 3.6vw, 50px);
}

.desktop__widget[data-widget-id='clock'][data-widget-size='3x2'] .ws-clock__caption,
.desktop__widget[data-widget-id='clock'][data-widget-size='3x2'] .ws-clock__short-date,
.desktop__widget[data-widget-id='clock'][data-widget-size='3x2'] .ws-clock__timezone {
    display: none;
}

.desktop__widget[data-widget-id='clock'][data-widget-size='3x2'] .ws-clock__weekday {
    display: block;
    font-size: 13px;
}

.desktop__widget[data-widget-id='clock'][data-widget-size='3x2'] .ws-clock__full-date {
    display: block;
    font-size: 12px;
}/* =====================================================
   WS OS — Calendar Widget
   ===================================================== */

.desktop__widget[data-widget-id='calendar'] > .ws-widget {
  overflow: hidden;
  scrollbar-width: none;
}

.ws-widget--calendar {
  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;

  gap: 9px;
  padding: 12px;

  box-sizing: border-box;
  overflow: hidden;
}

/* Cabeçalho interno */

.ws-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;

  min-width: 0;
  gap: 8px;
}

.ws-calendar__heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.ws-calendar__eyebrow {
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ws-calendar__month {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: capitalize;
}

.ws-calendar__navigation {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 4px;
}

.ws-calendar__nav-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;

  padding: 0;
  border: 1px solid var(--border-default);
  border-radius: 9px;

  background: var(--surface-secondary);
  color: var(--text-primary);

  cursor: pointer;
  transition:
    background calc(var(--motion-scale, 1) * 150ms) ease,
    border-color calc(var(--motion-scale, 1) * 150ms) ease;
}

.ws-calendar__nav-button:hover {
  background: var(--surface-primary);
  border-color: var(--accent-secondary);
}

/* Grade */

.ws-calendar__grid {
  display: grid;

  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 18px;
  grid-auto-rows: minmax(0, 1fr);

  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;

  gap: 2px;
  overflow: hidden;
}

.ws-calendar__weekday,
.ws-calendar__day {
  display: flex;
  align-items: center;
  justify-content: center;

  min-width: 0;
  min-height: 0;
  text-align: center;
}

.ws-calendar__weekday {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
  text-transform: capitalize;
}

.ws-calendar__day {
  font-size: 11px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;

  border: 1px solid transparent;
  border-radius: 7px;

  color: var(--text-primary);
}

/* Dias dos meses anterior e seguinte */

.ws-calendar__day--outside {
  color: var(--text-secondary);
  opacity: 0.48;
}

/* Data atual */

.ws-calendar__day--today {
  color: var(--action-text);
  background: var(--action-background);
  border-color: var(--action-background);
  font-weight: 750;
  opacity: 1;
}

/* Rodapé */

.ws-calendar__footer {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 auto;
  min-height: 29px;
  padding-right: 22px;
}

.ws-calendar__today-label {
  color: var(--text-secondary);
  font-size: 10px;
}

.ws-calendar__today-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  gap: 7px;
  min-height: 28px;

  padding: 5px 12px;
  border: 1px solid var(--border-default);
  border-radius: 999px;

  background: var(--surface-secondary);
  color: var(--text-primary);

  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;

  cursor: pointer;
  transition:
    background calc(var(--motion-scale, 1) * 150ms) ease,
    border-color calc(var(--motion-scale, 1) * 150ms) ease,
    color calc(var(--motion-scale, 1) * 150ms) ease;
}

.ws-calendar__today-button:hover {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

/* 3 × 3 — Compacto */

.desktop__widget[data-widget-id='calendar'][data-widget-size='3x3'] .ws-widget--calendar {
  gap: 6px;
  padding: 9px;
}

.desktop__widget[data-widget-id='calendar'][data-widget-size='3x3'] .ws-calendar__month {
  font-size: 12px;
}

.desktop__widget[data-widget-id='calendar'][data-widget-size='3x3'] .ws-calendar__day {
  font-size: 10px;
}

.desktop__widget[data-widget-id='calendar'][data-widget-size='3x3'] .ws-calendar__footer {
  min-height: 24px;
}

/* 4 × 4 — Ampliado */

.desktop__widget[data-widget-id='calendar'][data-widget-size='4x4'] .ws-calendar__month {
  font-size: 16px;
}

.desktop__widget[data-widget-id='calendar'][data-widget-size='4x4'] .ws-calendar__grid {
  gap: 5px;
}

.desktop__widget[data-widget-id='calendar'][data-widget-size='4x4'] .ws-calendar__day {
  font-size: 13px;
}

/* Preferências de acessibilidade */

@media (prefers-reduced-motion: reduce) {
  .ws-calendar__nav-button,
  .ws-calendar__today-button {
    transition: none;
  }
}

/* === Indicador discreto de evento público, também descrito no nome acessível === */
.ws-calendar__day--event {
  position: relative;
}
.ws-calendar__day--event::after {
  content: '';
  position: absolute;
  bottom: 1px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}
/* =====================================================
   WS OS — Weather Widget
   ===================================================== */

.desktop__widget[data-widget-id='weather']>.ws-widget {
    overflow: hidden;
    scrollbar-width: none;
}

.ws-widget--weather {
    display: flex;
    flex-direction: column;
    gap: 12px;

    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;

    padding: 12px;
    box-sizing: border-box;
    overflow: hidden;

    color: var(--text-primary);
}

/* Cabeçalho */

.ws-weather-widget__header,
.ws-weather-widget__heading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ws-weather-widget__header {
    justify-content: space-between;
    flex: 0 0 auto;
}

.ws-weather-widget__heading {
    font-size: 12px;
    font-weight: 650;
}

.ws-weather-widget__heading svg {
    color: var(--accent-secondary);
}

.ws-weather-widget__refresh {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;

    padding: 0;
    border: 1px solid var(--border-default);
    border-radius: 9px;

    background: var(--surface-secondary);
    color: var(--text-secondary);

    cursor: pointer;
}

.ws-weather-widget__refresh:hover {
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.ws-weather-widget__refresh:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ws-weather-widget__refresh .is-loading {
    animation: ws-weather-spin 1s linear infinite;
}

@keyframes ws-weather-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Condições atuais */

.ws-weather-widget__current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    flex: 0 0 auto;
    min-width: 0;
}

.ws-weather-widget__summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
}

.ws-weather-widget__temperature {
    font-size: 46px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.06em;
    font-variant-numeric: tabular-nums;
}

.ws-weather-widget__condition {
    max-width: 100%;
    font-size: 11px;
    line-height: 1.35;
    color: var(--text-secondary);
}

.ws-weather-widget__unit {
    display: none;
    font-size: 10px;
    color: var(--text-secondary);
}

.ws-weather-widget__main-icon {
    flex-shrink: 0;
    color: var(--accent-secondary);
}

/* Métricas */

.ws-weather-widget__details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    min-width: 0;
}

.ws-weather-widget__detail {
    display: flex;
    align-items: center;
    gap: 6px;

    min-width: 0;
    padding: 8px 6px;

    border: 1px solid var(--border-default);
    border-radius: 9px;

    background: color-mix(in srgb,
            var(--surface-secondary) 65%,
            transparent);
}

.ws-weather-widget__detail>svg {
    flex-shrink: 0;
    color: var(--accent-secondary);
}

.ws-weather-widget__detail>div {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ws-weather-widget__detail span {
    font-size: 9px;
    color: var(--text-secondary);
}

.ws-weather-widget__detail strong {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* Previsão */

.ws-weather-widget__forecast {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;

    min-width: 0;
    min-height: 0;
    margin-top: auto;
}

.ws-weather-widget__day {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;

    min-width: 0;
    padding: 8px 4px;

    border: 1px solid var(--border-default);
    border-radius: 10px;

    background: color-mix(in srgb,
            var(--surface-secondary) 60%,
            transparent);

    text-align: center;
    font-size: 11px;
}

.ws-weather-widget__day svg {
    color: var(--accent-secondary);
}

.ws-weather-widget__day strong {
    font-size: 12px;
}

.ws-weather-widget__day small {
    font-size: 10px;
    color: var(--text-secondary);
}

/* Estados */

.ws-weather-widget__empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 0;
    text-align: center;
}

.ws-weather-widget__empty>svg {
    color: var(--accent-secondary);
}

.ws-weather-widget__empty p {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
}

.ws-weather-widget__empty button {
    padding: 7px 12px;
    border: 1px solid var(--border-default);
    border-radius: 8px;
    background: var(--surface-secondary);
    color: var(--text-primary);
    cursor: pointer;
}

.ws-weather-widget__error {
    margin: 0;
    font-size: 10px;
    color: var(--status-error);
}

/* =====================================================
   2×2 — Compacto
   ===================================================== */

.desktop__widget[data-widget-id='weather'][data-widget-size='2x2'] .ws-widget--weather {
    gap: 7px;
    padding: 10px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='2x2'] .ws-weather-widget__header,
.desktop__widget[data-widget-id='weather'][data-widget-size='2x2'] .ws-weather-widget__details,
.desktop__widget[data-widget-id='weather'][data-widget-size='2x2'] .ws-weather-widget__forecast,
.desktop__widget[data-widget-id='weather'][data-widget-size='2x2'] .ws-weather-widget__unit,
.desktop__widget[data-widget-id='weather'][data-widget-size='2x2'] .ws-weather-widget__error {
    display: none;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='2x2'] .ws-weather-widget__current {
    flex: 1;
    align-items: center;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='2x2'] .ws-weather-widget__temperature {
    font-size: 34px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='2x2'] .ws-weather-widget__main-icon {
    width: 37px;
    height: 37px;
}

/* =====================================================
   3×2 — Padrão
   ===================================================== */

.desktop__widget[data-widget-id='weather'][data-widget-size='3x2'] .ws-widget--weather {
    gap: 8px;
    padding: 10px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='3x2'] .ws-weather-widget__forecast {
    display: none;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='3x2'] .ws-weather-widget__temperature {
    font-size: 37px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='3x2'] .ws-weather-widget__main-icon {
    width: 40px;
    height: 40px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='3x2'] .ws-weather-widget__details {
    gap: 4px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='3x2'] .ws-weather-widget__detail {
    gap: 4px;
    padding: 6px 4px;
}

/* =====================================================
   4×3 — Layout expandido e compacto
   ===================================================== */

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-widget--weather {
    gap: 7px;
    padding: 9px 11px;
    overflow: hidden;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__header {
    min-height: 25px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__refresh {
    width: 25px;
    height: 25px;
    min-width: 25px;
    min-height: 25px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__current {
    gap: 6px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__summary {
    gap: 3px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__temperature {
    font-size: 40px;
    line-height: 1;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__condition {
    font-size: 11px;
    line-height: 1.25;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__main-icon {
    width: 42px;
    height: 42px;
}

/* Métricas */

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__details {
    gap: 5px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__detail {
    min-width: 0;
    padding: 5px 6px;
    gap: 5px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__detail>svg {
    width: 13px;
    height: 13px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__detail span {
    font-size: 9px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__detail strong {
    font-size: 10px;
}

/* Previsão */

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__forecast {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 0;
    gap: 5px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__day {
    gap: 3px;
    padding: 4px 2px;
    min-height: 0;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__day svg {
    width: 16px;
    height: 16px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__day strong {
    font-size: 11px;
}

.desktop__widget[data-widget-id='weather'][data-widget-size='4x3'] .ws-weather-widget__day small {
    font-size: 9px;
}

/* Acessibilidade */

@media (prefers-reduced-motion: reduce) {
    .ws-weather-widget__refresh .is-loading {
        animation: none;
    }
}

:root[data-reduced-motion='true'] .ws-weather-widget__refresh .is-loading,
:root[data-low-effects='true'] .ws-weather-widget__refresh .is-loading {
    animation: none;
}/* =====================================================
   WS OS — Dev Insights Widget
   ===================================================== */

.desktop__widget[data-widget-id='dev-insights']>.ws-widget {
    overflow: hidden;
    scrollbar-width: none;
}

.ws-widget--dev-insights {
    display: flex;
    flex-direction: column;
    gap: 9px;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    padding: 11px;
    box-sizing: border-box;
    overflow: hidden;
    color: var(--text-primary);
}

/* Cabeçalho */

.ws-dev-widget__header,
.ws-dev-widget__heading {
    display: flex;
    align-items: center;
    gap: 7px;
}

.ws-dev-widget__header {
    justify-content: space-between;
    flex: 0 0 auto;
    min-width: 0;
}

.ws-dev-widget__heading {
    min-width: 0;
    font-size: 12px;
}

.ws-dev-widget__heading svg {
    flex-shrink: 0;
    color: var(--accent-secondary);
}

.ws-dev-widget__refresh {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 27px;
    height: 27px;
    min-width: 27px;
    min-height: 27px;
    padding: 0;

    border: 1px solid var(--border-default);
    border-radius: 9px;
    background: var(--surface-secondary);
    color: var(--text-secondary);
    cursor: pointer;
}

.ws-dev-widget__refresh:hover {
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.ws-dev-widget__refresh .is-loading {
    animation: ws-dev-spin 1s linear infinite;
}

@keyframes ws-dev-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Métricas */

.ws-dev-widget__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    min-width: 0;
    min-height: 0;
}

.ws-dev-widget__metric {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--border-default);
    border-radius: 10px;

    background: color-mix(in srgb,
            var(--surface-secondary) 65%,
            transparent);
}

.ws-dev-widget__metric-label {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    color: var(--text-secondary);
}

.ws-dev-widget__metric-label svg {
    flex-shrink: 0;
    color: var(--accent-secondary);
}

.ws-dev-widget__metric-label span {
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ws-dev-widget__metric>strong {
    font-size: 22px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

/* Linguagem */

.ws-dev-widget__language {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    min-width: 0;
    padding: 9px;
    border: 1px solid var(--border-default);
    border-radius: 9px;
    background: var(--surface-secondary);
    font-size: 11px;
}

.ws-dev-widget__language svg {
    color: var(--accent-secondary);
}

.ws-dev-widget__language>span,
.ws-dev-widget__language>small {
    color: var(--text-secondary);
}

.ws-dev-widget__language>strong {
    margin-left: auto;
}

.ws-dev-widget__language>small {
    font-size: 9px;
}

/* Estados e rodapé */

.ws-dev-widget__status-area {
    min-height: 0;
}

.ws-dev-widget__status-area p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.35;
}

.ws-dev-widget__footer {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: auto;
    color: var(--text-secondary);
    font-size: 10px;
}

/* =====================================================
   2x2 — Somente GitHub
   ===================================================== */

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-widget--dev-insights {
    padding: 9px;
    gap: 7px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__header,
.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__metric--followers,
.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__metric--wakatime,
.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__language,
.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__status-area,
.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__footer {
    display: none;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__metrics {
    flex: 1;
    align-content: center;
    gap: 5px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__metric {
    padding: 7px 5px;
    gap: 8px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__metric-label svg {
    width: 12px;
    height: 12px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__metric-label span {
    font-size: 9px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='2x2'] .ws-dev-widget__metric>strong {
    font-size: 22px;
}

/* =====================================================
   3x2 — Quatro métricas
   ===================================================== */

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='3x2'] .ws-widget--dev-insights {
    padding: 9px;
    gap: 5px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='3x2'] .ws-dev-widget__header,
.desktop__widget[data-widget-id='dev-insights'][data-widget-size='3x2'] .ws-dev-widget__language,
.desktop__widget[data-widget-id='dev-insights'][data-widget-size='3x2'] .ws-dev-widget__status-area,
.desktop__widget[data-widget-id='dev-insights'][data-widget-size='3x2'] .ws-dev-widget__footer {
    display: none;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='3x2'] .ws-dev-widget__metrics {
    flex: 1;
    align-content: center;
    gap: 5px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='3x2'] .ws-dev-widget__metric {
    padding: 6px 8px;
    gap: 5px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='3x2'] .ws-dev-widget__metric>strong {
    font-size: 20px;
}

/* =====================================================
   4x3 — Expandido
   ===================================================== */

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='4x3'] .ws-widget--dev-insights {
    gap: 7px;
    padding: 10px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='4x3'] .ws-dev-widget__metric {
    padding: 7px 9px;
    gap: 5px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='4x3'] .ws-dev-widget__metric>strong {
    font-size: 21px;
}

.desktop__widget[data-widget-id='dev-insights'][data-widget-size='4x3'] .ws-dev-widget__footer {
    padding-right: 30px;
}

/* Acessibilidade */

@media (prefers-reduced-motion: reduce) {
    .ws-dev-widget__refresh .is-loading {
        animation: none;
    }
}

:root[data-reduced-motion='true'] .ws-dev-widget__refresh .is-loading,
:root[data-low-effects='true'] .ws-dev-widget__refresh .is-loading {
    animation: none;
}/* === CENTRAL DE CONTROLE === */
/* ----- Estrutura e vidro do painel ----- */
.taskbar-quick-controls.ws-controls {
  display: flex;
  flex-direction: column;
  width: min(405px, calc(100vw - 24px));
  height: auto;
  max-height: calc(100dvh - 90px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
  backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
}

/* ----- Cabeçalho ----- */
.ws-controls__header {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border-default);
}

.ws-controls__heading-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-secondary) 55%, transparent);
  color: var(--accent-secondary);
}

.ws-controls__heading {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ws-controls__heading strong {
  font-size: 14px;
  font-weight: 750;
}

.ws-controls__heading small {
  color: var(--text-secondary);
  font-size: 11px;
}

.ws-controls__icon-button {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.ws-controls__icon-button:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

/* === CONTEÚDO DO PAINEL === */
/* ----- Organização sem rolagem ----- */
.ws-controls__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  overflow: visible;
}

.ws-controls__section-header strong {
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

/* ----- Grade de ações rápidas ----- */
.ws-controls__tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.ws-control-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 8px;
  min-height: 88px;
  min-height: 92px;
  padding: 10px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-secondary) 65%, transparent);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: border-color calc(var(--motion-scale, 1) * 150ms) ease,
    background-color calc(var(--motion-scale, 1) * 150ms) ease,
    transform calc(var(--motion-scale, 1) * 150ms) ease;
}

.ws-control-tile:hover:not(:disabled) {
  border-color: var(--accent-secondary);
  transform: translateY(-1px);
}

.ws-control-tile--active {
  border-color: color-mix(in srgb, var(--accent-secondary) 65%, var(--border-default));
  background: color-mix(in srgb, var(--accent-secondary) 12%, var(--surface-secondary));
}

.ws-control-tile__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.ws-control-tile__icon {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-primary) 65%, transparent);
  color: var(--accent-secondary);
}

.ws-control-tile__check {
  color: var(--accent-secondary);
}

.ws-control-tile__text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.ws-control-tile__text strong {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.ws-control-tile__text small {
  color: var(--text-secondary);
  font-size: 10px;
}

/* === IDIOMA === */
/* ----- Linha de seleção ----- */
.ws-controls__locale {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 9px 11px;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface-secondary) 65%, transparent);
}

.ws-controls__locale-icon {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-primary) 65%, transparent);
  color: var(--accent-secondary);
}

.ws-controls__locale-label {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.ws-controls__locale-label strong {
  font-size: 11px;
  font-weight: 650;
}

.ws-controls__locale select {
  width: 116px;
  max-width: 45%;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-primary);
  color: var(--text-primary);
  font-size: 11px;
  cursor: pointer;
}

/* === RODAPÉ === */
/* ----- Acesso às Configurações ----- */
.ws-controls__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-top: 1px solid var(--border-default);
  background: transparent;
}

.ws-controls__footer>span {
  color: var(--text-secondary);
  font-size: 10px;
}

.ws-controls__footer>button {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.ws-controls__footer>button:hover {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
}

.ws-controls button:focus-visible,
.ws-controls select:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* === TASKBAR COM OCULTAÇÃO AUTOMÁTICA === */
/* ----- Preservar posicionamento existente ----- */
.taskbar-container--auto-hide {
  bottom: 16px;
  transform: translate(-50%, calc(100% + 8px));
  transition: transform calc(var(--motion-scale, 1) * 180ms) ease;
}

.taskbar-container--auto-hide:hover,
.taskbar-container--auto-hide:focus-within {
  transform: translate(-50%, 0);
}

/* === RESPONSIVIDADE E ACESSIBILIDADE === */
/* ----- Alturas reduzidas ----- */
@media (max-height: 650px) {
  .taskbar-quick-controls.ws-controls {
    max-height: calc(100dvh - 85px);
  }
}

/* ----- Larguras reduzidas ----- */
@media (max-width: 360px) {
  .ws-controls__content {
    padding: 11px;
  }

  .ws-control-tile {
    padding: 9px;
  }

  .ws-controls__footer>span {
    display: none;
  }
}

/* ----- Preferência de movimento reduzido ----- */
@media (prefers-reduced-motion: reduce) {

  .ws-control-tile,
  .taskbar-container--auto-hide {
    transition: none;
  }
}

:root[data-reduced-motion='true'] .ws-control-tile,
:root[data-low-effects='true'] .ws-control-tile {
  transition: none;
}/* === PAINEL COMPACTO DO WALLY === */
/* ----- Estrutura e vidro global ----- */
.taskbar-wally.ws-wally {
  display: flex;
  flex-direction: column;
  width: min(410px, calc(100vw - 24px));
  height: min(490px, calc(100dvh - 100px));
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
}

/* === CABEÇALHO === */
/* ----- Estrutura ----- */
.ws-wally__header {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
  padding: 14px 15px;
  border-bottom: 1px solid var(--border-default);
}

/* ----- Superfícies dos avatares ----- */
.ws-wally__avatar,
.ws-wally__message-avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border-default);
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

/* ----- Avatar principal ----- */
.ws-wally__avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

/* ----- Identificação ----- */
.ws-wally__identity {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

/* ----- Nome ----- */
.ws-wally__identity strong {
  font-size: 14px;
  font-weight: 750;
}

/* ----- Estado ----- */
.ws-wally__identity small {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Indicador de disponibilidade ----- */
.ws-wally__status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #39b98a;
}

/* ----- Ações do cabeçalho ----- */
.ws-wally__header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ----- Botões ----- */
.ws-wally__header-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ----- Interação dos botões ----- */
.ws-wally__header-actions button:hover:not(:disabled) {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

/* ----- Ações indisponíveis ----- */
.ws-wally__header-actions button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* === ÁREA DE CONVERSA === */
/* ----- Histórico com rolagem ----- */
.ws-wally__messages {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px 15px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
  scrollbar-gutter: stable;
}

/* ----- Abertura inicial sem barra de rolagem ----- */
.ws-wally__messages:has(.ws-wally__welcome) {
  overflow-y: hidden;
  scrollbar-gutter: auto;
}

/* === APRESENTAÇÃO INICIAL === */
/* ----- Distribuição de conteúdo ----- */
.ws-wally__welcome {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 11px;
  min-height: 0;
  padding-block: 8px;
  text-align: center;
}

/* ----- Símbolo de boas-vindas ----- */
.ws-wally__welcome-symbol {
  display: grid;
  place-items: center;
  width: 59px;
  height: 59px;
  margin-bottom: 3px;
  border: 1px solid var(--border-default);
  border-radius: 18px;
  background: color-mix(in srgb, var(--accent-secondary) 10%, var(--surface-secondary));
  color: var(--accent-secondary);
}

/* ----- Título ----- */
.ws-wally__welcome h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
}

/* ----- Descrição ----- */
.ws-wally__welcome p {
  max-width: 260px;
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
}

/* ----- Título das sugestões ----- */
.ws-wally__suggestion-title {
  align-self: stretch;
  margin-top: 14px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
  text-align: left;
}

/* ----- Grade de sugestões ----- */
.ws-wally__suggestions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

/* ----- Botões de sugestões ----- */
.ws-wally__suggestions button {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 42px;
  padding: 8px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

/* ----- Ícone inicial ----- */
.ws-wally__suggestions button svg:first-child {
  flex-shrink: 0;
  color: var(--accent-secondary);
}

/* ----- Indicador de navegação ----- */
.ws-wally__suggestions button svg:last-child {
  flex-shrink: 0;
  margin-left: auto;
}

/* ----- Interação ----- */
.ws-wally__suggestions button:hover {
  border-color: var(--accent-secondary);
}

/* === MENSAGENS === */
/* ----- Lista de mensagens ----- */
.ws-wally__conversation {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* ----- Estrutura de mensagem ----- */
.ws-wally__message {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
}

/* ----- Mensagens do visitante ----- */
.ws-wally__message--user {
  justify-content: flex-end;
}

/* ----- Avatar da resposta ----- */
.ws-wally__message-avatar {
  width: 27px;
  height: 27px;
  border-radius: 9px;
}

/* ----- Bolha de mensagem ----- */
.ws-wally__bubble {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
  max-width: 84%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: var(--surface-secondary);
}

/* ----- Bolha do visitante ----- */
.ws-wally__message--user .ws-wally__bubble {
  background: color-mix(in srgb, var(--accent-secondary) 13%, var(--surface-primary));
  border-color: color-mix(in srgb, var(--accent-secondary) 30%, var(--border-default));
  border-bottom-right-radius: 4px;
}

/* ----- Bolha do assistente ----- */
.ws-wally__message--assistant .ws-wally__bubble {
  max-width: 90%;
  border-bottom-left-radius: 4px;
}

/* ----- Texto das mensagens ----- */
.ws-wally__bubble p {
  margin: 0;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ----- Avisos nas mensagens ----- */
.ws-wally__bubble small {
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Ações sugeridas pelo Wally ----- */
.ws-wally__app-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-primary);
  color: var(--accent-secondary);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

/* ----- Interação nas ações ----- */
.ws-wally__app-action:hover {
  border-color: var(--accent-secondary);
}

/* === CAMPO DE PERGUNTA === */
/* ----- Área inferior ----- */
.ws-wally__composer-area {
  flex: 0 0 auto;
  padding: 12px 14px;
  border-top: 1px solid var(--border-default);
}

/* ----- Formulário ----- */
.ws-wally__composer {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 43px;
  padding: 5px 5px 5px 12px;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: var(--surface-secondary);
}

/* ----- Foco no campo ----- */
.ws-wally__composer:focus-within {
  border-color: var(--accent-secondary);
}

/* ----- Entrada de texto ----- */
.ws-wally__composer input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}

/* ----- Texto de orientação ----- */
.ws-wally__composer input::placeholder {
  color: var(--text-secondary);
}

/* ----- Botão de envio ----- */
.ws-wally__composer>button {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--accent-secondary);
  color: var(--surface-primary);
  cursor: pointer;
}

/* ----- Envio indisponível ----- */
.ws-wally__composer>button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ----- Rodapé do formulário ----- */
.ws-wally__composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
}

/* ----- Indicação de provedor ----- */
.ws-wally__composer-footer>span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Acesso ao Wally Estendido ----- */
.ws-wally__composer-footer>button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-secondary);
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

/* ----- Interação com acesso estendido ----- */
.ws-wally__composer-footer>button:hover {
  text-decoration: underline;
}

/* === VALIDAÇÃO E RESPOSTA REMOTA === */
/* ----- Área de verificação ----- */
.ws-wally__verification {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}

/* ----- Largura do desafio ----- */
.ws-wally__verification>div {
  max-width: 100%;
}

/* ----- Mensagem de verificação ----- */
.ws-wally__verification-info,
.ws-wally__verification p {
  margin: 6px 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* ----- Espaçamento do aviso ----- */
.ws-wally__verification-info {
  padding: 7px 0;
}

/* ----- Resposta em andamento ----- */
.ws-wally__responding {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: var(--text-secondary, #9ca3af);
  font-size: 12px;
}

/* ----- Texto de espera ----- */
.ws-wally__responding span {
  flex: 1;
  min-width: 0;
}

/* ----- Cancelamento de resposta ----- */
.ws-wally__responding button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  padding: 5px 8px;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

/* ----- Ícone de carregamento ----- */
.ws-wally__loading-icon {
  flex-shrink: 0;
  animation: ws-wally-spin 1s linear infinite;
}

/* ----- Animação de carregamento ----- */
@keyframes ws-wally-spin {
  to {
    transform: rotate(360deg);
  }
}

/* === ACESSIBILIDADE === */
/* ----- Foco visível ----- */
.ws-wally button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* ----- Preferência do sistema para reduzir movimento ----- */
@media (prefers-reduced-motion: reduce) {
  .ws-wally__loading-icon {
    animation: none;
  }
}

/* === RESPONSIVIDADE === */
/* ----- Altura reduzida ----- */
@media (max-height: 600px) {
  .taskbar-wally.ws-wally {
    height: min(390px, calc(100dvh - 85px));
  }

  .ws-wally__welcome {
    justify-content: flex-start;
  }
}

/* ----- Compactação da abertura inicial ----- */
@media (max-height: 650px) {
  .ws-wally__welcome {
    gap: 8px;
  }

  .ws-wally__welcome-symbol {
    width: 46px;
    height: 46px;
    margin-bottom: 0;
  }

  .ws-wally__suggestion-title {
    margin-top: 6px;
  }

  .ws-wally__suggestions button {
    min-height: 32px;
    padding: 6px;
  }
}/* === PAINEL DE CALENDÁRIO === */
/* ----- Superfície compartilhada com os painéis da V2 ----- */
.taskbar-calendar {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--panel-shadow, var(--shadow-floating));
}

/* ----- Dimensionamento interno ----- */
.taskbar-calendar *,
.taskbar-calendar *::before,
.taskbar-calendar *::after {
  box-sizing: border-box;
}

/* === CABEÇALHO === */
/* ----- Organização principal ----- */
.taskbar-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-default);
}

/* ----- Identidade do painel ----- */
.taskbar-calendar__heading {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

/* ----- Ícone do calendário ----- */
.taskbar-calendar__heading-icon {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  border: 1px solid var(--border-default);
  border-radius: 11px;
  background: color-mix(in srgb, var(--accent-secondary) 10%, var(--surface-secondary));
  color: var(--accent-secondary);
}

/* ----- Título e mês ----- */
.taskbar-calendar__heading-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

/* ----- Título ----- */
.taskbar-calendar__heading-copy strong {
  font-size: 13px;
  font-weight: 750;
}

/* ----- Mês exibido ----- */
.taskbar-calendar__heading-copy small {
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  text-transform: capitalize;
  white-space: nowrap;
}

/* ----- Grupo de ações ----- */
.taskbar-calendar__actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

/* ----- Comportamento dos botões ----- */
.taskbar-calendar button {
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* ----- Ações do cabeçalho ----- */
.taskbar-calendar__actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
}

/* ----- Realce dos botões ----- */
.taskbar-calendar__actions button:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

/* ----- Botão de retorno ao dia atual ----- */
.taskbar-calendar__actions .taskbar-calendar__today-button {
  width: auto;
  padding: 0 9px;
  border-color: var(--border-default);
  background: color-mix(in srgb, var(--surface-secondary) 78%, transparent);
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 650;
}

/* === CONTEÚDO === */
/* ----- Grade e agenda com rolagem apenas quando necessária ----- */
.taskbar-calendar__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

/* ----- Avisos dos eventos externos ----- */
.taskbar-calendar__notice {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* === GRADE MENSAL === */
/* ----- Sete colunas, começando pelo domingo ----- */
.taskbar-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  text-align: center;
}

/* ----- Estrutura das células ----- */
.taskbar-calendar__grid>span,
.taskbar-calendar__date {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* ----- Dias da semana ----- */
.taskbar-calendar__grid>.taskbar-calendar__weekday {
  height: 25px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}

/* ----- Datas clicáveis ----- */
.taskbar-calendar__date {
  position: relative;
  background: color-mix(in srgb, var(--surface-secondary) 46%, transparent);
}

/* ----- Datas dos meses vizinhos ----- */
.taskbar-calendar__date.taskbar-calendar__outside {
  color: var(--text-secondary);
  opacity: 0.5;
}

/* ----- Interação com meses vizinhos ----- */
.taskbar-calendar__date.taskbar-calendar__outside:hover {
  opacity: 0.85;
}

/* ----- Preservar destaque fora do mês atual ----- */
.taskbar-calendar__date.taskbar-calendar__outside.taskbar-calendar__today,
.taskbar-calendar__date.taskbar-calendar__outside.taskbar-calendar__selected {
  opacity: 1;
}

/* ----- Passagem do ponteiro ----- */
.taskbar-calendar__date:hover {
  background: var(--surface-secondary);
}

/* ----- Dia atual ----- */
.taskbar-calendar__date.taskbar-calendar__today {
  border-color: var(--accent-secondary);
  color: var(--accent-secondary);
  font-weight: 750;
}

/* ----- Dia selecionado ----- */
.taskbar-calendar__date.taskbar-calendar__selected {
  background: var(--action-background);
  color: var(--action-text);
  font-weight: 750;
}

/* ----- Marcadores de feriados e eventos ----- */
.taskbar-calendar__date.taskbar-calendar__holiday::after,
.taskbar-calendar__date.taskbar-calendar__event::after {
  position: absolute;
  bottom: 3px;
  left: 50%;
  width: 4px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--accent-secondary);
  content: '';
}

/* ----- Marcador de evento público ----- */
.taskbar-calendar__date.taskbar-calendar__event:not(.taskbar-calendar__holiday)::after {
  background: var(--text-secondary);
}

/* ----- Marcador do dia selecionado ----- */
.taskbar-calendar__date.taskbar-calendar__selected::after {
  background: currentColor;
}

/* === AGENDA === */
/* ----- Card da data selecionada ----- */
.taskbar-calendar__agenda {
  padding: 13px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface-secondary) 76%, transparent);
}

/* ----- Cabeçalho da agenda ----- */
.taskbar-calendar__agenda-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ----- Data selecionada ----- */
.taskbar-calendar__agenda-heading strong {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
  text-transform: capitalize;
}

/* ----- Quantidade de eventos ----- */
.taskbar-calendar__agenda-heading span {
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Ausência de eventos ----- */
.taskbar-calendar__no-events {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* ----- Lista da agenda ----- */
.taskbar-calendar__agenda-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

/* ----- Linha de evento ----- */
.taskbar-calendar__agenda-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

/* ----- Ícone de evento ----- */
.taskbar-calendar__agenda-item>svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--accent-secondary);
}

/* ----- Conteúdo de evento ----- */
.taskbar-calendar__agenda-item div {
  min-width: 0;
}

/* ----- Nome do evento ----- */
.taskbar-calendar__agenda-item strong {
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ----- Descrição do evento ----- */
.taskbar-calendar__agenda-item p {
  margin: 3px 0;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ----- Link externo ----- */
.taskbar-calendar__agenda-item a {
  color: var(--accent-secondary);
  font-size: 10px;
  text-decoration: underline;
  overflow-wrap: anywhere;
}

/* === ACESSIBILIDADE === */
/* ----- Foco visível ----- */
.taskbar-calendar button:focus-visible,
.taskbar-calendar a:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* === RESPONSIVIDADE === */
/* ----- Telas estreitas ----- */
@media (max-width: 360px) {
  .taskbar-calendar__header {
    gap: 5px;
    padding: 11px 9px;
  }

  .taskbar-calendar__actions {
    gap: 2px;
  }

  .taskbar-calendar__actions button {
    width: 27px;
  }

  .taskbar-calendar__body {
    padding: 10px;
  }

  .taskbar-calendar__grid {
    gap: 3px;
  }

  .taskbar-calendar__grid>span,
  .taskbar-calendar__date {
    height: 34px;
  }
}/* === PAINEL DE CLIMA === */
/* ----- Estrutura e superfície de vidro ----- */
.taskbar-weather-panel {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(380px, calc(100vw - 24px));
  max-height: calc(100dvh - 100px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--panel-shadow, var(--shadow-floating));
}

/* === CABEÇALHO === */
/* ----- Título e ações ----- */
.taskbar-weather-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-default);
}

/* ----- Alinhamento dos grupos ----- */
.taskbar-weather-panel__title,
.taskbar-weather-panel__header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ----- Ícone do título ----- */
.taskbar-weather-panel__title svg {
  color: var(--accent-secondary);
}

/* ----- Texto do título ----- */
.taskbar-weather-panel__title strong {
  font-size: 13px;
  font-weight: 700;
}

/* ----- Botões do cabeçalho ----- */
.taskbar-weather-panel__header-actions button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ----- Ações ao passar o ponteiro ----- */
.taskbar-weather-panel__header-actions button:hover:not(:disabled) {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

/* ----- Estado desativado ----- */
.taskbar-weather-panel__header-actions button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* === CONTEÚDO === */
/* ----- Rolagem somente quando necessária ----- */
.taskbar-weather-panel__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

/* ----- Localização ----- */
.taskbar-weather-panel__location {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text-secondary);
  font-size: 11px;
}

/* ----- Ícone da localização ----- */
.taskbar-weather-panel__location svg {
  flex: 0 0 auto;
  color: var(--accent-secondary);
}

/* ----- Nome da localização ----- */
.taskbar-weather-panel__location span {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* === CLIMA ATUAL === */
/* ----- Card de temperatura ----- */
.taskbar-weather-panel__current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-default);
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-secondary) 7%, var(--surface-secondary));
}

/* ----- Bloco informativo ----- */
.taskbar-weather-panel__current-info {
  min-width: 0;
}

/* ----- Temperatura ----- */
.taskbar-weather-panel__temperature {
  display: block;
  font-size: 43px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}

/* ----- Condição atual ----- */
.taskbar-weather-panel__current-info p {
  margin: 6px 0 0;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.4;
}

/* ----- Sensação térmica ----- */
.taskbar-weather-panel__current-info small {
  display: block;
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 11px;
}

/* ----- Ícone da condição ----- */
.taskbar-weather-panel__current-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 68px;
  height: 68px;
  color: var(--accent-secondary);
}

/* === INDICADORES === */
/* ----- Grade de informações ----- */
.taskbar-weather-panel__metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* ----- Card de indicador ----- */
.taskbar-weather-panel__metric {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 65px;
  padding: 10px 12px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-secondary) 75%, transparent);
}

/* ----- Rótulo e ícone ----- */
.taskbar-weather-panel__metric-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
  font-size: 11px;
}

/* ----- Cor do ícone ----- */
.taskbar-weather-panel__metric-label svg {
  flex: 0 0 auto;
  color: var(--accent-secondary);
}

/* ----- Valor do indicador ----- */
.taskbar-weather-panel__metric strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* === PREVISÃO === */
/* ----- Área de previsão ----- */
.taskbar-weather-panel__forecast {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

/* ----- Cabeçalho da previsão ----- */
.taskbar-weather-panel__forecast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* ----- Título da previsão ----- */
.taskbar-weather-panel__forecast-header strong {
  font-size: 12px;
  font-weight: 700;
}

/* ----- Período ----- */
.taskbar-weather-panel__forecast-header span {
  color: var(--text-secondary);
  font-size: 10px;
}

/* ----- Grade de cinco dias ----- */
.taskbar-weather-panel__days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

/* ----- Card de cada dia ----- */
.taskbar-weather-panel__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 9px 3px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--surface-secondary);
}

/* ----- Dia da semana ----- */
.taskbar-weather-panel__day-label {
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 650;
  text-transform: capitalize;
  white-space: nowrap;
}

/* ----- Ícone diário ----- */
.taskbar-weather-panel__day-icon {
  display: grid;
  place-items: center;
  height: 25px;
  color: var(--accent-secondary);
}

/* ----- Máxima ----- */
.taskbar-weather-panel__day-max {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ----- Mínima ----- */
.taskbar-weather-panel__day-min {
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

/* === ESTADOS E ACESSIBILIDADE === */
/* ----- Informações e erros ----- */
.taskbar-weather-panel__empty,
.taskbar-weather-panel__status,
.taskbar-weather-panel__error {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* ----- Ausência de dados ----- */
.taskbar-weather-panel__empty {
  padding: 20px 10px;
  border: 1px dashed var(--border-default);
  border-radius: 10px;
  text-align: center;
}

/* ----- Erros ----- */
.taskbar-weather-panel__error {
  color: var(--status-error, var(--text-primary));
}

/* ----- Foco por teclado ----- */
.taskbar-weather-panel button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

/* ----- Atualização em andamento ----- */
.taskbar-weather-panel__spinning {
  animation: weather-spin 1s linear infinite;
}

/* ----- Animação ----- */
@keyframes weather-spin {
  to {
    transform: rotate(360deg);
  }
}

/* === RESPONSIVIDADE === */
/* ----- Largura reduzida ----- */
@media (max-width: 360px) {
  .taskbar-weather-panel__content {
    gap: 9px;
    padding: 10px;
  }

  .taskbar-weather-panel__days {
    gap: 3px;
  }

  .taskbar-weather-panel__day {
    padding: 8px 2px;
  }
}

/* ----- Preferência por movimento reduzido ----- */
@media (prefers-reduced-motion: reduce) {
  .taskbar-weather-panel__spinning {
    animation: none;
  }
}/* === SUPERFÍCIE === */
.taskbar-launcher {
  position: relative;
  z-index: 1;
}

.taskbar-launcher--redesign.ws-menu {
  display: flex;
  flex-direction: column;
  isolation: isolate;
  width: min(540px, calc(100vw - 24px));
  height: min(480px, calc(100dvh - 100px));
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 17px;
  background: var(--ws-window-background);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
}

/* === CABEÇALHO E BUSCA === */
.ws-menu__top {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 14px 17px;
  border-bottom: 1px solid var(--border-default);
}

.ws-menu__search {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  height: 39px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--border-control, var(--border-default));
  border-radius: 10px;
  background: var(--surface-primary);
  color: var(--text-secondary);
  transition: border-color calc(var(--motion-scale, 1) * 140ms) ease, box-shadow calc(var(--motion-scale, 1) * 140ms) ease;
}

.ws-menu__search:focus-within {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-secondary) 10%, transparent);
}

.ws-menu__search>svg {
  flex-shrink: 0;
}

.ws-menu__search input {
  flex: 1;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
}

.ws-menu__search input::placeholder {
  color: var(--text-secondary);
}

.ws-menu__search input::-webkit-search-cancel-button {
  display: none;
}

.ws-menu__clear {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.ws-menu__clear:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);
}

.ws-menu__top-brand {
  flex: 0 0 auto;
  color: var(--accent-secondary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
}

/* === NAVEGAÇÃO LATERAL === */
.ws-menu__workspace {
  display: grid;
  grid-template-columns: 133px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.ws-menu__sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 19px 9px 15px;
  border-right: 1px solid var(--border-default);
  border-radius: 0 0 0 8px;
  background: transparent;
}

.ws-menu__sidebar-label,
.ws-menu__sidebar-caption {
  display: block;
  padding: 0 10px;
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.ws-menu__sidebar-items {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 13px;
}

.ws-menu__nav-button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 39px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.ws-menu__nav-button>svg {
  flex-shrink: 0;
}

.ws-menu__nav-button:hover:not(:disabled) {
  color: var(--text-primary);
  background: var(--surface-primary);
}

.ws-menu__nav-button.is-active {
  color: var(--accent-secondary);
  background: var(--surface-primary);
  border-color: var(--border-default);
}

.ws-menu__nav-button:disabled {
  opacity: .45;
  cursor: default;
}

.ws-menu__sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border-default);
}

.ws-menu__favorite-count {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.ws-menu__favorite-count svg {
  color: var(--accent-secondary);
}

/* === CONTEÚDO E ROLAGEM === */
.ws-menu__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  padding: 18px 14px 12px 16px;
}

.ws-menu__content-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0 3px 15px;
}

.ws-menu__content-title {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ws-menu__eyebrow {
  color: var(--accent-secondary);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.ws-menu__content-title h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.25;
}

.ws-menu__result-count {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding: 0 6px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.ws-menu__results-scroll {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  min-height: 0;
  padding: 2px 4px 6px 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

.ws-menu__results-scroll::-webkit-scrollbar {
  width: 5px;
}

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

.ws-menu__results-scroll::-webkit-scrollbar-thumb {
  border-radius: 8px;
  background: var(--border-default);
}

.ws-menu__apps {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 0;
}

.ws-menu__app-item {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
}

.ws-menu__app {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 54px;
  min-width: 0;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background-color calc(var(--motion-scale, 1) * 140ms) ease, border-color calc(var(--motion-scale, 1) * 140ms) ease;
}

.ws-menu__app:hover,
.ws-menu__app:focus-visible {
  border-color: var(--border-default);
  background: var(--surface-secondary);
}

.ws-menu__app-icon {
  display: grid;
  place-items: center;
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.ws-menu__app-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.ws-menu__app-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 650;
}

.ws-menu__app-info small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-secondary);
  font-size: 10px;
}

.ws-menu__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-height: 140px;
  padding: 15px;
  color: var(--text-secondary);
  text-align: center;
}

.ws-menu__empty>svg {
  opacity: .5;
}

.ws-menu__empty p {
  margin: 0;
  max-width: 245px;
  font-size: 11px;
  line-height: 1.55;
}

.ws-menu__empty-action {
  padding: 8px 11px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.ws-menu__empty-action:hover {
  border-color: var(--accent-secondary);
}

.ws-menu__app:focus-visible,
.ws-menu__nav-button:focus-visible,
.ws-menu__clear:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

/* === RODAPÉ === */
.ws-menu__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex: 0 0 auto;
  min-height: 63px;
  padding: 10px 17px;
  border-top: 1px solid var(--border-default);
  border-radius: 0 0 17px 17px;
  background: transparent;
}

.ws-menu__user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ws-menu__user-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 35px;
  width: 35px;
  height: 35px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-primary);
  color: var(--accent-secondary);
}

.ws-menu__user-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ws-menu__user-info strong {
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 700;
}

.ws-menu__user-info small {
  color: var(--text-secondary);
  font-size: 10px;
}

.ws-menu__footer-brand {
  flex-shrink: 0;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .08em;
}

/* === MENU DE CONTEXTO === */
.ws-menu__context {
  position: absolute;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 220px;
  max-height: min(300px, calc(100dvh - 115px));
  overflow-x: hidden;
  overflow-y: auto;
  padding: 7px;
  border: 1px solid var(--panel-border, var(--border-default));
  border-radius: 12px;
  background: var(--panel-background);
  color: var(--text-primary);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
  -webkit-backdrop-filter: blur(var(--blur-strong)) saturate(var(--ws-glass-saturation));
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

.ws-menu__context-header {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 7px 7px 9px;
}

.ws-menu__context-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.ws-menu__context-icon {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.ws-menu__context-divider {
  flex: 0 0 1px;
  height: 1px;
  margin: 4px 5px;
  background: var(--border-default);
}

.ws-menu__context button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 36px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.ws-menu__context button:hover:not(:disabled),
.ws-menu__context button:focus-visible {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.ws-menu__context button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

.ws-menu__context button:disabled {
  opacity: .4;
  cursor: default;
}

.ws-menu__context-action-icon {
  display: grid;
  place-items: center;
  flex: 0 0 19px;
  width: 19px;
  height: 19px;
  color: var(--accent-secondary);
}

.ws-menu__context-action-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ws-menu__context-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 3px;
  padding: 10px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.5;
}

:root:is([data-blur='off'], [data-transparency='solid'], [data-reduced-transparency='true'], [data-low-effects='true']) .ws-menu__context {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* === RESPONSIVIDADE === */
@media (max-height: 600px) {
  .taskbar-launcher--redesign.ws-menu {
    height: min(390px, calc(100dvh - 85px));
  }

  .ws-menu__top {
    padding-block: 10px;
  }

  .ws-menu__content {
    padding-top: 12px;
  }

  .ws-menu__sidebar {
    padding-top: 12px;
  }
}

@media (max-width: 430px) {
  .taskbar-launcher--redesign.ws-menu {
    width: min(540px, calc(100vw - 16px));
  }

  .ws-menu__workspace {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .ws-menu__sidebar {
    padding-inline: 5px;
    align-items: center;
  }

  .ws-menu__sidebar-label,
  .ws-menu__sidebar-caption,
  .ws-menu__sidebar-bottom,
  .ws-menu__nav-button span {
    display: none;
  }

  .ws-menu__sidebar-items {
    width: 100%;
    margin-top: 0;
  }

  .ws-menu__nav-button {
    justify-content: center;
    padding: 9px;
  }

  .ws-menu__content {
    padding: 13px 9px 12px;
  }

  .ws-menu__top {
    padding: 12px;
  }

  .ws-menu__top-brand {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {

  .ws-menu__search,
  .ws-menu__app {
    transition: none;
  }
}/* === RESULTADOS DA BUSCA GLOBAL === */
.ws-global-search {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  gap: 5px;
  min-width: 0;
  padding: 12px 2px 5px;
  border-top: 1px solid var(--border-default);
}

.ws-global-search h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 5px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
}

.ws-global-search h3 svg {
  color: var(--accent-secondary);
  flex-shrink: 0;
}

.ws-global-search>p[role='status'] {
  margin: 3px 0;
  padding: 9px 10px;
  border: 1px solid var(--border-default);
  border-radius: 9px;
  background: var(--surface-secondary);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

/* === AÇÕES DOS RESULTADOS === */
.ws-global-search>button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background-color calc(var(--motion-scale, 1) * 140ms) ease,
    border-color calc(var(--motion-scale, 1) * 140ms) ease;
}

.ws-global-search>button:hover,
.ws-global-search>button:focus-visible {
  border-color: var(--border-default);
  background: var(--surface-secondary);
}

.ws-global-search>button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: -2px;
}

.ws-global-search>button>span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.ws-global-search>button strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
}

.ws-global-search>button small {
  color: var(--text-secondary);
  font-size: 10px;
}

.ws-global-search>button>svg {
  flex: 0 0 auto;
  color: var(--accent-secondary);
}

/* === MOVIMENTO REDUZIDO === */
@media (prefers-reduced-motion: reduce) {
  .ws-global-search>button {
    transition: none;
  }
}.ws-mobile {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  background: var(--surface-primary);
  color: var(--text-primary);
}

.ws-mobile__header {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-default);
}

.ws-mobile__header button {
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}

.ws-mobile__welcome {
  padding: 36px 24px;
  background: var(--surface-secondary);
}

.ws-mobile__welcome > span {
  color: var(--accent-secondary);
  font-size: 12px;
  font-weight: 700;
}

.ws-mobile__welcome h1 {
  margin: 12px 0;
  font-size: clamp(26px, 8vw, 36px);
}

.ws-mobile__welcome p {
  max-width: 420px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.ws-mobile__catalog {
  flex: 1;
  padding: 24px 20px 100px;
}

.ws-mobile__catalog h2 {
  margin: 0 0 20px;
  font-size: 18px;
}

.ws-mobile__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 10px;
}

.ws-mobile__app-button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 10px 4px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 11px;
  text-align: center;
  cursor: pointer;
  overflow-wrap: anywhere;
}

.ws-mobile__app-button:hover,
.ws-mobile__app-button:focus-visible {
  background: var(--surface-secondary);
}

.ws-mobile__app-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid var(--border-default);
  border-radius: 16px;
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.ws-mobile__app-content {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 20px;
}

.ws-mobile__navigation {
  position: sticky;
  bottom: 0;
  display: flex;
  min-height: 64px;
  justify-content: space-around;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid var(--border-default);
  background: var(--surface-primary);
}

.ws-mobile__navigation button {
  padding: 12px 20px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  cursor: pointer;
}

.ws-mobile button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

.ws-mobile__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.ws-mobile__section-header h2 {
  margin: 0;
}

.ws-mobile__section-header button {
  border: 0;
  background: transparent;
  color: var(--accent-secondary);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.ws-mobile__search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
  color: var(--text-secondary);
  font-size: 12px;
}

.ws-mobile__search input {
  width: 100%;
  min-height: 44px;
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  background: var(--surface-secondary);
  color: var(--text-primary);
  font: inherit;
}

.ws-mobile__search input:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

.ws-mobile__navigation {
  position: sticky;
  z-index: 20;
  bottom: 0;
  display: flex;
  width: 100%;
  min-height: 68px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid var(--border-default);
  background: var(--surface-primary);
}

.ws-mobile__navigation button {
  display: flex;
  min-width: 100px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}

.ws-mobile__navigation button.ws-mobile__nav-active {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.ws-mobile__app-content {
  width: 100%;
  min-width: 0;
  flex: 1;
  overflow: auto;
  overscroll-behavior: contain;
}

.ws-mobile__navigation {
  box-sizing: border-box;
  padding-right: env(safe-area-inset-right, 0px);
  padding-left: env(safe-area-inset-left, 0px);
}

.ws-mobile__navigation button {
  min-width: 0;
  flex: 1;
}

.ws-mobile__catalog h1 {
  margin: 0 0 20px;
  font-size: 20px;
}

.ws-mobile__system-bar {
  display: flex;
  min-height: 48px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  border-bottom: 1px solid var(--border-default);
  background: var(--surface-primary);
}

.ws-mobile__system-bar > strong {
  color: var(--accent-secondary);
  font-size: 13px;
  letter-spacing: 0.4px;
}

.ws-mobile__system-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ws-mobile__system-actions button {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}

.ws-mobile__system-actions button:hover,
.ws-mobile__system-actions button[aria-expanded='true'] {
  background: var(--surface-secondary);
  color: var(--accent-secondary);
}

.ws-mobile__badge {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  min-width: 15px;
  height: 15px;
  place-items: center;
  padding: 0 3px;
  border-radius: 999px;
  background: var(--accent-secondary);
  color: var(--surface-primary);
  font-size: 9px;
  font-weight: 700;
}

.ws-mobile__overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgb(0 0 0 / 55%);
}

.ws-mobile__panel {
  width: 100%;
  max-width: 600px;
  max-height: min(80dvh, 720px);
  overflow-y: auto;
  border-radius: 18px 18px 0 0;
  background: var(--panel-background);
  box-shadow: var(--panel-shadow);
}

.ws-mobile__panel .taskbar-notifications,
.ws-mobile__panel .taskbar-quick-controls {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  max-height: min(80dvh, 720px);
  border: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: none;
}

.ws-mobile__system-actions button:focus-visible,
.ws-mobile__panel button:focus-visible {
  outline: 2px solid var(--accent-secondary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ws-mobile__overlay {
    scroll-behavior: auto;
  }
}

.ws-mobile__content-shell {
  display: flex;
  min-height: 100dvh;
  flex: 1;
  flex-direction: column;
}

.ws-mobile__app-content[hidden],
.ws-mobile__instance[hidden] {
  display: none !important;
}

.ws-mobile__instance {
  min-width: 0;
  min-height: 100%;
}

.ws-mobile__loading {
  margin: 20px;
  color: var(--text-secondary);
  font-size: 13px;
}

.ws-mobile__overlay {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.ws-mobile__panel {
  overscroll-behavior: contain;
}

.ws-mobile__app-content {
  overflow-x: hidden;
}

/* Preferência visual exclusiva do Mobile. */

.ws-mobile[data-grid-density='default'] .ws-mobile__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ws-mobile[data-grid-density='comfortable'] .ws-mobile__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 16px;
  row-gap: 20px;
}

.ws-mobile[data-grid-density='comfortable'] .ws-mobile__app-button {
  min-height: 96px;
  padding: 12px 8px;
}

@media (max-width: 360px) {
  .ws-mobile .ws-mobile__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Wallpaper is isolated from app documents; text remains on readable surfaces. */
.ws-mobile {
  position: relative;
  isolation: isolate;
}
.ws-mobile__wallpaper {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}
.ws-mobile__catalog {
  background: color-mix(in srgb, var(--surface-primary) 96%, transparent);
}
.ws-mobile__welcome {
  background: color-mix(in srgb, var(--surface-secondary) 96%, transparent);
}
@media (max-width: 360px) {
  .ws-mobile[data-grid-density='default'] .ws-mobile__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ws-mobile__welcome {
  padding: 32px 22px;
  border: 1px solid var(--border-default);
  border-radius: 22px;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent-primary) 15%, var(--surface-primary)),
    var(--surface-primary)
  );
  margin-bottom: 22px;
}
.ws-mobile__welcome > span {
  color: var(--accent-secondary);
  font-size: 11px;
  letter-spacing: 0.16em;
  font-weight: 800;
}
.ws-mobile__welcome h1 {
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.ws-mobile__welcome p {
  line-height: 1.65;
  max-width: 60ch;
}
.ws-mobile__app-button {
  min-height: 110px;
  border: 1px solid var(--border-default);
  border-radius: 16px;
}

/* === Área disponível e alvos de toque === */
.ws-mobile[data-screen='app'] .ws-mobile__content-shell {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}
.ws-mobile__header {
  flex-shrink: 0;
  padding-inline: max(12px, env(safe-area-inset-left, 0px))
    max(12px, env(safe-area-inset-right, 0px));
}
.ws-mobile__header strong {
  min-width: 0;
  overflow-wrap: anywhere;
}
.ws-mobile__header button,
.ws-mobile__system-actions button,
.ws-mobile__section-header button,
.ws-mobile__navigation button {
  min-height: 44px;
  min-width: 44px;
}
.ws-mobile__system-bar {
  padding-top: max(6px, env(safe-area-inset-top, 0px));
}
@media (min-width: 600px) {
  .ws-mobile[data-grid-density='default'] .ws-mobile__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .ws-mobile[data-grid-density='comfortable'] .ws-mobile__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
