/* Pacific Scuba Repair — staff admin (/admin and /admin/*). The public pages use site.css. */
*, *::before, *::after { box-sizing:border-box; margin:0; padding:0; }
[hidden] { display:none !important; }
:root {
  --bg:#FFFFFF; --surface:#F7F9FB; --surface-2:#FBFCFD; --border:#E3E8EE;
  --text:#14202E; --text-muted:#5B6875; --accent:#0C6FA8; --cyan:#0C6FA8; --cyan-dim:rgba(12,111,168,.07);
  --navy:#031464; --on-navy:rgba(255,255,255,.82);
  --yes:#0C6FA8; --no:#C4364A; --no-dim:#FBEBEE;
}
body { font-family:'Inter',sans-serif; background:var(--bg); color:var(--text); font-size:15px; line-height:1.55; -webkit-font-smoothing:antialiased; }
nav { position:sticky; top:0; z-index:50; background:var(--navy);
  padding:0 1.5rem; min-height:60px; display:flex; align-items:center; justify-content:space-between; gap:1rem; }
.nav-logo { display:flex; align-items:center; gap:.7rem; font-size:1.05rem; font-weight:700; color:#fff; text-decoration:none; letter-spacing:-.01em; white-space:nowrap; }
.nav-logo img { height:34px; width:auto; display:block; flex-shrink:0; object-fit:contain; }
.nav-logo-text span { color:#8FB8E8; }
.nav-right { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:.35rem 1rem; align-items:center; padding:.5rem 0; }
.nav-right a, .nav-right button { font-size:.8rem; font-weight:500; color:var(--on-navy); background:none; border:none; cursor:pointer; text-decoration:none; font-family:inherit; }
.nav-right a:hover, .nav-right button:hover { color:#fff; }
.nav-right a[aria-current="page"] { color:#fff; text-decoration:underline; text-decoration-color:#8FB8E8;
  text-decoration-thickness:2px; text-underline-offset:6px; }
.nav-right .who { font-size:.8rem; color:rgba(255,255,255,.55); padding-left:1rem; border-left:1px solid rgba(255,255,255,.2); }
.wrap { max-width:1080px; margin:0 auto; padding:1.75rem 1.25rem 5rem; }
.loading { color:var(--text-muted); text-align:center; padding:4rem 1rem; }
.muted { color:var(--text-muted); font-size:.8rem; }

/* notices */
.notice, .error { border-radius:6px; padding:.65rem .85rem; font-size:.85rem; margin-bottom:1rem; }
.notice { background:var(--cyan-dim); border:1px solid #BCD5E6; color:#0A4F78; }
.error { background:var(--no-dim); border:1px solid #F0C2C9; color:#9E2A3B; }

/* buttons */
.btn { flex:1; text-align:center; border-radius:6px; font:inherit; font-weight:600; font-size:.85rem; padding:.8rem; cursor:pointer; text-decoration:none; }
.btn.solid { background:var(--accent); color:#fff; border:1px solid var(--accent); }
.btn.solid:hover { background:#0A5D8D; }
.btn.line { background:#fff; border:1px solid #C6D3DE; color:var(--text); }
.btn.line:hover { border-color:var(--accent); color:var(--accent); }
.btn.sm { flex:none; font-size:.78rem; padding:.4rem .75rem; }
.btn.danger { color:var(--no); border-color:#E8BCC3; }
.btn.danger:hover { color:var(--no); border-color:var(--no); }
.btn.solid.danger { background:var(--no); border-color:var(--no); color:#fff; }
.btn.solid.danger:hover { background:#A92E40; border-color:#A92E40; color:#fff; }
/* Deleting a request (planning/008-delete-requests): set apart below the everyday actions, and
   confirmed by typing the request number. */
.danger-zone { display:flex; justify-content:flex-end; margin-top:1.1rem; padding-top:.9rem; border-top:1px solid var(--border); }
.confirm-type { display:block; font-size:.85rem; margin-top:.9rem; }
.confirm-type input { display:block; width:100%; margin-top:.35rem; padding:.6rem .7rem; border:1px solid #D5DDE5;
  border-radius:6px; font:inherit; font-size:.95rem; text-transform:uppercase; letter-spacing:.02em; }
.confirm-type input:focus { outline:none; border-color:var(--no); }
.btn:disabled { opacity:.6; cursor:default; }

/* form fields */
.field { margin-bottom:.9rem; }
.field label { display:block; font-size:.8rem; color:var(--text-muted); margin-bottom:.35rem; }
.field input, .field select { width:100%; background:#fff; border:1px solid #D5DDE5; border-radius:6px; color:var(--text); font:inherit; padding:.65rem .8rem; transition:border-color .15s, box-shadow .15s; }
.field input:focus, .field select:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--cyan-dim); }
.field input[readonly] { background:var(--surface); color:var(--text-muted); }
.msg { font-size:.82rem; margin-top:.4rem; min-height:1.1em; }
.msg.ok { color:var(--yes); } .msg.bad { color:var(--no); }

/* sign in, set password */
.auth { max-width:340px; margin:7vh auto 0; }
.auth .lock { width:60px; height:60px; border-radius:50%; background:var(--cyan-dim); border:1px solid #BCD5E6;
  display:flex; align-items:center; justify-content:center; margin:0 auto 1.25rem; color:var(--accent); }
.auth h1 { font-size:1.25rem; font-weight:700; letter-spacing:-.02em; margin-bottom:.3rem; text-align:center; }
.auth-sub { color:var(--text-muted); font-size:.85rem; margin-bottom:1.4rem; text-align:center; }
.auth form .btn { width:100%; margin-top:.3rem; }
.auth-help { color:var(--text-muted); font-size:.8rem; text-align:center; margin-top:1.25rem; }
.auth-help a { color:var(--accent); }

/* submissions dashboard */
.setting { display:flex; align-items:center; flex-wrap:wrap; gap:.6rem .9rem; background:var(--surface); border:1px solid var(--border);
  border-radius:6px; padding:.85rem 1rem; margin-bottom:1.75rem; }
.setting label { font-size:.85rem; font-weight:600; }
.setting-field { display:flex; gap:.6rem; } /* input + Save wrap as one */
.setting input { width:11rem; background:#fff; border:1px solid #D5DDE5; border-radius:6px; color:var(--text); font:inherit;
  padding:.55rem .75rem; transition:border-color .15s, box-shadow .15s; }
.setting input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--cyan-dim); }
.setting .btn { flex:none; padding:.6rem 1.2rem; }
.setting .msg { margin-top:0; }
.dash-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; margin-bottom:1.25rem; }
.dash-head h1 { font-size:1.4rem; font-weight:700; letter-spacing:-.02em; }
.dash-head .count { color:var(--text-muted); font-size:.85rem; font-weight:400; }
.search { width:100%; max-width:340px; background:#fff; border:1px solid #D5DDE5; border-radius:6px;
  color:var(--text); font:inherit; padding:.65rem .85rem; transition:border-color .15s, box-shadow .15s; }
.search:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--cyan-dim); }

.table-scroll { overflow-x:auto; border:1px solid var(--border); border-radius:6px; background:#fff; }
table { width:100%; border-collapse:collapse; font-size:.85rem; min-width:680px; }
thead th { background:var(--surface); color:var(--text-muted); text-align:left; font-size:.68rem; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase; padding:.8rem 1rem; border-bottom:1px solid var(--border); }
tbody td { padding:.8rem 1rem; border-bottom:1px solid var(--border); vertical-align:middle; }
tbody tr:last-child td { border-bottom:none; }
.rows-link tr { cursor:pointer; transition:background .12s; }
.rows-link tr:hover { background:var(--surface); }
.chip { display:inline-block; background:var(--cyan-dim); color:var(--accent); border-radius:999px;
  padding:1px 9px; font-size:.72rem; font-weight:500; margin:1px 3px 1px 0; }
.tag-svc { display:inline-block; background:var(--surface); border:1px solid var(--border); color:var(--text); border-radius:4px; padding:2px 9px; font-size:.74rem; font-weight:500; }
.pill-yes { color:var(--yes); font-weight:600; }
.pill-no { color:var(--no); font-weight:600; }
.sig-thumb { height:26px; width:80px; background:#fff; border:1px solid var(--border); border-radius:3px; object-fit:contain; display:block; }
.empty { text-align:center; color:var(--text-muted); padding:3rem 1rem; }

/* equipment received: the tick, the filters, the detail block (planning/001-equipment-received) */
.filters { display:flex; flex-wrap:wrap; gap:.5rem; margin:-.4rem 0 1rem; }
.filters button { font:inherit; font-size:.8rem; font-weight:600; color:var(--text); background:#fff; border:1px solid #C6D3DE;
  border-radius:999px; padding:.3rem .85rem; cursor:pointer; }
.filters button span { font-weight:500; color:var(--text-muted); margin-left:.4rem; }
.filters button[aria-pressed="true"] { background:var(--accent); border-color:var(--accent); color:#fff; }
.filters button[aria-pressed="true"] span { color:rgba(255,255,255,.75); }
.tick { display:inline-flex; align-items:center; justify-content:center; flex:none; width:20px; height:20px; padding:0;
  margin-right:.5rem; vertical-align:-5px; background:#fff; border:1.5px solid #9FB1C2; border-radius:4px; }
button.tick { cursor:pointer; }
button.tick:hover, button.tick:focus-visible { border-color:var(--accent); box-shadow:0 0 0 3px var(--cyan-dim); outline:none; }
.tick.on { background:var(--accent); border-color:var(--accent); }
.tick svg { width:13px; height:13px; fill:none; stroke:#fff; stroke-width:3.4; stroke-linecap:round; stroke-linejoin:round; }
td.received { white-space:nowrap; }
.email-failed { color:var(--no); font-size:.72rem; font-weight:600; margin:.15rem 0 0 1.75rem; }
.equip { background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:.75rem .9rem; margin-bottom:.4rem; }
.equip .dsec { margin:0 0 .45rem; }
.equip-line { display:flex; align-items:center; font-size:.9rem; font-weight:600; }
.equip-sub { font-size:.82rem; color:var(--text-muted); margin-left:1.75rem; }
.equip-sub .bad { color:var(--no); }
.equip-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem 1.1rem; margin:.55rem 0 0 1.75rem; }
.link-btn { background:none; border:none; padding:0; font:inherit; font-size:.82rem; font-weight:600; color:var(--accent); cursor:pointer; }
.link-btn:hover { text-decoration:underline; }
.confirm-body p { font-size:.9rem; margin-bottom:.55rem; }
.confirm-body .muted { font-size:.82rem; }
.confirm-body + .msg:empty { display:none; }

/* modals */
.modal { display:none; position:fixed; inset:0; z-index:100; background:rgba(20,32,46,.35); backdrop-filter:blur(2px);
  align-items:flex-start; justify-content:center; padding:4vh 1rem; overflow-y:auto; }
.modal.show { display:flex; }
.sheet { background:#fff; border:1px solid var(--border); border-radius:8px; box-shadow:0 8px 32px rgba(20,32,46,.12); width:100%; max-width:520px; padding:1.5rem; }
.sheet.narrow { max-width:380px; }
.sheet-head { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:1rem; }
.sheet-head h2 { font-size:1.15rem; font-weight:700; letter-spacing:-.01em; }
.sheet-head .rid { font-family:monospace; color:var(--accent); font-size:.78rem; }
.sheet-close { background:none; border:none; color:var(--text-muted); font-size:1.6rem; cursor:pointer; line-height:1; }
.drow { display:flex; justify-content:space-between; gap:1rem; padding:.5rem 0; border-bottom:1px solid var(--border); font-size:.88rem; }
.drow .k { color:var(--text-muted); }
.drow .v { text-align:right; font-weight:500; }
.dsec { font-size:.68rem; font-weight:600; letter-spacing:.12em; text-transform:uppercase; color:var(--text-muted); margin:1.1rem 0 .3rem; }
.sig-box { background:#fff; border:1px solid var(--border); border-radius:6px; padding:.6rem; margin-top:.4rem; }
.sig-box img { display:block; width:100%; max-height:120px; object-fit:contain; }
.sheet-actions { display:flex; gap:.7rem; margin-top:1.3rem; }

/* users */
.page-head { margin-bottom:1.5rem; }
.page-head h1 { font-size:1.4rem; font-weight:700; letter-spacing:-.02em; }
.page-head p { color:var(--text-muted); font-size:.88rem; margin-top:.2rem; }
.card { background:var(--surface); border:1px solid var(--border); border-radius:6px; padding:1.25rem; margin-bottom:1.75rem; }
.card h2 { font-size:1rem; font-weight:700; margin-bottom:.35rem; }
.card > p { color:var(--text-muted); font-size:.85rem; margin-bottom:1rem; max-width:620px; }
.add-form { max-width:520px; }
.two-col { display:grid; grid-template-columns:1fr 1fr; gap:0 .9rem; }
.choices { border:1px solid #D5DDE5; border-radius:6px; background:#fff; padding:.6rem .9rem .8rem; margin-bottom:.9rem; }
.choices legend { font-size:.8rem; color:var(--text-muted); padding:0 .3rem; }
.choice { display:flex; gap:.6rem; align-items:flex-start; padding:.35rem 0; cursor:pointer; font-size:.88rem; }
.choice input { margin-top:.3rem; accent-color:var(--accent); }
.choice span span { display:block; }
.with-button { display:flex; gap:.5rem; }
.with-button input { flex:1; }
.add-form > .btn { flex:none; padding:.7rem 1.4rem; }
.status { display:inline-block; border-radius:999px; padding:1px 10px; font-size:.74rem; font-weight:600; }
.status.active { background:var(--cyan-dim); color:var(--accent); }
.status.invited { background:#fff; border:1px solid var(--border); color:var(--text-muted); }
.status.disabled { background:var(--no-dim); color:var(--no); }
.initials { display:inline-block; margin-left:.45rem; padding:0 .35rem; border-radius:4px; background:var(--cyan-dim);
  color:var(--accent); font-size:.68rem; font-weight:700; letter-spacing:.04em; vertical-align:1px; }
.role-edit { display:flex; gap:.4rem; align-items:center; }
.role-edit select { background:#fff; border:1px solid #D5DDE5; border-radius:6px; font:inherit; font-size:.82rem; padding:.35rem .5rem; }
.row-actions { display:flex; gap:.4rem; flex-wrap:wrap; }
tr.link-row td { background:var(--surface-2); }
.copy-link { display:flex; gap:.5rem; margin-top:.35rem; max-width:640px; }
.copy-link input { flex:1; min-width:0; font-family:ui-monospace, Menlo, Consolas, monospace; font-size:.78rem; padding:.45rem .6rem;
  border:1px solid #D5DDE5; border-radius:6px; background:#fff; color:var(--text); }

/* Signed-in pages: the account controls need the room more than the wordmark does. */
@media (max-width: 900px) {
  nav:has(.nav-right) .nav-logo-text { display:none; }
}
@media (max-width: 640px) {
  nav { padding:0 1rem; }
  .nav-right .who { display:none; }
  .two-col { grid-template-columns:1fr; }
}
