:root {
  color-scheme: light;
  --app-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --app-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.28);
}

html {
  scroll-behavior: smooth;
  background: #f8fafc;
}

html.modal-aberto,
body.modal-aberto {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html body {
  font-family: "Manrope", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.app-shell {
  opacity: 0;
  transition:
    opacity 280ms var(--app-ease);
}

body.app-shell.app-ready {
  opacity: 1;
}

body.app-shell.app-leaving {
  pointer-events: none;
  opacity: 0;
  transition-duration: 150ms;
}

body.app-leaving::after {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 42%;
  height: 3px;
  border-radius: 0 999px 999px 0;
  background: linear-gradient(90deg, #22d3ee, #fde047, #f472b6);
  content: "";
  animation: app-progress 700ms var(--app-ease) infinite;
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
}

p,
td,
th,
label,
input,
select,
textarea,
button {
  letter-spacing: -0.008em;
}

a,
button,
input,
select,
textarea {
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    opacity 180ms ease,
    transform 180ms var(--app-ease);
}

button:not(:disabled):active,
a:not([href="#"]):active {
  transform: translateY(1px) scale(0.99);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(34, 211, 238, 0.22);
  outline-offset: 2px;
}

::selection {
  color: #0f172a;
  background: rgba(103, 232, 249, 0.45);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  border: 3px solid #f1f5f9;
  border-radius: 999px;
  background: #cbd5e1;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

#sidebar-container > div {
  box-shadow: 8px 0 30px -28px rgba(15, 23, 42, 0.45);
  animation: app-sidebar-in 380ms var(--app-ease) both;
}

#sidebarPainel {
  transition: width 260ms var(--app-ease);
}

#sidebar-container nav a {
  position: relative;
  overflow: hidden;
}

#sidebar-container nav a:hover {
  transform: translateX(3px);
}

#sidebar-container .sidebar-link {
  --sidebar-accent: #0891b2;
  --sidebar-accent-soft: rgba(6, 182, 212, 0.08);
  --sidebar-accent-icon: rgba(6, 182, 212, 0.14);
}

#sidebar-container .sidebar-link-violet {
  --sidebar-accent: #7c3aed;
  --sidebar-accent-soft: rgba(139, 92, 246, 0.08);
  --sidebar-accent-icon: rgba(139, 92, 246, 0.14);
}

#sidebar-container .sidebar-link-amber {
  --sidebar-accent: #b45309;
  --sidebar-accent-soft: rgba(245, 158, 11, 0.09);
  --sidebar-accent-icon: rgba(245, 158, 11, 0.16);
}

#sidebar-container .sidebar-link-pink {
  --sidebar-accent: #db2777;
  --sidebar-accent-soft: rgba(236, 72, 153, 0.08);
  --sidebar-accent-icon: rgba(236, 72, 153, 0.14);
}

#sidebar-container .sidebar-link-teal {
  --sidebar-accent: #0f766e;
  --sidebar-accent-soft: rgba(20, 184, 166, 0.08);
  --sidebar-accent-icon: rgba(20, 184, 166, 0.14);
}

#sidebar-container .sidebar-link:not([aria-current="page"]):hover {
  background: var(--sidebar-accent-soft);
  color: var(--sidebar-accent);
}

#sidebar-container .sidebar-link:not([aria-current="page"]):hover .sidebar-icon {
  background: var(--sidebar-accent-icon);
  color: var(--sidebar-accent);
}

#sidebar-container nav a[aria-current="page"]::after {
  position: absolute;
  top: 25%;
  right: 0;
  width: 3px;
  height: 50%;
  border-radius: 999px 0 0 999px;
  background: #06b6d4;
  content: "";
}

#sidebar-container nav a[aria-current="page"] .sidebar-icon {
  background: #06b6d4;
  color: #fff;
  box-shadow: 0 8px 18px -12px rgba(6, 182, 212, 0.9);
}

@media (min-width: 1024px) {
  #sidebarPainel.sidebar-recolhida {
    width: 5.5rem;
  }

  #sidebarPainel.sidebar-recolhida .sidebar-brand-area {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  #sidebarPainel.sidebar-recolhida .sidebar-brand-area > div {
    justify-content: center;
  }

  #sidebarPainel.sidebar-recolhida .sidebar-brand-text,
  #sidebarPainel.sidebar-recolhida .sidebar-label,
  #sidebarPainel.sidebar-recolhida .sidebar-user-info {
    display: none;
  }

  #sidebarPainel.sidebar-recolhida nav {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  #sidebarPainel.sidebar-recolhida nav a {
    justify-content: center;
    padding: 0.5rem;
  }

  #sidebarPainel.sidebar-recolhida nav a:hover {
    transform: translateY(-1px);
  }

  #sidebarPainel.sidebar-recolhida > div:last-child {
    padding-right: 0.75rem;
    padding-left: 0.75rem;
  }

  #sidebarPainel.sidebar-recolhida .sidebar-user-card {
    padding: 0.5rem;
  }

  #sidebarPainel.sidebar-recolhida .sidebar-user-card > div {
    justify-content: center;
  }

  #sidebarPainel.sidebar-recolhida #sairBtn {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }

  #sidebarPainel.sidebar-recolhida #iconeAlternarSidebar {
    transform: rotate(180deg);
  }
}

main > header {
  animation: app-content-in 360ms 40ms var(--app-ease) both;
}

main > section,
main > div {
  animation: app-content-in 420ms 90ms var(--app-ease) both;
}

main > section,
main > aside,
main > div > section,
main > div > aside {
  box-shadow: var(--app-shadow);
}

#visaoClassificacaoProdutividade {
  box-shadow: none;
}

tbody tr {
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

dialog[open],
[role="dialog"]:not(.hidden) {
  animation: app-dialog-in 220ms var(--app-ease) both;
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

.animate-pulse {
  animation-duration: 1.45s !important;
  animation-timing-function: ease-in-out !important;
}

.app-skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  background: #e2e8f0;
}

.app-skeleton::after {
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.72),
    transparent
  );
  content: "";
  animation: app-shimmer 1.35s ease-in-out infinite;
}

.app-value-loading {
  display: inline-block;
  min-width: 4.5rem;
  color: transparent !important;
  border-radius: 0.5rem;
  background: #e2e8f0;
  animation: app-soft-pulse 1.2s ease-in-out infinite;
}

.app-loading-label::after {
  display: inline-block;
  width: 1.2em;
  overflow: hidden;
  vertical-align: bottom;
  content: "…";
  animation: app-soft-pulse 1s ease-in-out infinite;
}

@keyframes app-sidebar-in {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes app-content-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes app-dialog-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes app-progress {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(240%);
  }
}

@keyframes app-shimmer {
  to {
    transform: translateX(100%);
  }
}

@keyframes app-soft-pulse {
  50% {
    opacity: 0.48;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.app-toast-container { position: fixed; z-index: 10000; top: 1rem; right: 1rem; display: grid; gap: .65rem; width: min(25rem, calc(100vw - 2rem)); }
.app-toast { display: grid; grid-template-columns: .55rem 1fr auto; align-items: center; gap: .75rem; padding: .85rem 1rem; border: 1px solid #e2e8f0; border-radius: .85rem; background: #fff; color: #334155; box-shadow: 0 16px 40px rgba(15,23,42,.16); animation: app-toast-in .2s ease-out; }
.app-toast p { margin: 0; font-size: .875rem; font-weight: 700; line-height: 1.4; }
.app-toast button { border: 0; background: transparent; color: #94a3b8; font-size: 1.25rem; cursor: pointer; }
.app-toast-marcador { width: .55rem; height: .55rem; border-radius: 999px; background: #06b6d4; }
.app-toast-sucesso .app-toast-marcador { background: #10b981; }
.app-toast-erro .app-toast-marcador { background: #ef4444; }
.app-toast-aviso .app-toast-marcador { background: #f59e0b; }
.app-toast-saindo { opacity: 0; transform: translateX(12px); transition: .18s ease; }
.app-confirmacao:not([open]) { display: none; }
.app-confirmacao { width: 100%; max-width: none; height: 100%; max-height: none; margin: 0; padding: 1rem; border: 0; background: transparent; color: inherit; position: fixed; z-index: 10001; inset: 0; place-items: center; }
.app-confirmacao[open] { display: grid; }
.app-confirmacao::backdrop { background: transparent; }
.app-confirmacao-backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(3px); }
.app-confirmacao-card { position: relative; width: min(28rem, 100%); padding: 1.5rem; border-radius: 1rem; background: #fff; text-align: center; box-shadow: 0 24px 60px rgba(15,23,42,.25); animation: app-dialog-in .18s ease-out; }
.app-confirmacao-icone { display: grid; place-items: center; width: 3rem; height: 3rem; margin: 0 auto 1rem; border-radius: .8rem; background: #ecfeff; color: #0891b2; font-size: 1.25rem; font-weight: 900; }
.app-confirmacao-card h2 { margin: 0; color: #0f172a; font-size: 1.2rem; font-weight: 800; }
.app-confirmacao-card p { margin: .6rem 0 0; color: #64748b; font-size: .9rem; line-height: 1.55; }
.app-confirmacao-acoes { display: flex; justify-content: flex-end; gap: .65rem; margin-top: 1.4rem; }
.app-confirmacao-acoes button { min-height: 2.6rem; padding: 0 1rem; border: 1px solid #e2e8f0; border-radius: .65rem; background: #fff; color: #475569; font-weight: 800; cursor: pointer; }
.app-confirmacao-acoes [data-app-confirmar] { border-color: #06b6d4; background: #06b6d4; color: #fff; }
.app-confirmacao-acoes .app-botao-perigo { border-color: #ef4444; background: #ef4444; }
.app-confirmacao-aberta { overflow: hidden; }
@keyframes app-toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* =========================
   TEMA DA INTERFACE
========================= */

.tema-icone {
  display: none;
}

html[data-tema-preferencia="auto"] .tema-icone-auto,
html[data-tema-preferencia="dark"] .tema-icone-dark,
html[data-tema-preferencia="light"] .tema-icone-light {
  display: block;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 420ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  mix-blend-mode: normal;
}

html.tema-transicionando,
html.tema-transicionando body,
html.tema-transicionando body * {
  transition-property: background-color, border-color, color, fill, stroke, box-shadow;
  transition-duration: 380ms !important;
  transition-timing-function: cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html.dark {
  color-scheme: dark;
  background: #111827;
  --dark-canvas: #111827;
  --dark-canvas-muted: #131f32;
  --dark-surface: #18243a;
  --dark-surface-raised: #1e2c44;
  --dark-border: #34455f;
  --app-shadow: 0 14px 36px -22px rgba(2, 6, 23, 0.58);
}

html.dark body.app-shell {
  background-color: var(--dark-canvas);
  color: #e2e8f0;
}

html.dark ::selection {
  color: #ecfeff;
  background: rgba(8, 145, 178, 0.72);
}

html.dark ::-webkit-scrollbar-track {
  background: var(--dark-canvas-muted);
}

html.dark ::-webkit-scrollbar-thumb {
  border-color: var(--dark-canvas-muted);
  background: #41516a;
}

html.dark ::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

html.dark .bg-white,
html.dark .bg-white\/70,
html.dark .bg-white\/90 {
  background-color: var(--dark-surface);
}

html.dark .brand-logo-shell {
  background-color: #fff;
}

html.dark .bg-slate-50,
html.dark .bg-slate-50\/70 {
  background-color: var(--dark-canvas-muted);
}

html.dark .bg-slate-100,
html.dark .bg-slate-100\/70 {
  background-color: var(--dark-surface-raised);
}

html.dark .bg-slate-200 {
  background-color: #293a53;
}

html.dark .text-slate-900 {
  color: #f8fafc;
}

html.dark .text-slate-800 {
  color: #e2e8f0;
}

html.dark .text-slate-700 {
  color: #cbd5e1;
}

html.dark .text-slate-600 {
  color: #a8b5c7;
}

html.dark .text-slate-500 {
  color: #94a3b8;
}

html.dark .text-slate-400 {
  color: #7f8da3;
}

html.dark .text-slate-300 {
  color: #cbd5e1;
}

html.dark .border-slate-100,
html.dark .divide-slate-100 > :not([hidden]) ~ :not([hidden]) {
  border-color: #293950;
}

html.dark .border-slate-200 {
  border-color: var(--dark-border);
}

html.dark .border-slate-300 {
  border-color: #465873;
}

html.dark .border-slate-400 {
  border-color: #5c6d85;
}

html.dark .bg-cyan-50,
html.dark .bg-cyan-50\/40,
html.dark .bg-cyan-50\/50 {
  background-color: rgba(6, 182, 212, 0.12);
}

html.dark .bg-cyan-100 {
  background-color: rgba(6, 182, 212, 0.2);
}

html.dark .bg-violet-50 {
  background-color: rgba(139, 92, 246, 0.12);
}

html.dark .bg-violet-100,
html.dark .bg-purple-100 {
  background-color: rgba(139, 92, 246, 0.2);
}

html.dark .bg-amber-50,
html.dark .bg-amber-50\/50,
html.dark .bg-amber-50\/70,
html.dark .bg-yellow-50 {
  background-color: rgba(245, 158, 11, 0.12);
}

html.dark .bg-amber-100,
html.dark .bg-yellow-100 {
  background-color: rgba(245, 158, 11, 0.2);
}

html.dark .bg-emerald-50,
html.dark .bg-green-50,
html.dark .bg-teal-50 {
  background-color: rgba(16, 185, 129, 0.12);
}

html.dark .bg-emerald-100,
html.dark .bg-green-100,
html.dark .bg-teal-100 {
  background-color: rgba(16, 185, 129, 0.2);
}

html.dark .bg-blue-50 {
  background-color: rgba(59, 130, 246, 0.12);
}

html.dark .bg-blue-100 {
  background-color: rgba(59, 130, 246, 0.2);
}

html.dark .bg-pink-50,
html.dark .bg-rose-50,
html.dark .bg-red-50,
html.dark .bg-orange-50 {
  background-color: rgba(244, 63, 94, 0.12);
}

html.dark .bg-pink-100,
html.dark .bg-rose-100,
html.dark .bg-red-100 {
  background-color: rgba(244, 63, 94, 0.2);
}

html.dark .text-cyan-600,
html.dark .text-cyan-700,
html.dark .text-cyan-800,
html.dark .text-cyan-900 {
  color: #67e8f9;
}

html.dark .text-violet-600,
html.dark .text-violet-700,
html.dark .text-violet-900,
html.dark .text-purple-600 {
  color: #c4b5fd;
}

html.dark .text-amber-600,
html.dark .text-amber-700,
html.dark .text-amber-800,
html.dark .text-amber-900,
html.dark .text-yellow-600,
html.dark .text-yellow-700,
html.dark .text-orange-700 {
  color: #fcd34d;
}

html.dark .text-emerald-600,
html.dark .text-emerald-700,
html.dark .text-teal-600 {
  color: #6ee7b7;
}

html.dark .text-blue-700 {
  color: #93c5fd;
}

html.dark .text-pink-500,
html.dark .text-pink-600,
html.dark .text-pink-700,
html.dark .text-rose-600,
html.dark .text-rose-700,
html.dark .text-red-500,
html.dark .text-red-600,
html.dark .text-red-700 {
  color: #fda4af;
}

html.dark .border-cyan-100,
html.dark .border-cyan-200,
html.dark .border-cyan-300 {
  border-color: rgba(34, 211, 238, 0.35);
}

html.dark .border-amber-100,
html.dark .border-amber-200,
html.dark .border-amber-300 {
  border-color: rgba(251, 191, 36, 0.35);
}

html.dark .border-violet-300 {
  border-color: rgba(167, 139, 250, 0.42);
}

html.dark .border-emerald-100 {
  border-color: rgba(52, 211, 153, 0.3);
}

html.dark .border-rose-100,
html.dark .border-rose-200,
html.dark .border-red-100 {
  border-color: rgba(251, 113, 133, 0.32);
}

html.dark .ring-cyan-100,
html.dark .ring-cyan-200,
html.dark .ring-blue-100,
html.dark .ring-violet-100,
html.dark .ring-emerald-100,
html.dark .ring-orange-100,
html.dark .ring-amber-100,
html.dark .ring-amber-200 {
  --tw-ring-color: rgba(103, 232, 249, 0.24);
}

html.dark .hover\:bg-white:hover,
html.dark .hover\:bg-slate-50:hover,
html.dark .hover\:bg-slate-50\/70:hover,
html.dark .hover\:bg-slate-100:hover,
html.dark .hover\:bg-slate-200:hover {
  background-color: #243650;
}

html.dark .hover\:bg-cyan-50:hover,
html.dark .hover\:bg-cyan-100:hover {
  background-color: rgba(6, 182, 212, 0.2);
}

html.dark .hover\:bg-violet-50:hover {
  background-color: rgba(139, 92, 246, 0.18);
}

html.dark .hover\:bg-yellow-50:hover,
html.dark .hover\:bg-amber-50:hover {
  background-color: rgba(245, 158, 11, 0.18);
}

html.dark .hover\:bg-pink-50:hover,
html.dark .hover\:bg-rose-50:hover,
html.dark .hover\:bg-red-50:hover {
  background-color: rgba(244, 63, 94, 0.18);
}

html.dark .hover\:bg-teal-50:hover {
  background-color: rgba(16, 185, 129, 0.18);
}

html.dark .hover\:text-slate-700:hover,
html.dark .hover\:text-slate-800:hover,
html.dark .hover\:text-slate-900:hover {
  color: #f8fafc;
}

html.dark input:not([type="checkbox"]):not([type="radio"]),
html.dark select,
html.dark textarea {
  border-color: var(--dark-border);
  background-color: #152238;
  color: #e2e8f0;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
  color: #64748b;
}

html.dark select option {
  background: #152238;
  color: #e2e8f0;
}

html.dark input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85);
}

html.dark input:-webkit-autofill,
html.dark input:-webkit-autofill:hover,
html.dark input:-webkit-autofill:focus {
  -webkit-text-fill-color: #e2e8f0;
  box-shadow: 0 0 0 1000px #152238 inset;
}

html.dark #sidebarPainel {
  border-color: #293950;
  background: #172238;
}

html.dark #sidebar-container > div {
  box-shadow: 8px 0 34px -25px rgba(0, 0, 0, 0.9);
}

html.dark #sidebar-container nav a[aria-current="page"] {
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
}

html.dark #sidebar-container .sidebar-link-violet {
  --sidebar-accent: #c4b5fd;
}

html.dark #sidebar-container .sidebar-link-amber {
  --sidebar-accent: #fbbf24;
}

html.dark #sidebar-container .sidebar-link-pink {
  --sidebar-accent: #f9a8d4;
}

html.dark #sidebar-container .sidebar-link-teal {
  --sidebar-accent: #5eead4;
}

html.dark .sidebar-user-card {
  border-color: var(--dark-border);
  background: var(--dark-surface-raised);
}

html.dark dialog::backdrop {
  background: rgba(2, 6, 23, 0.72);
}

html.dark .app-skeleton,
html.dark .app-value-loading {
  background: #293a53;
}

html.dark .app-skeleton::after {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(148, 163, 184, 0.16),
    transparent
  );
}

html.dark .app-toast,
html.dark .app-confirmacao-card {
  border-color: var(--dark-border);
  background: #1a2740;
  color: #cbd5e1;
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.45);
}

html.dark .app-confirmacao-icone {
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
}

html.dark .app-confirmacao-card h2 {
  color: #f8fafc;
}

html.dark .app-confirmacao-card p {
  color: #94a3b8;
}

html.dark .app-confirmacao-acoes button {
  border-color: var(--dark-border);
  background: var(--dark-surface-raised);
  color: #cbd5e1;
}

html.dark .kanban-coluna,
html.dark .kanban-card,
html.dark .task-detail-page,
html.dark .task-detail-section {
  border-color: var(--dark-border);
  background: var(--dark-surface);
}

html.dark .kanban-coluna.kanban-destino {
  border-color: #22d3ee;
  background: rgba(6, 182, 212, 0.1);
}

html.dark .kanban-cabecalho,
html.dark .task-detail-description,
html.dark .task-detail-status-btn {
  color: #cbd5e1;
}

html.dark .kanban-contador,
html.dark .task-detail-body {
  background: var(--dark-canvas-muted);
  color: #94a3b8;
}

html.dark .kanban-card:hover {
  border-color: #22d3ee;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

html.dark .kanban-vazio {
  border-color: #475569;
  color: #64748b;
}

html.dark .task-detail-hero {
  border-color: var(--dark-border);
  background:
    radial-gradient(circle at top right, rgba(34, 211, 238, 0.16), transparent 34%),
    linear-gradient(135deg, #1a2740 0%, #123044 100%);
}

html.dark .task-back-btn {
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(15, 23, 42, 0.78);
  color: #67e8f9;
}

html.dark .task-back-btn:hover {
  background: var(--dark-surface-raised);
}

html.dark .task-detail-title,
html.dark .task-detail-heading,
html.dark .task-detail-value {
  color: #f8fafc;
}

html.dark .task-detail-subtitle,
html.dark .task-detail-label {
  color: #94a3b8;
}

html.dark .task-detail-row,
html.dark #formComentario {
  border-color: #1e293b;
}

html.dark .task-detail-status-btn {
  border-color: var(--dark-border);
}

html.dark .task-detail-status-btn:hover {
  background: var(--dark-surface-raised);
  color: #f8fafc;
}

html.dark .task-detail-status-btn.is-active {
  border-color: rgba(34, 211, 238, 0.45);
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
}

html.dark .btn-acao,
html.dark .btn-pagina {
  border-color: var(--dark-border);
  color: #cbd5e1;
}

html.dark .btn-acao:hover,
html.dark .btn-pagina:hover {
  background: var(--dark-surface-raised);
  color: #f8fafc;
}

html.dark .linha-selecionada {
  background: rgba(6, 182, 212, 0.1);
}

html.dark body.login-page {
  background: #172337;
}

html.dark body.login-page > main > section {
  border-color: #42536d;
  background-color: rgba(36, 49, 73, 0.96);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.3);
}

html.dark body.login-page [data-alternar-tema] {
  border-color: #4b5d78;
  background-color: rgba(36, 49, 73, 0.92);
  color: #cbd5e1;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.18);
}

html.dark body.login-page input:not([type="checkbox"]):not([type="radio"]) {
  border-color: #53647d;
  background-color: #1b2940;
}

html.dark body.login-page input:not([type="checkbox"]):not([type="radio"]):focus {
  border-color: #22d3ee;
  background-color: #1e2e47;
}

html.dark .badge-baixa,
html.dark .status-concluida {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

html.dark .badge-media {
  background: rgba(245, 158, 11, 0.16);
  color: #fcd34d;
}

html.dark .badge-alta,
html.dark .status-cancelada {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

html.dark .badge-urgente {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
}

html.dark .status-aberta {
  background: #293a53;
  color: #cbd5e1;
}

html.dark .status-andamento {
  background: rgba(14, 165, 233, 0.16);
  color: #7dd3fc;
}

html.dark .status-revisao {
  background: rgba(168, 85, 247, 0.16);
  color: #d8b4fe;
}

@media (min-width: 1024px) {
  html.dark #sidebarPainel.sidebar-recolhida [data-alternar-tema] {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
  }
}

/* =========================
   CALENDÁRIO
========================= */

.app-date-field {
  position: relative;
  width: 100%;
}

.app-date-alt-input {
  padding-right: 2.6rem !important;
  cursor: pointer;
}

.app-date-icon {
  position: absolute;
  top: 50%;
  right: 0.85rem;
  width: 1rem;
  height: 1rem;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
}

.flatpickr-calendar.app-calendar {
  width: 320px;
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 1rem;
  background: #fff;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.18);
}

.flatpickr-calendar.app-calendar::before,
.flatpickr-calendar.app-calendar::after {
  display: none;
}

.app-calendar .flatpickr-months {
  padding: 0.65rem 0.65rem 0.25rem;
}

.app-calendar .flatpickr-months .flatpickr-month,
.app-calendar .flatpickr-current-month {
  height: 2.25rem;
  color: #0f172a;
}

.app-calendar .flatpickr-current-month {
  padding-top: 0.35rem;
  font-size: 0.92rem;
  font-weight: 800;
}

.app-calendar .flatpickr-current-month .flatpickr-monthDropdown-months,
.app-calendar .flatpickr-current-month input.cur-year {
  color: inherit;
  font-weight: 800;
}

.app-calendar .flatpickr-current-month .numInputWrapper span {
  border-color: #e2e8f0;
}

.app-calendar .flatpickr-prev-month,
.app-calendar .flatpickr-next-month {
  top: 0.6rem;
  display: grid;
  width: 2.2rem;
  height: 2.2rem;
  place-items: center;
  border-radius: 0.65rem;
  padding: 0;
  color: #64748b;
}

.app-calendar .flatpickr-prev-month {
  left: 0.65rem;
}

.app-calendar .flatpickr-next-month {
  right: 0.65rem;
}

.app-calendar .flatpickr-prev-month:hover,
.app-calendar .flatpickr-next-month:hover {
  background: #ecfeff;
  color: #0891b2;
}

.app-calendar .flatpickr-prev-month svg,
.app-calendar .flatpickr-next-month svg {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
}

.app-calendar .flatpickr-weekdays {
  height: 2.2rem;
  padding: 0 0.65rem;
}

.app-calendar span.flatpickr-weekday {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-calendar .flatpickr-innerContainer,
.app-calendar .flatpickr-rContainer,
.app-calendar .flatpickr-days,
.app-calendar .dayContainer {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.app-calendar .dayContainer {
  padding: 0 0.65rem 0.55rem;
}

.app-calendar .flatpickr-day {
  max-width: none;
  height: 2.35rem;
  flex-basis: 14.2857%;
  border-radius: 0.65rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 2.35rem;
}

.app-calendar .flatpickr-day:hover,
.app-calendar .flatpickr-day:focus {
  border-color: #cffafe;
  background: #ecfeff;
  color: #0e7490;
}

.app-calendar .flatpickr-day.today {
  border-color: #22d3ee;
  color: #0e7490;
}

.app-calendar .flatpickr-day.selected,
.app-calendar .flatpickr-day.selected:hover,
.app-calendar .flatpickr-day.startRange,
.app-calendar .flatpickr-day.endRange {
  border-color: #06b6d4;
  background: #06b6d4;
  color: #fff;
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.24);
}

.app-calendar .flatpickr-day.prevMonthDay,
.app-calendar .flatpickr-day.nextMonthDay,
.app-calendar .flatpickr-day.flatpickr-disabled {
  color: #cbd5e1;
}

.app-calendar .flatpickr-monthSelect-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  width: 100%;
  margin: 0;
  padding: 0.75rem;
}

.app-calendar .flatpickr-monthSelect-month {
  width: auto;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 0.7rem;
  padding: 0.75rem 0.35rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.app-calendar .flatpickr-monthSelect-month:hover,
.app-calendar .flatpickr-monthSelect-month:focus {
  border-color: #cffafe;
  background: #ecfeff;
  color: #0e7490;
}

.app-calendar .flatpickr-monthSelect-month.today {
  border-color: #22d3ee;
  color: #0e7490;
}

.app-calendar .flatpickr-monthSelect-month.selected,
.app-calendar .flatpickr-monthSelect-month.selected:hover {
  border-color: #06b6d4;
  background: #06b6d4;
  color: #fff;
  box-shadow: 0 6px 16px rgba(6, 182, 212, 0.24);
}

.app-calendar .app-calendar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
}

.app-calendar-footer button {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
}

.app-calendar-footer button:hover {
  color: #0891b2;
}

.app-calendar-footer .app-calendar-today {
  color: #0891b2;
}

html.dark .app-date-icon {
  color: #8fa1b8;
}

html.dark .flatpickr-calendar.app-calendar {
  border-color: var(--dark-border);
  background: var(--dark-surface);
  box-shadow: 0 24px 65px rgba(2, 6, 23, 0.48);
}

html.dark .app-calendar .flatpickr-months .flatpickr-month,
html.dark .app-calendar .flatpickr-current-month {
  color: #f8fafc;
}

html.dark .app-calendar .flatpickr-current-month .numInputWrapper span {
  border-color: #465873;
}

html.dark .app-calendar .flatpickr-prev-month,
html.dark .app-calendar .flatpickr-next-month,
html.dark .app-calendar span.flatpickr-weekday {
  color: #94a3b8;
}

html.dark .app-calendar .flatpickr-prev-month:hover,
html.dark .app-calendar .flatpickr-next-month:hover {
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
}

html.dark .app-calendar .flatpickr-day {
  color: #cbd5e1;
}

html.dark .app-calendar .flatpickr-day:hover,
html.dark .app-calendar .flatpickr-day:focus {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
}

html.dark .app-calendar .flatpickr-day.today {
  border-color: #22d3ee;
  color: #67e8f9;
}

html.dark .app-calendar .flatpickr-day.selected,
html.dark .app-calendar .flatpickr-day.selected:hover {
  border-color: #06b6d4;
  background: #06b6d4;
  color: #fff;
}

html.dark .app-calendar .flatpickr-day.prevMonthDay,
html.dark .app-calendar .flatpickr-day.nextMonthDay,
html.dark .app-calendar .flatpickr-day.flatpickr-disabled {
  color: #5f7088;
}

html.dark .app-calendar .flatpickr-monthSelect-month {
  color: #cbd5e1;
}

html.dark .app-calendar .flatpickr-monthSelect-month:hover,
html.dark .app-calendar .flatpickr-monthSelect-month:focus {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(6, 182, 212, 0.14);
  color: #67e8f9;
}

html.dark .app-calendar .flatpickr-monthSelect-month.today {
  border-color: #22d3ee;
  color: #67e8f9;
}

html.dark .app-calendar .flatpickr-monthSelect-month.selected,
html.dark .app-calendar .flatpickr-monthSelect-month.selected:hover {
  border-color: #06b6d4;
  background: #06b6d4;
  color: #fff;
}

html.dark .app-calendar .app-calendar-footer {
  border-color: #2a3a52;
  background: var(--dark-canvas-muted);
}

html.dark .app-calendar-footer button {
  color: #94a3b8;
}

html.dark .app-calendar-footer button:hover,
html.dark .app-calendar-footer .app-calendar-today {
  color: #67e8f9;
}

/* Inventario de ativos: categorias em secoes e equipamentos em grade responsiva. */
.ativos-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.75rem;
}

.ativos-toolbar-filtros {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(155px, 180px) auto;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.ativos-toolbar-visualizacao {
  justify-self: end;
  white-space: nowrap;
}

.ativos-board-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 0.75rem;
}

.ativos-board-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-bottom: 0.75rem;
}

.ativos-filtros-contexto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(6, 182, 212, 0.22);
  border-radius: 1rem;
  background: linear-gradient(90deg, rgba(236, 254, 255, 0.92), rgba(255, 255, 255, 0.96));
  padding: 0.75rem 1rem;
  box-shadow: 0 8px 24px -22px rgba(8, 145, 178, 0.75);
}

.ativos-filtros-contexto[hidden],
.ativos-filtros-contexto.hidden {
  display: none;
}

.ativos-categoria {
  min-width: 0;
  width: 100%;
}

.ativos-categoria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 360px));
  align-items: stretch;
  justify-content: start;
  gap: 0.75rem;
}

.ativos-card {
  display: flex;
  min-width: 0;
  height: 100%;
  flex-direction: column;
}

.ativos-card > :last-child {
  margin-top: auto;
}

body.ativos-somente-leitura #novaCategoriaBtn,
body.ativos-somente-leitura #novoAtivoBtn,
body.ativos-somente-leitura #editarPeloPainelBtn,
body.ativos-somente-leitura [data-action="novo"],
body.ativos-somente-leitura [data-action="editar"],
body.ativos-somente-leitura [data-action="excluir"],
body.ativos-somente-leitura [data-action="editar-categoria"],
body.ativos-somente-leitura [data-action="excluir-categoria"] {
  display: none !important;
}

body.ativos-somente-leitura
  #filtrosCategoriasAtivos
  article
  > div:last-child {
  display: none !important;
}

@media (max-width: 1180px) {
  .ativos-toolbar {
    grid-template-columns: 1fr;
  }

  .ativos-toolbar-filtros {
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(155px, 180px) auto;
  }
}

@media (max-width: 760px) {
  .ativos-toolbar-filtros {
    grid-template-columns: 1fr 1fr;
  }

  .ativos-toolbar-busca {
    grid-column: 1 / -1;
  }

  .ativos-toolbar-visualizacao {
    justify-self: start;
  }

  .ativos-filtros-contexto {
    align-items: flex-start;
    flex-direction: column;
  }

  .ativos-categoria-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 520px) {
  .ativos-operacoes {
    width: 100%;
  }

  .ativos-operacoes > button {
    flex: 1;
    justify-content: center;
  }

  .ativos-toolbar-filtros {
    grid-template-columns: 1fr;
  }

  .ativos-toolbar-busca {
    grid-column: auto;
  }
}

html.dark .ativos-filtros-contexto {
  border-color: rgba(34, 211, 238, 0.2);
  background: linear-gradient(90deg, rgba(8, 145, 178, 0.12), rgba(15, 23, 42, 0.92));
}

.peer:checked + .pdf-option-card .pdf-option-check {
  border-color: #ef4444;
  background: #ef4444;
  color: #fff;
}

html.dark .peer:checked + .pdf-option-card {
  border-color: rgba(248, 113, 113, 0.72);
  background: rgba(127, 29, 29, 0.2);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.16);
}
