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

:root {
  --bg-900: #0a0b10;
  --bg-800: #10131d;
  --bg-700: #141a28;
  --card: rgba(18, 22, 34, 0.82);
  --card-strong: rgba(22, 28, 42, 0.95);
  --text: #e7ecf6;
  --muted: #9aa4bf;
  --accent: #f8b73a;
  --accent-2: #4fd1c5;
  --accent-3: #8b5cf6;
  --danger: #f87171;
  --shadow: 0 24px 60px rgba(5, 8, 18, 0.45);
  --glow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Manrope', sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 10% -10%, rgba(79, 209, 197, 0.15), transparent 60%),
    radial-gradient(900px 600px at 90% 15%, rgba(248, 183, 58, 0.18), transparent 60%),
    linear-gradient(180deg, #0b0d14 0%, #0c111f 100%);
  min-height: 100vh;
}

.background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.background::before,
.background::after {
  content: '';
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 40%;
  filter: blur(60px);
  opacity: 0.35;
}

.background::before {
  top: -140px;
  left: -120px;
  background: conic-gradient(from 120deg, rgba(79, 209, 197, 0.5), rgba(139, 92, 246, 0.35), transparent 70%);
}

.background::after {
  bottom: -180px;
  right: -160px;
  background: conic-gradient(from 210deg, rgba(248, 183, 58, 0.55), rgba(244, 114, 182, 0.3), transparent 70%);
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: rgba(10, 12, 20, 0.92);
  backdrop-filter: blur(18px);
  padding: 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f8b73a, #f97316);
  color: #12131b;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-transform: uppercase;
}

.brand-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.brand-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-link {
  color: var(--muted);
  text-decoration: none;
  padding: 11px 14px;
  border-radius: 14px;
  transition: all 0.2s ease;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.01em;
}

.nav-link i {
  font-size: 14px;
  width: 18px;
  color: inherit;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(2px);
}

.nav-link.is-active {
  color: #11131d;
  background: linear-gradient(120deg, rgba(248, 183, 58, 0.95), rgba(79, 209, 197, 0.95));
  box-shadow: 0 10px 24px rgba(248, 183, 58, 0.2);
}

.profile {
  margin-top: auto;
  padding: 16px;
  background: var(--card);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-name {
  font-weight: 600;
}

.profile-sub {
  font-size: 12px;
  color: var(--muted);
}

.logout {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.content {
  padding: 32px 42px 56px;
  width: 100%;
}

.content > * {
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  animation: rise 0.5s ease both;
}

h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 34px;
  margin: 0;
  letter-spacing: -0.02em;
}

.subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.grid {
  display: grid;
  gap: 22px;
  margin-bottom: 28px;
}

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

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.card {
  background: var(--card);
  border-radius: 22px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  animation: rise 0.6s ease both;
}

.grid > .card:nth-child(2) { animation-delay: 0.04s; }
.grid > .card:nth-child(3) { animation-delay: 0.08s; }
.grid > .card:nth-child(4) { animation-delay: 0.12s; }
.grid > .card:nth-child(5) { animation-delay: 0.16s; }
.grid > .card:nth-child(6) { animation-delay: 0.2s; }

.card-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 12px;
}

.metric {
  font-size: 34px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  margin-bottom: 10px;
}

.card-sub {
  color: var(--muted);
  font-size: 14px;
}

.card-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.card-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--glow);
}

.table th,
.table td {
  text-align: left;
  padding: 12px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table th {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  background: rgba(255, 255, 255, 0.02);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.tag {
  font-weight: 600;
}

.link a {
  color: var(--accent);
  font-size: 12px;
  text-decoration: none;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.actions-row {
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inline {
  display: inline;
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.chip.danger {
  border-color: rgba(248, 113, 113, 0.5);
  color: #fecaca;
}

.leaders {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.leader-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr repeat(3, 0.7fr);
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  font-size: 13px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.leader-name {
  font-weight: 600;
}

.leader-meta {
  color: var(--muted);
}

.leader-metric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.form {
  display: grid;
  gap: 18px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-full {
  grid-column: 1 / -1;
}

label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

input,
select,
textarea {
  background: var(--card-strong);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 11px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(248, 183, 58, 0.5);
  box-shadow: 0 0 0 3px rgba(248, 183, 58, 0.15);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.button {
  align-self: flex-start;
  background: linear-gradient(120deg, #f8b73a, #f97316);
  color: #14131b;
  border: none;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 24px rgba(248, 183, 58, 0.2);
}

.button:hover {
  transform: translateY(-1px);
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
}

.login {
  width: min(520px, 92vw);
}

.login-card {
  background: rgba(15, 18, 30, 0.92);
  border-radius: 28px;
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  animation: rise 0.6s ease both;
}

.login-title {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.login-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.login-sub {
  font-size: 13px;
  color: var(--muted);
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin: 12px 0;
  font-size: 14px;
  border: 1px solid transparent;
}

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

.alert.warn {
  background: rgba(245, 165, 36, 0.15);
  color: #fed7aa;
  border-color: rgba(245, 165, 36, 0.25);
}

.alert.success {
  background: rgba(45, 212, 191, 0.15);
  color: #a7f3d0;
  border-color: rgba(45, 212, 191, 0.25);
}

.login-cta {
  margin: 18px 0;
}

.login-hint {
  color: var(--muted);
  font-size: 13px;
}

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

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 18px 18px 12px;
  }

  .nav {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .nav-link {
    white-space: nowrap;
  }

  .profile {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .content {
    padding: 22px 20px 36px;
  }
}

@media (max-width: 720px) {
  h1 {
    font-size: 26px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card {
    padding: 18px;
  }

  .table {
    display: block;
    overflow-x: auto;
  }

  .leader-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .leader-metric {
    text-align: left;
  }
}
