:root {
  --gradient-background: linear-gradient(135deg, #111827, #312e81, #6d28d9);
  --panel-glass-bg: rgba(31, 41, 55, 0.65);
  --panel-border: rgba(255, 255, 255, 0.12);
  --panel-hover: rgba(99, 102, 241, 0.18);
  --text-primary: #f9fafb;
  --text-secondary: rgba(229, 231, 235, 0.75);
  --accent-indigo: #6366f1;
  --accent-purple: #8b5cf6;
  --accent-green: #22c55e;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  margin: 0;
  min-height: 100vh;
  background-image: var(--gradient-background);
  background-attachment: fixed;
  color: var(--text-primary);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

main {
  position: relative;
  z-index: 1;
}

.glass-effect {
  background: rgba(255, 255, 255, 0.08);

  border: 1px solid var(--panel-border);
  border-radius: 18px;
}

.hover-scale {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
  box-shadow: 0 18px 32px rgba(17, 24, 39, 0.2);
}

.input-field {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 0.85rem 1.1rem;
  color: var(--text-primary);
  width: 100%;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.input-field::placeholder {
  color: rgba(229, 231, 235, 0.4);
}

.input-field:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(99, 102, 241, 0.45);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.stat-card {
  display: grid;
  gap: 1rem;
  padding: 1.75rem;
  border-radius: 18px;
}

.stat-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.stat-card__value {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.35rem 0;
}

.stat-card__trend {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.logo i {
  font-size: 1.1rem;
}

.navbar {
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.badge {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.12);
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.25);
  transition: 0.4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: '';
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-green);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.table-wrapper {
  overflow-x: auto;
  border-radius: 14px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-primary);
}

.data-table thead {
  background: rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.data-table th,
.data-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.data-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.06);
}

.btn-primary {
  border: none;
  border-radius: 999px;
  padding: 0.8rem 1.6rem;
  background-image: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 15px 25px rgba(79, 70, 229, 0.35);
}

.btn-danger {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  background: #ef4444;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(239, 68, 68, 0.45);
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  background: transparent;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.1);
}

.card-grid {
  display: grid;
  gap: 1.5rem;
}

.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 180px);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  border-radius: 20px;
  background: rgba(17, 24, 39, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(17, 24, 39, 0.55);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(circle at 0% 0%, rgba(99, 102, 241, 0.25), transparent 65%);
  z-index: 0;
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

.auth-card h2 {
  margin: 0 0 0.75rem;
  font-size: 1.85rem;
}

.auth-card p {
  margin: 0 0 2rem;
  color: var(--text-secondary);
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.alert--danger {
  background: rgba(248, 113, 113, 0.15);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fecaca;
}

.alert--success {
  background: rgba(74, 222, 128, 0.15);
  border-color: rgba(74, 222, 128, 0.35);
  color: #bbf7d0;
}

.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-footer a {
  color: white;
  font-weight: 600;
}

@media (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .glass-effect {
    border-radius: 14px;
  }

  .navbar .nav-actions {
    display: grid;
    gap: 0.5rem;
  }
}
