/* Global Styles - Responsive & Professional Theme */
:root {
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --primary-light: #38bdf8;
  --secondary: #8b5cf6;
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;
  
  --bg-dark: #0b1120;
  --bg-dark-secondary: #0f172a;
  --bg-light: #f5f5f7;
  --bg-light-secondary: #ffffff;
  
  --card-dark: #111827;
  --card-light: #ffffff;
  
  --text-dark: #e5e7eb;
  --text-dark-muted: #9ca3af;
  --text-light: #111827;
  --text-light-muted: #6b7280;
  
  --border-dark: rgba(255, 255, 255, 0.1);
  --border-light: rgba(0, 0, 0, 0.1);
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  transition: var(--transition);
}

body.dark-theme {
  background: radial-gradient(circle at top, var(--bg-dark-secondary), var(--bg-dark));
  color: var(--text-dark);
}

body.light-theme {
  background: var(--bg-light);
  color: var(--text-light);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.container-fluid {
  width: 100%;
  padding: 0 1rem;
}

/* Header */
.header {
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.dark-theme .navbar {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-secondary));
  border: 1px solid var(--border-dark);
}

.light-theme .navbar {
  background: var(--bg-light-secondary);
  border: 1px solid var(--border-light);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand p {
  font-size: 0.875rem;
  opacity: 0.8;
}

/* Navigation */
.nav-menu {
  display: flex;
  gap: 1rem;
  list-style: none;
  flex-wrap: wrap;
  align-items: center;
}

.nav-link {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
  font-weight: 500;
}

.dark-theme .nav-link {
  color: var(--text-dark);
}

.light-theme .nav-link {
  color: var(--text-light);
}

.nav-link:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.nav-link.active {
  background: var(--primary);
  color: white;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 1rem;
  margin-bottom: 2rem;
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
}

.dark-theme .hero {
  background: linear-gradient(135deg, var(--bg-dark-secondary), var(--card-dark));
  box-shadow: var(--shadow-xl);
}

.light-theme .hero {
  background: linear-gradient(135deg, var(--bg-light-secondary), #e0f2fe);
  box-shadow: var(--shadow-lg);
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary) 0%, transparent 70%);
  opacity: 0.1;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 800;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Grid System */
.grid {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards */
.card {
  border-radius: 1rem;
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.dark-theme .card {
  background: var(--card-dark);
  border: 1px solid var(--border-dark);
  box-shadow: var(--shadow-lg);
}

.light-theme .card {
  background: var(--card-light);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
}

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

.card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, var(--primary), transparent);
  opacity: 0.1;
  border-radius: 50%;
}

.card-header {
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid;
}

.dark-theme .card-header {
  border-color: var(--border-dark);
}

.light-theme .card-header {
  border-color: var(--border-light);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.875rem;
  opacity: 0.7;
}

.card-body {
  position: relative;
  z-index: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-align: center;
  justify-content: center;
}

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

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 2px solid;
  font-size: 1rem;
  transition: var(--transition);
}

.dark-theme .form-control {
  background: var(--bg-dark-secondary);
  border-color: var(--border-dark);
  color: var(--text-dark);
}

.light-theme .form-control {
  background: var(--bg-light-secondary);
  border-color: var(--border-light);
  color: var(--text-light);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

/* Table */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.table thead {
  font-weight: 600;
}

.dark-theme .table thead {
  background: var(--bg-dark-secondary);
}

.light-theme .table thead {
  background: var(--bg-light);
}

.table th,
.table td {
  padding: 0.75rem;
  text-align: left;
}

.table tbody tr {
  transition: var(--transition);
}

.dark-theme .table tbody tr {
  border-bottom: 1px solid var(--border-dark);
}

.light-theme .table tbody tr {
  border-bottom: 1px solid var(--border-light);
}

.dark-theme .table tbody tr:hover {
  background: var(--bg-dark-secondary);
}

.light-theme .table tbody tr:hover {
  background: var(--bg-light);
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-success {
  background: rgba(34, 197, 94, 0.2);
  color: var(--success);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.badge-info {
  background: rgba(59, 130, 246, 0.2);
  color: var(--info);
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(14, 165, 233, 0.3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Alert */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--success);
  color: var(--success);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: var(--danger);
  color: var(--danger);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--warning);
  color: var(--warning);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--info);
  color: var(--info);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* Responsive Design */
@media (max-width: 1024px) {
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero h2 { font-size: 2rem; }
  .hero p { font-size: 1rem; }
  
  .grid-cols-4,
  .grid-cols-3,
  .grid-cols-2 { grid-template-columns: 1fr; }
  
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .nav-menu {
    width: 100%;
    flex-direction: column;
  }
  
  .nav-link {
    width: 100%;
  }
  
  .container {
    padding: 0 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 1rem;
  }
  
  .hero h2 {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .btn {
    width: 100%;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .alert {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .card {
    border: 1px solid #ccc;
    box-shadow: none;
  }
}
