/* admin.css -- the administrator pages that are not the main dashboard (import).
   Same rules as style.css: every colour is a var(--ds-*) from tokens-so.css; gold only
   on actions; one gold fill per page (button.primary). */

:root { color-scheme: dark; }
body {
  margin: 0;
  font-family: var(--ds-font-sans);
  font-size: 16px;
  line-height: 1.5;
  background: var(--ds-color-bg);
  color: var(--ds-color-text);
}
main { max-width: 1080px; margin: 0 auto; padding: var(--ds-space-3) var(--ds-space-2) var(--ds-space-8); }
h1, h2 { font-family: var(--ds-font-display); font-weight: var(--ds-font-weight-bold); margin: 0; }
h1 { font-size: 30px; margin-bottom: 4px; }
h2 { font-size: 20px; margin-bottom: var(--ds-space-2); }
.sub { color: var(--ds-color-text-muted); margin: 0 0 var(--ds-space-3); }
a { color: var(--ds-color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
section {
  background: var(--ds-color-surface);
  border: 1px solid var(--ds-color-border);
  border-radius: var(--ds-radius-lg);
  padding: var(--ds-space-3);
  margin-bottom: var(--ds-space-3);
}
.row { display: flex; flex-wrap: wrap; gap: var(--ds-space-2); align-items: flex-end; }
.row label { flex: 1 1 220px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--ds-space-2); margin-bottom: var(--ds-space-2); }
label { display: flex; flex-direction: column; gap: 4px; font-weight: var(--ds-font-weight-medium); font-size: 14px; }
input, select {
  padding: 10px; min-height: 44px; border-radius: var(--ds-radius-md);
  border: 1px solid var(--ds-color-border-strong);
  background: var(--ds-color-bg); color: inherit; font: inherit;
}
input:focus, select:focus {
  outline: none; border-color: var(--ds-color-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ds-color-primary) 22%, transparent);
}
button {
  padding: 11px 18px; min-height: 48px; border-radius: var(--ds-radius-md);
  background: transparent; color: var(--ds-color-primary);
  border: 1px solid var(--ds-color-primary);
  font: inherit; font-weight: var(--ds-font-weight-semibold); cursor: pointer;
}
button:hover:not([disabled]) { background: color-mix(in srgb, var(--ds-color-primary) 12%, transparent); }
button.primary { background: var(--ds-color-primary); color: var(--ds-color-primary-text); }
button.primary:hover:not([disabled]) { background: var(--ds-color-primary-hover); border-color: var(--ds-color-primary-hover); }
button.secondary { color: var(--ds-color-text); border-color: var(--ds-color-border-strong); }
button.secondary:hover:not([disabled]) { background: var(--ds-color-surface-2); }
button[disabled] { opacity: .45; cursor: default; }
.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: var(--ds-space-2); }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--ds-color-border); vertical-align: top; }
th { color: var(--ds-color-text-muted); font-weight: var(--ds-font-weight-semibold); background: var(--ds-color-surface-2); white-space: nowrap; }
td.mono, .mono { font-family: var(--ds-font-mono); }
.msg { min-height: 1.5em; margin: var(--ds-space-1) 0 0; }
.msg.err { color: var(--ds-color-danger-fg); }
.msg.ok { color: var(--ds-color-success-fg); }
.msg.warn { color: var(--ds-color-warning-fg); }
.hint { color: var(--ds-color-text-muted); font-size: 14px; }
.tag { display: inline-block; padding: 1px 8px; border-radius: var(--ds-radius-full); font-size: 12px; font-weight: var(--ds-font-weight-semibold); }
.tag.ok { background: var(--ds-color-success-bg); color: var(--ds-color-success-fg); }
.tag.bad { background: var(--ds-color-danger-bg); color: var(--ds-color-danger-fg); }
.tag.warn { background: var(--ds-color-warning-bg); color: var(--ds-color-warning-fg); }
.tag.mark { background: var(--ds-color-warning-bg); color: var(--ds-color-warning-fg); display: block; width: fit-content; margin-top: 4px; white-space: normal; } /* 015: device mark */
.counts { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: var(--ds-space-1); margin-top: var(--ds-space-2); }
.counts div { background: var(--ds-color-surface-2); border-radius: var(--ds-radius-md); padding: var(--ds-space-1) 12px; }
.counts b { font-family: var(--ds-font-mono); font-weight: var(--ds-font-weight-medium); font-size: 20px; display: block; }
.brandline { display: flex; align-items: center; gap: 10px; margin-bottom: var(--ds-space-1); color: var(--ds-color-text-muted); font-size: 14px; }
.brandline img { width: 28px; height: 28px; }
#denied { padding: var(--ds-space-6) var(--ds-space-2); text-align: center; }
