/* ========================================
   Timer Kids - Modern UI Design 2026
   ======================================== */

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

/* ========================================
   TEMA ESCURO (Padrão)
   ======================================== */
:root {
  /* Cores principais - Tema moderno vibrante */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.4);
  
  --secondary: #06b6d4;
  --secondary-light: #22d3ee;
  --secondary-dark: #0891b2;
  
  --accent: #f472b6;
  --accent-light: #f9a8d4;
  
  /* Gradientes */
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
  --gradient-warning: linear-gradient(135deg, #f2994a 0%, #f2c94c 100%);
  --gradient-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
  --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
  
  /* Cores de status */
  --success: #10b981;
  --success-light: #34d399;
  --warning: #f59e0b;
  --warning-light: #fbbf24;
  --danger: #ef4444;
  --danger-light: #f87171;
  
  /* Cores neutras - TEMA ESCURO */
  --bg-dark: #0f0f23;
  --bg-main: #1a1a2e;
  --bg-card: rgba(255, 255, 255, 0.05);
  --bg-card-hover: rgba(255, 255, 255, 0.08);
  --bg-input: rgba(255, 255, 255, 0.08);
  --bg-row: rgba(255, 255, 255, 0.04);
  
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.85);
  --text-muted: rgba(255, 255, 255, 0.6);
  --text-card: #ffffff;
  
  --border-color: rgba(255, 255, 255, 0.12);
  --border-focus: rgba(99, 102, 241, 0.5);
  
  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 40px var(--primary-glow);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
  
  /* Ícones */
  --icon-filter: brightness(0) invert(1);
  
  /* Efeitos */
  --blur-glass: blur(20px);
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  
  /* Bordas */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
}

/* ========================================
   TEMA CLARO
   ======================================== */
[data-theme="light"] {
  --bg-dark: #f0f4f8;
  --bg-main: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --bg-input: rgba(0, 0, 0, 0.04);
  --bg-row: rgba(99, 102, 241, 0.04);
  
  --text-primary: #1a1a2e;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --text-card: #1a1a2e;
  
  --border-color: rgba(0, 0, 0, 0.1);
  --border-focus: rgba(99, 102, 241, 0.4);
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  
  --gradient-dark: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  --icon-filter: none;
}

[data-theme="light"] body {
  background: var(--bg-dark);
  background-image: 
    radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.06) 0%, transparent 50%);
}

[data-theme="light"] .sidebar {
  background: var(--gradient-dark);
}

[data-theme="light"] .sidebar .menu a {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .sidebar .menu a:hover,
[data-theme="light"] .sidebar .menu a.active {
  color: #ffffff;
}

[data-theme="light"] .sidebar .logo {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #ffffff;
  background-clip: unset;
  color: #ffffff;
}

[data-theme="light"] .card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

[data-theme="light"] .row {
  background: var(--bg-row);
  border: 1px solid var(--border-color);
}

[data-theme="light"] .row:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: var(--bg-input);
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  background: #ffffff;
}

[data-theme="light"] select option {
  background: #ffffff;
  color: var(--text-primary);
}

[data-theme="light"] .btn-icon {
  background: #ffffff;
  border-color: var(--border-color);
}

[data-theme="light"] .icon-sm {
  filter: none;
  opacity: 1;
}

[data-theme="light"] #toggle-sidebar-btn {
  background: #ffffff;
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="light"] .theme-toggle-btn {
  background: #ffffff;
  border-color: var(--border-color);
  color: var(--text-primary);
}

[data-theme="light"] .btn-checkout {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
}

[data-theme="light"] .btn-toggle-paid.paid {
  background: rgba(16, 185, 129, 0.15);
}

[data-theme="light"] .btn-toggle-paid.pending {
  background: rgba(245, 158, 11, 0.15);
}

[data-theme="light"] .user-greeting {
  background: #ffffff;
  border-color: var(--border-color);
}

[data-theme="light"] .login-card {
  background: #ffffff;
}

[data-theme="light"] .modal,
[data-theme="light"] .confirm {
  background: #ffffff;
}

[data-theme="light"] thead th {
  background: rgba(0, 0, 0, 0.02);
}

[data-theme="light"] tbody tr:hover {
  background: rgba(99, 102, 241, 0.04);
}

[data-theme="light"] .flash.ok {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.1) 0%, transparent 100%);
  color: #059669;
}

[data-theme="light"] .flash.err {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, transparent 100%);
  color: #dc2626;
}

[data-theme="light"] ::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="light"] input[type="date"] {
  color-scheme: light;
}

[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator {
  filter: none;
}

/* Reset e Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-dark);
  background-image: 
    radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at center, rgba(244, 114, 182, 0.05) 0%, transparent 70%);
  background-attachment: fixed;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   Sidebar - Menu Lateral Moderno
   ======================================== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: var(--gradient-dark);
  backdrop-filter: var(--blur-glass);
  border-right: 1px solid var(--border-color);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform var(--transition-normal), opacity var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.sidebar .logo {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
  position: relative;
}

.sidebar .logo::after {
  content: '';
  position: absolute;
  bottom: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
}

.sidebar .menu {
  list-style: none;
  flex: 1;
  overflow-y: auto;
}

.sidebar .menu li {
  margin-bottom: 6px;
}

.sidebar .menu a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  font-size: 15px;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.sidebar .menu a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--gradient-primary);
  transform: scaleY(0);
  transition: transform var(--transition-fast);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.sidebar .menu a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  transform: translateX(4px);
}

.sidebar .menu a:hover::before {
  transform: scaleY(1);
}

.sidebar .menu a.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.2) 0%, transparent 100%);
  color: var(--text-primary);
}

.sidebar .menu a.active::before {
  transform: scaleY(1);
}

.sidebar.hidden {
  transform: translateX(-100%);
  opacity: 0;
}

/* ========================================
   Conteúdo Principal
   ======================================== */
.main-content {
  margin-left: 280px;
  padding: 24px 32px;
  min-height: 100vh;
  transition: margin-left var(--transition-normal);
}

.main-content.full-width {
  margin-left: 0;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* ========================================
   Botão Toggle Sidebar
   ======================================== */
#toggle-sidebar-btn {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  padding: 0;
  flex-shrink: 0;
}

#toggle-sidebar-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

#toggle-sidebar-btn svg {
  width: 22px;
  height: 22px;
}

/* ========================================
   Cards - Glassmorphism Style
   ======================================== */
.card {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), 0 0 60px rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.card .title, .card h2.title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.card .subtitle, .subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ========================================
   Header da Página
   ======================================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.header .title, .header h2 {
  font-size: 32px;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   Botão Adicionar Sessão
   ======================================== */
.add-session-btn {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 28px;
  font-weight: 600;
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-fast);
  border: none;
}

.add-session-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 0 50px var(--primary-glow);
}

/* ========================================
   Formulários Modernos
   ======================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-1 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select, textarea {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: all var(--transition-fast);
  outline: none;
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-sm);
  background: rgba(99, 102, 241, 0.05);
}

input:hover:not(:focus), select:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.2);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
  padding-right: 45px;
}

select option {
  background: var(--bg-main);
  color: var(--text-primary);
  padding: 12px;
}

input[type="color"] {
  padding: 8px;
  height: 50px;
  cursor: pointer;
}

input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--primary);
}

input[type="date"] {
  color-scheme: dark;
}

/* ========================================
   Botões Modernos
   ======================================== */
button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

button.primary {
  background: var(--gradient-primary);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

button.primary:hover {
  box-shadow: 0 6px 25px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  filter: brightness(1.1);
}

button.warn, button.danger {
  background: var(--gradient-danger);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

button.warn:hover, button.danger:hover {
  box-shadow: 0 6px 25px rgba(239, 68, 68, 0.4);
  filter: brightness(1.1);
}

button.secondary {
  background: transparent;
  border: 1px solid var(--border-color);
}

button.secondary:hover {
  background: var(--bg-card);
  border-color: var(--primary);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ========================================
   Linhas/Rows - Session Cards
   ======================================== */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  will-change: transform;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.row.ended {
  border-color: var(--danger);
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.1) 0%, transparent 100%);
}

.row .child-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-card);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.row .actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.row .actions button {
  width: auto;
  padding: 10px 16px;
}

.session-row {
  position: relative;
  overflow: hidden;
}

.session-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--gradient-success);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.session-row.ended::before {
  background: var(--gradient-danger);
}

/* ========================================
   Barra de Progresso Moderna
   ======================================== */
.progress {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress .bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-success);
  transition: width 0.5s ease, background 0.3s ease;
  position: relative;
}

.progress .bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
  border-radius: var(--radius-full) var(--radius-full) 0 0;
}

.timer-text {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* ========================================
   Badges Modernos
   ======================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge.paid {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(52, 211, 153, 0.1) 100%);
  color: var(--success-light);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(251, 191, 36, 0.1) 100%);
  color: var(--warning-light);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge.icon {
  padding: 8px;
}

.ended-badge {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(248, 113, 113, 0.1) 100%);
  color: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); 
    opacity: 1; 
  }
  50% { 
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4); 
    opacity: 0.8; 
  }
}

/* ========================================
   Botões de Ícone
   ======================================== */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
  transform: scale(1.05);
}

.btn-checkout {
  background: rgba(239, 68, 68, 0.15) !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.btn-checkout:hover {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
}

.btn-toggle-paid.paid {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
  border-color: var(--success);
}

.btn-toggle-paid.pending {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-color: var(--warning);
}

.icon-sm {
  width: 18px;
  height: 18px;
  filter: var(--icon-filter);
  opacity: 0.9;
}

/* ========================================
   Flash Messages
   ======================================== */
.flash {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash.ok {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.15) 0%, transparent 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--success-light);
}

.flash.err {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.15) 0%, transparent 100%);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--danger-light);
}

/* ========================================
   Login Card Especial
   ======================================== */
.login-card {
  max-width: 440px;
  margin: 60px auto;
  padding: 40px;
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, var(--primary-glow), transparent 30%);
  animation: rotate 4s linear infinite;
  opacity: 0.3;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.login-card .title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 32px;
}

.form-group-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.form-group-remember input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.form-group-remember label {
  margin: 0;
  text-transform: none;
  font-size: 14px;
}

/* ========================================
   Tabelas Modernas
   ======================================== */
.table-container {
  overflow-x: auto;
  border-radius: var(--radius-lg);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  padding: 16px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border-color);
}

tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
}

tbody tr {
  transition: background var(--transition-fast);
}

tbody tr:hover {
  background: var(--bg-card-hover);
}

tbody tr:last-child td {
  border-bottom: none;
}

.total-sum {
  padding: 20px;
  text-align: right;
  font-size: 18px;
  font-weight: 700;
  background: linear-gradient(90deg, transparent 0%, rgba(99, 102, 241, 0.1) 100%);
  border-top: 1px solid var(--border-color);
  color: var(--text-primary);
}

/* ========================================
   Relatório Financeiro
   ======================================== */
.financial-report-container {
  background: var(--bg-card);
  backdrop-filter: var(--blur-glass);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.report-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  transform: translate(50%, -50%);
}

.report-header .title {
  margin: 0;
  font-size: 26px;
  color: white;
  -webkit-text-fill-color: white;
}

.report-header .badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  font-size: 14px;
}

/* ========================================
   Modais Modernos
   ======================================== */
.modal-overlay, .confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.2s ease;
}

.modal-overlay.open, .confirm-overlay.open {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal, .confirm {
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  animation: scaleIn 0.2s ease;
}

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

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

.modal-title, .confirm-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 36px;
  height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

.modal-body {
  color: var(--text-secondary);
}

.confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
  margin-top: 60px;
  padding: 28px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 100%);
}

.footer-content {
  font-size: 13px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ========================================
   User Greeting
   ======================================== */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  margin-bottom: 20px;
}

.user-greeting {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 14px;
  background: var(--bg-card);
  padding: 8px 16px 8px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.user-greeting strong {
  color: var(--text-primary);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
}

/* ========================================
   Botão de Tema (Claro/Escuro)
   ======================================== */
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  padding: 0;
}

.theme-toggle-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

.theme-toggle-btn svg {
  width: 22px;
  height: 22px;
  transition: transform var(--transition-normal);
}

.theme-toggle-btn:hover svg {
  transform: rotate(15deg);
}

/* Ícone do sol (tema claro) */
.icon-sun {
  display: none;
}

/* Ícone da lua (tema escuro) */
.icon-moon {
  display: block;
}

[data-theme="light"] .icon-sun {
  display: block;
}

[data-theme="light"] .icon-moon {
  display: none;
}

.main-content > div:first-child {
  color: var(--text-secondary);
  font-size: 14px;
  padding-left: 0;
  margin-bottom: 8px;
}

/* ========================================
   Users Edit Form
   ======================================== */
.users-edit-form {
  grid-template-columns: 2fr 2fr 1fr auto;
}

.users-edit-form input, 
.users-edit-form select {
  padding: 14px 18px;
  font-size: 15px;
}

/* ========================================
   Hidden State
   ======================================== */
.hidden {
  display: none !important;
}

/* ========================================
   Search Input
   ======================================== */
#session-search {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 14px 20px 14px 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
}

/* ========================================
   Responsivo - Mobile First
   ======================================== */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  .row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .sidebar:not(.hidden) {
    transform: translateX(0);
  }
  
  .sidebar.hidden {
    transform: translateX(-100%);
    display: flex !important;
  }
  
  .main-content {
    margin-left: 0;
    padding: 20px 16px;
  }
  
  .card {
    padding: 20px;
    border-radius: var(--radius-lg);
  }
  
  .row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }
  
  .row .actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  .header .title, .header h2 {
    font-size: 24px;
  }
  
  .login-card {
    margin: 20px auto;
    padding: 28px 20px;
  }
  
  .top-bar {
    padding: 12px 0;
  }
  
  #toggle-sidebar-btn {
    width: 44px;
    height: 44px;
  }
  
  .user-greeting {
    font-size: 13px;
    padding: 6px 12px 6px 6px;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  
  .users-edit-form {
    grid-template-columns: 1fr;
  }
  
  .report-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  thead th, tbody td {
    padding: 12px;
    font-size: 13px;
  }
}

/* Logout link style */
.logout-link {
  color: var(--danger-light) !important;
}

.logout-link:hover {
  background: rgba(239, 68, 68, 0.1) !important;
}

@media (max-width: 480px) {
  .btn-icon {
    width: 38px;
    height: 38px;
  }
  
  .icon-sm {
    width: 16px;
    height: 16px;
  }
  
  button {
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .add-session-btn {
    width: 46px;
    height: 46px;
    font-size: 24px;
  }
}

/* ========================================
   Animações de Entrada
   ======================================== */
.card, .row {
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Delay para cards em sequência */
.row:nth-child(1) { animation-delay: 0.05s; }
.row:nth-child(2) { animation-delay: 0.1s; }
.row:nth-child(3) { animation-delay: 0.15s; }
.row:nth-child(4) { animation-delay: 0.2s; }
.row:nth-child(5) { animation-delay: 0.25s; }

/* ========================================
   Scrollbar Personalizada
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* ========================================
   Selection
   ======================================== */
::selection {
  background: var(--primary);
  color: white;
}

/* ========================================
   Focus Visible (Acessibilidade)
   ======================================== */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  .sidebar, #toggle-sidebar-btn, .actions, .top-bar {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ========================================
   Efeitos Extras e Detalhes
   ======================================== */

/* Efeito hover nos inputs coloridos */
input[type="color"] {
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
}

input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 4px;
}

input[type="color"]::-webkit-color-swatch {
  border-radius: var(--radius-sm);
  border: none;
}

/* Checkbox customizado */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

input[type="checkbox"]:checked {
  background: var(--gradient-primary);
  border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

input[type="checkbox"]:hover {
  border-color: var(--primary-light);
}

/* Campos de data com tema escuro */
input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

/* Estilo para links dentro de cards */
.card a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.card a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* Estilo para código inline */
code {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 13px;
}

/* Melhorando listas */
ul {
  padding-left: 20px;
}

ul li {
  margin-bottom: 4px;
}

/* Efeito de ripple nos botões */
button {
  position: relative;
  overflow: hidden;
}

button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s;
}

button:active::after {
  width: 300px;
  height: 300px;
}

/* Skeleton loading animation */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Tooltip customizado */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--bg-main);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  z-index: 100;
}

[data-tooltip]:hover::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(-4px);
}

/* Estilo para números/contadores */
.counter {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* Glow effect para elementos importantes */
.glow {
  animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 5px var(--primary-glow);
  }
  50% {
    box-shadow: 0 0 20px var(--primary-glow), 0 0 40px var(--primary-glow);
  }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* Backdrop blur para mobile sidebar */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.sidebar-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Estilo para indicador de status online */
.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 8px;
}

.status-indicator.online {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-indicator.offline {
  background: var(--danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Estilos para notificações inline */
.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--danger);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

/* Transição suave para mudanças de página */
.page-transition {
  animation: pageIn 0.3s ease;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Melhoria visual para disabled states */
*:disabled,
.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Estilos adicionais para dark mode total */
::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/* Melhor contraste para texto selecionado em inputs */
input::selection,
textarea::selection {
  background: var(--primary);
  color: white;
}

/* ========================================
   Estilos para página de Usuários
   ======================================== */
.user-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.user-actions .btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
  background: var(--bg-input);
}

.user-actions .btn-icon svg {
  stroke: var(--text-secondary);
}

.user-actions .btn-icon:hover {
  transform: scale(1.08);
}

.user-actions .btn-success {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.3);
}

.user-actions .btn-success:hover {
  background: var(--success);
  border-color: var(--success);
}

.user-actions .btn-success:hover svg {
  stroke: white;
}

.user-actions .btn-warn {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

.user-actions .btn-warn:hover {
  background: var(--warning);
  border-color: var(--warning);
}

.user-actions .btn-warn:hover svg {
  stroke: white;
}

.user-actions .btn-key {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.3);
}

.user-actions .btn-key:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.user-actions .btn-key:hover svg {
  stroke: white;
}

.user-actions .btn-edit {
  background: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.3);
}

.user-actions .btn-edit:hover {
  background: var(--secondary);
  border-color: var(--secondary);
}

.user-actions .btn-edit:hover svg {
  stroke: white;
}

.user-actions .btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

.user-actions .btn-danger:hover {
  background: var(--danger);
  border-color: var(--danger);
}

.user-actions .btn-danger:hover svg {
  stroke: white;
}

.inline-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.inline-form input {
  flex: 1;
  min-width: 200px;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
}

.user-row {
  position: relative;
}

