@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* =============================================================================
 * Identidade visual Stiff — a MESMA do Portal do Aluno.
 * Paleta e tipografia do Manual da Marca (packages/ui/tailwind.config.js do
 * stiff-portal), para os dois sistemas parecerem um produto só.
 * ========================================================================== */
:root {
  /* Paleta da marca */
  --stiff-midnight: #041F41;
  --stiff-navy: #0B4D91;
  --stiff-blue: #1278C8;
  --stiff-cyan: #16CAF5;
  --stiff-ice: #EAF3F8;

  /* Cinzas neutros */
  --stiff-gray-50: #F9FAFB;
  --stiff-gray-100: #F3F4F6;
  --stiff-gray-200: #E5E7EB;
  --stiff-gray-300: #D1D5DB;
  --stiff-gray-400: #9CA3AF;
  --stiff-gray-500: #667085;
  --stiff-gray-600: #4B5563;
  --stiff-gray-700: #374151;
  --stiff-gray-900: #111827;

  /* Aliases usados pelo restante desta folha */
  --sd-primary: var(--stiff-blue);
  --sd-primary-dark: var(--stiff-navy);
  --sd-accent: var(--stiff-cyan);
  --sd-bg: #FAFBFC;          /* page */
  --sd-surface: #FFFFFF;
  --sd-text: var(--stiff-gray-900);
  --sd-muted: var(--stiff-gray-500);
  --sd-border: rgba(255, 255, 255, 0.14);
  --sd-line: var(--stiff-gray-200);
  --sd-radius: 12px;

  /* Sombras em camadas: um halo difuso + uma linha de contato.
     Duas camadas dão profundidade sem escurecer o fundo — é isso que separa
     um card "premium" de um card com sombra borrada e cinzenta. */
  --sd-shadow-sm:
    0 1px 2px rgba(4, 31, 65, 0.04),
    0 1px 1px rgba(4, 31, 65, 0.03);
  --sd-shadow-md:
    0 4px 12px rgba(4, 31, 65, 0.06),
    0 1px 2px rgba(4, 31, 65, 0.04);
  --sd-shadow-lg:
    0 12px 28px rgba(4, 31, 65, 0.08),
    0 2px 6px rgba(4, 31, 65, 0.04);
  --sd-shadow-hero:
    0 18px 40px rgba(11, 77, 145, 0.10),
    0 2px 8px rgba(4, 31, 65, 0.05);

  /* Linha de brilho no topo das superfícies elevadas */
  --sd-ring: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html {
  font-family: 'Inter', Arial, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  /* Fundo claro com um respiro de cor da marca no topo — sem cinza chapado.
     O gradiente é quase imperceptível e NÃO reduz o contraste do conteúdo:
     os cards continuam brancos puros por cima. */
  background: var(--sd-bg);
  background-image:
    radial-gradient(1200px 420px at 50% -180px, rgba(22, 202, 245, 0.07), transparent 70%);
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--sd-text);
  font-family: 'Inter', Arial, system-ui, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  font-size: 14px;
  line-height: 20px;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
  color: var(--stiff-midnight);
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  color: var(--stiff-blue);
}

a:hover {
  color: var(--stiff-navy);
}

/* Foco acessível, igual ao do portal */
a:focus-visible,
button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(18, 120, 200, 0.4);
  border-radius: 6px;
}

/* ========== Navbar limpa ========== */
.app-navbar {
  background: linear-gradient(135deg, var(--stiff-midnight) 0%, var(--stiff-navy) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 1px 12px rgba(4, 31, 65, 0.16);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(22, 202, 245, 0.18);
}

.app-navbar .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.app-navbar .navbar-toggler-icon {
  filter: invert(1) grayscale(100%) brightness(200%);
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #fff !important;
  text-decoration: none;
  padding: 0;
  margin: 0;
  white-space: nowrap;
}

.app-brand:hover {
  color: #fff !important;
  opacity: 0.95;
}

.app-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  background: var(--stiff-cyan);
  color: var(--stiff-midnight);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.app-brand-text {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.app-nav .nav-link {
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 500;
  font-size: 0.925rem;
  padding: 0.45rem 0.75rem !important;
  border-radius: 0.5rem;
  white-space: nowrap;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-nav .nav-link:hover,
.app-nav .nav-link:focus,
.app-nav .nav-link.show {
  color: #fff !important;
  background: rgba(255, 255, 255, 0.12);
}

.app-nav .nav-link-action {
  background: rgba(255, 255, 255, 0.12);
  font-weight: 600;
}

.app-nav .nav-link-action:hover {
  background: rgba(255, 255, 255, 0.2);
}

.app-nav .nav-link-emphasis {
  background: rgba(22, 202, 245, 0.20);
  color: #fff !important;
  font-weight: 600;
}

.app-nav .nav-link-emphasis:hover {
  background: rgba(22, 202, 245, 0.30);
}

.app-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.app-badge-soft {
  background: var(--sd-accent);
  color: #1a1a1a;
  min-width: 1rem;
  height: 1rem;
  font-size: 0.65rem;
}

.app-dropdown {
  border: 0;
  border-radius: var(--sd-radius);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  padding: 0.4rem;
  min-width: 14rem;
  margin-top: 0.35rem !important;
}

.app-dropdown .dropdown-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--sd-muted);
  font-weight: 700;
  padding: 0.45rem 0.75rem 0.25rem;
}

.app-dropdown .dropdown-item {
  border-radius: 0.45rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: var(--sd-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  white-space: nowrap;
}

.app-dropdown .dropdown-item:hover,
.app-dropdown .dropdown-item:focus {
  background: var(--stiff-ice);
  color: var(--sd-primary);
}

.app-dropdown .dropdown-divider {
  margin: 0.35rem 0.4rem;
  opacity: 0.12;
}

.app-nav-clock {
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 600;
}

.app-nav-clock:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.app-nav-user {
  border-top: 0;
}

.app-user-toggle {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-radius: 999px;
  padding: 0.3rem 0.75rem 0.3rem 0.35rem;
  font-weight: 600;
  max-width: 280px;
}

.app-user-toggle:hover,
.app-user-toggle:focus,
.app-user-toggle.show {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.app-user-toggle::after {
  margin-left: 0.35rem;
  opacity: 0.75;
}

.app-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--stiff-cyan), var(--stiff-blue));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.app-user-email {
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
}

.app-user-role {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.72rem;
  line-height: 1.2;
}

.app-user-menu {
  min-width: 280px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.app-user-menu .dropdown-header {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  font-weight: 700;
  padding: 0.55rem 1rem 0.25rem;
  margin: 0;
}

/* Itens do menu do usuário — ícone e texto alinhados em colunas */
.app-menu-item {
  display: flex !important;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 1rem !important;
  line-height: 1.25;
}

.app-menu-ico {
  width: 1.35rem;
  min-width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-size: 1rem;
  flex-shrink: 0;
}

.app-menu-label {
  flex: 1;
  min-width: 0;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.app-user-menu .dropdown-item:active .app-menu-ico,
.app-user-menu .dropdown-item:hover .app-menu-ico {
  color: inherit;
}

.app-user-menu .dropdown-item.text-danger .app-menu-ico {
  color: #dc2626;
}

.app-btn-logout {
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: transparent;
  border-radius: 0.5rem;
  padding: 0.35rem 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.app-btn-logout:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
}

.app-footer {
  background: #fff;
  border-top: 1px solid var(--stiff-gray-200);
  color: var(--sd-muted);
}

/* ========== Cards e componentes ========== */
.card-stat {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.05);
  background: #fff;
}

.clock-video {
  width: 100%;
  max-width: 420px;
  border-radius: 1rem;
  background: #111;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.clock-panel {
  border-radius: 1.25rem;
  box-shadow: 0 0.5rem 1.5rem rgba(13, 110, 253, 0.1);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-ok { background: #198754; }
.status-warn { background: #ffc107; }
.status-err { background: #dc3545; }

.table-sticky thead th {
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}

.photo-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 0.5rem;
}

/* Lista de Tarefas */
.tasks-hero {
  background: linear-gradient(135deg, var(--stiff-blue) 0%, var(--stiff-navy) 50%, var(--stiff-cyan) 100%);
  box-shadow: 0 0.75rem 2rem rgba(11, 61, 145, 0.28);
}

.task-card-highlight {
  border-left: 4px solid var(--stiff-cyan) !important;
  background: linear-gradient(90deg, #fff9e8 0%, #fff 45%);
}

.task-card {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  border: 0;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.07) !important;
}

.dashboard-tasks-panel {
  border: 1px solid #f0d78a;
  border-radius: 1rem;
  background: #fffdf6;
  box-shadow: 0 0.25rem 0.85rem rgba(22, 202, 245, 0.14);
}

/* Mobile: menu em coluna limpa */
@media (max-width: 991.98px) {
  .app-nav {
    padding-top: 0.75rem;
    gap: 0.15rem !important;
  }

  .app-nav .nav-link {
    width: 100%;
    padding: 0.7rem 0.85rem !important;
  }

  .app-dropdown {
    box-shadow: none;
    border: 1px solid var(--stiff-gray-200);
    margin: 0.25rem 0 0.5rem !important;
  }
}

/* Drive */
.drive-hero {
  background: linear-gradient(135deg, #0f766e 0%, var(--stiff-blue) 55%, var(--stiff-navy) 100%);
  box-shadow: 0 0.5rem 1.5rem rgba(15, 118, 110, 0.25);
}

.drive-table .drive-icon {
  display: inline-block;
  width: 1.5rem;
  text-align: center;
  margin-right: 0.25rem;
}

.drive-table tbody tr td {
  vertical-align: middle;
}

/* Videochamadas */
.video-hero {
  background: linear-gradient(135deg, #4c1d95 0%, var(--stiff-blue) 50%, #0369a1 100%);
  box-shadow: 0 0.5rem 1.5rem rgba(76, 29, 149, 0.28);
}

.video-live-dot {
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #22c55e;
  margin-right: 0.35rem;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: video-pulse 1.5s infinite;
}

@keyframes video-pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* ========== Painel hub unificado ========== */
/* ========== Card de status do ponto (painel) ========== */
.clock-status-card {
  border-radius: 1rem;
  border: 2px solid transparent;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  position: relative;
}

.clock-status-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.clock-status-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  pointer-events: none;
  background:
    radial-gradient(circle at 100% 0%, #fff 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, #fff 0%, transparent 40%);
}

.clock-status-open {
  background: linear-gradient(135deg, #166534 0%, #16a34a 55%, #22c55e 100%);
  border-color: #15803d;
  color: #fff;
}

.clock-status-closed {
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 55%, #ef4444 100%);
  border-color: #b91c1c;
  color: #fff;
}

.clock-status-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.clock-status-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.15rem;
}

.clock-status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55);
  animation: clockPulse 1.4s infinite;
}

.clock-status-open .clock-status-dot {
  background: #bbf7d0;
}

.clock-status-closed .clock-status-dot {
  background: #fecaca;
}

@keyframes clockPulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.clock-status-title {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.clock-status-sub {
  font-size: 0.95rem;
  opacity: 0.92;
  margin-top: 0.2rem;
}

.clock-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.clock-status-cta {
  font-size: 0.85rem;
  font-weight: 600;
  opacity: 0.95;
}

@media (max-width: 576px) {
  .clock-status-title { font-size: 1.35rem; }
  .clock-status-icon { width: 3rem; height: 3rem; font-size: 1.6rem; }
}

.hub-hero {
  background: linear-gradient(135deg, var(--stiff-blue) 0%, var(--stiff-navy) 42%, #0f766e 100%);
  box-shadow: 0 0.75rem 2rem rgba(11, 61, 145, 0.28);
}

/* Cards em destaque (Tarefas / Drive / Video / E-mail) */
.feature-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--stiff-gray-200);
  background: #FFFFFF;
  box-shadow: var(--sd-shadow-sm), var(--sd-ring);
  padding: 1.25rem 1.3rem 1.1rem;
  color: var(--sd-text);
  transition:
    transform 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 0.18s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.18s ease;
  min-height: 11.5rem;
}

/* Card de destaque do painel (o primeiro): maior e com moldura de ênfase. */
.feature-card-hero {
  min-height: 14rem;
  border-color: rgba(18, 120, 200, 0.30);
  /* branco na maior parte da área: o ice entra só como respiro no canto,
     então o texto nunca fica sobre fundo lavado */
  background:
    radial-gradient(420px 260px at 100% 0%, var(--stiff-ice) 0%, #FFFFFF 62%);
  box-shadow: var(--sd-shadow-hero), var(--sd-ring);
}

.feature-card-hero::after {
  opacity: 1;
  height: 4px;
}

.feature-card-hero .feature-card-icon {
  box-shadow: 0 6px 16px rgba(18, 120, 200, 0.22);
}

.feature-card-hero .feature-card-icon {
  width: 3.75rem;
  height: 3.75rem;
  font-size: 1.6rem;
}

.feature-card-hero .feature-card-title {
  font-size: 1.4rem;
}

.feature-card-hero .feature-card-desc {
  font-size: 1rem;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sd-shadow-lg), var(--sd-ring);
  color: var(--sd-text);
  border-color: rgba(18, 120, 200, 0.45);
}

/* Fio da marca no topo do card, revelado no hover — detalhe caro, discreto. */
.feature-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  border-radius: 14px 14px 0 0;
  background: linear-gradient(90deg, var(--stiff-blue), var(--stiff-cyan));
  opacity: 0;
  transition: opacity 0.18s ease;
}

.feature-card:hover::after {
  opacity: 1;
}

.feature-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.feature-card-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
  flex-shrink: 0;
}

.feature-card-warning .feature-card-icon { background: #fff6df; color: #b45309; }
.feature-card-teal .feature-card-icon { background: #dcf5f0; color: #0f766e; }
.feature-card-purple .feature-card-icon { background: #efe7ff; color: #6d28d9; }
.feature-card-info .feature-card-icon { background: #e0f2fe; color: #0369a1; }
.feature-card-primary .feature-card-icon { background: var(--stiff-ice); color: var(--stiff-blue); }
.feature-card-success .feature-card-icon { background: #dcfce7; color: #15803d; }

.feature-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.feature-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  line-height: 1.2;
}

.feature-card-desc {
  margin: 0;
  font-size: 0.88rem;
  color: var(--sd-muted);
  line-height: 1.4;
}

.feature-card-footer {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--stiff-gray-100);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sd-primary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.feature-card:hover .feature-card-footer {
  gap: 0.55rem;
}

/* Grade secundária unificada (layout horizontal — ícone + texto alinhados) */
.hub-grid .hub-tile {
  display: block;
  height: 100%;
  min-height: 0;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: #fff;
  border: 1px solid var(--stiff-gray-200);
  box-shadow: 0 0.2rem 0.65rem rgba(15, 23, 42, 0.05);
  color: var(--sd-text);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.hub-grid .hub-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.55rem 1.35rem rgba(15, 23, 42, 0.1);
  border-color: #c7d7f5;
  color: var(--sd-text);
}

.hub-tile-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hub-tile-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0;
  flex-shrink: 0;
  background: var(--stiff-ice);
  color: var(--sd-primary);
}

.hub-tile-copy {
  min-width: 0;
  flex: 1;
}

/* ========== Heros de módulo (padrão visual) ========== */
.module-hero,
.drive-hero,
.mail-hero,
.video-hero {
  box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.12);
}

.module-hero-leaves {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 45%, #14b8a6 100%);
}

.module-hero-drive,
.drive-hero {
  background: linear-gradient(135deg, #0f766e 0%, var(--stiff-blue) 55%, var(--stiff-navy) 100%);
}

.module-hero-mail,
.mail-hero {
  background: linear-gradient(135deg, #0369a1 0%, #0284c7 50%, #0ea5e9 100%);
}

.module-hero-docs {
  background: linear-gradient(135deg, #334155 0%, var(--stiff-gray-600) 45%, #0f766e 100%);
}

.video-hero {
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%);
}

/* Drive */
.drive-ico {
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}
.drive-ico-folder { color: #f59e0b; }
.drive-table tbody tr { transition: background 0.1s ease; }

/* Mail */
.mail-folder-list .list-group-item {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--stiff-gray-600);
  background: transparent;
}
.mail-folder-list .list-group-item.active {
  background: var(--stiff-ice) !important;
  color: var(--stiff-navy) !important;
  font-weight: 700;
}
.mail-msg-row {
  padding: 0.85rem 1.15rem;
  border-left: 3px solid transparent;
}
.mail-msg-row:hover { background: #f8fafc; }
.mail-unread {
  background: #f0f9ff;
  border-left-color: #0284c7 !important;
}
.mail-avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #bae6fd, #38bdf8);
  color: #0c4a6e;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.mail-from { font-size: 0.92rem; max-width: 70%; }
.mail-subject { font-size: 0.88rem; color: var(--stiff-gray-600); margin-top: 0.1rem; }
.mail-sidebar { background: #fff; }

.hub-tile-primary .hub-tile-icon { background: var(--stiff-ice); color: var(--stiff-blue); }
.hub-tile-warning .hub-tile-icon { background: #fff6df; color: #b45309; }
.hub-tile-teal .hub-tile-icon { background: #dcf5f0; color: #0f766e; }
.hub-tile-purple .hub-tile-icon { background: #efe7ff; color: #6d28d9; }
.hub-tile-info .hub-tile-icon { background: #e0f2fe; color: #0369a1; }
.hub-tile-success .hub-tile-icon { background: #dcfce7; color: #15803d; }
.hub-tile-danger .hub-tile-icon { background: #fee2e2; color: #b91c1c; }
.hub-tile-secondary .hub-tile-icon { background: var(--stiff-gray-100); color: var(--stiff-gray-600); }
.hub-tile-dark .hub-tile-icon { background: #e2e8f0; color: #0f172a; }

.hub-tile-title {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.25;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.hub-tile-desc {
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--sd-muted);
  line-height: 1.3;
}

.hub-tile-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.15rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
}

.hub-widget {
  border-radius: 1rem;
}

.hub-widget-list .list-group-item {
  border-color: var(--stiff-gray-100);
}

.hub-widget .smaller,
.smaller {
  font-size: 0.72rem;
}

.btn-teal {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}
.btn-teal:hover {
  background: #0d9488;
  border-color: #0d9488;
  color: #fff;
}

.btn-purple {
  background: #6d28d9;
  border-color: #6d28d9;
  color: #fff;
}
.btn-purple:hover {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #fff;
}

.text-teal { color: #0f766e !important; }
.text-purple { color: #6d28d9 !important; }

/* E-mail integrado */
.mail-hero {
  background: linear-gradient(135deg, #0369a1 0%, var(--stiff-blue) 55%, #1e3a8a 100%);
  box-shadow: 0 0.5rem 1.5rem rgba(3, 105, 161, 0.25);
}

.mail-table tr.mail-unread td {
  background: #f0f7ff;
}

.mail-table a:hover {
  color: var(--sd-primary) !important;
}

.mail-sidebar .list-group-item.active {
  background: var(--stiff-blue);
  border-color: var(--stiff-blue);
}

.mail-body-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  background: transparent;
  border: 0;
  padding: 0;
}

.mail-body-html {
  max-width: 100%;
  overflow-x: auto;
}


/* ========== Superfícies padrão (mesmo look do portal) ========== */
.card {
  border-radius: var(--sd-radius);
  border: 1px solid var(--stiff-gray-200);
  background: var(--sd-surface);
  box-shadow: var(--sd-shadow-sm);
}

.card .card-header {
  background: var(--sd-surface);
  border-bottom: 1px solid var(--stiff-gray-200);
  font-weight: 600;
  color: var(--stiff-midnight);
}

.btn-primary {
  background-color: var(--stiff-navy);
  border-color: var(--stiff-navy);
  font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--stiff-midnight);
  border-color: var(--stiff-midnight);
}

.btn-outline-primary {
  color: var(--stiff-blue);
  border-color: var(--stiff-gray-300);
}

.btn-outline-primary:hover {
  background-color: var(--stiff-blue);
  border-color: var(--stiff-blue);
}

.btn {
  border-radius: 6px;
}

.text-primary {
  color: var(--stiff-blue) !important;
}

.bg-primary {
  background-color: var(--stiff-blue) !important;
}

.badge.bg-primary {
  background-color: var(--stiff-blue) !important;
}

.form-control,
.form-select {
  border-radius: 6px;
  border-color: var(--stiff-gray-300);
  font-size: 14px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--stiff-blue);
  box-shadow: 0 0 0 1px var(--stiff-blue);
}

.table > :not(caption) > * > * {
  border-color: var(--stiff-gray-200);
}

.table-light > :not(caption) > * > * {
  background-color: var(--stiff-gray-50);
  color: var(--stiff-gray-700);
}


/* =============================================================================
 * Acabamento premium
 * Regra que guiou tudo aqui: superfície de conteúdo é SEMPRE branca sólida.
 * Cor entra em borda, texto, ícone e sombra — nunca como véu por cima do
 * conteúdo. É o que evita aquele aspecto de tela lavada/opaca.
 * ========================================================================== */

.card {
  box-shadow: var(--sd-shadow-sm), var(--sd-ring);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  box-shadow: var(--sd-shadow-md), var(--sd-ring);
}

.card .card-header {
  padding: 0.9rem 1.15rem;
  letter-spacing: -0.005em;
}

.card .card-body {
  padding: 1.15rem;
}

/* Botão primário com profundidade real (degradê curto + contato) */
.btn-primary {
  background: linear-gradient(180deg, var(--stiff-blue) 0%, var(--stiff-navy) 100%);
  border-color: var(--stiff-navy);
  box-shadow: 0 1px 2px rgba(4, 31, 65, 0.16);
  transition: filter 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(180deg, var(--stiff-navy) 0%, var(--stiff-midnight) 100%);
  border-color: var(--stiff-midnight);
  box-shadow: 0 4px 10px rgba(11, 77, 145, 0.24);
}

.btn-primary:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(4, 31, 65, 0.2);
}

.btn {
  font-weight: 500;
  transition: filter 0.16s ease, box-shadow 0.16s ease,
              background-color 0.16s ease, border-color 0.16s ease;
}

/* Ícone dos cards: pastilha da marca, sólida */
.feature-card-icon {
  background: linear-gradient(135deg, var(--stiff-blue), var(--stiff-navy));
  color: #fff;
  box-shadow: 0 4px 10px rgba(18, 120, 200, 0.18);
}

.feature-card-title {
  color: var(--stiff-midnight);
  letter-spacing: -0.015em;
}

.feature-card-desc {
  color: var(--stiff-gray-500);
}

.feature-card-footer {
  color: var(--stiff-blue);
  font-weight: 500;
}

/* Menu suspenso: branco sólido, sombra generosa */
.app-dropdown {
  background: #FFFFFF;
  border: 1px solid var(--stiff-gray-200);
  box-shadow: var(--sd-shadow-lg);
}

/* Tabelas: cabeçalho firme, linhas com hover sutil */
.table > thead th {
  color: var(--stiff-gray-700);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.table-hover > tbody > tr:hover > * {
  background-color: var(--stiff-gray-50);
}

/* Badges com peso de marca */
.badge {
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: 999px;
  padding: 0.32em 0.7em;
}

/* Barra de rolagem discreta, combinando com a paleta */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--stiff-gray-300) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-thumb {
  background: var(--stiff-gray-300);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--stiff-gray-400);
  background-clip: content-box;
}

/* Respeita quem pediu menos animação no sistema */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .feature-card:hover {
    transform: none;
  }
}

/* =============================================================================
 * APP SHELL v2 — banho de loja (ago/2026)
 * Sidebar midnight fixa + topbar clara. Manual da marca Stiff Consultoria:
 * fundos midnight/branco/cinzas muito claros, Inter, ícones lineares, símbolo
 * em transparência baixa como grafismo. Nada de véu colorido sobre conteúdo.
 * ========================================================================== */
:root {
  --side-w: 264px;
  --topbar-h: 64px;
}

/* ---------- Sidebar ---------- */
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--side-w);
  z-index: 1040;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(480px 300px at 0% 0%, rgba(22, 202, 245, 0.10), transparent 60%),
    linear-gradient(180deg, var(--stiff-midnight) 0%, #05264c 60%, #073563 130%);
  border-right: 1px solid rgba(22, 202, 245, 0.14);
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.05rem 1.1rem 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.side-brand-logo {
  width: 30px;
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(22, 202, 245, 0.35));
}

.side-brand-name {
  display: block;
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.side-brand-sub {
  display: block;
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(22, 202, 245, 0.9);
  font-weight: 600;
  margin-top: 1px;
}

.side-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.8rem 0.65rem 1rem;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.side-section {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.38);
  padding: 1.05rem 0.6rem 0.35rem;
}

.side-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
  padding: 0.52rem 0.6rem;
  border-radius: 0.55rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 1px;
  transition: background 0.15s ease, color 0.15s ease;
}

.side-item i {
  font-size: 1.02rem;
  width: 1.25rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.side-item:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.side-item:hover i { color: var(--stiff-cyan); }

.side-item.active {
  background: linear-gradient(90deg, rgba(22, 202, 245, 0.18), rgba(22, 202, 245, 0.03));
  color: #fff;
  font-weight: 600;
}

.side-item.active i { color: var(--stiff-cyan); }

.side-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 18%;
  height: 64%;
  width: 3px;
  border-radius: 999px;
  background: var(--stiff-cyan);
}

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

.side-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: var(--stiff-cyan);
  color: var(--stiff-midnight);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.side-foot {
  padding: 0.85rem 1.1rem 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.side-foot-brand {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
}

.side-foot-brand span { color: rgba(22, 202, 245, 0.7); }

/* ---------- Estrutura principal ---------- */
body.has-sidebar .app-main { margin-left: var(--side-w); }

.app-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0 clamp(1rem, 2.5vw, 2rem);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--stiff-gray-200);
}

.tb-burger {
  border: 1px solid var(--stiff-gray-200);
  background: #fff;
  color: var(--stiff-gray-700);
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.tb-search {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  border: 1px solid var(--stiff-gray-200);
  background: #fff;
  color: var(--sd-muted);
  border-radius: 999px;
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  min-width: min(360px, 38vw);
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-search:hover,
.tb-search:focus-visible {
  border-color: rgba(18, 120, 200, 0.55);
  box-shadow: 0 0 0 3px rgba(18, 120, 200, 0.08);
  color: var(--stiff-gray-600);
}

.tb-search span { flex: 1; }

.tb-search kbd {
  font-size: 0.62rem;
  background: var(--stiff-gray-100);
  color: var(--stiff-gray-500);
  border: 1px solid var(--stiff-gray-200);
  border-radius: 5px;
  padding: 1px 5px;
  font-family: inherit;
  font-weight: 600;
}

.tb-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.tb-clock {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: linear-gradient(180deg, var(--stiff-blue) 0%, var(--stiff-navy) 100%);
  color: #fff;
  border-radius: 999px;
  padding: 0.48rem 1.05rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(18, 120, 200, 0.28);
  transition: box-shadow 0.16s ease, transform 0.16s ease, filter 0.16s ease;
}

.tb-clock:hover {
  color: #fff;
  filter: brightness(1.06);
  box-shadow: 0 4px 14px rgba(18, 120, 200, 0.38);
  transform: translateY(-1px);
}

.tb-icon-btn {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--stiff-gray-600);
  font-size: 1.15rem;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}

.tb-icon-btn:hover {
  background: var(--stiff-ice);
  color: var(--stiff-navy);
}

.tb-bell-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: #e11d48;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid #fff;
}

.tb-user {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--stiff-gray-200);
  background: #fff;
  border-radius: 999px;
  padding: 0.22rem 0.75rem 0.22rem 0.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-user:hover,
.tb-user.show {
  border-color: rgba(18, 120, 200, 0.45);
  box-shadow: 0 0 0 3px rgba(18, 120, 200, 0.07);
}

.tb-user::after { color: var(--stiff-gray-400); }

.tb-avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--stiff-cyan), var(--stiff-blue));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  flex-shrink: 0;
  overflow: hidden;
}

.tb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.tb-user-name {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--stiff-midnight);
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.2;
  text-align: left;
}

.tb-user-role {
  display: block;
  font-size: 0.67rem;
  color: var(--sd-muted);
  line-height: 1.2;
  text-align: left;
}

.app-content {
  flex: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 2.5vw, 2.25rem) 2rem;
}

.app-footer {
  background: transparent;
  border-top: 1px solid var(--stiff-gray-200);
}

/* ---------- Mobile ---------- */
.app-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: rgba(4, 31, 65, 0.45);
  backdrop-filter: blur(2px);
}

@media (max-width: 991.98px) {
  body.has-sidebar .app-main { margin-left: 0; }

  .app-sidebar {
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    width: min(300px, 86vw);
  }

  body.sidebar-open .app-sidebar {
    transform: none;
    box-shadow: 0 0 60px rgba(4, 31, 65, 0.5);
  }

  body.sidebar-open .app-sidebar-backdrop { display: block; }
  body.sidebar-open { overflow: hidden; }
}

/* ---------- Cabeçalho de página padrão ---------- */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--stiff-midnight);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.page-title i { color: var(--stiff-blue); font-size: 1.25rem; }

.page-sub {
  color: var(--sd-muted);
  font-size: 0.86rem;
  margin: 0.15rem 0 0;
}

/* ---------- Hero on-brand (substitui os gradientes coloridos antigos) ----------
 * Manual: fundos midnight; símbolo permitido como grafismo em transparência
 * baixa. Todos os heros de módulo convergem para esta base. */
.page-hero,
.hub-hero,
.tasks-hero,
.drive-hero,
.mail-hero,
.video-hero,
.module-hero-leaves,
.module-hero-drive,
.module-hero-mail,
.module-hero-docs {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(560px 320px at 8% -40%, rgba(22, 202, 245, 0.16), transparent 60%),
    linear-gradient(120deg, var(--stiff-midnight) 0%, #05305e 58%, var(--stiff-navy) 100%);
  box-shadow: 0 14px 34px rgba(4, 31, 65, 0.25);
  border: 1px solid rgba(22, 202, 245, 0.16);
}

.page-hero::after,
.hub-hero::after,
.tasks-hero::after,
.drive-hero::after,
.mail-hero::after,
.video-hero::after {
  content: "";
  position: absolute;
  right: -30px;
  top: 50%;
  transform: translateY(-46%) rotate(8deg);
  width: 190px;
  height: 280px;
  background: url("../img/logo-simbolo.8464e9c0f0cf.png") no-repeat center / contain;
  opacity: 0.09;
  pointer-events: none;
}

/* ---------- KPIs ---------- */
.kpi-card {
  background: #fff;
  border: 1px solid var(--stiff-gray-200);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  box-shadow: var(--sd-shadow-sm), var(--sd-ring);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 100%;
  transition: box-shadow 0.16s ease, border-color 0.16s ease;
}

.kpi-card:hover {
  box-shadow: var(--sd-shadow-md), var(--sd-ring);
  border-color: rgba(18, 120, 200, 0.35);
}

.kpi-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--sd-muted);
}

.kpi-value {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--stiff-midnight);
  line-height: 1.1;
  margin-top: 0.1rem;
}

.kpi-value small {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--sd-muted);
}

.kpi-ico {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  background: var(--stiff-ice);
  color: var(--stiff-blue);
  flex-shrink: 0;
}

.kpi-ico-success { background: #dcfce7; color: #15803d; }
.kpi-ico-warning { background: #fff6df; color: #b45309; }
.kpi-ico-purple { background: #efe7ff; color: #6d28d9; }
.kpi-ico-danger { background: #fee2e2; color: #b91c1c; }

/* ---------- Estados vazios ---------- */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--sd-muted);
}

.empty-state-ico {
  width: 3.4rem;
  height: 3.4rem;
  margin: 0 auto 0.85rem;
  border-radius: 1rem;
  background: var(--stiff-ice);
  color: var(--stiff-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.empty-state-title {
  font-weight: 600;
  color: var(--stiff-gray-700);
  margin-bottom: 0.2rem;
}

/* ---------- Ajustes finos gerais ---------- */
.modal-content {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(4, 31, 65, 0.28);
}

.dropdown-menu { font-size: 0.9rem; }

.alert { border-radius: 12px; }

.tooltip { font-size: 0.78rem; }

@media (max-width: 575.98px) {
  .app-content { padding-top: 1rem; }
  .page-title { font-size: 1.25rem; }
}

.hub-tile-chevron {
  color: var(--stiff-gray-300);
  font-size: 0.85rem;
  flex-shrink: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

.hub-tile:hover .hub-tile-chevron {
  color: var(--stiff-blue);
  transform: translateX(2px);
}

/* Heros midnight: títulos SEMPRE claros (h1 global herdaria midnight-sobre-midnight) */
.page-hero :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4),
.hub-hero :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4),
.tasks-hero :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4),
.drive-hero :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4),
.mail-hero :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4),
.video-hero :is(h1, h2, h3, h4, .h1, .h2, .h3, .h4),
.module-hero-leaves :is(h1, h2, h3, h4),
.module-hero-drive :is(h1, h2, h3, h4),
.module-hero-mail :is(h1, h2, h3, h4),
.module-hero-docs :is(h1, h2, h3, h4) {
  color: #fff;
}

/* ---------- Sidebar recolhível (desktop) ---------- */
.side-collapse {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.45rem 0.6rem;
  border-radius: 0.55rem;
  margin-bottom: 0.5rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.side-collapse:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.side-collapse i { transition: transform 0.2s ease; }

@media (min-width: 992px) {
  .app-sidebar { transition: width 0.2s ease; }
  body.has-sidebar .app-main { transition: margin-left 0.2s ease; }

  html.sidebar-mini .app-sidebar { width: 76px; }
  html.sidebar-mini body.has-sidebar .app-main { margin-left: 76px; }

  html.sidebar-mini .side-brand { justify-content: center; padding-left: 0.4rem; padding-right: 0.4rem; }
  html.sidebar-mini .side-brand-text,
  html.sidebar-mini .side-label,
  html.sidebar-mini .side-section,
  html.sidebar-mini .side-badge,
  html.sidebar-mini .side-foot-brand { display: none; }

  html.sidebar-mini .side-nav { padding-left: 0.5rem; padding-right: 0.5rem; }
  html.sidebar-mini .side-item { justify-content: center; padding: 0.6rem 0; }
  html.sidebar-mini .side-item i { width: auto; font-size: 1.15rem; }
  html.sidebar-mini .side-collapse { justify-content: center; }
  html.sidebar-mini .side-collapse i { transform: rotate(180deg); }

  /* pontinho de badge quando recolhida (avisa sem ocupar espaço) */
  html.sidebar-mini .side-item:has(.side-badge)::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--stiff-cyan);
  }
}

/* ---------- Botão de recolher na borda da sidebar (em destaque) ---------- */
.side-edge-toggle {
  position: fixed;
  top: 78px;
  left: calc(var(--side-w) - 14px);
  z-index: 1050;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--stiff-gray-300);
  color: var(--stiff-navy);
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(4, 31, 65, 0.18);
  transition: left 0.2s ease, transform 0.15s ease, border-color 0.15s ease,
              box-shadow 0.15s ease;
  padding: 0;
}

.side-edge-toggle:hover {
  border-color: var(--stiff-cyan);
  color: var(--stiff-blue);
  transform: scale(1.12);
  box-shadow: 0 4px 14px rgba(22, 202, 245, 0.35);
}

.side-edge-toggle i { transition: transform 0.2s ease; line-height: 1; }

@media (min-width: 992px) {
  html.sidebar-mini .side-edge-toggle { left: calc(76px - 14px); }
  html.sidebar-mini .side-edge-toggle i { transform: rotate(180deg); }
}

/* ---------- Modo imersivo (editor OnlyOffice, sala de vídeo, terminal) ----------
 * Página declara {% block body_class %} app-immersive: o shell sai da frente —
 * sem sidebar, sem topbar, conteúdo ocupando a tela inteira. */
body.app-immersive .app-sidebar,
body.app-immersive .side-edge-toggle,
body.app-immersive .app-sidebar-backdrop,
body.app-immersive .app-topbar,
body.app-immersive .app-footer {
  display: none !important;
}

body.app-immersive.has-sidebar .app-main { margin-left: 0 !important; }

body.app-immersive .app-content {
  max-width: none;
  padding: 0.75rem 1rem 0.75rem;
}

/* ---------- Preferência visual por usuário ---------- */
.theme-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .4rem;
}

.theme-choice {
  border: 1px solid var(--sd-line);
  border-radius: .65rem;
  background: var(--sd-surface);
  color: var(--sd-muted);
  padding: .42rem .55rem;
  font-size: .76rem;
  font-weight: 650;
}

.theme-choice.active {
  color: var(--stiff-blue);
  border-color: rgba(18, 120, 200, .5);
  background: rgba(18, 120, 200, .1);
}

[data-bs-theme="dark"] {
  color-scheme: dark;
  --sd-bg: #070b12;
  --sd-surface: #101722;
  --sd-text: #e7edf6;
  --sd-muted: #9aa9bd;
  --sd-line: #263244;
  --sd-ring: inset 0 1px 0 rgba(255, 255, 255, .04);
  --sd-shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --sd-shadow-md: 0 6px 18px rgba(0, 0, 0, .28);
  --sd-shadow-lg: 0 14px 34px rgba(0, 0, 0, .38);
  --bs-body-bg: #070b12;
  --bs-body-color: #e7edf6;
  --bs-border-color: #263244;
  --bs-secondary-bg: #151e2b;
  --bs-tertiary-bg: #111925;
}

[data-bs-theme="dark"] body {
  background-image: radial-gradient(1000px 420px at 50% -180px, rgba(22, 202, 245, .1), transparent 72%);
}

[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] .h1,
[data-bs-theme="dark"] .h2,
[data-bs-theme="dark"] .h3,
[data-bs-theme="dark"] .h4 { color: #edf5ff; }

[data-bs-theme="dark"] .app-topbar,
[data-bs-theme="dark"] .card,
[data-bs-theme="dark"] .card-stat,
[data-bs-theme="dark"] .kpi-card,
[data-bs-theme="dark"] .feature-card,
[data-bs-theme="dark"] .hub-grid .hub-tile,
[data-bs-theme="dark"] .mail-sidebar,
[data-bs-theme="dark"] .pc-card,
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="dark"] .table,
[data-bs-theme="dark"] .offcanvas,
[data-bs-theme="dark"] .bg-white {
  --bs-card-bg: var(--sd-surface);
  --bs-modal-bg: var(--sd-surface);
  --bs-dropdown-bg: var(--sd-surface);
  --bs-list-group-bg: var(--sd-surface);
  background-color: var(--sd-surface) !important;
  color: var(--sd-text);
  border-color: var(--sd-line);
}

[data-bs-theme="dark"] .app-topbar { background:rgba(10, 15, 24, .88) !important; }
[data-bs-theme="dark"] .tb-burger,
[data-bs-theme="dark"] .tb-search,
[data-bs-theme="dark"] .tb-icon-btn,
[data-bs-theme="dark"] .tb-user {
  background:#111925;
  color:#b7c5d8;
  border-color:#2b394c;
}
[data-bs-theme="dark"] .table-sticky thead th { background:#111925; }
[data-bs-theme="dark"] .dashboard-tasks-panel { background:#161b20; border-color:#65572d; }
[data-bs-theme="dark"] .task-card-highlight { background:linear-gradient(90deg, #232117 0%, #101722 48%); }
[data-bs-theme="dark"] .mail-unread { background:#102333; }
[data-bs-theme="dark"] .mail-subject,
[data-bs-theme="dark"] .leg,
[data-bs-theme="dark"] .ponto-linha { color:#a8b7ca; }

[data-bs-theme="dark"] .bg-light,
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  background-color: #151e2b !important;
  color: var(--sd-text);
  border-color: #334155;
}

[data-bs-theme="dark"] .text-dark { color: #e7edf6 !important; }
[data-bs-theme="dark"] .text-muted { color: #9aa9bd !important; }
[data-bs-theme="dark"] .side-edge-toggle { background:#111925; border-color:#334155; color:#7ddfff; }
[data-bs-theme="dark"] .app-footer { color:#8fa0b5; border-color:#1f2b3a; }

/* ---------- Alertas digitais em primeiro plano ---------- */
.stiff-toast-stack {
  position: fixed;
  top: 78px;
  right: 22px;
  width: min(390px, calc(100vw - 28px));
  display: grid;
  gap: .75rem;
  z-index: 1400;
  pointer-events: none;
}

.stiff-toast {
  --toast-accent: #16caf5;
  position: relative;
  display: grid;
  grid-template-columns: 42px 1fr 28px;
  align-items: start;
  gap: .75rem;
  overflow: hidden;
  padding: .95rem .85rem;
  border: 1px solid color-mix(in srgb, var(--toast-accent) 55%, transparent);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(5, 13, 25, .97), rgba(11, 31, 57, .97));
  color: #f3f8ff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .38), 0 0 26px color-mix(in srgb, var(--toast-accent) 18%, transparent);
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(28px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
}

.stiff-toast.visible { opacity:1; transform:translateX(0) scale(1); }
.stiff-toast.leaving { opacity:0; transform:translateX(30px) scale(.97); }
.stiff-toast-tarefa { --toast-accent:#7c8cff; }
.stiff-toast-email { --toast-accent:#16caf5; }
.stiff-toast-denuncia { --toast-accent:#ffbb55; }
.stiff-toast > .bi { font-size:1.35rem; color:var(--toast-accent); padding:.42rem; border-radius:10px; background:color-mix(in srgb, var(--toast-accent) 13%, transparent); }
.stiff-toast-glow { position:absolute; inset:0 auto 0 0; width:3px; background:var(--toast-accent); box-shadow:0 0 18px var(--toast-accent); }
.stiff-toast-label { color:var(--toast-accent); font-size:.62rem; line-height:1; letter-spacing:.17em; font-weight:800; margin-bottom:.38rem; }
.stiff-toast-title { font-weight:750; line-height:1.25; }
.stiff-toast-body { color:#aebed2; font-size:.78rem; margin-top:.28rem; line-height:1.35; }
.stiff-toast-close { border:0; background:transparent; color:#8394aa; padding:.2rem; }
.stiff-toast-close:hover { color:#fff; }

@media (max-width: 575.98px) {
  .stiff-toast-stack { top:68px; right:14px; }
}
