.zi {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  line-height: 0;
  flex-shrink: 0;
  vertical-align: middle;
}

.zi svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.zi-xs {
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 13px;
}

.zi-sm {
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
}

.zi-lg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
}

/* حاوية أيقونة موحّدة في الإعدادات والقوائم */
.s-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #F6F3EE;
  border: 1px solid #E7E1D8;
  color: #533116;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.s-icon-box-sm {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

/* أزرار التبديل بين العربية والإنجليزية */
.lang-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: #F8FAFC;
  border: 1px solid #ECEEF2;
  border-radius: 11px;
  width: 100%;
}

.lang-seg-compact {
  width: auto;
  display: inline-flex;
}

.lang-seg-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: center;
  white-space: nowrap;
}

.lang-seg-btn.active {
  background: #533116;
  color: #FFFFFF;
  font-weight: 800;
}

/* شريط تقدم تنزيل التحديث داخل التطبيق */
.inapp-progress-wrap {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: #F8FAFC;
  border: 1px solid #ECEEF2;
}

.inapp-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 6px;
}

.inapp-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #ECEEF2;
  overflow: hidden;
}

.inapp-progress-fill {
  height: 100%;
  width: 0%;
  background: #533116;
  border-radius: 999px;
  transition: width 0.18s ease;
}

/* قوائم منسدلة نظيفة واحترافية بخلفية بيضاء متناسقة */
.ui-dropdown {
  border: 1px solid #ECEEF2;
  border-radius: 12px;
  background: #FFFFFF;
  overflow: hidden;
  flex-shrink: 0;
  margin-top: 10px;
}

.ui-dropdown-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 14px;
  font-weight: 700;
  font-size: 0.86rem;
  color: #1E293B;
  cursor: pointer;
  user-select: none;
  background: #F8FAFC;
}

.ui-dropdown-summary::-webkit-details-marker {
  display: none;
}

.ui-dropdown-summary-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.ui-dropdown-chevron {
  transition: transform 0.2s ease;
  color: #64748B;
}

.ui-dropdown[open] > .ui-dropdown-summary .ui-dropdown-chevron,
.ui-release-item[open] > .ui-release-summary .ui-dropdown-chevron {
  transform: rotate(180deg);
}

.ui-dropdown-body {
  padding: 12px;
  border-top: 1px solid #ECEEF2;
  background: #FFFFFF;
}

/* سجل التحديثات القابل للطي والفتح لكل إصدار */
.ui-release-item {
  border: 1px solid #ECEEF2;
  border-radius: 11px;
  background: #FFFFFF;
  overflow: hidden;
  flex-shrink: 0;
}

.ui-release-item + .ui-release-item {
  margin-top: 8px;
}

.ui-release-item.is-latest {
  border-color: #D6C7B2;
  background: #FFFCF7;
}

.ui-release-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
  padding: 10px 12px;
  cursor: pointer;
  user-select: none;
}

.ui-release-summary::-webkit-details-marker {
  display: none;
}

.ui-release-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ui-release-ver {
  font-size: 0.86rem;
  font-weight: 800;
  color: #533116;
}

.ui-release-title-inline {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1E293B;
}

.ui-release-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.ui-release-body {
  padding: 10px 12px 12px;
  border-top: 1px solid #F1F5F9;
  background: #FFFFFF;
}

.ui-release-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1E293B;
  margin-bottom: 4px;
}

.ui-release-date {
  font-size: 0.75rem;
  color: #64748B;
  margin-bottom: 6px;
}

.ui-release-list {
  margin: 0;
  padding-inline-start: 18px;
  font-size: 0.8rem;
  color: #334155;
}

.ui-release-list li {
  margin-bottom: 3px;
}

/* حقل كلمة المرور مع زر إظهار / إخفاء متوافق مع العربية والإنجليزية */
.pwd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.modal-body .pwd-input-wrap {
  margin-top: 4px;
}

.pwd-input-wrap input {
  width: 100%;
  margin-top: 0 !important;
  padding-inline-end: 44px !important;
}

.pwd-input-wrap input[dir="ltr"] {
  padding-left: 44px !important;
  padding-right: 12px !important;
}

[dir="ltr"] .pwd-input-wrap input[dir="ltr"] {
  padding-left: 12px !important;
  padding-right: 44px !important;
}

.pwd-input-wrap input::-ms-reveal,
.pwd-input-wrap input::-ms-clear {
  display: none;
}

.pwd-toggle-btn {
  position: absolute;
  inset-inline-end: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #64748B;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.pwd-toggle-btn:hover {
  background: #F1F5F9;
  color: #533116;
}

.pwd-toggle-btn.is-visible {
  color: #533116;
  background: #F6F3EE;
}

@keyframes ziSpin {
  to { transform: rotate(360deg); }
}

.is-refreshing .zi svg {
  animation: ziSpin 0.65s linear infinite;
}

/* نافذة الإدخال والتأكيد الموحّدة داخل التطبيق (بديل window.prompt لعدم تعطّلها في WebView) */
.zinat-prompt-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.zinat-prompt-dialog {
  width: 100%;
  max-width: 420px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  padding: 18px 18px 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24);
  font-family: inherit;
  color: #0F172A;
}
.zinat-prompt-title {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 800;
  color: #1E1815;
}
.zinat-prompt-msg {
  margin: 0 0 12px;
  font-size: 0.86rem;
  color: #475569;
  line-height: 1.55;
  white-space: pre-wrap;
}
.zinat-prompt-input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  color: #0F172A;
  background: #FFFFFF;
}
.zinat-prompt-input:focus {
  outline: none;
  border-color: #533116;
  box-shadow: 0 0 0 3px rgba(83, 49, 22, 0.12);
}
.zinat-prompt-err {
  display: none;
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #B91C1C;
  font-size: 0.8rem;
  font-weight: 700;
}
.zinat-prompt-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}
.zinat-prompt-btn {
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #D1D5DB;
  background: #FFFFFF;
  color: #334155;
}
.zinat-prompt-btn-confirm {
  background: #533116;
  border-color: #533116;
  color: #FFFFFF;
}
.zinat-prompt-btn-confirm.is-danger {
  background: #DC2626;
  border-color: #DC2626;
  color: #FFFFFF;
}
