/* ===== Tema Cavazzana — Project Management =====
   Paleta oficial (estudo da marca): grafite #3D423E · branco #FFFFFF
   · verde #27A737 · lima #AFCB27 */

/* (overrides de variáveis movidas para o bloco `*` no fim do arquivo) */

/* ===== Login: cena isométrica da marca (não chapada) ===== */
.bg-image img.back-image { display: none !important; }
.bg-image {
  background: #2F3532 url('/branding/login-bg.svg') center / cover no-repeat !important;
}

/* ===== Painel do formulário: lima da marca, conteúdo grafite ===== */
.backd.paneld,
.panel-base.panel {
  background: #AFCB27 !important;
}
/* o painel original pinta um gradiente índigo no ::after e um brilho no ::before */
.backd.paneld::after,
.panel-base.panel::after {
  background: radial-gradient(150% 100% at 12% 4%, #BCD844 0%, #AFCB27 55%, #9DB81C 100%) !important;
}
.backd.paneld::before,
.panel-base.panel::before {
  background: conic-gradient(rgba(255,255,255,.45) 10%, rgba(61,66,62,.25), rgba(255,255,255,.4), rgba(61,66,62,.2)) !important;
}
.form-content { color: #3D423E; }

/* abas Sign Up / Log In */
.form-content .title { color: rgba(61, 66, 62, .55) !important; }
.form-content .title.selected {
  color: #3D423E !important;
  border-color: #3D423E !important;
}

/* campos: caixa branca, texto grafite */
.form-content .editbox {
  background: #FFFFFF !important;
  border: 1px solid rgba(61, 66, 62, .30) !important;
}
.form-content input {
  color: #3D423E !important;
  caret-color: #3D423E !important;
}
.form-content input::placeholder { color: rgba(61, 66, 62, .52) !important; }

/* textos auxiliares, avisos e rótulos dentro do painel */
.form-content .status, .form-content [class*="status"],
.form-content .text-sm, .form-content span { color: #3D423E; }
.form-content svg { color: #3D423E; }

/* caixa de aviso ("Required field...") */
.form-content .form-row + div, .form-content .statusMsg { border-color: rgba(61,66,62,.3) !important; }

/* botão primário desabilitado sobre o lima */
.form-content button:disabled, .form-content .antiButton:disabled {
  background: rgba(61, 66, 62, .22) !important;
  color: rgba(61, 66, 62, .65) !important;
}

/* links (Recover, Login with code, guest) */
.form-content a { color: #1F6B2A !important; }

/* rótulos flutuantes dos campos (placeholder do Huly é um div .label branco) */
.form-content .editbox .label { color: rgba(61, 66, 62, .55) !important; }

/* ================================================================
   TEMA INTERNO DO APP (v6) — azul → verdes da marca
   Huly define as variáveis com seletor `*` (cada elemento), então
   as overrides também precisam de `*` + !important para vencer.
   Mantidos de propósito: cores de etiquetas/labels, paleta de texto
   do editor e cores de prioridade (semântica > estética).
   ================================================================ */
* {
  /* botões primários (tema clássico + tema novo "huly") */
  --primary-button-default: #27A737 !important;
  --primary-button-hovered: #2FB941 !important;
  --primary-button-pressed: #1F8A2D !important;
  --primary-button-focused: #27A737 !important;
  --primary-button-outline: #AFCB27 !important;
  --primary-button-transparent: rgba(39, 167, 55, .2) !important;
  --button-primary-BackgroundColor: #27A737 !important;
  --button-primary-hover-BackgroundColor: #2FB941 !important;
  --button-primary-active-BackgroundColor: #1F8A2D !important;
  --button-primary-loading-LabelColor: #AFCB27 !important;

  /* botões secundários: tinta azulada → tinta lima */
  --secondary-button-hovered: #E4EDBF !important;
  --secondary-button-pressed: #D3E3A4 !important;
  --secondary-button-focused: #E4EDBF !important;

  /* acentos globais, foco, seleção */
  --global-accent-BackgroundColor: #27A737 !important;
  --global-accent-IconColor: #4CC35D !important;
  --global-accent-SkyText: #DCEA9F !important;
  --global-focus-BorderColor: #27A737 !important;
  --selector-active-BackgroundColor: #27A737 !important;
  --theme-popup-checkicon: #27A737 !important;
  --theme-editbox-focus-border: #27A737 !important;
  --theme-caret-color: #27A737 !important;
  --theme-tablist-plain-color: #1F8A2D !important;
  --primary-bg-color: #27A737 !important;
  --primary-bg-hover: #2FB941 !important;
  --primary-edit-border-color: #27A737 !important;

  /* estados "primários" (chips, workflow states) */
  --theme-state-primary-color: #27A737 !important;
  --theme-state-primary-background-color: rgba(39, 167, 55, .14) !important;
  --theme-state-primary-border-color: rgba(39, 167, 55, .26) !important;

  /* toggles ligados */
  --theme-toggle-on-bg-color: #27A737 !important;
  --theme-toggle-on-bg-hover: #1F8A2D !important;

  /* menções, editor, seleção de nós */
  --theme-mention-bg-color: rgba(39, 167, 55, .12) !important;
  --theme-mention-focused-bg-color: rgba(39, 167, 55, .2) !important;
  --text-editor-selected-node-background: rgba(39, 167, 55, .12) !important;
  --text-editor-selected-node-color: #AFCB27 !important;
  --theme-text-editor-note-anchor-bg-primary: #D2E39A !important;
  --theme-diffview-block-header-color: rgba(39, 167, 55, .1) !important;

  /* calendário / inbox / chamadas */
  --theme-calendar-today-bgcolor: rgba(39, 167, 55, .1) !important;
  --theme-calendar-event-available-color: rgba(39, 167, 55, .2) !important;
  --theme-calendar-zone: rgba(39, 167, 55, .1) !important;
  --calendar-event-border-color: rgba(39, 167, 55, .28) !important;
  --calendar-event-handle-color: #27A737 !important;
  --theme-inbox-people-notify: #27A737 !important;
  --theme-inbox-people-counter-bgcolor: rgba(39, 167, 55, .14) !important;
  --border-talk-indication-primary: #27A737 !important;
  --love-active-call-color-1: #27A737 !important;

  /* hovers/tintas azuladas do tema novo → tintas verdes (mesmos alfas) */
  --global-ui-hover-OverlayColor: #2D423126 !important;
  --global-ui-active-OverlayColor: #2D423133 !important;
  --global-ui-BackgroundColor: #1533160D !important;
  --global-ui-BorderColor: #1F3A211A !important;
  --global-ui-hover-BackgroundColor: #1F3A211A !important;
  --global-ui-active-BackgroundColor: #C9E06B40 !important;
  --global-ui-highlight-BackgroundColor: #C9E06B26 !important;
  --global-ui-hover-highlight-BackgroundColor: #C9E06B40 !important;
  --global-subtle-ui-BorderColor: #1F3A210D !important;
  --global-popover-BorderColor: #C9E06B26 !important;
  --input-BackgroundColor: #1f3a210d !important;
  --input-hover-BackgroundColor: #1f3a211a !important;
  --input-BorderColor: #1f3a210d !important;
  --selector-BackgroundColor: #1f3a210d !important;
  --selector-hover-overlay-BackgroundColor: #1f3a211a !important;
  --selector-disabled-BackgroundColor: #1f3a211a !important;
  --selector-disabled-BorderColor: #1f3a210d !important;

  /* botão "attention" (CTA roxo → gradiente da marca) */
  --theme-button-attention-gradient: linear-gradient(135deg, #27A737, #AFCB27) !important;
  --theme-button-attention-border: #AFCB27 !important;
  --theme-button-attention-hover-gradient: linear-gradient(135deg, #2FB941, #27A737) !important;
  --theme-button-attention-hover-border: #27A737 !important;
  --theme-button-attention-active-gradient: linear-gradient(135deg, #1F8A2D, #27A737) !important;
  --theme-button-attention-hover-shadow: 0 8px 24px rgba(39, 167, 55, 0.4) !important;
  --theme-button-attention-active-shadow: 0 4px 12px rgba(39, 167, 55, 0.6) !important;
  --theme-button-attention-focus-shadow: 0 0 0 3px rgba(39, 167, 55, 0.3) !important;
}

/* links e textos de acento: valores por tema (contraste) */
*, .theme-light, .theme-light * {
  --theme-link-color: #1F8A2D !important;
  --global-primary-LinkColor: #1F8A2D !important;
  --global-accent-TextColor: #1F8A2D !important;
  --global-on-nuance-TextColor: #1F8A2D !important;
  --global-subtle-BackgroundColor: #D6E8A8 !important;
}
.theme-dark, .theme-dark * {
  --theme-link-color: #4CC35D !important;
  --global-primary-LinkColor: #4CC35D !important;
  --global-accent-TextColor: #4CC35D !important;
  --global-on-nuance-TextColor: #0E3D14 !important;
  --global-subtle-BackgroundColor: #123D18 !important;
  --theme-editbox-focus-border: #AFCB27 !important;
}
