/*
 * سامانه ارما — UI system v1.8.9
 * The original styles remain in assets.css for legacy pages. This file owns
 * the current admin shell and provides compatible styling for existing forms.
 */

:root {
  --arma-page: #f5f7fb;
  --arma-surface: #ffffff;
  --arma-ink: #10213f;
  --arma-ink-soft: #45556f;
  --arma-muted: #8490a4;
  --arma-line: #e7ecf3;
  --arma-line-strong: #dce5f0;
  --arma-primary: #0b8df3;
  --arma-primary-strong: #087dd7;
  --arma-primary-soft: #eaf5ff;
  --arma-success: #16ae82;
  --arma-success-soft: #e8f8f1;
  --arma-warning: #efab25;
  --arma-warning-soft: #fff6df;
  --arma-danger: #ec5f6a;
  --arma-danger-soft: #fff0f1;
  --arma-shadow: 0 12px 32px rgba(31, 55, 92, .055);
  --arma-shadow-float: 0 20px 50px rgba(31, 55, 92, .11);
  --arma-radius-lg: 20px;
  --arma-radius-md: 14px;
  --arma-font: IRANSans, IRANSansX, "IRANSansX", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--arma-page); }

body.admin-body,
body.auth-page {
  min-width: 320px;
  margin: 0;
  background: var(--arma-page);
  color: var(--arma-ink);
  font-family: var(--arma-font);
  font-size: 14px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea { font-family: inherit; }

.ui-icon { display: block; flex: 0 0 auto; }

/* App shell ----------------------------------------------------------- */
.admin-shell {
  min-height: 100vh;
  direction: rtl;
  background: var(--arma-page);
}

.sidebar {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  bottom: 0;
  width: 278px;
  padding: 22px 16px 16px;
  overflow-y: auto;
  background: var(--arma-surface);
  border-left: 1px solid var(--arma-line);
  box-shadow: none;
  color: var(--arma-ink);
  transition: transform .22s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 8px 20px;
  color: var(--arma-ink) !important;
  text-decoration: none;
}

.sidebar-logo,
.auth-brand__mark {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  width: 43px;
  height: 43px;
  padding: 9px 9px 8px;
  overflow: hidden;
  border-radius: 13px;
  background: #10213f;
  box-shadow: 0 8px 16px rgba(16, 33, 63, .14);
}

.sidebar-logo i,
.auth-brand__mark i {
  display: block;
  width: 5px;
  border-radius: 5px;
  background: #0ba2f8;
}

.sidebar-logo i:nth-child(1),
.auth-brand__mark i:nth-child(1) { height: 13px; }
.sidebar-logo i:nth-child(2),
.auth-brand__mark i:nth-child(2) { height: 23px; background: #eef7ff; }
.sidebar-logo i:nth-child(3),
.auth-brand__mark i:nth-child(3) { height: 17px; background: #0ba2f8; }

.sidebar-brand strong {
  display: block;
  color: var(--arma-ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.4;
}

.sidebar-brand small {
  display: block;
  margin-top: 2px;
  color: var(--arma-muted);
  font-size: 10px;
  line-height: 1.5;
}

.live-state {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 17px;
  padding: 8px 10px;
  border: 1px solid var(--arma-line);
  border-radius: 10px;
  background: #fbfcfe;
  color: var(--arma-ink-soft);
  font-size: 10px;
  font-weight: 800;
}

.live-state.is-live { color: #168867; background: #f3fcf8; border-color: #d7f0e5; }
.live-state.is-dry { color: #9c6c07; background: #fffaf0; border-color: #f5e6b7; }

.state-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px currentColor;
  opacity: .9;
}

.side-nav {
  display: grid;
  gap: 3px;
  max-height: none;
  padding: 0;
  overflow: visible;
}

.side-nav a,
.side-nav-advanced summary {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #35455f;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.side-nav a:hover,
.side-nav-advanced summary:hover {
  background: #f7faff;
  color: var(--arma-primary-strong);
}

.side-nav a.active {
  border-color: #dbeaff;
  background: #eaf4ff;
  color: #087edb;
}

.side-nav a b,
.side-nav-advanced summary > span:nth-child(2) {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
}

.side-nav a small,
.nav-bullet { display: none; }

.nav-icon {
  display: grid;
  width: 20px;
  color: #455773;
  place-items: center;
}

.side-nav a.active .nav-icon { color: var(--arma-primary); }

.side-nav-advanced {
  margin: 7px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--arma-line);
  border-radius: 12px;
  background: #fbfcff;
}

.side-nav-advanced summary {
  min-height: 42px;
  margin: 0;
  border: 0;
  border-radius: 0;
  list-style: none;
}

.side-nav-advanced summary::-webkit-details-marker { display: none; }
.side-nav-advanced summary::after { display: none; }

.nav-chevron {
  width: 16px;
  height: 16px;
  margin-right: auto;
  color: #8c99ad;
  transition: transform .18s ease;
}

.side-nav-advanced[open] .nav-chevron { transform: rotate(90deg); }

.side-nav-advanced-list {
  display: grid;
  gap: 2px;
  padding: 3px 5px 7px;
  border-top: 1px solid var(--arma-line);
}

.side-nav-advanced-list a {
  min-height: 40px;
  padding: 8px 9px !important;
}

.side-nav-advanced-list a b { font-size: 11px !important; }

.sidebar-foot {
  display: grid;
  gap: 8px;
  margin-top: 22px;
  padding: 14px 5px 0;
  border-top: 1px solid var(--arma-line);
}

.user-summary {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 4px;
}

.user-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  color: #fff;
  border-radius: 50%;
  background: #21365a;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}

.user-summary b { display: block; color: var(--arma-ink); font-size: 11px; }
.user-summary small { display: block; margin-top: 1px; color: var(--arma-muted); font-size: 9px; }

.logout-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 39px;
  padding: 8px 8px;
  border-radius: 10px;
  color: #a3414e !important;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.logout-row:hover { background: #fff4f4; }
.logout-row .nav-icon { color: currentColor; }

.admin-main { min-width: 0; }
.admin-main.with-sidebar { margin-right: 278px; }

.app-topbar {
  position: sticky;
  z-index: 35;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 30px;
  background: #fff;
  border-bottom: 1px solid var(--arma-line);
}

.app-topbar__right,
.app-topbar__left {
  display: flex;
  align-items: center;
  gap: 13px;
}

.app-context span { display: block; color: var(--arma-ink); font-size: 13px; font-weight: 900; }
.app-context small { display: block; margin-top: 1px; color: var(--arma-muted); font-size: 9px; }

.nav-toggle {
  display: none;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--arma-line);
  border-radius: 10px;
  background: #fff;
  color: var(--arma-ink);
  place-items: center;
}

.nav-toggle:hover { background: #f8fbff; color: var(--arma-primary); }

.topbar-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 37px;
  padding: 7px 11px;
  border: 1px solid var(--arma-line);
  border-radius: 10px;
  background: #f8faff;
  color: #39516f;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.topbar-action:hover { border-color: #cfe1fb; color: var(--arma-primary); background: #f3f8ff; }
.topbar-action .ui-icon { width: 15px; height: 15px; }

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
}

.mode-chip .state-dot { width: 6px; height: 6px; box-shadow: none; }
.mode-chip.live { color: #0b8a66; background: #ebfaf4; }
.mode-chip.dry { color: #9e6b00; background: #fff7e4; }

.nav-scrim { display: none; }

/* Main content -------------------------------------------------------- */
.admin-content {
  width: min(1540px, calc(100% - 54px));
  margin: 0 auto;
  padding: 29px 0 46px;
}

.modern-page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin: 0 0 21px;
  padding: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
  color: var(--arma-muted);
  font-size: 10px;
}

.breadcrumb a { color: var(--arma-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--arma-primary); }
.breadcrumb .ui-icon { width: 13px; height: 13px; transform: rotate(180deg); color: #b1bac8; }

.modern-page-head h1 {
  margin: 0;
  color: var(--arma-ink);
  font-size: clamp(21px, 2vw, 26px);
  font-weight: 900;
  letter-spacing: -.55px;
  line-height: 1.35;
}

.persian-now {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--arma-line);
  border-radius: 9px;
  background: #fff;
  color: var(--arma-muted);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.admin-content .card,
.card {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--arma-line);
  border-radius: var(--arma-radius-lg);
  background: var(--arma-surface);
  box-shadow: var(--arma-shadow);
}

.admin-content .card h2,
.card h2 { color: var(--arma-ink); font-size: 15px; font-weight: 900; }

.section-title {
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.section-title h2 { margin: 0; }
.section-title .small { margin: 3px 0 0; }

.small,
.hint,
.meta { color: var(--arma-muted); font-size: 10px; }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--arma-primary);
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.text-link:hover { color: var(--arma-primary-strong); }

.admin-content label,
.card label {
  margin: 11px 0 6px;
  color: #3d4d66;
  font-size: 11px;
  font-weight: 800;
}

.admin-content input,
.admin-content select,
.admin-content textarea,
.card input,
.card select,
.card textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--arma-line-strong);
  border-radius: 10px;
  background: #fff;
  color: var(--arma-ink);
  font-size: 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.admin-content textarea,
.card textarea { min-height: 104px; resize: vertical; }

.admin-content input:focus,
.admin-content select:focus,
.admin-content textarea:focus,
.card input:focus,
.card select:focus,
.card textarea:focus {
  border-color: #80beff;
  box-shadow: 0 0 0 4px rgba(11, 141, 243, .11);
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  width: auto;
  padding: 9px 14px;
  border: 1px solid var(--arma-primary);
  border-radius: 10px;
  background: var(--arma-primary);
  color: #fff;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

button:hover,
.btn:hover { background: var(--arma-primary-strong); border-color: var(--arma-primary-strong); transform: translateY(-1px); box-shadow: 0 7px 17px rgba(11, 141, 243, .15); }
button:focus-visible,
.btn:focus-visible,
a:focus-visible,
summary:focus-visible { outline: 3px solid rgba(11, 141, 243, .28); outline-offset: 2px; }

.secondary,
.secondary-btn,
.ghost-btn {
  border-color: var(--arma-line-strong) !important;
  background: #fff !important;
  color: #36516f !important;
  box-shadow: none !important;
}

.secondary:hover,
.secondary-btn:hover,
.ghost-btn:hover { border-color: #bad8fa !important; background: #f4f9ff !important; color: var(--arma-primary-strong) !important; }

.danger-btn,
.danger-action { border-color: #f0b7bd !important; background: #fff5f6 !important; color: #c44552 !important; box-shadow: none !important; }
.danger-btn:hover,
.danger-action:hover { background: #fff0f1 !important; border-color: #ec9aa5 !important; }

.ok, .err, .warn {
  margin-bottom: 15px;
  padding: 11px 13px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
}

.ok { border: 1px solid #ccebdd; background: var(--arma-success-soft); color: #117a5a; }
.err { border: 1px solid #f4c4c8; background: var(--arma-danger-soft); color: #aa3d48; }
.warn { border: 1px solid #f2dda5; background: var(--arma-warning-soft); color: #8e6410; }

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #f1f4f8;
  color: #5d6b80;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.success { background: var(--arma-success-soft); color: #148463; }
.badge.warn { background: var(--arma-warning-soft); color: #976805; }
.badge.danger,
.danger-badge { background: var(--arma-danger-soft) !important; color: #b5434e !important; }
.badge.muted { background: #f1f4f8; color: #748197; }

/* Dashboard ---------------------------------------------------------- */

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }

.metric-card {
  position: relative;
  min-height: 128px;
  padding: 17px 17px 15px;
  overflow: hidden;
  border: 1px solid var(--arma-line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--arma-shadow);
}

.metric-card.primary { border-color: #d7e8ff; }
.metric-card.attention { border-color: #f0dfb7; }
.metric-card.danger-metric { border-color: #f4cbd0; }

.metric-label { display: block; color: var(--arma-muted); font-size: 10px; font-weight: 800; }
.metric-card b { display: block; margin-top: 2px; color: var(--arma-ink); font-size: 25px; font-weight: 900; line-height: 1.35; }
.metric-card small { display: block; margin-top: 2px; color: var(--arma-muted); font-size: 9px; }

.dashboard-grid { display: grid; gap: 16px; }

.health-card,
.quick-actions-card,
.sync-chart-card,

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

.health-list > div {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid #edf1f6;
  border-radius: 12px;
  background: #fbfcfe;
}

.health-icon { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; flex: 0 0 8px; }
.ok-dot { background: var(--arma-success); box-shadow: 0 0 0 4px #e6f8f1; }
.warn-dot { background: var(--arma-warning); box-shadow: 0 0 0 4px #fff6df; }
.health-list b { display: block; color: var(--arma-ink); font-size: 10px; font-weight: 900; }
.health-list small { display: block; margin-top: 2px; color: var(--arma-muted); font-size: 9px; line-height: 1.7; }

.quick-actions { display: grid; gap: 7px; }

.quick-actions a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 51px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--arma-ink);
  text-decoration: none;
  transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.quick-actions a:hover { border-color: #d8e8fb; background: #f8fbff; transform: translateX(-2px); }

.quick-actions a > span:nth-child(2) { min-width: 0; flex: 1; }
.quick-actions b { display: block; color: var(--arma-ink); font-size: 10px; font-weight: 900; }
.quick-actions small { display: block; overflow: hidden; margin-top: 1px; color: var(--arma-muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }

.chart-legend { display: flex; align-items: center; gap: 13px; margin: -2px 0 12px; color: var(--arma-muted); font-size: 9px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart-legend i { width: 7px; height: 7px; border-radius: 50%; }

/* Tables, forms and older admin screens -------------------------------- */
.table-wrap,
.table-scroll { overflow-x: auto; border: 1px solid #edf1f5; border-radius: 13px; }

.table-wrap table,
.table-scroll table,
.clean-table { min-width: 710px; margin: 0; border-collapse: separate; border-spacing: 0; }

.table-wrap th,
.table-scroll th,
.clean-table th {
  padding: 11px 12px;
  border-bottom: 1px solid var(--arma-line);
  background: #f9fbfd;
  color: #64748a;
  font-size: 9px;
  font-weight: 900;
  text-align: right;
  white-space: nowrap;
}

.table-wrap td,
.table-scroll td,
.clean-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f5;
  color: #3d4d65;
  font-size: 10px;
  vertical-align: middle;
}

.table-wrap tbody tr:last-child td,
.table-scroll tbody tr:last-child td,
.clean-table tbody tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover td,
.table-scroll tbody tr:hover td,
.clean-table tbody tr:hover td { background: #fbfdff; }

.grid { gap: 14px 16px; }
.actions { gap: 8px; }
.inline-form { gap: 7px; }
.inline-form input,
.inline-form select { min-height: 37px; }

.filters { border-color: var(--arma-line); background: #f9fbfd; }

.product-card {
  border-color: var(--arma-line);
  border-radius: 17px;
  box-shadow: var(--arma-shadow);
}

.product-card:hover { box-shadow: var(--arma-shadow-float); }
.product-card.active-map { border-color: #b9e8da; }
.product-card.mapped { border-right-color: var(--arma-success); }
.product-head h3 { color: var(--arma-ink); font-size: 15px; font-weight: 900; }
.mapping-info { gap: 10px 17px; color: var(--arma-ink-soft); font-size: 10px; }
.mapping-info b { color: var(--arma-ink); }
.inline-error { border: 1px solid #f6d1d5; background: #fff5f6; color: #ad3f4a; font-size: 10px; }

.spec-grid > div, .settings-simple-status > div, .report-status-list > div { border-color: var(--arma-line); background: #fbfcfe; }

.report-hero,
.settings-focus-hero,
.ops-hero,
.import-hero { border-color: #dbe9f8; background: #fff; box-shadow: var(--arma-shadow); }

.report-hero.critical,
.ops-hero.critical { border-color: #f3c9cd; background: #fff8f8; }

.freshness-note { border-color: #d7e8ff; background: #f3f9ff; color: #425775; }
.source-price-box { background: var(--arma-primary); }
.publish-btn { background: var(--arma-primary); }
.publish-btn:hover { background: var(--arma-primary-strong); }
.content-empty-note { border-color: #f2dfa8; background: #fff9e9; color: #8c6514; }

.modern-footer {
  display: flex;
  justify-content: space-between;
  width: min(1540px, calc(100% - 54px));
  margin: 0 auto;
  padding: 0 0 24px;
  color: #9aa5b6;
  font-size: 9px;
}

/* Login --------------------------------------------------------------- */
.auth-page { background: #f5f7fb; }

.auth-shell {
  display: grid;
  min-height: 100svh;
  padding: 32px 20px;
  background: #f5f7fb;
  place-items: center;
}

.login-layout { display: grid; justify-items: center; width: min(100%, 460px); }

.auth-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
  color: var(--arma-ink);
}

.auth-brand__mark { width: 44px; height: 44px; flex: 0 0 44px; }
.auth-brand strong { display: block; font-size: 18px; font-weight: 900; line-height: 1.3; }
.auth-brand span:not(.auth-brand__mark) { display: block; margin-top: 2px; color: var(--arma-muted); font-size: 9px; }

.login-card {
  width: 100%;
  margin: 0;
  padding: 31px 34px 27px;
  border: 1px solid #e7ecf3;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--arma-shadow-float);
  text-align: right;
}

.login-card__intro { margin-bottom: 24px; text-align: center; }
.login-card__icon { display: grid; width: 38px; height: 38px; margin: 0 auto 10px; border-radius: 11px; background: #ebf6ff; color: var(--arma-primary); place-items: center; }
.login-card__icon .ui-icon { width: 19px; height: 19px; }
.login-card h1 { margin: 0; color: var(--arma-ink); font-size: 18px; font-weight: 900; line-height: 1.5; }
.login-card__intro p { margin: 3px 0 0; color: var(--arma-muted); font-size: 10px; }

.login-error { margin-bottom: 14px; text-align: right; }
.auth-form { display: grid; gap: 14px; }
.auth-field { display: grid; gap: 6px; margin: 0 !important; color: #40516b !important; font-size: 11px !important; font-weight: 800 !important; }
.auth-control { position: relative; display: block; }
.auth-control input { min-height: 46px; width: 100%; padding: 10px 42px 10px 12px; border: 1px solid #e0e7f0; border-radius: 11px; background: #fbfcfe; color: var(--arma-ink); font-size: 12px; outline: none; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.auth-control input:focus { border-color: #8ac5ff; background: #fff; box-shadow: 0 0 0 4px rgba(11, 141, 243, .1); }
.auth-control i { position: absolute; top: 50%; right: 13px; display: grid; color: #98a5b7; pointer-events: none; transform: translateY(-50%); }
.auth-control i .ui-icon { width: 18px; height: 18px; }
.auth-submit { min-height: 47px; margin-top: 4px; border-radius: 11px; background: var(--arma-primary); font-size: 12px; }
.auth-submit:hover { background: var(--arma-primary-strong); }
.wide { width: 100%; }
.auth-help { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: var(--arma-muted); font-size: 9px; text-align: center; }
.auth-help__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--arma-success); box-shadow: 0 0 0 3px #e8f8f1; }
.auth-footer { margin-top: 18px; color: #a0aaba; font-size: 9px; text-align: center; }

@media (max-width: 980px) {
  .sidebar {
    width: min(300px, calc(100vw - 46px));
    transform: translateX(105%);
    box-shadow: var(--arma-shadow-float);
  }

  .nav-open .sidebar { transform: translateX(0); }
  .nav-scrim { position: fixed; z-index: 45; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(16, 33, 63, 0); pointer-events: none; transition: background-color .22s ease; }
  .nav-open .nav-scrim { background: rgba(16, 33, 63, .26); pointer-events: auto; }
  .admin-main.with-sidebar { margin-right: 0; }
  .app-topbar { padding: 0 17px; }
  .nav-toggle { display: grid; }
  .admin-content { width: min(100% - 30px, 1540px); }
  .modern-footer { width: calc(100% - 30px); }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}

@media (max-width: 680px) {
  .app-topbar { min-height: 62px; padding: 0 12px; }
  .app-context small,
  .topbar-action { display: none; }
  .mode-chip { min-height: 28px; }
  .admin-content { width: min(100% - 22px, 1540px); padding: 19px 0 34px; }
  .modern-page-head { align-items: flex-start; flex-direction: column; gap: 7px; margin-bottom: 16px; }
  .modern-page-head h1 { font-size: 21px; }
  .persian-now { font-size: 8px; }

  .metric-grid { gap: 9px; }
  .metric-card { min-height: 116px; padding: 13px; }
  .metric-card b { font-size: 21px; }

  .health-list { grid-template-columns: 1fr; }
  .admin-content .card,
  .card { padding: 16px; border-radius: 16px; }
  .section-title { align-items: flex-start; flex-direction: column; gap: 5px; margin-bottom: 13px; }

  .modern-footer { display: grid; gap: 3px; width: calc(100% - 22px); padding-bottom: 18px; text-align: center; }
  .login-card { padding: 27px 21px 23px; border-radius: 18px; }
}

@media (max-width: 390px) {
  .metric-card { padding: 11px; }
  .metric-card small { font-size: 8px; }

  .app-context span { font-size: 12px; }
  .auth-shell { padding-right: 14px; padding-left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Administrative operation progress ---------------------------------- */
.operation-progress {
  position: fixed;
  z-index: 100;
  top: max(14px, env(safe-area-inset-top));
  right: 50%;
  width: min(470px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 14px;
  background: #10213f;
  box-shadow: 0 18px 42px rgba(16, 33, 63, .24);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, -18px);
  transition: opacity .18s ease, transform .18s ease;
}

.operation-progress[hidden] { display: none; }
.operation-progress.is-visible { opacity: 1; transform: translate(50%, 0); }

.operation-progress__card {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 70px;
  padding: 12px 15px 13px;
}

.operation-progress__spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border: 2px solid rgba(255, 255, 255, .28);
  border-top-color: #5bc6ff;
  border-radius: 50%;
  animation: arma-operation-spin .75s linear infinite;
}

.operation-progress__copy { display: grid; gap: 2px; min-width: 0; }
.operation-progress__copy strong { color: #fff; font-size: 12px; font-weight: 900; line-height: 1.55; }
.operation-progress__copy small { color: #d7e8fb; font-size: 9.5px; line-height: 1.75; }

.operation-progress__bar {
  display: block;
  height: 3px;
  overflow: hidden;
  background: rgba(255, 255, 255, .12);
}

.operation-progress__bar i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #24bdf4, #73d8ff, #24bdf4);
  animation: arma-operation-sweep 1.05s ease-in-out infinite;
}

form.is-submitting button[type="submit"],
form.is-submitting button:not([type]),
form.is-submitting input[type="submit"] {
  cursor: wait;
  opacity: .72;
  pointer-events: none;
}

@keyframes arma-operation-spin {
  to { transform: rotate(360deg); }
}

@keyframes arma-operation-sweep {
  from { transform: translateX(155%); }
  to { transform: translateX(-155%); }
}

@media (max-width: 680px) {
  .operation-progress { width: calc(100vw - 20px); top: max(10px, env(safe-area-inset-top)); border-radius: 12px; }
  .operation-progress__card { min-height: 66px; padding: 11px 13px 12px; }
  .operation-progress__copy strong { font-size: 11px; }
  .operation-progress__copy small { font-size: 8.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .operation-progress__spinner,
  .operation-progress__bar i { animation: none; }
}

/* Bulk price refresh ------------------------------------------------- */

.bulk-refresh-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, .75fr);
  gap: 20px;
  align-items: center;
  margin-bottom: 16px;
  padding: 25px 27px;
  border: 1px solid #cfe7ff;
  border-radius: 20px;
  background: linear-gradient(135deg, #f5fbff, #fff 52%, #f6fffb);
  box-shadow: var(--arma-shadow);
}

.bulk-refresh-hero h2 { margin: 0; color: var(--arma-ink); font-size: 21px; font-weight: 900; line-height: 1.55; }
.bulk-refresh-hero p { max-width: 690px; margin: 6px 0 0; color: var(--arma-ink-soft); font-size: 11px; line-height: 2; }

.bulk-refresh-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.bulk-refresh-stats > div { min-height: 92px; padding: 13px 11px; border: 1px solid #e0eaf4; border-radius: 13px; background: rgba(255,255,255,.82); }
.bulk-refresh-stats dt { color: var(--arma-muted); font-size: 9px; font-weight: 800; }
.bulk-refresh-stats dd { margin: 7px 0 0; color: var(--arma-ink); font-size: 18px; font-weight: 900; line-height: 1.3; }

/* Responsive system pass -------------------------------------------- */
html,
body.admin-body { overflow-x: hidden; }

.admin-content > * { min-width: 0; }
.table-wrap,
.table-scroll { -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {

  .admin-content { width: min(100% - 30px, 1540px); }
  .report-overview-grid, .report-history-grid, .bulk-refresh-hero { grid-template-columns: 1fr !important; }
  .bulk-refresh-stats { max-width: 560px; }
  .ops-hero,
  .report-hero,
  .settings-focus-hero { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 700px) {
  .admin-content { width: min(100% - 22px, 1540px); }
  .modern-page-head { align-items: flex-start; }
  .modern-page-head .persian-now { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .section-title { display: grid; gap: 9px; }
  .section-title > :not(:first-child) { justify-self: start; }
  .grid, .grid.two, .import-layout, .advanced-grid, .report-status-list, .settings-simple-status, .health-list { grid-template-columns: 1fr !important; }
  .filters, .actions, .inline-form, .ops-hero-actions { align-items: stretch; }
  .filters { display: grid; grid-template-columns: 1fr; }
  .actions, .inline-form, .ops-hero-actions { flex-direction: column; }
  .actions > *, .inline-form > *, .ops-hero-actions > * { width: 100%; }
  .actions button, .actions .btn, .inline-form button, .inline-form .btn, .ops-hero-actions button, .ops-hero-actions .btn { width: 100%; }

  .inline-form input,
  .inline-form select { width: 100%; min-width: 0; }
  .product-head { flex-direction: column; gap: 10px; }
  .product-head .badges { justify-content: flex-start; }

  .pagination { flex-wrap: wrap; gap: 8px; }
  .pagination .btn { flex: 1 1 140px; }
  .safe-rules { display: grid; grid-template-columns: 1fr; }
  .safe-rules span { white-space: normal; }
  .table-wrap table,
  .table-scroll table,
  .clean-table { min-width: 620px; }
  .table-wrap th,
  .table-scroll th,
  .clean-table th { padding: 10px 9px; font-size: 8.5px; }
  .table-wrap td,
  .table-scroll td,
  .clean-table td { padding: 10px 9px; font-size: 9px; }
  .bulk-refresh-hero { gap: 16px; padding: 20px 17px; border-radius: 17px; }
  .bulk-refresh-hero h2 { font-size: 18px; }
  .bulk-refresh-hero p { font-size: 10px; }

  .bulk-refresh-stats { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bulk-refresh-stats > div { min-height: 78px; padding: 10px 8px; }
  .bulk-refresh-stats dd { font-size: 14px; }

}

@media (max-width: 420px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 108px; padding: 12px; }
  .metric-card b { font-size: 20px; }
  .metric-card small { font-size: 8px; }
  .bulk-refresh-stats { gap: 6px; }
  .bulk-refresh-stats dt { font-size: 8px; }
  .bulk-refresh-stats dd { font-size: 12px; }
}
/* ARMA dashboard inspired by the supplied MasterArma reference: airy overview,
   compact statistics, two real seven-day charts and a clear activity table. */

/* Responsive layout and navigation: override the legacy floating advanced list. */
@media (max-width:980px){
  .sidebar{overflow-x:hidden;overscroll-behavior:contain;padding-bottom:max(24px,env(safe-area-inset-bottom))}
  .side-nav-advanced{width:100%;min-width:0;max-width:100%;overflow:visible;margin:7px 0 0}
  .side-nav-advanced-list{position:static;min-width:0;max-width:100%;z-index:auto;background:#fbfcff;border:0;border-top:1px solid var(--arma-line);border-radius:0;box-shadow:none}
  .side-nav-advanced-list a{color:#35455f;white-space:normal}
  .side-nav-advanced summary{width:100%;min-height:46px;touch-action:manipulation}

}
.admin-content .grid > *, .admin-content .grid.two > *, .admin-content .dashboard-grid > *, .admin-content .import-layout > * {min-width:0}
.admin-content input,.admin-content select,.admin-content textarea{max-width:100%;min-width:0}
.admin-content img{max-width:100%}
.admin-content .table-wrap,.admin-content .table-scroll{max-width:100%;overflow-x:auto}
.bulk-pricing-summary #defaults-form{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.bulk-pricing-summary #defaults-form span{padding:7px 10px;border:1px solid #dce7f5;border-radius:999px;background:#f7fbff;color:#315a85;font-size:11px}
.bulk-product-actions{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}
#items{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,245px),1fr));gap:13px;margin-top:16px}
.bulk-product-card{display:flex;flex-direction:column;gap:9px;margin:0!important;padding:12px!important;min-width:0;border-radius:15px}
.bulk-product-thumb{width:100%;aspect-ratio:4/3;display:grid;place-items:center;overflow:hidden;border-radius:11px;background:#f0f4f9;color:#7b8a9d;font-size:11px;text-align:center}
.bulk-product-thumb img{display:block;width:100%;height:100%;object-fit:contain}
.bulk-product-thumb img:not([src]),.bulk-product-thumb img[src=""]{display:none}
.bulk-product-thumb span{padding:10px}.bulk-product-card label{overflow-wrap:anywhere;line-height:1.7}.bulk-product-card a{display:inline-block;max-width:100%;font-size:10px;direction:ltr}.bulk-product-card input[type="number"]{width:100%}
@media(max-width:700px){
  .admin-content{width:calc(100% - 22px);overflow-wrap:anywhere}
  .card,.import-layout,.ops-hero,.report-hero,.settings-focus-hero{max-width:100%}
  .bulk-product-actions button{flex:1 1 150px;min-height:44px}
  #items{grid-template-columns:repeat(auto-fill,minmax(min(100%,180px),1fr));gap:9px}

}
@media(max-width:390px){#items{grid-template-columns:1fr}}
/* Content that can grow beyond a phone viewport remains inside its own card. */
.admin-content .card pre,.admin-content .codebox{max-width:100%;overflow-x:auto;overflow-wrap:anywhere;white-space:pre-wrap}
.admin-content .card table{max-width:100%}
.admin-content .section-title,.admin-content .actions{min-width:0}
.admin-content .section-title h2,.admin-content .section-title p{overflow-wrap:anywhere}
#net-pricing{scroll-margin-top:86px}
.storage-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.storage-metrics .card{margin:0;min-width:0}
.storage-metrics strong{display:block;font-size:24px;line-height:1.5;color:#185a74;overflow-wrap:anywhere}
.storage-metrics .small{margin-bottom:0}
@media(max-width:1050px){.storage-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.storage-metrics{grid-template-columns:1fr}}
/* Price and stock: three readable cards per desktop row. */
.admin-content .product-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;align-items:start}
.admin-content .product-list>.product-card{min-width:0;margin:0;padding:16px;overflow-wrap:anywhere}
.admin-content .product-list .product-head{display:flex;align-items:flex-start;gap:9px;min-width:0}
.admin-content .product-list .product-head>div:nth-child(2){min-width:0;flex:1}
.admin-content .product-list .product-head h3{line-height:1.65;margin:0 0 5px}
.admin-content .product-list .product-head .meta{word-break:break-all}
.admin-content .product-list .product-head .badge{flex-shrink:0}

.admin-content .product-list .mapping-info{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 12px;line-height:1.7}
.admin-content .product-list .mapping-info>span{min-width:0;overflow-wrap:anywhere}

@media(max-width:1250px){.admin-content .product-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.admin-content .product-list{grid-template-columns:1fr}}
@media(max-width:440px){.admin-content .product-list .mapping-info{grid-template-columns:1fr}.admin-content .product-list .product-head{flex-wrap:wrap}.admin-content .product-list .product-head .badge{margin-right:auto}}

/* ARMA Catalog live extraction */
@keyframes catalogLivePulse{50%{opacity:.45;transform:scale(.88)}}

/* ARMA UI hardening v1.10.6 ------------------------------------------ */
:root {
  --arma-space-1: 6px;
  --arma-space-2: 10px;
  --arma-space-3: 14px;
  --arma-space-4: 18px;
  --arma-space-5: 24px;
  --arma-control-height: 44px;
  --arma-card-border: #e3e9f2;
  --arma-card-bg: #ffffff;
}

.admin-content > *, .admin-content form, .admin-content fieldset, .admin-content .card, .admin-content .grid, .admin-content .row, .admin-content .actions, .admin-content .section-title {
  min-width: 0;
  max-width: 100%;
}

.admin-content .card,
.card {
  overflow-wrap: anywhere;
  border-color: var(--arma-card-border);
}

.admin-content .section-title {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.admin-content .actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--arma-space-2);
}

.admin-content button,
.admin-content .btn {
  min-height: var(--arma-control-height);
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.admin-content input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.admin-content select {
  min-height: var(--arma-control-height);
}

.admin-content input[type="checkbox"],
.admin-content input[type="radio"] {
  width: auto;
  min-width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--arma-primary);
}

.admin-content fieldset {
  margin: 0;
  padding: var(--arma-space-4);
  border: 1px solid var(--arma-line);
  border-radius: var(--arma-radius-md);
}

.admin-content .grid {
  gap: var(--arma-space-3);
}

.admin-content .grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-content .table-wrap,
.admin-content .table-scroll {
  width: 100%;
  border-radius: 12px;
  -webkit-overflow-scrolling: touch;
}

.admin-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.admin-content th,
.admin-content td {
  vertical-align: middle;
}

.admin-content td .btn,
.admin-content td button {
  min-height: 36px;
  padding: 7px 10px;
}

/* Dashboard connector status ---------------------------------------- */

@keyframes connectorPulse { from { opacity: .28; } to { opacity: 1; } }

@media (max-width: 720px) {
  .admin-content .grid.two {
    grid-template-columns: 1fr !important;
  }

  .admin-content .actions {
    align-items: stretch;
  }

  .admin-content .actions > button, .admin-content .actions > .btn {
    flex: 1 1 180px;
  }

}

@media (max-width: 440px) {
  .admin-content .actions > * { width: 100%; flex-basis: 100%; }

}

/* Range pricing is scoped to this administration form. */
.pricing-policy{min-width:0}.pricing-policy fieldset{border:0;padding:0;margin:0;min-width:0}.pricing-policy .grid>div{min-width:0}.pricing-policy .pricing-check{display:flex;align-items:center;gap:8px;margin:16px 0}.pricing-policy .pricing-check input{width:auto;flex:none}.pricing-range-table{min-width:570px}.pricing-range-table input{min-width:100px;direction:ltr;text-align:center}.pricing-policy .pricing-sale{display:block;font-size:clamp(24px,4vw,36px);margin:12px 0;color:var(--brand,#2563eb)}.pricing-summary{display:grid;grid-template-columns:1fr auto;gap:12px}.pricing-summary dd{margin:0;font-variant-numeric:tabular-nums}.pricing-policy input[inputmode]{direction:ltr}.pricing-policy .table-wrap{overflow-x:auto}.pricing-policy [hidden]{display:none}

/* Shared admin containment: no storefront styles or runtime dependencies. */
.settings-navigation{display:flex;gap:6px;flex-wrap:wrap;margin:0 0 10px;padding:7px;background:#fff;border:1px solid var(--arma-line,#e5e7eb);border-radius:14px}.settings-navigation a{padding:10px 14px;border-radius:10px;color:#475467;text-decoration:none;white-space:nowrap;font-size:12px;font-weight:700}.settings-navigation a[aria-current]{background:#edf4ff;color:#175cd3}.settings-context{font-size:12px;line-height:2;color:#667085;margin:0 0 18px}.admin-content, .admin-content .card, .admin-content .grid>* {min-width:0}.admin-content .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-inline:contain;-webkit-overflow-scrolling:touch}.admin-content pre{max-width:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}.admin-content img{max-width:100%;height:auto}.admin-content :is(input,textarea,select){max-width:100%;box-sizing:border-box}.admin-content :is(button,a,input,textarea,select):focus-visible{outline:2px solid #2563eb;outline-offset:3px}.admin-content .inline-error,.admin-content .err{overflow-wrap:anywhere}
@media(max-width:720px){.settings-navigation{flex-wrap:nowrap;overflow-x:auto;max-width:100%}.settings-navigation a{flex:none;padding:11px 13px}.admin-content :is(button,.btn){min-height:42px}.admin-content :is(input,textarea,select){font-size:16px}.admin-content .page-head{gap:12px;flex-wrap:wrap}.admin-content .section-title{gap:12px;flex-wrap:wrap}.admin-content .grid {grid-template-columns:1fr}.admin-content .table-wrap table{min-width:600px}.admin-content .pricing-range-table{min-width:570px}}
@media(prefers-reduced-motion:reduce){.admin-body *, .admin-body *::before,.admin-body *::after{scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important}}

/* Consistent administration forms and independent price presentation. */
.admin-content .card{padding:clamp(16px,1.8vw,24px);border-radius:18px;margin-block-end:18px}.admin-content .card>h2,.admin-content .card>h3{margin-block:0 14px}.admin-content form :is(label,.small){line-height:1.8}.admin-content form label{margin-block:10px 6px}.admin-content form :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){min-height:44px;border-radius:10px}.admin-content form :is(input[readonly],select:disabled){background:#f4f6f9;color:#667085}.admin-content .grid{gap:18px}.admin-content .pricing-check{display:flex;align-items:center;gap:8px}.admin-content .pricing-check input{width:auto;flex:none;min-height:0}.pricing-main-card>fieldset>.grid{grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}.pricing-global-summary{display:flex;flex-wrap:wrap;gap:8px 14px;margin:14px 0;padding:12px;background:#f5f8fc;border-radius:12px;font-size:12px}.pricing-global-summary span{font-variant-numeric:tabular-nums}.pricing-global-summary a{font-weight:700}.pricing-panel .grid{margin-top:10px}.stock-panel .discount-extra{margin-top:10px;padding:14px;border:1px solid #dbe6f7;border-radius:12px;background:#f7faff}.discount-extra[hidden]{display:none!important}.pricing-display-example{align-self:center;padding:18px;background:#f5f8fc;border-radius:14px;line-height:1.9}.live-pricing[data-price-presentation]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;padding:14px;margin-top:14px;border:1px solid #d9e8f8;border-radius:14px;background:#fff}.live-pricing[data-price-presentation]>span{grid-column:1/-1;font-size:11px;color:#667085}.live-pricing[data-price-presentation]>div{min-width:0;display:flex;flex-direction:column;gap:7px}.live-pricing[data-price-presentation] b{font-size:clamp(16px,1.4vw,22px);overflow-wrap:anywhere;color:#175cd3}.live-pricing[data-price-presentation] #live-regular{color:#667085;text-decoration:line-through}.live-pricing[data-price-presentation] small{font-size:11px}.live-pricing.is-error{border-color:#f3b4ae}.admin-content .card hr{border:0;border-top:1px solid #edf0f5;margin-block:22px}.import-read-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:16px;align-items:end}
@media(max-width:980px){.pricing-main-card>fieldset>.grid{grid-template-columns:1fr}.admin-content .import-layout{grid-template-columns:minmax(0,1fr)}.admin-content .sticky-publish{position:static}}
@media(max-width:720px){.admin-content .card{padding:16px;border-radius:14px;margin-block-end:14px}.admin-content .grid{gap:12px}.import-read-form{grid-template-columns:1fr}.import-read-form button{width:100%}.pricing-global-summary{gap:8px;flex-direction:column}.live-pricing[data-price-presentation]{grid-template-columns:1fr 1fr;padding:12px}.pricing-policy .actions{display:flex;flex-direction:column}.pricing-policy .actions button{width:100%}.settings-simple-status{grid-template-columns:1fr}}

/* Product workspace uses only local data and existing administration controls. */
.store-detail{display:grid;grid-template-columns:minmax(110px,.8fr) minmax(0,1.4fr);gap:10px 14px;margin:18px 0;line-height:1.9}.store-detail dt{color:#667085}.store-detail dd{margin:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums}.store-receipts .badge{white-space:normal}.store-receipts form{margin:0}.store-receipts .actions{margin-top:14px;flex-wrap:wrap}.store-receipts .err{overflow-wrap:anywhere}.admin-content .store-receipts>section{min-width:0}@media(max-width:720px){.store-detail{grid-template-columns:1fr;gap:5px}.store-detail dd{margin-bottom:10px}.store-receipts{grid-template-columns:1fr!important}.store-receipts .actions>*{width:100%}.store-receipts button{width:100%}}

/* ARMA UI 1.11.1-BETA21: locally hosted type and matching login skin.
   Login uses this shared stylesheet directly; no PHP template changes needed. */
@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('admin/assets/fonts/Vazirmatn.woff2') format('woff2'), url('admin/assets/fonts/Vazirmatn.ttf') format('truetype');
}
body.auth-page {
  --arma-primary: #275df2;
  --arma-primary-strong: #1e49ce;
  --arma-ink: #19263d;
  --arma-muted: #5d6b80;   /* 5.4:1 on white (was #75849a, 3.8:1) */
  --arma-font: 'Vazirmatn', Tahoma, Arial, sans-serif;
  --arma-shadow-float: 0 20px 50px rgb(41 60 97 / 8%);
  font-family: var(--arma-font);
  background: #f5f7fb;
}
.auth-page .auth-shell { background: #f5f7fb; }
.auth-page .auth-brand__mark { background: #1e49ce; border-radius: 12px; box-shadow: 0 6px 13px #315de42b; }
.auth-page .auth-brand__mark i { background: #c6d7ff; }
.auth-page .auth-brand__mark i:nth-child(2) { background: #fff; }
.auth-page .login-card { border-color: #e7ebf2; border-radius: 16px; }
.auth-page .login-card__icon { background: #eef3ff; color: #275df2; }
.auth-page .auth-control input { background: #f9fbfe; border-color: #e1e7f0; border-radius: 10px; font-family: inherit; font-size: 14px; }
.auth-page .auth-control input:focus { background: #fff; border-color: #9db9ff; box-shadow: 0 0 0 3px #275df214; }
.auth-page .auth-submit { background: #275df2; border-color: #275df2; border-radius: 10px; box-shadow: 0 4px 10px #275df214; }
.auth-page .auth-submit:hover { background: #1e49ce; transform: none; }
.auth-page :focus-visible { outline: 3px solid #275df250; outline-offset: 3px; }
@media (max-width: 720px) {
  .auth-page .auth-control input { font-size: 16px; }
}

/* Optional channel publication follows the existing administration layout. */
.channel-settings-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.channel-settings-card{min-width:0}.channel-settings-card fieldset{border:0;padding:0;margin:0;min-width:0}.channel-picker{border:1px solid #dde5f0;border-radius:14px;padding:16px;margin:18px 0;background:#f8faff;min-width:0}.channel-picker legend{font-weight:700;padding:0 6px}.channel-options{display:flex;gap:12px;flex-wrap:wrap;margin:12px 0}.channel-options label{display:flex;gap:8px;align-items:center;margin:0;padding:10px 12px;border:1px solid #dfe6f0;border-radius:10px;background:#fff}.channel-options input,.channel-enabled input{width:auto;min-width:16px;margin:0}.channel-options small{display:block;font-size:11px;color:#66758d}.channel-enabled{display:flex;align-items:center;gap:8px}.channel-settings-card textarea{resize:vertical}.channel-settings-card input,.channel-settings-card select,.channel-settings-card textarea{max-width:100%}@media(max-width:1100px){.channel-settings-grid{grid-template-columns:1fr}}@media(max-width:480px){.channel-options{display:grid;grid-template-columns:1fr}.channel-picker{padding:12px}}
