/* ========================================
   FORTYCOBRANCAS - DESIGN SYSTEM MODERNO
   Sistema de temas dark/light + efeitos
======================================== */

/* ===== VARIÁVEIS CSS - LIGHT MODE (padrão) ===== */
:root {
  /* Cores primárias - Verde modernizado */
  --fc-primary: #10b981;
  --fc-primary-dark: #059669;
  --fc-primary-light: #34d399;
  --fc-primary-soft: #6ee7b7;
  --fc-accent: #06b6d4;
  --fc-accent-light: #22d3ee;
  
  /* Backgrounds */
  --fc-bg: #f8fafc;
  --fc-bg-alt: #f1f5f9;
  --fc-surface: #ffffff;
  --fc-surface-hover: #f8fafc;
  --fc-glass: rgba(255, 255, 255, 0.75);
  --fc-glass-border: rgba(255, 255, 255, 0.3);
  
  /* Texto */
  --fc-text: #0f172a;
  --fc-text-secondary: #475569;
  --fc-muted: #64748b;
  
  /* Bordas e sombras */
  --fc-border: #e2e8f0;
  --fc-border-hover: #cbd5e1;
  --fc-shadow: rgba(15, 23, 42, 0.08);
  --fc-shadow-lg: rgba(15, 23, 42, 0.12);
  --fc-glow: rgba(16, 185, 129, 0.4);
  
  /* Status */
  --fc-success: #10b981;
  --fc-warning: #f59e0b;
  --fc-danger: #ef4444;
  --fc-info: #3b82f6;
  
  /* Gradientes */
  --fc-gradient-primary: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --fc-gradient-hero: linear-gradient(-45deg, #10b981, #059669, #06b6d4, #0891b2);
  --fc-gradient-surface: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  
  /* Transições */
  --fc-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --fc-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --fc-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Blur */
  --fc-blur: 20px;
  --fc-blur-lg: 40px;
  
  /* Radius */
  --fc-radius-sm: 8px;
  --fc-radius: 12px;
  --fc-radius-lg: 16px;
  --fc-radius-xl: 24px;
  --fc-radius-full: 9999px;
}

/* ===== VARIÁVEIS CSS - DARK MODE ===== */
[data-theme="dark"] {
  --fc-primary: #34d399;
  --fc-primary-dark: #10b981;
  --fc-primary-light: #6ee7b7;
  --fc-primary-soft: #a7f3d0;
  --fc-accent: #22d3ee;
  --fc-accent-light: #67e8f9;
  
  --fc-bg: #0f172a;
  --fc-bg-alt: #1e293b;
  --fc-surface: #1e293b;
  --fc-surface-hover: #334155;
  --fc-glass: rgba(30, 41, 59, 0.8);
  --fc-glass-border: rgba(255, 255, 255, 0.1);
  
  --fc-text: #f1f5f9;
  --fc-text-secondary: #cbd5e1;
  --fc-muted: #94a3b8;
  
  --fc-border: #334155;
  --fc-border-hover: #475569;
  --fc-shadow: rgba(0, 0, 0, 0.3);
  --fc-shadow-lg: rgba(0, 0, 0, 0.5);
  --fc-glow: rgba(52, 211, 153, 0.5);
  
  --fc-gradient-primary: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
  --fc-gradient-hero: linear-gradient(-45deg, #34d399, #10b981, #22d3ee, #06b6d4);
  --fc-gradient-surface: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
}

/* ===== KEYFRAMES - ANIMAÇÕES ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeInDown {
  from { 
    opacity: 0; 
    transform: translateY(-20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes fadeInLeft {
  from { 
    opacity: 0; 
    transform: translateX(-30px); 
  }
  to { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

@keyframes fadeInRight {
  from { 
    opacity: 0; 
    transform: translateX(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateX(0); 
  }
}

@keyframes scaleIn {
  from { 
    opacity: 0; 
    transform: scale(0.9); 
  }
  to { 
    opacity: 1; 
    transform: scale(1); 
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 20px var(--fc-glow); }
  50% { box-shadow: 0 0 40px var(--fc-glow), 0 0 60px var(--fc-glow); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes ripple {
  0% { transform: scale(0); opacity: 0.5; }
  100% { transform: scale(4); opacity: 0; }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===== RESET E BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
  background: var(--fc-bg);
  color: var(--fc-text);
  transition: var(--fc-transition-slow);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Background com padrão sutil */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 20%, var(--fc-primary) 0%, transparent 25%),
    radial-gradient(circle at 80% 80%, var(--fc-accent) 0%, transparent 25%);
  opacity: 0.03;
  pointer-events: none;
  z-index: -1;
}

::selection {
  background: var(--fc-primary);
  color: white;
}

/* ===== LAYOUT ===== */
.app-shell {
  width: min(100%, 1140px);
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.dashboard-shell {
  width: min(100%, 1480px);
}

/* ===== TIPOGRAFIA ===== */
h1, h2, h3, h4, h5, h6 {
  color: var(--fc-text);
  font-weight: 700;
  line-height: 1.3;
}

.text-muted {
  color: var(--fc-muted) !important;
}

.text-gradient {
  background: var(--fc-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== GLASSMORPHISM ===== */
.glass {
  background: var(--fc-glass);
  backdrop-filter: blur(var(--fc-blur));
  -webkit-backdrop-filter: blur(var(--fc-blur));
  border: 1px solid var(--fc-glass-border);
  box-shadow: 0 8px 32px var(--fc-shadow);
}

.glass-strong {
  background: var(--fc-glass);
  backdrop-filter: blur(var(--fc-blur-lg));
  -webkit-backdrop-filter: blur(var(--fc-blur-lg));
  border: 1px solid var(--fc-glass-border);
  box-shadow: 0 25px 50px var(--fc-shadow-lg);
}

/* ===== CARDS ===== */
.card {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  box-shadow: 0 4px 6px var(--fc-shadow);
  transition: var(--fc-transition);
  overflow: hidden;
}

.card:hover {
  border-color: var(--fc-border-hover);
  box-shadow: 0 10px 40px var(--fc-shadow-lg);
}

.card-hover-lift {
  transition: var(--fc-transition);
}

.card-hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px var(--fc-shadow-lg);
}

.card-hover-glow:hover {
  box-shadow: 0 0 0 2px var(--fc-primary), 0 20px 40px var(--fc-shadow-lg);
}

.card-3d {
  transition: var(--fc-transition);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-3d:hover {
  transform: rotateX(2deg) rotateY(-2deg) translateY(-4px);
}

/* ===== BOTÕES ===== */
.btn {
  position: relative;
  overflow: hidden;
  transition: var(--fc-transition);
  font-weight: 500;
  border-radius: var(--fc-radius);
  padding: 0.5rem 1.25rem;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::after {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: var(--fc-gradient-primary);
  border: none;
  color: white;
  box-shadow: 0 4px 15px var(--fc-glow);
}

.btn-primary:hover,
.btn-primary:focus {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--fc-glow);
  filter: brightness(1.1);
  background: var(--fc-gradient-primary);
  color: white;
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline-primary {
  color: var(--fc-primary);
  border: 2px solid var(--fc-primary);
  background: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background: var(--fc-primary);
  border-color: var(--fc-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--fc-glow);
}

.btn-outline-secondary {
  color: var(--fc-text-secondary);
  border: 2px solid var(--fc-border);
  background: transparent;
}

.btn-outline-secondary:hover {
  background: var(--fc-surface-hover);
  border-color: var(--fc-border-hover);
  color: var(--fc-text);
}

.btn-outline-light {
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
  color: white;
}

.btn-light {
  background: white;
  color: var(--fc-text);
  border: none;
}

.btn-light:hover {
  background: var(--fc-bg);
  color: var(--fc-primary);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
  color: white;
}

.btn-success:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  color: white;
}

.btn-danger:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  color: white;
}

.btn-warning:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

/* Efeito de loading no botão */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== INPUTS E FORMULÁRIOS ===== */
.form-control,
.form-select {
  background: var(--fc-surface);
  border: 2px solid var(--fc-border);
  border-radius: var(--fc-radius);
  color: var(--fc-text);
  padding: 0.75rem 1rem;
  transition: var(--fc-transition);
  font-size: 0.95rem;
}

.form-control:focus,
.form-select:focus {
  background: var(--fc-surface);
  border-color: var(--fc-primary);
  box-shadow: 0 0 0 4px var(--fc-glow);
  color: var(--fc-text);
  outline: none;
}

.form-control::placeholder {
  color: var(--fc-muted);
}

.form-label {
  color: var(--fc-text-secondary);
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* Input com ícone */
.input-icon-wrapper {
  position: relative;
}

.input-icon-wrapper .form-control {
  padding-left: 2.75rem;
}

.input-icon-wrapper .input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fc-muted);
  transition: var(--fc-transition);
}

.input-icon-wrapper .form-control:focus + .input-icon,
.input-icon-wrapper:focus-within .input-icon {
  color: var(--fc-primary);
}

/* Floating label */
.form-floating > .form-control,
.form-floating > .form-select {
  height: calc(3.5rem + 4px);
  padding: 1rem 1rem;
}

.form-floating > label {
  padding: 1rem;
  color: var(--fc-muted);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
  color: var(--fc-primary);
}

/* ===== TABELAS ===== */
.table {
  color: var(--fc-text);
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background: var(--fc-bg-alt);
  border: none;
  padding: 1rem;
  font-weight: 600;
  color: var(--fc-text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.table thead tr:first-child th:first-child {
  border-radius: var(--fc-radius) 0 0 0;
}

.table thead tr:first-child th:last-child {
  border-radius: 0 var(--fc-radius) 0 0;
}

.table tbody tr {
  transition: var(--fc-transition-fast);
}

.table tbody tr:hover {
  background: var(--fc-surface-hover);
}

.table td {
  padding: 1rem;
  border-bottom: 1px solid var(--fc-border);
  vertical-align: middle;
}

.table-hover tbody tr:hover td {
  background: transparent;
}

/* ===== BADGES E PILLS ===== */
.badge {
  padding: 0.4rem 0.8rem;
  border-radius: var(--fc-radius-full);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--fc-radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 2s infinite;
}

.status-pill.status-1,
.status-pill.status-2 {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.status-pill.status-3,
.status-pill.status-4 {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.status-pill.status-5 {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
}

.status-pill.status-6 {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
}

/* ===== ALERTAS ===== */
.alert {
  border: none;
  border-radius: var(--fc-radius);
  padding: 1rem 1.25rem;
  animation: fadeInDown 0.4s ease-out;
  box-shadow: 0 4px 12px var(--fc-shadow);
}

.alert-success {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
}

.alert-warning {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  color: #92400e;
}

.alert-info {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
}

/* ===== COMPONENTES ESPECÍFICOS ===== */

/* Brand Badge */
.brand-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--fc-radius);
  background: var(--fc-gradient-primary);
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px var(--fc-glow);
  animation: float 3s ease-in-out infinite;
}

.brand-mark {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: var(--fc-radius);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.brand-logo-image {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Hero Header */
.hero-header {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-xl);
  position: relative;
  overflow: hidden;
  animation: fadeInDown 0.6s ease-out;
}

.hero-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--fc-gradient-primary);
}

.hero-title {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--fc-text);
  line-height: 1.2;
}

/* Sector Cards */
.sector-card {
  display: block;
  padding: 1.5rem;
  border-radius: var(--fc-radius-lg);
  border: 1px solid var(--fc-border);
  background: var(--fc-surface);
  text-decoration: none;
  color: var(--fc-text);
  transition: var(--fc-transition);
  position: relative;
  overflow: hidden;
}

.sector-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--fc-gradient-primary);
  opacity: 0;
  transition: var(--fc-transition);
}

.sector-card:hover {
  transform: translateY(-6px);
  border-color: var(--fc-primary);
  box-shadow: 0 20px 40px var(--fc-shadow-lg), 0 0 0 1px var(--fc-primary);
  color: var(--fc-text);
}

.sector-card:hover::before {
  opacity: 0.03;
}

.sector-card .tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--fc-radius-full);
  background: linear-gradient(135deg, var(--fc-primary) 0%, var(--fc-accent) 100%);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Steps */
.steps-wrap {
  position: relative;
}

.steps-wrap .step-num {
  width: 44px;
  height: 44px;
  border-radius: var(--fc-radius-full);
  background: var(--fc-gradient-primary);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px var(--fc-glow);
  transition: var(--fc-transition);
}

.steps-wrap .col-md-4:hover .step-num {
  transform: scale(1.1);
  box-shadow: 0 8px 25px var(--fc-glow);
}

/* Login */
.login-shell {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
}

.login-shell::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--fc-gradient-hero);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
  opacity: 0.1;
  z-index: -1;
}

.login-card {
  width: 100%;
  max-width: 420px;
  border-radius: var(--fc-radius-xl);
  border: 1px solid var(--fc-border);
  animation: scaleIn 0.5s ease-out;
}

.login-card.shake {
  animation: shake 0.5s ease-out;
}

/* Admin Top Bar */
.admin-top {
  background: var(--fc-gradient-primary);
  color: white;
  border-radius: var(--fc-radius-lg);
  position: relative;
  overflow: hidden;
  animation: fadeInDown 0.4s ease-out;
}

.admin-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

/* Stat Boxes */
.stat-box {
  border-radius: var(--fc-radius);
  border: 1px solid var(--fc-border);
  background: var(--fc-surface);
  padding: 1.25rem;
  transition: var(--fc-transition);
  position: relative;
  overflow: hidden;
}

.stat-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--fc-gradient-primary);
  opacity: 0;
  transition: var(--fc-transition);
}

.stat-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--fc-shadow);
}

.stat-box:hover::before {
  opacity: 1;
}

.stat-box .value {
  font-size: 2rem;
  font-weight: 800;
  background: var(--fc-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Form Shell */
.form-shell {
  max-width: 980px;
  margin: 0 auto;
}

.form-top {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  padding: 1.5rem;
  animation: fadeInDown 0.4s ease-out;
}

.form-card {
  border-radius: var(--fc-radius-lg);
  animation: fadeInUp 0.5s ease-out 0.1s both;
}

/* View Card */
.view-card {
  border-radius: var(--fc-radius-lg);
  animation: fadeIn 0.4s ease-out;
}

.view-chip {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: var(--fc-radius-full);
  background: var(--fc-gradient-primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Data Boxes */
.data-box {
  background: var(--fc-bg-alt);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius);
  padding: 1rem 1.25rem;
  min-height: 72px;
  transition: var(--fc-transition);
}

.data-box:hover {
  border-color: var(--fc-primary);
  background: var(--fc-surface);
}

/* List Groups */
.list-group-item {
  background: var(--fc-surface);
  border-color: var(--fc-border);
  color: var(--fc-text);
  transition: var(--fc-transition);
}

.list-group-item:hover {
  background: var(--fc-surface-hover);
}

/* ===== TOGGLE DE TEMA ===== */
.theme-toggle-wrapper {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
}

.theme-toggle {
  position: relative;
  width: 56px;
  height: 28px;
  border-radius: var(--fc-radius-full);
  background: var(--fc-bg-alt);
  border: 2px solid var(--fc-border);
  cursor: pointer;
  transition: var(--fc-transition);
  display: flex;
  align-items: center;
  padding: 2px;
  box-shadow: 0 4px 12px var(--fc-shadow);
}

.theme-toggle:hover {
  border-color: var(--fc-primary);
  transform: scale(1.05);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--fc-gradient-primary);
  transition: var(--fc-transition);
  left: 3px;
  box-shadow: 0 2px 8px var(--fc-glow);
}

[data-theme="dark"] .theme-toggle::before {
  left: calc(100% - 23px);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
  position: absolute;
  width: 14px;
  height: 14px;
  transition: var(--fc-transition);
  pointer-events: none;
}

.theme-toggle .icon-sun {
  left: 7px;
  opacity: 1;
}

.theme-toggle .icon-moon {
  right: 7px;
  opacity: 0.5;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  opacity: 0.5;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  opacity: 1;
}

/* ===== ANIMAÇÕES DE ENTRADA (scroll) ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }
.animate-on-scroll.delay-4 { transition-delay: 0.4s; }

/* ===== SCROLLBAR CUSTOMIZADA ===== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--fc-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--fc-border);
  border-radius: var(--fc-radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--fc-primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
  .app-shell {
    width: 100%;
    padding: 0 0.75rem 1.5rem;
  }

  .hero-header,
  .form-top,
  .card-body {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .stat-box .value {
    font-size: 1.5rem;
  }

  .admin-actions .btn {
    min-width: auto;
  }
}

@media (max-width: 767.98px) {
  body {
    font-size: 0.92rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .brand-mark {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .brand-logo-image {
    width: 34px;
    height: 34px;
  }

  .brand-badge {
    width: 42px;
    height: 42px;
  }

  .form-shell .btn {
    width: 100%;
  }

  .dashboard-shell .table {
    font-size: 0.86rem;
  }

  .admin-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
  }

  .admin-actions .btn {
    width: 100%;
  }

  .stat-box {
    padding: 1rem;
  }

  .stat-box .value {
    font-size: 1.25rem;
  }
}

@media (min-width: 1200px) {
  .app-shell.dashboard-shell {
    width: min(100%, 1480px);
  }
}

/* ===== UTILITÁRIOS ===== */
.shadow-glow {
  box-shadow: 0 0 30px var(--fc-glow);
}

.border-glow {
  border: 2px solid var(--fc-primary);
  box-shadow: 0 0 20px var(--fc-glow);
}

.hover-scale {
  transition: var(--fc-transition);
}

.hover-scale:hover {
  transform: scale(1.02);
}

.hover-lift {
  transition: var(--fc-transition);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* Focus visible para acessibilidade */
:focus-visible {
  outline: 2px solid var(--fc-primary);
  outline-offset: 2px;
}

/* ===== DASHBOARD TI - COMPONENTES REDESENHADOS ===== */

/* Header Meta Info */
.header-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.header-meta svg {
  opacity: 0.8;
}

.header-meta-live {
  color: rgba(255, 255, 255, 0.9);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

/* Stat Cards - Redesenhados */
.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  border-radius: var(--fc-radius-lg);
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  transition: var(--fc-transition);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  transition: var(--fc-transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--fc-shadow-lg);
}

.stat-card-total::before { background: var(--fc-primary); }
.stat-card-warning::before { background: #f59e0b; }
.stat-card-success::before { background: #10b981; }
.stat-card-info::before { background: #3b82f6; }

.stat-card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--fc-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-card-total .stat-card-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.15) 100%);
  color: var(--fc-primary);
}

.stat-card-warning .stat-card-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.stat-card-success .stat-card-icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.stat-card-info .stat-card-icon {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
}

.stat-card-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.stat-card-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--fc-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.stat-card-value {
  font-size: 1.75rem;
  font-weight: 800;
  background: var(--fc-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

/* Pending Cards */
.pending-card {
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
}

.pending-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--fc-border);
  background: var(--fc-bg-alt);
}

.pending-card-header-primary {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.08) 100%);
}

.pending-card-header-warning {
  background: rgba(245, 158, 11, 0.08);
}

.pending-card-header h2 {
  color: var(--fc-text);
}

.pending-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--fc-radius-full);
  background: var(--fc-primary);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
}

.pending-count-warning {
  background: #f59e0b;
}

.pending-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
}

.pending-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--fc-border);
  transition: var(--fc-transition-fast);
}

.pending-item:last-child {
  border-bottom: none;
}

.pending-item:hover {
  background: var(--fc-surface-hover);
}

.pending-item-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.pending-item-id {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--fc-primary);
  text-transform: uppercase;
}

.pending-item-name {
  font-weight: 600;
  color: var(--fc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--fc-muted);
}

.pending-item-setor {
  font-weight: 500;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fc-muted);
}

.status-dot-1, .status-dot-2, .status-dot-rh {
  background: #f59e0b;
}

.status-dot-3, .status-dot-4, .status-dot-ti {
  background: #10b981;
}

.pending-item-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--fc-muted);
  gap: 0.5rem;
}

.pending-item-disabled {
  opacity: 0.6;
}

/* Search and Filter Bar */
.search-filter-bar {
  border-radius: var(--fc-radius-lg);
}

.search-input-wrapper {
  position: relative;
}

.search-input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fc-muted);
  transition: var(--fc-transition);
  pointer-events: none;
}

.search-input {
  padding-left: 2.75rem !important;
  height: 44px;
}

.search-input:focus + .search-input-icon {
  color: var(--fc-primary);
}

/* Main Table Card */
.main-table-card {
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
}

.main-table-header {
  padding: 1rem 1.25rem;
  background: var(--fc-bg-alt);
  border-bottom: 1px solid var(--fc-border);
}

.main-table {
  margin-bottom: 0;
}

.main-table thead th {
  background: transparent;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fc-muted);
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--fc-border);
}

.main-table tbody td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
}

.table-row-hover {
  transition: var(--fc-transition-fast);
}

.table-row-hover:hover {
  background: var(--fc-surface-hover);
}

.table-id {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--fc-primary);
}

.table-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--fc-radius);
  background: var(--fc-gradient-primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.table-name {
  font-weight: 600;
  color: var(--fc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.table-cpf {
  font-size: 0.75rem;
  color: var(--fc-muted);
  font-family: monospace;
}

.table-setor-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: var(--fc-radius-full);
  background: var(--fc-bg-alt);
  color: var(--fc-text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
}

.table-date {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fc-text);
}

.table-time {
  display: block;
  font-size: 0.7rem;
  color: var(--fc-muted);
}

.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.375rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--fc-radius);
}

.btn-outline-danger {
  color: #ef4444;
  border-color: #ef4444;
}

.btn-outline-danger:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--fc-muted);
}

.empty-state svg {
  opacity: 0.5;
}

/* Notification Card */
.notification-card {
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
}

.notification-header {
  padding: 1rem 1.25rem;
  background: var(--fc-bg-alt);
  border-bottom: 1px solid var(--fc-border);
}

.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--fc-radius-full);
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
}

.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
}

.notification-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--fc-border);
  transition: var(--fc-transition-fast);
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--fc-surface-hover);
}

.notification-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--fc-radius);
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fc-text);
  display: block;
  margin-bottom: 0.125rem;
}

.notification-text {
  font-size: 0.8rem;
  color: var(--fc-muted);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notification-time {
  font-size: 0.7rem;
  color: var(--fc-muted);
}

.notification-empty {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--fc-muted);
  gap: 0.5rem;
}

/* Logs Card */
.logs-card {
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
}

.logs-header {
  padding: 1rem 1.25rem;
  background: var(--fc-bg-alt);
  border-bottom: 1px solid var(--fc-border);
}

.logs-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
}

.logs-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--fc-border);
  transition: var(--fc-transition-fast);
}

.logs-item:last-child {
  border-bottom: none;
}

.logs-item:hover {
  background: var(--fc-surface-hover);
}

.logs-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fc-primary);
  flex-shrink: 0;
  padding-top: 2px;
}

.logs-item-content {
  flex: 1;
  min-width: 0;
}

.logs-item-action {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--fc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logs-item-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--fc-muted);
}

.logs-item-time {
  opacity: 0.7;
}

/* Responsive adjustments for new components */
@media (max-width: 991.98px) {
  .stat-card {
    padding: 1rem;
  }

  .stat-card-icon {
    width: 40px;
    height: 40px;
  }

  .stat-card-value {
    font-size: 1.5rem;
  }

  .table-name {
    max-width: 120px;
  }

  .pending-list,
  .notification-list,
  .logs-list {
    max-height: 200px;
  }
}

@media (max-width: 767.98px) {
  .stat-card-label {
    font-size: 0.65rem;
  }

  .stat-card-value {
    font-size: 1.25rem;
  }

  .stat-card-icon {
    width: 36px;
    height: 36px;
  }

  .stat-card-icon svg {
    width: 18px;
    height: 18px;
  }

  .search-filter-bar .row {
    gap: 0.5rem;
  }

  .table-avatar {
    display: none;
  }

  .table-name {
    max-width: 100px;
  }

  .admin-actions {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Reduzir animações se preferido pelo usuário */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   SIDEBAR - SISTEMA DE NAVEGAÇÃO
   Responsiva, colapsável e moderna
======================================== */

/* Variáveis da Sidebar */
:root {
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 72px;
  --sidebar-bg: var(--fc-surface);
  --sidebar-border: var(--fc-border);
  --sidebar-header-height: 72px;
  --sidebar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
  --sidebar-bg: var(--fc-surface);
}

/* Botão toggle mobile */
.sidebar-mobile-toggle {
  display: none;
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 1060;
  width: 56px;
  height: 56px;
  border-radius: var(--fc-radius-full);
  background: var(--fc-gradient-primary);
  border: none;
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--fc-glow);
  transition: var(--fc-transition);
}

.sidebar-mobile-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px var(--fc-glow);
}

.sidebar-mobile-toggle:active {
  transform: scale(0.95);
}

/* Overlay para mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1040;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* Sidebar principal */
.admin-sidebar {
  position: sticky;
  top: 1rem;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  height: calc(100vh - 2rem);
  background: var(--sidebar-bg);
  border: 1px solid var(--sidebar-border);
  border-radius: var(--fc-radius-xl);
  display: flex;
  flex-direction: column;
  transition: var(--sidebar-transition);
  overflow: hidden;
  z-index: 100;
  box-shadow: 0 4px 24px var(--fc-shadow);
}

/* Estado colapsado */
.admin-sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
  min-width: var(--sidebar-collapsed-width);
  max-width: var(--sidebar-collapsed-width);
}

.admin-sidebar.collapsed .sidebar-brand-text,
.admin-sidebar.collapsed .sidebar-user-info,
.admin-sidebar.collapsed .sidebar-menu-text,
.admin-sidebar.collapsed .sidebar-category-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.admin-sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 1rem 0.75rem;
}

.admin-sidebar.collapsed .sidebar-brand {
  justify-content: center;
}

.admin-sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

.admin-sidebar.collapsed .sidebar-user {
  justify-content: center;
  padding: 0.75rem;
}

.admin-sidebar.collapsed .sidebar-menu-link {
  justify-content: center;
  padding: 0.75rem;
}

.admin-sidebar.collapsed .sidebar-footer-link {
  justify-content: center;
  padding: 0.75rem;
}

.admin-sidebar.collapsed .sidebar-category {
  padding: 0.5rem;
}

/* Header da sidebar */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--sidebar-border);
  min-height: var(--sidebar-header-height);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  overflow: hidden;
}

.sidebar-brand-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--fc-radius);
  background: var(--fc-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px var(--fc-glow);
}

.sidebar-brand-icon span {
  color: white;
  font-weight: 800;
  font-size: 0.9rem;
}

.sidebar-brand-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--fc-text);
  white-space: nowrap;
  transition: var(--sidebar-transition);
}

.text-primary-light {
  color: var(--fc-primary);
}

.sidebar-toggle {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: var(--fc-radius);
  border: 1px solid var(--sidebar-border);
  background: var(--fc-bg-alt);
  color: var(--fc-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--fc-transition);
}

.sidebar-toggle:hover {
  background: var(--fc-primary);
  color: white;
  border-color: var(--fc-primary);
}

.sidebar-toggle svg {
  transition: transform 0.3s ease;
}

/* Info do usuário */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  margin: 0.75rem;
  background: var(--fc-bg-alt);
  border-radius: var(--fc-radius);
  transition: var(--sidebar-transition);
}

.sidebar-user-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--fc-radius);
  background: var(--fc-gradient-primary);
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: var(--sidebar-transition);
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--fc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: 0.75rem;
  color: var(--fc-primary);
  font-weight: 500;
}

/* Navegação */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.5rem 0.75rem;
}

.sidebar-category {
  padding: 0.75rem 0.5rem 0.25rem;
  transition: var(--sidebar-transition);
}

.sidebar-category-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fc-muted);
  white-space: nowrap;
  transition: var(--sidebar-transition);
}

.sidebar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-menu-item {
  margin-bottom: 2px;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--fc-radius);
  color: var(--fc-text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  transition: var(--fc-transition);
  overflow: hidden;
}

.sidebar-menu-link:hover {
  background: var(--fc-bg-alt);
  color: var(--fc-text);
}

.sidebar-menu-link.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.12) 100%);
  color: var(--fc-primary);
}

.sidebar-menu-icon {
  width: 20px;
  height: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-menu-text {
  white-space: nowrap;
  overflow: hidden;
  transition: var(--sidebar-transition);
}

.sidebar-menu-indicator {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 24px;
  background: var(--fc-primary);
  border-radius: 3px 0 0 3px;
}

/* Footer da sidebar */
.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid var(--sidebar-border);
  margin-top: auto;
}

.sidebar-footer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--fc-radius);
  color: #ef4444;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--fc-transition);
}

.sidebar-footer-link:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Layout principal com sidebar */
.dashboard-layout {
  display: flex;
  gap: 1.5rem;
  padding: 1rem;
  min-height: 100vh;
}

.dashboard-content {
  flex: 1;
  min-width: 0;
}

/* Mobile styles */
@media (max-width: 991.98px) {
  .sidebar-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    max-width: calc(100vw - 3rem);
    height: 100vh;
    border-radius: 0;
    transform: translateX(-100%);
    z-index: 1050;
  }

  .admin-sidebar.mobile-open {
    transform: translateX(0);
  }

  .admin-sidebar.collapsed {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    max-width: var(--sidebar-width);
  }

  .sidebar-toggle {
    display: none;
  }

  .admin-sidebar.collapsed .sidebar-brand-text,
  .admin-sidebar.collapsed .sidebar-user-info,
  .admin-sidebar.collapsed .sidebar-menu-text,
  .admin-sidebar.collapsed .sidebar-category-label {
    opacity: 1;
    width: auto;
  }

  .admin-sidebar.collapsed .sidebar-header {
    justify-content: space-between;
    padding: 1.25rem 1rem;
  }

  .admin-sidebar.collapsed .sidebar-brand {
    justify-content: flex-start;
  }

  .admin-sidebar.collapsed .sidebar-user,
  .admin-sidebar.collapsed .sidebar-menu-link,
  .admin-sidebar.collapsed .sidebar-footer-link {
    justify-content: flex-start;
    padding: 0.75rem 1rem;
  }

  .admin-sidebar.collapsed .sidebar-category {
    padding: 0.75rem 0.5rem 0.25rem;
  }

  .sidebar-overlay {
    display: block;
    opacity: 0;
    visibility: hidden;
  }

  .sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
  }
}

@media (max-width: 767.98px) {
  .sidebar-mobile-toggle {
    bottom: 1rem;
    left: 1rem;
    width: 48px;
    height: 48px;
  }

  .admin-sidebar {
    width: 100%;
    max-width: 300px;
  }
}

/* ========================================
   DASHBOARD TI - ESTILOS ESPECÍFICOS
======================================== */

/* TI Stats Grid */
.ti-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.ti-stat-card {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  transition: var(--fc-transition);
  position: relative;
  overflow: hidden;
}

.ti-stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--fc-gradient-primary);
  opacity: 0;
  transition: var(--fc-transition);
}

.ti-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--fc-shadow-lg);
}

.ti-stat-card:hover::before {
  opacity: 1;
}

.ti-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ti-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--fc-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ti-stat-icon-primary {
  background: rgba(16, 185, 129, 0.12);
  color: var(--fc-primary);
}

.ti-stat-icon-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.ti-stat-icon-info {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.ti-stat-icon-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.ti-stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--fc-text);
  line-height: 1;
}

.ti-stat-label {
  font-size: 0.85rem;
  color: var(--fc-muted);
  font-weight: 500;
}

.ti-stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: var(--fc-radius-full);
}

.ti-stat-trend-up {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.ti-stat-trend-down {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

/* Quick Actions */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem 1rem;
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  text-decoration: none;
  color: var(--fc-text);
  transition: var(--fc-transition);
}

.quick-action-btn:hover {
  background: var(--fc-bg-alt);
  border-color: var(--fc-primary);
  color: var(--fc-primary);
  transform: translateY(-2px);
}

.quick-action-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--fc-radius);
  background: var(--fc-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--fc-transition);
}

.quick-action-btn:hover .quick-action-icon {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(6, 182, 212, 0.12) 100%);
}

.quick-action-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

/* Recent Activity */
.activity-list {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--fc-border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: var(--fc-radius);
  display: flex;
  align-items: center;
  justify-content: center;
}

.activity-icon-success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.activity-icon-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.activity-icon-info {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-weight: 600;
  color: var(--fc-text);
  margin-bottom: 0.25rem;
}

.activity-description {
  font-size: 0.85rem;
  color: var(--fc-muted);
  line-height: 1.4;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--fc-muted);
  white-space: nowrap;
}

/* Progress Bars */
.progress-bar-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.progress-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-bar-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--fc-text);
}

.progress-bar-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fc-primary);
}

.progress-bar-track {
  height: 8px;
  border-radius: var(--fc-radius-full);
  background: var(--fc-bg-alt);
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--fc-radius-full);
  background: var(--fc-gradient-primary);
  transition: width 0.6s ease;
}

/* Dashboard Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.page-header-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--fc-text);
  margin: 0;
}

.page-subtitle {
  font-size: 0.9rem;
  color: var(--fc-muted);
  margin: 0;
}

.page-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Info Cards Grid */
.info-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.info-card {
  background: var(--fc-surface);
  border: 1px solid var(--fc-border);
  border-radius: var(--fc-radius-lg);
  overflow: hidden;
}

.info-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: var(--fc-bg-alt);
  border-bottom: 1px solid var(--fc-border);
}

.info-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fc-text);
  margin: 0;
}

.info-card-body {
  padding: 1.25rem;
}

.info-card-footer {
  padding: 1rem 1.25rem;
  background: var(--fc-bg-alt);
  border-top: 1px solid var(--fc-border);
}
