/* ================= کاربران و اتصال — مرکز حساب‌ها و حضور =================
   صفحهٔ بازطراحی‌شده: سربرگ، شاخص‌های زنده، حضور لحظه‌ای، کادر و حساب‌ها،
   اپ خانواده، اتصال از راه دور و گزارش فعالیت.
   همهٔ رنگ‌ها از توکن‌های app.css می‌آیند تا حالت شب بدون بازنویسی درست بماند. */

.ac-page { display: flex; flex-direction: column; gap: 14px; }

/* ---------- سربرگ ---------- */
.ac-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 20px 22px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(560px 220px at 88% -50%, rgba(251, 191, 36, .34), transparent 70%),
    radial-gradient(460px 240px at 8% 140%, rgba(56, 189, 248, .26), transparent 70%),
    var(--grad-brand);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.ac-hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .45;
}
.ac-hero-main { display: flex; align-items: center; gap: 14px; min-width: 0; position: relative; z-index: 1; }
.ac-hero-ic {
  width: 54px; height: 54px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 17px;
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22);
}
.ac-hero-title { margin: 0 0 4px; font-size: var(--fs-xl); font-weight: 800; letter-spacing: -.2px; }
.ac-hero-sub { margin: 0; font-size: var(--fs-sm); color: rgba(255, 255, 255, .86); max-width: 720px; line-height: 1.85; }
.ac-hero-actions { display: flex; gap: 7px; flex-wrap: wrap; position: relative; z-index: 1; }
.ac-hero-actions .btn {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
  backdrop-filter: blur(4px);
}
.ac-hero-actions .btn:hover { background: rgba(255, 255, 255, .20); border-color: rgba(255, 255, 255, .46); }
.ac-hero-actions .btn.accent { background: var(--gold); border-color: var(--gold); color: #17252d; font-weight: 800; }
.ac-hero-actions .btn.accent:hover { background: #fbbf24; }
.ac-hero-live {
  display: inline-flex; align-items: center; gap: 7px;
  position: relative; z-index: 1;
  padding: 5px 11px; border-radius: var(--radius-full);
  background: rgba(0, 0, 0, .18);
  border: 1px solid rgba(255, 255, 255, .2);
  font-size: var(--fs-xs); font-weight: 700; color: #eafff7;
}
.ac-hero-live .online-dot { box-shadow: 0 0 0 3px rgba(255, 255, 255, .18); }

/* ---------- شاخص‌ها ---------- */
.ac-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(164px, 1fr)); gap: 10px; }
.ac-kpi {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 34px 1fr; grid-template-rows: auto auto;
  gap: 0 10px; align-items: center; text-align: right;
  padding: 12px 14px; cursor: pointer;
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); font-family: inherit;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.ac-kpi::before {
  content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px;
  background: var(--line); border-radius: 0 4px 4px 0;
}
.ac-kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--side-2); }
.ac-kpi:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.ac-kpi-ic { grid-row: 1 / 3; display: grid; place-items: center; color: var(--side-2); }
.ac-kpi b { font-size: var(--fs-2xl); line-height: 1.05; font-weight: 800; color: var(--side); font-variant-numeric: tabular-nums; }
.ac-kpi-l { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.ac-kpi.tone-good::before { background: var(--good); }
.ac-kpi.tone-good b { color: var(--good); }
.ac-kpi.tone-warn::before { background: var(--warn); }
.ac-kpi.tone-warn b { color: var(--warn); }
.ac-kpi.tone-bad::before { background: var(--bad); }
.ac-kpi.tone-bad b { color: var(--bad); }
.ac-kpi.tone-info::before { background: var(--info); }
.ac-kpi.tone-info b { color: var(--info); }
.ac-kpi.tone-live::before { background: #16a34a; }
.ac-kpi.tone-live b { color: #16a34a; }
.ac-kpi.is-zero { opacity: .74; }
.ac-kpi.is-zero b { color: var(--muted); }

/* ---------- تب‌ها ---------- */
.ac-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch;
  padding: 4px;
  background: color-mix(in srgb, var(--paper) 65%, transparent);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.ac-tab {
  flex: 1 1 132px; min-width: 122px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 12px; font-size: var(--fs-sm); font-weight: 700;
  border-radius: var(--radius-md); border: 1px solid transparent;
  background: transparent; color: var(--ink); font-family: inherit; cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast);
}
.ac-tab:hover { background: var(--paper); border-color: var(--line); }
.ac-tab.active { background: var(--grad-brand); color: #fff; box-shadow: 0 4px 14px rgba(13, 59, 52, .28); }
.ac-tab-n {
  min-width: 21px; padding: 1px 7px; border-radius: var(--radius-full);
  font-size: var(--fs-2xs); font-weight: 800;
  background: color-mix(in srgb, currentColor 14%, transparent);
}
.ac-tab.active .ac-tab-n { background: rgba(255, 255, 255, .22); }
.ac-tab-n.is-live { background: rgba(22, 163, 74, .16); color: #15803d; }
.ac-tab.active .ac-tab-n.is-live { background: rgba(255, 255, 255, .24); color: #fff; }

/* ---------- پنل و کارت ---------- */
.ac-panel { animation: acPanelIn var(--dur-base) var(--ease-out) both; }
@keyframes acPanelIn { from { opacity: 0; transform: translateY(5px); } }
.ac-card { padding: 18px; border-radius: var(--radius-lg); }
.ac-stack { display: flex; flex-direction: column; gap: 12px; }
.ac-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.ac-card-title { margin: 0; font-size: var(--fs-lg); font-weight: 800; }
.ac-card-sub { margin: 3px 0 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.75; max-width: 760px; }
.ac-card-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ac-count {
  font-size: var(--fs-xs); font-weight: 700; color: var(--muted);
  background: var(--surface-2); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: var(--radius-full);
}
.ac-updated { font-size: var(--fs-2xs); color: var(--muted); font-weight: 600; }

/* ---------- نوار ابزار و جستجو ---------- */
.ac-toolbar {
  display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-end;
}
.ac-toolbar .field { margin: 0; min-width: 0; flex: 1 1 132px; }
.ac-toolbar .ac-search { flex: 2 1 230px; }
.ac-toolbar .field label { font-size: var(--fs-2xs); font-weight: 700; color: var(--muted); }
.ac-toolbar .btn { min-height: 38px; }
.ac-search { position: relative; }
.ac-search input { padding-inline-start: 34px; }
.ac-search-ic {
  position: absolute; inset-inline-start: 10px; bottom: 11px;
  color: var(--muted); pointer-events: none; display: grid; place-items: center;
}
.ac-search-clear {
  position: absolute; inset-inline-end: 6px; bottom: 6px;
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: var(--surface-2); color: var(--muted); cursor: pointer;
  display: none; place-items: center; font-family: inherit;
}
.ac-search.has-value .ac-search-clear { display: grid; }
.ac-search-clear:hover { color: var(--bad); background: color-mix(in srgb, var(--bad) 10%, var(--paper)); }

/* ---------- چیپ‌ها ---------- */
.ac-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 11px; }
.ac-chips-l { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.ac-chip {
  cursor: pointer; font-family: inherit; font-size: var(--fs-xs); font-weight: 700;
  padding: 5px 11px; border-radius: var(--radius-full);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast);
}
.ac-chip:hover { border-color: var(--accent-2); color: var(--accent-2); }
.ac-chip.active { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.ac-chip .ac-chip-n { opacity: .8; font-weight: 600; }

/* ---------- هشدار/سلامت حساب‌ها ---------- */
.ac-alerts { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.ac-alert {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--warn) 34%, var(--line));
  background: color-mix(in srgb, var(--warn) 8%, var(--paper));
  color: var(--warn); font-size: var(--fs-xs); font-weight: 700;
  font-family: inherit; cursor: pointer;
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.ac-alert:hover { transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.ac-alert.is-clear {
  border-color: color-mix(in srgb, var(--good) 30%, var(--line));
  background: color-mix(in srgb, var(--good) 7%, var(--paper));
  color: var(--good); cursor: default;
}
.ac-alert.is-clear:hover { transform: none; box-shadow: none; }

/* ---------- جدول ---------- */
.ac-tablewrap {
  position: relative; margin-top: 12px;
  max-height: 62vh; overflow: auto;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper);
}
.ac-table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.ac-table thead th {
  position: sticky; top: 0; z-index: 2;
  font-size: var(--fs-2xs); font-weight: 700; color: var(--muted);
  text-align: start; white-space: nowrap;
  background: var(--bg); border-bottom: 1px solid var(--line); padding: 9px 10px;
}
[data-theme="dark"] .ac-table thead th { background: var(--surface-2); }
.ac-table tbody td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ac-table tbody tr:last-child td { border-bottom: 0; }
.ac-table tbody tr:hover td { background: var(--surface-2); }
.ac-table td.ac-check, .ac-table th.ac-check { width: 36px; text-align: center; }
.ac-check input { width: 16px; height: 16px; accent-color: var(--accent-2); cursor: pointer; }
.ac-actions { white-space: nowrap; }
.ac-actions .ac-icon-btn { margin-inline-start: 2px; }

.ac-person { display: flex; align-items: center; gap: 10px; min-width: 178px; }
.ac-avatar {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: var(--fs-sm); font-weight: 800; color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16);
  user-select: none;
}
.ac-avatar.lg { width: 44px; height: 44px; font-size: var(--fs-md); }
.ac-person-main { min-width: 0; }
.ac-name { display: block; font-weight: 800; color: var(--ink); line-height: 1.5; }
.ac-sub { display: block; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.6; }
.ac-ltr { direction: ltr; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ac-copy { cursor: copy; }
.ac-copy:hover { color: var(--accent-2); }
.ac-badges { display: flex; gap: 4px; flex-wrap: wrap; }
.ac-table .badge { font-size: var(--fs-2xs); padding: 2px 8px; gap: 3px; }

.ac-icon-btn {
  width: 30px; height: 30px; display: inline-grid; place-items: center;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--muted); cursor: pointer; font-family: inherit;
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.ac-icon-btn:hover { background: var(--surface-2); border-color: var(--line); color: var(--side-2); }
.ac-icon-btn.danger:hover { background: color-mix(in srgb, var(--bad) 10%, var(--paper)); border-color: color-mix(in srgb, var(--bad) 35%, var(--line)); color: var(--bad); }
.ac-icon-btn.good:hover { background: color-mix(in srgb, var(--good) 10%, var(--paper)); border-color: color-mix(in srgb, var(--good) 35%, var(--line)); color: var(--good); }

/* ---------- وضعیت حضور ---------- */
.ac-state { display: inline-flex; align-items: center; gap: 7px; }
.ac-state-txt { display: flex; flex-direction: column; line-height: 1.45; }
.ac-state-txt b { font-size: var(--fs-xs); }
.ac-state-txt small { font-size: var(--fs-3xs); color: var(--muted); }
.online-dot { position: relative; }
.online-dot::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 1px solid currentColor; opacity: .4;
  animation: acPulse 2.2s var(--ease) infinite;
}
@keyframes acPulse { 0% { transform: scale(.8); opacity: .45; } 70% { transform: scale(1.5); opacity: 0; } 100% { opacity: 0; } }

/* ---------- نوار عملیات گروهی ---------- */
.ac-bulkbar {
  position: fixed; inset-inline: 0; bottom: 18px; z-index: 80;
  display: flex; align-items: center; justify-content: center; gap: 7px; flex-wrap: wrap;
  width: max-content; max-width: calc(100vw - 32px); margin-inline: auto;
  padding: 9px 12px;
  background: var(--side); color: #fff;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-lg);
  animation: acBulkIn var(--dur-base) var(--ease-spring) both;
}
@keyframes acBulkIn { from { opacity: 0; transform: translateY(14px) scale(.97); } }
.ac-bulkbar b { font-size: var(--fs-sm); }
.ac-bulkbar .btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .24); color: #fff; }
.ac-bulkbar .btn:hover { background: rgba(255, 255, 255, .22); }
.ac-bulkbar .btn.danger { background: rgba(220, 38, 38, .82); }
.ac-bulkbar .ac-bulk-x { width: 30px; height: 30px; border-radius: 50%; padding: 0; }

/* ---------- بخش تاشو (فرم افزودن) ---------- */
.ac-fold {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--paper); box-shadow: var(--shadow-xs);
  overflow: hidden;
}
.ac-fold > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 13px 16px; font-weight: 800; font-size: var(--fs-sm);
  background: color-mix(in srgb, var(--surface-2) 65%, transparent);
  transition: background var(--dur-fast);
}
.ac-fold > summary::-webkit-details-marker { display: none; }
.ac-fold > summary:hover { background: var(--surface-2); }
.ac-fold > summary::after {
  content: '›'; margin-inline-start: auto; font-size: 18px; color: var(--muted);
  transform: rotate(90deg); transition: transform var(--dur-fast);
}
.ac-fold[open] > summary::after { transform: rotate(-90deg); }
.ac-fold > summary .ac-sum-ic {
  width: 29px; height: 29px; display: grid; place-items: center;
  border-radius: 9px; background: color-mix(in srgb, var(--accent-2) 12%, var(--paper));
  color: var(--accent-2);
}
.ac-fold-body { padding: 16px; border-top: 1px dashed var(--line); }
.ac-fold-body h3 { margin: 0 0 8px; font-size: var(--fs-md); }
.ac-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.ac-form-grid .field { margin: 0; min-width: 0; }
.ac-form-account {
  margin-top: 12px; padding: 13px;
  border: 1px dashed var(--line); border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-2) 45%, transparent);
}
.ac-form-account h4 { margin: 0 0 4px; font-size: var(--fs-sm); font-weight: 800; }
.ac-form-account .ac-hint { margin: 0 0 8px; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.75; }
.ac-inline-pass { display: flex; gap: 6px; align-items: stretch; }
.ac-inline-pass input { flex: 1; min-width: 0; }
.ac-inline-pass .btn { flex: 0 0 auto; }
.ac-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 13px; }

/* ---------- اتصال از راه دور ---------- */
.ac-remote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; align-items: start; }
.ac-remote-card {
  position: relative; overflow: hidden;
  padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--paper); box-shadow: var(--shadow-xs);
}
.ac-remote-card::before {
  content: ''; position: absolute; inset-inline: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent-2), var(--gold));
}
.ac-remote-status {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--line); background: var(--surface-2);
}
.ac-remote-status .ac-remote-ic {
  width: 36px; height: 36px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--good) 14%, var(--paper)); color: var(--good);
}
.ac-remote-status.is-warn .ac-remote-ic { background: color-mix(in srgb, var(--warn) 14%, var(--paper)); color: var(--warn); }
.ac-remote-status.is-bad .ac-remote-ic { background: color-mix(in srgb, var(--bad) 12%, var(--paper)); color: var(--bad); }
.ac-remote-status b { display: block; font-size: var(--fs-sm); }
.ac-remote-status p { margin: 3px 0 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.75; }
.ac-linkrow {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 8px 10px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper);
}
.ac-linkrow .ac-link-label {
  min-width: 92px; display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); font-weight: 800; color: var(--muted);
}
.ac-linkrow code {
  flex: 1; min-width: 160px; direction: ltr; text-align: left;
  font-size: var(--fs-2xs); word-break: break-all;
  background: var(--surface-2); border-radius: 6px; padding: 5px 7px;
}
.ac-check-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ac-check-list li { display: flex; gap: 9px; align-items: flex-start; font-size: var(--fs-xs); line-height: 1.75; }
.ac-check-list .ac-ck {
  width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 50%; font-size: var(--fs-3xs); font-weight: 800;
  background: color-mix(in srgb, var(--good) 12%, var(--paper)); color: var(--good);
}
.ac-qrbox {
  display: grid; place-items: center; padding: 12px;
  background: #fff; border-radius: var(--radius-md); border: 1px solid var(--line);
  width: max-content; max-width: 100%; margin: 12px auto;
}
.ac-qrbox svg { display: block; width: 240px; height: 240px; max-width: 100%; height: auto; }

/* ---------- گزارش فعالیت ---------- */
.ac-act-desc { max-width: 520px; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.7; word-break: break-word; text-align: start; }
.ac-act-entity { direction: ltr; text-align: right; font-size: var(--fs-2xs); color: var(--side-2); width: 1%; white-space: nowrap; }
.ac-mini-empty { padding: 18px 10px; text-align: center; color: var(--muted); font-size: var(--fs-sm); }
.ac-note {
  margin: 0 0 12px; padding: 9px 12px; border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--info) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--info) 26%, transparent);
  color: var(--info); font-size: var(--fs-xs); font-weight: 600; line-height: 1.8;
}

/* ---------- حالت شب ---------- */
[data-theme="dark"] .ac-kpi b { color: var(--ink); }
[data-theme="dark"] .ac-kpi-ic { color: #34d399; }
[data-theme="dark"] .ac-kpi.tone-good b { color: #34d399; }
[data-theme="dark"] .ac-kpi.tone-warn b { color: #fbbf24; }
[data-theme="dark"] .ac-kpi.tone-bad b { color: #f87171; }
[data-theme="dark"] .ac-kpi.tone-info b { color: #93c5fd; }
[data-theme="dark"] .ac-kpi.tone-live b { color: #4ade80; }
[data-theme="dark"] .ac-chip { background: var(--paper); }
[data-theme="dark"] .ac-tab { color: var(--ink); }
[data-theme="dark"] .ac-tab-n.is-live { color: #4ade80; background: rgba(74, 222, 128, .14); }

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 1180px) {
  .ac-toolbar .ac-search { flex-basis: 100%; }
}
@media (max-width: 760px) {
  .ac-toolbar .field { flex-basis: 46%; }
  .ac-toolbar .ac-search { flex-basis: 100%; }
}
@media (max-width: 640px) {
  .ac-hero { padding: 16px; }
  .ac-hero-actions { width: 100%; }
  .ac-hero-actions .btn { flex: 1 1 auto; }
  .ac-toolbar .field { flex-basis: 100%; }
  .ac-tab { flex: 1 1 100%; }
  .ac-kpis { grid-template-columns: 1fr 1fr; }
  .ac-bulkbar { border-radius: var(--radius-lg); }
  .ac-remote-grid { grid-template-columns: 1fr; }
  .ac-kidlist { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ac-panel, .ac-bulkbar { animation: none; }
  .ac-kpi, .ac-alert, .online-dot::after { transition: none; animation: none; }
}

/* ---------- اجزای فرم، انتخاب فرزند و ورود گروهی ---------- */
.ac-mt { margin-top: 12px; }
.ac-mt-4 { margin-top: 4px; }
.ac-center { text-align: center; }
.ac-muted { color: var(--muted); font-size: var(--fs-sm); line-height: 1.8; }
.ac-mini-strong { display: block; font-weight: 700; font-size: var(--fs-sm); color: var(--ink); line-height: 1.5; }
.ac-phone { color: var(--side-2); text-decoration: none; font-weight: 600; }
.ac-phone:hover { text-decoration: underline; }
.ac-hint { margin: 4px 0 0; font-size: var(--fs-2xs); color: var(--muted); line-height: 1.8; }
.ac-alert b { font-weight: 800; }
.ac-kpi { appearance: none; -webkit-appearance: none; }

.ac-fieldset {
  margin-top: 12px; padding: 12px;
  border: 1px dashed var(--line); border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-2) 55%, transparent);
}
.ac-fieldset-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px; font-size: var(--fs-sm);
}
.ac-kidpick { display: flex; flex-direction: column; gap: 8px; }
.ac-kidpick > input[type="search"] {
  width: 100%; min-height: 38px; padding: 8px 10px;
  font-family: inherit; font-size: var(--fs-sm); color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
}
.ac-kidpick > input[type="search"]:focus { outline: none; border-color: var(--accent-2); box-shadow: 0 0 0 3px var(--ring); }
.ac-kidlist {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
  gap: 5px; max-height: 232px; overflow: auto;
  padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-md);
  background: var(--paper);
}
.ac-kid {
  display: flex; align-items: center; gap: 7px; min-width: 0;
  padding: 6px 8px; border-radius: 8px; border: 1px solid transparent;
  font-size: var(--fs-xs); cursor: pointer;
  transition: background var(--dur-fast), border-color var(--dur-fast);
}
.ac-kid:hover { background: var(--surface-2); border-color: var(--line); }
.ac-kid input { width: 15px; height: 15px; accent-color: var(--accent-2); flex: 0 0 auto; }
.ac-kid-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-kid-cls { margin-inline-start: auto; font-size: var(--fs-3xs); color: var(--muted); white-space: nowrap; }

.ac-checks { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.ac-check-line { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); cursor: pointer; }
.ac-check-line input { width: 16px; height: 16px; accent-color: var(--accent-2); }
.ac-form-tools { display: flex; gap: 6px; flex-wrap: wrap; }

.ac-passbox {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 12px 0; padding: 14px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md);
}
.ac-passbox code { font-size: var(--fs-xl); font-weight: 800; letter-spacing: 2px; }

.ac-import-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.ac-import-row .field { margin: 0; flex: 1 1 240px; }
.ac-import-sum { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.ac-result-grid { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.ac-import-sum .badge, .ac-result-grid .badge { font-size: var(--fs-xs); padding: 4px 10px; }

/* ---------- APK و عیب‌یابی ---------- */
.ac-apk { font-size: var(--fs-sm); line-height: 1.8; }
.ac-apk-apps { display: flex; flex-direction: column; gap: 8px; }
.ac-apk-app {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-md); background: var(--surface-2);
}
.ac-apk-app.is-empty { border-style: dashed; }
.ac-apk-meta { flex: 1; min-width: 0; }
.ac-apk-meta b { display: block; font-size: var(--fs-sm); line-height: 1.5; }
.ac-apk-meta .ac-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-apk-app .ac-apk-ic { width: 36px; height: 36px; border-radius: 11px; }
.ac-apk-app .btn { flex: 0 0 auto; }
.ac-apk-foot { justify-content: space-between; margin-top: 10px; }
.ac-apk-ic {
  width: 42px; height: 42px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 13px;
  background: color-mix(in srgb, var(--accent-2) 12%, var(--paper)); color: var(--accent-2);
}
.ac-apk-ic.is-family {
  background: color-mix(in srgb, var(--gold) 16%, var(--paper)); color: var(--gold);
}
.ac-diagnose { margin-top: 10px; }
.ac-verdict {
  display: flex; align-items: center; gap: 7px;
  padding: 9px 12px; border-radius: var(--radius-md); font-size: var(--fs-sm);
}
.ac-verdict.is-good { background: color-mix(in srgb, var(--good) 10%, transparent); color: var(--good); }
.ac-verdict.is-bad { background: color-mix(in srgb, var(--bad) 10%, transparent); color: var(--bad); }
.ac-check-list .ac-ck.is-bad { background: color-mix(in srgb, var(--bad) 12%, var(--paper)); color: var(--bad); }
.ac-check-list .ac-ck.is-warn { background: color-mix(in srgb, var(--warn) 12%, var(--paper)); color: var(--warn); }
.ac-check-list li > div { min-width: 0; }

/* ---------- جدول: ستون‌های فشرده ---------- */
.ac-table td .ac-badges { margin-top: 2px; }
.ac-table tbody tr { transition: background var(--dur-fast); }
.ac-table .badge { white-space: nowrap; }
.ac-tablewrap + .ac-center { margin-top: 8px; }

/* ---------- حالت شب: اصلاح رنگ‌های سفارشی ---------- */
[data-theme="dark"] .ac-kidlist,
[data-theme="dark"] .ac-kidpick > input[type="search"] { background: var(--paper); }
[data-theme="dark"] .ac-passbox { background: var(--bg); }
[data-theme="dark"] .ac-fieldset { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
[data-theme="dark"] .ac-apk-ic { background: rgba(52, 211, 153, .13); color: #34d399; }
[data-theme="dark"] .ac-apk-ic.is-family { background: rgba(251, 191, 36, .13); color: #fbbf24; }
[data-theme="dark"] .ac-phone { color: #34d399; }
[data-theme="dark"] .ac-verdict.is-good { background: rgba(52, 211, 153, .12); color: #4ade80; }
[data-theme="dark"] .ac-verdict.is-bad { background: rgba(248, 113, 113, .12); color: #f87171; }
