/* ==========================================================================
   MCPapeis Personnel Management System - Design Tokens & Stylesheet
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #0b0f19;
  --bg-sidebar: #0f1626;
  --bg-card: #182235;
  --bg-card-hover: #1f2d47;
  --border-color: #26354d;
  
  --primary: #6366f1; /* Indigo */
  --primary-hover: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.15);
  
  --accent: #06b6d4; /* Cyan */
  --accent-glow: rgba(6, 182, 212, 0.15);
  
  --success: #10b981; /* Emerald */
  --success-glow: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b; /* Amber */
  --danger: #ef4444; /* Rose */
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  /* Layout Metrics */
  --sidebar-width: 260px;
  --header-height: 70px;
  --border-radius: 12px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Fonts */
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-display: 'Outfit', sans-serif;
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-primary);
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a {
  text-decoration: none;
  color: inherit;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Global Loader */
.initial-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 16px;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s infinite linear;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==========================================================================
   TELA DE LOGIN (Glassmorphism & Glow)
   ========================================================================== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%),
              radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.15) 0%, transparent 40%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(24, 34, 53, 0.6);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  text-align: center;
}

.login-logo {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.input-wrapper {
  position: relative;
}

.input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 16px;
  transition: var(--transition-smooth);
}

.form-control {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: rgba(15, 22, 38, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  outline: none;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-control:focus + i {
  color: var(--primary);
}

.btn {
  width: 100%;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--primary-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--primary-glow);
  filter: brightness(1.1);
}

.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: none;
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-secondary);
  box-shadow: none;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #be123c 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}
.btn-danger:hover {
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   LAYOUT DO PAINEL (Sidebar + Content)
   ========================================================================== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  z-index: 100;
}

.sidebar-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-logo span {
  color: var(--primary);
}

.sidebar-menu {
  list-style: none;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.sidebar-item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.sidebar-item a i {
  font-size: 16px;
}

.sidebar-item a:hover,
.sidebar-item.active a {
  color: var(--text-primary);
  background-color: var(--bg-card);
}

.sidebar-item.active a {
  border-left: 3px solid var(--primary);
  background: linear-gradient(90deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.05) 100%);
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-profile-short {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-profile-short .user-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-profile-short .user-role {
  font-size: 12px;
  color: var(--text-secondary);
}

.logout-icon-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 8px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.logout-icon-btn:hover {
  color: var(--danger);
  background-color: rgba(239, 68, 68, 0.1);
}

/* Conteúdo Principal */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0; /* evita estouro de flex */
}

.main-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background-color: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
}

.main-content {
  padding: 40px;
  flex-grow: 1;
}

/* ==========================================================================
   TELA DASHBOARD
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-info .stat-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-info .stat-label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.stat-icon.primary { background: rgba(99, 102, 241, 0.1); color: var(--primary); }
.stat-icon.accent { background: rgba(6, 182, 212, 0.1); color: var(--accent); }
.stat-icon.success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.dashboard-sections {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.section-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.section-card-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

/* ==========================================================================
   TABELAS E CONTROLES (Lista de Funcionários)
   ========================================================================== */
.table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}

.search-bar {
  position: relative;
  max-width: 320px;
  width: 100%;
}

.search-bar i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.search-bar input {
  padding-left: 40px;
}

.filter-group {
  display: flex;
  gap: 12px;
}

.select-control {
  padding: 10px 16px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  outline: none;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.select-control:focus {
  border-color: var(--primary);
}

.btn-icon-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  padding: 10px 20px;
}

.table-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 16px 24px;
  background-color: rgba(15, 22, 38, 0.4);
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  vertical-align: middle;
}

.data-table tbody tr {
  transition: var(--transition-smooth);
}

.data-table tbody tr:hover {
  background-color: rgba(24, 34, 53, 0.5);
  cursor: pointer;
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge.success {
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge.danger {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.badge.warning {
  background-color: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  width: auto;
}

/* ==========================================================================
   PASTA DO FUNCIONÁRIO (tabs e sub-telas)
   ========================================================================== */
.employee-header-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 20px;
}

.employee-summary-info {
  display: flex;
  align-items: center;
  gap: 24px;
}

.employee-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-display);
}

.employee-meta h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 4px;
}

.employee-meta p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Abas */
.tabs-navigation {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 32px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 12px 24px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Formulário de Cadastro / Edição */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
}

/* ==========================================================================
   SESSÕES DE ARQUIVOS (Contra-cheques e Documentos)
   ========================================================================== */
.files-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

@media (max-width: 1024px) {
  .files-layout, .dashboard-sections {
    grid-template-columns: 1fr;
  }
}

.upload-card {
  background-color: var(--bg-card);
  border: 2px dashed var(--border-color);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
  transition: var(--transition-smooth);
}

.upload-card:hover {
  border-color: var(--primary);
}

.upload-card i {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 16px;
}

.upload-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-item {
  background-color: rgba(24, 34, 53, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.file-item:hover {
  background-color: var(--bg-card);
  border-color: var(--text-muted);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 16px;
}

.file-icon {
  width: 40px;
  height: 40px;
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.file-meta .file-name {
  font-weight: 600;
  font-size: 14px;
}

.file-meta .file-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

.file-actions {
  display: flex;
  gap: 8px;
}

.btn-icon-only {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

/* ==========================================================================
   SISTEMA DE NOTIFICAÇÕES (Toasts)
   ========================================================================== */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 16px 20px;
  color: var(--text-primary);
  min-width: 300px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transition: var(--transition-smooth);
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}

/* ==========================================================================
   MODAL DE CONFIRMAÇÃO
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(11, 15, 25, 0.8);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-card {
  width: 100%;
  max-width: 480px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  animation: modalIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.modal-body {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* ==========================================================================
   RESPONSIVIDADE GERAL
   ========================================================================== */
@media (max-width: 768px) {
  .sidebar {
    width: 60px;
  }
  .sidebar-logo span, .sidebar-item a span, .user-profile-short, .sidebar-header h2 {
    display: none;
  }
  .main-wrapper {
    margin-left: 60px;
  }
  .main-header {
    padding: 0 20px;
  }
  .main-content {
    padding: 20px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   FOTO DE PERFIL COM EFEITO HOVER E DETALHES DE ENDEREÇO / TIMELINE
   ========================================================================== */

/* Foto de Perfil Interativa */
.employee-avatar-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid var(--border-color);
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.employee-avatar-wrapper:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.employee-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.employee-avatar-placeholder-text {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
}

.avatar-hover-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 22, 38, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 600;
  gap: 4px;
}

.employee-avatar-wrapper:hover .avatar-hover-overlay {
  opacity: 1;
}

.avatar-hover-overlay i {
  font-size: 16px;
}

/* Ocultar input de upload de foto nativo */
#photo-file-input {
  display: none;
}

/* Linha do Tempo (Timeline) */
.timeline-container {
  position: relative;
  padding-left: 20px;
  margin-top: 20px;
}

.timeline-container::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 31px;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
}

.timeline-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  margin-left: 10px;
  transition: var(--transition-smooth);
}

/* Cores dos Badges por Tipo */
.timeline-badge.Promotion { background-color: var(--success); border-color: #059669; color: #fff; }
.timeline-badge.Transfer { background-color: var(--accent); border-color: #0891b2; color: #fff; }
.timeline-badge.Salary { background-color: var(--warning); border-color: #d97706; color: #fff; }
.timeline-badge.Feedback { background-color: var(--primary); border-color: #4f46e5; color: #fff; }

.timeline-content-card {
  flex-grow: 1;
  background-color: rgba(24, 34, 53, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  transition: var(--transition-smooth);
}

.timeline-content-card:hover {
  background-color: var(--bg-card);
  border-color: var(--text-muted);
}

.timeline-header-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.timeline-event-title {
  font-weight: 600;
  font-size: 15px;
}

.timeline-event-date {
  font-size: 12px;
  color: var(--text-secondary);
}

.timeline-event-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-wrap;
}

.timeline-event-type-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 8px;
}

.timeline-event-type-label.Promotion { background-color: rgba(16, 185, 129, 0.1); color: var(--success); }
.timeline-event-type-label.Transfer { background-color: rgba(6, 182, 212, 0.1); color: var(--accent); }
.timeline-event-type-label.Salary { background-color: rgba(245, 158, 11, 0.1); color: var(--warning); }
.timeline-event-type-label.Feedback { background-color: rgba(99, 102, 241, 0.1); color: var(--primary); }

.timeline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
  border-top: 1px dashed var(--border-color);
  padding-top: 8px;
}

/* ==========================================================================
   PASTAS COLAPSÁVEIS DE DOCUMENTOS
   ========================================================================== */
.folder-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.folder-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: var(--transition-smooth);
}

.folder-card.open {
  border-color: var(--primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.05);
}

.folder-header {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  background-color: rgba(15, 22, 38, 0.2);
  transition: var(--transition-smooth);
}

.folder-header:hover {
  background-color: rgba(15, 22, 38, 0.4);
}

.folder-title-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.folder-icon {
  font-size: 20px;
  color: var(--warning);
}

.folder-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
}

.folder-count {
  font-size: 12px;
  color: var(--text-secondary);
  background-color: var(--border-color);
  padding: 2px 8px;
  border-radius: 12px;
}

.folder-chevron {
  transition: var(--transition-smooth);
  color: var(--text-secondary);
}

.folder-card.open .folder-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

.folder-content {
  display: none;
  padding: 20px;
  border-top: 1px solid var(--border-color);
  background-color: rgba(11, 15, 25, 0.2);
}

.folder-card.open .folder-content {
  display: block;
}

/* Histórico de Versões do Documento */
.version-badge {
  font-size: 11px;
  font-weight: 700;
  background-color: var(--border-color);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

/* ==========================================================================
   WIDGET DE ALERTAS DO DASHBOARD
   ========================================================================== */
.alerts-banner {
  background-color: rgba(24, 34, 53, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.alerts-banner-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.alerts-banner-header i {
  font-size: 20px;
  color: var(--warning);
}

.alerts-banner-header h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
}

.alerts-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 8px;
}

.alert-item-card {
  background-color: rgba(15, 22, 38, 0.4);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: var(--transition-smooth);
}

.alert-item-card:hover {
  background-color: var(--bg-card-hover);
}

.alert-item-card.danger { border-left-color: var(--danger); }
.alert-item-card.warning { border-left-color: var(--warning); }
.alert-item-card.primary { border-left-color: var(--primary); }

.alert-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.alert-item-title {
  font-weight: 600;
  font-size: 14px;
}

.alert-item-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.alert-item-user {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   TELA DE CONFIGURAÇÕES SMTP
   ========================================================================== */
.settings-container {
  max-width: 600px;
  margin: 0 auto;
}

.settings-info-box {
  background-color: rgba(99, 102, 241, 0.05);
  border: 1px dashed var(--primary);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.settings-info-box i {
  color: var(--primary);
  margin-right: 8px;
  font-size: 15px;
}

/* ==========================================================================
   TELA DE CONTROLE DE FALTAS (CALENDÁRIO)
   ========================================================================== */
.calendar-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
}

.calendar-navigation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.calendar-month-year-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  text-transform: capitalize;
}

.calendar-nav-buttons {
  display: flex;
  gap: 8px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.calendar-weekday-label {
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 0;
}

.calendar-day-cell {
  background-color: rgba(15, 22, 38, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  aspect-ratio: 1.2 / 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transition: var(--transition-smooth);
}

.calendar-day-cell:hover {
  background-color: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.calendar-day-cell.today {
  border-color: var(--primary);
  background-color: rgba(99, 102, 241, 0.05);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.calendar-day-cell.today::after {
  content: '';
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--primary);
}

.calendar-day-cell.other-month {
  opacity: 0.25;
  cursor: default;
}

.calendar-day-cell.other-month:hover {
  background-color: rgba(15, 22, 38, 0.4);
  border-color: var(--border-color);
}

.calendar-day-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}

.calendar-day-alerts-container {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.calendar-day-absence-badge {
  background-color: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Linhas no Popup de Faltas */
.absence-employee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  margin-bottom: 8px;
  background-color: rgba(15, 22, 38, 0.2);
  transition: var(--transition-smooth);
  gap: 16px;
}

.absence-employee-row.marked {
  background-color: rgba(239, 68, 68, 0.03);
  border-color: rgba(239, 68, 68, 0.2);
}

.absence-employee-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-grow: 1;
  min-width: 0;
}

.absence-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--danger);
}

.absence-justification-input {
  max-width: 200px;
  width: 100%;
  padding: 6px 12px;
  font-size: 12px;
}

.absence-justification-input:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}



