/* Grid look (THE GRID field app components) on Clarksons Brand Guidelines 2026:
   Clarksons Red #EB1946 at full strength only, Arial headings, Calibri body. */
:root {
  --bg:#f2f4f7; --card:#fff; --ink:#16212e; --muted:#67768a; --line:#e3e8ef;
  --blue:#1d6fd8; --green:#1d9e58; --amber:#d98908; --red:#cc3b3b; --navy:#16212e;
  --primary:#EB1946; --flag:#FFE3E9; --border:#cdd4de; --surface:#f5f7fa;
  --header-h:60px;
}
* { box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
html, body { margin:0; padding:0; background:var(--bg); color:var(--ink);
  font-family:Calibri,Carlito,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; font-size:16px; }
header, h1, h2, h3, .brand, .sect-hd, .btn, .chip, .seg button, table.list th, label.lbl { font-family:Arial,Helvetica,sans-serif; }
button { font-family:inherit; cursor:pointer; }

header { position:sticky; position:-webkit-sticky; top:0; z-index:30; background:var(--navy); color:#fff;
  padding:10px 16px; min-height:var(--header-h); display:flex; align-items:center; gap:12px; }
header .brand { font-weight:800; letter-spacing:1.5px; font-size:16px; }
header .brand small { display:block; font-weight:500; letter-spacing:.3px; font-size:10px; color:#9fb0c4; }
header .logo { width:132px; height:auto; display:block; flex-shrink:0; }
header .divider { width:1px; align-self:stretch; background:#3a4757; margin:4px 2px; }
header::after { content:""; position:absolute; left:0; right:0; bottom:0; height:3px; background:var(--primary); }
header .spacer { flex:1; }
header a { color:#cfd8e3; text-decoration:none; font-size:14px; font-weight:600; }

main { max-width:900px; margin:0 auto; padding:16px; }
main.wide { max-width:1300px; }

.card { background:var(--card); border:1px solid var(--line); border-radius:14px;
  padding:14px 16px; margin-bottom:12px; }
.card h3 { margin:0 0 10px; font-size:12px; text-transform:uppercase; letter-spacing:.7px; color:var(--muted); }
.muted { color:var(--muted); } .small { font-size:13px; }
.row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media (max-width:640px) { .grid2 { grid-template-columns:1fr; } }

label.lbl { display:block; font-size:13px; font-weight:650; color:var(--muted); margin:0 0 6px; }
input, textarea, select { width:100%; border:1.5px solid var(--line); border-radius:10px;
  padding:12px; font-size:16px; font-family:inherit; background:#fff; color:var(--ink); }
input:focus, textarea:focus, select:focus { outline:none; border-color:var(--blue); }

/* Dropdowns - no system look. Closed state is CSS; the open list is .dd-pop (static/select.js). */
select { -webkit-appearance:none; appearance:none; padding-right:44px; cursor:pointer;
  text-overflow:ellipsis; white-space:nowrap; overflow:hidden;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2367768a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center; }
.dd { position:relative; }
.dd-btn { width:100%; display:flex; align-items:center; gap:8px; text-align:left; border:1.5px solid var(--line);
  border-radius:10px; padding:12px 16px 12px 12px; font-size:16px; background:#fff; color:var(--ink);
  font-family:inherit; transition:border-color .15s, box-shadow .15s; }
.dd-btn:hover { border-color:var(--border); }
.dd-btn:focus-visible, .dd.open .dd-btn { outline:none; border-color:var(--blue); box-shadow:0 0 0 3px rgba(29,111,216,.15); }
.dd-btn .dd-val { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.dd-btn .dd-val.ph { color:var(--muted); }
.dd-btn svg { flex-shrink:0; color:var(--muted); transition:transform .15s; }
.dd.open .dd-btn svg { transform:rotate(180deg); color:var(--blue); }
.dd-pop { position:absolute; left:0; top:calc(100% + 6px); min-width:100%; z-index:2147483000; background:#fff;
  border:1px solid var(--line); border-radius:12px; padding:6px; max-height:320px; overflow:auto;
  box-shadow:0 12px 32px rgba(22,33,46,.16), 0 2px 6px rgba(22,33,46,.06); display:none; }
.dd.open .dd-pop { display:block; animation:ddIn .12s ease-out; }
.dd.up .dd-pop { top:auto; bottom:calc(100% + 6px); }
@keyframes ddIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }
.dd-opt { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:8px; font-size:15px;
  cursor:pointer; white-space:nowrap; color:var(--ink); }
.dd-opt.hl { background:var(--surface); }
.dd-opt.sel { font-weight:700; color:var(--blue); }
.dd-opt .tick { width:14px; flex-shrink:0; visibility:hidden; }
.dd-opt.sel .tick { visibility:visible; }
textarea { min-height:60px; resize:vertical; }
.field-error { border-color:var(--primary) !important; background:var(--flag) !important; }

.chip { display:inline-flex; align-items:center; gap:4px; height:24px; padding:0 10px; border-radius:20px;
  font-size:12px; font-weight:650; color:#fff; white-space:nowrap; line-height:1; background:#7a8798; }
.chip.blue { background:var(--blue); } .chip.green { background:var(--green); }
.chip.amber { background:var(--amber); } .chip.red { background:var(--red); } .chip.navy { background:var(--navy); }
.chip.ghost { background:var(--surface); color:var(--muted); border:1px solid var(--line); }

.btn { display:flex; align-items:center; justify-content:center; gap:8px; width:100%;
  border:none; border-radius:14px; padding:17px; font-size:17px; font-weight:700;
  color:#fff; background:var(--blue); text-decoration:none; }
.btn:active { filter:brightness(.88); }
.btn.green { background:var(--green); } .btn.amber { background:var(--amber); }
.btn.red { background:var(--red); } .btn.gray { background:#7a8798; }
.btn.outline { background:#fff; color:var(--ink); border:1.5px solid var(--line); font-weight:600; }
.btn.sm { padding:10px 14px; font-size:15px; border-radius:11px; width:auto; }
.btn[disabled] { opacity:.4; pointer-events:none; }

.seg { display:flex; border:1.5px solid var(--line); border-radius:12px; overflow:hidden; background:#fff; }
.seg button { flex:1; border:none; background:#fff; padding:12px 6px; font-size:15px; font-weight:650; color:var(--ink); }
.seg button + button { border-left:1.5px solid var(--line); }
.seg button.on { background:var(--navy); color:#fff; }

.stepper { display:flex; align-items:center; border:1.5px solid var(--line); border-radius:10px; overflow:hidden; background:#fff; }
.stepper button { width:44px; padding:10px 0; font-size:22px; border:none; background:#f3f6fa; color:var(--ink); }
.stepper input { border:none; text-align:center; font-weight:700; border-radius:0; padding:10px 0; min-width:0; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance:none; margin:0; }
.stepper input { -moz-appearance:textfield; }

.sect-hd { margin:22px 2px 8px; font-size:12px; text-transform:uppercase; letter-spacing:.7px;
  color:var(--muted); font-weight:700; }
.error { background:#fde8e8; color:#a02020; border-radius:10px; padding:10px 12px; margin:10px 0; font-size:14px; }
.okmsg { background:#e3f5ea; color:#13683a; border-radius:10px; padding:10px 12px; margin:10px 0; font-size:14px; }
.toast { position:fixed; bottom:24px; left:50%; transform:translateX(-50%); background:var(--navy); color:#fff;
  padding:12px 18px; border-radius:12px; font-size:15px; font-weight:600; z-index:50; display:none; }

table.list { width:100%; border-collapse:collapse; font-size:13px; }
table.list th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.5px; color:var(--muted);
  padding:8px; border-bottom:1.5px solid var(--line); background:var(--surface); position:sticky; top:var(--header-h); }
table.list td { padding:8px; border-bottom:1px solid var(--line); vertical-align:top; }
table.list tr:hover td { background:#f8fafc; }

/* One control height per page (Grid rule: every button / typed box / dropdown the same).
   iPad form 48px for touch; PC pages (body.desk) 34px as on the Grid desktop pages. */
:root { --ctl-h:48px; --ctl-fs:16px; --ctl-r:10px; }
body.desk { --ctl-h:34px; --ctl-fs:14px; --ctl-r:8px; }
input:not([type=checkbox]):not([type=radio]), select, .dd-btn, .btn, .btn.sm {
  height:var(--ctl-h); min-height:var(--ctl-h); padding-top:0; padding-bottom:0; font-size:var(--ctl-fs);
  border-radius:var(--ctl-r); line-height:1; }
input:not([type=checkbox]):not([type=radio]), .dd-btn { padding-left:12px; }
.btn, .btn.sm { padding-left:16px; padding-right:16px; white-space:nowrap; }
.seg, .stepper { height:var(--ctl-h); border-radius:var(--ctl-r); }
.seg button { height:100%; padding:0 6px; font-size:var(--ctl-fs); }
.stepper button { height:100%; padding:0; width:var(--ctl-h); }
.stepper input { height:100% !important; min-height:0 !important; border-radius:0; padding:0 !important; }
body.desk select { padding-right:36px; background-position:right 12px center; }
body.desk .dd-btn { padding-right:12px; }
body.desk .dd-opt { padding:8px 10px; font-size:14px; }
table.list th:first-child, table.list td:first-child { padding-left:16px; }
table.list th:last-child, table.list td:last-child { padding-right:16px; }

/* Login + who's logged in */
.login-wrap { display:flex; justify-content:center; padding:24px 0; }
.card.login { width:min(420px, 100%); padding:22px; }
.card.login h2 { font-family:Arial,Helvetica,sans-serif; font-size:20px; margin:0 0 4px; }
.card.login .lbl { margin-top:14px; }
.card.login .btn { margin-top:18px; }
header .who { display:flex; align-items:center; gap:10px; font-size:14px; color:#cfd8e3; margin-left:12px; }
header .who .btn.outline { background:transparent; color:#fff; border-color:#3a4757; }

/* VTR-style report card sheet (modal) */
.backdrop { position:fixed; inset:0; background:rgba(22,33,46,.45); z-index:60; display:none; overflow:auto; padding:32px 16px; }
.backdrop.show { display:block; }
.sheet { background:#fff; border-radius:14px; width:min(1100px, 100%); margin:0 auto; padding:18px 20px 22px; box-shadow:0 16px 40px rgba(26,26,26,.18); }
.sheet h2 { font-family:Arial,Helvetica,sans-serif; font-size:19px; margin:0; }
.sheet h3 { font-family:Arial,Helvetica,sans-serif; font-weight:700; font-size:12px; letter-spacing:.06em; text-transform:uppercase;
  color:#fff; background:#1A1A1A; padding:7px 10px; margin:16px 0 8px; border-radius:6px; }
.kv { display:grid; grid-template-columns:repeat(auto-fill, minmax(200px, 1fr)); gap:8px 14px; font-size:14px; }
.kv > div > span { display:block; font-family:Arial,Helvetica,sans-serif; font-weight:700; font-size:10px; letter-spacing:.08em;
  text-transform:uppercase; color:var(--muted); margin-bottom:2px; }
.qline { border:1px solid var(--line); border-radius:10px; padding:10px 12px; margin-bottom:8px; }
.qline .t { display:flex; gap:10px; align-items:flex-start; justify-content:space-between; font-weight:600; font-size:14px; margin-bottom:8px; }
.qline .tags { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; flex-shrink:0; }
.qline .counts7 { display:grid; grid-template-columns:repeat(7, 1fr); gap:6px; }
.qline .counts7 > div { background:var(--surface); border-radius:8px; padding:6px 8px; }
.qline .counts7 b { display:block; font-size:16px; }
.qline .counts7 span { font-family:Arial,Helvetica,sans-serif; font-size:10px; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); }
.qline.flagged { background:#FFE3E9; border-color:#f5c2cf; }
.qline.flagged .counts7 > div { background:#fff; }
.flag { background:#FFE3E9; border-left:4px solid var(--primary); border-radius:8px; padding:10px 12px; margin:10px 0; font-size:14px; }
@media (max-width:700px) { .qline .counts7 { grid-template-columns:repeat(4, 1fr); } }
td .btn, td .btn.sm { display:inline-flex; margin:2px 4px 2px 0; }
