:root {
  --bg: #f4f6f9;
  --card: #fff;
  --text: #172033;
  --muted: #64748b;
  --line: #dbe2ea;
  --primary: #155eef;
  --primary-dark: #0f46bd;
  --success: #087a55;
  --warning: #9a6700;
  --danger: #b42318;
  --info: #175cd3;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--panel-font, Tahoma, Arial, sans-serif); line-height: 1.7; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }
button, .button { border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--text); padding: .62rem 1rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; text-decoration: none; }
button:hover, .button:hover { border-color: #aab7c5; text-decoration: none; }
button.primary, .button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
button.primary:hover, .button.primary:hover { background: var(--primary-dark); }
button.danger, .button.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
button.ghost, .button.ghost { background: transparent; }
button.large { padding: .8rem 1.4rem; font-weight: 700; }
button.small { padding: .35rem .65rem; font-size: .85rem; }
button:disabled { opacity: .55; cursor: not-allowed; }
code, pre, .ltr { direction: ltr; unicode-bidi: embed; text-align: left; }
.block { display: block; overflow-wrap: anywhere; padding: .65rem; background: #f7f9fc; border: 1px solid var(--line); border-radius: 8px; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.4rem; padding: .75rem 4vw; background: #0f172a; color: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.15); }
.topbar a { color: #e5eefc; }
.topbar .brand { font-weight: 800; margin-left: auto; color: #fff; }
.topbar nav { display: flex; gap: 1.1rem; flex-wrap: wrap; }
.link-button { border: 0; background: transparent; color: #fff; padding: .2rem; }
.inline-form { display: inline; margin: 0; }
.container { width: min(1400px, 94vw); margin: 2rem auto 4rem; }
.auth-container { max-width: 520px; margin-top: 8vh; }
.auth-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 2rem; box-shadow: var(--shadow); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.page-head h1 { margin: 0 0 .25rem; font-size: 1.7rem; }
.head-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.muted { color: var(--muted); margin-top: .25rem; }
.small-text { font-size: .82rem; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 1.15rem; box-shadow: var(--shadow); margin: 1rem 0; }
.card.prominent { border: 2px solid #f0bd4e; }
.card.danger-border { border-color: #f4a8a3; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .9rem; }
.card-head h2 { margin: 0; font-size: 1.16rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 1rem; display: flex; flex-direction: column; box-shadow: var(--shadow); color: var(--text); }
.stat strong { font-size: 1.8rem; }
.stat.warning { border-right: 5px solid #f3b624; }
.stat.success { border-right: 5px solid #15a675; }
.stat.danger { border-right: 5px solid #e04f45; }
.stat.neutral { border-right: 5px solid #94a3b8; }
.badge, .status { display: inline-flex; align-items: center; border-radius: 999px; padding: .18rem .58rem; font-size: .8rem; font-weight: 700; white-space: normal; }
.status-warning, .badge.warning { background: #fff4d6; color: #7a4d00; }
.status-success, .badge.success { background: #ddf8ed; color: #066044; }
.status-danger, .badge.danger { background: #fee4e2; color: #912018; }
.status-info, .badge.info { background: #e4edff; color: #164c96; }
.status-neutral, .badge.neutral { background: #eef2f6; color: #475569; }
.status-muted { background: #f2f4f7; color: #667085; }
.flash-stack { display: grid; gap: .6rem; margin-bottom: 1rem; }
.flash { padding: .75rem 1rem; border-radius: 10px; border: 1px solid; }
.flash-success { background: #e8f8f2; border-color: #85d7bc; color: #065f46; }
.flash-danger { background: #fff0ef; border-color: #f4a8a3; color: #8b1a13; }
.flash-warning { background: #fff7df; border-color: #f2cc69; color: #73510b; }
.notice { padding: .8rem 1rem; border-radius: 10px; margin: .8rem 0; }
.notice.danger { background: #fff0ef; color: #8b1a13; border: 1px solid #f4a8a3; }
.notice.warning { background: #fff7df; color: #73510b; border: 1px solid #f2cc69; }
.stack-form { display: grid; gap: .9rem; }
.form-grid { display: grid; gap: 1rem; }
.form-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
label { display: grid; gap: .35rem; font-weight: 700; color: #344054; }
label small, small { font-weight: 400; color: var(--muted); }
input, select, textarea { width: 100%; border: 1px solid #c9d3df; border-radius: 9px; padding: .65rem .75rem; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(21,94,239,.12); border-color: var(--primary); }
textarea { resize: vertical; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.switch-row { display: flex; align-items: center; gap: .5rem; }
.switch-row input { width: auto; }
.action-bar { position: sticky; bottom: 0; z-index: 10; display: flex; gap: .8rem; justify-content: flex-start; padding: 1rem; background: rgba(244,246,249,.95); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.filter-bar { display: grid; grid-template-columns: 1fr 260px auto auto; gap: .7rem; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: .75rem; border-bottom: 1px solid var(--line); vertical-align: top; text-align: right; }
th { color: #475569; background: #f8fafc; font-size: .86rem; }
tr:hover td { background: #fbfdff; }
.empty { padding: 2rem; text-align: center; color: var(--muted); }
.otp-list { display: grid; gap: .8rem; }
.otp-row { border: 1px solid #f0cf7a; background: #fffdf6; border-radius: 12px; padding: .8rem; display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.otp-info { display: flex; flex-wrap: wrap; align-items: center; gap: .7rem 1.2rem; }
.request-link { font-weight: 800; direction: ltr; }
.quick-otp { display: flex; gap: .5rem; align-items: center; }
.quick-otp input { width: 135px; }
.otp-form { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; }
.otp-form label { min-width: 220px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; }
.summary-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .9rem; display: grid; gap: .35rem; }
.summary-card span:first-child { color: var(--muted); font-size: .82rem; }
.request-id { font-size: 1rem; color: var(--muted); overflow-wrap: anywhere; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.two-col.compact .card, .two-col.compact form { margin: 0; }
.json-view, .pem-view { direction: ltr; text-align: left; background: #0b1020; color: #d7e1f3; padding: 1rem; border-radius: 9px; max-height: 520px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.meta-list { margin: 0; }
.meta-list div { display: grid; grid-template-columns: 130px 1fr; gap: .6rem; padding: .45rem 0; border-bottom: 1px dashed var(--line); }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.timeline li { border-right: 3px solid #cbd5e1; padding: .2rem .9rem .7rem 0; }
.timeline li > div { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.timeline time { color: var(--muted); font-size: .82rem; }
.error-text { color: var(--danger); margin: .3rem 0 0; }
.check-grid { display: grid; gap: .6rem; }
.check-row { display: grid; grid-template-columns: 14px 200px 1fr; gap: .7rem; align-items: center; }
.dot { width: 11px; height: 11px; border-radius: 50%; background: #94a3b8; }
.dot.ok { background: #10a879; }
.dot.bad { background: #d92d20; }
.danger-zone { border-color: #efb0ac; }
.danger-zone summary, details summary { cursor: pointer; font-weight: 700; }
.hidden { display: none !important; }
@media (max-width: 980px) {
  .topbar { flex-wrap: wrap; }
  .topbar .brand { width: 100%; margin-left: 0; }
  .stats-grid, .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
  .otp-row { grid-template-columns: 1fr; }
  .form-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .span-3 { grid-column: span 2; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .container { width: 96vw; margin-top: 1rem; }
  .topbar { position: static; padding: .75rem 1rem; }
  .topbar nav { width: 100%; gap: .7rem; }
  .page-head { flex-direction: column; }
  .stats-grid, .summary-grid, .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .span-2, .span-3 { grid-column: span 1; }
  .filter-bar { grid-template-columns: 1fr; }
  .quick-otp, .otp-form { align-items: stretch; flex-direction: column; }
  .quick-otp input { width: 100%; }
  .action-bar { position: static; flex-direction: column; }
  .check-row { grid-template-columns: 14px 1fr; }
  .check-row small { grid-column: 2; }
}

.app-footer {
  max-width: 1400px;
  margin: 1rem auto 2rem;
  padding: 0 1rem;
  color: var(--muted, #64748b);
  font-size: .85rem;
  text-align: center;
}
.pre-wrap { white-space: pre-wrap; }

.poll-controls { display: flex; flex-wrap: wrap; gap: .65rem; align-items: center; margin-top: 1rem; }
.poll-controls form { margin: 0; }
.warning-text { color: #8a4b00; }
.checkbox-line { display: flex; gap: .65rem; align-items: flex-start; }
.checkbox-line input { width: auto; margin-top: .25rem; }

.operation-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 0 0 1rem;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.operation-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .55rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  text-decoration: none;
  font-weight: 700;
  color: var(--text);
  background: #f7f9fc;
}
.operation-tab.active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}
.operation-tab.danger-tab.active {
  background: var(--danger);
  border-color: var(--danger);
}
code { direction: ltr; unicode-bidi: embed; }

.admin-chip{display:flex;flex-direction:column;align-items:flex-start;padding:.35rem .7rem;border:1px solid var(--border,#d9dee7);border-radius:.65rem;background:#fff;line-height:1.2}.admin-chip span{font-weight:700}.admin-chip small{color:#667085;font-size:.72rem}.compact-form{min-width:260px;margin-top:.75rem}

/* دفترچه کاربران و سرویس‌ها */
.check-stack { display: grid; gap: .55rem; align-content: start; padding: .55rem .75rem; border: 1px dashed var(--line); border-radius: 10px; background: #fbfcfe; }
.input-action { display: grid; grid-template-columns: minmax(150px, 1fr) auto; gap: .5rem; align-items: center; }
.customers-filter { grid-template-columns: 1fr 220px auto auto; }
.section-title { display: flex; align-items: center; gap: .7rem; margin-top: 1.7rem; }
.section-title h2 { margin: 0; }
.service-card { scroll-margin-top: 90px; }
.service-card .subhead { margin-top: 1.2rem; }
.service-card .subhead h3 { margin: 0; font-size: 1rem; }
.compact-table { min-width: 920px; }
.compact-table th, .compact-table td { padding: .55rem; }
.muted-row td { opacity: .62; background: #f7f8fa; }
.inline-ip-form { display: flex; gap: .4rem; align-items: center; min-width: 240px; }
.inline-ip-form input { min-width: 135px; }
.inline-details { margin-top: .85rem; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .85rem; }
.compact-form-row { margin-top: .8rem; align-items: end; }
.compact-timeline { margin-top: .8rem; }
.compact-empty { padding: 1rem; }
.inline-action { margin-top: 1rem; }
.customer-summary { margin-bottom: 1rem; }
.linked-customer-card { border-right: 5px solid var(--primary); }
.narrow-card { max-width: 680px; margin-inline: auto; }
.conversion-result { margin-top: 1rem; display: grid; grid-template-columns: auto 1fr auto auto; gap: .8rem; align-items: center; padding: 1rem; border: 1px solid #90d6bd; background: #effbf6; border-radius: 11px; }
.conversion-result strong { font-size: 1.25rem; }

@media (max-width: 760px) {
  .customers-filter { grid-template-columns: 1fr; }
  .input-action { grid-template-columns: 1fr; }
  .inline-ip-form { flex-direction: column; align-items: stretch; }
  .conversion-result { grid-template-columns: 1fr; }
}


/* ساختار مدیریتی نسخه 0.1.13 */
:root {
  --sidebar-width: 258px;
  --surface-soft: #f7f8fb;
  --surface-raised: #ffffff;
  --nav-bg: #111827;
  --nav-hover: #1f2937;
  --nav-active: #2563eb;
}
html { min-height: 100%; }
body { min-height: 100vh; background: #f3f5f8; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); direction: rtl; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 60;
  display: flex; flex-direction: column; background: var(--nav-bg); color: #e5e7eb;
  border-left: 1px solid rgba(255,255,255,.08); box-shadow: -8px 0 30px rgba(15,23,42,.08);
}
.sidebar-brand { min-height: 76px; display: flex; align-items: center; gap: .6rem; padding: 1rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand > a { color: #fff; display: flex; align-items: center; gap: .75rem; flex: 1; }
.sidebar-brand > a:hover { text-decoration: none; }
.sidebar-brand span:last-child { display: grid; line-height: 1.25; }
.sidebar-brand small { color: #94a3b8; font-size: .72rem; font-weight: 400; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(145deg,#3b82f6,#1d4ed8); color: #fff; font-weight: 900; box-shadow: 0 8px 20px rgba(37,99,235,.3); }
.sidebar-close { display: none; border: 0; color: #cbd5e1; background: transparent; font-size: 1.6rem; padding: 0 .25rem; }
.sidebar-nav { padding: .8rem; display: grid; gap: .18rem; }
.sidebar-nav .nav-label { margin: 1rem .75rem .35rem; color: #64748b; font-size: .68rem; font-weight: 800; letter-spacing: .03em; }
.sidebar-nav a { color: #cbd5e1; min-height: 41px; display: flex; align-items: center; padding: .55rem .8rem; border-radius: 9px; font-size: .9rem; font-weight: 650; }
.sidebar-nav a:hover { color: #fff; background: var(--nav-hover); text-decoration: none; }
.sidebar-nav a.active { color: #fff; background: var(--nav-active); box-shadow: 0 6px 16px rgba(37,99,235,.22); }
.sidebar-account { margin-top: auto; padding: .9rem; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: .65rem; border-top: 1px solid rgba(255,255,255,.08); background: rgba(0,0,0,.12); }
.account-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: #334155; color: #fff; font-weight: 800; }
.account-meta { min-width: 0; display: grid; line-height: 1.25; }
.account-meta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .82rem; }
.account-meta small { color: #94a3b8; font-size: .7rem; }
.sidebar-account form { margin: 0; }
.icon-button { color: #cbd5e1; background: transparent; border-color: #475569; padding: .35rem .55rem; font-size: .72rem; }
.icon-button:hover { color: #fff; border-color: #94a3b8; }
.workspace { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.mobile-header { display: none; }
.sidebar-backdrop { display: none; }
.container { width: min(1480px, calc(100% - 3rem)); margin: 1.65rem auto 3rem; }
.page-head { background: transparent; padding: .1rem 0 .4rem; align-items: center; }
.page-head h1 { font-size: 1.55rem; letter-spacing: -.02em; }
.page-head p { max-width: 780px; }
.card { border-radius: 12px; box-shadow: 0 2px 10px rgba(15,23,42,.045); padding: 1.1rem 1.15rem; }
.card-head { min-height: 34px; }
.card-head h2 { font-size: 1.05rem; }
button, .button { border-radius: 8px; min-height: 38px; font-weight: 650; }
input, select, textarea { border-radius: 8px; min-height: 41px; background: #fff; }
textarea { min-height: auto; }
table { background: #fff; }
th { background: #f6f7f9; color: #475569; font-weight: 750; border-bottom: 1px solid #d9e0e8; }
td { color: #273244; }
tr:last-child td { border-bottom: 0; }
.table-wrap { border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.table-wrap table { border: 0; }
.summary-card { border-radius: 10px; box-shadow: none; background: #fbfcfe; }
.stat { border-radius: 11px; box-shadow: 0 2px 10px rgba(15,23,42,.04); }
.flash { box-shadow: 0 4px 18px rgba(15,23,42,.05); }
.action-bar { border: 1px solid var(--line); border-radius: 11px; margin-top: 1rem; bottom: .75rem; }
.app-footer { margin-top: auto; padding: 1rem 1.5rem 1.6rem; }
.version-chip { font-size: .72rem; color: #64748b; background: #eef2f6; border-radius: 999px; padding: .18rem .55rem; }
.kpi-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .85rem; margin-bottom: 1rem; }
.kpi { padding: .95rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 11px; display: grid; gap: .2rem; }
.kpi small { color: var(--muted); }
.kpi strong { font-size: 1.45rem; }
.filter-panel { display: grid; grid-template-columns: minmax(220px,1.4fr) repeat(3,minmax(150px,.7fr)) auto auto; gap: .65rem; align-items: end; margin-bottom: 1rem; }
.filter-panel label { font-size: .78rem; }
.period-cell { display: grid; gap: .1rem; min-width: 155px; }
.period-cell small { color: var(--muted); }
.owner-cell { display: grid; gap: .12rem; }
.owner-cell small { color: var(--muted); }
.font-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.font-card { margin: 0; display: grid; gap: .8rem; }
.font-preview { min-height: 95px; display: grid; place-items: center; text-align: center; padding: 1rem; border: 1px dashed #cbd5e1; border-radius: 10px; background: #fafbfc; font-size: 1.15rem; }
.font-meta { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; font-size: .78rem; }
.font-meta div { background: #f7f8fa; border-radius: 7px; padding: .45rem .55rem; }
.font-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.upload-panel { max-width: 900px; }
.current-font-banner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 11px; padding: .8rem 1rem; margin-bottom: 1rem; }

@media (max-width: 1180px) {
  .font-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-panel { grid-template-columns: 1fr 1fr 1fr; }
  .filter-panel .wide { grid-column: span 2; }
  .kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(300px,86vw); transform: translateX(-105%); transition: transform .2s ease; }
  html[dir="rtl"] .sidebar { inset: 0 0 0 auto; transform: translateX(105%); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: inline-flex; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(15,23,42,.48); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .mobile-header { position: sticky; top: 0; z-index: 40; min-height: 58px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8rem; padding: .65rem 1rem; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
  .menu-button { min-height: 36px; width: 40px; padding: 0; font-size: 1.15rem; }
  .container { width: min(100% - 1.5rem, 1480px); margin-top: 1rem; }
}
@media (max-width: 680px) {
  .font-grid, .kpi-grid { grid-template-columns: 1fr; }
  .filter-panel { grid-template-columns: 1fr; }
  .filter-panel .wide { grid-column: auto; }
  .current-font-banner { align-items: flex-start; flex-direction: column; }
  .container { width: min(100% - 1rem, 1480px); }
  .card { padding: .9rem; }
}
.block-subtle { display: block; margin-top: .18rem; color: var(--muted); font-size: .76rem; }

/* v0.1.14: انتخاب سریع سرویس، دیتاسنتر و جست‌وجوی زنده */
.ajax-search-state{min-width:110px;color:var(--muted,#64748b);font-size:.82rem;align-self:center}
.service-picker{border:1px solid #cbd5e1;background:linear-gradient(180deg,#fff,#f8fafc)}
.service-summary{margin-top:1rem;border:1px solid #dbe3ee;border-radius:14px;background:#fff;padding:1rem}
.service-summary.empty-summary{background:#f8fafc;color:#64748b;text-align:center;padding:1.25rem}
.service-summary-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;padding-bottom:.8rem;border-bottom:1px solid #e2e8f0}
.service-summary-head>div{display:grid;gap:.25rem}.service-summary-head small{color:#64748b}
.service-summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin-top:.9rem}
.service-summary-grid>div{display:grid;gap:.2rem;border:1px solid #e2e8f0;border-radius:10px;padding:.7rem;background:#f8fafc;min-width:0}
.service-summary-grid small{color:#64748b}.service-summary-grid b{overflow-wrap:anywhere}
.compact-notice{margin:.8rem 0 0}
.service-ip-picker{margin-top:1rem}.service-ip-picker-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:.6rem}
.ip-choice-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}
.ip-choice{display:grid!important;grid-template-columns:auto 1fr;align-items:center;column-gap:.55rem;row-gap:.15rem;border:1px solid #dbe3ee;border-radius:10px;padding:.65rem;background:#fff;cursor:pointer}
.ip-choice input{grid-row:1/3}.ip-choice span{font-weight:700;overflow-wrap:anywhere}.ip-choice small{color:#64748b}
.subnet-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}
.subnet-card{border:1px solid #dbe3ee;border-radius:14px;padding:1rem;background:#fff;display:grid;gap:.85rem}
.subnet-card header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.subnet-card header>div{display:grid;gap:.3rem}.subnet-card code{direction:ltr;text-align:left;overflow-wrap:anywhere}
.capacity-bar{height:10px;background:#e2e8f0;border-radius:999px;overflow:hidden}.capacity-bar span{display:block;height:100%;background:#0f766e;border-radius:inherit;max-width:100%}
.mini-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem;margin:0}.mini-stats>div{background:#f8fafc;border-radius:9px;padding:.55rem;text-align:center}.mini-stats dt{color:#64748b;font-size:.75rem}.mini-stats dd{margin:.2rem 0 0;font-weight:800}
.allocation-list{display:grid;gap:.45rem;margin-top:.55rem}.allocation-list>div{display:grid;grid-template-columns:1.2fr 1fr auto;gap:.5rem;align-items:center;border-bottom:1px solid #eef2f7;padding:.35rem 0}.allocation-list small{color:#64748b}
@media (max-width:900px){.service-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.subnet-grid{grid-template-columns:1fr}.ip-choice-list{grid-template-columns:1fr}.mini-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:560px){.service-summary-grid{grid-template-columns:1fr}.service-summary-head{flex-direction:column}.allocation-list>div{grid-template-columns:1fr}}

/* v0.1.15: ظرفیت واقعی IP، انتخاب درخواست مرجع و بازبینی واکنش‌گرایی */
.workspace-header {
  position: sticky;
  top: 0;
  z-index: 35;
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
  padding: .7rem 1.4rem;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 3px 14px rgba(15, 23, 42, .045);
  backdrop-filter: blur(12px);
}
.workspace-title { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.workspace-title > div { display: grid; line-height: 1.25; min-width: 0; }
.workspace-title b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-title small { color: var(--muted); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-header .menu-button { display: none; }
.live-clock { display: grid; grid-template-columns: auto auto; align-items: center; gap: .3rem .75rem; color: #344054; }
.live-clock span { font-size: .78rem; color: var(--muted); }
.live-clock b { font-size: .92rem; letter-spacing: .04em; }
.workspace-header .version-chip { white-space: nowrap; }

/* وضعیت‌ها به‌جای کپسول‌های بزرگ، برچسب‌های کوچک و منظم هستند. */
.badge, .status {
  border-radius: 6px;
  padding: .12rem .42rem;
  min-height: 22px;
  line-height: 1.35;
  font-size: .72rem;
  font-weight: 750;
  white-space: nowrap;
  vertical-align: middle;
}
.card-head > .badge, .page-head .badge { flex: 0 0 auto; }

.operation-picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.operation-picker-grid.with-request { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.request-target-summary {
  margin-top: .85rem;
  border: 1px solid #cfe0f5;
  border-radius: 11px;
  padding: .85rem;
  background: #f8fbff;
}
.request-target-summary.empty-summary { color: var(--muted); text-align: center; border-style: dashed; }
.request-target-summary.empty-summary p { margin: 0; }
.request-target-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; padding-bottom: .65rem; border-bottom: 1px solid #dbe8f6; }
.request-target-head > div { display: grid; gap: .2rem; min-width: 0; }
.request-target-head strong { overflow-wrap: anywhere; }
.request-target-head small { color: var(--muted); }
.request-target-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; margin-top: .7rem; }
.request-target-grid > div { display: grid; gap: .15rem; min-width: 0; padding: .55rem .6rem; border: 1px solid #e1eaf4; border-radius: 8px; background: #fff; }
.request-target-grid small { color: var(--muted); }
.request-target-grid b { overflow-wrap: anywhere; }

.kpi > span { color: var(--muted); font-size: .72rem; }
.accessed-ip-table .ip-range-value { display: inline-block; max-width: 320px; overflow-wrap: anywhere; }
.responsive-table { max-width: 100%; }
.toolbar { display: flex; align-items: end; gap: .7rem; flex-wrap: wrap; }
.toolbar .grow { flex: 1 1 320px; }

@media (max-width: 1180px) {
  .operation-picker-grid.with-request { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-target-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-header { grid-template-columns: minmax(200px, 1fr) auto; }
  .workspace-header .version-chip { display: none; }
}

@media (max-width: 900px) {
  .workspace-header {
    min-height: 58px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: .55rem .8rem;
  }
  .workspace-header .menu-button { display: inline-flex; width: 40px; min-height: 36px; padding: 0; }
  .workspace-title small { display: none; }
  .live-clock { grid-template-columns: 1fr; gap: 0; text-align: left; }
  .live-clock span { font-size: .68rem; }
  .live-clock b { font-size: .82rem; }
  .mobile-header { display: none !important; }
  .container { margin-top: .9rem; }
}

@media (max-width: 680px) {
  .workspace-header { position: sticky; top: 0; }
  .workspace-title b { font-size: .82rem; }
  .live-clock span { max-width: 155px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .operation-picker-grid,
  .operation-picker-grid.with-request,
  .request-target-grid { grid-template-columns: 1fr; }
  .request-target-head { flex-direction: column; }
  .page-head .head-actions, .head-actions { width: 100%; }
  .head-actions .button, .head-actions button { flex: 1 1 auto; }
  .card-head { align-items: flex-start; }
  .card-head > div { min-width: 0; }
  .badge, .status { font-size: .68rem; padding: .1rem .35rem; }
  .table-wrap { border-radius: 8px; }
  table { min-width: 680px; }
  .action-bar button, .action-bar .button { width: 100%; }
}

@media (max-width: 420px) {
  .workspace-header { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .live-clock { display: flex; align-items: center; justify-content: space-between; text-align: right; padding-right: 48px; }
  .live-clock span { max-width: 190px; }
  .workspace-title { position: absolute; top: .55rem; right: .65rem; max-width: calc(100% - 1.3rem); }
  .workspace-header { padding-top: 3rem; }
  .container { width: calc(100% - .7rem); }
  .card { padding: .75rem; }
}

/* v0.1.16: صفحه دسترسی ایران، سرویس‌های صفحه‌بندی‌شده و اصلاح موبایل پرونده */
.access-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.access-control-grid { align-items: start; }
.wrap-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.wrap-actions form { margin: 0; }
.compact-meta div { grid-template-columns: 120px minmax(0, 1fr); }
.access-records { display: grid; gap: .75rem; margin-top: .9rem; }
.access-record {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: .9rem;
  min-width: 0;
}
.access-record.is-inactive { opacity: .66; background: #f8fafc; }
.access-record-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .8rem; }
.access-record-head > div { min-width: 0; display: grid; gap: .25rem; }
.access-record-head small { color: var(--muted); }
.access-range { font-size: .92rem; overflow-wrap: anywhere; white-space: normal; }
.access-record-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; margin-top: .75rem; }
.access-record-grid > div { min-width: 0; display: grid; gap: .18rem; padding: .55rem; background: #f8fafc; border: 1px solid #edf1f5; border-radius: 8px; }
.access-record-grid span { color: var(--muted); font-size: .72rem; }
.access-record-grid b, .access-record-grid small { overflow-wrap: anywhere; }
.access-record-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .75rem; }
.access-record-actions form { margin: 0; }
.record-notes { margin: .65rem 0 0; padding: .55rem .65rem; border-right: 3px solid #cbd5e1; background: #f8fafc; }
.result-details { flex: 1 1 100%; margin: .2rem 0 0; }
.node-result-list { display: grid; gap: .4rem; margin-top: .6rem; }
.node-result-list > div { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .45rem .55rem; border: 1px solid var(--line); border-radius: 8px; }
.ajax-pagination { display: flex; align-items: center; justify-content: center; gap: .7rem; margin-top: 1rem; }
.ajax-pagination button { min-width: 80px; }

.customer-services-section { margin-top: 1rem; }
.customer-service-filter { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem; }
.customer-service-filter label { min-width: 170px; }
.customer-service-filter .grow { flex: 1 1 320px; }
.service-list-summary { display: flex; justify-content: space-between; align-items: center; margin: .7rem 0; }
.service-list-summary > div { display: flex; gap: .6rem; align-items: center; }
.compact-service-card { padding: .9rem 1rem; }
.service-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem; }
.service-card-title { display: flex; gap: .65rem; align-items: center; min-width: 0; }
.service-card-title h3 { margin: 0; font-size: 1rem; }
.service-identifier { margin: .15rem 0 0; color: var(--muted); overflow-wrap: anywhere; }
.service-type-mark { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 9px; background: #e8f0ff; color: #1d4ed8; font-weight: 900; }
.service-facts { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; margin-top: .75rem; }
.service-facts > div { display: grid; gap: .15rem; min-width: 0; padding: .5rem .55rem; background: #f8fafc; border: 1px solid #edf1f5; border-radius: 8px; }
.service-facts span { color: var(--muted); font-size: .7rem; }
.service-facts b, .service-facts small { overflow-wrap: anywhere; }
.service-ip-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .65rem; }
.service-ip-chips code { padding: .25rem .42rem; border-radius: 6px; background: #eef2f7; overflow-wrap: anywhere; }
.service-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: .75rem; }
.service-more { flex: 1 1 100%; margin: .2rem 0 0; }
.service-more > summary { width: fit-content; }
.service-more-body { margin-top: .7rem; padding-top: .7rem; border-top: 1px solid var(--line); }
.service-more-body h4 { margin: .8rem 0 .5rem; }
.mobile-record-list { display: grid; gap: .45rem; }
.mobile-record { display: grid; gap: .5rem; padding: .65rem; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.mobile-record.is-muted { opacity: .65; }
.mobile-record-main { display: flex; justify-content: space-between; gap: .5rem; align-items: flex-start; }
.mobile-record-main code { overflow-wrap: anywhere; }
.mobile-record-meta { display: flex; flex-wrap: wrap; gap: .35rem .85rem; color: var(--muted); font-size: .75rem; }
.nested-details { margin-top: .6rem; }

.request-detail-page, .request-detail-page > *, .request-detail-page .card, .request-detail-page .summary-card { min-width: 0; }
.request-detail-page .page-head h1 { overflow-wrap: anywhere; }
.request-detail-page .summary-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.request-detail-page .json-view { max-width: 100%; overflow: auto; direction: ltr; text-align: left; white-space: pre; }
.request-detail-page .two-col > * { min-width: 0; }
.request-detail-page .notice { overflow-wrap: anywhere; }
.request-detail-page .poll-controls { display: flex; flex-wrap: wrap; gap: .5rem; }
.request-detail-page .poll-controls form { margin: 0; }
.request-detail-page details { max-width: 100%; }

@media (max-width: 1100px) {
  .access-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .access-record-grid, .service-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  .access-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-record-head, .service-card-top { flex-direction: column; }
  .access-record-grid, .service-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-record-head .status, .service-card-top .status { align-self: flex-start; }
  .customer-service-filter { display: grid; grid-template-columns: 1fr; }
  .customer-service-filter label, .customer-service-filter button { width: 100%; }
  .request-detail-page .page-head { display: grid; grid-template-columns: minmax(0, 1fr); }
  .request-detail-page .head-actions { display: grid; grid-template-columns: 1fr; }
  .request-detail-page .head-actions .button { width: 100%; text-align: center; }
  .request-detail-page .meta-list div { grid-template-columns: 1fr; gap: .2rem; }
  .request-detail-page .otp-form, .request-detail-page .stack-form { grid-template-columns: 1fr; }
  .request-detail-page .poll-controls { display: grid; grid-template-columns: 1fr; }
  .request-detail-page .poll-controls button, .request-detail-page .poll-controls form { width: 100%; }
  .request-detail-page .json-view { font-size: .72rem; max-height: 420px; }
  .request-detail-page .timeline { padding-right: 1rem; }
}

@media (max-width: 460px) {
  .access-record-grid, .service-facts, .access-stats { grid-template-columns: 1fr; }
  .access-record, .compact-service-card { padding: .7rem; }
  .access-record-actions, .service-card-actions { display: grid; grid-template-columns: 1fr; }
  .access-record-actions button, .access-record-actions .button,
  .service-card-actions button, .service-card-actions .button { width: 100%; text-align: center; }
  .mobile-record-main { flex-direction: column; }
  .inline-ip-form { display: grid; grid-template-columns: 1fr; }
  .request-detail-page .summary-grid { grid-template-columns: 1fr; }
  .request-detail-page .card-head { flex-direction: column; }
  .request-detail-page .card-head .status { align-self: flex-start; }
}

/* v0.1.17: نمودار، برنامه ثبت سرویس و بازطراحی نهایی موبایل */
html, body { max-width: 100%; overflow-x: hidden; }
.app-shell, .workspace, .container { min-width: 0; max-width: 100%; }

.dashboard-analytics-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
  align-items: stretch;
  margin-top: 1rem;
}
.request-chart-card { margin: 0; min-width: 0; }
.chart-card-head { align-items: flex-start; }
.chart-card-head p { margin-bottom: 0; }
.chart-period-tabs { display: inline-flex; gap: .25rem; padding: .25rem; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.chart-period-tabs button { min-height: 32px; padding: .25rem .65rem; border: 0; background: transparent; border-radius: 7px; font-size: .78rem; }
.chart-period-tabs button.is-active { background: #fff; color: var(--primary); box-shadow: 0 1px 5px rgba(15, 23, 42, .12); }
.request-chart { width: 100%; min-height: 260px; overflow: hidden; }
.request-chart svg { display: block; width: 100%; height: auto; min-height: 240px; }
.request-chart .chart-grid-line { stroke: #e7ecf2; stroke-width: 1; }
.request-chart .chart-axis-label { fill: #64748b; font-size: 11px; font-family: var(--panel-font, Tahoma, sans-serif); }
.request-chart .chart-bar { fill: #155eef; opacity: .88; rx: 4; }
.request-chart .chart-bar:hover { opacity: 1; }
.request-chart .chart-value { fill: #172033; font-size: 11px; font-weight: 700; text-anchor: middle; font-family: var(--panel-font, Tahoma, sans-serif); }
.request-chart .chart-empty { fill: #64748b; font-size: 14px; text-anchor: middle; font-family: var(--panel-font, Tahoma, sans-serif); }
.dashboard-side-stats { display: grid; grid-template-rows: repeat(3, 1fr); gap: .75rem; }
.compact-stat { min-height: 0; justify-content: center; }
.compact-stat strong { font-size: 1.55rem; }
.dashboard-plan-list { display: grid; gap: .45rem; }
.dashboard-plan-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #fff; }
.dashboard-plan-row:hover { border-color: #9fb6d6; text-decoration: none; }
.dashboard-plan-row.is-overdue { border-right: 4px solid var(--danger); }
.dashboard-plan-row > div { display: grid; min-width: 0; }
.dashboard-plan-row small { color: var(--muted); }

.plan-filter { grid-template-columns: minmax(240px, 1fr) 220px auto auto; }
.plan-list-summary { display: flex; justify-content: space-between; align-items: center; margin: .5rem 0 .75rem; }
.plan-list { display: grid; gap: .75rem; }
.plan-card { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: .9rem 1rem; box-shadow: 0 5px 18px rgba(15, 23, 42, .035); scroll-margin-top: 90px; }
.plan-card.is-overdue { border-right: 4px solid var(--danger); }
.plan-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; }
.plan-card-head h3 { margin: 0; font-size: 1rem; }
.plan-card-head p { margin: .15rem 0 0; color: var(--muted); font-size: .8rem; }
.plan-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin-top: .75rem; }
.plan-facts > div { display: grid; gap: .12rem; padding: .5rem .55rem; border: 1px solid #edf1f5; border-radius: 8px; background: #f8fafc; min-width: 0; }
.plan-facts span { color: var(--muted); font-size: .7rem; }
.plan-facts b { overflow-wrap: anywhere; }
.plan-notes { margin: .65rem 0 0; padding: .55rem .65rem; border-right: 3px solid #cbd5e1; background: #f8fafc; white-space: pre-wrap; }
.plan-actions { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; align-items: center; }
.plan-actions form { margin: 0; }
.date-mode-box { border: 1px solid var(--line); border-radius: 11px; padding: .85rem 1rem 1rem; }
.date-mode-box legend { padding: 0 .45rem; font-weight: 800; }
.date-mode-switch { display: flex; gap: 1rem; margin-bottom: .8rem; }
.date-mode-switch label { display: flex; align-items: center; gap: .4rem; }
.date-mode-switch input { width: auto; }

/* پرونده درخواست: هیچ فرزندی اجازه بزرگ‌تر کردن عرض صفحه را ندارد. */
.request-detail-page { width: 100%; max-width: 100%; min-width: 0; overflow: clip; }
.request-detail-page * { max-width: 100%; }
.request-detail-page .request-id,
.request-detail-page .ltr,
.request-detail-page code,
.request-detail-page dd,
.request-detail-page strong,
.request-detail-page a { overflow-wrap: anywhere; word-break: break-word; }
.request-detail-page .two-col { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.request-detail-page .card { width: 100%; }
.request-detail-page pre.json-view { width: 100%; max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.request-detail-page details > summary { overflow-wrap: anywhere; }
.request-detail-page .meta-list { width: 100%; }
.request-detail-page .timeline li { min-width: 0; }
.request-detail-page .danger-zone form { min-width: 0; }

@media (max-width: 980px) {
  .dashboard-analytics-grid { grid-template-columns: 1fr; }
  .dashboard-side-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto; }
  .plan-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-detail-page .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .container { width: calc(100% - 1rem); margin-left: auto; margin-right: auto; }
  .dashboard-side-stats { grid-template-columns: 1fr; }
  .chart-card-head { display: grid; grid-template-columns: 1fr; }
  .chart-period-tabs { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); }
  .chart-period-tabs button { width: 100%; }
  .dashboard-plan-row { align-items: flex-start; }
  .plan-filter { grid-template-columns: 1fr; }
  .plan-card-head { flex-direction: column; }
  .plan-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .request-detail-page { overflow: hidden; }
  .request-detail-page .page-head { gap: .7rem; }
  .request-detail-page .page-head h1 { font-size: 1.25rem; line-height: 1.45; }
  .request-detail-page .request-id { font-size: .78rem; line-height: 1.5; }
  .request-detail-page .summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
  .request-detail-page .summary-card { min-height: 0; padding: .55rem .6rem; border-radius: 9px; gap: .15rem; box-shadow: none; }
  .request-detail-page .summary-card span:first-child { font-size: .67rem; }
  .request-detail-page .summary-card strong { font-size: .78rem; line-height: 1.45; }
  .request-detail-page .card { padding: .75rem; border-radius: 10px; margin: .7rem 0; box-shadow: 0 4px 14px rgba(15, 23, 42, .04); }
  .request-detail-page .card-head { margin-bottom: .6rem; gap: .5rem; }
  .request-detail-page .card-head h2 { font-size: .98rem; }
  .request-detail-page .notice { padding: .65rem .7rem; font-size: .78rem; }
  .request-detail-page .otp-form label { min-width: 0; width: 100%; }
  .request-detail-page button, .request-detail-page .button { min-height: 40px; padding: .55rem .7rem; }
  .request-detail-page .json-view { font-size: .68rem; line-height: 1.55; padding: .65rem; max-height: 360px; overflow-x: hidden; }
  .request-detail-page .meta-list div { padding: .38rem 0; }
  .request-detail-page .meta-list dt { font-size: .7rem; }
  .request-detail-page .meta-list dd { font-size: .78rem; }
  .request-detail-page .timeline { gap: .55rem; padding: 0; }
  .request-detail-page .timeline li { padding: .2rem .65rem .55rem 0; }
  .request-detail-page .timeline li > div { align-items: flex-start; }
  .request-detail-page .danger-zone > summary { font-size: .85rem; }

  /* سرویس‌های کاربر در موبایل: خلاصه و بدون اسکرول طولانی. */
  .customer-services-section .compact-service-card { padding: .6rem .65rem; margin: .55rem 0; }
  .customer-services-section .service-card-top { flex-direction: row; align-items: center; }
  .customer-services-section .service-type-mark { width: 30px; height: 30px; flex-basis: 30px; border-radius: 7px; font-size: .8rem; }
  .customer-services-section .service-card-title { gap: .45rem; }
  .customer-services-section .service-card-title h3 { font-size: .88rem; }
  .customer-services-section .service-identifier { font-size: .72rem; margin: 0; }
  .customer-services-section .service-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; margin-top: .5rem; }
  .customer-services-section .service-facts > div { padding: .38rem .42rem; }
  .customer-services-section .service-facts > div:nth-child(2),
  .customer-services-section .service-facts > div:nth-child(3),
  .customer-services-section .service-facts > div:nth-child(5),
  .customer-services-section .service-facts > div:nth-child(6) { display: none; }
  .customer-services-section .service-facts span { font-size: .62rem; }
  .customer-services-section .service-facts b { font-size: .74rem; }
  .customer-services-section .service-facts small { font-size: .62rem; }
  .customer-services-section .service-ip-chips { flex-wrap: nowrap; overflow: hidden; gap: .25rem; }
  .customer-services-section .service-ip-chips code { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .65rem; }
  .customer-services-section .service-ip-chips code:nth-of-type(n+3) { display: none; }
  .customer-services-section .service-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin-top: .55rem; }
  .customer-services-section .service-card-actions .button { width: 100%; min-height: 36px; padding: .4rem .45rem; font-size: .72rem; }
  .customer-services-section .service-more { grid-column: 1 / -1; margin: 0; }
  .customer-services-section .service-more > summary { width: 100%; text-align: center; padding: .35rem; font-size: .72rem; border: 1px solid var(--line); border-radius: 7px; }
}

@media (max-width: 460px) {
  .plan-facts { grid-template-columns: 1fr; }
  .plan-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .plan-actions form, .plan-actions button, .plan-actions .button { width: 100%; }
  .date-mode-fields { grid-template-columns: 1fr !important; }
  .dashboard-plan-row { display: grid; grid-template-columns: 1fr; gap: .35rem; }
  .request-detail-page .summary-grid { grid-template-columns: 1fr 1fr; }
  .request-detail-page .summary-card { padding: .5rem; }
  .request-detail-page .head-actions { grid-template-columns: 1fr; }
  .request-detail-page .linked-customer-card .card-head { display: grid; grid-template-columns: 1fr; }
  .request-detail-page .poll-controls { gap: .4rem; }
}

/* v0.1.18: فهرست استان‌ها، ابزارها، تاریخ موبایل و اصلاح ناوبری */
@media (min-width: 901px) {
  .sidebar {
    position: relative;
    top: auto;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    align-self: stretch;
  }
  .sidebar-nav { align-content: start; }
  .sidebar-account { position: sticky; bottom: 0; }
}
@media (max-width: 900px) {
  .sidebar { height: 100dvh; max-height: 100dvh; overflow-y: auto; overscroll-behavior: contain; }
  .sidebar-nav { flex: 0 0 auto; }
  .sidebar-account { position: static; margin-top: 1rem; }
}
.customer-row-actions { display: flex; flex-wrap: wrap; gap: .35rem; min-width: 310px; }
.customer-row-actions .button { white-space: nowrap; }
.section-block { margin-top: 1.5rem; }
.section-title-between { justify-content: space-between; align-items: center; flex-wrap: wrap; }
.section-title-between > div { min-width: 0; }
.iran-access-inventory-list { display: grid; gap: .65rem; }
.iran-access-inventory-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.2fr) repeat(3, minmax(130px, .8fr)) minmax(190px, auto);
  gap: .65rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.iran-access-inventory-row > div { min-width: 0; display: grid; gap: .12rem; }
.iran-access-inventory-row span { color: var(--muted); font-size: .72rem; }
.iran-access-inventory-row b, .iran-access-inventory-row code { overflow-wrap: anywhere; }
.iran-access-main code { font-weight: 800; font-size: .88rem; }
.iran-access-main small { color: var(--muted); }
.iran-access-row-actions { display: flex !important; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; }
select[data-province-select] { min-width: 0; }
.gregorian-date-input[aria-busy="true"] { background-image: linear-gradient(90deg, transparent, rgba(21,94,239,.08), transparent); }

@media (max-width: 1100px) {
  .iran-access-inventory-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iran-access-row-actions { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .customers-table { min-width: 980px; }
  .customer-row-actions { min-width: 250px; display: grid; grid-template-columns: 1fr 1fr; }
  .customer-row-actions .button { min-height: 34px; padding: .35rem .4rem; font-size: .7rem; }
  .iran-access-inventory-row { grid-template-columns: 1fr; padding: .65rem; }
  .iran-access-row-actions { display: grid !important; grid-template-columns: 1fr 1fr; }
  .iran-access-row-actions .status { grid-column: 1 / -1; justify-self: start; }
  .customer-services-section .compact-service-card { padding: .5rem .55rem; }
  .customer-services-section .service-card-top { gap: .35rem; }
  .customer-services-section .service-type-mark { width: 26px; height: 26px; flex-basis: 26px; font-size: .72rem; }
  .customer-services-section .service-card-title h3 { font-size: .8rem; }
  .customer-services-section .service-identifier { font-size: .64rem; }
  .customer-services-section .service-card-top .status { font-size: .62rem; padding: .12rem .35rem; }
  .customer-services-section .service-facts { grid-template-columns: 1fr 1fr; }
  .customer-services-section .service-facts > div { min-height: 0; }
  .customer-services-section .service-card-actions { grid-template-columns: 1fr 1fr; }
  .customer-services-section .service-card-actions .button { min-height: 32px; font-size: .66rem; }
}
@media (max-width: 420px) {
  .customer-services-section .service-facts > div:nth-child(n+3) { display: none; }
  .customer-services-section .service-ip-chips code { max-width: 100%; }
  .customer-services-section .service-ip-chips code:nth-of-type(n+2) { display: none; }
  .customer-services-section .service-card-actions { grid-template-columns: 1fr; }
  .customer-row-actions { grid-template-columns: 1fr; min-width: 170px; }
}

/* v0.1.19: قالب مدرن، تم‌های داخلی، تاریخ ابزارها و اصلاح وضعیت موبایل */
body.theme-indigo {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --nav-active: #4f46e5;
  --nav-bg: #111827;
  --accent-soft: #eef2ff;
  --accent-border: #c7d2fe;
  --accent-text: #3730a3;
}
body.theme-emerald {
  --primary: #059669;
  --primary-dark: #047857;
  --nav-active: #059669;
  --nav-bg: #10231d;
  --accent-soft: #ecfdf5;
  --accent-border: #a7f3d0;
  --accent-text: #065f46;
}
body.theme-violet {
  --primary: #7c3aed;
  --primary-dark: #5b21b6;
  --nav-active: #7c3aed;
  --nav-bg: #1e1734;
  --accent-soft: #f5f3ff;
  --accent-border: #ddd6fe;
  --accent-text: #5b21b6;
}
body.theme-graphite {
  --primary: #334155;
  --primary-dark: #1e293b;
  --nav-active: #475569;
  --nav-bg: #111827;
  --accent-soft: #f1f5f9;
  --accent-border: #cbd5e1;
  --accent-text: #334155;
}
body.theme-sunset {
  --primary: #ea580c;
  --primary-dark: #c2410c;
  --nav-active: #ea580c;
  --nav-bg: #2b1b17;
  --accent-soft: #fff7ed;
  --accent-border: #fed7aa;
  --accent-text: #9a3412;
}
body[class*="theme-"] .brand-mark {
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 72%, white), var(--primary-dark));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 30%, transparent);
}
body[class*="theme-"] input:focus,
body[class*="theme-"] select:focus,
body[class*="theme-"] textarea:focus {
  outline-color: color-mix(in srgb, var(--primary) 16%, transparent);
}

/* قالب دوم: مدرن. قالب کلاسیک بدون تغییر باقی می‌ماند. */
body.layout-modern {
  --bg: #eef2f7;
  --card: rgba(255, 255, 255, .94);
  --line: #dbe3ee;
  --shadow: 0 16px 44px rgba(15, 23, 42, .075);
  background:
    radial-gradient(circle at 90% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 35rem),
    radial-gradient(circle at 0 35%, color-mix(in srgb, var(--primary) 7%, transparent), transparent 30rem),
    var(--bg);
}
body.layout-modern .sidebar {
  margin: .8rem .8rem .8rem 0;
  min-height: calc(100vh - 1.6rem);
  border-radius: 22px 0 0 22px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: -14px 0 40px rgba(15,23,42,.13);
}
body.layout-modern .workspace-header {
  margin: .8rem 1rem 0;
  top: .55rem;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 16px;
  background: rgba(255,255,255,.86);
  box-shadow: 0 12px 35px rgba(15,23,42,.075);
}
body.layout-modern .container { margin-top: 1.2rem; }
body.layout-modern .card,
body.layout-modern .stat,
body.layout-modern .summary-card,
body.layout-modern .kpi,
body.layout-modern .plan-card,
body.layout-modern .compact-service-card {
  border-color: rgba(203, 213, 225, .82);
  box-shadow: var(--shadow);
}
body.layout-modern .card { border-radius: 18px; }
body.layout-modern .summary-card,
body.layout-modern .stat,
body.layout-modern .kpi { border-radius: 15px; background: rgba(255,255,255,.92); }
body.layout-modern .card.prominent {
  border-color: color-mix(in srgb, var(--primary) 45%, #f0bd4e);
  background: linear-gradient(145deg, #fff, color-mix(in srgb, var(--accent-soft) 52%, white));
}
body.layout-modern .sidebar-nav a { border-radius: 12px; }
body.layout-modern .sidebar-nav a.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 9px 24px color-mix(in srgb, var(--primary) 32%, transparent);
}
body.layout-modern button,
body.layout-modern .button,
body.layout-modern input,
body.layout-modern select,
body.layout-modern textarea { border-radius: 11px; }
body.layout-modern .table-wrap { border-radius: 15px; box-shadow: 0 9px 25px rgba(15,23,42,.045); }
body.layout-modern .current-font-banner {
  background: linear-gradient(135deg, var(--accent-soft), #fff);
  border-color: var(--accent-border);
}

/* انتخاب قالب و تم */
.appearance-panel { overflow: hidden; }
.appearance-form { display: grid; gap: 1rem; }
.appearance-choice-group { margin: 0; padding: .9rem; border: 1px solid var(--line); border-radius: 13px; }
.appearance-choice-group legend { padding: 0 .45rem; font-weight: 800; }
.layout-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.layout-choice,
.theme-choice {
  position: relative;
  display: grid;
  gap: .4rem;
  min-width: 0;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.layout-choice:hover,
.theme-choice:hover { border-color: color-mix(in srgb, var(--primary) 55%, var(--line)); transform: translateY(-1px); }
.layout-choice.is-selected,
.theme-choice.is-selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 13%, transparent);
}
.layout-choice input,
.theme-choice input { position: absolute; opacity: 0; pointer-events: none; }
.layout-choice small,
.theme-choice small { line-height: 1.55; }
.layout-preview {
  position: relative;
  height: 112px;
  overflow: hidden;
  border: 1px solid #dce3ec;
  border-radius: 10px;
  background: #f1f5f9;
}
.layout-preview i { position: absolute; display: block; }
.layout-preview .preview-sidebar { inset: 0 0 0 auto; width: 25%; background: #1f2937; }
.layout-preview .preview-header { top: 8px; right: 30%; left: 6%; height: 18px; border-radius: 5px; background: #fff; }
.layout-preview .preview-card { top: 36px; bottom: 10px; border-radius: 7px; background: #fff; border: 1px solid #e2e8f0; }
.layout-preview .preview-card-one { right: 30%; width: 29%; }
.layout-preview .preview-card-two { left: 6%; width: 29%; }
.layout-preview-modern { background: linear-gradient(145deg, #eef2ff, #f8fafc); }
.layout-preview-modern .preview-sidebar { top: 6px; right: 6px; bottom: 6px; width: 24%; border-radius: 9px; background: linear-gradient(160deg, #312e81, #111827); }
.layout-preview-modern .preview-header { border-radius: 9px; box-shadow: 0 4px 10px rgba(15,23,42,.08); }
.layout-preview-modern .preview-card { border-radius: 11px; box-shadow: 0 7px 14px rgba(15,23,42,.08); }
.theme-choice-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .65rem; }
.theme-dots { display: flex; gap: .28rem; direction: ltr; }
.theme-dots i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(15,23,42,.12); }
.theme-swatch-indigo .theme-dots i:nth-child(1) { background: #4f46e5; }
.theme-swatch-indigo .theme-dots i:nth-child(2) { background: #818cf8; }
.theme-swatch-indigo .theme-dots i:nth-child(3) { background: #eef2ff; }
.theme-swatch-emerald .theme-dots i:nth-child(1) { background: #059669; }
.theme-swatch-emerald .theme-dots i:nth-child(2) { background: #34d399; }
.theme-swatch-emerald .theme-dots i:nth-child(3) { background: #ecfdf5; }
.theme-swatch-violet .theme-dots i:nth-child(1) { background: #7c3aed; }
.theme-swatch-violet .theme-dots i:nth-child(2) { background: #a78bfa; }
.theme-swatch-violet .theme-dots i:nth-child(3) { background: #f5f3ff; }
.theme-swatch-graphite .theme-dots i:nth-child(1) { background: #334155; }
.theme-swatch-graphite .theme-dots i:nth-child(2) { background: #64748b; }
.theme-swatch-graphite .theme-dots i:nth-child(3) { background: #f1f5f9; }
.theme-swatch-sunset .theme-dots i:nth-child(1) { background: #ea580c; }
.theme-swatch-sunset .theme-dots i:nth-child(2) { background: #fb923c; }
.theme-swatch-sunset .theme-dots i:nth-child(3) { background: #fff7ed; }
.appearance-submit { display: flex; justify-content: flex-end; }

/* ابزار تاریخ */
.current-date-panel { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.current-date-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: .35rem;
  min-height: 125px;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  box-shadow: var(--shadow);
}
.current-date-card::after {
  content: "";
  position: absolute;
  width: 110px;
  height: 110px;
  left: -35px;
  bottom: -45px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 9%, transparent);
}
.current-date-card span { color: var(--muted); font-size: .78rem; }
.current-date-card strong { font-size: 1.12rem; line-height: 1.55; overflow-wrap: anywhere; }
.current-date-card small { margin-top: auto; }
.jalali-date-card { border-top: 4px solid var(--primary); }
.gregorian-date-card { border-top: 4px solid #0891b2; }
.time-date-card { border-top: 4px solid #f59e0b; }

/* رفع قطعی هم‌پوشانی وضعیت در پرونده درخواست روی موبایل. */
.request-detail-page .summary-card { min-width: 0; overflow: hidden; }
.request-detail-page .summary-card .status,
.request-detail-page .request-next-action-card .card-head .status {
  width: fit-content;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
  justify-self: start;
  align-self: start;
  text-align: right;
}
.request-detail-page .summary-status-card { position: relative; z-index: 1; }
.request-detail-page .request-next-action-card .card-head { min-width: 0; }
.request-detail-page .request-next-action-card .card-head h2 { min-width: 0; }

@media (max-width: 1180px) {
  .theme-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body.layout-modern .sidebar { margin: 0; min-height: 100dvh; border-radius: 0; }
  body.layout-modern .workspace-header { margin: .5rem .5rem 0; top: .35rem; }
  .current-date-panel { grid-template-columns: 1fr 1fr; }
  .time-date-card { grid-column: 1 / -1; min-height: 95px; }
}
@media (max-width: 700px) {
  .layout-choice-grid { grid-template-columns: 1fr; }
  .theme-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .appearance-choice-group { padding: .65rem; }
  .layout-preview { height: 92px; }
  .current-date-panel { grid-template-columns: 1fr; gap: .55rem; }
  .time-date-card { grid-column: auto; }
  .current-date-card { min-height: 98px; padding: .75rem .85rem; }
  .current-date-card strong { font-size: .95rem; }

  .request-detail-page .summary-status-card { grid-column: 1 / -1; }
  .request-detail-page .summary-status-card .status { font-size: .72rem; padding: .18rem .42rem; }
  .request-detail-page .request-next-action-card .card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }
}
@media (max-width: 460px) {
  .theme-choice-grid { grid-template-columns: 1fr; }
  .appearance-submit button { width: 100%; }
  .request-detail-page .summary-grid { grid-template-columns: minmax(0, 1fr); }
  .request-detail-page .summary-status-card { grid-column: auto; }
  .request-detail-page .summary-card strong,
  .request-detail-page .summary-card a { max-width: 100%; }
}

/* نسخه 1.0.0: تقویم‌ها، بررسی AJAX و آخرین درخواست‌های عملیات */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: .75rem;
}
.calendar-card { min-width: 0; overflow: hidden; }
.calendar-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: center;
  margin-bottom: .8rem;
  text-align: center;
}
.calendar-head h2 { margin: .1rem 0 0; font-size: 1.05rem; }
.calendar-head small { color: var(--muted); }
.calendar-weekdays,
.calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .3rem; }
.calendar-weekdays { margin-bottom: .35rem; color: var(--muted); font-size: .72rem; text-align: center; }
.calendar-day {
  min-width: 0;
  min-height: 58px;
  display: grid;
  place-content: center;
  gap: .15rem;
  padding: .3rem .15rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface, #fff);
  color: inherit;
  text-align: center;
}
button.calendar-day { cursor: pointer; }
button.calendar-day:hover { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, #fff); }
.calendar-day b { font-size: .88rem; }
.calendar-day small { direction: ltr; font-size: .55rem; color: var(--muted); white-space: nowrap; }
.calendar-day.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.calendar-day.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.calendar-day.selected small { color: rgba(255,255,255,.82); }
.calendar-day.empty-cell { border-color: transparent; background: transparent; }
.calendar-selection {
  margin: 0 0 1rem;
  padding: .65rem .8rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--primary) 4%, #fff);
  text-align: center;
  direction: ltr;
  font-weight: 700;
}
.ajax-check-result {
  display: inline-flex;
  align-items: center;
  max-width: 360px;
  min-height: 1.8rem;
  padding: .2rem .45rem;
  border-radius: 7px;
  font-size: .72rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.ajax-check-result:empty { display: none; }
.ajax-check-result.is-loading { background: #eef2ff; color: #3730a3; }
.ajax-check-result.result-success { background: #ddf8ed; color: #066044; }
.ajax-check-result.result-danger { background: #fee4e2; color: #912018; }
.ajax-check-result.result-warning { background: #fff4d6; color: #7a4d00; }
.operation-recent-requests { margin-top: 1rem; }
.recent-request-list { display: grid; gap: .45rem; }
.recent-request-item {
  display: grid;
  grid-template-columns: minmax(170px, 1.25fr) minmax(120px, .7fr) minmax(140px, 1fr) minmax(150px, .8fr);
  gap: .65rem;
  align-items: center;
  padding: .65rem .75rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.recent-request-item:hover { border-color: color-mix(in srgb, var(--primary) 45%, var(--line)); background: color-mix(in srgb, var(--primary) 4%, #fff); }
.recent-request-id { min-width: 0; overflow-wrap: anywhere; font-size: .78rem; }
.recent-request-item time { color: var(--muted); font-size: .75rem; }

@media (max-width: 900px) {
  .calendar-grid { grid-template-columns: minmax(0, 1fr); }
  .recent-request-item { grid-template-columns: minmax(0, 1fr) auto; }
  .recent-request-item > :nth-child(2),
  .recent-request-item > :nth-child(4) { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .calendar-card { padding: .7rem; }
  .calendar-weekdays, .calendar-days { gap: .18rem; }
  .calendar-day { min-height: 48px; border-radius: 7px; padding: .2rem .05rem; }
  .calendar-day b { font-size: .78rem; }
  .calendar-day small { display: none; }
  .access-record-actions .ajax-check-host-form { width: 100%; }
  .access-record-actions .ajax-check-host-form button { width: 100%; }
  .ajax-check-result { width: 100%; max-width: none; margin-top: .35rem; }
  .recent-request-item { grid-template-columns: minmax(0, 1fr); }
  .recent-request-item > * { grid-column: auto !important; }
}

/* نسخه 1.0.1: نظم بصری، مدارک، تقویم کامل و تنظیمات تب‌دار */
.container{width:min(100% - 2rem,1480px);margin-inline:auto}.card{border-radius:16px;padding:1.15rem}.card-head{gap:.75rem;align-items:flex-start}.page-head{align-items:flex-start;gap:1rem}.head-actions{display:flex;flex-wrap:wrap;gap:.55rem}.two-col{align-items:start}
.scroll-to-top{position:fixed;inset-inline-end:1.15rem;bottom:1.15rem;width:46px;height:46px;border:0;border-radius:14px;background:var(--accent,#3559e0);color:#fff;font-size:1.35rem;font-weight:900;box-shadow:0 12px 30px rgba(15,23,42,.24);opacity:0;visibility:hidden;transform:translateY(12px);transition:.2s ease;z-index:80}.scroll-to-top.is-visible{opacity:1;visibility:visible;transform:none}.scroll-to-top:hover{transform:translateY(-2px)}

.customer-documents-section{overflow:hidden}.document-upload-form{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(180px,1fr) minmax(220px,1.35fr) auto;gap:.8rem;align-items:end;padding:1rem;margin-bottom:1rem;border:1px solid var(--border);border-radius:14px;background:var(--surface-soft)}.document-upload-form label{margin:0}.document-file-field input{padding:.55rem}.upload-progress{grid-column:1/-1;height:8px;background:color-mix(in srgb,var(--accent) 12%,transparent);border-radius:99px;overflow:hidden}.upload-progress span{display:block;height:100%;width:0;background:var(--accent);transition:width .15s linear}.upload-state{grid-column:1/-1;margin:0;min-height:1.2em}.document-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:.9rem}.document-card{display:grid;grid-template-rows:150px auto auto;border:1px solid var(--border);border-radius:15px;overflow:hidden;background:var(--surface);min-width:0}.document-preview{display:grid;place-items:center;background:var(--surface-soft);overflow:hidden}.document-preview img{width:100%;height:100%;object-fit:cover}.document-file-icon{display:grid;place-items:center;width:72px;height:72px;border-radius:18px;background:#fee2e2;color:#991b1b;font-weight:900}.document-meta{display:grid;gap:.25rem;padding:.8rem;min-width:0}.document-meta b,.document-meta small{overflow-wrap:anywhere}.document-actions{display:flex;justify-content:space-between;gap:.5rem;padding:.7rem .8rem;border-top:1px solid var(--border)}.compact-empty{padding:1.25rem}

.settings-shell{display:grid;gap:1rem}.settings-toolbar{position:sticky;top:.65rem;z-index:20;padding:.8rem}.settings-search{display:block;margin-bottom:.7rem}.settings-tabs{display:flex;gap:.45rem;overflow-x:auto;padding-bottom:.15rem;scrollbar-width:thin}.settings-tabs button{white-space:nowrap;border-radius:10px;background:var(--surface-soft);border:1px solid var(--border)}.settings-tabs button.is-active{background:var(--accent);border-color:var(--accent);color:#fff}.settings-form-stack{display:grid;gap:1rem}.settings-shell [data-settings-panel]{display:grid;gap:1rem}.settings-shell [hidden]{display:none!important}

.calendar-toolbar{display:flex;justify-content:space-between;align-items:center;gap:1rem}.calendar-view-switch{display:flex;gap:.45rem}.calendar-view-switch button{border-radius:10px}.calendar-view-switch button.is-active{background:var(--accent);color:#fff;border-color:var(--accent)}.year-navigation{display:flex;justify-content:space-between;align-items:center;gap:1rem;margin:1rem 0}.year-navigation h2{margin:0}.year-calendar-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.year-month-card{padding:.75rem;min-width:0}.compact-calendar-head{justify-content:center;text-align:center}.compact-calendar-head h3{font-size:1rem;margin:0}.year-month-card .calendar-days{gap:3px}.year-month-card .calendar-day{min-height:52px;padding:.2rem}.year-month-card .calendar-day b{font-size:.82rem}.year-month-card .calendar-day small{font-size:.54rem;white-space:nowrap}.conversion-card{margin-inline:auto}.backup-layout .card{height:100%}.row-actions{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}.small-button{padding:.45rem .65rem;font-size:.82rem}

@media(max-width:1100px){.year-calendar-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.document-upload-form{grid-template-columns:1fr 1fr}.document-upload-form button{width:100%}}
@media(max-width:700px){.container{width:min(100% - 1rem,1480px)}.card{padding:.85rem;border-radius:13px}.page-head{display:grid}.head-actions{width:100%}.head-actions .button,.head-actions button{flex:1 1 auto;text-align:center}.document-upload-form{grid-template-columns:1fr;padding:.75rem}.document-upload-form>*{grid-column:1!important}.document-grid{grid-template-columns:1fr}.document-card{grid-template-columns:84px minmax(0,1fr);grid-template-rows:auto auto}.document-preview{grid-row:1/3;min-height:116px}.document-actions{grid-column:2;align-self:end}.settings-toolbar{top:.35rem}.settings-tabs{margin-inline:-.35rem;padding-inline:.35rem}.calendar-toolbar{display:grid}.calendar-view-switch{display:grid;grid-template-columns:1fr 1fr}.year-navigation{position:sticky;top:4.2rem;z-index:10;background:var(--surface);padding:.55rem;border:1px solid var(--border);border-radius:12px}.year-calendar-grid{grid-template-columns:1fr}.year-month-card .calendar-day{min-height:48px}.year-month-card .calendar-day small{font-size:.58rem}.scroll-to-top{width:42px;height:42px;inset-inline-end:.75rem;bottom:.75rem}.table-wrap{border-radius:10px}.summary-grid,.form-grid.cols-2,.form-grid.cols-3,.two-col{grid-template-columns:1fr!important}.summary-card{min-width:0}.status{max-width:100%;white-space:normal;line-height:1.45;text-align:center}.workspace-header{gap:.5rem}.version-chip{display:none}}
@media(max-width:420px){.document-card{grid-template-columns:70px minmax(0,1fr)}.document-preview{min-height:104px}.document-meta{padding:.65rem}.document-actions{padding:.55rem}.year-month-card{padding:.55rem}.year-month-card .calendar-day{min-height:44px}.year-month-card .calendar-day small{display:none}.calendar-weekdays span{font-size:.72rem}.page-head h1{font-size:1.25rem}}

/* نسخه 1.0.3: شمارنده OTP، چیدمان بهینه و قالب‌های تازه */
.otp-deadline{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.8rem 1rem;margin:.8rem 0;border:1px solid color-mix(in srgb,var(--warning) 45%,var(--line));border-radius:13px;background:color-mix(in srgb,#fff7df 80%,var(--card));min-width:0}.otp-deadline>div{display:grid;gap:.1rem}.otp-deadline b{font-size:1.45rem;letter-spacing:.08em;color:var(--warning)}.otp-deadline span{color:var(--muted);font-size:.82rem;text-align:left}.otp-deadline.is-urgent{border-color:#f59e0b;background:#fff7ed}.otp-deadline.is-urgent b{color:#b45309}.otp-deadline.is-expired{border-color:#f3b4ad;background:#fff1f0}.otp-deadline.is-expired b{color:var(--danger)}
.details-summary-actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.details-summary-actions .copy-button{margin-inline-start:auto}.request-next-action-card,.request-detail-page>.card,.request-detail-page>.two-col>.card{min-width:0}.request-next-action-card .card-head{align-items:flex-start}.request-next-action-card .status{flex:0 1 auto;max-width:min(100%,440px)}
.service-purchase-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem;margin:.65rem 0;padding:.7rem;border:1px dashed var(--line);border-radius:11px;background:color-mix(in srgb,var(--primary) 3%,#fff)}.service-purchase-facts div{min-width:0}.service-purchase-facts span{display:block;color:var(--muted);font-size:.75rem}.service-purchase-facts b{display:block;overflow-wrap:anywhere;font-size:.88rem}
.card,.summary-card,.stat,.compact-service-card{min-width:0}.card-head>*{min-width:0}.card-head h2,.page-head h1{overflow-wrap:anywhere}.form-grid>label{min-width:0}.summary-grid{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}.summary-card{min-height:92px;align-content:start}.two-col{grid-template-columns:repeat(2,minmax(0,1fr))}.service-facts{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
body.layout-compact .container{width:min(100% - 1.25rem,1560px);margin-top:1rem}body.layout-compact .card{padding:.82rem;border-radius:11px;margin:.7rem 0;box-shadow:0 4px 14px rgba(15,23,42,.045)}body.layout-compact .summary-card,body.layout-compact .stat{padding:.7rem;border-radius:10px;min-height:76px}body.layout-compact .workspace-header{min-height:56px}body.layout-compact .sidebar-nav a{padding:.47rem .65rem}body.layout-compact th,body.layout-compact td{padding:.55rem .6rem}body.layout-compact input,body.layout-compact select,body.layout-compact textarea{padding:.52rem .62rem}body.layout-compact button,body.layout-compact .button{padding:.48rem .72rem}body.layout-compact .service-card{margin:.6rem 0}
body.layout-glass{background:radial-gradient(circle at 15% 10%,color-mix(in srgb,var(--primary) 12%,transparent),transparent 34%),linear-gradient(145deg,#f8fafc,#eef2ff)}body.layout-glass .sidebar{background:linear-gradient(165deg,color-mix(in srgb,var(--primary-dark) 76%,#111827),#111827);box-shadow:0 18px 42px rgba(15,23,42,.2)}body.layout-glass .workspace-header{background:rgba(255,255,255,.72);backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.78);box-shadow:0 8px 30px rgba(15,23,42,.08)}body.layout-glass .card,body.layout-glass .summary-card,body.layout-glass .stat{background:rgba(255,255,255,.78);backdrop-filter:blur(14px);border-color:rgba(255,255,255,.86);box-shadow:0 14px 35px rgba(15,23,42,.08)}body.layout-glass .table-wrap{background:rgba(255,255,255,.68);border-radius:16px;overflow:auto}body.layout-glass input,body.layout-glass select,body.layout-glass textarea{background:rgba(255,255,255,.84)}
body.theme-ocean{--primary:#027a9f;--primary-dark:#075985;--accent:#0891b2;--bg:#f0f9ff;--line:#cde9f2}body.theme-rose{--primary:#be185d;--primary-dark:#9d174d;--accent:#db2777;--bg:#fff7fb;--line:#f2d4e2}body.theme-amber{--primary:#b45309;--primary-dark:#92400e;--accent:#d97706;--bg:#fffbeb;--line:#f3dfb3}
.theme-swatch-ocean .theme-dots i:nth-child(1){background:#027a9f}.theme-swatch-ocean .theme-dots i:nth-child(2){background:#22d3ee}.theme-swatch-ocean .theme-dots i:nth-child(3){background:#ecfeff}.theme-swatch-rose .theme-dots i:nth-child(1){background:#be185d}.theme-swatch-rose .theme-dots i:nth-child(2){background:#f472b6}.theme-swatch-rose .theme-dots i:nth-child(3){background:#fdf2f8}.theme-swatch-amber .theme-dots i:nth-child(1){background:#b45309}.theme-swatch-amber .theme-dots i:nth-child(2){background:#f59e0b}.theme-swatch-amber .theme-dots i:nth-child(3){background:#fffbeb}
.layout-preview-compact{background:#f8fafc}.layout-preview-compact .preview-sidebar{width:22%;background:#334155}.layout-preview-compact .preview-header{height:13px;top:7px}.layout-preview-compact .preview-card{top:27px;bottom:7px;border-radius:4px}.layout-preview-glass{background:linear-gradient(145deg,#dbeafe,#f5f3ff)}.layout-preview-glass .preview-sidebar{top:6px;right:6px;bottom:6px;width:24%;border-radius:11px;background:linear-gradient(160deg,#1d4ed8,#312e81)}.layout-preview-glass .preview-header,.layout-preview-glass .preview-card{background:rgba(255,255,255,.72);border-color:rgba(255,255,255,.9);box-shadow:0 5px 12px rgba(15,23,42,.1)}
@media(max-width:700px){.otp-deadline{display:grid;gap:.4rem}.otp-deadline span{text-align:right}.otp-form label{min-width:0;width:100%}.otp-form button{width:100%}.details-summary-actions{align-items:center}.details-summary-actions .copy-button{flex:0 0 auto}.two-col{grid-template-columns:minmax(0,1fr)}.summary-grid{grid-template-columns:minmax(0,1fr)}.summary-card{min-height:auto;padding:.72rem}.request-next-action-card .card-head{display:grid;grid-template-columns:minmax(0,1fr);gap:.55rem}.request-next-action-card .status{justify-self:start;text-align:right}.service-purchase-facts{grid-template-columns:minmax(0,1fr)}body.layout-glass .workspace-header{margin:.35rem}.layout-choice-grid{grid-template-columns:minmax(0,1fr)}}
.quick-otp-wrap{display:grid;gap:.4rem;justify-items:end}.mini-otp-countdown{display:flex;align-items:center;gap:.45rem;padding:.25rem .55rem;border-radius:9px;background:#fff7df;border:1px solid #f2cc69;font-size:.75rem}.mini-otp-countdown b{color:var(--warning);font-size:.9rem}.mini-otp-countdown.is-urgent{background:#fff7ed;border-color:#f59e0b}.mini-otp-countdown.is-expired{background:#fff1f0;border-color:#f3b4ad}.mini-otp-countdown.is-expired b{color:var(--danger)}
@media(max-width:700px){.quick-otp-wrap{width:100%;justify-items:stretch}.mini-otp-countdown{justify-content:space-between}.quick-otp-wrap .quick-otp{width:100%}}

/* نسخه 1.0.4: فیلتر نتیجه، نمودار ثبت سرویس و بازطراحی فاصله‌ها */
.workspace > main.container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: stretch;
}
.workspace > main.container > * { margin-block: 0; }
.workspace > main.container > .card,
.workspace > main.container > section.card { margin-block: 0; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card-head { flex-wrap: wrap; min-width: 0; }
.card-head > div { min-width: 0; }
.dashboard-analytics-grid > .card,
.dashboard-analytics-grid > aside,
.two-col > .card,
.stats-grid > .stat { margin: 0; }
.form-grid > *, .summary-grid > *, .stats-grid > *, .two-col > * { min-width: 0; }

.request-filter-bar {
  grid-template-columns: minmax(240px, 1.5fr) minmax(170px, .7fr) minmax(210px, 1fr) auto auto auto;
  align-items: center;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  box-shadow: 0 4px 18px rgba(15, 23, 42, .035);
}
.requests-list-card { padding: 0; overflow: hidden; }
.requests-list-card .table-wrap { border: 0; border-radius: inherit; }
.requests-table { min-width: 1280px; }
.requests-table .request-row.result-success td:first-child { box-shadow: inset -3px 0 0 var(--success); }
.requests-table .request-row.result-failed td:first-child { box-shadow: inset -3px 0 0 var(--danger); }
.closure-reason-cell { min-width: 220px; max-width: 300px; }
.closure-reason {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #475467;
  font-size: .78rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.registration-overview-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--primary) 4%, #fff), #fff 58%);
}
.registration-overview-card::after {
  content: "";
  position: absolute;
  width: 230px;
  height: 230px;
  left: -90px;
  top: -125px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 9%, transparent);
  pointer-events: none;
}
.registration-overview-card > * { position: relative; z-index: 1; }
.registration-rate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  min-height: 38px;
  padding: .35rem .7rem;
  border-radius: 10px;
  color: var(--accent-text, var(--primary-dark));
  background: var(--accent-soft, #eef2ff);
  border: 1px solid var(--accent-border, #c7d2fe);
  font-weight: 850;
}
.horizontal-bar-chart { display: grid; gap: .85rem; margin-top: .3rem; }
.horizontal-bar-row { display: grid; grid-template-columns: minmax(175px, 240px) minmax(0, 1fr); gap: 1rem; align-items: center; }
.bar-label { display: flex; align-items: center; justify-content: space-between; gap: .7rem; min-width: 0; }
.bar-label span { color: #344054; font-size: .84rem; overflow-wrap: anywhere; }
.bar-label b { min-width: 34px; text-align: center; font-size: 1.05rem; }
.bar-track { height: 18px; padding: 3px; overflow: hidden; border-radius: 999px; background: #e8edf4; box-shadow: inset 0 1px 3px rgba(15,23,42,.08); }
.bar-fill { display: block; width: var(--bar-value, 0%); min-width: 0; height: 100%; border-radius: inherit; transition: width .4s ease; }
.bar-created { background: linear-gradient(90deg, var(--primary-dark), var(--primary)); }
.bar-successful { background: linear-gradient(90deg, #087a55, #22b982); }
.bar-remaining { background: linear-gradient(90deg, #b45309, #f59e0b); }
.chart-footnote { margin: .8rem 0 0; color: var(--muted); font-size: .76rem; }

/* تم‌های تازه */
body.theme-cyan {
  --primary: #0891b2;
  --primary-dark: #0e7490;
  --nav-active: #06b6d4;
  --nav-bg: #082f49;
  --accent-soft: #ecfeff;
  --accent-border: #a5f3fc;
  --accent-text: #155e75;
}
body.theme-midnight {
  --primary: #4f7cff;
  --primary-dark: #3157d5;
  --nav-active: #6d8cff;
  --nav-bg: #091225;
  --accent-soft: #eef2ff;
  --accent-border: #c7d2fe;
  --accent-text: #233b86;
}
.theme-swatch-cyan .theme-dots i:nth-child(1) { background: #0891b2; }
.theme-swatch-cyan .theme-dots i:nth-child(2) { background: #22d3ee; }
.theme-swatch-cyan .theme-dots i:nth-child(3) { background: #ecfeff; }
.theme-swatch-midnight .theme-dots i:nth-child(1) { background: #0b1734; }
.theme-swatch-midnight .theme-dots i:nth-child(2) { background: #4f7cff; }
.theme-swatch-midnight .theme-dots i:nth-child(3) { background: #e8eeff; }

/* قالب آرورای پویا */
body.layout-aurora {
  --bg: #f3f6ff;
  --card: rgba(255,255,255,.9);
  --line: rgba(180,193,220,.62);
  --shadow: 0 18px 48px rgba(45, 55, 95, .09);
  background:
    radial-gradient(circle at 82% 5%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 29rem),
    radial-gradient(circle at 12% 45%, rgba(34,211,238,.14), transparent 30rem),
    radial-gradient(circle at 60% 100%, rgba(168,85,247,.10), transparent 34rem),
    var(--bg);
  background-attachment: fixed;
}
body.layout-aurora .sidebar {
  margin: .75rem .75rem .75rem 0;
  min-height: calc(100vh - 1.5rem);
  border-radius: 24px 0 0 24px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--nav-bg, #111827) 88%, var(--primary)), var(--nav-bg, #111827));
  box-shadow: -18px 0 55px rgba(15,23,42,.18);
}
body.layout-aurora .workspace-header {
  margin: .75rem 1rem 0;
  top: .5rem;
  border: 1px solid rgba(255,255,255,.78);
  border-radius: 18px;
  background: rgba(255,255,255,.74);
  backdrop-filter: blur(20px) saturate(130%);
  box-shadow: 0 15px 40px rgba(45,55,95,.08);
}
body.layout-aurora .card,
body.layout-aurora .stat,
body.layout-aurora .summary-card,
body.layout-aurora .compact-service-card {
  border-color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(14px) saturate(120%);
  box-shadow: var(--shadow);
}
body.layout-aurora .card { border-radius: 20px; }
body.layout-aurora .stat,
body.layout-aurora .summary-card { border-radius: 17px; }
body.layout-aurora button,
body.layout-aurora .button,
body.layout-aurora input,
body.layout-aurora select,
body.layout-aurora textarea { border-radius: 11px; }
body.layout-aurora .table-wrap { border-radius: 16px; background: rgba(255,255,255,.8); }
body.layout-aurora th { background: color-mix(in srgb, var(--primary) 5%, #f8fafc); }

/* قالب فرماندهی اجرایی */
body.layout-executive {
  --bg: #eef1f5;
  --card: #ffffff;
  --line: #d8dee8;
  --shadow: 0 9px 26px rgba(15,23,42,.065);
  background: linear-gradient(180deg, #e8edf4 0, var(--bg) 250px);
}
body.layout-executive .workspace-header {
  min-height: 72px;
  color: #fff;
  background: linear-gradient(115deg, var(--nav-bg, #111827), color-mix(in srgb, var(--nav-bg, #111827) 74%, var(--primary)));
  border-bottom: 0;
  box-shadow: 0 10px 28px rgba(15,23,42,.16);
}
body.layout-executive .workspace-header small,
body.layout-executive .workspace-header .live-clock span,
body.layout-executive .workspace-header .live-clock,
body.layout-executive .workspace-header .version-chip { color: rgba(255,255,255,.78); }
body.layout-executive .workspace-header .version-chip { background: rgba(255,255,255,.12); }
body.layout-executive .card {
  border-radius: 12px;
  border-top: 3px solid color-mix(in srgb, var(--primary) 68%, #fff);
  box-shadow: var(--shadow);
}
body.layout-executive .stat,
body.layout-executive .summary-card {
  border-radius: 10px;
  border-right: 4px solid var(--primary);
  box-shadow: 0 5px 18px rgba(15,23,42,.05);
}
body.layout-executive .card-head { padding-bottom: .55rem; border-bottom: 1px solid #edf0f5; }
body.layout-executive .table-wrap { border-radius: 9px; }
body.layout-executive th { background: #eef2f7; color: #263247; }
body.layout-executive button,
body.layout-executive .button { border-radius: 7px; }

.layout-preview-aurora { background: radial-gradient(circle at 75% 15%, #a5b4fc, transparent 40%), linear-gradient(145deg,#eef2ff,#ecfeff); }
.layout-preview-aurora .preview-sidebar { top: 5px; right: 5px; bottom: 5px; width: 24%; border-radius: 10px; background: linear-gradient(160deg,#312e81,#0f172a); }
.layout-preview-aurora .preview-header { border-radius: 9px; background: rgba(255,255,255,.78); box-shadow: 0 5px 12px rgba(67,56,202,.12); }
.layout-preview-aurora .preview-card { border-radius: 12px; background: rgba(255,255,255,.82); box-shadow: 0 8px 18px rgba(67,56,202,.10); }
.layout-preview-executive { background: linear-gradient(180deg,#dbe3ef,#f8fafc); }
.layout-preview-executive .preview-sidebar { background: #101827; }
.layout-preview-executive .preview-header { top: 0; right: 25%; left: 0; height: 25px; border-radius: 0; background: linear-gradient(90deg,#111827,#334155); }
.layout-preview-executive .preview-card { top: 36px; border-radius: 5px; border-top: 3px solid #4f46e5; }

@media (max-width: 1100px) {
  .request-filter-bar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .request-filter-bar input[type="search"] { grid-column: 1 / -1; }
  .request-filter-bar .ajax-search-state { min-height: 1.5rem; }
}
@media (max-width: 900px) {
  body.layout-aurora .sidebar { margin: 0; min-height: 100dvh; border-radius: 0; }
  body.layout-aurora .workspace-header { margin: .45rem .45rem 0; top: .3rem; }
  body.layout-executive .workspace-header { min-height: 62px; }
}
@media (max-width: 700px) {
  .workspace > main.container { gap: .75rem; }
  .request-filter-bar { grid-template-columns: minmax(0, 1fr); padding: .65rem; }
  .request-filter-bar input[type="search"] { grid-column: auto; }
  .request-filter-bar button,
  .request-filter-bar .button { width: 100%; }
  .horizontal-bar-row { grid-template-columns: minmax(0, 1fr); gap: .35rem; }
  .bar-track { height: 16px; }
  .registration-overview-card .card-head { display: grid; grid-template-columns: minmax(0, 1fr); }
  .registration-rate { justify-self: start; }
}

/* ===== قابلیت‌های پیشرفته 1.1.0 ===== */
.nav-count,.header-notification b{display:inline-grid;place-items:center;min-width:1.35rem;height:1.35rem;padding:0 .35rem;border-radius:999px;background:var(--danger,#dc3545);color:#fff;font-size:.72rem;font-weight:800}
.header-notification{display:inline-flex;align-items:center;gap:.4rem;padding:.55rem .75rem;border:1px solid var(--border);border-radius:999px;background:var(--surface);color:var(--text);text-decoration:none;font-size:.82rem}
.narrow-card{max-width:520px;margin:7vh auto}
.content-grid{display:grid;gap:1.25rem;align-items:start}.content-grid.two-col{grid-template-columns:minmax(0,1.2fr) minmax(300px,.8fr)}
.stack-form{display:grid;gap:1rem}.inline-form,.row-actions,.compact-form{display:flex;gap:.65rem;align-items:center;flex-wrap:wrap}.compact-form input,.compact-form select{min-width:120px}
.button-stack{display:grid;gap:.75rem}.small{font-size:.8rem}.wrap-anywhere{overflow-wrap:anywhere;word-break:break-word}.hash-short{font-size:.75rem}.compact-error{max-width:420px;white-space:normal;overflow-wrap:anywhere}
.notification-list,.session-list,.work-list,.reservation-list{display:grid;gap:.8rem}.notification-item,.session-row,.work-card,.reservation-row,.attachment-row,.note-row{display:flex;justify-content:space-between;gap:1rem;align-items:center;padding:1rem;border:1px solid var(--border);border-radius:14px;background:color-mix(in srgb,var(--surface) 95%,var(--accent) 5%)}
.notification-item p,.work-card p,.reservation-row p,.note-row p{margin:.35rem 0}.notification-item.is-read{opacity:.65}.severity-danger{border-inline-start:4px solid var(--danger)}.severity-warning{border-inline-start:4px solid var(--warning)}.severity-success{border-inline-start:4px solid var(--success)}
.priority-urgent{border-inline-start:4px solid var(--danger)}.priority-high{border-inline-start:4px solid var(--warning)}
.secret-box{display:grid;gap:.5rem;padding:1rem;border:1px dashed var(--accent);border-radius:14px;background:var(--surface-muted)}.secret-box code{font-size:1.05rem;letter-spacing:.08em;overflow-wrap:anywhere}
.permission-admin{border:1px solid var(--border);border-radius:14px;padding:.8rem 1rem;margin:.75rem 0}.permission-admin summary{cursor:pointer;font-weight:800}.permission-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:.7rem;margin-top:1rem}.permission-grid .button{grid-column:1/-1;justify-self:start}
.preflight-card{border-inline-start:5px solid var(--success)}.preflight-card.preflight-failed{border-inline-start-color:var(--danger)}.preflight-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:.7rem}.check-row .dot.warning{background:var(--warning)}
.dc-capacity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:1.15rem;margin-bottom:1.25rem}.capacity-card{min-width:0}.capacity-meter{height:12px;border-radius:999px;background:var(--surface-muted);overflow:hidden;margin:1rem 0}.capacity-meter span{display:block;height:100%;background:linear-gradient(90deg,var(--success),var(--warning),var(--danger));border-radius:inherit}.metric-row{display:flex;justify-content:space-between;gap:.5rem;font-size:.84rem}
.comparison-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:1rem;margin:1rem 0}.metric-card{display:grid;gap:.3rem;padding:1rem;border:1px solid var(--border);border-radius:16px;background:var(--surface)}.metric-card b{font-size:1.65rem}.metric-card small{color:var(--muted)}
.report-filter{position:sticky;top:72px;z-index:10;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px);padding:.8rem;border:1px solid var(--border);border-radius:16px}
.duplicate-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:1rem}.duplicate-card{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:.8rem;padding-top:2.8rem}.duplicate-card>p,.duplicate-card>form{grid-column:1/-1}.score-ring{position:absolute;top:.8rem;inset-inline-end:.8rem;display:grid;place-items:center;width:52px;height:52px;border-radius:50%;background:conic-gradient(var(--accent) calc(var(--score,70)*1%),var(--surface-muted) 0);font-weight:900}.duplicate-side{padding:.8rem;border-radius:12px;background:var(--surface-muted);display:grid;gap:.25rem}
.card-list{display:grid;gap:.8rem}.completeness-row{display:flex;gap:1rem;align-items:center}.progress-circle{--p:calc(var(--progress)*1%);display:grid;place-items:center;flex:0 0 68px;width:68px;height:68px;border-radius:50%;background:radial-gradient(circle at center,var(--surface) 58%,transparent 60%),conic-gradient(var(--accent) var(--p),var(--surface-muted) 0);font-weight:900}
.attachment-row,.note-row{margin-top:.7rem}.attachment-row small,.note-row small{display:block;color:var(--muted)}
.dashboard-customizer{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.dashboard-customizer>div:first-child{display:grid;gap:.25rem}.dashboard-widget-chooser{display:flex;gap:.85rem;flex-wrap:wrap;grid-column:1/-1;width:100%;padding-top:.8rem;border-top:1px solid var(--border)}.dashboard-widgets{display:grid;gap:1.25rem}.dashboard-widgets>[data-dashboard-widget]{position:relative;min-width:0}.widget-handle{display:none;position:absolute;z-index:20;top:.5rem;inset-inline-start:.5rem;width:34px;height:34px;padding:0;border-radius:10px;background:var(--accent);color:#fff;cursor:grab}.dashboard-edit-mode .widget-handle{display:grid;place-items:center}.dashboard-edit-mode [data-dashboard-widget]{outline:2px dashed color-mix(in srgb,var(--accent) 55%,transparent);outline-offset:4px}.dashboard-edit-mode [data-dashboard-widget].is-dragging{opacity:.45;transform:scale(.99)}
.definition-list{display:grid;grid-template-columns:minmax(120px,.35fr) minmax(0,1fr);gap:.65rem 1rem}.definition-list dt{color:var(--muted)}.definition-list dd{margin:0;min-width:0}
.reservation-row{align-items:flex-start}.reservation-row>div{min-width:0}.reservation-row code{overflow-wrap:anywhere}

/* دو قالب تازه و خلاقانه */
body.layout-nebula{--radius:20px;background:radial-gradient(circle at 15% 10%,color-mix(in srgb,var(--accent) 20%,transparent),transparent 36%),radial-gradient(circle at 85% 85%,color-mix(in srgb,var(--accent-2,#7c3aed) 18%,transparent),transparent 38%),var(--page-bg)}
body.layout-nebula .card{border-color:color-mix(in srgb,var(--accent) 18%,var(--border));box-shadow:0 18px 55px rgba(15,23,42,.09);background:color-mix(in srgb,var(--surface) 91%,transparent);backdrop-filter:blur(16px)}
body.layout-nebula .workspace-header{background:color-mix(in srgb,var(--surface) 82%,transparent);backdrop-filter:blur(18px)}
body.layout-minimal .card{box-shadow:none;border-width:0 0 1px;border-radius:0;padding-inline:0}body.layout-minimal .summary-card,body.layout-minimal .stat{border-radius:10px;box-shadow:none}body.layout-minimal .container{max-width:1540px}
body.theme-lime{--accent:#65a30d;--accent-strong:#3f6212;--accent-soft:#ecfccb;--success:#16a34a;--warning:#ca8a04;--danger:#dc2626}
body.theme-copper{--accent:#b45309;--accent-strong:#78350f;--accent-soft:#ffedd5;--success:#15803d;--warning:#d97706;--danger:#b91c1c}

@media (max-width:900px){
 .content-grid.two-col{grid-template-columns:1fr}.dashboard-customizer{align-items:flex-start;flex-direction:column}.report-filter{position:static}.duplicate-grid{grid-template-columns:1fr}.notification-item,.session-row,.work-card,.reservation-row,.attachment-row{align-items:stretch;flex-direction:column}.compact-form{display:grid;grid-template-columns:1fr 1fr}.compact-form .button,.compact-form input[name="notes"]{grid-column:1/-1}.permission-grid{grid-template-columns:1fr}.preflight-grid{grid-template-columns:1fr}.dc-capacity-grid{grid-template-columns:1fr}.comparison-grid{grid-template-columns:1fr 1fr}.definition-list{grid-template-columns:1fr}.definition-list dt{font-weight:700}.header-notification{padding:.45rem .55rem;font-size:0}.header-notification::before{content:"🔔";font-size:1rem}.header-notification b{font-size:.68rem}.dashboard-widgets{gap:1rem}
}
@media (max-width:520px){.comparison-grid{grid-template-columns:1fr}.compact-form{grid-template-columns:1fr}.duplicate-card{grid-template-columns:1fr}.duplicate-card>p,.duplicate-card>form{grid-column:auto}.page-head .head-actions{width:100%}.page-head .head-actions .button{flex:1 1 auto}.permission-grid{font-size:.88rem}.metric-row{flex-direction:column}.dashboard-widget-chooser{display:grid;grid-template-columns:1fr 1fr}.notification-item,.work-card,.reservation-row{padding:.8rem}.report-filter>*{width:100%}}
@media print{.sidebar,.workspace-header,.app-footer,.dashboard-customizer,.filter-bar,.head-actions,.button,.flash-stack{display:none!important}.workspace{margin:0!important}.container{max-width:none!important;padding:0!important}.card{box-shadow:none!important;border:1px solid #ddd!important;break-inside:avoid}.table-wrap{overflow:visible!important}body{background:#fff!important;color:#000!important}}

/* 1.1.0 - IPAM visual map */
.ipam-legend{display:flex;flex-wrap:wrap;gap:.75rem;font-size:.82rem;align-items:center}.ipam-legend span{display:inline-flex;align-items:center;gap:.35rem}.ipam-legend i{width:.8rem;height:.8rem;border-radius:.24rem;display:inline-block}.ipam-legend .free,.subnet-cell.free{background:#d9f6e8}.ipam-legend .reserved,.subnet-cell.reserved{background:#fbbf24}.ipam-legend .allocated,.subnet-cell.allocated{background:#ef4444}.subnet-map-list{display:grid;gap:.75rem;margin:1rem 0}.subnet-map-card{border:1px solid var(--line,#e2e8f0);border-radius:14px;padding:.75rem;background:color-mix(in srgb,var(--surface,#fff) 94%,var(--primary,#4f46e5) 6%)}.subnet-map-head,.subnet-summary{display:flex;justify-content:space-between;gap:.75rem;align-items:center;flex-wrap:wrap}.subnet-map{direction:ltr;display:grid;grid-template-columns:repeat(16,minmax(4px,1fr));gap:3px;margin:.65rem 0}.subnet-cell{height:8px;border-radius:3px;outline:1px solid color-mix(in srgb,currentColor 10%,transparent)}.subnet-summary{font-size:.76rem;color:var(--muted,#64748b)}.capacity-rule-form{margin-top:1rem;padding-top:1rem;border-top:1px dashed var(--line,#e2e8f0)}
@media(max-width:640px){.ipam-legend{width:100%}.subnet-map{grid-template-columns:repeat(12,minmax(4px,1fr))}.metric-row{display:grid;grid-template-columns:1fr 1fr}.capacity-rule-form{display:grid;grid-template-columns:1fr 1fr}.capacity-rule-form button{grid-column:1/-1}}

/* کنترل قابل لمس برای ترتیب ویجت‌های داشبورد */
.dashboard-widget-choice{display:flex;align-items:center;justify-content:space-between;gap:.65rem;min-width:220px;padding:.45rem .55rem;border:1px solid var(--border);border-radius:12px;background:color-mix(in srgb,var(--surface) 94%,var(--accent) 6%)}
.dashboard-widget-choice .check{min-width:0;flex:1;margin:0}
.dashboard-widget-order-controls{display:flex;gap:.3rem;flex:0 0 auto}
.button.tiny{min-height:30px;padding:.25rem .5rem;font-size:.8rem;border-radius:8px}
.button.icon-only{width:32px;padding:.2rem;display:inline-grid;place-items:center}
@media (max-width:520px){.dashboard-widget-chooser{grid-template-columns:1fr}.dashboard-widget-choice{width:100%;min-width:0}.dashboard-widget-order-controls .button{width:36px;min-height:36px}}

/* 1.1.1 — اصلاح ظاهری فرم‌ها، چک‌باکس‌ها و ورود */
:where(input[type="checkbox"], input[type="radio"]) {
  appearance: auto;
  width: 1rem !important;
  height: 1rem !important;
  min-width: 1rem !important;
  min-height: 1rem !important;
  max-width: 1rem !important;
  max-height: 1rem !important;
  flex: 0 0 1rem;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
  accent-color: var(--accent, var(--primary, #4f46e5));
  vertical-align: middle;
}

label.check,
label.switch-row,
label.checkbox-line,
.date-mode-switch label {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
  width: fit-content;
  max-width: 100%;
  min-height: 32px;
  margin: 0;
  padding: .3rem .42rem;
  border-radius: 8px;
  color: var(--text, #172033);
  font-size: .86rem;
  font-weight: 650;
  line-height: 1.45;
  cursor: pointer;
}
label.checkbox-line { align-items: flex-start; }
label.check:hover,
label.switch-row:hover,
label.checkbox-line:hover,
.date-mode-switch label:hover {
  background: color-mix(in srgb, var(--primary, #4f46e5) 6%, transparent);
}
fieldset label.check { margin-block: .2rem; }
.form-grid > label.check,
.form-grid > label.switch-row { align-self: center; }
.dashboard-widget-choice label.check {
  width: 100%;
  padding: .2rem;
  background: transparent !important;
}
.check-stack label.switch-row { width: 100%; }

.auth-container {
  width: min(100%, 420px) !important;
  max-width: 420px !important;
  min-height: 100svh;
  margin: 0 auto !important;
  padding: 1rem !important;
  display: grid;
  align-content: center;
}
.auth-card {
  width: 100%;
  margin: 0;
  padding: 1.25rem;
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .09);
}
.auth-head {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .9rem;
}
.auth-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary, #155eef), var(--primary-dark, #0f46bd));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary, #155eef) 28%, transparent);
  font-weight: 900;
}
.auth-card h1 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.35;
}
.auth-card .auth-copy { min-width: 0; }
.auth-card .auth-copy .muted {
  margin: .18rem 0 0;
  font-size: .8rem;
  line-height: 1.6;
}
.auth-card .stack-form { gap: .7rem; }
.auth-card label {
  gap: .25rem;
  font-size: .84rem;
}
.auth-card input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 42px;
  padding: .5rem .65rem;
  border-radius: 10px;
}
.auth-card button[type="submit"] {
  width: 100%;
  min-height: 42px;
  padding: .5rem .8rem;
}
.auth-card .notice {
  margin: .65rem 0;
  padding: .65rem .75rem;
  font-size: .8rem;
}

@media (max-width: 520px) {
  .auth-container { padding: .7rem !important; }
  .auth-card { padding: 1rem; border-radius: 15px; }
  .auth-mark { width: 38px; height: 38px; flex-basis: 38px; border-radius: 10px; }
  .auth-card h1 { font-size: 1.15rem; }
  label.check,
  label.switch-row,
  label.checkbox-line,
  .date-mode-switch label { font-size: .82rem; }
}


/* 1.1.2 — پالایش خوانایی، سلامت سامانه و اجزای هدر */
body.theme-lime {
  --accent:#4d6518; --accent-strong:#34450f; --accent-soft:#eef4da;
  --primary:#4d6518; --primary-dark:#34450f; --text:#17210f; --muted:#59634c;
  --surface:#ffffff; --card:#ffffff; --bg:#f5f7ef; --line:#d9dfcc; --border:#d9dfcc;
  --success:#1f7a4c; --warning:#8a6200; --danger:#b42318; --info:#315a9d;
}
body.theme-copper {
  --accent:#8a431d; --accent-strong:#5f2d13; --accent-soft:#f7e8df;
  --primary:#8a431d; --primary-dark:#5f2d13; --text:#251811; --muted:#6f5a4e;
  --surface:#ffffff; --card:#ffffff; --bg:#f8f4f1; --line:#e3d6ce; --border:#e3d6ce;
  --success:#26734d; --warning:#8a5a00; --danger:#a72e24; --info:#315a9d;
}
body.theme-lime .workspace-header, body.theme-copper .workspace-header,
body.theme-lime .sidebar, body.theme-copper .sidebar { color:var(--text); }
body.theme-lime .card, body.theme-copper .card,
body.theme-lime input, body.theme-copper input,
body.theme-lime select, body.theme-copper select,
body.theme-lime textarea, body.theme-copper textarea { background:#fff; color:var(--text); }
body.theme-lime a:not(.button), body.theme-copper a:not(.button) { color:var(--accent-strong); }

.version-chip{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:0!important;height:auto!important;padding:.28rem .52rem!important;
  border-radius:8px!important;font-size:.72rem!important;font-weight:700!important;
  line-height:1.2;white-space:nowrap;background:color-mix(in srgb,var(--surface,#fff) 88%,var(--accent,#4f46e5) 12%);
  border:1px solid var(--border,var(--line,#dbe2ea));color:var(--muted,#64748b);
}
.header-notification{position:relative;min-height:38px;padding:.42rem .65rem!important;border-radius:10px!important;font-weight:700}
.notification-bell{font-size:1rem;line-height:1}.notification-label{display:inline}.header-notification b{min-width:1.25rem;height:1.25rem;font-size:.68rem}

.health-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem;margin-bottom:1rem}
.health-gauge{display:flex;align-items:center;gap:1rem;padding:1rem;border:1px solid var(--border,var(--line));border-radius:16px;background:var(--surface,var(--card,#fff));box-shadow:var(--shadow)}
.health-gauge>div:last-child{display:grid;gap:.25rem;min-width:0}.health-gauge small{overflow-wrap:anywhere}
.gauge-ring{--value:0;width:74px;height:74px;flex:0 0 74px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--accent,#4f46e5) calc(var(--value)*1%),color-mix(in srgb,var(--border,#e2e8f0) 70%,transparent) 0);position:relative}
.gauge-ring::after{content:"";position:absolute;inset:8px;border-radius:50%;background:var(--surface,var(--card,#fff))}.gauge-ring span{position:relative;z-index:1;font-weight:900;font-size:.9rem}
.health-gauge.success .gauge-ring{--accent:var(--success,#087a55)}.health-gauge.warning .gauge-ring{--accent:var(--warning,#9a6700)}.health-gauge.danger .gauge-ring{--accent:var(--danger,#b42318)}
.health-number{width:74px;height:74px;flex:0 0 74px;border-radius:18px;display:grid;place-items:center;font-size:1.7rem;font-weight:900;background:var(--accent-soft,#e4edff);color:var(--accent-strong,var(--primary-dark))}
.host-ssl-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin:1rem 0}.host-ssl-summary>div{display:grid;gap:.25rem;padding:.8rem;border:1px solid var(--border,var(--line));border-radius:12px;background:color-mix(in srgb,var(--surface,#fff) 95%,var(--accent,#4f46e5) 5%)}.host-ssl-summary span{font-size:.78rem;color:var(--muted)}
.command-hint{direction:ltr;text-align:left;white-space:pre-wrap;overflow:auto;padding:.75rem;border-radius:10px;background:#111827;color:#e5e7eb}

.proxy-settings{margin-top:.8rem;border:1px solid var(--border,var(--line));border-radius:12px;padding:.75rem}.proxy-settings summary{cursor:pointer;font-weight:800}.webshare-box{margin-top:.8rem;padding:.8rem;border-radius:12px;background:color-mix(in srgb,var(--surface,#fff) 92%,var(--accent,#4f46e5) 8%)}.webshare-box h3{margin:0;font-size:1rem}.webshare-fetch-form{display:grid!important;grid-template-columns:1fr 220px auto;gap:.6rem;margin-top:.8rem}.webshare-fetch-form input{min-width:0}

.iran-access-inventory-row{grid-template-columns:minmax(170px,1.3fr) repeat(4,minmax(130px,1fr)) minmax(170px,auto)!important;gap:.8rem!important;align-items:center}.iran-access-inventory-row>div{min-width:0}.iran-access-inventory-row b,.iran-access-inventory-row small{overflow-wrap:anywhere}

.card+.card,.section-block+.section-block,.content-grid+.card,.card+.section-block{margin-top:1rem}.content-grid{align-items:start}.content-grid>.card{margin:0}.form-grid>label,.stack-form>label{min-width:0}

@media(max-width:1100px){.health-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.iran-access-inventory-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}.iran-access-main,.iran-access-row-actions{grid-column:1/-1}}
@media(max-width:760px){
  .health-grid{grid-template-columns:1fr}.health-gauge{padding:.85rem}.host-ssl-summary{grid-template-columns:1fr}.webshare-fetch-form{grid-template-columns:1fr}.notification-label{display:none}.header-notification{width:40px;padding:.35rem!important;justify-content:center}.header-notification b{position:absolute;inset-block-start:-5px;inset-inline-start:-5px}.version-chip{font-size:.66rem!important;padding:.22rem .38rem!important}.iran-access-inventory-row{grid-template-columns:1fr!important}.iran-access-main,.iran-access-row-actions{grid-column:auto}.health-checks{grid-template-columns:1fr!important}
}

/* 1.1.3 — بازطراحی یکپارچه رابط، پالت‌های سازگار و آیکون‌های داخلی */
:root{
  --page-bg:#f4f6fa;--surface:#fff;--surface-muted:#f7f9fc;--border:#dbe3ed;
  --accent:var(--primary,#4f46e5);--accent-strong:var(--primary-dark,#3730a3);--accent-soft:#eef2ff;
  --space-1:.35rem;--space-2:.55rem;--space-3:.8rem;--space-4:1rem;--space-5:1.25rem;
}
body{background:var(--page-bg,var(--bg));}
.ui-icon{width:1.1rem;height:1.1rem;display:inline-block;flex:0 0 1.1rem;fill:currentColor;vertical-align:-.18em}
.sidebar-nav a{gap:.72rem;padding-inline:.72rem}.sidebar-nav a .ui-icon{opacity:.82}.sidebar-nav a.active .ui-icon,.sidebar-nav a:hover .ui-icon{opacity:1}
.sidebar-close,.menu-button,.icon-button,.scroll-to-top{line-height:1}.sidebar-close .ui-icon{width:1.25rem;height:1.25rem}.menu-button .ui-icon{width:1.25rem;height:1.25rem}.icon-button .ui-icon{width:1rem;height:1rem}.scroll-to-top .ui-icon{width:1.2rem;height:1.2rem}

/* کنترل‌های انتخاب کوچک و هم‌تراز */
:where(input[type="checkbox"],input[type="radio"]){
  appearance:auto!important;width:1rem!important;height:1rem!important;min-width:1rem!important;min-height:1rem!important;
  flex:0 0 1rem!important;margin:0!important;padding:0!important;box-shadow:none!important;background:none!important;border-radius:3px!important;
}
label.check,label.switch-row,label.checkbox-line,.date-mode-switch label{gap:.55rem!important;align-items:center!important;min-height:34px;padding:.38rem .5rem!important;border-radius:9px}
label.checkbox-line{align-items:flex-start!important}

/* پالت‌های کامل و با کنتراست استاندارد */
body.theme-indigo{--primary:#4057d6;--primary-dark:#2f3fa5;--accent:#4057d6;--accent-strong:#2f3fa5;--accent-soft:#edf0ff;--nav-bg:#121a31;--nav-active:#4057d6;--page-bg:#f4f6fb;--surface-muted:#f7f8fc;--border:#dce2ee}
body.theme-emerald{--primary:#087f5b;--primary-dark:#065f46;--accent:#087f5b;--accent-strong:#065f46;--accent-soft:#e7f7f1;--nav-bg:#10251f;--nav-active:#087f5b;--page-bg:#f3f8f6;--surface-muted:#f4f9f7;--border:#d7e6e0}
body.theme-violet{--primary:#6d4bd1;--primary-dark:#5132a8;--accent:#6d4bd1;--accent-strong:#5132a8;--accent-soft:#f1edff;--nav-bg:#20182f;--nav-active:#6d4bd1;--page-bg:#f6f4fb;--surface-muted:#f8f6fc;--border:#e1dced}
body.theme-graphite{--primary:#3f4c5f;--primary-dark:#263244;--accent:#3f4c5f;--accent-strong:#263244;--accent-soft:#eef1f5;--nav-bg:#151b25;--nav-active:#44536a;--page-bg:#f3f5f7;--surface-muted:#f6f7f9;--border:#d9dee5}
body.theme-sunset{--primary:#c65319;--primary-dark:#963b10;--accent:#c65319;--accent-strong:#963b10;--accent-soft:#fff0e7;--nav-bg:#2d1b16;--nav-active:#c65319;--page-bg:#faf6f3;--surface-muted:#fcf8f5;--border:#eadcd3}
body.theme-ocean{--primary:#087ea4;--primary-dark:#075c79;--accent:#087ea4;--accent-strong:#075c79;--accent-soft:#e6f5f9;--nav-bg:#10252f;--nav-active:#087ea4;--page-bg:#f2f8fa;--surface-muted:#f5fafb;--border:#d5e6eb}
body.theme-rose{--primary:#a43b67;--primary-dark:#7b294d;--accent:#a43b67;--accent-strong:#7b294d;--accent-soft:#faeaf1;--nav-bg:#2b1822;--nav-active:#a43b67;--page-bg:#faf5f7;--surface-muted:#fcf7f9;--border:#ead9e1}
body.theme-amber{--primary:#a36708;--primary-dark:#784b06;--accent:#a36708;--accent-strong:#784b06;--accent-soft:#fff4d9;--nav-bg:#2c2414;--nav-active:#a36708;--page-bg:#faf8f2;--surface-muted:#fcfaf5;--border:#e8e0cc}
body.theme-cyan{--primary:#0c8495;--primary-dark:#08616e;--accent:#0c8495;--accent-strong:#08616e;--accent-soft:#e4f6f8;--nav-bg:#10282c;--nav-active:#0c8495;--page-bg:#f1f8f9;--surface-muted:#f5fafb;--border:#d4e6e8}
body.theme-midnight{--primary:#5268d6;--primary-dark:#38479f;--accent:#5268d6;--accent-strong:#38479f;--accent-soft:#e9edff;--nav-bg:#101526;--nav-active:#5268d6;--page-bg:#f1f3f9;--surface-muted:#f5f6fb;--border:#d8ddea}
body.theme-lime{--primary:#596b28;--primary-dark:#3f4c1c;--accent:#596b28;--accent-strong:#3f4c1c;--accent-soft:#eef2df;--nav-bg:#1e2515;--nav-active:#657a2e;--page-bg:#f6f7f1;--surface-muted:#f8f9f4;--border:#dde2d0;--text:#1d2418;--muted:#626b59}
body.theme-copper{--primary:#86502e;--primary-dark:#613820;--accent:#86502e;--accent-strong:#613820;--accent-soft:#f4e9e1;--nav-bg:#291c16;--nav-active:#925b37;--page-bg:#f8f5f2;--surface-muted:#faf8f6;--border:#e4d9d1;--text:#281b15;--muted:#6e5d54}
body.theme-lime .sidebar,body.theme-copper .sidebar{color:#e9eee3}body.theme-lime .workspace-header,body.theme-copper .workspace-header{color:var(--text)}

/* هر قالب هویت سطح و سایه مخصوص خودش را دارد */
body.layout-classic{--card-radius:12px;--card-shadow:0 3px 12px rgba(15,23,42,.05)}
body.layout-modern{--card-radius:17px;--card-shadow:0 14px 34px rgba(15,23,42,.075)}
body.layout-compact{--card-radius:10px;--card-shadow:0 3px 10px rgba(15,23,42,.045)}
body.layout-glass{--card-radius:18px;--card-shadow:0 16px 36px rgba(15,23,42,.09)}
body.layout-aurora{--card-radius:20px;--card-shadow:0 18px 42px color-mix(in srgb,var(--accent) 10%,rgba(15,23,42,.08))}
body.layout-executive{--card-radius:9px;--card-shadow:0 5px 18px rgba(15,23,42,.065)}
body.layout-nebula{--card-radius:20px;--card-shadow:0 18px 50px rgba(15,23,42,.10)}
body.layout-minimal{--card-radius:8px;--card-shadow:none}
body:not(.layout-minimal) .card{border-radius:var(--card-radius);box-shadow:var(--card-shadow)}
body.layout-executive .card{border-top:3px solid color-mix(in srgb,var(--accent) 70%,#fff)}
body.layout-minimal .card{padding-block:1.15rem}

/* هدر جمع‌وجور */
.workspace-header{grid-template-columns:minmax(220px,1fr) auto auto auto;gap:.75rem;padding:.58rem 1.15rem;min-height:58px}
.version-chip{display:inline!important;background:transparent!important;border:0!important;border-radius:0!important;padding:0 .15rem!important;min-height:0!important;height:auto!important;font-size:.64rem!important;font-weight:650!important;color:var(--muted)!important;opacity:.78}
.header-notification{min-height:34px!important;padding:.35rem .5rem!important;border-radius:9px!important;gap:.35rem!important;background:var(--surface)!important}.header-notification::before{content:none!important}.header-notification .ui-icon{width:1rem;height:1rem}.header-notification b{min-width:1.18rem;height:1.18rem;font-size:.62rem}

/* فاصله‌گذاری سراسری و جلوگیری از چسبندگی */
.container{display:block}.page-head{margin-bottom:1.15rem}.content-grid{gap:1.15rem}.content-grid>.card{padding:1.2rem;margin:0}.card{padding:1.15rem;margin:0 0 1rem}.card-head{margin-bottom:1rem}.section-block{margin-top:1.8rem}.section-title{margin:0 0 .85rem}.section-title h2{font-size:1.15rem}.filter-bar,.filter-panel{padding:.85rem;border:1px solid var(--border);border-radius:12px;background:var(--surface);margin-bottom:1rem}.form-grid,.stack-form{row-gap:.9rem;column-gap:1rem}fieldset{padding:1rem;border:1px solid var(--border);border-radius:12px}legend{padding-inline:.45rem}

/* IPهای دسترسی ایران */
.page-iran-access .access-records{gap:1rem;margin-top:1rem;padding:.15rem}
.page-iran-access .access-record{padding:1.05rem 1.1rem;border-radius:14px;background:var(--surface);border-color:var(--border);box-shadow:0 5px 18px rgba(15,23,42,.045)}
.page-iran-access .access-record-head{padding-bottom:.8rem;border-bottom:1px solid var(--border)}
.page-iran-access .access-record-grid{gap:.7rem;margin-top:.85rem}
.page-iran-access .access-record-grid>div{padding:.72rem .78rem;border-radius:10px;background:var(--surface-muted);border-color:var(--border)}
.page-iran-access .access-record-actions{padding-top:.85rem;margin-top:.85rem;border-top:1px dashed var(--border);gap:.6rem}
.page-iran-access .record-notes{padding:.7rem .8rem;margin-top:.8rem;border-radius:8px}

/* دیتاسنتر و فهرست وضعیت IP */
.page-data-centers #iran-access-inventory{padding:0 .1rem}.page-data-centers #iran-access-inventory>.section-title{padding-inline:.15rem}
.page-data-centers #datacenters-results,.page-data-centers #datacenter-iran-access-results{padding:1rem}
.iran-access-inventory-list{gap:.85rem;padding:.1rem}
.iran-access-inventory-row{padding:1rem!important;border-radius:12px!important;background:var(--surface)!important;border-color:var(--border)!important;box-shadow:0 3px 12px rgba(15,23,42,.035)}
.iran-access-inventory-row>div:not(.iran-access-main):not(.iran-access-row-actions){padding:.55rem .65rem;border-radius:9px;background:var(--surface-muted)}
.iran-access-main{padding:.25rem .1rem}.iran-access-row-actions{padding:.25rem .1rem;gap:.45rem!important}

/* کارتابل */
.page-work-queue .content-grid{gap:1.25rem}.page-work-queue .work-list{gap:.9rem;padding:.1rem}
.page-work-queue .work-card{padding:1rem 1.05rem;border-radius:13px;align-items:flex-start;background:var(--surface);border-color:var(--border)}
.page-work-queue .work-card>div{min-width:0;padding:.1rem .15rem}.page-work-queue .work-card p{margin:.45rem 0;line-height:1.65}.page-work-queue .compact-form{padding:.7rem;border-radius:10px;background:var(--surface-muted);align-self:stretch}

/* اعلان‌ها */
.page-notifications .content-grid{gap:1.25rem}.page-notifications .notification-list{gap:.9rem;padding:.1rem}
.page-notifications .notification-item{padding:1rem 1.05rem;border-radius:13px;align-items:flex-start;background:var(--surface);border-color:var(--border)}
.page-notifications .notification-item>div:first-child{min-width:0;padding:.1rem .15rem}.page-notifications .notification-item p{margin:.42rem 0;line-height:1.65}.page-notifications .row-actions{padding:.2rem 0}
.page-notifications .proxy-settings{padding:1rem;margin-top:1rem}.page-notifications .webshare-box{padding:1rem;margin-top:1rem}.page-notifications fieldset+fieldset{margin-top:1rem}

/* انتخاب قالب/پالت */
.theme-guidance{margin:.1rem 0 .8rem}.theme-choice.hidden{display:none!important}.layout-choice,.theme-choice{padding:.85rem}.theme-choice-grid{grid-template-columns:repeat(auto-fit,minmax(155px,1fr))}

@media(max-width:1180px){.workspace-header{grid-template-columns:minmax(200px,1fr) auto auto}.version-chip{display:none!important}}
@media(max-width:900px){
  .workspace-header{grid-template-columns:minmax(0,1fr) auto;padding:.55rem .75rem}.live-clock{display:none}.header-notification{width:38px!important;justify-content:center}.notification-label{display:none}.header-notification b{position:absolute;inset-block-start:-4px;inset-inline-start:-4px}.version-chip{display:none!important}
  .page-work-queue .work-card,.page-notifications .notification-item{flex-direction:column;gap:.75rem}.page-work-queue .compact-form{width:100%}
}
@media(max-width:700px){
  .container{width:calc(100% - 1rem)}.card,.content-grid>.card{padding:.9rem}.filter-bar,.filter-panel{padding:.7rem}
  .page-iran-access .access-record{padding:.85rem}.page-iran-access .access-record-grid{grid-template-columns:1fr 1fr}.page-iran-access .access-record-actions{display:grid;grid-template-columns:1fr}.page-iran-access .access-record-actions>*{width:100%}.page-iran-access .access-record-actions button,.page-iran-access .access-record-actions .button{width:100%}
  .iran-access-inventory-row{padding:.85rem!important}.iran-access-inventory-row>div:not(.iran-access-main):not(.iran-access-row-actions){padding:.65rem}.iran-access-row-actions{display:grid!important;grid-template-columns:1fr}.iran-access-row-actions>*{width:100%}.iran-access-row-actions .status{width:max-content;max-width:100%}
  .page-work-queue .compact-form{display:grid;grid-template-columns:1fr}.page-work-queue .compact-form>*{width:100%;grid-column:auto!important}
  .page-notifications .row-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.page-notifications .row-actions>*{width:100%}.page-notifications .row-actions .button{width:100%}
}
@media(max-width:430px){.page-iran-access .access-record-grid{grid-template-columns:1fr}.workspace-title b{font-size:.8rem}.workspace-header{padding-inline:.55rem}.card-head{gap:.55rem}}

/* 1.1.4 — نرمال‌سازی نهایی چیدمان و فاصله‌گذاری */
[hidden] { display: none !important; }

:root {
  --layout-gap: 1rem;
  --panel-padding: 1.15rem;
  --panel-radius: 14px;
  --control-height: 42px;
}

.workspace > main.container {
  display: flex;
  flex-direction: column;
  gap: var(--layout-gap);
  width: min(1480px, calc(100% - 2.5rem));
  margin-block: 1.35rem 2.5rem;
}
.workspace > main.container > * { min-width: 0; margin-block: 0; }
.page-head { margin: 0 0 .15rem; padding: 0; }
.card,
.content-grid > .card,
.dashboard-widgets > .card {
  margin: 0;
  padding: var(--panel-padding);
  border-radius: var(--panel-radius);
}
.card-head { min-width: 0; margin-bottom: .9rem; }
.card-head > * { min-width: 0; }
.card-head h2,
.card-head h3 { line-height: 1.45; }
.content-grid { gap: var(--layout-gap); }
.section-block { margin-top: .5rem; }
.section-title { margin: 0 0 .75rem; padding-inline: .1rem; }
.empty { padding: 1.25rem; }

input, select, textarea {
  min-height: var(--control-height);
  padding: .62rem .75rem;
}
button, .button { min-height: 38px; }
fieldset {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border-radius: 12px;
}
legend { max-width: calc(100% - 1rem); }
.form-grid,
.stack-form { min-width: 0; }
.form-grid > *,
.stack-form > * { min-width: 0; }

/* داشبورد */
.page-dashboard .dashboard-customizer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem 1rem;
  padding: .85rem 1rem;
  min-height: 0;
}
.dashboard-customizer-copy { display: grid; gap: .18rem; min-width: 0; }
.dashboard-customizer-copy b { font-size: .92rem; }
.dashboard-customizer-copy small { color: var(--muted); font-size: .76rem; }
.dashboard-customizer-actions { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: flex-end; }
.page-dashboard .dashboard-widget-chooser {
  grid-column: 1 / -1;
  width: 100%;
  margin: .2rem 0 0;
  padding: .8rem 0 0;
  border-top: 1px solid var(--border, var(--line));
}
.page-dashboard .dashboard-widgets { gap: 1rem; }
.page-dashboard .dashboard-analytics-grid {
  grid-template-columns: minmax(0, 1fr) minmax(190px, 220px);
  gap: 1rem;
  align-items: start;
}
.page-dashboard .request-chart-card { align-self: start; }
.page-dashboard .dashboard-side-stats {
  display: grid;
  grid-template-rows: none;
  grid-auto-rows: auto;
  align-content: start;
  gap: .7rem;
}
.page-dashboard .dashboard-side-stats .stat {
  min-height: 92px;
  justify-content: center;
  padding: .8rem .9rem;
}
.page-dashboard .dashboard-side-stats .stat strong { font-size: 1.35rem; }
.page-dashboard .registration-overview-card::after { display: none; }
.page-dashboard .registration-overview-card { overflow: visible; }
.page-dashboard .dashboard-compact-section .empty { padding-block: 1rem; }
.page-dashboard .dashboard-table-card { overflow: hidden; }
.page-dashboard .dashboard-table-card > .table-wrap { margin: 0; }
.page-dashboard .dashboard-comparison-card .comparison-grid { margin-bottom: 0; }
.page-dashboard .metric-card { min-height: 105px; align-content: center; }
.page-dashboard .horizontal-bar-chart { gap: .7rem; }
.page-dashboard .horizontal-bar-row { grid-template-columns: minmax(170px, 230px) minmax(0, 1fr); }

/* اعلان‌ها */
.page-notifications .notification-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: 1rem;
  align-items: start;
}
.page-notifications .notification-center-card,
.page-notifications .notification-settings-card { min-width: 0; }
.page-notifications .notification-list { gap: .75rem; }
.page-notifications .notification-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1rem;
  border-radius: 12px;
}
.page-notifications .notification-copy { min-width: 0; padding: 0; }
.page-notifications .notification-copy p { margin: .3rem 0; overflow-wrap: anywhere; }
.page-notifications .notification-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.page-notifications .notification-actions form { margin: 0; }
.page-notifications .notification-channel-form { display: grid; gap: 1rem; }
.page-notifications .channel-fieldset { display: grid; gap: .85rem; }
.page-notifications .channel-toggle-row { min-height: 34px; display: flex; align-items: center; }
.page-notifications .channel-grid { gap: .8rem; }
.page-notifications .channel-options { display: flex; flex-wrap: wrap; gap: .5rem 1rem; padding-top: .2rem; }
.page-notifications .proxy-settings { margin: 0; padding: .85rem; }
.page-notifications .proxy-settings > summary { padding: .15rem 0 .65rem; }
.page-notifications .webshare-box { margin: .85rem 0 0; padding: .85rem; }
.page-notifications .compact-card-head { margin-bottom: .75rem; }
.page-notifications .notification-save-row { display: flex; justify-content: flex-start; }
.page-notifications .notification-save-row .button { min-width: 190px; }
.page-notifications .notification-tools {
  display: grid;
  gap: .75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, var(--line));
}
.page-notifications .notification-tool-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(135px, .55fr) auto;
  gap: .65rem;
  align-items: end;
  margin: 0;
}
.page-notifications .notification-test-form { margin: 0; }
.page-notifications .notification-test-form .button { width: auto; }

/* کارتابل */
.page-work-queue .work-queue-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: 1rem;
  align-items: start;
}
.page-work-queue .work-filter {
  display: grid;
  grid-template-columns: auto minmax(160px, 220px) auto;
  align-items: end;
  gap: .65rem;
  padding: .75rem;
  margin-bottom: .9rem;
  border: 1px solid var(--border, var(--line));
  border-radius: 11px;
  background: var(--surface-muted, #f7f9fc);
}
.page-work-queue .work-list { gap: .75rem; }
.page-work-queue .work-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
  align-items: stretch;
  gap: .9rem;
  padding: .95rem;
  border-radius: 12px;
}
.page-work-queue .work-card-content { min-width: 0; padding: .15rem .2rem; }
.page-work-queue .work-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; }
.page-work-queue .work-card-content p { margin: .4rem 0; }
.page-work-queue .work-card-meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; color: var(--muted); font-size: .76rem; }
.page-work-queue .work-card-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  align-content: start;
  padding: .75rem;
  border: 1px solid var(--border, var(--line));
  border-radius: 10px;
  background: var(--surface-muted, #f7f9fc);
}
.page-work-queue .work-card-editor label { font-size: .74rem; }
.page-work-queue .work-editor-notes,
.page-work-queue .work-card-editor button { grid-column: 1 / -1; }
.page-work-queue .work-create-card { position: sticky; top: 76px; }

/* IPهای دسترسی ایران */
.page-iran-access .access-control-grid { gap: 1rem; }
.page-iran-access .access-records { padding: 0; gap: .85rem; }
.page-iran-access .access-record {
  padding: 1rem;
  border-radius: 13px;
  overflow: hidden;
}
.page-iran-access .access-record-head { gap: .75rem; padding-bottom: .75rem; }
.page-iran-access .access-record-grid { gap: .6rem; }
.page-iran-access .access-record-grid > div { padding: .65rem .7rem; }
.page-iran-access .access-record-actions { gap: .55rem; }
.page-iran-access .filter-bar { margin: 0 0 .9rem; }

/* دیتاسنتر و وضعیت IP */
.page-data-centers #datacenters-results,
.page-data-centers #datacenter-iran-access-results { padding: 1rem; }
.page-data-centers .iran-access-inventory-list { padding: 0; gap: .8rem; }
.page-data-centers .iran-access-inventory-row {
  padding: .95rem !important;
  gap: .75rem !important;
  border-radius: 12px !important;
}
.page-data-centers .iran-access-inventory-row > div:not(.iran-access-main):not(.iran-access-row-actions) {
  padding: .65rem .7rem;
  border-radius: 9px;
}
.page-data-centers .iran-access-main { padding: .2rem; }
.page-data-centers .iran-access-row-actions {
  padding: .15rem;
  gap: .45rem !important;
  align-items: center;
}

/* جدول‌ها و فرم‌های کوچک */
.table-wrap { margin: 0; }
.table-wrap + * { margin-top: .8rem; }
.row-actions { min-width: 0; }
.inline-form { min-width: 0; }

@media (max-width: 1180px) {
  .page-notifications .notification-layout,
  .page-work-queue .work-queue-layout { grid-template-columns: 1fr; }
  .page-work-queue .work-create-card { position: static; }
  .page-dashboard .dashboard-analytics-grid { grid-template-columns: minmax(0, 1fr) 200px; }
}

@media (max-width: 900px) {
  .workspace > main.container { width: calc(100% - 1.25rem); margin-block: .9rem 1.5rem; }
  .page-dashboard .dashboard-customizer { grid-template-columns: 1fr; }
  .dashboard-customizer-actions { justify-content: flex-start; }
  .page-dashboard .dashboard-analytics-grid { grid-template-columns: 1fr; }
  .page-dashboard .dashboard-side-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .page-dashboard .dashboard-side-stats .stat { min-height: 82px; }
  .page-work-queue .work-card { grid-template-columns: 1fr; }
  .page-notifications .notification-tool-form { grid-template-columns: 1fr 1fr; }
  .page-notifications .notification-tool-form button { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  :root { --panel-padding: .85rem; --layout-gap: .75rem; }
  .workspace > main.container { width: calc(100% - .75rem); }
  .page-head { gap: .7rem; }
  .page-head-action,
  .page-head-action .button { width: 100%; }
  .page-dashboard .dashboard-customizer { padding: .75rem; }
  .dashboard-customizer-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .dashboard-customizer-actions .button { width: 100%; }
  .page-dashboard .dashboard-side-stats { grid-template-columns: 1fr; }
  .page-dashboard .horizontal-bar-row { grid-template-columns: 1fr; gap: .3rem; }
  .page-dashboard .metric-card { min-height: 0; }
  .page-notifications .notification-item { grid-template-columns: 1fr; align-items: start; }
  .page-notifications .notification-actions { width: 100%; }
  .page-notifications .notification-actions > *,
  .page-notifications .notification-actions .button { flex: 1 1 auto; }
  .page-notifications .channel-grid { grid-template-columns: 1fr; }
  .page-notifications .channel-grid .span-2 { grid-column: auto; }
  .page-notifications .notification-save-row .button { width: 100%; }
  .page-notifications .notification-tool-form { grid-template-columns: 1fr; }
  .page-notifications .notification-tool-form button { grid-column: auto; width: 100%; }
  .page-notifications .notification-test-form .button { width: 100%; }
  .page-work-queue .work-filter { grid-template-columns: 1fr; }
  .page-work-queue .work-filter > * { width: 100%; }
  .page-work-queue .work-card-editor { grid-template-columns: 1fr; }
  .page-work-queue .work-editor-notes,
  .page-work-queue .work-card-editor button { grid-column: auto; }
  .page-iran-access .access-record { padding: .8rem; }
  .page-data-centers #datacenters-results,
  .page-data-centers #datacenter-iran-access-results { padding: .75rem; }
  .page-data-centers .iran-access-inventory-row { padding: .8rem !important; }
}

@media (max-width: 420px) {
  .dashboard-customizer-actions { grid-template-columns: 1fr; }
  .page-notifications .channel-options { display: grid; grid-template-columns: 1fr; }
  .page-notifications .channel-options label { width: 100%; }
  .page-work-queue .work-card { padding: .75rem; }
}
.footer-version {
  display: inline !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: inherit !important;
  font-weight: inherit !important;
  opacity: 1 !important;
}

/* فشرده‌سازی حالت‌های خالی داشبورد */
@media (min-width: 701px) {
  .page-dashboard .dashboard-compact-section.is-empty {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding-block: .85rem;
  }
  .page-dashboard .dashboard-compact-section.is-empty .card-head {
    margin: 0;
  }
  .page-dashboard .dashboard-compact-section.is-empty .empty {
    padding: .2rem 0;
    text-align: end;
    white-space: nowrap;
  }
}

/* تضمین ابعاد و فاصله درست همه پنل‌های اصلی */
.card,
.dashboard-widgets > [data-dashboard-widget],
.notification-item,
.work-card,
.access-record,
.iran-access-inventory-row {
  box-sizing: border-box;
}
.card > .card-head + :not(.table-wrap) { min-width: 0; }

/* ===== v1.2.0 operations suite ===== */
.header-search-button{display:inline-flex;align-items:center;gap:.45rem;min-height:38px;padding:.45rem .7rem;border:1px solid var(--border,#d7dee8);border-radius:10px;background:var(--surface,#fff);color:var(--text,#172033);cursor:pointer;font:inherit}.header-search-button .ui-icon{width:18px;height:18px}.header-search-button kbd{font-size:.68rem;padding:.12rem .35rem;border:1px solid var(--border,#d7dee8);border-radius:5px;background:var(--surface-soft,#f4f7fb);color:var(--muted,#64748b)}
.command-palette[hidden]{display:none!important}.command-palette{position:fixed;inset:0;z-index:3000;display:grid;place-items:start center;padding:8vh 1rem 1rem}.command-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.52);backdrop-filter:blur(3px)}.command-dialog{position:relative;width:min(720px,100%);max-height:78vh;overflow:auto;background:var(--surface,#fff);border:1px solid var(--border,#d7dee8);border-radius:18px;box-shadow:0 24px 70px rgba(15,23,42,.28);padding:1rem}.command-search{display:grid;grid-template-columns:auto 1fr auto;gap:.6rem;align-items:center}.command-search input{margin:0}.command-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}.command-actions a{display:inline-flex;align-items:center;gap:.35rem;padding:.5rem .7rem;border:1px solid var(--border,#d7dee8);border-radius:9px}.command-results{display:grid;gap:.6rem}.command-group{border-top:1px solid var(--border,#d7dee8);padding-top:.7rem}.command-group h3{margin:0 0 .45rem;font-size:.9rem}.command-result{display:flex;justify-content:space-between;gap:1rem;padding:.55rem .65rem;border-radius:8px}.command-result:hover{background:var(--surface-soft,#f4f7fb)}
.section-tabs.operations-tabs{display:flex;gap:.45rem;flex-wrap:wrap;margin-bottom:1rem;position:sticky;top:72px;z-index:20;background:color-mix(in srgb,var(--page-bg,#f4f6f9) 90%,transparent);padding:.55rem;border-radius:12px;backdrop-filter:blur(8px)}.section-tabs.operations-tabs a{padding:.45rem .7rem;border-radius:8px;border:1px solid var(--border,#d7dee8);background:var(--surface,#fff)}
.module-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:1rem}.module-card{display:flex;flex-direction:column;justify-content:space-between;min-height:200px}.compact-metrics{margin-bottom:1rem}.three-column-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.sub-card{border:1px solid var(--border,#d7dee8);background:var(--surface-soft,#f8fafc);border-radius:12px;padding:1rem;align-content:start}.sub-card h3{margin:0 0 .25rem}.tag-cloud{display:flex;gap:.5rem;flex-wrap:wrap;padding:.75rem 0}.entity-tag{--tag-color:#475569;display:inline-flex;padding:.28rem .58rem;border-radius:999px;border:1px solid color-mix(in srgb,var(--tag-color) 55%,white);background:color-mix(in srgb,var(--tag-color) 14%,white);color:color-mix(in srgb,var(--tag-color) 80%,black);font-size:.78rem}.compact-timeline{max-height:420px;overflow:auto;padding-inline:2px}.compact-timeline article{padding:.75rem;border:1px solid var(--border,#d7dee8);border-radius:10px;margin-bottom:.65rem}.compact-timeline article small{display:block;color:var(--muted,#64748b);margin-top:.2rem}.plain-list{display:grid;gap:.55rem;padding:0;list-style:none}.plain-list li{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:.65rem .75rem;border:1px solid var(--border,#d7dee8);border-radius:9px}.card[id]{scroll-margin-top:140px}
.autosave-state{font-size:.75rem;color:var(--muted,#64748b);margin-inline-start:auto}.version-history{display:grid;gap:.55rem}.version-history article{padding:.7rem;border:1px solid var(--border,#d7dee8);border-radius:9px}.diff-list{display:grid;gap:.35rem}.diff-row{display:grid;grid-template-columns:minmax(110px,.6fr) 1fr auto 1fr;gap:.4rem;align-items:center;padding:.4rem;border-radius:7px;background:var(--surface-soft,#f8fafc)}
@media(max-width:980px){.three-column-grid{grid-template-columns:1fr}.section-tabs.operations-tabs{position:static}.header-search-button span,.header-search-button kbd{display:none}.diff-row{grid-template-columns:1fr}.diff-row .arrow{display:none}}
@media(max-width:640px){.command-palette{padding:3vh .6rem}.command-dialog{border-radius:14px;padding:.75rem}.module-grid{grid-template-columns:1fr}.section-tabs.operations-tabs{display:grid;grid-template-columns:repeat(2,1fr)}.section-tabs.operations-tabs a{text-align:center}.plain-list li{align-items:flex-start;flex-direction:column}.sub-card{padding:.8rem}}

/* Operations Suite 1.2.0 */
.customer-ops-grid,
.service-internal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1rem;
  align-items: start;
}
.service-internal-grid > .card,
.customer-ops-grid > .card { min-width: 0; margin: 0; }
.tag-picker { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.tag-option {
  display: inline-flex; align-items: center; gap: .4rem;
  border: 1px solid color-mix(in srgb, var(--tag-color, #475569) 42%, var(--line));
  border-radius: 999px; padding: .4rem .7rem; background: var(--surface);
  color: var(--text); width: auto; min-height: 2.1rem;
}
.tag-option input { width: 1rem !important; height: 1rem !important; margin: 0 !important; flex: 0 0 auto; }
.entity-version-card { margin-block: 1rem; }
.restore-form { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.compact-confirm { width: 7.4rem !important; min-width: 0 !important; }
.switch-row.compact { width: auto; min-height: 2rem; padding: .2rem .45rem; margin: 0; }
.command-results .search-group { padding: .65rem; border: 1px solid var(--line); border-radius: .8rem; }
.command-results .search-group + .search-group { margin-top: .55rem; }
.operations-tabs { position: sticky; top: .5rem; z-index: 20; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); }
.service-diff-panel { margin-top: .8rem; }
.service-diff-row { display: grid; grid-template-columns: minmax(7rem, .7fr) 1fr auto 1fr; gap: .5rem; align-items: center; padding: .5rem .65rem; border-bottom: 1px solid var(--line); }
@media (max-width: 820px) {
  .customer-ops-grid, .service-internal-grid { grid-template-columns: 1fr; }
  .restore-form { align-items: stretch; }
  .restore-form > * { flex: 1 1 100%; width: 100% !important; }
  .service-diff-row { grid-template-columns: 1fr; }
}
.rollback-list { display: grid; gap: .65rem; margin-top: .75rem; }
.rollback-list .sub-card { display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: .7rem; align-items: center; }
.rollback-list small { color: var(--muted); }
@media (max-width: 700px) { .rollback-list .sub-card { grid-template-columns: 1fr; } }

/* ===== v1.3.0 governance, notifications and stable UI ===== */
.header-notification-wrap{position:relative}.notification-popover[hidden]{display:none!important}.notification-popover{position:absolute;top:calc(100% + .55rem);left:0;width:min(390px,calc(100vw - 1.25rem));z-index:2500;background:var(--surface,#fff);border:1px solid var(--line,#d8dee8);border-radius:14px;box-shadow:0 20px 55px rgba(15,23,42,.22);overflow:hidden}.notification-popover-head{display:flex;justify-content:space-between;gap:1rem;padding:.8rem 1rem;border-bottom:1px solid var(--line,#d8dee8)}.notification-popover-list{display:grid;max-height:360px;overflow:auto}.notification-popover-item{display:grid;gap:.18rem;padding:.75rem 1rem;border-bottom:1px solid var(--line,#e5e7eb);border-inline-start:4px solid #64748b}.notification-popover-item.severity-danger{border-inline-start-color:#dc2626}.notification-popover-item.severity-warning{border-inline-start-color:#d97706}.notification-popover-item.severity-success{border-inline-start-color:#16a34a}.notification-popover-item span{font-size:.8rem;color:var(--muted,#64748b);white-space:normal}.notification-popover-item small{font-size:.68rem;color:var(--muted,#64748b)}.notification-popover-all{display:block;text-align:center;padding:.72rem;background:var(--surface-soft,#f8fafc);font-weight:700}.readonly-banner{position:sticky;top:0;z-index:1100;display:flex;gap:.65rem;align-items:center;flex-wrap:wrap;padding:.65rem 1rem;margin-bottom:1rem;border:1px solid #f59e0b;border-radius:12px;background:#fffbeb;color:#92400e}.report-page-issue{position:fixed;inset-inline-end:1rem;bottom:1rem;z-index:1600;display:flex;align-items:center;gap:.4rem}.issue-report-modal[hidden]{display:none!important}.issue-report-modal{position:fixed;inset:0;z-index:3100;display:grid;place-items:center;padding:1rem}.issue-report-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.55)}.issue-report-dialog{position:relative;width:min(620px,100%);max-height:90vh;overflow:auto;background:var(--surface,#fff);border-radius:16px;padding:1rem}.wizard-progress{display:grid;grid-template-columns:repeat(6,1fr);gap:.35rem;margin:1rem 0}.wizard-step{padding:.6rem .35rem;text-align:center;border-radius:9px;background:var(--surface-soft,#f1f5f9);font-size:.76rem}.wizard-step.active{background:var(--accent,#2563eb);color:#fff}.governance-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.note-thread{display:grid;gap:.65rem;margin-top:1rem}.internal-note{padding:.75rem;border:1px solid var(--line,#d8dee8);border-radius:10px}.internal-note header{display:flex;justify-content:space-between;gap:1rem}.quality-list,.reconciliation-list{display:grid;gap:.7rem}.quality-item,.reconciliation-item{padding:.85rem;border:1px solid var(--line,#d8dee8);border-radius:11px}.layout-stable{--radius:8px}.layout-stable .card,.layout-stable .summary-card,.layout-stable input,.layout-stable select,.layout-stable textarea,.layout-stable button,.layout-stable .button{border-radius:6px!important;box-shadow:none!important;backdrop-filter:none!important}.layout-stable .workspace,.layout-stable .sidebar,.layout-stable .workspace-header{background-image:none!important}.density-compact{font-size:13px}.density-compact .card{padding:.72rem}.density-compact input,.density-compact select,.density-compact textarea{padding:.45rem .55rem;min-height:34px}.density-compact td,.density-compact th{padding:.42rem .5rem}.density-comfortable{font-size:16px}.density-comfortable .card{padding:1.35rem}.density-comfortable input,.density-comfortable select,.density-comfortable textarea{padding:.78rem .85rem;min-height:46px}.density-comfortable td,.density-comfortable th{padding:.9rem .85rem}.interface-smoke-warning{position:fixed;inset-inline:1rem;top:1rem;z-index:4000;padding:1rem;border-radius:12px;background:#fee2e2;color:#991b1b;border:1px solid #ef4444;box-shadow:0 16px 40px #0002}.data-quality-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:.7rem}.dependency-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:.7rem}
@media(max-width:760px){.notification-popover{position:fixed;top:66px;left:.6rem;right:.6rem;width:auto}.governance-actions{grid-template-columns:1fr}.wizard-progress{grid-template-columns:repeat(3,1fr)}.report-page-issue span{display:none}}

/* ===== v1.3.1 corrective UI, diagnostics and responsive pass ===== */
.theme-swatch-lime .theme-dots i:nth-child(1){background:#596b28}
.theme-swatch-lime .theme-dots i:nth-child(2){background:#8ca447}
.theme-swatch-lime .theme-dots i:nth-child(3){background:#eef2df}
.theme-swatch-copper .theme-dots i:nth-child(1){background:#86502e}
.theme-swatch-copper .theme-dots i:nth-child(2){background:#c17b4b}
.theme-swatch-copper .theme-dots i:nth-child(3){background:#f4e9e1}

.report-page-issue{bottom:4.9rem!important;inset-inline-end:1.1rem!important;text-decoration:none;box-shadow:0 12px 28px rgba(15,23,42,.18);max-width:calc(100vw - 2rem)}
.report-page-issue .ui-icon{flex:0 0 auto}
.quality-actions{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap;min-width:max-content}

/* Wizard: remove browser list numbering, keep the current step readable and scrollable. */
.wizard-progress-wrap{overflow-x:auto;overscroll-behavior-inline:contain;padding:.2rem 0 .55rem;scrollbar-width:thin}
.wizard-progress{position:relative;display:grid!important;grid-template-columns:repeat(6,minmax(138px,1fr))!important;gap:.55rem!important;list-style:none!important;padding:0!important;margin:.8rem 0!important;counter-reset:none}
.wizard-progress::before{content:"";position:absolute;z-index:0;top:1.15rem;inset-inline:4%;height:3px;background:linear-gradient(to left,var(--accent,#2563eb) var(--wizard-progress),var(--border,#d8dee8) var(--wizard-progress));border-radius:999px}
.wizard-progress li{position:relative;z-index:1;display:grid;grid-template-columns:2.3rem minmax(0,1fr);align-items:center;gap:.45rem;min-height:3.2rem;padding:.45rem .55rem;border:1px solid var(--border,#d8dee8);border-radius:11px;background:var(--surface,#fff);list-style:none!important;font-size:.78rem;white-space:normal}
.wizard-progress li::marker{content:""}
.wizard-progress li b{display:grid;place-items:center;width:2.1rem;height:2.1rem;border-radius:50%;background:var(--surface-soft,#eef2f7);border:2px solid var(--border,#d8dee8);font-size:.82rem}
.wizard-progress li span{font-weight:700;line-height:1.45}
.wizard-progress li.done{border-color:color-mix(in srgb,var(--accent,#2563eb) 45%,var(--border));background:color-mix(in srgb,var(--accent-soft,#eff6ff) 75%,white)}
.wizard-progress li.done b{background:var(--accent,#2563eb);border-color:var(--accent,#2563eb);color:#fff}
.wizard-progress li.active{border-color:var(--accent,#2563eb);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent,#2563eb) 15%,transparent);background:var(--surface,#fff)}
.wizard-progress li.active b{background:var(--accent,#2563eb);border-color:var(--accent,#2563eb);color:#fff}
.wizard-card{min-width:0;overflow:hidden}
.wizard-card select,.wizard-card input,.wizard-card textarea{max-width:100%}
.wizard-selected-service,.wizard-final-summary{padding:.75rem;border:1px solid var(--border);border-radius:10px;background:var(--surface-muted);overflow-wrap:anywhere}
.wizard-final-summary{display:grid;gap:.5rem}.wizard-final-summary p{display:grid;grid-template-columns:minmax(6rem,.35fr) 1fr;gap:.7rem;margin:0}.wizard-final-summary span{color:var(--muted)}
.wizard-save-state{min-height:1.3rem;color:var(--muted);font-size:.76rem}
.wizard-actions,.wizard-complete-form{display:flex;gap:.65rem;flex-wrap:wrap;justify-content:flex-end}

/* Compact Iran-access/datacenter inventory cards. */
.iran-access-inventory-row,.page-data-centers .iran-access-inventory-row{grid-template-columns:minmax(150px,1.35fr) repeat(4,minmax(105px,.8fr)) minmax(145px,auto)!important;gap:.45rem!important;padding:.58rem!important;border-radius:10px!important;align-items:stretch}
.iran-access-inventory-row>div{align-content:center}
.iran-access-inventory-row>div:not(.iran-access-main):not(.iran-access-row-actions),.page-data-centers .iran-access-inventory-row>div:not(.iran-access-main):not(.iran-access-row-actions){padding:.38rem .48rem!important;border-radius:7px!important;min-height:48px}
.iran-access-inventory-row span{font-size:.68rem}.iran-access-inventory-row b{font-size:.78rem;line-height:1.35}.iran-access-inventory-row small{font-size:.66rem;line-height:1.35}
.iran-access-main{padding:.25rem!important}.iran-access-main code{font-size:.78rem}.iran-access-row-actions{gap:.3rem!important;padding:.15rem!important}.iran-access-row-actions .button{padding:.34rem .48rem;font-size:.69rem}

/* Sessions are active-only and deliberately compact. */
.session-list{gap:.5rem!important}
.session-row{padding:.62rem .72rem!important;border-radius:10px!important;min-height:0!important;align-items:center!important}
.session-row>div{display:grid;gap:.12rem;min-width:0}.session-row b{font-size:.82rem}.session-row small{font-size:.68rem;overflow-wrap:anywhere}.session-row form{flex:0 0 auto}

/* SSL diagnostics and logs. */
.ssl-diagnostics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:.6rem;margin:1rem 0}
.ssl-diagnostic{display:flex;gap:.55rem;align-items:flex-start;padding:.65rem;border:1px solid var(--border);border-radius:10px;background:var(--surface-muted);min-width:0}
.ssl-diagnostic>span{display:grid;place-items:center;flex:0 0 1.6rem;width:1.6rem;height:1.6rem;border-radius:50%;font-weight:900}.ssl-diagnostic.is-ok>span{background:#dcfce7;color:#166534}.ssl-diagnostic.is-error>span{background:#fee2e2;color:#991b1b}.ssl-diagnostic div{display:grid;gap:.12rem;min-width:0}.ssl-diagnostic small{overflow-wrap:anywhere}
.ssl-log-head{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:1.2rem;padding-top:1rem;border-top:1px solid var(--border)}
.ssl-job-log,.ssl-job-history{margin-top:.7rem;border:1px solid var(--border);border-radius:11px;background:var(--surface-muted);overflow:hidden}.ssl-job-log>summary,.ssl-job-history>summary{cursor:pointer;padding:.75rem .85rem;background:var(--surface);display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.ssl-job-log>summary small{margin-inline-start:auto;color:var(--muted)}
.ssl-log-entries{display:grid;gap:.55rem;padding:.7rem}.ssl-log-entry{padding:.65rem;border-inline-start:4px solid #64748b;border-radius:8px;background:var(--surface);min-width:0}.ssl-log-entry.level-error{border-inline-start-color:#dc2626}.ssl-log-entry.level-warning{border-inline-start-color:#d97706}.ssl-log-entry.level-success{border-inline-start-color:#16a34a}.ssl-log-entry header{display:flex;justify-content:space-between;gap:.7rem;font-size:.72rem}.ssl-log-entry p{margin:.35rem 0;overflow-wrap:anywhere}.ssl-log-entry pre{max-height:280px;overflow:auto;white-space:pre-wrap;word-break:break-word;font-size:.7rem}
.ltr-wrap{direction:ltr;text-align:left;overflow-wrap:anywhere;word-break:break-word}

/* Standalone issue reporting. */
.issue-report-page{max-width:920px;margin-inline:auto}.issue-environment-preview pre{max-height:300px;overflow:auto;white-space:pre-wrap;word-break:break-word}.issue-error-code{display:block;max-width:30rem;white-space:normal;overflow-wrap:anywhere;margin-bottom:.2rem}.notification-page-tabs{align-items:center}.notification-page-tabs form{margin:0}

/* Broad responsive safeguards. */
img,svg,video,canvas{max-width:100%}
.card,.subcard,.sub-card,.stat,.summary-card,.form-grid>*,.content-grid>*,.two-col>*{min-width:0}
input,select,textarea,button,.button{max-width:100%}
pre,code{max-width:100%}
.table-wrap{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}
.page-head,.card-head,.head-actions,.form-actions,.row-actions{min-width:0}

@media(max-width:1100px){
  .iran-access-inventory-row,.page-data-centers .iran-access-inventory-row{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .iran-access-main,.iran-access-row-actions{grid-column:1/-1}
}
@media(max-width:760px){
  .report-page-issue{bottom:4.25rem!important;inset-inline-end:.7rem!important;width:42px;height:42px;padding:0!important;justify-content:center;border-radius:13px!important}.report-page-issue span{display:none!important}
  .scroll-to-top{bottom:.7rem!important;inset-inline-end:.7rem!important}
  .wizard-progress{grid-template-columns:repeat(6,minmax(128px,150px))!important;width:max-content;min-width:100%}
  .wizard-progress::before{display:none}.wizard-progress li{grid-template-columns:1.9rem minmax(0,1fr);min-height:2.8rem;padding:.4rem}.wizard-progress li b{width:1.75rem;height:1.75rem}
  .wizard-actions,.wizard-complete-form{display:grid;grid-template-columns:1fr}.wizard-actions .button,.wizard-complete-form .button{width:100%}
  .wizard-final-summary p{grid-template-columns:1fr;gap:.15rem}
  .quality-actions{min-width:0;display:grid;grid-template-columns:1fr}.quality-actions .button{width:100%;text-align:center}
  .ssl-log-head{display:grid}.ssl-log-head .button{width:100%;text-align:center}.ssl-job-log>summary small{margin-inline-start:0;width:100%}
  .session-row{align-items:stretch!important;flex-direction:column!important}.session-row form,.session-row button{width:100%}
  .notification-page-tabs{display:grid!important;grid-template-columns:1fr 1fr;width:100%}.notification-page-tabs form{grid-column:1/-1}.notification-page-tabs .button,.notification-page-tabs button{width:100%;text-align:center}
  .iran-access-inventory-row,.page-data-centers .iran-access-inventory-row{grid-template-columns:1fr!important}.iran-access-main,.iran-access-row-actions{grid-column:auto}
  .workspace-header{min-width:0}.workspace-brand small,.live-clock,[data-command-open] span,[data-command-open] kbd{display:none!important}
  .header-notification-wrap{margin-inline-start:auto}.notification-popover{max-height:calc(100dvh - 80px)}
  .form-actions,.head-actions,.row-actions{align-items:stretch}.form-actions>.button,.form-actions>button{flex:1 1 100%;text-align:center}
}
@media(max-width:480px){
  .workspace>main.container,.container{width:calc(100% - .5rem)!important}.card{padding:.7rem!important;border-radius:11px!important}.page-head h1{font-size:1.15rem}.page-head p{font-size:.78rem}
  .notification-popover{inset-inline:.3rem!important;top:58px!important;width:auto!important}.notification-popover-item{padding:.65rem}.notification-popover-head{padding:.65rem}
  .theme-choice-grid{grid-template-columns:1fr!important}.layout-choice-grid{grid-template-columns:1fr!important}
  .ssl-diagnostics-grid{grid-template-columns:1fr}.health-grid,.stats-grid{grid-template-columns:1fr!important}
  table{font-size:.72rem}th,td{padding:.45rem!important}
}

/* v1.3.3 — compact cards, stable SSL output and progressive Ajax navigation. */
.pjax-progress{position:fixed;inset-inline:0;top:0;height:3px;z-index:5000;pointer-events:none;opacity:0;transition:opacity .18s}.pjax-progress span{display:block;width:35%;height:100%;background:var(--accent,#0b88aa);transform:translateX(210%)}.pjax-progress.is-active{opacity:1}.pjax-progress.is-active span{animation:nscra-pjax-progress 1s ease-in-out infinite}@keyframes nscra-pjax-progress{0%{transform:translateX(260%)}100%{transform:translateX(-320%)}}
[data-pjax-root].is-loading{opacity:.58;pointer-events:none;transition:opacity .15s}

/* پرونده و خروجی امن: فرم‌های کوتاه و بدون ارتفاع اضافه. */
.customer-governance-card{padding:.85rem!important}
.customer-governance-card .card-head{margin-bottom:.55rem}
.customer-governance-card .governance-actions{grid-template-columns:repeat(auto-fit,minmax(245px,1fr))!important;gap:.6rem!important}
.customer-governance-card .governance-actions>.stack-form{display:grid!important;grid-template-columns:1fr!important;align-content:start;gap:.42rem!important;padding:.62rem!important;border:1px solid var(--border,var(--line));border-radius:10px;background:var(--surface-muted,#f8fafc);min-height:0!important}
.customer-governance-card label{gap:.25rem!important;font-size:.76rem}.customer-governance-card input,.customer-governance-card select{min-height:36px!important;padding:.42rem .55rem!important}.customer-governance-card button{min-height:36px!important;padding:.45rem .65rem!important}

/* کارت سرویس: اطلاعات مهم در یک ردیف فشرده و عملیات مرتب. */
.customer-services-section .compact-service-card{padding:.68rem .75rem!important;margin:.55rem 0!important;border-radius:12px!important}
.customer-services-section .service-card-top{align-items:center!important}.customer-services-section .service-type-mark{width:2.2rem;height:2.2rem;font-size:.9rem}
.customer-services-section .service-facts{grid-template-columns:repeat(auto-fit,minmax(125px,1fr))!important;gap:.38rem!important;margin-top:.55rem!important}
.customer-services-section .service-facts>div{padding:.38rem .45rem!important;min-height:56px!important;align-content:center!important}
.customer-services-section .service-facts span{font-size:.64rem!important}.customer-services-section .service-facts b{font-size:.78rem!important;line-height:1.35}.customer-services-section .service-facts small{font-size:.62rem!important}
.customer-services-section .service-card-actions{display:flex!important;gap:.38rem!important;margin-top:.55rem!important;align-items:center!important}
.customer-services-section .service-card-actions>.button{min-height:34px!important;padding:.38rem .55rem!important;font-size:.7rem!important;flex:0 1 auto}
.customer-services-section .service-card-actions .inline-form{display:flex!important;align-items:center!important;gap:.3rem!important;flex:1 1 250px;max-width:360px;margin:0!important}
.customer-services-section .service-card-actions .inline-form input{min-width:120px;min-height:34px!important;padding:.35rem .48rem!important;font-size:.7rem;flex:1 1 auto}
.customer-services-section .service-card-actions .inline-form button{flex:0 0 auto;min-height:34px!important}
.customer-services-section .service-more{flex:1 0 100%;margin-top:.15rem}.customer-services-section .service-more>summary{padding:.55rem .65rem!important}

/* سلامت سامانه و SSL: باکس‌های کم‌ارتفاع و لاگ خوانا. */
.page-system-health .health-grid{gap:.55rem!important}.page-system-health .health-gauge{padding:.62rem .72rem!important;border-radius:11px!important;gap:.65rem!important;min-height:72px!important}.page-system-health .gauge-ring{width:52px!important;height:52px!important}.page-system-health .health-number{font-size:1.35rem!important}
.page-system-health .health-checks{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))!important;gap:.5rem!important}.page-system-health .health-checks .stat{padding:.58rem .65rem!important;min-height:74px!important;border-radius:10px!important}.page-system-health .health-checks .stat strong{font-size:1rem!important}.page-system-health .health-checks .stat small{font-size:.68rem;overflow-wrap:anywhere}
.page-system-health .host-ssl-summary{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;gap:.55rem!important}.page-system-health .host-ssl-summary>div{padding:.58rem .65rem!important;min-height:70px!important;align-content:start}.page-system-health .host-ssl-summary b{font-size:.82rem;line-height:1.55;overflow-wrap:anywhere}
.page-system-health .ssl-diagnostics-grid{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important;gap:.45rem!important}.page-system-health .ssl-diagnostic{padding:.5rem!important;min-height:64px!important}.page-system-health .ssl-diagnostic small{font-size:.66rem;line-height:1.45}
.ssl-job-log>summary{align-items:center}.ssl-retry-form{margin-inline-start:auto}.ssl-retry-form button{min-height:30px;padding:.3rem .55rem}.ssl-log-entry pre{direction:ltr;text-align:left;unicode-bidi:plaintext;line-height:1.55}

/* گزارش رابط فقط از صفحه اختصاصی/مرکز خطا قابل دسترسی است. */
.report-page-issue,.issue-report-modal{display:none!important}

@media(max-width:900px){
  .customer-services-section .service-card-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important}.customer-services-section .service-card-actions>.button,.customer-services-section .service-card-actions .inline-form{width:100%;max-width:none}.customer-services-section .service-card-actions .inline-form,.customer-services-section .service-more{grid-column:1/-1}
}
@media(max-width:600px){
  .customer-governance-card .governance-actions{grid-template-columns:1fr!important}.customer-services-section .service-facts{grid-template-columns:repeat(2,minmax(0,1fr))!important}.customer-services-section .service-card-actions{grid-template-columns:1fr!important}.customer-services-section .service-card-actions .inline-form,.customer-services-section .service-more{grid-column:auto}.customer-services-section .service-card-actions .inline-form{display:grid!important;grid-template-columns:1fr!important}.customer-services-section .service-card-actions .inline-form button{width:100%}.page-system-health .health-checks,.page-system-health .ssl-diagnostics-grid,.page-system-health .host-ssl-summary{grid-template-columns:1fr!important}.ssl-retry-form{width:100%;margin:0}.ssl-retry-form button{width:100%}
}

/* v1.3.4 — reliable SSL repair and a compact, aligned operations interface. */

/* System health: small gauges, equal cards and no oversized numeric tile. */
.page-system-health .health-grid{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:.45rem!important;
  margin-bottom:.65rem!important;
}
.page-system-health .health-gauge{
  min-height:0!important;
  padding:.5rem .58rem!important;
  gap:.5rem!important;
  border-radius:10px!important;
  box-shadow:0 2px 8px rgba(15,23,42,.035)!important;
}
.page-system-health .health-gauge>div:last-child{gap:.08rem!important}
.page-system-health .health-gauge b{font-size:.86rem;line-height:1.35}
.page-system-health .health-gauge small{font-size:.65rem;line-height:1.35}
.page-system-health .gauge-ring,
.page-system-health .health-number{
  width:46px!important;
  height:46px!important;
  flex:0 0 46px!important;
}
.page-system-health .gauge-ring::after{inset:6px!important}
.page-system-health .gauge-ring span{font-size:.72rem!important}
.page-system-health .health-number{border-radius:12px!important;font-size:1.05rem!important}
.page-system-health .content-grid.two-col{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:.5rem!important}
.page-system-health .content-grid.two-col>.card{padding:.65rem!important;min-height:0!important}
.page-system-health .content-grid.two-col h2{font-size:.86rem;margin-bottom:.25rem}
.page-system-health .content-grid.two-col p{margin:.1rem 0;font-size:.82rem}
.page-system-health .content-grid.two-col small{font-size:.66rem}
.page-system-health .host-ssl-form{gap:.65rem!important}
.page-system-health .ssl-job-log>summary,
.page-system-health .ssl-job-history>summary{padding:.58rem .68rem!important;font-size:.76rem}
.page-system-health .ssl-log-entries{padding:.55rem!important;gap:.4rem!important}
.page-system-health .ssl-log-entry{padding:.5rem!important}

/* Operations center: the four summary values must be a compact grid, not four
   full-width cards. Tabs stay on one scrollable line on desktop/tablet. */
.page-operations-center .section-tabs.operations-tabs{
  flex-wrap:nowrap!important;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  scrollbar-width:thin;
  gap:.35rem!important;
  padding:.4rem!important;
  margin-bottom:.6rem!important;
}
.page-operations-center .section-tabs.operations-tabs a{
  flex:0 0 auto;
  white-space:nowrap;
  min-height:34px;
  padding:.35rem .58rem!important;
  font-size:.74rem;
}
.page-operations-center .metric-grid{
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:.5rem!important;
  margin:0 0 .65rem!important;
}
.page-operations-center .metric-card{
  min-height:0!important;
  align-content:center!important;
  gap:.08rem!important;
  padding:.58rem .68rem!important;
  border-radius:10px!important;
  box-shadow:0 2px 8px rgba(15,23,42,.03)!important;
}
.page-operations-center .metric-card span{font-size:.72rem;color:var(--muted)}
.page-operations-center .metric-card b{font-size:1.15rem!important;line-height:1.15}
.page-operations-center>.card,
.page-operations-center>section.card{padding:.85rem!important}
.page-operations-center .sub-card{padding:.72rem!important;border-radius:10px!important}
.page-operations-center .three-column-grid,
.page-operations-center .two-column-grid{gap:.65rem!important}

/* Iran-access inventory: denser records and aligned actions while retaining all
   information. The mobile layout remains single-column and touch friendly. */
.page-iran-access .access-stats{gap:.4rem!important;margin-bottom:.65rem!important}
.page-iran-access .access-stats .summary-card{
  min-height:0!important;
  padding:.52rem .58rem!important;
  gap:.08rem!important;
  border-radius:9px!important;
}
.page-iran-access .access-stats .summary-card span{font-size:.65rem!important}
.page-iran-access .access-stats .summary-card b{font-size:1rem!important}
.page-iran-access .access-records{gap:.45rem!important;margin-top:.55rem!important}
.page-iran-access .access-record{
  padding:.55rem .62rem!important;
  border-radius:10px!important;
  box-shadow:0 2px 8px rgba(15,23,42,.025);
}
.page-iran-access .access-record-head{align-items:center!important;gap:.55rem!important}
.page-iran-access .access-record-head>div{gap:.08rem!important}
.page-iran-access .access-range{font-size:.78rem!important;line-height:1.35}
.page-iran-access .access-record-head small{font-size:.62rem!important;line-height:1.3}
.page-iran-access .access-record-grid{
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:.32rem!important;
  margin-top:.42rem!important;
}
.page-iran-access .access-record-grid>div{
  min-height:44px!important;
  padding:.32rem .38rem!important;
  gap:.06rem!important;
  border-radius:7px!important;
  align-content:center;
}
.page-iran-access .access-record-grid span{font-size:.61rem!important}
.page-iran-access .access-record-grid b{font-size:.72rem!important;line-height:1.3}
.page-iran-access .access-record-grid small{font-size:.59rem!important;line-height:1.25}
.page-iran-access .access-record-actions{
  gap:.3rem!important;
  margin-top:.42rem!important;
}
.page-iran-access .access-record-actions button,
.page-iran-access .access-record-actions .button{
  min-height:32px!important;
  padding:.32rem .48rem!important;
  font-size:.66rem!important;
}
.page-iran-access .ajax-check-host-form{display:flex;align-items:center;gap:.3rem;min-width:0}
.page-iran-access .ajax-check-result{font-size:.62rem}
.page-iran-access .record-notes{margin-top:.4rem!important;padding:.4rem .5rem!important;font-size:.7rem}

@media(max-width:1100px){
  .page-system-health .health-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .page-operations-center .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .page-iran-access .access-record-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:760px){
  .page-system-health .health-grid{grid-template-columns:1fr 1fr!important}
  .page-system-health .content-grid.two-col{grid-template-columns:1fr!important}
  .page-operations-center .section-tabs.operations-tabs{display:flex!important;position:static!important}
  .page-operations-center .metric-grid{grid-template-columns:1fr 1fr!important}
  .page-iran-access .access-record-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .page-iran-access .access-record-actions{display:grid!important;grid-template-columns:1fr 1fr!important}
  .page-iran-access .access-record-actions>*{min-width:0;width:100%}
  .page-iran-access .access-record-actions button,
  .page-iran-access .access-record-actions .button{width:100%;text-align:center}
  .page-iran-access .ajax-check-host-form{display:grid;grid-template-columns:1fr!important}
}
@media(max-width:480px){
  .page-system-health .health-grid,
  .page-operations-center .metric-grid{grid-template-columns:1fr!important}
  .page-system-health .health-gauge{padding:.48rem!important}
  .page-iran-access .access-record-grid{grid-template-columns:1fr!important}
  .page-iran-access .access-record-actions{grid-template-columns:1fr!important}
}


/* v1.3.5 — Nginx 1.24 compatibility, readable health cards and SSL log tools. */
.page-system-health .health-grid{
  gap:.75rem!important;
}
.page-system-health .health-gauge{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 52px!important;
  grid-template-rows:auto!important;
  column-gap:.8rem!important;
  align-items:center!important;
  min-width:0!important;
  padding:.68rem .78rem!important;
}
.page-system-health .health-gauge>.gauge-ring,
.page-system-health .health-gauge>.health-number{
  grid-column:2!important;
  grid-row:1!important;
  margin:0!important;
}
.page-system-health .health-gauge>div:last-child{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0!important;
  padding:0!important;
  align-content:center!important;
}
.page-system-health .health-gauge b{
  display:block;
  font-size:.9rem!important;
  line-height:1.45!important;
}
.page-system-health .health-gauge small{
  display:block;
  font-size:.68rem!important;
  line-height:1.55!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
}
.ssl-log-actions{display:flex;align-items:center;justify-content:flex-end;gap:.45rem;flex-wrap:wrap}
.ssl-log-actions form{margin:0!important}
.ssl-log-actions .button{min-height:34px}

@media(max-width:1650px){
  .page-system-health .health-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
@media(max-width:720px){
  .page-system-health .health-grid{grid-template-columns:1fr!important}
  .page-system-health .health-gauge{grid-template-columns:minmax(0,1fr) 48px!important;padding:.62rem .68rem!important}
  .page-system-health .health-gauge>.gauge-ring,
  .page-system-health .health-gauge>.health-number{width:48px!important;height:48px!important;flex-basis:48px!important}
  .ssl-log-head{display:grid!important;gap:.65rem!important}
  .ssl-log-actions{display:grid;grid-template-columns:1fr;justify-content:stretch}
  .ssl-log-actions .button,.ssl-log-actions form,.ssl-log-actions form button{width:100%}
}


/* v1.3.6 — readable health metrics and a live terminal-style SSL log. */
.page-system-health .health-grid{
  grid-template-columns:repeat(2,minmax(320px,1fr))!important;
  gap:.8rem!important;
}
.page-system-health .health-gauge{
  min-height:88px!important;
  grid-template-columns:minmax(0,1fr) 58px!important;
  column-gap:1rem!important;
  padding:.82rem 1rem!important;
  border-radius:12px!important;
}
.page-system-health .health-gauge>.gauge-ring,
.page-system-health .health-gauge>.health-number{
  width:58px!important;height:58px!important;flex-basis:58px!important;
}
.page-system-health .health-gauge b{font-size:.96rem!important;line-height:1.5!important}
.page-system-health .health-gauge small{font-size:.73rem!important;line-height:1.65!important}

.ssl-terminal{margin-top:.75rem;border:1px solid #172033;border-radius:12px;overflow:hidden;background:#071018;box-shadow:0 12px 28px rgba(2,6,23,.16)}
.ssl-terminal-bar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.75rem;padding:.62rem .8rem;background:#111827;color:#d1d5db;border-bottom:1px solid #263244;direction:ltr}
.ssl-terminal-lights{display:flex;gap:.35rem}.ssl-terminal-lights i{display:block;width:.68rem;height:.68rem;border-radius:50%;background:#ef4444}.ssl-terminal-lights i:nth-child(2){background:#f59e0b}.ssl-terminal-lights i:nth-child(3){background:#22c55e}
.ssl-terminal-title{display:flex;align-items:center;gap:.65rem;min-width:0;font:600 .72rem/1.4 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace}.ssl-terminal-title span{padding:.16rem .42rem;border-radius:999px;background:#1f2937;color:#93c5fd;text-transform:uppercase}
.ssl-terminal-bar time{font:500 .67rem/1.4 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;color:#94a3b8}
.ssl-terminal-status{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:.48rem .8rem;background:#0b1522;color:#cbd5e1;border-bottom:1px solid #1e293b;font:500 .72rem/1.55 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;direction:ltr;text-align:left}
.ssl-terminal-output{display:block;width:100%;height:390px;max-height:58vh;margin:0!important;padding:.85rem 1rem!important;overflow:auto;overscroll-behavior:contain;background:#071018!important;color:#d1fae5!important;border:0!important;border-radius:0!important;white-space:pre-wrap!important;overflow-wrap:anywhere;word-break:break-word;font:500 .74rem/1.65 ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace!important;direction:ltr!important;text-align:left!important;unicode-bidi:plaintext;tab-size:2}
.ssl-terminal-output::selection{background:#0f766e;color:#fff}
@media(min-width:1900px){.page-system-health .health-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important}}
@media(max-width:900px){.page-system-health .health-grid{grid-template-columns:1fr!important}.ssl-terminal-bar{grid-template-columns:auto minmax(0,1fr)}.ssl-terminal-bar time{grid-column:1/-1}.ssl-terminal-status{align-items:stretch;flex-direction:column}.ssl-terminal-output{height:330px}}
