:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #a5b4fc;
  --secondary: #0ea5e9;
  --accent: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --dark: #0f172a;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

.navbar-modern {
  background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  padding: .75rem 0;
}

.navbar-modern .navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -.02em;
  background: linear-gradient(135deg, #fff, var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.navbar-modern .nav-link {
  font-weight: 500;
  padding: .5rem 1rem !important;
  border-radius: var(--radius-sm);
  transition: all .2s;
  position: relative;
}

.navbar-modern .nav-link:hover {
  background: rgba(255,255,255,.1);
}

.hero-section {
  background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(99,102,241,.15), transparent 60%),
              radial-gradient(ellipse at bottom left, rgba(14,165,233,.1), transparent 60%);
  pointer-events: none;
}

.hero-section h1 {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.15;
}

.hero-section .lead {
  font-size: 1.15rem;
  opacity: .85;
  max-width: 600px;
  margin: 1rem auto;
}

.card-modern {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: all .25s;
  background: #fff;
}

.card-modern:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-modern .card-body {
  padding: 1.75rem;
}

.btn-modern {
  padding: .65rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all .2s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.btn-modern.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}

.btn-modern.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99,102,241,.45);
}

.btn-modern.btn-success-custom {
  background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16,185,129,.35);
}

.btn-modern.btn-success-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16,185,129,.45);
}

.btn-modern.btn-danger-custom {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239,68,68,.35);
}

.btn-modern.btn-danger-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239,68,68,.45);
}

.btn-modern.btn-outline-custom {
  background: transparent;
  border: 2px solid var(--gray-200);
  color: var(--gray-700);
}

.btn-modern.btn-outline-custom:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(99,102,241,.05);
}

.glass-card {
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.section-card {
  border: none;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: #fff;
  overflow: hidden;
}

.section-card .card-header-custom {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-card .card-body-custom {
  padding: 1.75rem;
}

.form-control-modern {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .95rem;
  transition: all .2s;
  background: var(--gray-50);
}

.form-control-modern:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99,102,241,.1);
  background: #fff;
}

.form-label-custom {
  font-weight: 600;
  font-size: .875rem;
  color: var(--gray-700);
  margin-bottom: .5rem;
}

.table-modern {
  margin-bottom: 0;
}

.table-modern thead th {
  background: var(--gray-50);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  padding: 1rem 1.25rem;
  border-bottom: 2px solid var(--gray-200);
}

.table-modern tbody td {
  padding: 1rem 1.25rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--gray-100);
  font-size: .925rem;
}

.table-modern tbody tr {
  transition: background .15s;
}

.table-modern tbody tr:hover {
  background: var(--gray-50);
}

.pagination-modern .page-link {
  border: none;
  padding: .5rem 1rem;
  margin: 0 .15rem;
  border-radius: var(--radius-sm) !important;
  color: var(--gray-600);
  font-weight: 500;
  transition: all .15s;
}

.pagination-modern .page-link:hover {
  background: var(--gray-100);
  color: var(--primary);
}

.pagination-modern .page-item.active .page-link {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(99,102,241,.3);
}

.footer-modern {
  background: #fff;
  border-top: 1px solid var(--gray-100);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer-modern p {
  color: var(--gray-400);
  font-size: .875rem;
}

.badge-modern {
  padding: .35em .85em;
  font-weight: 600;
  font-size: .75rem;
  border-radius: 50px;
}

.badge-count {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: .4rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: .875rem;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--gray-50);
  transition: all .25s;
}

.step-card:hover {
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.step-number {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.empty-state {
  padding: 4rem 2rem;
  text-align: center;
}

.empty-state svg {
  opacity: .3;
  margin-bottom: 1rem;
}

.empty-state p {
  color: var(--gray-400);
  font-size: 1.1rem;
}

.alert-custom {
  border: none;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-weight: 500;
}

.toast-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 9999;
}

html, body {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.footer-modern {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2rem;
  }
  .hero-section {
    padding: 2.5rem 1.25rem;
  }
  .section-card .card-header-custom {
    flex-direction: column;
    gap: .75rem;
  }
}
