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

:root {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --secondary: #06b6d4;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  --bg: #f8fafc;
  --card: rgba(255, 255, 255, 0.85);
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;

  --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.12);
  --shadow-md: 0 10px 25px rgba(15, 23, 42, 0.08);

  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --transition: all 0.25s ease;
}

* {
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, 0.08), transparent 25%),
    radial-gradient(circle at bottom right, rgba(6, 182, 212, 0.08), transparent 25%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* AUTH */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-gradient-bg {
  background:
    linear-gradient(135deg,
      #4f46e5 0%,
      #7c3aed 35%,
      #0ea5e9 100%);
}

.auth-card {
  width: 100%;
  max-width: 450px;
  border-radius: var(--radius-lg);
  padding: 36px;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.95);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 50%;
  top: -80px;
  right: -80px;
}

.modern-auth {
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
}

.auth-card h1 {
  margin: 0;
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
}

.auth-card p {
  margin: 10px 0 24px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-card input {
  width: 100%;
  margin-bottom: 14px;
}

.auth-primary-btn,
.auth-secondary-btn {
  width: 100%;
  margin-top: 10px;
}

.auth-secondary-btn {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
}

.auth-secondary-btn:hover {
  background: #f8fafc;
}

/* MAIN LAYOUT */

.layout {
  min-height: 100vh;
  display: flex;
}

/* SIDEBAR */

.sidebar {
  width: 280px;
  background:
    linear-gradient(180deg,
      #111827 0%,
      #1e1b4b 45%,
      #312e81 100%);
  color: white;
  padding: 28px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 8px 0 35px rgba(0, 0, 0, 0.18);
}

.brand {
  margin-bottom: 28px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
}

.brand h1,
.brand-title {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 700;
}

.brand p {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.menu-btn {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  padding: 14px 16px;
  font-weight: 500;
  transition: var(--transition);
  border: 1px solid transparent;
}

.menu-btn:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.12);
}

.menu-btn.active {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  box-shadow: 0 10px 25px rgba(124, 58, 237, 0.35);
}

.icon {
  font-size: 1.1rem;
}

.logout-btn {
  margin-top: auto;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.28);
}

/* CONTENT */

.content {
  margin-left: 280px;
  width: calc(100% - 280px);
  padding: 28px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

header h2 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
}

header p {
  margin: 6px 0 0;
  color: var(--muted);
}

/* NAV */

nav {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

/* BUTTONS */

button {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  border: none;
  border-radius: 14px;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
}

button:hover {
  transform: translateY(-2px);
  opacity: 0.96;
}

button:active {
  transform: scale(0.98);
}

button.ghost {
  background: white;
  border: 1px solid var(--border);
  color: var(--text);
}

button.ghost:hover {
  background: #f8fafc;
}

/* CARDS */

.card {
  background: var(--card);
  backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  margin-bottom: 22px;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 1.5rem;
  font-weight: 700;
}

/* FORMS */

form {
  margin-bottom: 18px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

input,
select {
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  outline: none;
  transition: var(--transition);
  font-size: 0.95rem;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.15);
  transform: translateY(-1px);
}

input::placeholder {
  color: #94a3b8;
}

/* METRICS */

.metric {
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: white;
  position: relative;
  overflow: hidden;
  min-height: 130px;
}

.metric::before {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  right: -70px;
  top: -70px;
}

.metric strong {
  font-size: 2.3rem;
  position: relative;
  z-index: 2;
}

.metric span {
  font-size: 1rem;
  opacity: 0.9;
  position: relative;
  z-index: 2;
}

.metric:nth-child(1) {
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
}

.metric:nth-child(2) {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
}

.metric:nth-child(3) {
  background: linear-gradient(135deg, #10b981, #14b8a6);
}

/* TABLES */

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius-md);
}

thead {
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

th {
  color: #334155;
  font-weight: 700;
  font-size: 0.9rem;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 15px;
  text-align: left;
}

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

tbody tr:hover {
  background: rgba(124, 58, 237, 0.04);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* SEARCH INPUTS */

.search-input {
  margin: 18px 0;
}

/* STATUS */

.status-pending {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

/* ERROR */

.error {
  color: #dc2626;
  font-size: 0.9rem;
  margin-bottom: 10px;
  background: rgba(239, 68, 68, 0.08);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(239, 68, 68, 0.18);
}

/* SCROLLBAR */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(
    180deg,
    #7c3aed,
    #06b6d4
  );
  border-radius: 999px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

/* RESPONSIVE */

@media (max-width: 1024px) {
  .sidebar {
    width: 90px;
    padding: 18px 10px;
  }

  .brand p,
  .menu-btn span:last-child {
    display: none;
  }

  .content {
    margin-left: 90px;
    width: calc(100% - 90px);
  }

  .menu-btn {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    position: relative;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
  }

  .menu {
    flex-direction: row;
    overflow-x: auto;
  }

  .content {
    margin-left: 0;
    width: 100%;
    padding: 18px;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 18px;
  }

  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}