/* Bootstrap sets --bs-font-sans-serif on .form-select, which overrides body fonts — Arabic/Pashto needs explicit stack */
:root {
  --zkh-font-arabic: "Noto Sans Arabic", Tahoma, "Segoe UI", sans-serif;
  --zkh-accent: #1f4a7f;
  --zkh-accent-hover: #173a64;
  --zkh-radius-lg: 16px;
  --zkh-content-max: 1200px;
}

html[dir="rtl"] {
  --bs-font-sans-serif: var(--zkh-font-arabic);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Shared classic look — Noto Sans Arabic loaded from Google Fonts in layout */
.site-body {
  background: #f5f6f8;
  color: #1f2937;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--zkh-font-arabic), system-ui, sans-serif;
}

/* Language dropdown shows پښتو/دری even on English (LTR) pages — must not use Bootstrap’s default .form-select font */
.language-picker,
.language-picker .form-select,
.language-picker .form-label {
  font-family: var(--zkh-font-arabic) !important;
}

html[dir="rtl"] .site-body,
html[dir="rtl"] .admin-body {
  font-family: var(--zkh-font-arabic), sans-serif;
}

html[dir="rtl"] .form-select,
html[dir="rtl"] .form-control,
html[dir="rtl"] .btn {
  font-family: var(--zkh-font-arabic), sans-serif !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-navbar {
  background: #ffffff;
  border-bottom: 1px solid #dbe1e8;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  min-height: 64px;
}

.site-brand {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  color: #0f172a !important;
}

.site-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.site-brand-mark {
  width: 1.9rem;
  height: 1.9rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-brand-mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.site-brand-text {
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1;
}

.site-nav-link {
  color: #334155 !important;
  border-radius: 8px;
  padding: 8px 12px !important;
}

.site-nav-link:hover,
.site-nav-link:focus {
  background: #eef2f7;
  color: #0f172a !important;
}

.site-main-wrap {
  flex: 1;
}

.site-main {
  padding-top: 24px;
  padding-bottom: 24px;
  max-width: var(--zkh-content-max);
}

.site-main img,
.site-main svg,
.site-main video {
  max-width: 100%;
  height: auto;
}

.site-main .btn {
  min-height: 2.5rem;
}

.back-step-btn {
  border-color: #cbd5e1;
  color: #334155;
  background: #ffffff;
  min-width: 88px;
  font-size: 0.85rem;
  padding: 6px 10px;
}

.back-step-btn:hover {
  background: #f8fafc;
  color: #0f172a;
  border-color: #94a3b8;
}

.site-main .card,
.site-main .table-responsive,
.site-main form {
  border-radius: 12px;
}

.site-main .table {
  background: #ffffff;
}

.site-main .table thead th {
  background: #f8fafc;
  color: #475569;
  font-weight: 600;
}

.site-main .btn-primary {
  background: var(--zkh-accent);
  border-color: var(--zkh-accent);
}

.site-main .btn-primary:hover {
  background: var(--zkh-accent-hover);
  border-color: var(--zkh-accent-hover);
}

.site-main .btn-secondary {
  background: #64748b;
  border-color: #64748b;
}

.site-main .form-control,
.site-main .form-select,
.site-main .form-control:focus,
.site-main .form-select:focus {
  border-color: #cbd5e1;
  box-shadow: none;
}

/* Batch-2 polish: auth pages (legacy + modern wrappers) */
.account-container {
  max-width: 520px;
  margin: 1.5rem auto;
}

.account-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  padding: 1.1rem 1.2rem;
}

.account-box h2 {
  color: #0f172a;
  letter-spacing: -0.01em;
}

.account-box .form-label {
  font-weight: 600;
  color: #334155;
}

.account-page {
  margin-top: 0.5rem;
}

.account-card {
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.07);
}

/* Batch-2 polish: messaging pages */
.messaging-page {
  max-width: 980px;
}

.messaging-panel {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  padding: 1rem;
}

.messaging-thread-box {
  max-height: 28rem;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.9rem;
}

.messaging-bubble {
  max-width: 85%;
}

.site-main--fluid {
  max-width: 100%;
  padding-left: 24px;
  padding-right: 24px;
}

.home-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.home-sidebar {
  position: sticky;
  top: 90px;
  align-self: start;
  border: 1px solid #dbe1e8;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px;
  display: grid;
  gap: 6px;
}

.home-content {
  min-width: 0;
}

.home-persona-banner {
  border: 1px solid #dbe3ed;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 1.15rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.home-persona-banner__kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
}

.home-role-panel {
  border: 1px solid #dbe3ed;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.95rem 1.05rem;
}

.admin-home-pro {
  display: grid;
  gap: 1rem;
}

.admin-home-pro__head {
  border: 1px solid #dbe3ed;
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
}

.admin-home-pro__head h2 {
  margin: 0;
  font-size: 1.1rem;
}

.admin-home-pro__head p {
  margin: 0.35rem 0 0.8rem;
  color: #64748b;
}

.admin-home-pro__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.admin-home-pro__stat {
  border: 1px solid #dbe3ed;
  background: #ffffff;
  border-radius: 12px;
  padding: 0.9rem 1rem;
}

.admin-home-pro__stat p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
}

.admin-home-pro__stat strong {
  margin-top: 0.35rem;
  display: block;
  font-size: 1.35rem;
  color: #0f172a;
}

.admin-home-pro__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.admin-home-pro__card {
  text-decoration: none;
  border: 1px solid #dbe3ed;
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  color: #0f172a;
}

.admin-home-pro__card h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-home-pro__card p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.admin-home-pro__card:hover {
  border-color: #c5d1df;
  background: #f8fafc;
}

.admin-home-clean {
  display: grid;
  gap: 1rem;
}

.admin-home-clean__head {
  border: 1px solid #dbe3ed;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.admin-home-clean__head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.admin-home-clean__head p {
  margin: 0.35rem 0 0;
  color: #64748b;
}

.admin-home-clean__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.admin-home-clean__stat {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.9rem 1rem;
}

.admin-home-clean__stat p {
  margin: 0;
  color: #64748b;
  font-size: 0.82rem;
}

.admin-home-clean__stat strong {
  margin-top: 0.35rem;
  display: block;
  font-size: 1.3rem;
  color: #0f172a;
}

.admin-home-clean__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.admin-home-clean__action-card {
  text-decoration: none;
  border: 1px solid #dbe3ed;
  background: #ffffff;
  border-radius: 12px;
  padding: 1rem;
  color: #0f172a;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.admin-home-clean__action-card:hover {
  border-color: #c5d1df;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.admin-home-clean__action-card h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-home-clean__action-card p {
  margin: 0.4rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.home-sidebar a {
  text-decoration: none;
  color: #334155;
  border-radius: 8px;
  padding: 9px 11px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.home-sidebar a:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}

.home-sidebar a.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e3a8a;
}

.site-footer {
  border-top: 1px solid #dbe1e8;
  background: #ffffff;
}

.site-footer-inner {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #64748b;
  font-size: 0.92rem;
}

.site-footer-inner a {
  color: #475569;
  text-decoration: none;
}

.site-footer-inner a:hover {
  color: #0f172a;
}

.site-footer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-back-btn {
  min-width: 78px;
  padding: 4px 10px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Admin dashboard */
.admin-body {
  margin-bottom: 0;
  background: #f8fafc;
  font-family: var(--zkh-font-arabic), system-ui, sans-serif;
}

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

.admin-sidebar {
  width: 270px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-right: 1px solid #e2e8f0;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand-block {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
}

.brand-block h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #0f172a;
}

.brand-block p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.sidebar-nav {
  display: grid;
  gap: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 12px;
  padding: 8px;
}

.sidebar-nav a {
  text-decoration: none;
  color: #475569;
  padding: 10px 12px;
  border-radius: 11px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-nav a:hover {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #0f172a;
}

.sidebar-nav a.is-active {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #1e3a8a;
  box-shadow: inset 3px 0 0 #4f46e5;
}

.sidebar-nav__icon {
  min-width: 1.2rem;
  text-align: center;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav__icon svg {
  width: 1rem;
  height: 1rem;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.role-card {
  margin-top: auto;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.role-card p {
  margin: 0;
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.role-card strong {
  display: block;
  margin-top: 4px;
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.search-wrap {
  flex: 1;
  max-width: 560px;
}

.search-wrap input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

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

.header-btn {
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
}

.profile-btn {
  font-size: 0.9rem;
}

.notification-btn {
  min-width: 42px;
}

.notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  line-height: 18px;
  text-align: center;
  padding: 0 4px;
}

.notification-menu {
  width: 360px;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e8f0;
  padding: 10px 12px;
}

.notification-items {
  max-height: 360px;
  overflow-y: auto;
}

.notification-item {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.notification-item.is-unread {
  background: #f8fafc;
}

.notification-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #0f172a;
}

.notification-message {
  margin-top: 3px;
  color: #475569;
  font-size: 0.85rem;
}

.notification-time {
  margin-top: 4px;
  font-size: 0.75rem;
  color: #94a3b8;
}

.notification-empty {
  color: #64748b;
  font-size: 0.9rem;
  padding: 16px 12px;
}

.notification-list-page {
  display: grid;
  gap: 8px;
}

.main-body {
  padding: 24px;
  flex: 1 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-self: stretch;
}

.admin-footer {
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  min-height: 52px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 8px 24px;
}

.dashboard-heading h1 {
  margin: 0;
  font-size: 1.75rem;
}

.dashboard-heading--pro h1 {
  letter-spacing: -0.01em;
}

.dashboard-heading p {
  margin: 6px 0 0;
  color: #64748b;
}

/* Safe batch polish: admin pages only */
.dashboard-content {
  display: grid;
  gap: 1rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  justify-items: stretch;
}

.dashboard-content .dashboard-heading.d-flex {
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
}

.dashboard-content .dashboard-heading .btn {
  flex-shrink: 0;
}

/* Admin list toolbars: full-width, aligned controls (avoids “floating” filters in the middle) */
.dashboard-content .admin-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.dashboard-content .admin-filter-row__search {
  flex: 1 1 240px;
  min-width: 0;
}

.dashboard-content .admin-filter-row__role {
  flex: 0 1 200px;
  min-width: 0;
}

.dashboard-content .admin-filter-row__culture {
  flex: 0 0 auto;
  min-width: 0;
}

.dashboard-content .admin-filter-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dashboard-content .admin-filter-row__pagesize {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 0 1 auto;
  margin-inline-start: auto;
}

@media (max-width: 575.98px) {
  .dashboard-content .admin-filter-row__pagesize {
    margin-inline-start: 0;
    width: 100%;
  }

  .dashboard-content .admin-filter-row__actions {
    width: 100%;
  }

  .dashboard-content .admin-filter-row__actions .btn {
    flex: 1 1 auto;
  }
}

/* Table action cells: consistent button alignment */
.dashboard-content .admin-table-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  align-items: center;
  max-width: 100%;
}

.dashboard-content .admin-table-actions form {
  display: inline-flex;
  margin: 0;
}

.dashboard-content .admin-table-actions .form-select-sm {
  min-width: 7.5rem;
}

.dashboard-content .table-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.dashboard-content .table-header-row h3 {
  margin: 0;
  font-size: 1.05rem;
}

/* Admin users: search-first empty state + card-style rows */
.dashboard-content.admin-users-page .admin-users-toolbar {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 55%, #eef2ff 100%);
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.dashboard-content.admin-users-page .admin-users-search-input-wrap {
  position: relative;
}

.dashboard-content.admin-users-page .admin-users-search-icon {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  display: flex;
}

.dashboard-content.admin-users-page .admin-users-search-input {
  padding-inline-start: 2.35rem;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  min-height: 42px;
}

.dashboard-content.admin-users-page .admin-users-empty-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2.25rem 1.5rem 2.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 55%);
  border: 1px solid #e2e8f0;
}

.dashboard-content.admin-users-page .admin-users-empty-hero__glow {
  position: absolute;
  width: 280px;
  height: 280px;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(99, 102, 241, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.dashboard-content.admin-users-page .admin-users-empty-hero__icon {
  color: #6366f1;
  margin-bottom: 0.75rem;
  position: relative;
}

.dashboard-content.admin-users-page .admin-users-empty-hero__title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: #0f172a;
}

.dashboard-content.admin-users-page .admin-users-empty-hero__text {
  margin: 0 auto;
  max-width: 36rem;
  color: #64748b;
  line-height: 1.55;
  font-size: 0.98rem;
}

.dashboard-content .admin-on-demand-hero {
  text-align: center;
  padding: 1.8rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px dashed #cbd5e1;
}

.dashboard-content .admin-on-demand-hero h2 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
  color: #0f172a;
}

.dashboard-content .admin-on-demand-hero p {
  margin: 0;
  color: #64748b;
}

.dashboard-content.admin-users-page .admin-users-results {
  padding: 0;
  overflow: hidden;
}

.dashboard-content.admin-users-page .admin-users-results__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.1rem;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #312e81 100%);
  color: #f8fafc;
}

.dashboard-content.admin-users-page .admin-users-results__count {
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0.95;
}

.dashboard-content.admin-users-page .admin-users-table-responsive {
  padding: 0.6rem 0.65rem 0.85rem;
  background: #f1f5f9;
}

.dashboard-content.admin-users-page table.admin-users-table {
  border-collapse: separate;
  border-spacing: 0 0.55rem;
  background: transparent;
}

.dashboard-content.admin-users-page table.admin-users-table thead th {
  background: transparent !important;
  border: none !important;
  padding: 0.35rem 0.75rem 0.15rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.dashboard-content.admin-users-page table.admin-users-table tbody td {
  border: none;
  background: #fff;
  padding: 0.65rem 0.75rem;
}

.dashboard-content.admin-users-page table.admin-users-table tbody tr.admin-users-table__row td:first-child {
  border-radius: 12px 0 0 12px;
}

.dashboard-content.admin-users-page table.admin-users-table tbody tr.admin-users-table__row td:last-child {
  border-radius: 0 12px 12px 0;
}

[dir="rtl"] .dashboard-content.admin-users-page table.admin-users-table tbody tr.admin-users-table__row td:first-child {
  border-radius: 0 12px 12px 0;
}

[dir="rtl"] .dashboard-content.admin-users-page table.admin-users-table tbody tr.admin-users-table__row td:last-child {
  border-radius: 12px 0 0 12px;
}

.dashboard-content.admin-users-page .admin-users-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.dashboard-content.admin-users-page .admin-users-avatar {
  flex-shrink: 0;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: #1e1b4b;
  background: linear-gradient(135deg, #c7d2fe 0%, #a5b4fc 100%);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.dashboard-content.admin-users-page .admin-users-identity__name {
  font-weight: 600;
  color: #0f172a;
}

.dashboard-content.admin-users-page .admin-users-email {
  color: #475569;
  font-size: 0.92rem;
}

.dashboard-content.admin-users-page .admin-users-role {
  font-weight: 600;
  padding: 0.35em 0.65em;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.dashboard-content.admin-users-page .admin-users-role--admin {
  background: #1e293b;
  color: #f8fafc;
}

.dashboard-content.admin-users-page .admin-users-role--instructor {
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: #fff;
}

.dashboard-content.admin-users-page .admin-users-role--learner {
  background: #e2e8f0;
  color: #334155;
}

.dashboard-content.admin-users-page .admin-users-table__empty {
  padding: 2rem 1rem !important;
  background: #fff !important;
  border-radius: 12px;
  color: #64748b !important;
  font-weight: 500;
}

.dashboard-content.admin-users-page table.admin-users-table tbody tr.admin-users-table__row:hover td {
  background: #fafbff;
}

.dashboard-content .dashboard-heading {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 1.05rem 1.15rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.dashboard-content .card-block {
  border-radius: 16px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.dashboard-content .table-responsive {
  width: 100%;
  border-radius: 12px;
}

.dashboard-content .table {
  width: 100%;
  margin-bottom: 0;
}

.dashboard-content .table thead th {
  background: #f8fafc;
  color: #334155;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-content .table tbody tr {
  transition: background-color 0.16s ease;
}

.dashboard-content .table tbody tr:hover {
  background: #f8fafc;
}

.dashboard-content .table tbody td[colspan] {
  padding-block: 1.1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-top: 1px dashed #e2e8f0;
  font-weight: 500;
}

.dashboard-content .table > :not(caption) > * > * {
  vertical-align: middle;
}

.dashboard-content .form-label {
  font-weight: 600;
  color: #334155;
}

.dashboard-content .alert {
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.05);
}

.dashboard-content .card-block h3,
.dashboard-content .card-block h4 {
  letter-spacing: -0.01em;
}

.dashboard-content .card-block .card-text,
.dashboard-content .card-block p.text-muted {
  color: #64748b !important;
}

@media (max-width: 991.98px) {
  .dashboard-content .dashboard-heading {
    padding: 0.95rem 1rem;
  }
}

@media (max-width: 575.98px) {
  .dashboard-content {
    gap: 0.8rem;
  }

  .dashboard-content .dashboard-heading,
  .dashboard-content .card-block {
    border-radius: 12px;
  }

  .dashboard-content .table > :not(caption) > * > * {
    padding: 0.6rem;
  }
}

.metrics-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.metric-card,
.card-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
}

.metric-card {
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

/* Informational cards should look static, not clickable */
.admin-metric-info {
  cursor: default;
  border-color: #e2e8f0;
}

.metric-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.metric-label {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
}

.metric-card h2 {
  margin: 6px 0 0;
  font-size: 2rem;
}

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

.icon-blue { background: #eff6ff; }
.icon-green { background: #ecfdf5; }
.icon-purple { background: #f5f3ff; }

.metric-trend {
  margin: 12px 0 0;
  color: #64748b;
  font-size: 0.8rem;
}

.management-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 16px;
}

.card-block h3 {
  margin: 0;
  font-size: 1.1rem;
}

.card-block p {
  color: #64748b;
  margin: 6px 0 0;
}

.quick-actions {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

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

.action-btn {
  text-align: center;
  padding: 10px;
  border-radius: 10px;
}

.dashboard-links {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.dashboard-links a {
  text-decoration: none;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
}

.dashboard-links a:hover {
  background: #f1f5f9;
}

.management-shortcuts-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.management-shortcut-card {
  text-decoration: none;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 12px;
  padding: 14px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-click-target {
  cursor: pointer;
  border-color: #c9d8eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.management-shortcut-card h4 {
  margin: 0;
  font-size: 1rem;
}

.management-shortcut-card small {
  color: #64748b;
}

.management-shortcut-card strong {
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #e2e8f0;
  display: grid;
  place-items: center;
}

.management-shortcut-card__count {
  background: #dbeafe !important;
  color: #1e3a8a;
  font-weight: 700;
}

.management-shortcut-card:hover {
  background: #eef4fb;
  border-color: #9fb8d7;
  box-shadow: 0 10px 18px rgba(31, 74, 127, 0.12);
  transform: translateY(-2px);
}

.table thead th {
  color: #64748b;
  font-weight: 500;
  font-size: 0.9rem;
}

/* Smart pager: cleaner desktop + compact mobile controls */
.pager-smart__list {
  gap: 0.35rem;
}

.pager-smart .page-item .page-link {
  border-radius: 10px;
  border-color: #dbe3ed;
  color: #334155;
  background: #ffffff;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.45rem 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pager-smart .page-item .page-link:hover {
  color: #0f172a;
  background: #f8fafc;
  border-color: #c5d1df;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.pager-smart .page-item.active .page-link {
  color: #ffffff;
  border-color: var(--zkh-accent);
  background: linear-gradient(135deg, var(--zkh-accent) 0%, #163a64 100%);
  box-shadow: 0 8px 18px rgba(31, 74, 127, 0.28);
}

.pager-smart .page-item.disabled .page-link {
  color: #9aa7b8;
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: none;
  opacity: 0.9;
}

.pager-smart__ellipsis .page-link {
  border-style: dashed;
  pointer-events: none;
  min-width: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pager-smart .page-item .page-link:focus-visible {
  outline: 2px solid rgba(31, 74, 127, 0.35);
  outline-offset: 1px;
  box-shadow: none;
}

.pager-smart__icon {
  font-size: 1rem;
  line-height: 1;
}

.pager-smart__text {
  line-height: 1;
}

@media (max-width: 991.98px) {
  .home-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-sidebar {
    position: static;
    top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .home-sidebar h5 {
    width: 100%;
    margin-bottom: 0.35rem !important;
  }

  .home-sidebar a {
    padding: 7px 9px;
    font-size: 0.9rem;
  }

  .admin-sidebar {
    display: none;
  }

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

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

  .quick-actions--pro,
  .management-shortcuts-grid {
    grid-template-columns: 1fr;
  }

  .footer-back-btn {
    min-width: 72px;
    padding: 4px 8px;
  }

  .home-persona-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .admin-home-pro__stats,
  .admin-home-pro__grid {
    grid-template-columns: 1fr;
  }

  .admin-home-clean__head {
    flex-direction: column;
    align-items: stretch;
  }

  .admin-home-clean__stats,
  .admin-home-clean__actions {
    grid-template-columns: 1fr;
  }
}

/* Header: primary links vs toolbar (language + auth) */
.site-navbar-inner {
  min-width: 0;
}

.navbar-end-toolbar {
  align-items: center;
  justify-content: flex-end;
}

html[dir="rtl"] .navbar-end-toolbar {
  justify-content: flex-start;
}

.navbar-end-toolbar .language-picker {
  margin-bottom: 0;
}

@media (max-width: 991.98px) {
  .site-navbar-inner {
    padding-top: 0.25rem;
    padding-bottom: 0.35rem;
  }

  .navbar-end-toolbar {
    width: 100%;
    justify-content: flex-end;
    gap: 0.75rem !important;
  }

  html[dir="rtl"] .navbar-end-toolbar {
    justify-content: flex-start;
  }
}

/* Language picker (classic label + select) */
.language-picker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}

.language-picker__icon {
  font-size: 0.95rem;
  line-height: 1;
  opacity: 0.85;
}

.language-picker__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #4b5563;
  white-space: nowrap;
}

.language-picker__form .form-select {
  min-width: 9.5rem;
  max-width: 11.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.375rem;
  background-color: #fff;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.language-picker--navbar .form-select {
  font-size: 0.875rem;
  padding-top: 0.3rem;
  padding-bottom: 0.3rem;
}

.language-picker--navbar .language-picker__label {
  margin-right: 0.15rem;
}

.language-picker--admin-header .language-picker__label {
  color: #6b7280;
}

.language-picker--admin-header .form-select {
  min-width: 9rem;
  border-color: #d1d5db;
  background-color: #ffffff;
}

.language-picker--sidebar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-body .language-picker--sidebar .language-picker__label {
  color: rgba(255, 255, 255, 0.75);
}

.admin-body .language-picker--sidebar .form-select {
  width: 100%;
  max-width: none;
  border-color: rgba(255, 255, 255, 0.25);
  background-color: rgba(15, 23, 42, 0.35);
  color: #f8fafc;
}

.admin-body .language-picker--sidebar .form-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 0.15rem rgba(147, 197, 253, 0.35);
}

.header-right .language-picker {
  margin-right: 0.35rem;
}

@media (max-width: 991.98px) {
  .language-picker--navbar {
    width: auto;
    max-width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    margin-top: 0;
  }

  html[dir="rtl"] .language-picker--navbar {
    justify-content: flex-start;
  }

  .language-picker--navbar .language-picker__form .form-select {
    min-width: 9.25rem;
    max-width: min(11.5rem, 100vw - 8rem);
  }
}

/* About Us & Privacy — shared hero / page shell */
.about-page,
.privacy-page {
  max-width: 1080px;
  margin-inline: auto;
}

.about-hero,
.privacy-hero {
  margin-bottom: 2rem;
}

@media (min-width: 992px) {
  .about-hero,
  .privacy-hero {
    margin-bottom: 2.75rem;
  }
}

.about-hero-inner,
.privacy-hero-inner {
  background: linear-gradient(135deg, var(--zkh-accent) 0%, #0f2847 55%, #0a1929 100%);
  box-shadow: 0 16px 48px rgba(31, 74, 127, 0.28);
  padding: 2.25rem 1.5rem;
}

@media (min-width: 768px) {
  .about-hero-inner,
  .privacy-hero-inner {
    padding: 3rem 2rem;
  }
}

.about-hero-title,
.privacy-hero-title {
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.about-article,
.privacy-article {
  padding-bottom: 0.5rem;
}

.about-intro {
  max-width: 36rem;
  line-height: 1.55;
}

.about-pillar {
  border-radius: var(--zkh-radius-lg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-pillar:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1) !important;
}

.about-pillar .card-body {
  border-radius: var(--zkh-radius-lg);
  border-top: 3px solid var(--zkh-accent);
}

.about-pillar-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--zkh-accent);
}

.about-pillar-title {
  color: #0f172a;
  font-weight: 700;
}

.about-pillar-text {
  line-height: 1.6;
}

.about-goals-list li {
  margin-bottom: 0.45rem;
}

.about-goals-list li:last-child {
  margin-bottom: 0;
}

.about-offers {
  border-radius: var(--zkh-radius-lg);
  background: #ffffff;
}

.about-section-heading {
  color: #0f172a;
  font-weight: 700;
}

.about-offer-block {
  padding: 0.5rem 0;
  border-inline-start: 3px solid rgba(31, 74, 127, 0.35);
  padding-inline-start: 1rem;
}

html[dir="rtl"] .about-offer-block {
  border-inline-start: none;
  border-inline-end: 3px solid rgba(31, 74, 127, 0.35);
  padding-inline-start: 0;
  padding-inline-end: 1rem;
}

.about-offer-name {
  color: var(--zkh-accent);
  font-weight: 700;
}

.about-contact {
  border-radius: var(--zkh-radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.about-contact-title {
  color: #0f172a;
  font-weight: 700;
}

.about-contact .btn-primary {
  background-color: var(--zkh-accent);
  border-color: var(--zkh-accent);
}

.about-contact .btn-primary:hover {
  background-color: var(--zkh-accent-hover);
  border-color: var(--zkh-accent-hover);
}

.about-empty {
  border-radius: var(--zkh-radius-lg);
}

/* Privacy policy — section cards & typography */
.privacy-meta {
  max-width: 32rem;
  font-size: 0.875rem;
}

.privacy-section {
  border-radius: var(--zkh-radius-lg);
}

.privacy-section-title {
  color: #0f172a;
  font-weight: 700;
}

.privacy-kicker {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--zkh-accent);
}

.privacy-list {
  padding-inline-start: 1.25rem;
  margin-bottom: 0;
}

.privacy-list li {
  margin-bottom: 0.4rem;
}

.privacy-list li:last-child {
  margin-bottom: 0;
}

.privacy-prose {
  max-width: 42rem;
  line-height: 1.65;
}

.privacy-contact {
  border-radius: var(--zkh-radius-lg);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.privacy-contact-title {
  color: #0f172a;
  font-weight: 700;
}

.privacy-contact .btn-primary {
  background-color: var(--zkh-accent);
  border-color: var(--zkh-accent);
}

.privacy-contact .btn-primary:hover {
  background-color: var(--zkh-accent-hover);
  border-color: var(--zkh-accent-hover);
}

.privacy-empty {
  border-radius: var(--zkh-radius-lg);
}

/* Messaging: nav unread badge + inbox row highlight */
.nav-messages-link {
  position: relative;
}

.nav-unread-badge {
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 1.25rem;
  padding: 0.25em 0.45em;
  line-height: 1;
}

.messaging-inbox-row--unread {
  border-inline-start: 4px solid var(--zkh-accent);
  background: linear-gradient(90deg, rgba(31, 74, 127, 0.06) 0%, transparent 12rem);
}

html[dir="rtl"] .messaging-inbox-row--unread {
  background: linear-gradient(270deg, rgba(31, 74, 127, 0.06) 0%, transparent 12rem);
}

.messaging-inbox-new-badge {
  font-size: 0.65rem;
  font-weight: 600;
}

.review-stars {
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  line-height: 1;
}

.review-star {
  color: #cbd5e1;
}

.review-star--on {
  color: #f59e0b;
}

.home-member-review-card {
  border-radius: var(--zkh-radius-lg);
}

/* Public pages quality pass: home + details pages */
.home-content .card,
.course-details-page,
.library-details-page {
  background: #ffffff;
}

.home-content .card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.home-content .card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.home-content .card:focus-within {
  border-color: #94a3b8;
  box-shadow: 0 0 0 3px rgba(31, 74, 127, 0.12);
}

.home-content .card .card-title {
  color: #0f172a;
  font-weight: 700;
}

.home-content .card .card-text {
  color: #334155;
}

.home-content .card .card-footer {
  border-top: 1px solid #f1f5f9 !important;
}

.top-instructors-section {
  max-width: 1180px;
}

.top-instructors-section h2 {
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.top-instructor-card {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.top-instructor-card__avatar {
  height: 220px;
  object-fit: cover;
}

.top-instructor-card__bio {
  min-height: 72px;
  line-height: 1.55;
}

.top-instructor-card__skills {
  min-height: 34px;
}

.home-stat-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 1.1rem 1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.home-stat-card h3 {
  margin: 0;
  font-size: 2rem;
  color: #0f172a;
}

.home-stat-card p {
  margin: 0.3rem 0 0;
  color: #64748b;
}

.home-landing {
  display: grid;
  gap: 0.25rem;
}

.home-showcase {
  display: grid;
  gap: 1rem;
}

.home-showcase__hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  margin-bottom: 0.45rem;
}

.home-showcase__hero-main {
  border: 1px solid #dbe3ed;
  border-radius: 16px;
  background:
    radial-gradient(1200px 360px at -5% -20%, rgba(79, 70, 229, 0.09), transparent 40%),
    radial-gradient(1000px 320px at 105% 120%, rgba(6, 182, 212, 0.1), transparent 42%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 1.25rem;
}

.home-showcase__kicker {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 700;
}

.home-showcase__hero-main h1 {
  margin: 0.4rem 0 0.75rem;
  font-size: clamp(1.85rem, 3.35vw, 2.6rem);
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.16;
  text-wrap: balance;
}

.home-showcase__hero-main p {
  margin: 0 0 0.95rem;
  color: #334155;
  line-height: 1.68;
  max-width: 62ch;
}

.home-showcase__hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0 0 0.95rem;
}

.home-showcase__chip {
  border: 1px solid #dbe3ed;
  background: rgba(255, 255, 255, 0.86);
  color: #334155;
  border-radius: 999px;
  padding: 0.26rem 0.62rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.home-showcase__cta-row {
  align-items: center;
}

.home-showcase__cta {
  min-height: 2.9rem;
  border-radius: 12px;
  padding-inline: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.home-showcase__cta--primary {
  box-shadow: 0 12px 24px rgba(31, 74, 127, 0.24);
}

.home-showcase__cta--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(31, 74, 127, 0.28);
}

.home-showcase__cta--secondary {
  border-color: #bfcddd;
  background: rgba(255, 255, 255, 0.95);
}

.home-showcase__cta--secondary:hover {
  border-color: #95abc2;
  background: #ffffff;
}

.home-showcase__hero-stats {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-showcase__value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.home-landing-hero {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.home-landing-hero__content {
  border: 1px solid #dbe3ed;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 1.25rem;
}

.home-landing-hero__content h1 {
  margin: 0.35rem 0 0.65rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.01em;
  color: #0f172a;
}

.home-landing-hero__content p {
  color: #334155;
  margin-bottom: 0.95rem;
  line-height: 1.6;
}

.home-landing-hero__stats {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.home-benefit-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  padding: 1rem;
}

.home-benefit-card h3 {
  margin: 0;
  font-size: 1.02rem;
  color: #0f172a;
}

.home-benefit-card p {
  margin: 0.45rem 0 0;
  color: #64748b;
}

.top-instructors-strip {
  padding-bottom: 0.4rem;
}

.top-instructors-strip__viewport {
  direction: ltr;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.top-instructors-strip__viewport--static {
  overflow: hidden;
}

.top-instructors-strip__track {
  display: flex;
  gap: 1rem;
  align-items: stretch;
}

.top-instructors-strip__cell {
  flex: 0 0 100%;
  max-width: 100%;
  min-width: 0;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

@media (min-width: 640px) {
  .top-instructors-strip__cell {
    flex-basis: calc((100% - 1rem) / 2);
    max-width: calc((100% - 1rem) / 2);
  }
}

@media (min-width: 992px) {
  .top-instructors-strip__cell {
    flex-basis: calc((100% - 2rem) / 3);
    max-width: calc((100% - 2rem) / 3);
  }
}

.top-instructors-strip__cell--full {
  flex-basis: 100%;
  max-width: 100%;
}

.top-instructors-strip__cell .top-instructor-card {
  height: 100%;
}

.top-instructors-strip__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.95rem;
  gap: 0.6rem;
}

.top-instructors-strip__controls.is-hidden {
  display: none;
}

.top-instructors-strip__pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.top-instructors-strip__pagination:empty {
  display: none;
}

.top-instructors-strip__pagination button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: #cbd5e1;
  cursor: pointer;
  transition: width 0.2s ease, background 0.2s ease;
}

.top-instructors-strip__pagination button.is-active {
  width: 22px;
  background: #1f4a7f;
}

.top-instructors-strip__pagination button:focus-visible {
  outline: 2px solid #7aa2cf;
  outline-offset: 2px;
}

.top-instructors-strip__nav {
  border: 1px solid #dbe3ed;
  background: #ffffff;
  color: #0f172a;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  line-height: 1;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
}

.top-instructors-strip__nav:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.top-instructors-strip__nav:focus-visible {
  outline: 2px solid #7aa2cf;
  outline-offset: 2px;
}

/* Admin catalog: compact instructor cards inside horizontal strip */
.admin-instructors-catalog-slider .top-instructor-card__avatar {
  height: 160px;
}

.admin-instructors-catalog-slider .top-instructor-card__bio {
  min-height: 0;
}


.js-tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
}

.js-tilt-card > * {
  transform: translateZ(14px);
}

[data-aos] {
  will-change: transform, opacity;
}

/* Safe batch polish: public pages in main container */
.site-main .alert {
  border-radius: 12px;
}

.site-main .table-responsive {
  border: 1px solid #e2e8f0;
  background: #ffffff;
}

.site-main .card-title {
  letter-spacing: -0.005em;
}

.site-main .card-text {
  line-height: 1.55;
}

/* Batch-3 polish: public catalog + details */
.catalog-page-title {
  letter-spacing: -0.01em;
  color: #0f172a;
}

.catalog-grid .catalog-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.catalog-grid .catalog-card__image {
  object-fit: cover;
  max-height: 220px;
}

.catalog-grid .catalog-card__image--book {
  max-height: 240px;
}

.details-page-shell {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  padding: clamp(1rem, 2.4vw, 1.4rem);
}

/* Framework UI primitives for scalable modules */
.ui-section-head,
.instructors-index-head,
.courses-index-head,
.library-index-head,
.community-index-head {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.ui-card-spotlight,
.instructor-catalog-card,
.course-catalog-card,
.library-catalog-card,
.community-catalog-card {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.ui-text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ui-text-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ui-detail-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.ui-chip-list,
.community-details__chips,
.course-details-page__chips,
.library-details-page__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ui-chip,
.community-details__chip,
.course-details-page__chip,
.library-details-page__chip {
  border: 1px solid #dbe3ed;
  background: #f8fafc;
  border-radius: 999px;
  color: #334155;
  padding: 0.22rem 0.58rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.ui-cta-pill {
  border-radius: 10px;
}

.ui-doc-page {
  gap: 1rem;
}

.ui-doc-section h2 {
  letter-spacing: -0.01em;
}

.ui-doc-code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font-size: 0.84rem;
  line-height: 1.5;
  overflow: auto;
}

.ui-doc-hero-demo {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.85rem;
  background: #fff;
}

.ui-doc-media {
  min-height: 120px;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  color: #64748b;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.ui-doc-checklist {
  margin: 0;
  padding-left: 1rem;
  color: #334155;
}

.ui-doc-checklist li + li {
  margin-top: 0.38rem;
}

.instructors-index-head {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.instructor-catalog-card {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.instructor-catalog-card__title {
  font-weight: 600;
}

.instructor-catalog-card__bio {
  min-height: 3.2rem;
  line-height: 1.55;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.instructor-catalog-card__cta {
  border-radius: 10px;
}

.courses-index-head {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.course-catalog-card {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.course-catalog-card__summary {
  min-height: 3.6rem;
  line-height: 1.55;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-catalog-card__meta {
  font-size: 0.88rem;
}

.course-catalog-card__cta {
  border-radius: 10px;
}

.library-index-head {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.library-catalog-card {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.library-catalog-card__author {
  font-weight: 600;
}

.library-catalog-card__summary {
  min-height: 3.8rem;
  line-height: 1.58;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.library-catalog-card__cta,
.library-catalog-card__subcta {
  border-radius: 10px;
}

.community-index-head {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.community-catalog-card {
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
}

.community-catalog-card__summary {
  min-height: 3.6rem;
  line-height: 1.58;
  color: #475569;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.community-catalog-card__meta {
  font-size: 0.86rem;
}

.community-catalog-card__cta {
  border-radius: 10px;
}

.instructor-details__hero {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.instructor-details__avatar {
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid #dbe3ed;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.instructor-details__title {
  font-weight: 600;
}

.instructor-details__bio {
  margin-bottom: 0.65rem;
  color: #334155;
  line-height: 1.65;
}

.instructor-details__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.instructor-details__skills .badge {
  border-radius: 999px;
  font-weight: 500;
}

.instructor-details__courses {
  display: grid;
  gap: 0.55rem;
}

.instructor-details__course-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.community-details__hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.community-details__meta {
  font-weight: 600;
}

.community-details__description {
  color: #334155;
  line-height: 1.65;
  margin-bottom: 0.65rem;
}

.community-details__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.community-details__chip {
  border: 1px solid #dbe3ed;
  background: #f8fafc;
  border-radius: 999px;
  color: #334155;
  padding: 0.22rem 0.58rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.community-details__cta {
  min-width: 10.5rem;
}

.community-details__image {
  width: 100%;
  max-height: 420px;
  object-fit: cover;
  border: 1px solid #dbe3ed;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

#home-stats {
  max-width: 1180px;
}

.home-network-section {
  border: 1px solid #dbe3ed;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  padding: 1.15rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
}

.home-network-section__title {
  margin: 0;
  font-size: 1.4rem;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.home-network-section__lead {
  margin: 0.55rem 0 0.9rem;
  color: #334155;
  line-height: 1.6;
}

.home-network-pillars {
  display: grid;
  gap: 0.65rem;
}

.home-network-pillars__item {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.8rem 0.9rem;
}

.home-network-pillars__item h3 {
  margin: 0;
  font-size: 1rem;
  color: #0f172a;
}

.home-network-pillars__item p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

#homeCarousel {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

#homeCarousel .carousel-item img {
  object-fit: cover;
  min-height: 260px;
  max-height: 420px;
}

.course-details-page {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: clamp(1rem, 2.8vw, 1.5rem);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.course-details-page__hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.course-details-page__title,
.library-details-page__title {
  color: #0f172a;
  letter-spacing: -0.01em;
}

.course-details-page__meta {
  font-size: 0.92rem;
}

.course-details-page__summary {
  color: #334155;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.course-details-page__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.course-details-page__chip {
  border: 1px solid #dbe3ed;
  background: #f8fafc;
  border-radius: 999px;
  color: #334155;
  padding: 0.22rem 0.58rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.course-details-page__image {
  width: 100%;
  max-height: 430px;
  object-fit: cover;
  border: 1px solid #dbe3ed;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.library-details-page__cover {
  border: 1px solid #e2e8f0;
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
}

.library-details-page .lead {
  font-size: 1rem;
  color: #334155;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.library-details-page .btn-lg {
  border-radius: 10px;
  padding: 0.62rem 1.05rem;
}

.library-details-page__author {
  font-weight: 600;
}

.library-details-page__summary {
  max-width: 68ch;
}

.library-details-page__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.library-details-page__chip {
  border: 1px solid #dbe3ed;
  background: #f8fafc;
  border-radius: 999px;
  color: #334155;
  padding: 0.22rem 0.58rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.library-details-page__cta {
  min-width: 10.5rem;
}

.home-network-lead {
  max-width: 900px;
}

.home-library-lead {
  max-width: 720px;
}

.home-library-book-cover {
  object-fit: cover;
  max-height: 220px;
}

@media (min-width: 1400px) {
  :root {
    --zkh-content-max: 1320px;
  }

  .home-layout {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 26px;
  }

  .home-content .display-4 {
    font-size: 3rem;
  }

  #homeCarousel .carousel-item img {
    min-height: 320px;
    max-height: 500px;
  }

  .course-details-page {
    padding: 1.75rem;
  }
}

@media (max-width: 991.98px) {
  .course-details-page,
  .library-details-page {
    border-radius: 12px;
  }

  .course-details-page__title,
  .library-details-page__title {
    font-size: 1.45rem;
  }

  .library-details-page .btn-lg {
    width: 100%;
  }
}

@media (max-width: 767.98px) {
  :root {
    --zkh-radius-lg: 14px;
  }

  .site-main {
    padding-top: 16px;
    padding-bottom: 16px;
  }

  .home-content .container {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }

  .home-content .display-4 {
    font-size: 1.8rem;
    line-height: 1.25;
  }

  #homeCarousel .carousel-item img {
    min-height: 200px;
    max-height: 280px;
  }

  .home-content .card {
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  }

  .top-instructor-card__avatar {
    height: 210px;
  }

  .top-instructor-card__bio,
  .top-instructor-card__skills {
    min-height: 0;
  }

  .home-network-section {
    grid-template-columns: 1fr;
  }

  .home-landing-hero {
    grid-template-columns: 1fr;
  }

  .home-landing-hero__stats {
    grid-template-columns: 1fr 1fr;
  }

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

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

  .home-showcase__hero-stats {
    grid-template-columns: 1fr 1fr;
  }

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

  .ui-detail-hero,
  .course-details-page__hero,
  .community-details__hero,
  .instructor-details__hero {
    grid-template-columns: 1fr;
  }

  .instructor-details__avatar {
    max-width: 180px;
  }

  .course-details-page {
    padding: 1rem;
  }

  .course-details-page__title,
  .library-details-page__title {
    font-size: 1.3rem;
  }

  .course-details-page__meta {
    font-size: 0.86rem;
  }

  .course-details-page__image,
  .library-details-page__cover {
    max-height: 320px !important;
  }

  .home-network-lead,
  .home-library-lead {
    max-width: 100%;
  }

  .home-library-book-cover {
    max-height: 200px;
  }
}

@media (max-width: 575.98px) {
  html {
    font-size: 15px;
  }

  .site-main {
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .home-sidebar {
    border-radius: 10px;
  }

  .home-sidebar a {
    font-size: 0.86rem;
  }

  .home-content .display-4 {
    font-size: 1.55rem;
  }

  #homeCarousel .carousel-caption {
    display: none !important;
  }

  .library-details-page .btn-lg,
  .course-details-page .btn,
  .home-content .btn-lg {
    width: 100%;
  }

  .site-main .btn {
    min-height: 2.75rem;
  }

  .site-brand-mark {
    width: 1.7rem;
    height: 1.7rem;
  }

  .site-brand-text {
    font-size: 0.98rem;
  }

  .home-showcase__hero-chips {
    gap: 0.35rem;
  }

  .home-showcase__chip {
    font-size: 0.74rem;
    padding: 0.2rem 0.52rem;
  }

  .home-showcase__cta {
    width: 100%;
  }

  .pager-smart__list {
    gap: 0.25rem;
  }

  .pager-smart .page-item .page-link {
    min-width: 2.2rem;
    min-height: 2.2rem;
    padding: 0.35rem 0.55rem;
    border-radius: 9px;
  }

  .pager-smart__ellipsis .page-link {
    min-width: 1.9rem;
    padding-inline: 0.3rem;
  }

  .pager-smart__text {
    display: none;
  }

  .pager-smart__icon {
    font-size: 1.05rem;
  }
}

@media (max-width: 359.98px) {
  .home-content .display-4 {
    font-size: 1.35rem;
  }

  .home-sidebar a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-content .card {
    transition: none;
  }

  .home-content .card:hover {
    transform: none;
  }

  .pager-smart .page-item .page-link {
    transition: none;
  }

  .pager-smart .page-item .page-link:hover {
    transform: none;
  }
}

.form-page-shell {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
  padding: clamp(1rem, 2.5vw, 1.5rem);
  position: relative;
  overflow: hidden;
}

.form-page-shell::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5 0%, #06b6d4 100%);
  opacity: 0.75;
}

.form-page-shell__title {
  letter-spacing: -0.01em;
  color: #0f172a;
  font-weight: 700;
}

.form-page-shell .form-label {
  color: #334155;
  font-weight: 600;
  margin-bottom: 0.42rem;
}

.form-page-shell .form-control,
.form-page-shell .form-select {
  border-radius: 10px;
  border-color: #cbd5e1;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-page-shell .form-control:focus,
.form-page-shell .form-select:focus {
  border-color: #818cf8;
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.16);
}

.form-page-shell .form-text {
  color: #64748b;
}

.form-page-shell .text-danger {
  font-size: 0.87rem;
}

.form-page-shell .btn {
  border-radius: 10px;
  min-height: 2.55rem;
  padding-inline: 0.9rem;
}

.form-page-shell .btn-primary {
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.22);
}

.form-page-shell .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.26);
}

.form-page-shell .btn-secondary,
.form-page-shell .btn-outline-secondary {
  border-color: #cbd5e1;
}

.form-page-shell .btn-secondary:hover,
.form-page-shell .btn-outline-secondary:hover {
  border-color: #94a3b8;
}

@media (max-width: 575.98px) {
  .form-page-shell .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .form-page-shell .form-control,
  .form-page-shell .form-select,
  .form-page-shell .btn {
    transition: none;
  }

  .form-page-shell .btn-primary:hover {
    transform: none;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }

  .js-tilt-card,
  .js-tilt-card > * {
    transform: none !important;
  }
}