/* JOV Cleaner's preview (family/apps/cleaner.js): the app's sidebar and pages, in its own deep
   blue look, light and dark with the page. On phones (a sheet) the sidebar becomes a row of tabs. */

.cl {
  --cl-bg: #f4f7fc; --cl-side: #e9eef7; --cl-card: #ffffff; --cl-line: rgb(16 40 90 / 11%);
  --cl-text: #142034; --cl-text-2: #4a5872; --cl-blue: #0b5fc5; --cl-blue-soft: rgb(11 95 197 / 10%);
  --cl-ok: #0b6e4a; --cl-warn: #7c4a00; --cl-muted-pill: #e6eaf2;
  flex: 1; min-height: 0; display: grid; grid-template-columns: 196px minmax(0, 1fr);
  background: var(--cl-bg); color: var(--cl-text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cl {
    --cl-bg: #0d1320; --cl-side: #0a0f1a; --cl-card: #151d2d; --cl-line: rgb(150 180 255 / 12%);
    --cl-text: #e8eefb; --cl-text-2: #a6b3cc; --cl-blue: #7db7ff; --cl-blue-soft: rgb(77 163 255 / 14%);
    --cl-ok: #6fd3a4; --cl-warn: #f2c66d; --cl-muted-pill: #222c40;
  }
}
:root[data-theme="dark"] .cl {
  --cl-bg: #0d1320; --cl-side: #0a0f1a; --cl-card: #151d2d; --cl-line: rgb(150 180 255 / 12%);
  --cl-text: #e8eefb; --cl-text-2: #a6b3cc; --cl-blue: #7db7ff; --cl-blue-soft: rgb(77 163 255 / 14%);
  --cl-ok: #6fd3a4; --cl-warn: #f2c66d; --cl-muted-pill: #222c40;
}

.cl-nav { display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; background: var(--cl-side); border-inline-end: 1px solid var(--cl-line); overflow: auto; }
.cl-brand { display: flex; align-items: center; gap: 9px; padding: 4px 8px 14px; font-weight: 700; font-size: 14px; }
.cl-brand .fam-icon { width: 28px; height: 28px; border-radius: 7px; }
.cl-tab {
  display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px;
  background: none; color: var(--cl-text-2); font-size: 13px; font-weight: 550; text-align: start; white-space: nowrap;
}
.cl-tab:hover { background: var(--cl-blue-soft); color: var(--cl-text); }
.cl-tab[aria-current="page"] { background: var(--cl-blue-soft); color: var(--cl-blue); }
.cl-main { min-width: 0; overflow: auto; padding: 16px 20px 24px; outline: none; }
.cl-page { display: grid; gap: 14px; }
.cl-h { font-size: 22px; font-weight: 750; letter-spacing: -.01em; }
.cl-h2 { font-size: 20px; font-weight: 750; }
.cl-h3 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--cl-text-2); text-transform: uppercase; letter-spacing: .04em; }
.cl-h3 svg { color: var(--cl-blue); }
.cl-sub { color: var(--cl-text-2); font-size: 13px; line-height: 1.5; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cl-card { padding: 14px 16px; border-radius: 14px; background: var(--cl-card); border: 1px solid var(--cl-line); display: grid; gap: 10px; align-content: start; min-width: 0; }
.cl-safe { background: linear-gradient(160deg, var(--cl-blue-soft), var(--cl-card) 70%); }
.cl-big { font-size: 15px; color: var(--cl-text-2); }
.cl-big strong { font-size: 28px; font-weight: 750; color: var(--cl-text); font-variant-numeric: tabular-nums; }
.cl-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cl-metric-l { font-size: 12px; color: var(--cl-text-2); font-weight: 600; }
.cl-metric-v { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cl-metric-s { font-size: 12px; color: var(--cl-text-2); }
.cl-spark { width: 100%; height: 44px; display: block; }
.cl-spark-line { fill: none; stroke: var(--cl-blue); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.cl-meter, .cl-bar { height: 8px; border-radius: 4px; background: var(--cl-muted-pill); overflow: hidden; }
.cl-meter span { display: block; height: 100%; background: var(--cl-blue); border-radius: 4px; }
.cl-bar span { display: block; height: 100%; background: var(--cl-blue); transform-origin: left center; transition: transform .12s linear; }
[dir="rtl"] .cl-bar span { transform-origin: right center; }
.cl-dot { width: 10px; height: 10px; border-radius: 50%; }
.cl-dot-ok { background: var(--cl-ok); }
.cl-largest { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cl-largest li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; border-block-end: 1px solid var(--cl-line); }
.cl-largest li:last-child { border: 0; }

.cl-group { display: grid; gap: 8px; }
.cl-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cl-row { border-radius: 12px; background: var(--cl-card); border: 1px solid var(--cl-line); }
.cl-row.is-waiting { opacity: .78; }
.cl-row-main { display: flex; align-items: center; gap: 10px; padding: 6px 12px; min-height: 52px; }
.cl-row-main input { width: 18px; height: 18px; flex: none; accent-color: var(--cl-blue); }
.cl-row-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; border: 0; background: none; color: inherit; padding: 6px 0; text-align: start; min-height: 44px; }
.cl-row-name { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cl-row-name strong { font-size: 13.5px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cl-row-meta { font-size: 12px; color: var(--cl-text-2); }
.cl-chev { flex: none; color: var(--cl-text-2); transition: transform .15s ease; }
.cl-row.is-open .cl-chev { transform: rotate(180deg); }
.cl-details { margin: 0; padding: 0 16px 14px 40px; display: grid; gap: 4px; font-size: 12.5px; line-height: 1.5; }
[dir="rtl"] .cl-details { padding: 0 40px 14px 16px; }
.cl-details dt { font-weight: 700; margin-top: 6px; }
.cl-details dd { margin: 0; color: var(--cl-text-2); }
.cl-path { font-family: var(--font-mono); font-size: 11.5px; word-break: break-all; text-align: start; }
.cl-footer {
  position: sticky; bottom: -24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 0 0; background: linear-gradient(transparent, var(--cl-bg) 30%);
}
.cl-sum { font-weight: 650; }
.cl-result { justify-items: center; text-align: center; }
.cl-result .cl-largest { justify-self: stretch; text-align: start; }
.cl-done-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--cl-ok); color: #fff; }
.cl-app-icon { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-weight: 750; color: #fff; background: linear-gradient(160deg, #6a8bd8, #2b4fa8); }
.cl-pill { flex: none; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 650; background: var(--cl-muted-pill); color: var(--cl-text-2); white-space: nowrap; }
.cl-pill-verified { color: var(--cl-ok); background: color-mix(in srgb, var(--cl-ok) 13%, transparent); }
.cl-pill-inApp, .cl-pill-notVerified { color: var(--cl-warn); background: color-mix(in srgb, var(--cl-warn) 13%, transparent); }
.cl-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; padding: 4px 0; }
.cl-kv span { color: var(--cl-text-2); }
.cl-setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 4px 0; }
.cl-setting-l { font-weight: 600; font-size: 13.5px; }
.cl-switch { flex: none; position: relative; width: 44px; height: 26px; border-radius: 13px; border: 0; background: var(--cl-muted-pill); }
.cl-switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 30%); transition: inset-inline-start .15s ease; }
.cl-switch[aria-checked="true"] { background: var(--cl-blue); }
.cl-switch[aria-checked="true"]::after { inset-inline-start: 21px; }
.cl .btn-primary { background: var(--accent); }

@media (max-width: 819.98px), (pointer: coarse) {
  .cl { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .cl-nav { flex-direction: row; padding: 8px; gap: 4px; border-inline-end: 0; border-block-end: 1px solid var(--cl-line); }
  .cl-brand { display: none; }
  .cl-tab { min-height: 44px; flex: none; }
  .cl-main { padding: 14px 12px 20px; }
  .cl-details { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .cl-bar span, .cl-chev, .cl-switch::after { transition: none; }
}
