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

:root {
  --bg: #070b1a;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #94a3b8;
  --primary: #7c3aed;
  --primary-2: #06b6d4;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Vazirmatn", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

.app-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 58, 237, 0.35), transparent 35%),
    radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.25), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(16, 185, 129, 0.18), transparent 35%),
    linear-gradient(135deg, #050816 0%, #08111f 45%, #020617 100%);
}

.app-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent);
}

.sidebar {
  position: fixed;
  top: 24px;
  right: 24px;
  bottom: 24px;
  width: 290px;
  padding: 22px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.brand-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.35);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.brand span {
  color: var(--muted);
  font-size: 12px;
}

.menu {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}

.menu-item {
  text-decoration: none;
  color: var(--text);
  padding: 14px 16px;
  border-radius: 18px;
  background: transparent;
  border: 1px solid transparent;
  transition: 0.25s ease;
  font-weight: 600;
}

.menu-item:hover,
.menu-item.active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.28), rgba(6, 182, 212, 0.16));
  border-color: rgba(255, 255, 255, 0.16);
  transform: translateX(-4px);
}

.menu-item.danger {
  color: #fecaca;
}

.main {
  margin-right: 338px;
  min-height: 100vh;
  padding: 24px 24px 24px 40px;
}

.topbar {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(22px);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 18px 24px;
  box-shadow: var(--shadow);
}

.topbar h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hamburger {
  display: none;
  background: var(--card);
  color: white;
  border: 1px solid var(--border);
  width: 46px;
  height: 46px;
  border-radius: 16px;
  font-size: 22px;
  cursor: pointer;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
}

.avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 800;
}

.content {
  margin-top: 24px;
}

.grid {
  display: grid;
  gap: 20px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--card);
  backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(6,182,212,0.08), transparent);
  opacity: 0.8;
  pointer-events: none;
}

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

.card-title {
  margin: 0 0 18px;
  font-size: 22px;
  font-weight: 800;
}

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

.form-group {
  display: grid;
  gap: 8px;
}

label {
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  padding: 15px 16px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: rgba(2, 6, 23, 0.55);
  color: white;
  outline: none;
  font-family: inherit;
  transition: 0.25s ease;
}

input:focus,
select:focus {
  border-color: rgba(6, 182, 212, 0.75);
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

input::placeholder {
  color: #64748b;
}

.btn {
  border: 0;
  border-radius: 18px;
  padding: 14px 20px;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: 0.25s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.32);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 60px rgba(124, 58, 237, 0.44);
}

.btn-danger {
  color: white;
  background: linear-gradient(135deg, #ef4444, #f97316);
}

.btn-soft {
  color: white;
  background: var(--card-strong);
  border: 1px solid var(--border);
}

.table-wrap {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 800px;
  background: rgba(15, 23, 42, 0.45);
}

th,
td {
  padding: 16px;
  text-align: right;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

th {
  color: #bae6fd;
  font-size: 13px;
  background: rgba(255,255,255,0.06);
}

td {
  color: #e2e8f0;
}

.badge {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.18);
  color: #86efac;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stat-card {
  min-height: 150px;
}

.stat-value {
  font-size: 34px;
  font-weight: 900;
  margin: 12px 0 4px;
}

.stat-label {
  color: var(--muted);
  font-size: 14px;
}

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

.login-card {
  width: min(460px, 100%);
}

.login-hero {
  text-align: center;
  margin-bottom: 24px;
}

.login-hero .brand-logo {
  margin: 0 auto 16px;
}

.login-hero h1 {
  margin: 0;
  font-size: 30px;
}

.login-hero p {
  color: var(--muted);
}

@media (max-width: 920px) {
  .sidebar {
    transform: translateX(120%);
    transition: 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    margin-right: 0;
    padding: 16px;
  }

  .hamburger {
    display: block;
  }

  .topbar {
    height: auto;
    gap: 14px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}
.error-box {
  margin-bottom: 16px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.28);
  padding: 12px 14px;
  border-radius: 16px;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff;
  box-shadow: 0 0 0 1000px rgba(2, 6, 23, 0.72) inset !important;
  border: 1px solid rgba(6, 182, 212, 0.75);
  transition: background-color 9999s ease-in-out 0s;
}
.error-box {
  margin-bottom: 16px;
  color: #fecaca;
  background: rgba(239, 68, 68, 0.16);
  border: 1px solid rgba(239, 68, 68, 0.28);
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
}
.success-box {
  margin-bottom: 16px;
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 700;
}
.stats-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
}

.user-preview{
  display:flex;
  align-items:center;
  gap:18px;
}

.avatar.large{
  width:72px;
  height:72px;
  font-size:28px;
}