:root {
  --mk-green: #166534;
  --mk-green-dark: #14532d;
  --mk-gold: #E1C81A;
  --mk-cream: #f7f3ea;
  --mk-paper: #fffdf8;
  --mk-ink: #1c1917;
  --mk-muted: #78716c;
  --mk-line: #e7e0d4;
  --mk-danger: #b91c1c;
  --mk-ok: #15803d;
  --mk-shadow: 0 18px 40px rgba(28, 25, 23, 0.08);
  --mk-radius: 12px;
}

.mk-root {
  font-family: inherit;
  color: inherit;
  direction: rtl;
  text-align: right;
  line-height: 1.8;
  box-sizing: border-box;
  width: 100%;
  max-width: none;
}

.mk-root *,
.mk-root *::before,
.mk-root *::after {
  box-sizing: border-box;
}

.mk-root [hidden] {
  display: none !important;
}

.mk-admin-wrap {
  max-width: none;
  margin: 0;
  padding: 12px 0;
}

.mk-panel {
  display: grid;
  grid-template-columns: 250px 1fr;
  width: 100%;
  max-width: none;
  min-height: 0;
  background: var(--mk-cream);
  border: 1px solid var(--mk-line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--mk-shadow);
}

.mk-sidebar {
  background: linear-gradient(180deg, var(--mk-green-dark), #0b3b24);
  color: #fff;
  padding: 22px 16px;
}

.mk-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.mk-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--mk-gold);
  font-weight: 800;
}

.mk-brand small {
  display: block;
  opacity: 0.75;
  font-size: 12px;
}

.mk-nav {
  display: grid;
  gap: 6px;
}

.mk-nav button {
  background: transparent;
  border: 0;
  color: #fff;
  text-align: right;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.mk-nav-ico {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.92;
}

.mk-nav-ico svg {
  width: 100%;
  height: 100%;
  display: block;
}

.mk-nav button.is-active,
.mk-nav button:hover {
  background: rgba(255, 255, 255, 0.12);
}

.mk-nav-group {
  display: grid;
  gap: 4px;
}

.mk-subnav {
  display: none;
  gap: 4px;
  padding-right: 12px;
}

.mk-nav-group.is-open .mk-subnav {
  display: grid;
}

.mk-subnav button {
  font-size: 14px;
  padding: 8px 12px;
  opacity: 0.95;
}

.mk-subnav .mk-nav-ico {
  width: 10px;
  height: 10px;
  opacity: 0.75;
}

.mk-nav-logout-mobile {
  display: none;
}

.mk-nav-logout {
  margin-top: 28px;
  border: 1px solid rgba(254, 202, 202, 0.45) !important;
  background: rgba(185, 28, 28, 0.22) !important;
  color: #fecaca;
  font-weight: 700 !important;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04) !important;
}

.mk-nav-logout:hover {
  background: rgba(185, 28, 28, 0.45) !important;
  color: #fff !important;
}

.mk-nav-select-wrap {
  display: none;
  gap: 8px;
  margin-bottom: 8px;
}

.mk-nav-select {
  width: 100%;
  border-radius: 12px;
  border: 0;
  padding: 10px 12px;
  font: inherit;
}

.mk-main {
  padding: 22px;
  min-width: 0;
}

.mk-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.mk-toolbar h1 {
  margin: 0;
  margin-inline-end: auto;
  font-size: 22px;
}

.mk-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mk-content,
.mk-widget,
.mk-card {
  max-width: 100%;
  width: 100%;
}

.mk-card {
  background: var(--mk-paper);
  border: 1px solid var(--mk-line);
  border-radius: var(--mk-radius);
  padding: 20px;
  box-shadow: var(--mk-shadow);
}

.mk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.mk-form {
  display: grid;
  gap: 12px;
}

.mk-form label,
.mk-field {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

.mk-form input,
.mk-form select,
.mk-form textarea,
.mk-field input,
.mk-field select,
.mk-field textarea,
.mk-reader-bar select {
  width: 100%;
  border: 1px solid var(--mk-line);
  background: #fff;
  border-radius: 12px;
  font: inherit;
  font-size: 16px;
}

/* جلوگیری از زوم خودکار iOS روی فوکوس فیلدها (فونت زیر ۱۶px باعث زوم می‌شود) */
.mk-root input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not(.mk-otp-box),
.mk-root select,
.mk-root textarea {
  font-size: 16px !important;
}

.mk-root .mk-otp-box {
  font-size: 22px !important;
}

/* برای اینکه padding روی checkbox و radio اعمال نشود */
.mk-form input:not([type="checkbox"]):not([type="radio"]),
.mk-field input:not([type="checkbox"]):not([type="radio"]) {
  padding: 10px 12px;
}

.mk-form select,
.mk-form textarea,
.mk-field select,
.mk-field textarea,
.mk-reader-bar select {
  padding: 10px 12px;
}

.mk-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  cursor: pointer;
  font: inherit;
}

[data-otp-step="phone"] .mk-btn {
  width: 100%;
  margin-top: 30px;
}

.mk-btn-primary {
  background: var(--mk-green);
  color: #fff;
}

.mk-btn-ghost {
  background: transparent;
  border: 1px solid var(--mk-line);
}

.mk-btn-gold {
  background: var(--mk-gold);
  color: #fff;
}

.mk-muted {
  color: var(--mk-muted);
}

/* ------------------------------ Toast ------------------------------ */

.mk-toast-stack {
  position: fixed;
  inset-inline-start: 20px;
  bottom: 20px;
  z-index: 999999;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.mk-toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--mk-paper);
  border: 1px solid var(--mk-line);
  border-inline-start: 5px solid var(--mk-green);
  box-shadow: 0 14px 34px rgba(28, 25, 23, 0.18);
  font-size: 15px;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: auto;
}

.mk-toast.is-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mk-toast-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mk-green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.mk-toast-text {
  flex: 1;
}

.mk-toast-close {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: var(--mk-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.mk-toast-error {
  border-inline-start-color: var(--mk-danger);
}

.mk-toast-error .mk-toast-icon {
  background: var(--mk-danger);
}

.mk-toast-info {
  border-inline-start-color: var(--mk-gold);
}

.mk-toast-info .mk-toast-icon {
  background: var(--mk-gold);
}

/* --------------------------- Preloader ---------------------------- */

.mk-main {
  position: relative;
}

.mk-content {
  transition: opacity 0.25s ease;
}

.mk-content.is-loading {
  opacity: 0.25;
  pointer-events: none;
}

.mk-preloader {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: rgba(247, 243, 234, 0.72);
  backdrop-filter: blur(2px);
  color: var(--mk-green-dark);
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.mk-preloader:not([hidden]) {
  display: flex;
}

.mk-preloader.is-in {
  opacity: 1;
  pointer-events: auto;
}

.mk-spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(22, 101, 52, 0.15);
  border-top-color: var(--mk-green);
  border-inline-end-color: var(--mk-gold);
  animation: mk-spin 0.9s linear infinite;
}

@keyframes mk-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mk-spinner {
    animation-duration: 2.5s;
  }

  .mk-toast,
  .mk-content,
  .mk-preloader {
    transition: none;
  }
}

.mk-table-wrap {
  overflow-x: auto;
}

.mk-table-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.mk-table-toolbar h2 {
  margin: 0;
  font-size: 18px;
}

.mk-table-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.mk-charts h3 {
  margin: 8px 0 12px;
  font-size: 16px;
  color: var(--mk-green-dark);
}

.mk-chart-tabs {
  margin-bottom: 18px;
}

.mk-chart-donut {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.mk-chart-donut svg {
  width: 140px;
  height: 140px;
  transform: rotate(-90deg);
}

.mk-chart-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.mk-chart-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 4px;
  margin-left: 8px;
}

.mk-chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 3px;
  min-height: 150px;
  max-width: 420px;
  width: 100%;
  overflow: visible;
  padding: 8px 2px 0;
  border-bottom: 1px solid var(--mk-line);
}

.mk-chart-bar {
  flex: 1 1 0;
  min-width: 0;
  max-width: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mk-chart-col {
  display: block;
  width: 100%;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--mk-green), var(--mk-gold));
  min-height: 4px;
}

.mk-chart-bar small {
  font-size: 10px;
  color: var(--mk-muted);
}

.mk-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 25, 23, 0.45);
  padding: 16px;
}

.mk-modal-card {
  width: min(420px, 100%);
  background: var(--mk-paper);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--mk-shadow);
}

.mk-modal-card h3 {
  margin: 0 0 8px;
  color: var(--mk-green-dark);
}

.mk-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}

.mk-btn-danger {
  background: var(--mk-danger);
  color: #fff;
}

.mk-otp-sent {
  margin: 0;
  padding: 12px;
  background: #ecfdf5;
  border-radius: 12px;
}

.mk-otp-sent strong {
  display: inline-block;
  margin: 0 4px;
}

.mk-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.mk-table th,
.mk-table td {
  border-bottom: 1px solid var(--mk-line);
  padding: 10px 8px;
  text-align: right;
}

.mk-group h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.mk-tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.mk-tabs-bar button {
  border: 1px solid var(--mk-line);
  background: #fff;
  border-radius: var(--mk-radius);
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
}

.mk-tabs-bar button.is-active {
  background: var(--mk-green);
  color: #fff;
  border-color: var(--mk-green);
}

.mk-tabs-select {
  display: none;
  width: 100%;
  margin-bottom: 16px;
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.mk-shortcode {
  font-family: ui-monospace, monospace;
  background: #f5f1e8;
  border-radius: 8px;
  padding: 2px 6px;
  font-size: 12px;
  direction: ltr;
  display: inline-block;
}

.mk-kpi {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.mk-kpi b {
  display: block;
  font-size: 22px;
}

.mk-otp-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: end;
}

.mk-result {
  margin-top: 16px;
  padding: 14px;
  border-radius: 12px;
  background: #ecfdf5;
}

.mk-reader-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.mk-reader-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
}

.mk-reader-field input[type="search"],
.mk-reader-field select {
  width: 100%;
  border: 1px solid var(--mk-line);
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  font-weight: 400;
}

.mk-reader-switch .mk-check {
  padding: 11px 12px;
  border: 1px solid var(--mk-line);
  border-radius: 12px;
  background: #fff;
  font-weight: 400;
  cursor: pointer;
}

.mk-reader-switch .mk-check input {
  width: 20px;
  height: 20px;
}

.mk-mushaf {
  background: #fbf7ee;
  border: 1px solid var(--mk-line);
  border-radius: 16px;
  padding: 20px 16px;
}

.mk-surah-block + .mk-surah-block {
  margin-top: 28px;
}

.mk-surah-title {
  text-align: center;
  margin: 0 0 16px;
  padding: 10px;
  border: 1px solid var(--mk-gold);
  border-radius: 12px;
  color: var(--mk-green-dark);
  font-size: 20px;
}

.mk-ayat {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 4px;
  text-align: justify;
}

.mk-ayah {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.mk-ayah:hover {
  background: #f5ecdc;
}

.mk-ayah.is-active {
  background: #f0e6d2;
  box-shadow: inset 0 0 0 1px var(--mk-gold);
}

.mk-ayah-text {
  font-family: inherit;
  font-size: 20px;
  line-height: 2.3;
}

.mk-ayah-num {
  flex: 0 0 auto;
  min-width: 32px;
  height: 32px;
  margin-top: 8px;
  border: 1px solid var(--mk-gold);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: var(--mk-gold);
}

.mk-translations {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--mk-line);
  display: grid;
  gap: 8px;
}

.mk-translation {
  display: flex;
  gap: 8px;
  color: #44403c;
  margin: 0;
  font-size: 16px;
  line-height: 2;
}

.mk-translation-num {
  flex: 0 0 auto;
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--mk-line);
  font-size: 13px;
  color: var(--mk-gold);
}

.mk-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 14px 0;
  font-weight: 600;
}

.mk-pager button[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.mk-player {
  margin-bottom: 16px;
  padding: 18px 16px;
  border: 1px solid var(--mk-line);
  border-radius: 18px;
  background: #fff;
  display: grid;
  gap: 14px;
  text-align: center;
}

.mk-player audio {
  display: none;
}

.mk-player-label {
  display: block;
  font-size: 14px;
  color: #78716c;
  margin-bottom: 4px;
}

.mk-player-head strong {
  font-size: 18px;
  color: var(--mk-green-dark);
}

.mk-player-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.mk-play-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 168px;
  min-height: 62px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: var(--mk-green);
  color: #fff;
  font: inherit;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(4, 120, 87, 0.25);
}

.mk-play-btn:hover {
  background: var(--mk-green-dark);
}

.mk-play-icon {
  font-size: 20px;
}

.mk-round-btn {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid var(--mk-line);
  background: #fff;
  color: var(--mk-green-dark);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.mk-round-btn:hover {
  border-color: var(--mk-green);
  background: #f0fdf4;
}

.mk-player-progress {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 14px;
}

.mk-player-progress input[type="range"] {
  width: 100%;
  height: 10px;
  accent-color: var(--mk-green);
}

.mk-speed-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.mk-speed-group button {
  min-width: 96px;
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--mk-line);
  border-radius: 12px;
  background: #fff;
  color: #44403c;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.mk-speed-group button.is-active {
  border-color: var(--mk-green);
  background: #ecfdf5;
  color: var(--mk-green-dark);
}

.mk-player-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.mk-player-extra .mk-check {
  font-size: 16px;
  cursor: pointer;
}

.mk-player-extra .mk-check input {
  width: 20px;
  height: 20px;
}

.mk-status strong {
  display: block;
  font-size: 28px;
}

.mk-progress {
  height: 10px;
  background: #eee7da;
  border-radius: 99px;
  overflow: hidden;
  margin: 10px 0;
}

.mk-progress i {
  display: block;
  height: 100%;
  background: var(--mk-green);
}

.mk-loading {
  color: var(--mk-muted);
}

.mk-secret-note {
  font-size: 12px;
  color: var(--mk-gold);
}

/* --------------- Checkbox / Radio اختصاصی موسسه --------------- */

.mk-root input[type="checkbox"],
.mk-root input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid var(--mk-line);
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.mk-root input[type="checkbox"] {
  border-radius: 7px;
}

.mk-root input[type="radio"] {
  border-radius: 50%;
}

.mk-root input[type="checkbox"]:hover,
.mk-root input[type="radio"]:hover {
  border-color: var(--mk-green);
}

.mk-root input[type="checkbox"]:focus-visible,
.mk-root input[type="radio"]:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(225, 200, 26, 0.35);
}

.mk-root input[type="checkbox"]:checked,
.mk-root input[type="radio"]:checked {
  background: var(--mk-green);
  border-color: var(--mk-green-dark);
}

.mk-root input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  inset-inline-start: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid var(--mk-gold);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.mk-root input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--mk-gold);
}

.mk-root input[type="checkbox"]:disabled,
.mk-root input[type="radio"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mk-check {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

/* ------------------------ خروج و کارت‌ها ------------------------ */

.mk-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mk-danger);
  border-color: rgba(185, 28, 28, 0.35);
  background: #fff;
  white-space: nowrap;
}

.mk-logout:hover {
  background: #fee2e2;
}

.mk-logout-icon {
  font-size: 15px;
}

.mk-section-title {
  margin: 0 0 12px;
  font-size: 16px;
  color: var(--mk-green-dark);
}

.mk-unit {
  font-size: 0.5em;
  font-weight: 500;
  color: var(--mk-muted);
  margin-inline-start: 5px;
  vertical-align: baseline;
}

.mk-amount-empty {
  font-size: 15px;
  color: var(--mk-muted);
  font-weight: 500;
}

.mk-kpi small {
  display: block;
  font-size: 12px;
}

.mk-kpi-ok b {
  color: var(--mk-ok);
}

.mk-kpi-warn b {
  color: #b45309;
}

.mk-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #f5f1e8;
  border: 1px solid var(--mk-line);
  font-size: 12px;
  white-space: nowrap;
}

.mk-badge-completed,
.mk-badge-sent {
  background: #dcfce7;
  border-color: #86efac;
  color: var(--mk-ok);
}

.mk-badge-active,
.mk-badge-open,
.mk-badge-queued {
  background: #fef9c3;
  border-color: #fde68a;
  color: #92400e;
}

.mk-badge-failed {
  background: #fee2e2;
  border-color: #fca5a5;
  color: var(--mk-danger);
}

/* --------------------------- فرم ورود --------------------------- */

.mk-login {
  display: flex;
  justify-content: center;
}

.mk-login-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  overflow: hidden;
}

.mk-login-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(247, 243, 234, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.mk-login-overlay:not([hidden]) {
  display: flex;
}

.mk-login-overlay.is-in {
  opacity: 1;
}

.mk-login-overlay-box {
  width: min(320px, 100%);
  background: #fff;
  border: 1px solid var(--mk-line);
  border-radius: 16px;
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--mk-shadow);
  display: grid;
  gap: 10px;
  justify-items: center;
}

.mk-login-overlay-box strong {
  font-size: 17px;
  color: var(--mk-green-dark);
}

.mk-login-overlay-box p {
  margin: 0;
  color: var(--mk-muted);
  font-size: 14px;
  line-height: 1.7;
}

.mk-login-overlay.is-error .mk-login-overlay-box {
  border-color: #fca5a5;
}

.mk-login-overlay.is-error .mk-login-overlay-box strong {
  color: var(--mk-danger);
}

.mk-login-overlay.is-success .mk-login-overlay-box {
  border-color: #86efac;
}

.mk-login-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.mk-login-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  color: var(--mk-green-dark);
}

.mk-login-head p {
  margin: 0;
  font-size: 14px;
}

.mk-login-head .mk-brand-mark {
  color: var(--mk-green-dark);
}

.mk-login-methods {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 5px;
  border-radius: 14px;
  background: #f5f1e8;
}

.mk-login-methods button {
  flex: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  padding: 10px 8px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--mk-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.mk-login-methods button.is-active {
  background: #fff;
  color: var(--mk-green-dark);
  box-shadow: 0 4px 12px rgba(28, 25, 23, 0.08);
}

.mk-login-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mk-login-foot .mk-btn {
  flex: 1;
}

.mk-login-done {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.mk-login-done p {
  margin: 0;
}

/* ------------------- فیلدهای کد یک‌بارمصرف ------------------- */

.mk-otp-stage {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}

.mk-otp-label {
  display: block;
  font-size: 14px;
  color: var(--mk-muted);
}

.mk-otp-field {
  display: grid;
  gap: 8px;
}

.mk-otp-boxes {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.mk-otp-box {
  width: 52px;
  height: 60px;
  flex: 0 1 52px;
  border: 2px solid var(--mk-line);
  border-radius: 14px;
  background: #fff;
  text-align: center;
  font: inherit;
  font-size: 26px;
  font-weight: 700;
  color: var(--mk-green-dark);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.mk-otp-box:focus {
  outline: 0;
  border-color: var(--mk-green);
  box-shadow: 0 0 0 4px rgba(225, 200, 26, 0.3);
}

.mk-otp-box:not(:placeholder-shown),
.mk-otp-box[value]:not([value=""]) {
  border-color: var(--mk-green);
}

.mk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}


@media (max-width: 860px) {
  .mk-panel {
    grid-template-columns: 1fr;
  }

  .mk-nav {
    display: none;
  }

  .mk-nav-logout-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    background: rgba(185, 28, 28, 0.25);
    border: 0;
    border-radius: 12px;
    color: #fecaca;
    padding: 12px;
    font: inherit;
    cursor: pointer;
  }

  .mk-tabs-bar:not(.mk-chart-tabs) {
    display: none;
  }

  .mk-nav-select-wrap {
    display: grid;
  }

  .mk-tabs-bar {
    display: none;
  }

  .mk-tabs-select {
    display: block;
  }

  .mk-otp-row,
  .mk-reader-bar {
    grid-template-columns: 1fr;
  }

  .mk-ayah-text {
    font-size: 18px;
  }

  .mk-play-btn {
    min-width: 140px;
  }

  .mk-speed-group button {
    flex: 1 1 40%;
    min-width: 0;
  }

  .mk-otp-box {
    width: 42px;
    height: 52px;
    flex: 0 1 42px;
    font-size: 22px;
    border-radius: 11px;
  }

  .mk-otp-boxes {
    gap: 6px;
  }

  .mk-toast-stack {
    inset-inline: 16px;
    width: auto;
  }
}
