:root {
  --primary: #4f46e5;
  --primary-dark: #312e81;
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --ink: #0f172a;
  --muted: #64748b;
  --soft: #eef2ff;
}

@font-face {
  font-family: Vazirmatn;
  src: url('/fonts/Vazir.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('/fonts/Vazir-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url('/fonts/Vazir-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}


body {
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  color: var(--ink);
}

main.panel-main {
  width: 80%;
  margin-right: auto;
}

.sidebar {
  width: 240px;
  min-height: 100vh;
  position: fixed;
  top: 0;
  background: linear-gradient(180deg, #111827 0%, #312e81 100%);
  box-shadow: -10px 0 30px rgba(15, 23, 42, .12);
}

.sidebar ul {
  padding: 0;
}

.sidebar ul a i {
  padding-left: 10px;
}

.sidebar .brand {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: .4px;
}

.sidebar .nav-link {
  border-radius: 14px;
  padding: .75rem .9rem;
  transition: all .2s ease;
}

.sidebar .nav-link:hover {
  background: rgba(255, 255, 255, .14);
  transform: translateX(-3px);
}

.navbar-white {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, .88) !important;
}

.card {
  border: 0;
  border-radius: 20px;
  box-shadow: 0 16px 35px rgba(15, 23, 42, .08);
  overflow: hidden;
}

.card-header {
  border-bottom: 1px solid #eef2f7;
}

.stat-card {
  border-right: 5px solid var(--primary);
}

.stat-card.success {
  border-right-color: var(--success);
}

.stat-card.warning {
  border-right-color: var(--warning);
}

.stat-card.danger {
  border-right-color: var(--danger);
}

.stat-card h3 {
  font-weight: 800;
  margin-top: .5rem;
}

.page-hero,
.public-hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.5rem;
  border-radius: 24px;
  background: radial-gradient(circle at top right, #dbeafe, transparent 35%), linear-gradient(135deg, #fff, #eef2ff);
  box-shadow: 0 16px 35px rgba(79, 70, 229, .12);
}

.public-hero {
  display: block;
  padding: 3rem;
}

.public-hero h1 {
  font-weight: 900;
}

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .75rem;
  font-weight: 800;
  margin-bottom: .35rem;
}

pre.doc {
  white-space: pre-wrap;
  direction: ltr;
  text-align: left;
  background: #0f172a;
  color: #e2e8f0;
  padding: 1rem;
  border-radius: 16px;
}

.rich-content {
  line-height: 1.9;
}

.rich-content pre,
.rich-content code {
  direction: ltr;
  text-align: left;
}

.text-ltr {
  direction: ltr;
  text-align: left;
}

.error-page {
  max-width: 720px;
  margin-top: 6rem;
}

.error-code {
  font-size: 5rem;
  font-weight: 900;
  color: var(--primary);
  line-height: 1;
}

.public-page {
  min-height: 100vh;
}

.plan-card {
  border-top: 5px solid var(--success);
}

.btn {
  border-radius: 12px;
}

.form-control,
.form-select {
  border-radius: 12px;
}

.badge {
  border-radius: 999px;
  padding: .45rem .7rem;
}

.ck-editor__editable {
  min-height: 220px;
}

@media (max-width: 992px) {
  .sidebar {
    width: 220px;
    display: none;
    height: 100%;
    position: fixed;
    z-index: 9;
  }

  .page-hero {
    display: block;
  }

  main.panel-main {
    width: 100%;
  }
}
.panel-shell {
  min-height: 100vh;
}

.panel-main {
  transition: margin .2s ease, width .2s ease;
}

.navbar-white {
  position: sticky;
  top: 0;
  z-index: 8;
}

.table-responsive {
  border-radius: 16px;
}

.table {
  vertical-align: middle;
}

.plan-limit-list {
  display: grid;
  gap: .55rem;
}

.plan-limit-list span {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 14px;
  padding: .65rem .75rem;
}

.plan-limit-list i {
  color: var(--primary);
}

.sidebar-backdrop {
  display: none;
}

@media (min-width: 993px) {
  .toggleMenu {
    display: none;
  }
}

@media (max-width: 992px) {
  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    display: block;
    right: 0;
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 8;
    background: rgba(15, 23, 42, .45);
    backdrop-filter: blur(2px);
  }

  .navbar-white {
    border-radius: 0 0 18px 18px;
  }

  .container-fluid {
    padding-right: 1rem !important;
    padding-left: 1rem !important;
  }

  .card {
    border-radius: 16px;
  }
}

@media (max-width: 576px) {
  .page-hero,
  .public-hero {
    padding: 1rem;
    border-radius: 18px;
  }

  .navbar-white {
    padding-right: .75rem !important;
    padding-left: .75rem !important;
  }

  .navbar-white .text-muted {
    display: none;
  }
}
