/* MIAM web UI standard: the PREP review look (startupteams/ai-software-project-framework docs/WEB_UI_STANDARD.md).
   Copy this file as-is; put service-only rules in a second file. Light and dark follow the OS. */
:root { --bg: #fafaf9; --fg: #1c1917; --muted: #78716c; --line: #e7e5e4; --card: #fff; --accent: #1d4ed8; --warn: #b45309; --bad: #b91c1c; --ok: #15803d; }
@media (prefers-color-scheme: dark) { :root { --bg: #1c1917; --fg: #f5f5f4; --muted: #a8a29e; --line: #44403c; --card: #292524; --accent: #93c5fd; --warn: #fbbf24; --bad: #f87171; --ok: #4ade80; } }
* { box-sizing: border-box; }
body { margin: 0; font: 14px/1.45 system-ui, sans-serif; background: var(--bg); color: var(--fg); }
header { display: flex; gap: 16px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
header .brand { font-weight: 700; color: var(--fg); text-decoration: none; }
header nav a { margin-right: 12px; }
header .who { margin-left: auto; display: flex; gap: 8px; align-items: center; }
main { padding: 16px; max-width: 1400px; margin: 0 auto; }
a { color: var(--accent); }
h1 { font-size: 28px; margin: 12px 0; }
h2 { font-size: 17px; margin: 0 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin: 12px 0; }
.narrow { max-width: 360px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
label { display: block; margin: 6px 0; }
input, select, textarea { width: 100%; padding: 5px 7px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--fg); font: inherit; }
textarea { min-height: 60px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
button { padding: 5px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--card); color: var(--fg); cursor: pointer; font: inherit; }
button.primary { border-color: var(--accent); font-weight: 600; }
button.link { border: 0; background: none; color: var(--accent); padding: 0; }
button.danger { background: #b3261e; color: #fff; border-color: #b3261e; }
form.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pill { display: inline-block; padding: 1px 7px; border: 1px solid var(--line); border-radius: 10px; font-size: 12px; }
.muted { color: var(--muted); }
.error { color: var(--bad); font-weight: 600; }
.notice { color: var(--accent); font-weight: 600; }
.warn { color: var(--warn); }
.soon { display: inline-block; padding: 0 8px; border: 1px solid var(--warn); border-radius: 10px; color: var(--warn); font-size: 12px; white-space: nowrap; }
footer.build { max-width: 1400px; margin: 0 auto; padding: 8px 16px 16px; text-align: right; color: var(--muted); font-size: 12px; }

/* Password show/hide toggle (eyeball), same look in every MIAM service. One icon shows at a time. */
.pw-field { position: relative; display: block; }
span.pw-field > input[name] { width: 100%; box-sizing: border-box; padding-right: 3em; }
.pw-field > button.pw-eye { position: absolute; top: 50%; right: 0.25em; transform: translateY(-50%);
  display: inline-flex; align-items: center; justify-content: center; width: 2em; height: 2em; min-width: 0;
  min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 4px; background: none; box-shadow: none;
  color: inherit; opacity: 0.65; cursor: pointer; line-height: 0; }
.pw-field > button.pw-eye:hover, .pw-field > button.pw-eye:focus-visible { opacity: 1; }
.pw-field > button.pw-eye:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.pw-eye svg { width: 1.2em; height: 1.2em; }
.pw-eye .pw-eye-off, .pw-eye[aria-pressed="true"] .pw-eye-on { display: none; }
.pw-eye[aria-pressed="true"] .pw-eye-off { display: inline; }
@media (max-width: 640px) { .pw-field > button.pw-eye { width: 44px; height: 44px; right: 0; } }
