/* mailweb -- self-contained styles (no external resources; CSP is default-src 'self'). */
:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #1d2330; --muted: #5d6676; --line: #d8dce3;
  --accent: #b5452a; --accent-text: #ffffff; --ok-bg: #e7f5ea; --ok-line: #8cc79a;
  --err-bg: #fdecea; --err-line: #e5a39b; --warn-bg: #fff6e0; --warn-line: #e6c779;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151b; --card: #1b2029; --text: #e4e8ef; --muted: #9aa3b2; --line: #333b48;
    --accent: #e0714f; --accent-text: #12151b; --ok-bg: #16301e; --ok-line: #2f6b3e;
    --err-bg: #3a1a17; --err-line: #7a3a32; --warn-bg: #352b12; --warn-line: #7a6326;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
main { max-width: 30rem; margin: 2.5rem auto; padding: 1.5rem 1.25rem; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; }
main.wide { max-width: 64rem; }
h1 { font-size: 1.4rem; margin: 0 0 .25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 .5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.sub, .hint { color: var(--muted); font-size: .9rem; }
.sub { margin-top: 0; }
label { display: block; margin: .9rem 0; font-weight: 600; }
label .hint { font-weight: 400; }
input[type=email], input[type=password], input[type=text], select {
  display: block; width: 100%; margin-top: .3rem; padding: .55rem .65rem; font: inherit;
  color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font: inherit; font-weight: 600; padding: .55rem 1.1rem; border: 0; border-radius: 6px;
  background: var(--accent); color: var(--accent-text); cursor: pointer; }
button.small { padding: .25rem .6rem; font-size: .85rem; }
button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.ok, .err, .warn { padding: .7rem .9rem; border-radius: 6px; margin: 1rem 0; border: 1px solid; }
.ok { background: var(--ok-bg); border-color: var(--ok-line); }
.err { background: var(--err-bg); border-color: var(--err-line); }
.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.ok p, .err p, .warn p { margin: .25rem 0; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; }
td form { display: inline; margin: 0; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; }
.row label { flex: 1 1 12rem; margin: .4rem 0; }
.row button { margin-bottom: .45rem; }
.inline { display: flex; gap: .25rem; align-items: center; }
.inline input { margin: 0; width: auto; flex: 1 1 8rem; padding: .25rem .4rem; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.badge { display: inline-block; padding: 0 .4rem; border-radius: 4px; font-size: .78rem; border: 1px solid var(--line); color: var(--muted); }
.badge.on { border-color: var(--ok-line); }
.badge.off { border-color: var(--err-line); }
@media (max-width: 40rem) { main { margin: 0; border-radius: 0; border-left: 0; border-right: 0; } }
