:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #06b6d4;
  --secondary-dark: #0891b2;
  --success: #10b981;
  --success-dark: #059669;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --dark-1: #0f172a;
  --dark-2: #1e293b;
  --dark-3: #334155;
  --light-1: #f8fafc;
  --light-2: #e2e8f0;
  --light-3: #cbd5e1;
  --muted: #94a3b8;
  --card-bg: rgba(30, 41, 59, 0.7);
  --card-border: rgba(255, 255, 255, 0.1);
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
  --gradient-primary: linear-gradient(135deg, var(--primary), var(--secondary));
  --gradient-success: linear-gradient(135deg, var(--success), #34d399);
  --gradient-warning: linear-gradient(135deg, var(--warning), #fbbf24);
  --gradient-danger: linear-gradient(135deg, var(--danger), #f87171);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, var(--dark-1), var(--dark-2));
  color: var(--light-1);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
  z-index: 1;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.bg-circle {
  position: absolute;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.05);
  animation: float 20s infinite;
}

.bg-circle:nth-child(1) {
  width: 300px;
  height: 300px;
  top: -150px;
  left: -150px;
  animation-delay: 0s;
}

.bg-circle:nth-child(2) {
  width: 400px;
  height: 400px;
  top: 50%;
  right: -200px;
  animation-delay: -5s;
}

.bg-circle:nth-child(3) {
  width: 200px;
  height: 200px;
  bottom: -100px;
  left: 30%;
  animation-delay: -10s;
}

.bg-circle:nth-child(4) {
  width: 500px;
  height: 500px;
  bottom: -250px;
  right: -250px;
  animation-delay: -15s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-50px) rotate(180deg);
  }
}

/* Typography */
h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--light-1);
}

h3 {
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--light-1);
}

p {
  color: var(--light-3);
  margin-bottom: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.5);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
  box-shadow: 0 8px 20px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 12px 30px rgba(239, 68, 68, 0.5);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-light);
  color: var(--light-1);
}

.btn-outline:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: var(--light-2);
  border: 1px solid var(--card-border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--light-1);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Cards */
.card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  padding: 2rem;
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--light-2);
}

.form-label i {
  margin-right: 0.5rem;
  color: var(--primary);
}

.form-control {
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(15, 23, 42, 0.6);
  border: 2px solid var(--card-border);
  border-radius: 16px;
  color: var(--light-1);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
  background: rgba(15, 23, 42, 0.8);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.5rem;
  padding-right: 3rem;
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Tables */
.table-container {
  overflow-x: auto;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  text-align: left;
  padding: 1.25rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--light-1);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

td {
  padding: 1rem;
  border-bottom: 1px solid var(--card-border);
  color: var(--light-2);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.badge-primary {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-light);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Loading Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--dark-3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Notifications */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  color: var(--light-1);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateX(150%);
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 400px;
}

.notification.show {
  transform: translateX(0);
}

.notification i {
  font-size: 1.25rem;
}

.notification.success {
  border-left: 4px solid var(--success);
}

.notification.success i {
  color: var(--success);
}

.notification.error {
  border-left: 4px solid var(--danger);
}

.notification.error i {
  color: var(--danger);
}

.notification.info {
  border-left: 4px solid var(--primary);
}

.notification.info i {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .container {
    padding: 1rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
  }
  
  .notification {
    left: 1rem;
    right: 1rem;
    max-width: none;
  }
}