* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Premium Palette - Deep Blue & Gold Accents */
  --primary: #3b82f6;
  /* Bright Blue */
  --primary-dark: #2563eb;
  --accent: #f59e0b;
  /* Amber/Gold */
  --success: #10b981;

  --bg-gradient: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  --sidebar-bg: rgba(255, 255, 255, 0.85);

  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #f9fafb;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-sans);
  background: #f0f2f5;
  /* Fallback */
  color: var(--text-main);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=2670&auto=format&fit=crop') no-repeat center center fixed;
  background-size: cover;
  filter: brightness(0.6);
  pointer-events: none;
}

/* Glassmorphism Utilities */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.6));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
  padding: 2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border-color: rgba(255, 255, 255, 1);
}

/* Print Styles (PDF Export) */
@media print {

  .sidebar,
  .btn,
  .page-header input,
  .page-header button,
  .tab-btn {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    padding: 0 !important;
  }

  body::before {
    display: none;
    /* Remove background image for print */
  }

  .glass-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
    background: white !important;
    backdrop-filter: none !important;
  }

  h1,
  h2,
  h3 {
    color: black !important;
  }

  body {
    background: white !important;
    color: black !important;
  }
}

/* Typography & Elements */
h1 {
  font-size: 2.75rem;
  font-weight: 800;
  color: #ffffff;
  /* White for high contrast */
  letter-spacing: -1px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  /* Shadow for legibility */
}

h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #f3f4f6;
  /* Off-white for hierarchy */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.btn {
  padding: 0.8rem 1.6rem;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.025em;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
  filter: brightness(110%);
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

/* Form Styling Update */
input,
select,
textarea {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* Tags & Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

.badge-green {
  background: #d1fae5;
  color: #065f46;
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Modal System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.modal-container {
  width: 100%;
  max-width: 850px;
  margin: 1.5rem;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}