/* Everything that is not the board itself: the top-bar navigation, the sign-in
   and password forms, the Users page, and flash messages. board.css carries the
   design tokens; these rules only use them. */

.topbar .tnav{display:flex; align-items:center; gap:14px; flex-wrap:wrap; font-size:12.5px; color:var(--muted)}
.topbar .tnav a{color:var(--ink-2); text-decoration:none; border-bottom:1px solid var(--line)}
.topbar .tnav a:hover{color:var(--accent); border-color:var(--accent)}
.topbar .tnav .who{color:var(--muted)}
.topbar .brand[href]{color:var(--ink); text-decoration:none}
.topbar .refresh{border:1px solid var(--line); background:var(--surface); color:var(--muted); font:inherit;
  font-size:15px; line-height:1; width:32px; height:32px; border-radius:6px; cursor:pointer}
.topbar .refresh:hover{color:var(--accent); border-color:var(--accent)}
.topbar .refresh.busy{opacity:.5; cursor:progress}
.inline{display:inline}
.linklike{background:none; border:0; color:var(--ink-2); cursor:pointer; font:inherit; font-size:12.5px; padding:0;
  border-bottom:1px solid var(--line)}
.linklike:hover{color:var(--accent); border-color:var(--accent)}
footer.legend .ft-ver{font-size:11px; opacity:.7}

/* flash messages */
.flash{padding:10px 14px; border-radius:4px; font-size:13.5px; border:1px solid var(--line)}
.flash.ok{background:var(--good-bg); color:var(--good); border-color:transparent}
.flash.error{background:var(--crit-bg); color:var(--crit); border-color:transparent}
.flash.warn,.flash.password{background:var(--warn-bg); color:var(--warn); border-color:transparent}
.flash.password{font-family:"IBM Plex Mono",ui-monospace,monospace; word-break:break-all; direction:ltr; unicode-bidi:isolate}

/* forms */
.auth{max-width:420px; margin:6vh auto 0; width:100%}
.auth h1{font-family:"Newsreader",Georgia,serif; font-weight:500; font-size:30px; margin:0; letter-spacing:-.01em}
[dir="rtl"] .auth h1{font-family:"IBM Plex Sans Arabic",sans-serif; font-weight:700}
.auth .sub{color:var(--muted); margin:4px 0 18px; font-size:13.5px}
label{display:block; margin:0 0 12px; font-size:13px; color:var(--ink-2)}
input[type=text],input[type=email],input[type=password],select{
  width:100%; margin-top:5px; padding:9px 11px; font:inherit; font-size:14px;
  border:1px solid var(--line); border-radius:5px; background:var(--surface); color:var(--ink)}
input:focus-visible,select:focus-visible{outline:2px solid var(--accent); outline-offset:-1px}
button.btn{font:inherit; font-size:13px; font-weight:600; padding:8px 15px; border-radius:5px;
  border:1px solid var(--line); background:var(--surface-2); color:var(--ink); cursor:pointer}
button.btn:hover{border-color:var(--accent)}
button.btn.primary{background:var(--accent); border-color:var(--accent); color:#fff}
:root[data-theme="dark"] button.btn.primary{color:#08171D}
@media (prefers-color-scheme:dark){ :root:not([data-theme="light"]) button.btn.primary{color:#08171D} }
button.btn.small{padding:5px 10px; font-size:12px; font-weight:500}
button.btn.danger{color:var(--crit); border-color:var(--crit)}
.hint{color:var(--muted); font-size:12.5px; line-height:1.6}
.hint code{font-family:"IBM Plex Mono",ui-monospace,monospace; font-size:12px; background:var(--surface-2);
  padding:1px 5px; border-radius:3px; direction:ltr; unicode-bidi:isolate}

/* admin */
.grid-form{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:0 18px}
.grid-form fieldset,.grid-form .full{grid-column:1/-1}
fieldset.widgets{border:1px solid var(--line); border-radius:4px; padding:12px 14px; margin:6px 0 16px}
fieldset.widgets legend{font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); padding:0 6px; font-weight:600}
[dir="rtl"] fieldset.widgets legend{letter-spacing:0; font-size:12px}
label.check{display:flex; gap:9px; align-items:flex-start; margin:0 0 9px; cursor:pointer}
label.check input{width:auto; margin:3px 0 0}
label.widget .wname{font-weight:600; font-size:13.5px; display:block; color:var(--ink)}
label.widget .wdesc{display:block; color:var(--muted); font-size:12px; line-height:1.5}
label.widget.sensitive .wname{color:var(--warn)}
.tag{font-size:10.5px; padding:1px 7px; border-radius:99px; background:var(--surface-2);
  border:1px solid var(--line); color:var(--muted); font-style:normal; margin-inline-start:6px; font-weight:500}
.tag.admin{background:var(--accent-soft); color:var(--accent); border-color:var(--accent)}
.tag.off{background:var(--crit-bg); color:var(--crit); border-color:transparent}
.tag.warn{background:var(--warn-bg); color:var(--warn); border-color:transparent}
.userrow{border:1px solid var(--line); border-radius:4px; padding:14px 16px; margin:0 0 12px}
.uhead{display:flex; gap:14px; align-items:flex-start; flex-wrap:wrap; margin-bottom:10px}
.uhead b{font-family:"IBM Plex Mono",ui-monospace,monospace; font-weight:500; direction:ltr; unicode-bidi:isolate}
.actions{margin-inline-start:auto; display:flex; gap:6px; flex-wrap:wrap}
.wgrid{display:grid; grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); gap:0 16px; margin:8px 0}
table.audit td{font-size:12px; color:var(--muted); white-space:normal}
table.audit td:first-child{font-family:"IBM Plex Mono",ui-monospace,monospace; direction:ltr; unicode-bidi:isolate; white-space:nowrap}
