@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Vibrant, sleek color palette */
  --primary: #6366f1; /* Indigo */
  --primary-hover: #4f46e5;
  --secondary: #10b981; /* Emerald */
  --secondary-hover: #059669;
  --danger: #ef4444;
  --danger-hover: #dc2828;
  
  /* Dark mode basis */
  --bg-color: #0f172a; /* Slate 900 */
  --surface-color: rgba(30, 41, 59, 0.7); /* Slate 800 with transparency */
  --surface-hover: rgba(30, 41, 59, 0.9);
  
  /* Text */
  --text-main: #f8fafc; /* Slate 50 */
  --text-muted: #94a3b8; /* Slate 400 */
  --border-color: rgba(255, 255, 255, 0.1);
  --border-light: rgba(255,255,255,0.05);

  /* Shadows */
  --glow-primary: 0 0 20px rgba(99, 102, 241, 0.3);
  --glow-secondary: 0 0 20px rgba(16, 185, 129, 0.3);
  --glow-danger: 0 0 20px rgba(239, 68, 68, 0.3);
}

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

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  background-image: radial-gradient(circle at top left, rgba(99, 102, 241, 0.15), transparent 40%),
                    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.1), transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  animation: fadeIn 0.6s ease-out;
}

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

/* Navbar with Glassmorphism */
.navbar {
  background: var(--surface-color);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-weight: 700;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #818cf8, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links a:hover {
  color: var(--text-main);
  background: var(--border-light);
  transform: translateY(-2px);
}

.nav-links .logout-btn {
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.nav-links .logout-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  box-shadow: var(--glow-danger);
  color: #fca5a5;
  border-color: transparent;
}

/* Cards & Glassmorphism */
.card, .table-container {
  background: var(--surface-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 24px 38px 3px rgba(0,0,0,0.14);
}

.page-header, .header-action {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

h1, h2, h3 {
  font-weight: 600;
  letter-spacing: -0.5px;
}

h1 {
  font-size: 2.25rem;
  background: linear-gradient(to right, #f8fafc, #cbd5e1);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

.help-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-main);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: rgba(15, 23, 42, 0.8);
  box-shadow: var(--glow-primary);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* Dynamic rows micro animation */
.form-row {
  animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  border-radius: 0.5rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
}

.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
  border-radius: 0.4rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-primary);
}

.btn-secondary, .btn-outline {
  background: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}
.btn-secondary:hover, .btn-outline:hover {
  background: var(--border-light);
  transform: translateY(-2px);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #f87171);
  color: white;
}
.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-danger);
}

/* Tables */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.table th {
  padding: 1rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.table td {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.table tbody tr {
  transition: all 0.2s ease;
}
.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Links */
a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #7dd3fc;
}

td.actions {
  display: flex;
  gap: 0.5rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 2rem 0;
}
