/* Ridgeline refined look: used by sign-in, account and setup pages. */
:root {
  --ground: #F3F4F6;
  --surface: #FFFFFF;
  --line: #E2E5EA;
  --line-strong: #D3D8DE;
  --ink: #17212B;
  --ink-2: #3B4450;
  --muted: #5B6672;
  --accent: #1D6B57;
  --accent-ink: #14503F;
  --accent-soft: #E7F1EE;
  --warn-bg: #FFF6E8;
  --warn-line: #F1D3A6;
  --warn-ink: #5A3104;
  --danger: #B42318;
  --danger-bg: #FEF3F2;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
.mono { font-family: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace; }

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  min-height: 60px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { display: block; font-size: 15px; font-weight: 600; line-height: 1.1; }
.brand small { display: block; font-size: 12px; color: var(--muted); }
.topnav { display: flex; flex-wrap: wrap; gap: 4px; font-size: 14px; }
.topnav a { padding: 8px 12px; border-radius: 6px; color: var(--ink-2); text-decoration: none; }
.topnav a:hover { background: var(--ground); }
.topbar .right { margin-left: auto; }

.page { max-width: 1040px; margin: 0 auto; padding: 28px 16px 64px; display: flex; flex-direction: column; gap: 20px; }
h1 { font-size: 24px; font-weight: 600; margin: 0; }
h2 { font-size: 17px; font-weight: 600; margin: 0; }
.sub { color: var(--muted); margin: 4px 0 0; font-size: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  display: flex; flex-direction: column; gap: 14px;
}
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
input[type=text], input[type=password], input[type=email], select, textarea {
  font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 11px;
  min-height: 42px;
  width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.btn {
  font: inherit; font-size: 14px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 0 16px;
  border-radius: 6px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--ground); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.small { min-height: 34px; padding: 0 10px; font-size: 13px; font-weight: 500; }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .6; cursor: default; }

.notice { border-radius: 8px; padding: 12px 14px; font-size: 14px; border: 1px solid var(--line); background: var(--ground); }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-ink); }
.notice.error { background: var(--danger-bg); border-color: #F4C7C3; color: var(--danger); }
.notice.ok { background: var(--accent-soft); border-color: #CFE3DC; color: var(--accent-ink); }
.hidden { display: none !important; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: 12px; font-weight: 600; color: var(--muted); background: #FAFBFC; text-transform: none; }
tr:last-child td { border-bottom: 0; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 2px 9px; background: var(--ground); color: var(--ink-2); }
.pill.admin { background: #E9ECFB; color: #2E3A8C; }
.pill.office { background: var(--accent-soft); color: var(--accent-ink); }
.pill.crew { background: #FDF1E3; color: #8A4B06; }
.pill.off { background: #F1F2F4; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 6px; }

.temp-pass { font-size: 20px; letter-spacing: 1px; font-weight: 600; }

.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; }
