/* Shared look for the sign-in, invitation and fleet/admin pages. Tokens match gcs.css. */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg:#0a0f15; --surface:#111821; --surface-2:#18212c; --surface-3:#202b38;
  --line:#223040; --line-strong:#304055; --text:#e7ecf2; --dim:#8b98aa; --faint:#5a6879;
  --accent:#3b8ff0; --accent-ink:#ffffff;
  --ok:#2fbf71; --warn:#f2a93b; --bad:#ef5d58;
  --ok-bg:rgba(47,191,113,.14); --warn-bg:rgba(242,169,59,.15); --bad-bg:rgba(239,93,88,.15); --info-bg:rgba(59,143,240,.16);
  --hover:rgba(255,255,255,.06); --shadow:0 8px 26px rgba(0,0,0,.42);
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg:#eef2f6; --surface:#ffffff; --surface-2:#f3f6f9; --surface-3:#e7ecf2;
  --line:#dde3ea; --line-strong:#c8d1dc; --text:#0f1b2a; --dim:#55647a; --faint:#94a1b2;
  --accent:#0a66c2; --accent-ink:#ffffff;
  --ok:#13874b; --warn:#a96400; --bad:#c9302c;
  --ok-bg:rgba(19,135,75,.1); --warn-bg:rgba(201,128,0,.12); --bad-bg:rgba(201,48,44,.1); --info-bg:rgba(10,102,194,.1);
  --hover:rgba(15,27,42,.05); --shadow:0 6px 22px rgba(15,27,42,.16);
}
:root { --font:"IBM Plex Sans","Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif; --mono:"IBM Plex Mono",ui-monospace,Consolas,monospace; }
* { box-sizing:border-box; }
html, body { margin:0; background:var(--bg); color:var(--text); font:14px/1.45 var(--font); -webkit-font-smoothing:antialiased; }
button, input, select { font:inherit; color:inherit; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
a { color:var(--accent); }
.mono { font-family:var(--mono); font-size:13px; }
.dim { color:var(--dim); }
[hidden] { display:none !important; }

/* top bar */
.bar { display:flex; align-items:center; gap:16px; height:56px; padding:0 20px; background:var(--surface); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:5; }
.bar .title { font-weight:600; letter-spacing:.01em; white-space:nowrap; }
.bar .title small { color:var(--dim); font-weight:400; margin-left:8px; }
.bar .sp { flex:1; }
.tabs { display:flex; gap:2px; overflow-x:auto; scrollbar-width:none; }
.tabs button { background:none; border:0; padding:8px 12px; border-radius:8px; color:var(--dim); cursor:pointer; white-space:nowrap; }
.tabs button:hover { background:var(--hover); color:var(--text); }
.tabs button.on { background:var(--surface-3); color:var(--text); font-weight:500; }
.who { color:var(--dim); white-space:nowrap; }

main { max-width:1100px; margin:0 auto; padding:24px 20px 60px; }
h1 { font-size:20px; font-weight:600; margin:0 0 4px; }
h2 { font-size:15px; font-weight:600; margin:0 0 12px; }
.lead { color:var(--dim); margin:0 0 20px; }
.section { margin-bottom:28px; }

/* buttons and fields */
.btn { display:inline-flex; align-items:center; justify-content:center; gap:6px; height:36px; padding:0 14px; border-radius:8px; border:1px solid var(--line-strong); background:var(--surface-2); cursor:pointer; white-space:nowrap; text-decoration:none; color:var(--text); }
.btn:hover { background:var(--surface-3); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:500; }
.btn.primary:hover { filter:brightness(1.08); }
.btn.danger { color:var(--bad); }
.btn.small { height:30px; padding:0 10px; font-size:13px; }
.btn:disabled { opacity:.5; cursor:default; }
input[type=text], input[type=email], input[type=password], select {
  height:36px; padding:0 10px; border-radius:8px; border:1px solid var(--line-strong); background:var(--bg); min-width:0; }
input:focus, select:focus { border-color:var(--accent); outline:none; }
label.field { display:flex; flex-direction:column; gap:6px; color:var(--dim); font-size:13px; }
label.field input { color:var(--text); font-size:14px; }
.row { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; }
.row > * { flex:none; }
.row .grow { flex:1 1 220px; }

/* cards and tables */
.card { background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:16px; }
.grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:14px; }
table { width:100%; border-collapse:collapse; background:var(--surface); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
th, td { text-align:left; padding:10px 12px; border-bottom:1px solid var(--line); vertical-align:middle; }
th { font-size:12px; font-weight:500; color:var(--dim); background:var(--surface-2); white-space:nowrap; }
tr:last-child td { border-bottom:0; }
.tablewrap { overflow-x:auto; border-radius:12px; }
.empty { padding:28px; text-align:center; color:var(--dim); background:var(--surface); border:1px dashed var(--line-strong); border-radius:12px; }

/* status */
.pill { display:inline-flex; align-items:center; gap:6px; height:24px; padding:0 9px; border-radius:12px; font-size:12px; font-weight:500; background:var(--surface-3); color:var(--dim); white-space:nowrap; }
.pill::before { content:""; width:7px; height:7px; border-radius:50%; background:currentColor; }
.pill.ok { background:var(--ok-bg); color:var(--ok); }
.pill.warn { background:var(--warn-bg); color:var(--warn); }
.pill.bad { background:var(--bad-bg); color:var(--bad); }
.pill.plain::before { display:none; }

/* fleet card */
.ac { display:flex; flex-direction:column; gap:12px; }
.ac-top { display:flex; align-items:flex-start; gap:10px; }
.ac-name { font-size:16px; font-weight:600; }
.ac-sub { color:var(--dim); font-size:13px; }
.ac-stats { display:grid; grid-template-columns:repeat(3, 1fr); gap:8px; }
.ac-stats div { background:var(--surface-2); border-radius:8px; padding:8px 10px; }
.ac-stats small { display:block; color:var(--dim); font-size:11px; }
.ac-stats b { font-weight:500; font-variant-numeric:tabular-nums; }
.ac-actions { display:flex; gap:8px; flex-wrap:wrap; }

/* notices */
.note { padding:12px 14px; border-radius:10px; background:var(--info-bg); margin:12px 0; }
.note.bad { background:var(--bad-bg); color:var(--bad); }
.note.ok { background:var(--ok-bg); }
.copybox { display:flex; gap:8px; align-items:center; margin-top:8px; }
.copybox code { flex:1; min-width:0; overflow-x:auto; white-space:nowrap; padding:8px 10px; background:var(--bg); border:1px solid var(--line); border-radius:8px; font-family:var(--mono); font-size:13px; }

/* checkbox lists in projects */
.checks { display:flex; flex-wrap:wrap; gap:6px 14px; margin:6px 0 12px; }
.checks label { display:inline-flex; align-items:center; gap:6px; cursor:pointer; }

/* sign-in pages */
.center { min-height:100vh; display:grid; place-items:center; padding:20px; }
.auth-card { width:100%; max-width:380px; background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:28px; box-shadow:var(--shadow); display:flex; flex-direction:column; gap:14px; }
.auth-card h1 { margin:0; }
.auth-card .btn { width:100%; height:40px; }
.err { color:var(--bad); min-height:1.2em; font-size:13px; }

@media (max-width: 640px) {
  .bar { flex-wrap:wrap; height:auto; padding:10px 16px; gap:8px; }
  .tabs { order:3; width:100%; }
  main { padding:18px 16px 48px; }
  th, td { padding:8px; }
}
