/* Wird dashboard home — ARIES-style layout, brand green #1A843A */

*,
*::before,
*::after {
  box-sizing: border-box;
}

.wd-body {
  margin: 0;
  font-family: "Cairo", system-ui, sans-serif;
  background: #f4f5f7;
  color: #1a1f1c;
  font-size: 14px;
  line-height: 1.5;
}

.wd-app {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 100vh;
}

/* ── Sidebar ── */
.wd-sidebar-toggle {
  display: none;
  position: fixed;
  top: 12px;
  inset-inline-start: 12px;
  z-index: 120;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: #fff;
  color: #1a1f1c;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
}

.wd-sidebar-toggle i {
  font-size: 1.25rem;
  line-height: 1;
}

.wd-quran-tools-toggle {
  display: none;
  position: fixed;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 120;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: #fff;
  color: #1a1f1c;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
  cursor: pointer;
  padding: 0;
  pointer-events: auto;
}

.wd-quran-tools-toggle i {
  font-size: 1.15rem;
  line-height: 1;
}

body.wd-quran-tools-open {
  overflow: hidden;
}

.wd-quran-tools-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 114;
  background: rgba(15, 23, 42, 0.35);
}

.wd-quran-tools-backdrop.is-visible {
  display: block;
}

.wd-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 108;
  background: rgba(15, 23, 42, 0.35);
}

.wd-sidebar-overlay.hidden,
.wd-sidebar-overlay:not(.is-visible) {
  display: none;
}

body.wd-sidebar-open {
  overflow: hidden;
}

.wd-sidebar {
  background: #fff;
  border-inline-end: 1px solid #eceef2;
  display: flex;
  flex-direction: column;
  padding: 14px 10px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  width: max-content;
  min-width: 192px;
  max-width: min(268px, 88vw);
  overflow-y: auto;
  z-index: 20;
  font-family: "Cairo", system-ui, sans-serif;
}

.wd-sidebar-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-bottom: 8px;
}

.wd-sidebar-close {
  display: none;
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #eceef2;
  border-radius: 8px;
  background: #fff;
  color: #5f6761;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.wd-sidebar-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-inline: 2px;
}

.wd-sidebar-mobile-brand__logo {
  display: flex;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}

.wd-sidebar-mobile-brand__logo img {
  width: clamp(30px, 9vw, 36px);
  height: clamp(30px, 9vw, 36px);
  object-fit: contain;
  border-radius: 8px;
}

.wd-sidebar-mobile-brand__text {
  min-width: 0;
  flex: 1;
}

.wd-sidebar-mobile-brand__title {
  margin: 0;
  font-size: clamp(0.8125rem, 3.6vw, 0.9375rem);
  font-weight: 700;
  line-height: 1.35;
  color: #1a1f1c;
}

@media (min-width: 901px) {
  .wd-sidebar-head {
    display: none;
  }
}

.wd-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  text-decoration: none;
  color: #1a1f1c;
  font-weight: 700;
  font-size: 1.125rem;
}

.wd-brand--logo-only {
  justify-content: center;
  margin-inline: auto;
  padding: 2px 4px;
}

.wd-brand img {
  border-radius: 10px;
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.wd-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

@media (min-width: 901px) {
  .wd-sidebar .wd-nav {
    padding-top: 0;
  }
}

.wd-nav a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  color: #5f6761;
  text-decoration: none;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.wd-nav a i {
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
}

.wd-nav a:hover {
  background: #f4f5f7;
  color: #1a1f1c;
}

.wd-nav a.is-active {
  background: #e3f3e8;
  color: #1A843A;
  font-weight: 600;
  border: 1px solid rgba(26, 132, 58, 0.18);
}

.wd-nav a.is-active i {
  color: #1A843A;
}

.wd-sidebar-foot {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid #eceef2;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wd-sidebar-foot > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: #5f6761;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  white-space: nowrap;
}

.wd-sidebar-foot > a:hover {
  background: #f4f5f7;
}

.wd-sidebar-lang {
  width: 100%;
}

.wd-sidebar-foot .wd-sidebar-lang {
  margin-top: 0;
}

.wd-sidebar-foot .wd-sidebar-lang .wird-lang-button {
  padding: 8px 10px;
}

.wd-sidebar-lang .wird-language-switcher {
  display: block;
  width: 100%;
  min-width: 0;
}

.wd-sidebar-lang .wird-lang-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 0;
  height: auto;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #5f6761;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.wd-sidebar-lang .wird-lang-button:hover {
  background: #f4f5f7;
  color: #1a1f1c;
  border-color: transparent;
}

.wd-sidebar-lang .wird-lang-button i {
  color: inherit;
  font-size: 1.05rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.wd-sidebar-lang .wird-lang-button .bi-chevron-down {
  width: auto;
  font-size: 0.7rem;
  opacity: 0.65;
}

.wd-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-top: 8px;
  border-radius: 12px;
  background: #f8f9fb;
}

.wd-user-link {
  text-decoration: none;
  color: inherit;
}

.wd-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1A843A;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.wd-user strong {
  display: block;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
}

.wd-user small {
  color: #8b938d;
  font-size: 0.75rem;
}

.wd-user--name-only {
  justify-content: center;
}

.wd-user--account {
  justify-content: flex-start;
  background: #f8faf9;
  border: 1px solid #eceef2;
}

.wd-user--account .wd-user-avatar {
  background: transparent;
  color: #1A843A;
  font-size: 1.65rem;
  width: auto;
  height: auto;
}

.wd-user--account .wd-user-meta {
  min-width: 0;
}

.wd-user--name-only strong {
  text-align: center;
  width: 100%;
  word-break: break-word;
}

.wd-sidebar-login-hidden {
  display: block;
  width: 100%;
  min-height: 36px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  text-decoration: none;
  background: transparent;
  cursor: pointer;
}

.wd-sidebar-login-hidden span {
  display: block;
  width: 10px;
  height: 10px;
  margin-inline: auto;
  border-radius: 50%;
  background: transparent;
}

.wd-sidebar-login-hidden:focus-visible {
  outline: 2px solid rgba(26, 132, 58, 0.45);
  outline-offset: 2px;
}

/* ── Main ── */
.wd-main {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  background: #fff;
  border-bottom: 1px solid #eceef2;
}

.wd-search {
  flex: 1;
  max-width: 420px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 42px;
  background: #f4f5f7;
  border-radius: 999px;
  border: 1px solid transparent;
}

.wd-search:focus-within {
  border-color: rgba(26, 132, 58, 0.3);
  background: #fff;
}

.wd-search i {
  color: #8b938d;
}

.wd-search input {
  flex: 1;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  outline: none;
  color: #1a1f1c;
}

.wd-home-search .wd-search-action-btn {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  background: #1a843a;
  color: #fff;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 16px;
  min-height: 34px;
  cursor: pointer;
  box-shadow: none;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.wd-home-search .wd-search-action-btn:hover {
  background: #157032;
}

.wd-home-search .wd-search-action-btn:focus-visible {
  outline: 2px solid rgba(26, 132, 58, 0.35);
  outline-offset: 2px;
}

.wd-home-search {
  gap: 8px;
  padding: 4px 4px 4px 16px;
  height: auto;
  min-height: 42px;
}

.wd-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wd-topbar-actions .wird-language-switcher {
  min-width: 0;
  width: auto;
}

.wd-topbar-actions .wird-lang-button {
  min-height: 38px;
  height: 38px;
  min-width: 132px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid #eceef2;
  background: #fff;
  color: #1a1f1c;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: none;
}

.wd-topbar-actions .wird-lang-button:hover {
  background: #eef7f1;
  color: #146830;
  border-color: rgba(26, 132, 58, 0.22);
}

.wd-topbar-dashboard {
  flex-wrap: wrap;
}

.wd-btn-main-site {
  background: #fff;
  border: 1px solid #eceef2;
  color: #1A843A;
}

.wd-btn-main-site:hover {
  background: #eef7f1;
  color: #146830;
}

.wd-dashboard-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  color: #1a1f1c;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.wd-dashboard-brand img {
  border-radius: 10px;
  width: 42px;
  height: 42px;
  object-fit: contain;
  flex-shrink: 0;
}

.wd-topbar-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1A843A;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
}

.wd-logout-form {
  margin: 0;
  padding: 0;
  display: inline-flex;
}

.wd-body-dashboard .wd-content {
  padding-bottom: 24px;
}

.wd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 10px;
  border: none;
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.wd-btn-green {
  background: #1A843A;
  color: #fff;
}

.wd-btn-green:hover {
  background: #146830;
  color: #fff;
}

.wd-btn-sm {
  min-height: 34px;
  padding: 0 14px;
  font-size: 0.75rem;
}

.wd-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid #eceef2;
  background: #fff;
  color: #5f6761;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.wd-icon-btn:hover {
  background: #f4f5f7;
  color: #1A843A;
}

.wd-icon-btn-logout {
  color: #dc2626;
}

.wd-icon-btn-logout:hover {
  background: #fef2f2;
  color: #b91c1c;
  border-color: rgba(220, 38, 38, 0.25);
}

.wd-dot {
  position: absolute;
  top: 8px;
  inset-inline-end: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ef4444;
}

.wd-content {
  padding: 24px 28px 40px;
  flex: 1;
}

.wd-page-head {
  margin-bottom: 24px;
}

.wd-page-head h1 {
  margin: 0 0 4px;
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wd-page-head p {
  margin: 0;
  color: #8b938d;
  font-size: 0.875rem;
}

/* Stats + chart grid */
.wd-grid-top {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.wd-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wd-stat {
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 16px;
  padding: 16px 18px;
}

.wd-stat-top {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8b938d;
  font-size: 0.75rem;
  margin-bottom: 8px;
}

.wd-stat-top i {
  color: #1A843A;
}

.wd-stat strong {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 4px;
}

.wd-stat small {
  font-size: 0.75rem;
  font-weight: 600;
}

.wd-stat small.is-up {
  color: #1A843A;
}

.wd-stat small.is-muted {
  color: #8b938d;
  font-weight: 500;
}

.wd-chart-card {
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 16px;
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
}

.wd-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.wd-chart-head h2 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

.wd-pill {
  padding: 4px 10px;
  border-radius: 999px;
  background: #f4f5f7;
  color: #5f6761;
  font-size: 0.75rem;
  font-weight: 500;
}

.wd-chart {
  width: 100%;
  height: 160px;
  display: block;
}

.wd-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: #b0b6b1;
  font-size: 0.6875rem;
}

/* Newsletter */
.wd-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 20px;
}

.wd-newsletter h2 {
  margin: 0 0 4px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.wd-newsletter p {
  margin: 0;
  color: #8b938d;
  font-size: 0.8125rem;
}

.wd-newsletter form {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
  max-width: 420px;
}

.wd-newsletter input {
  flex: 1;
  min-width: 0;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #eceef2;
  border-radius: 10px;
  font: inherit;
  font-size: 0.8125rem;
}

.wd-newsletter input:focus {
  outline: none;
  border-color: rgba(26, 132, 58, 0.4);
}

/* Table */
.wd-table-section h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
}

.wd-table {
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 16px;
  overflow: hidden;
}

.wd-table-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) minmax(120px, 1fr) minmax(100px, 0.8fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-bottom: 1px solid #f0f1f4;
}

.wd-table-row:last-child {
  border-bottom: none;
}

.wd-table-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.wd-table-user img,
.wd-table-fallback {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.wd-table-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef7f1;
  color: #1A843A;
}

.wd-table-user strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wd-table-user small {
  color: #8b938d;
  font-size: 0.75rem;
}

.wd-table-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5f6761;
  font-size: 0.8125rem;
  min-width: 0;
}

.wd-table-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wd-table-date {
  color: #8b938d;
  font-size: 0.75rem;
}

.wd-table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.wd-empty {
  padding: 24px 20px;
  color: #8b938d;
  margin: 0;
}

.wd-toast-host {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
}

.wd-toast {
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  font-size: 0.875rem;
}

@media (max-width: 900px) {
  .wd-app {
    grid-template-columns: 1fr;
  }

  .wd-sidebar-toggle {
    display: inline-flex;
  }

  .wd-sidebar-close {
    display: inline-flex;
    position: static;
    transform: none;
    align-self: flex-end;
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }

  .wd-sidebar-head {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    min-height: 0;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eceef2;
  }

  .wd-sidebar-mobile-brand {
    display: flex;
  }

  body.wd-sidebar-open .wd-sidebar-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .wd-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    inset-inline-start: 0;
    height: auto;
    z-index: 110;
    transform: translateX(-108%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
  }

  html[dir="rtl"] .wd-sidebar:not(.is-open) {
    transform: translateX(108%);
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.12);
  }

  .wd-sidebar.is-open {
    transform: translateX(0) !important;
    box-shadow: 4px 0 24px rgba(15, 23, 42, 0.12);
  }

  html[dir="rtl"] .wd-sidebar.is-open {
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.12);
  }

  .wd-sidebar-overlay.is-visible {
    display: block;
  }

  .wd-body:not(.wd-body-quran) .wd-topbar {
    padding-inline-start: 60px;
  }

  .wd-body-quran .wd-quran-tools-top {
    padding-inline-start: 52px;
    padding-inline-end: 52px;
  }

  .wd-body-quran .wd-quran-tools-toggle {
    display: inline-flex;
  }
}

@media (max-width: 1024px) {
  .wd-grid-top {
    grid-template-columns: 1fr;
  }

  .wd-stats {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .wd-stat {
    flex: 1 1 160px;
  }
}

@media (max-width: 768px) {
  .wd-topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
    padding-inline-start: 60px;
  }

  .wd-search {
    max-width: none;
  }

  .wd-content {
    padding: 16px;
  }

  .wd-newsletter {
    flex-direction: column;
    align-items: stretch;
  }

  .wd-newsletter form {
    max-width: none;
    flex-direction: column;
  }

  .wd-table-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .wd-table-actions {
    justify-content: flex-start;
  }
}

/* ── Quran reading page ── */
.wd-body-quran {
  overflow: hidden;
  background: #fff;
}

.wd-main-quran {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow: hidden;
  background: #fff;
}

.wd-content-quran {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0;
  padding-top: 10px;
  box-sizing: border-box;
  background: #fff;
}

.wd-quran-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border: none;
  border-radius: 0;
  overflow: hidden;
}

.wd-quran-tools-top {
  flex-shrink: 0;
  border-bottom: none;
  background: #fff;
  padding: 5px 10px 8px;
  margin-bottom: 12px;
  position: relative;
  z-index: 20;
}

.wd-quran-tools-nav {
  display: flex;
  justify-content: center;
  width: 100%;
}

.wd-quran-tools-nav #quranTopToolbar,
.wd-quran-tools-nav #tafsirTopToolbar {
  max-width: none !important;
  margin: 0 !important;
  width: 100%;
  align-items: center;
  --quran-toolbar-item-h: 2rem;
  --quran-toolbar-font-size: 0.85rem;
  --quran-toolbar-font-weight: 600;
  --quran-toolbar-text-color: #1f2937;
}

.wd-quran-tools-nav #tafsirTopToolbar .quran-sel-trigger,
.wd-quran-tools-nav #tafsirTopToolbar #tafsirReadingModeToggle,
.wd-quran-tools-nav #tafsirTopToolbar .quran-tool-chip {
  height: var(--quran-toolbar-item-h);
  min-height: var(--quran-toolbar-item-h);
  max-height: var(--quran-toolbar-item-h);
  box-sizing: border-box;
  font-size: var(--quran-toolbar-font-size);
  font-weight: var(--quran-toolbar-font-weight);
  color: var(--quran-toolbar-text-color) !important;
  padding: 0 0.65rem;
  gap: 0.4rem;
  line-height: 1.35;
}

.wd-quran-tools-nav #tafsirTopToolbar .quran-toolbar-main {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.wd-quran-tools-nav #tafsirTopToolbar .wd-tafsir-toolbar-search {
  height: 38px;
  min-height: 38px;
  max-height: 38px;
}

.wd-quran-tools-nav #tafsirTopToolbar #tafsirReadingModeToggle .quran-switch-track {
  width: 1.75rem;
  height: 1rem;
}

.wd-quran-tools-nav #tafsirTopToolbar #tafsirReadingModeToggle .quran-switch-knob {
  width: 0.75rem;
  height: 0.75rem;
}

.quran-top-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 8px;
  width: 100%;
}

.quran-toolbar-edge {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.quran-toolbar-edge-start {
  grid-column: 1;
  justify-self: start;
  justify-content: flex-start;
}

.quran-toolbar-edge-end {
  grid-column: 3;
  justify-self: end;
  justify-content: flex-end;
}

.quran-toolbar-main {
  grid-column: 2;
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px;
  max-width: 100%;
}

.wd-quran-tools-nav #quranTopToolbar .quran-sel-trigger,
.wd-quran-tools-nav #quranTopToolbar #readingModeToggle,
.wd-quran-tools-nav #quranTopToolbar .quran-tool-toggle,
.wd-quran-tools-nav #quranTopToolbar .quran-tool-chip {
  height: var(--quran-toolbar-item-h);
  min-height: var(--quran-toolbar-item-h);
  max-height: var(--quran-toolbar-item-h);
  box-sizing: border-box;
  font-size: var(--quran-toolbar-font-size);
  font-weight: var(--quran-toolbar-font-weight);
  color: var(--quran-toolbar-text-color) !important;
  padding: 0 0.75rem;
  gap: 0.55rem;
  line-height: 1.35;
}

.wd-quran-tools-nav #quranTopToolbar .quran-sel-trigger > i:not(.quran-sel-trigger-icon),
.wd-quran-tools-nav #quranTopToolbar .quran-sel-trigger .quran-sel-trigger-leading-icon {
  font-size: 0.78rem !important;
  color: #6b7280 !important;
}

.wd-quran-tools-nav #quranTopToolbar .quran-sel-trigger-icon {
  font-size: 0.7rem;
}

.wd-quran-tools-nav #quranTopToolbar #quranQariTrigger {
  min-width: 0 !important;
  max-width: none !important;
}

.wd-quran-tools-nav #quranTopToolbar #quranQariTriggerAvatar,
.wd-quran-tools-nav #quranTopToolbar .quran-qari-trigger-avatar {
  width: 1.25rem;
  height: 1.25rem;
}

.quran-badge-chip {
  display: inline-flex;
  align-items: center;
  color: #fff;
  border-radius: 9999px;
}

.wd-quran-tools-nav #readingModeToggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid #eceef2;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  color: #5f6761;
  white-space: nowrap;
}

.wd-quran-tools-nav #readingModeToggle .quran-switch-track {
  width: 26px;
  height: 14px;
}

.wd-quran-tools-nav #readingModeToggle .quran-switch-knob {
  width: 10px;
  height: 10px;
}

.wd-quran-tools-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 8px;
}

.wd-quran-tools-panels {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.wd-quran-info-panel {
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 10px;
  overflow: hidden;
}

.wd-quran-info-panel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: #f8f9fb;
  border-bottom: 1px solid #eceef2;
  font-size: 0.75rem;
  font-weight: 700;
  color: #374151;
}

.wd-quran-info-panel-head i {
  color: #1A843A;
}

.wd-quran-info-panel-body {
  max-height: 88px;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 0.8125rem;
  line-height: 1.6;
  color: #374151;
}


.wd-body-quran #wordPanel,
.wd-body-quran #quranThematicPanel {
  display: block !important;
}

.wd-body-quran #wordPanel.hidden,
.wd-body-quran #quranThematicPanel.hidden {
  display: none !important;
}

@media (min-width: 1201px) {
  .wd-body-quran #quranPlaybackFeatureToggles,
  .wd-body-quran #wordMeaningsCard,
  .wd-body-quran #quranThematicCard {
    display: flex !important;
  }
}

.wd-quran-tools-nav .quran-tool-toggle-wrap {
  display: inline-flex;
  flex-shrink: 0;
}

.wd-quran-tools-nav .quran-tool-toggle {
  border-radius: 9999px;
  white-space: nowrap;
}

.wd-quran-tools-nav .quran-tool-toggle input[type="checkbox"] {
  width: 0.9rem;
  height: 0.9rem;
}

#quranToolsSecondary {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

/* مشغّل فوق المصحف — لا يُقيّد عرض الكتاب (page-flip يحتاج عرضاً كافياً لصفحتين) */
#mushafArea .mushaf-stage {
  position: relative;
  width: 100%;
}

#mushafArea #mushafPlaybackOverlay.mushaf-playback-overlay {
  position: absolute !important;
  top: clamp(8px, 3.2%, 26px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  width: min(72%, 420px);
  margin: 0 !important;
  pointer-events: none;
}

/* الوضع العادي: المشغّل فوق المصحف — الموضع يُضبط عبر JS */
.wd-quran-viewport .wd-quran-playback-dock {
  position: absolute;
  top: auto;
  left: auto;
  right: auto;
  z-index: 20;
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  background: transparent;
  border-bottom: none;
  pointer-events: none;
  width: auto;
}

@media (min-width: 901px) {
  .wd-body-quran
    .wd-quran-viewport:has(.wd-quran-playback-dock:not(:empty))
    #mushafArea:not(.mushaf-fullscreen):not(.reading-mode)
    #mushafFlipContainer {
    margin-top: 0 !important;
  }

  .wd-body-quran
    .wd-quran-viewport:has(.wd-quran-playback-dock:not(:empty))
    #mushafArea:not(.mushaf-fullscreen)
    #mushafZoomWrapper {
    padding-top: 0 !important;
  }

  .wd-body-quran
    .wd-quran-viewport:has(.wd-quran-playback-dock:not(:empty)) {
    padding-top: 10px;
    box-sizing: border-box;
  }
}

.wd-quran-playback-dock {
  flex-shrink: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
  direction: rtl;
  padding: 0;
  background: transparent;
  border-bottom: none;
  pointer-events: none;
}

.wd-quran-playback-dock:empty,
.wd-quran-playback-dock:has(#mushafPlaybackOverlay.hidden),
.wd-quran-layout.reading-mode-active .wd-quran-playback-dock,
.wd-quran-layout:has(#mushafArea.mushaf-fullscreen) .wd-quran-playback-dock {
  display: none;
}

.wd-quran-playback-dock #mushafPlaybackOverlay,
.wd-quran-playback-dock .mushaf-playback-overlay {
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  width: auto;
  max-width: none;
  margin: 0 auto !important;
  pointer-events: none;
  order: -1;
}

.wd-quran-playback-dock .quran-playback-feature-toggles {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  pointer-events: auto;
}

.wd-quran-playback-dock .quran-playback-feature-toggles .quran-tool-toggle {
  height: var(--quran-toolbar-item-h, 2rem);
  min-height: var(--quran-toolbar-item-h, 2rem);
  max-height: var(--quran-toolbar-item-h, 2rem);
  box-sizing: border-box;
  font-size: var(--quran-toolbar-font-size, 0.8125rem);
  font-weight: var(--quran-toolbar-font-weight, 500);
  color: var(--quran-toolbar-text-color, #5f6761) !important;
  padding: 0 0.65rem;
  gap: 0.4rem;
  line-height: 1.35;
  border-radius: 9999px;
  margin: 0;
}

.wd-quran-playback-dock .quran-playback-feature-toggles .quran-tool-toggle input[type="checkbox"] {
  width: 0.9rem;
  height: 0.9rem;
}

.wd-quran-playback-dock .quran-tools-playback,
.wd-quran-playback-dock .wd-quran-float-playback-row {
  pointer-events: auto;
  flex-shrink: 0;
}

.wd-quran-playback-dock .wd-quran-float-playback-row .wd-quran-float-volume {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.wd-quran-float-playback-row .wd-quran-float-btn {
  box-shadow: none;
  border: 1px solid #eceef2;
}

/* أيقونة التكبير — فوق الزاوية اليمنى العليا للمصحf */
.wd-quran-fullscreen-dock {
  position: absolute;
  top: 8px;
  left: auto;
  right: auto;
  z-index: 31;
  pointer-events: none;
}

.wd-quran-viewport:has(#mushafArea.mushaf-fullscreen) .wd-quran-fullscreen-dock,
.wd-quran-viewport:has(#mushafArea.reading-mode) .wd-quran-fullscreen-dock,
.wd-quran-viewport:has(#tafsirArea.tafsir-fullscreen) .wd-quran-fullscreen-dock,
.wd-quran-viewport:has(#tafsirArea.tafsir-reading-mode) .wd-quran-fullscreen-dock {
  display: none;
}

.wd-quran-fullscreen-dock .quran-mushaf-fullscreen-btn,
.wd-quran-fullscreen-dock .quran-tool-icon-btn,
.wd-quran-float-exit-dock .quran-mushaf-fullscreen-btn {
  pointer-events: auto;
  width: 38px;
  height: 38px;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
}

.wd-quran-fullscreen-dock .quran-mushaf-fullscreen-btn i,
.wd-quran-float-exit-dock .quran-mushaf-fullscreen-btn i {
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  .wd-quran-viewport {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    align-content: start;
  }

  .wd-quran-viewport .wd-quran-playback-dock:not(:empty) {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: auto !important;
    transform: none !important;
    grid-row: 1;
    grid-column: 1;
    display: flex !important;
    justify-content: center;
    margin: 8px auto 6px;
    z-index: 20;
    pointer-events: none;
  }

  .wd-quran-viewport .wd-quran-playback-dock:empty,
  .wd-quran-viewport .wd-quran-playback-dock:has(#mushafPlaybackOverlay.hidden) {
    display: none !important;
    margin: 0;
  }

  .wd-quran-viewport .wd-quran-center {
    grid-row: 2;
    grid-column: 1;
    width: 100%;
    min-width: 0;
  }

  .wd-quran-viewport .wd-quran-fullscreen-dock {
    display: none !important;
  }

  .wd-body-quran #readingModeToggle,
  .wd-body-quran #tafsirReadingModeToggle,
  .wd-body-quran .quran-toolbar-edge-start {
    display: none !important;
  }

  .wd-body-quran #quranPlaybackFeatureToggles,
  .wd-body-quran #quranThematicCard,
  .wd-body-quran #wordMeaningsCard,
  .wd-body-quran .quran-toolbar-edge-end {
    display: none !important;
  }

  .wd-body-quran .quran-top-toolbar {
    grid-template-columns: 1fr !important;
  }

  .wd-body-quran .quran-toolbar-main {
    grid-column: 1 !important;
    justify-self: center !important;
  }

  .wd-quran-fullscreen-dock .quran-mushaf-fullscreen-btn,
  .wd-quran-fullscreen-dock .quran-tool-icon-btn,
  .wd-quran-float-exit-dock .quran-mushaf-fullscreen-btn {
    width: 42px;
    height: 42px;
    font-size: 0.88rem;
  }

  .wd-quran-fullscreen-dock .quran-mushaf-fullscreen-btn i,
  .wd-quran-float-exit-dock .quran-mushaf-fullscreen-btn i {
    font-size: 1rem;
  }
}

/* أيقونة التصغير — فوق الزاوية اليمنى العليا للمصحf (وضع التكبير) */
.wd-quran-float-exit-dock {
  display: none;
  position: absolute;
  top: 8px;
  left: auto;
  right: auto;
  z-index: 120;
  pointer-events: none;
}

.wd-quran-float-exit-dock.is-visible {
  display: block;
}

/* أدوات التكبير — بجانب الزاوية اليسرى العليا للمصحf (وضع التكبير فقط) */
.wd-quran-floating-controls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
  pointer-events: auto;
}

#mushafArea.mushaf-fullscreen .wd-quran-floating-controls.is-visible {
  display: flex !important;
  position: absolute;
  top: 0;
  right: calc(100% + 28px);
  left: auto;
  inset-inline-end: calc(100% + 28px);
  inset-inline-start: auto;
  z-index: 120;
  gap: 0.65rem;
  margin: 0;
  transform: none;
}

.wd-quran-float-playback-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  background: #fff;
  border-radius: 9999px;
  padding: 4px 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.wd-quran-float-playback-row .wd-quran-float-volume {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}

.wd-quran-playback-dock .wd-quran-float-playback-row,
#mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-playback-row {
  gap: 0.28rem;
  padding: 6px 10px;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.wd-quran-playback-dock .wd-quran-float-playback-row .wd-quran-float-btn,
#mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-playback-row .wd-quran-float-btn {
  width: 26px;
  height: 26px;
}

.wd-quran-playback-dock .wd-quran-float-playback-row .wd-quran-float-btn i,
#mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-playback-row .wd-quran-float-btn i {
  font-size: 0.74rem;
}

.wd-quran-playback-dock .wd-quran-float-playback-row #miniPlayBtn i,
#mushafArea.mushaf-fullscreen #quranFloatingControls #quranFloatPlayBtn i {
  font-size: 0.82rem;
}

.wd-quran-playback-dock .wd-quran-float-playback-row .wd-quran-float-volume-icon,
#mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-volume-icon {
  width: 18px;
  height: 18px;
}

.wd-quran-playback-dock .wd-quran-float-playback-row .wd-quran-float-volume-icon i,
#mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-volume-icon i {
  font-size: 0.55rem;
}

.wd-quran-playback-dock .wd-quran-float-playback-row .mushaf-volume-range,
#mushafArea.mushaf-fullscreen #quranFloatingControls .mushaf-volume-range {
  width: 40px;
}

@media (min-width: 901px) {
  .wd-quran-playback-dock .wd-quran-float-playback-row,
  #mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-playback-row {
    gap: 0.2rem;
    padding: 4px 8px;
    border-radius: 13px;
  }

  .wd-quran-playback-dock .wd-quran-float-playback-row .wd-quran-float-btn,
  #mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-playback-row .wd-quran-float-btn {
    width: 24px;
    height: 24px;
  }

  .wd-quran-playback-dock .wd-quran-float-playback-row .wd-quran-float-btn i,
  #mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-playback-row .wd-quran-float-btn i {
    font-size: 0.68rem;
  }

  .wd-quran-playback-dock .wd-quran-float-playback-row #miniPlayBtn i,
  #mushafArea.mushaf-fullscreen #quranFloatingControls #quranFloatPlayBtn i {
    font-size: 0.76rem;
  }

  .wd-quran-playback-dock .wd-quran-float-playback-row .wd-quran-float-volume-icon,
  #mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-volume-icon {
    width: 17px;
    height: 17px;
  }

  .wd-quran-playback-dock .wd-quran-float-playback-row .wd-quran-float-volume-icon i,
  #mushafArea.mushaf-fullscreen #quranFloatingControls .wd-quran-float-volume-icon i {
    font-size: 0.52rem;
  }

  .wd-quran-playback-dock .wd-quran-float-playback-row .mushaf-volume-range,
  #mushafArea.mushaf-fullscreen #quranFloatingControls .mushaf-volume-range {
    width: 38px;
    height: 3px;
  }
}

#mushafArea:not(.mushaf-fullscreen) .wd-quran-floating-controls {
  display: none !important;
}

.wd-quran-float-btn {
  width: 35px;
  height: 35px;
  border-radius: 9999px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #111827;
}

.wd-quran-float-btn i {
  font-size: 1rem;
  line-height: 1;
}

#quranFloatPlayBtn i {
  font-size: 1.15rem;
}

.wd-quran-float-volume {
  display: flex;
  align-items: center;
  gap: 4px;
}

.wd-quran-float-volume-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid #e5e7eb;
}

.wd-quran-float-volume-icon i {
  font-size: 0.7rem;
  color: #111827;
}

.wd-quran-float-volume .mushaf-volume-range {
  width: 60px;
}

.wd-body-quran #mushafArea:not(.mushaf-fullscreen):not(.reading-mode) #mushafZoomWrapper {
  overflow: visible;
}

.mushaf-playback-overlay {
  position: absolute;
  top: clamp(8px, 3.2%, 26px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  width: min(72%, 420px);
  pointer-events: none;
}

.mushaf-playback-overlay .quran-tools-playback {
  max-width: none;
  width: 100%;
}

.mushaf-playback-overlay .quran-playback-bar {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(4px);
  box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
  border-color: rgba(229, 231, 235, 0.95);
}

#mushafArea.reading-mode .mushaf-playback-overlay,
#mushafArea.mushaf-fullscreen .mushaf-playback-overlay,
#mushafArea.reading-mode #mushafPlaybackOverlay,
#mushafArea.mushaf-fullscreen #mushafPlaybackOverlay {
  display: none !important;
}

.quran-tools-playback {
  width: auto;
  max-width: min(480px, 100%);
}

.quran-playback-bar {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  gap: 5px;
  width: auto;
  max-width: min(480px, 100%);
  padding: 3px 8px;
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 999px;
  margin: 0 auto;
}

.quran-tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid #eceef2;
  border-radius: 999px;
  background: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  color: #374151;
  white-space: nowrap;
  line-height: 1.2;
}

.quran-switch-track {
  width: 32px;
  height: 18px;
  background: #e5e7eb;
  border-radius: 999px;
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.quran-switch-knob {
  position: absolute;
  top: 2px;
  inset-inline-start: 2px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

.quran-tool-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #eceef2;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  color: #374151;
  flex-shrink: 0;
  font-size: 0.62rem;
}

.quran-tool-icon-btn i {
  line-height: 1;
}

.quran-tool-icon-btn.is-dark {
  background: #1a1f1c;
  color: #fff;
  border-color: #1a1f1c;
}

.quran-playback-progress {
  flex: 1 1 48px;
  min-width: 40px;
  max-width: 120px;
  height: 4px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

#miniProgressFill {
  height: 100%;
  width: 0;
  background: #1A843A;
  border-radius: inherit;
  transition: width 0.15s linear;
}

.quran-playback-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.quran-volume-range {
  width: 44px;
  height: 3px;
  accent-color: #1A843A;
}

#quranToolsSecondary [data-switch-track] {
  height: 1rem !important;
  width: 1.65rem !important;
}

#quranToolsSecondary [data-switch-knob] {
  height: 0.7rem !important;
  width: 0.7rem !important;
}

.quran-tools-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.quran-tool-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 10px;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  white-space: nowrap;
  margin: 0;
}

.quran-tool-toggle-wrap {
  position: relative;
}

.quran-tool-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-start: 0;
  min-width: min(320px, 90vw);
  max-width: min(480px, 92vw);
  z-index: 50;
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 10px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.1);
}

.quran-tool-dropdown-body {
  max-height: 140px;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.wd-quran-viewport {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #fff;
}

.wd-quran-center {
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wd-quran-viewport #mushafArea,
.wd-quran-viewport #tafsirArea {
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
}

.wd-body-quran #mushafArea:not(.mushaf-fullscreen) #mushafFlipContainer {
  flex: 0 1 auto;
  width: 100%;
  min-height: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0 !important;
}

.wd-body-quran #mushafArea:not(.mushaf-fullscreen) #mushafZoomWrapper {
  width: 100%;
  max-width: 100%;
  padding-inline: clamp(0.75rem, 2.5vw, 1.75rem) !important;
  padding-block: clamp(0.5rem, 1.5vw, 1.25rem) !important;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wd-body-quran #mushafArea:not(.mushaf-fullscreen) #mushafFlipBook {
  width: 100%;
  max-width: var(--mushaf-max-width);
  max-height: var(--mushaf-max-height);
  margin: 0 auto;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* إطار أبيض طبيعي حول صورة المصحف — كالمطبوع */
.wd-body-quran #mushafArea:not(.mushaf-fullscreen) #mushafFlipBook .page-content > div {
  padding: clamp(1.35rem, 4vw, 2.35rem) !important;
  box-sizing: border-box;
}

.wd-body-quran #mushafArea:not(.mushaf-fullscreen) #mushafFlipBook .page-content > div > div {
  padding: 0 !important;
}

.wd-body-quran #mushafArea:not(.mushaf-fullscreen) #mushafFlipBook .page-content img.mushaf-page-img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 640px) {
  .wd-body-quran #mushafArea:not(.mushaf-fullscreen) #mushafFlipBook .page-content > div {
    padding: clamp(0.85rem, 4.5vw, 1.35rem) !important;
  }
}

.wd-quran-center #mushafModeWrapper:not(.hidden),
.wd-quran-center #tafsirModeWrapper:not(.hidden) {
  flex: 0 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.wd-quran-center #mushafModeWrapper.hidden,
.wd-quran-center #tafsirModeWrapper.hidden {
  display: none !important;
}

.wd-body-quran #mushafArea:not(.mushaf-fullscreen):not(.reading-mode) {
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  padding-inline: 0 !important;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.wd-body-quran #mushafArea:not(.mushaf-fullscreen) #mushafFlipContainer > div {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wd-body-quran #tafsirArea:not(.tafsir-fullscreen) {
  flex: 0 1 auto;
  width: 100%;
  max-width: 100%;
  padding-inline: 0 !important;
  align-items: center;
  justify-content: center;
  overflow: visible;
}

.wd-body-quran #tafsirArea:not(.tafsir-fullscreen) #tafsirFlipContainer {
  flex: 0 1 auto;
  width: 100%;
  min-height: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0 !important;
}

.wd-body-quran #tafsirArea:not(.tafsir-fullscreen) #tafsirZoomWrapper {
  width: 100%;
  max-width: 100%;
  padding-inline: clamp(0.75rem, 2.5vw, 1.75rem) !important;
  padding-block: clamp(0.5rem, 1.5vw, 1.25rem) !important;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0 !important;
}

.wd-body-quran #tafsirArea:not(.tafsir-fullscreen) #tafsirBookFrame {
  width: 100%;
  max-width: var(--mushaf-max-width);
  max-height: var(--mushaf-max-height);
  margin: 0 auto;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.08);
}

.wd-body-quran #tafsirArea:not(.tafsir-fullscreen) #tafsirFlipBook {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.wd-body-quran #tafsirArea:not(.tafsir-fullscreen) .tafsir-page-scroll {
  min-height: 0;
  flex: 1 1 auto;
}

.wd-quran-viewport #tafsirModeWrapper #tafsirArea {
  min-height: 0;
  align-items: center;
}

.wd-quran-viewport #tafsirModeWrapper #tafsirFlipContainer {
  margin-top: 0;
}

.wd-quran-viewport #tafsirModeWrapper #tafsirZoomWrapper {
  max-width: 100% !important;
  margin-top: 0 !important;
}

.wd-quran-layout.reading-mode-active .wd-quran-tools-panels,
.wd-quran-layout.reading-mode-active #quranToolsSecondary {
  display: none !important;
}

.wd-body-quran .wd-quran-tools-top #quranPlaybackToolsPanel {
  display: flex !important;
}

.wd-body-quran .wd-quran-playback-dock #quranPlaybackToolsPanel,
.wd-body-quran #mushafArea #mushafPlaybackOverlay #quranPlaybackToolsPanel {
  display: flex !important;
}

.wd-body-quran .wd-quran-tools-top #quranMobilePlaybackIcons {
  display: none !important;
}

.wd-body-quran #quranPanelBackdrop {
  z-index: 10001;
}

.wd-body-quran.wd-quran-tools-open #quranPanelBackdrop.active {
  z-index: 10001;
}

@media (max-width: 900px) {
  .wd-content-quran {
    padding-top: 8px;
  }

  .wd-quran-tools-top {
    padding: 6px 8px 8px;
    padding-inline-start: 52px;
    padding-inline-end: 52px;
  }

  .wd-body-quran:not(.wd-quran-tools-open) .wd-quran-tools-nav:has(#quranTopToolbar) {
    display: none;
  }

  .wd-body-quran.wd-quran-tools-open .wd-quran-tools-nav:has(#quranTopToolbar) {
    display: block;
    position: fixed;
    top: 58px;
    inset-inline: 8px;
    z-index: 116;
    background: #fff;
    border: 1px solid #eceef2;
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
    padding: 10px 12px 12px;
    max-height: min(72vh, 540px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .wd-body-quran:not(.wd-quran-tools-open) .wd-quran-tools-top:has(#quranMobileToolsToggle) {
    min-height: 52px;
    padding-block: 0;
    padding-bottom: 44px;
    margin-bottom: 0;
    box-sizing: border-box;
  }

  .wd-quran-tools-nav #quranTopToolbar,
  .wd-quran-tools-nav #tafsirTopToolbar {
    justify-content: center !important;
  }

  .wd-body-quran.wd-quran-tools-open .wd-quran-tools-nav #quranTopToolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    justify-content: center !important;
    gap: 0.4rem !important;
    padding-bottom: 0.15rem !important;
  }

  .wd-body-quran.wd-quran-tools-open .quran-toolbar-edge-start,
  .wd-body-quran.wd-quran-tools-open .quran-toolbar-edge-end,
  .wd-body-quran.wd-quran-tools-open .quran-toolbar-main {
    grid-column: auto;
    justify-self: auto;
    width: auto;
  }

  .wd-body-quran.wd-quran-tools-open .quran-sel-panel {
    position: fixed !important;
    top: clamp(9rem, 24vh, 11.5rem) !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 10002 !important;
    max-height: min(52vh, 460px) !important;
    overflow-y: auto !important;
    animation: quranMobileToolsPanelIn 0.18s ease !important;
  }

  @keyframes quranMobileToolsPanelIn {
    from {
      opacity: 0;
      transform: translateX(-50%) translateY(-6px) scale(0.97);
    }
    to {
      opacity: 1;
      transform: translateX(-50%) translateY(0) scale(1);
    }
  }

  .wd-body-quran.wd-quran-tools-open .quran-sel-panel-surah {
    width: min(94vw, 380px) !important;
  }

  .wd-body-quran.wd-quran-tools-open .quran-sel-panel-mushaf,
  .wd-body-quran.wd-quran-tools-open .quran-sel-panel-qari {
    width: min(92vw, 320px) !important;
  }

  .wd-body-quran.wd-quran-tools-open .quran-sel-surah-scroll,
  .wd-body-quran.wd-quran-tools-open .quran-sel-list-scroll {
    max-height: min(40vh, 360px) !important;
  }

  .wd-quran-tools-nav #quranTopToolbar {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }

  .wd-quran-tools-nav #quranTopToolbar::-webkit-scrollbar {
    display: none;
  }

  .quran-playback-bar {
    max-width: min(420px, 100%);
    padding: 3px 6px;
    gap: 4px;
  }

  .quran-volume-range {
    width: 36px;
  }
}

@media (max-width: 640px) {
  #recitationPanelWrapper {
    flex: 1 1 100%;
  }

  .quran-tool-dropdown {
    position: fixed;
    inset-inline: 8px;
    top: auto;
    bottom: 12px;
    max-width: none;
    min-width: 0;
  }
}

@media (max-width: 1024px) {
  .wd-body-quran #mushafArea:not(.mushaf-fullscreen) {
    padding-inline: 0 !important;
  }
}

/* Minimal home page */
.wd-body-home {
  background: #fff;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
}

.wd-body-home .wd-app {
  height: 100%;
  min-height: 0;
}

.wd-body-home .wd-sidebar {
  height: 100dvh;
  max-height: 100dvh;
}

.wd-body-home .wd-main {
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.wd-body-home .wd-content.wd-home-minimal {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  padding: 24px 28px 8px;
  overflow: hidden;
}

.wd-content.wd-home-minimal {
  width: 100%;
  max-width: none;
}

.wd-home-minimal {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Home: no page scroll on larger screens; scroll on phones only */
@media (min-width: 769px) {
  .wd-body-home .wd-content.wd-home-page,
  .wd-body-home-intl .wd-content.wd-home-intl-page {
    overflow-y: hidden;
  }
}

@media (max-width: 768px) {
  .wd-body-home,
  .wd-body-home-intl {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100dvh;
    -webkit-overflow-scrolling: touch;
  }

  .wd-body-home .wd-app,
  .wd-body-home-intl .wd-app {
    height: auto;
    min-height: 100dvh;
  }

  .wd-body-home .wd-main,
  .wd-body-home-intl .wd-main {
    overflow: visible;
    height: auto;
    min-height: 0;
  }

  .wd-body-home .wd-content.wd-home-page,
  .wd-body-home-intl .wd-content.wd-home-intl-page,
  .wd-body-home .wd-content.wd-home-minimal {
    overflow: visible;
    height: auto;
    min-height: 0;
    flex: initial;
  }

  .wd-body-home .wd-home-page.wd-home-minimal,
  .wd-home-minimal {
    overflow: visible;
    min-height: 0;
    flex: initial;
  }

  .wd-body-home-intl .wd-home-intl-inner,
  .wd-body-home .wd-home-inner {
    min-height: 0;
    flex: initial;
  }
}

.wd-home-techniques {
  flex-shrink: 0;
  margin-top: 20px;
  margin-bottom: -20px;
}

.wd-home-techniques + .wd-home-lower {
  margin-top: 24px;
}

.wd-home-lower {
  display: flex;
  flex-direction: column;
  gap: 36px;
  flex: 1;
  min-height: 0;
}

.wd-home-lower > .wd-home-hero-row {
  margin-top: 32px;
  margin-bottom: -32px;
}

.wd-home-hero-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 14px;
  width: 100%;
}

.wd-home-stats .wd-stat,
.wd-home-techniques-grid .wd-home-technique {
  min-height: 90px;
}

.wd-home-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(160px, 220px));
  gap: 14px;
  flex: 0 0 auto;
}

.wd-home-app-card {
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  width: auto;
  min-width: 0;
}

.wd-home-app-card .wd-home-app-dl {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.wd-home-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 14px;
  border: 1px solid #eceef2;
  background: #fff;
  color: #1a1f1c;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.wd-home-app-btn i {
  font-size: 1.875rem;
  line-height: 1;
  color: #1A843A;
}

.wd-home-app-btn:hover {
  border-color: rgba(26, 132, 58, 0.35);
  color: #1A843A;
  box-shadow: 0 4px 14px rgba(26, 132, 58, 0.1);
}

.wd-home-reciters {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.wd-home-reciters-title {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
}

.wd-home-reciters-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  column-gap: 20px;
  align-items: start;
  direction: ltr;
}

.wd-home-reciters-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  margin-top: 22px;
  border-radius: 50%;
  border: 1px solid #eceef2;
  background: #fff;
  color: #1a1f1c;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-size: 1.125rem;
  position: relative;
  z-index: 2;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.wd-home-reciters-arrow:hover {
  border-color: rgba(26, 132, 58, 0.35);
  color: #1A843A;
  box-shadow: 0 2px 10px rgba(26, 132, 58, 0.1);
}

.wd-home-reciters-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  min-width: 0;
  direction: ltr;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 12px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.wd-home-reciters-viewport::-webkit-scrollbar {
  display: none;
}

.wd-home-reciters-track {
  display: flex;
  gap: 24px;
  width: max-content;
  padding-block: 6px;
  padding-inline: 12px;
  box-sizing: border-box;
  direction: ltr;
}

.wd-home-reciters-track.is-fit-all {
  width: 100%;
  justify-content: space-between;
}

.wd-home-reciter-card {
  flex: 0 0 auto;
  width: 108px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  text-align: center;
  text-decoration: none;
  color: inherit;
  direction: rtl;
}

.wd-home-reciter-card img,
.wd-home-reciter-fallback {
  display: block;
  width: 84px;
  height: 84px;
  margin-inline: auto;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #eceef2;
}

.wd-home-reciter-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f4f5f7;
  color: #8b938d;
  font-size: 1.5rem;
}

.wd-home-reciter-name {
  display: block;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.35;
  max-width: 108px;
  margin-inline: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.wd-home-newsletter {
  flex: 1 1 0;
  min-width: 220px;
  max-width: none;
  width: auto;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.wd-home-newsletter form {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: 1;
  max-width: none;
  margin-top: 4px;
}

.wd-home-newsletter input {
  flex: 1;
  min-width: 0;
  width: auto;
  height: 38px;
  padding: 0 14px;
  border: 1px solid #eceef2;
  border-radius: 10px;
  font: inherit;
  font-size: 0.8125rem;
}

.wd-home-newsletter input:focus {
  outline: none;
  border-color: rgba(26, 132, 58, 0.4);
}

.wd-home-newsletter .wd-btn {
  width: auto;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .wd-home-hero-row {
    flex-wrap: wrap;
  }
}

@media (max-width: 640px) {
  .wd-home-hero-row {
    flex-direction: column;
    align-items: stretch;
  }

  .wd-home-stats {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .wd-home-app-dl {
    flex-direction: column;
    align-items: stretch;
  }

  .wd-home-app-btn {
    justify-content: center;
    width: 100%;
  }

  .wd-home-reciters-row {
    column-gap: 12px;
  }

  .wd-home-reciters-arrow {
    width: 38px;
    height: 38px;
    margin-top: 25px;
    font-size: 1rem;
  }

  .wd-home-reciters-track {
    padding-inline: 8px;
  }

  .wd-home-reciters-track.is-fit-all {
    justify-content: space-around;
  }

  .wd-home-newsletter {
    flex: 1 1 100%;
    width: 100%;
  }

  .wd-home-newsletter form {
    flex-direction: column;
    align-items: stretch;
  }

  .wd-home-newsletter .wd-btn {
    width: 100%;
  }

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

/* Hifz techniques */
.wd-home-techniques-title {
  margin: 0 0 14px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.wd-home-techniques-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 220px));
  gap: 14px;
}

.wd-home-technique {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 90px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.wd-home-technique:hover {
  border-color: rgba(26, 132, 58, 0.35);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
  color: inherit;
}

.wd-home-technique i {
  font-size: 1.75rem;
  line-height: 1;
}

.wd-home-technique span {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.35;
}

.wd-home-technique--indigo i { color: #4f46e5; }
.wd-home-technique--amber i { color: #d97706; }
.wd-home-technique--emerald i { color: #1A843A; }
.wd-home-technique--rose i { color: #e11d48; }
.wd-home-technique--sky i { color: #0284c7; }

@media (max-width: 1100px) {
  .wd-home-techniques-grid {
    grid-template-columns: repeat(3, minmax(160px, 220px));
  }
}

@media (max-width: 768px) {
  .wd-home-techniques-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.wd-home-footer {
  margin-top: auto;
  padding-top: 8px;
  padding-bottom: 4px;
  flex-shrink: 0;
}

.wd-home-footer-divider {
  border: none;
  border-top: 1px solid #eceef2;
  margin: 0 0 12px;
}

.wd-home-footer-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: baseline;
  justify-content: center;
  gap: 0;
  text-align: center;
  color: #8b938d;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.wd-home-footer-gap {
  display: inline-block;
  flex-shrink: 0;
  height: 1px;
}

.wd-home-footer-gap--2 {
  width: 2em;
}

.wd-home-footer-gap--3 {
  width: 3em;
}

.wd-home-footer-years {
  color: inherit;
}

.wd-home-footer-meta a {
  color: inherit;
  text-decoration: none;
}

.wd-home-footer-meta a:hover {
  color: #1A843A;
}

/* Auth / login page */
.wd-body-auth {
  background: #fff;
}

.wd-body-auth .wd-main {
  background: #fff;
}

.wd-auth-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 32px 28px 40px;
}

.wd-auth-card {
  width: min(480px, 100%);
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
  padding: 28px 24px 24px;
}

.wd-auth-head {
  text-align: center;
  margin-bottom: 20px;
}

.wd-auth-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1f1c;
}

.wd-auth-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.wd-auth-message {
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.45;
}

.wd-auth-message.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

.wd-auth-message.is-success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #065f46;
}

.wd-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  margin-bottom: 20px;
  background: #f4f5f7;
  border-radius: 12px;
}

.wd-auth-tab {
  border: 0;
  border-radius: 10px;
  min-height: 40px;
  background: transparent;
  color: #5f6760;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.wd-auth-tab.is-active {
  background: #fff;
  color: #1A843A;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.wd-auth-panel.is-hidden {
  display: none;
}

.wd-auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wd-auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.wd-auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wd-auth-label {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #1a1f1c;
}

.wd-auth-input {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: #fff;
  color: #1a1f1c;
  font: inherit;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wd-auth-input:focus {
  border-color: rgba(26, 132, 58, 0.45);
  box-shadow: 0 0 0 3px rgba(26, 132, 58, 0.12);
}

.wd-auth-input.is-invalid {
  border-color: #f87171;
  background: #fef2f2;
}

.wd-auth-password {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 42px;
  padding-inline-end: 4px;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wd-auth-password:focus-within {
  border-color: rgba(26, 132, 58, 0.45);
  box-shadow: 0 0 0 3px rgba(26, 132, 58, 0.12);
}

.wd-auth-password.is-invalid {
  border-color: #f87171;
  background: #fef2f2;
}

.wd-auth-password .wd-auth-input {
  border: 0;
  box-shadow: none;
  min-height: 40px;
  background: transparent;
}

.wd-auth-password .wd-auth-input:focus {
  box-shadow: none;
}

.wd-auth-password-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b938d;
  cursor: pointer;
}

.wd-auth-password-toggle:hover {
  background: #f4f5f7;
  color: #1a1f1c;
}

.wd-auth-links {
  display: flex;
  justify-content: flex-start;
}

.wd-auth-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1A843A;
  text-decoration: none;
}

.wd-auth-link:hover {
  color: #146830;
  text-decoration: underline;
}

.wd-auth-error {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #dc2626;
}

.wd-auth-submit {
  width: 100%;
  min-height: 42px;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .wd-auth-content {
    padding: 20px 16px 28px;
    align-items: flex-start;
  }

  .wd-auth-card {
    padding: 22px 18px 18px;
  }

  .wd-auth-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Static dashboard pages (about, contact, …) */
.wd-body-page {
  background: #fff;
}

.wd-body-page .wd-main {
  background: #fff;
}

.wd-body-page .wd-topbar-home {
  border-bottom: 0;
  padding: 10px 24px 0;
  min-height: 48px;
  align-items: center;
}

.wd-page-content {
  flex: 1;
  min-height: 0;
  padding: 24px 28px 40px;
  overflow-x: hidden;
  overflow-y: auto;
}

.wd-page-inner {
  width: 100%;
  max-width: 800px;
  margin-inline: auto;
}

.wd-page-card {
  background: #fff;
  border: 1px solid #eceef2;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  padding: 24px 28px;
}

.wd-page-head {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #eceef2;
}

.wd-page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1f1c;
  line-height: 1.35;
}

.wd-page-title i {
  color: #1A843A;
  font-size: 1.125rem;
}

.wd-page-lead {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.55;
  color: #5c6560;
}

.wd-page-body {
  font-size: 0.875rem;
  line-height: 1.75;
  color: #1a1f1c;
}

.wd-page-body p {
  margin: 0 0 1rem;
}

.wd-page-body p:last-child {
  margin-bottom: 0;
}

.wd-about-page.wd-page-card {
  padding: 32px 36px 36px;
}

.wd-about-page-head.wd-page-head {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eceef2;
}

.wd-about-page-title.wd-page-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  gap: 12px;
}

.wd-about-page-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.wd-about-page-body.wd-page-body {
  padding-inline: 4px;
  text-align: justify;
  text-justify: inter-word;
}

.wd-about-page-body.wd-page-body p {
  text-align: justify;
  text-justify: inter-word;
}

.wd-page-messages {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.wd-page-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wd-page-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.wd-page-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wd-page-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #1a1f1c;
}

.wd-page-label-required {
  color: #dc2626;
}

.wd-page-input,
.wd-page-textarea {
  width: 100%;
  border: 1px solid #eceef2;
  border-radius: 12px;
  background: #fff;
  color: #1a1f1c;
  font: inherit;
  font-size: 0.875rem;
  padding: 10px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wd-page-textarea {
  min-height: 148px;
  resize: vertical;
  line-height: 1.55;
}

.wd-page-input:focus,
.wd-page-textarea:focus {
  outline: none;
  border-color: rgba(26, 132, 58, 0.4);
  box-shadow: 0 0 0 3px rgba(26, 132, 58, 0.1);
}

.wd-page-input.is-invalid,
.wd-page-textarea.is-invalid {
  border-color: #fca5a5;
  background: #fef2f2;
}

.wd-page-error {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  color: #dc2626;
}

.wd-page-actions {
  padding-top: 4px;
}

.wd-page-success {
  text-align: center;
  padding: 12px 8px 4px;
}

.wd-page-success .wd-page-head {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 12px;
}

.wd-page-success .wd-page-title {
  justify-content: center;
}

.wd-page-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #eef7f1;
  color: #1A843A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.wd-sidebar-foot > a.is-active {
  background: #eef7f1;
  color: #1A843A;
  font-weight: 600;
}

@media (max-width: 640px) {
  .wd-page-content {
    padding: 20px 16px 32px;
  }

  .wd-page-card {
    padding: 20px 18px;
  }

  .wd-about-page.wd-page-card {
    padding: 24px 20px 28px;
  }

  .wd-page-form-grid {
    grid-template-columns: 1fr;
  }
}
