/* =========================================================================
   Modern Design System - NFe CPN
   ========================================================================= */
:root {
  --primary-color: #d32f2f;
  --primary-hover: #b71c1c;
  --bg-color: #f0f2f5;
  --card-bg: rgba(255, 255, 255, 0.85);
  --text-dark: #1e293b;
  --text-light: #64748b;
  --border-radius: 16px;
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-dark);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Glassmorphism Classes */
.glass-card {
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Buttons */
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px 0 rgba(211, 47, 47, 0.39);
}

.btn-primary-custom:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(211, 47, 47, 0.5);
  color: white;
}

/* Login Page Specifics */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
  position: relative;
  overflow: hidden;
}

/* Decorative background elements */
.login-container::before, .login-container::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  z-index: 0;
}
.login-container::before {
  background: radial-gradient(circle, rgba(211,47,47,0.1) 0%, rgba(211,47,47,0) 70%);
  top: -100px;
  left: -100px;
  animation: float 10s ease-in-out infinite alternate;
}
.login-container::after {
  background: radial-gradient(circle, rgba(211,47,47,0.08) 0%, rgba(211,47,47,0) 70%);
  bottom: -100px;
  right: -100px;
  animation: float 8s ease-in-out infinite alternate-reverse;
}

@keyframes float {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(20px) scale(1.05); }
}

.login-box {
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

.form-floating > label {
  color: var(--text-light);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(211, 47, 47, 0.25);
}

/* Dashboard Specifics */
.navbar-custom {
  background: rgba(211, 47, 47, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 15px 0;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  background: -webkit-linear-gradient(45deg, #1e293b, #64748b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-value.primary {
  background: -webkit-linear-gradient(45deg, var(--primary-color), #ff5252);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.table-custom {
  --bs-table-bg: transparent;
}
.table-custom tbody tr {
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.table-custom tbody tr:hover {
  background-color: rgba(0,0,0,0.02);
  transform: scale(1.001);
}

.status-badge {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Animations */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Loader */
.loader-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s, visibility 0.3s;
}

.loader-overlay.active {
  visibility: visible;
  opacity: 1;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(211,47,47,0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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