@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', Arial, sans-serif;
  background: #020617;
  color: #e2e8f0;
}

/* LOGIN */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(circle at 15% 20%, rgba(37,99,235,.28), transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(96,165,250,.14), transparent 30%),
    linear-gradient(135deg, #020617, #071225, #000814);
}

.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.25) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .12;
}

.login-box {
  width: 410px;
  position: relative;
  z-index: 2;
  padding: 46px 38px;
  border-radius: 30px;
  text-align: center;
  background: rgba(15,23,42,.72);
  border: 1px solid rgba(96,165,250,.18);
  backdrop-filter: blur(22px);
  box-shadow:
    0 30px 90px rgba(0,0,0,.65),
    inset 0 1px 0 rgba(255,255,255,.06);
}

.login-logo {
  width: 90px;
  height: 90px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1d4ed8, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 0 45px rgba(37,99,235,.55);
  animation: floatLogo 3s ease-in-out infinite;
}

@keyframes floatLogo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.login-box h2 {
  margin: 0;
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 2px;
}

.login-box h2 span {
  color: #60a5fa;
}

.login-subtitle {
  margin: 10px 0 28px;
  color: #94a3b8;
  font-size: 14px;
  letter-spacing: 4px;
}

.input-group {
  position: relative;
  margin-bottom: 15px;
}

.input-group span {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
}

.input {
  width: 100%;
  height: 56px;
  padding: 0 18px 0 52px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,.2);
  background: rgba(2,6,23,.85);
  color: #fff;
  font-size: 15px;
  outline: none;
  transition: .25s;
}

.input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 4px rgba(37,99,235,.18);
}

.btn-primary {
  width: 100%;
  height: 56px;
  border: none;
  border-radius: 18px;
  margin-top: 8px;
  cursor: pointer;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  background: linear-gradient(135deg, #4f46e5, #2563eb, #60a5fa);
  box-shadow: 0 15px 35px rgba(37,99,235,.4);
  transition: .25s;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 25px 50px rgba(37,99,235,.55);
}

.secure-text {
  margin-top: 25px;
  color: #cbd5e1;
  font-size: 14px;
}

.notice {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(2,6,23,.55);
  border: 1px solid rgba(96,165,250,.18);
  color: #cbd5e1;
}

.error {
  padding: 12px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(185,28,28,.22);
  border: 1px solid rgba(248,113,113,.35);
  color: #fecaca;
}

/* ADMIN LAYOUT */
.panel-layout {
  display: flex;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(14,165,233,.12), transparent 30%),
    linear-gradient(135deg, #020617, #071225, #020617);
}

.sidebar {
  width: 260px;
  height: 100vh;
  position: sticky;
  top: 0;
  padding: 18px 14px;
  background: rgba(2,6,23,.9);
  border-right: 1px solid rgba(96,165,250,.15);
  backdrop-filter: blur(18px);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px 25px;
}

.sidebar-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 28px rgba(37,99,235,.55);
}

.sidebar-logo-text {
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

.sidebar-section-title {
  padding: 8px 10px;
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-nav li a {
  display: block;
  padding: 13px 14px;
  margin-bottom: 8px;
  border-radius: 14px;
  color: #94a3b8;
  text-decoration: none;
  border: 1px solid transparent;
  transition: .25s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(37,99,235,.22), rgba(15,23,42,.95));
  border-color: rgba(96,165,250,.22);
  transform: translateX(4px);
}

.main {
  flex: 1;
  min-width: 0;
}

.topbar {
  height: 66px;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15,23,42,.72);
  border-bottom: 1px solid rgba(96,165,250,.14);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
}

.topbar-right a {
  color: #fecaca;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(248,113,113,.2);
}

.content {
  padding: 28px;
  animation: fadeUp .45s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 22px;
}

.stat-card,
.card {
  background: rgba(15,23,42,.76);
  border: 1px solid rgba(96,165,250,.14);
  border-radius: 22px;
  padding: 22px;
  box-shadow:
    0 20px 55px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(16px);
  transition: .25s;
}

.stat-card:hover,
.card:hover {
  transform: translateY(-3px);
  border-color: rgba(96,165,250,.32);
}

.stat-card h4 {
  margin: 0;
  color: #94a3b8;
  font-size: 13px;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
  color: #fff;
}

.card h3 {
  margin-top: 0;
  color: #fff;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: 16px;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th {
  background: rgba(30,41,59,.8);
  color: #cbd5e1;
  text-align: left;
  padding: 14px;
  font-size: 13px;
}

td {
  padding: 14px;
  border-bottom: 1px solid rgba(148,163,184,.1);
  color: #e5e7eb;
}

tr:hover td {
  background: rgba(37,99,235,.08);
}

.badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.success {
  background: rgba(22,163,74,.15);
  color: #86efac;
}

.badge.danger {
  background: rgba(220,38,38,.15);
  color: #fca5a5;
}

.badge.warning {
  background: rgba(234,179,8,.15);
  color: #fde68a;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .sidebar {
    width: 230px;
  }
}

@media (max-width: 768px) {
  .panel-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid rgba(96,165,250,.15);
  }

  .sidebar-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .sidebar-nav li {
    flex: 0 0 auto;
  }

  .sidebar-nav li a {
    white-space: nowrap;
  }

  .sidebar-section-title {
    display: none;
  }

  .topbar {
    height: auto;
    padding: 15px;
    flex-wrap: wrap;
    gap: 10px;
  }

  .content {
    padding: 16px;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .login-box {
    width: 100%;
    max-width: 410px;
    padding: 36px 24px;
  }

  .login-box h2 {
    font-size: 32px;
  }
}