/* Hailport Console. Colours: brand/README.md (#002691 → #007EE5). */
:root { --bg: #f5f6f8; --panel: #fff; --text: #1b1f24; --muted: #5d6671; --line: #d9dde3; --accent: #0063c4; --accent-dark: #002691; --danger: #b3261e; --ok-bg: #e7f1fb; --err-bg: #fbeaea; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #111418; --panel: #1b2027; --text: #e6e9ed; --muted: #9aa4b0; --line: #2d343d; --accent: #64a8f0; --accent-dark: #9cc7f5; --danger: #f28b82; --ok-bg: #16263a; --err-bg: #3a1c1c; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--accent); }
header { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--panel); border-bottom: 1px solid var(--line); position: relative; }
header .brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
header img { width: 28px; height: 28px; }
header strong { font-size: 18px; }
header .spacer { flex: 1; }
header .user { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; }
main { max-width: 860px; margin: 0 auto; padding: 16px; }
section { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
section.center { text-align: center; padding: 36px 16px; }
img.hero { width: 72px; height: 72px; }
h1 { font-size: 22px; margin: 4px 0 8px; }
h3 { font-size: 16px; margin: 0 0 4px; }
.muted { color: var(--muted); }
button, a.button { font: inherit; font-weight: 600; border: 0; border-radius: 6px; padding: 8px 14px; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-block; }
@media (prefers-color-scheme: dark) { button, a.button { color: #0b1a2c; } }
button.link { background: none; color: var(--accent); padding: 4px 6px; font-weight: 500; }
button.danger { color: var(--danger); }
input[type=text], input[type=email], select { font: inherit; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); min-width: 0; }
form.inline { display: inline; margin: 0; }
form.row { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
form.row input { flex: 1 1 220px; }
form.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 8px 0; }
form.stack input[type=text] { width: 100%; max-width: 360px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks label, form.stack label { display: flex; align-items: center; gap: 6px; }
.notice { background: var(--ok-bg); border-radius: 6px; padding: 8px 10px; margin: 0 0 12px; }
.notice.error { background: var(--err-bg); color: var(--danger); }
nav.tabs { display: flex; gap: 4px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
nav.tabs a { padding: 8px 12px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
nav.tabs a.active { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
td.actions { text-align: right; white-space: nowrap; }
td.actions details { display: inline-block; text-align: left; }
/* An opened form gets its own line below the links. */
td.actions details[open] { display: block; }
.card .actions details[open] { flex-basis: 100%; order: 1; }
details > summary { cursor: pointer; color: var(--accent); list-style: none; display: inline-block; padding: 4px 6px; }
details > summary::-webkit-details-marker { display: none; }
details[open] > summary { font-weight: 600; }
details.add { margin-bottom: 10px; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.card .actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
ul.list { padding-left: 18px; }
/* Organisation switcher in the header. */
details.menu { position: relative; }
details.menu > summary { color: var(--text); font-weight: 600; border: 1px solid var(--line); border-radius: 6px; }
details.menu .menu-list { position: absolute; top: 110%; left: 0; z-index: 10; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 6px; min-width: 220px; display: flex; flex-direction: column; }
details.menu .menu-list a { padding: 6px 8px; text-decoration: none; color: var(--text); border-radius: 4px; }
details.menu .menu-list a:hover { background: var(--bg); }
@media (max-width: 640px) {
  header strong { display: none; }
  table, thead, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { border-bottom: 1px solid var(--line); padding: 6px 0; }
  td { border: 0; padding: 3px 0; }
  td.actions { text-align: left; }
}
