/* eastaustralis auth UI - extends site.css tokens. White, minimal, compact.
   Base is black-and-white; the only colour is the eastaustralis brand accent
   (deep maroon), used for links, primary buttons, and focus. First-party. */

.auth-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(2rem, 7vw, 4.5rem) 1rem;
}
.card {
  width: 100%;
  max-width: 22rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 1.5rem;
  background: var(--ground);
}
.card.wide { max-width: 42rem; }

.auth-title { margin: 0 0 0.25rem; font-size: 1.2rem; font-weight: 650; }
.auth-sub { margin: 0 0 1.25rem; color: var(--muted); font-size: 0.9rem; }

.field { margin: 0 0 0.9rem; }
.field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.3rem;
}
.field input, .field select {
  width: 100%;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--ground);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.55rem 0.65rem;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}

.btn {
  display: inline-block;
  width: 100%;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--on-accent);
  background: var(--accent-solid);
  border: 1px solid var(--accent-solid);
  border-radius: 6px;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn-ghost {
  width: auto;
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}
.btn-ghost:hover { background: transparent; border-color: var(--muted); }

.msg { margin: 0.9rem 0 0; font-size: 0.85rem; min-height: 1.1rem; }
.msg.err { color: #b42318; }
.msg.ok { color: var(--ink); }

.note { color: var(--muted); font-size: 0.82rem; margin: 1rem 0 0; }
.row { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.mono {
  font-family: ui-monospace, "SFMono-Regular", "Consolas", monospace;
  background: #f5f5f6;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.15rem 0.4rem;
  font-size: 0.9rem;
}
a.link { color: var(--accent); }
a.link:hover { color: var(--accent-strong); }

table.members { width: 100%; border-collapse: collapse; margin: 1rem 0 0; font-size: 0.85rem; }
table.members th, table.members td {
  text-align: left;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--line);
}
table.members th { color: var(--muted); font-weight: 600; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }

.divider { height: 1px; background: var(--line); border: 0; margin: 1.5rem 0; }
.h-sec { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 0.75rem; }

/* ===== hub dashboard (tabs + data relays) ===== */
.hub-main {
  flex: 1 1 auto;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.25rem) clamp(1rem, 4vw, 2rem) 3rem;
}
.hub-head { margin: 0 0 1.25rem; }
.hub-h1 { margin: 0.1rem 0 0.2rem; font-size: clamp(1.3rem, 3.2vw, 1.7rem); font-weight: 650; letter-spacing: -0.01em; }
.hub-sub { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* tab bar */
.tabs { display: flex; gap: 0.25rem; border-bottom: 1px solid var(--line); margin: 0 0 1.25rem; }
.tab {
  font: inherit; font-size: 0.92rem; font-weight: 600;
  color: var(--muted); background: transparent; border: 0;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  padding: 0.55rem 0.9rem; cursor: pointer;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tabpanel[hidden] { display: none; }

/* shared relay bits */
.relay-empty, .relay-loading { color: var(--muted); font-size: 0.9rem; margin: 0; padding: 1rem; }
.relay-loading { font-style: italic; }
.muted { color: var(--muted); }

/* smartsheets: list + embedded view */
.relay { display: flex; gap: 1rem; align-items: flex-start; }
.relay-list {
  flex: 0 0 13rem; max-width: 13rem;
  display: flex; flex-direction: column; gap: 0.3rem;
  border: 1px solid var(--line); border-radius: 8px; padding: 0.5rem;
  max-height: 70vh; overflow-y: auto;
}
.relay-item {
  font: inherit; font-size: 0.88rem; text-align: left;
  color: var(--ink); background: transparent; border: 0; border-radius: 6px;
  padding: 0.5rem 0.6rem; cursor: pointer; line-height: 1.3;
}
.relay-item:hover { background: var(--accent-tint); }
.relay-item.is-active { background: var(--accent-tint); color: var(--accent-strong); font-weight: 600; }
.relay-view { flex: 1 1 auto; min-width: 0; }
.relay-viewbar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 0 0 0.5rem; }
.relay-title { font-weight: 600; font-size: 0.95rem; }
.relay-frame-wrap {
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: #fafafa; min-height: 70vh;
}
.relay-frame { width: 100%; height: 70vh; border: 0; display: block; background: #fff; }
.relay-foot { color: var(--muted); font-size: 0.78rem; margin: 0.5rem 0 0; }

/* vfab: control bar + table */
.relay-bar { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; margin: 0 0 1rem; }
.field.inline { margin: 0; }
.field.inline label { margin: 0 0 0.25rem; }
.relay-search {
  flex: 1 1 14rem; min-width: 10rem; font: inherit; font-size: 0.9rem;
  color: var(--ink); background: var(--ground); border: 1px solid var(--line);
  border-radius: 6px; padding: 0.5rem 0.6rem; align-self: flex-end;
}
.relay-search:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-tint); }
.relay-table-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: auto; max-height: 72vh; }
.relay-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.relay-table th, .relay-table td {
  text-align: left; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line);
  white-space: nowrap; max-width: 22rem; overflow: hidden; text-overflow: ellipsis;
  vertical-align: top;
}
.relay-table thead th {
  position: sticky; top: 0; background: var(--ground); z-index: 1;
  color: var(--muted); font-weight: 600; font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.relay-table .vfab-json { padding: 0.2rem 0.5rem; font-size: 0.75rem; }
.vfab-pre {
  margin: 0; white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, "SFMono-Regular", "Consolas", monospace;
  font-size: 0.78rem; color: var(--ink);
  background: #f5f5f6; border-radius: 6px; padding: 0.75rem;
}

/* admin: stacked cards */
.stack { width: 100%; max-width: 42rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.25rem; }

/* settings: read-only identity key/value rows */
.kv { display: grid; grid-template-columns: 7rem 1fr; gap: 0.4rem 1rem; margin: 0 0 0.5rem; font-size: 0.9rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; color: var(--ink); word-break: break-word; }

@media (max-width: 640px) {
  .relay { flex-direction: column; }
  .relay-list { flex-basis: auto; max-width: none; width: 100%; flex-direction: row; flex-wrap: wrap; max-height: none; }
  .relay-frame, .relay-frame-wrap { min-height: 60vh; height: 60vh; }
}

@media (prefers-color-scheme: dark) {
  .mono { background: #1a1a1d; }
  .msg.err { color: #f0a39a; }
  .msg.ok { color: var(--ink); }
  .relay-frame-wrap { background: #161618; }
  .relay-frame { background: #fff; }   /* smartsheet pages are light; keep a white canvas */
  .vfab-pre { background: #1a1a1d; }
}
