:root {
  --sd-primary: #0b3d91;
  --sd-primary-dark: #082c6b;
  --sd-accent: #f0b429;
  --sd-bg: #f4f6f9;
  --sd-text: #1f2937;
  --sd-muted: #6b7280;
  --sd-border: rgba(255, 255, 255, 0.14);
  --sd-radius: 0.75rem;
}

body {
  min-height: 100vh;
  background: var(--sd-bg);
  color: var(--sd-text);
}

/* ========== Navbar limpa ========== */
.app-navbar {
  background: linear-gradient(180deg, var(--sd-primary) 0%, var(--sd-primary-dark) 100%);
  box-shadow: 0 2px 12px rgba(8, 44, 107, 0.22);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.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(--sd-accent);
  color: #1a1a1a;
  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(240, 180, 41, 0.18);
  color: #fff !important;
  font-weight: 600;
}

.app-nav .nav-link-emphasis:hover {
  background: rgba(240, 180, 41, 0.28);
}

.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: #eef3fb;
  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, #60a5fa, #2563eb);
  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 #e5e7eb;
  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, #0b3d91 0%, #1453b8 50%, #f0b429 100%);
  box-shadow: 0 0.75rem 2rem rgba(11, 61, 145, 0.28);
}

.task-card-highlight {
  border-left: 4px solid #f0b429 !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(240, 180, 41, 0.12);
}

/* 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 #e5e7eb;
    margin: 0.25rem 0 0.5rem !important;
  }
}

/* Drive */
.drive-hero {
  background: linear-gradient(135deg, #0f766e 0%, #0b3d91 55%, #1453b8 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%, #0b3d91 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, #0b3d91 0%, #1453b8 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 {
  border-radius: 1.15rem;
  border: 1px solid #e8edf5;
  background: #fff;
  box-shadow: 0 0.35rem 1.1rem rgba(15, 23, 42, 0.06);
  padding: 1.15rem 1.2rem 1rem;
  color: var(--sd-text);
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  min-height: 11.5rem;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0.85rem 1.8rem rgba(15, 23, 42, 0.12);
  color: var(--sd-text);
  border-color: #c7d7f5;
}

.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: #e8f0fe; color: #0b3d91; }
.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 #f1f5f9;
  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 #e8edf5;
  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: #eef3fc;
  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%, #0b3d91 55%, #1453b8 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%, #475569 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: #334155;
  background: transparent;
}
.mail-folder-list .list-group-item.active {
  background: #e0f2fe !important;
  color: #0369a1 !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: #475569; margin-top: 0.1rem; }
.mail-sidebar { background: #fff; }

.hub-tile-primary .hub-tile-icon { background: #e8f0fe; color: #0b3d91; }
.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: #f1f5f9; color: #475569; }
.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: #f1f5f9;
}

.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%, #0b3d91 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: #0b3d91;
  border-color: #0b3d91;
}

.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;
}
