/* Admin settings page. Fluent-like colours; every text pair 4.5:1 and control
   edges 3:1 in both themes (plain-ui). */
:root {
  --bg: #ffffff; --text: #1b1b1b; --muted: #505050; --edge: #6b6b6b; --panel: #f5f5f5;
  --primary: #0f6cbd; --primary-text: #ffffff; --focus: #000000;
  --problem-bg: #fdf3f4; --problem-edge: #b10e1c; --ok-bg: #f1faf1; --ok-edge: #107c10;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1f1f1f; --text: #f0f0f0; --muted: #c8c8c8; --edge: #a0a0a0; --panel: #2b2b2b;
    --primary: #6cb8f6; --primary-text: #000000; --focus: #ffffff;
    --problem-bg: #3b1f22; --problem-edge: #f1707b; --ok-bg: #1f3320; --ok-edge: #54b054;
  }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.5 "Segoe UI", system-ui, sans-serif; }
main { max-width: 46rem; margin: 0 auto; padding: 0 1rem 3rem; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.25rem; }

.top { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between;
       max-width: 46rem; margin: 0 auto; padding: 1rem; }
.account { display: flex; gap: 0.75rem; align-items: center; }

button { font: inherit; min-height: 44px; padding: 0.5rem 1.25rem; border-radius: 4px; cursor: pointer; }
button.primary { background: var(--primary); color: var(--primary-text); border: 2px solid var(--primary); font-weight: 600; }
button.secondary { background: var(--bg); color: var(--text); border: 2px solid var(--edge); }
button:disabled { opacity: 0.6; cursor: default; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

fieldset { border: 1px solid var(--edge); border-radius: 6px; margin: 1rem 0; padding: 0.75rem 1rem 1rem; }
legend { font-weight: 600; padding: 0 0.25rem; }
.hint { color: var(--muted); margin: 0 0 0.5rem; }
.choices { display: flex; gap: 1.5rem; }
.choices label { display: flex; align-items: center; gap: 0.5rem; min-height: 44px; }
input[type="radio"] { width: 1.25rem; height: 1.25rem; accent-color: var(--primary); }

.colour-row { display: grid; grid-template-columns: 11rem 1fr; gap: 0.5rem 1rem; align-items: center; margin: 0.5rem 0; }
.colour-row select { font: inherit; min-height: 44px; padding: 0 0.5rem; border: 1px solid var(--edge);
                     border-radius: 4px; background: var(--bg); color: var(--text); max-width: 16rem; }
.colour-pick { display: flex; gap: 0.75rem; align-items: center; }
.swatch { width: 1.5rem; height: 1.5rem; border-radius: 4px; border: 1px solid var(--edge); flex: none; }

.actions { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0 0.5rem; }
.note { background: var(--panel); padding: 0.75rem 1rem; border-radius: 6px; }
.server { margin-top: 1rem; }
.server.late, .problem { background: var(--problem-bg); border-left: 4px solid var(--problem-edge); padding: 0.75rem 1rem; }
.saved:not(:empty) { background: var(--ok-bg); border-left: 4px solid var(--ok-edge); padding: 0.75rem 1rem; }

table { border-collapse: collapse; width: 100%; margin-top: 0.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem; border-bottom: 1px solid var(--edge); font-size: 15px; }
td ul { margin: 0; padding-left: 1.1rem; }

/* Phones: each change as a small block, the date first. */
@media (max-width: 36rem) {
  .colour-row { grid-template-columns: 1fr; }
  thead { display: none; }
  table, tbody, tr, td { display: block; }
  tr { border-bottom: 1px solid var(--edge); padding: 0.5rem 0; }
  td { border: 0; padding: 0.15rem 0; }
  td:first-child { font-weight: 600; }
}
