/* Fork (Dreikor17): the Config tab of #/admin (fork-admin-config.js).
 * Built on the admin area's cards, tables and buttons (admin.css,
 * account.css); colours are the theme's tokens only, so light and dark
 * follow the theme. */
.fac { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.fac .admin-card h4 { margin: 16px 0 6px; font-size: var(--fs-sm); color: var(--text-muted); }
.fac .admin-card > h3 + .account-hint { margin-bottom: 8px; }
.fac code, .fac pre { font-family: var(--mono); font-size: var(--fs-sm); }
.fac code { overflow-wrap: anywhere; }

/* Status strip */
.fac-procs { display: flex; flex-direction: column; gap: 8px; }
.fac-proc { line-height: 1.6; }
.fac-proc-name { display: inline-block; min-width: 5.5em; font-weight: var(--fw-semibold); }
.fac-file { margin: 10px 0 4px; font-size: var(--fs-sm); color: var(--text-muted); overflow-wrap: anywhere; }
.fac-pending { color: var(--status-yellow-text); font-size: var(--fs-sm); }
.fac-chip, .fac-badge {
  display: inline-block; padding: 0 8px; border: 1px solid var(--border); border-radius: 10px;
  font-size: var(--fs-sm); line-height: 1.6; white-space: nowrap; background: var(--surface-1);
}
.fac-chip-ok, .fac-badge-ok { color: var(--status-green-tint-text); border-color: var(--status-green-text); }
.fac-chip-warn, .fac-badge-warn { color: var(--status-yellow-text); border-color: var(--status-yellow); }
.fac-chip-bad { color: var(--status-red-text); border-color: var(--status-red-text); }
.fac-chip-muted, .fac-badge-muted { color: var(--text-muted); }

/* Section navigation (the admin tabs' look) */
.fac-sections { margin: 0; }

/* Filters form */
.fac-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; font-size: var(--fs-sm); color: var(--text-muted); }
.fac-field label { color: var(--text); font-weight: var(--fw-semibold); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fac-field textarea, .fac-field input {
  width: 100%; max-width: 48rem; box-sizing: border-box; padding: 8px 10px; min-height: 48px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--input-bg); color: var(--text);
  font-family: var(--mono); font-size: var(--fs-sm);
}
.fac-field-inline input { max-width: 12rem; }
.fac-field textarea:focus-visible, .fac-field input:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 1px; }

/* Review, diffs, findings */
.fac-review { margin-top: 12px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-1); min-width: 0; }
.fac .fac-review h4 { margin-top: 0; }
.fac-diff td { overflow-wrap: anywhere; }
.fac-diff code { white-space: pre-wrap; }
.fac-issues { margin: 8px 0; padding: 8px 12px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 6px; font-size: var(--fs-sm); color: var(--text); background: var(--card-bg); }
.fac-issues ul { margin: 4px 0 0; padding-left: 18px; }
.fac-issues-err { border-left-color: var(--status-red-text); }
.fac-issues-guard { border-left-color: var(--status-yellow); }
.fac-issues-warn { border-left-color: var(--border); }

/* All settings */
.fac-legend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-sm); }
.fac-keys { display: flex; flex-direction: column; gap: 2px; }
.fac-key { border-bottom: 1px solid var(--border); padding: 4px 0; min-width: 0; }
.fac-key summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 36px; }
.fac-sum { color: var(--text-muted); font-family: var(--mono); font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 12rem; }
.fac-value, .fac-cmd {
  margin: 6px 0; padding: 8px; max-height: 24rem; overflow: auto; border: 1px solid var(--border); border-radius: 6px;
  background: var(--input-bg); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere;
}
.fac-secret { color: var(--text-muted); }

/* Server restart banner */
.fac-banner {
  position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: var(--z-modal);
  padding: 10px 16px; border: 1px solid var(--status-yellow); border-radius: 8px; background: var(--card-bg); color: var(--text);
  box-shadow: 0 4px 16px var(--shadow); max-width: calc(100vw - 32px); box-sizing: border-box;
}

@media (pointer: fine) {
  .fac-field textarea, .fac-field input { min-height: 36px; }
}
@media (max-width: 760px) {
  .fac-proc-name { min-width: 0; margin-right: 4px; }
  .fac-diff th:nth-child(5), .fac-diff td:nth-child(5) { display: none; }
}

/* Regions (fork-admin-regions.js) */
.far-status { margin: 4px 0; font-size: var(--fs-sm); color: var(--text-muted); }
.far-auto label { font-weight: var(--fw-semibold); }
.far-auto input[type="checkbox"] { width: auto; min-height: 0; max-width: none; margin: 0; }
.far-add { display: flex; flex-direction: column; min-width: 0; }
.far-table th[scope="row"] { font-weight: var(--fw-normal); }
.far-warn, .far-obs { margin: 0; padding-left: 16px; }
.far-warn li { color: var(--status-yellow-text); }
.far-table tr.far-focus td, .far-table tr.far-focus th { background: var(--row-hover); }
.far-table tr.far-focus > :first-child { box-shadow: inset 3px 0 0 var(--accent-strong); }
/* Phone width: the Regions tables fit their frame (smoke F2). First seen
   folds into Status, and an observer key never breaks mid-token. */
.far-obs code { white-space: nowrap; }
.far-phone-only { display: none; }
@media (max-width: 760px) {
  .far-phone-only { display: inline; }
  .far-table th, .far-table td { padding-left: 4px; padding-right: 4px; }
  .far-obs { padding-left: 12px; }
}
