/* Sigma Xi San Diego – Southern California beach theme.
   Navy and gold come from the chapter logo; ocean, sky, sand, coral and seafoam round out the palette. */
:root {
  --navy:#0b2466; --ocean:#1877c2; --sky:#35a7e6; --foam:#e7f4fb; --sand:#fbf6ea; --sand2:#f3e8d0; --dune:#e4d5b3;
  --gold:#b8862b; --sun:#f6b93b; --coral:#e8603c; --sea:#1f9a8a; --text:#16233b; --muted:#5f6f86; --line:#e7dcc4;
}
* { box-sizing:border-box; }
body { margin:0; font:15px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,Helvetica,Arial,sans-serif; color:var(--text); background:var(--sand); min-height:100vh; }
a { color:var(--ocean); text-decoration:none; } a:hover { text-decoration:underline; }
h1 { font:700 25px/1.2 Georgia,"Times New Roman",serif; color:var(--navy); margin:0; letter-spacing:.01em; }
h2 { font:700 16px/1.3 Georgia,"Times New Roman",serif; color:var(--navy); margin:0; }
h3 { font-size:12.5px; margin:16px 0 6px; color:var(--gold); text-transform:uppercase; letter-spacing:.07em; }
.muted { color:var(--muted); } .small { font-size:13px; } .right { text-align:right; } .nowrap { white-space:nowrap; }
.ic { display:inline-flex; vertical-align:-3px; } .ic svg { display:block; }

/* header: logo on white, wave band underneath */
header.top { background:#fff; position:sticky; top:0; z-index:5; box-shadow:0 2px 10px rgba(11,36,102,.08); }
.top .bar { display:flex; align-items:center; gap:16px; padding:8px 20px 6px; flex-wrap:wrap; }
.brand { display:flex; align-items:center; gap:12px; color:var(--navy); } .brand:hover { text-decoration:none; }
.brand img { height:74px; width:auto; display:block; }
.brand > span { font:700 15px/1.2 Georgia,serif; border-left:2px solid var(--gold); padding-left:12px; } .brand small { display:block; font:400 11.5px system-ui,sans-serif; color:var(--muted); margin-top:2px; }
nav { display:flex; gap:2px; flex-wrap:wrap; flex:1; }
nav a { display:inline-flex; align-items:center; gap:6px; color:var(--navy); padding:7px 10px; border-radius:999px; font-size:14px; font-weight:500; }
nav a .ic { color:var(--ocean); } nav a:hover { background:var(--foam); text-decoration:none; }
nav a.on { background:var(--navy); color:#fff; } nav a.on .ic { color:var(--sun); }
.who { font-size:13px; color:var(--muted); display:flex; gap:8px; align-items:center; }
.waves { height:16px; background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 16' preserveAspectRatio='none'%3E%3Cpath d='M0 16V7c20-7 40-7 60 0s40 7 60 0 40-7 60 0 40 7 60 0v9z' fill='%2335a7e6'/%3E%3Cpath d='M0 16v-5c20-6 40-6 60 0s40 6 60 0 40-6 60 0 40 6 60 0v5z' fill='%231877c2'/%3E%3Cpath d='M0 16v-2c20-4 40-4 60 0s40 4 60 0 40-4 60 0 40 4 60 0v2z' fill='%230b2466'/%3E%3C/svg%3E") repeat-x left bottom / 240px 16px; }
main { max-width:1280px; margin:0 auto; padding:22px 20px 10px; }
footer.foot { max-width:1280px; margin:0 auto; padding:14px 20px 26px; color:var(--muted); font-size:12.5px; text-align:center; } footer.foot .ic { color:var(--sky); }

button, .btn { font:inherit; font-size:14px; padding:6px 13px; border:1px solid var(--dune); background:#fff; border-radius:999px; cursor:pointer; color:var(--navy); font-weight:500; }
button:hover { background:var(--foam); border-color:var(--sky); }
button.primary { background:var(--navy); color:#fff; border-color:var(--navy); } button.primary:hover { background:var(--ocean); border-color:var(--ocean); }
button.danger { color:var(--coral); border-color:#f3b9a8; } button.danger:hover { background:#fdeee9; }
button.link { border:0; background:none; color:var(--ocean); padding:0; border-radius:4px; } button:disabled { opacity:.5; cursor:not-allowed; }
input, select, textarea { font:inherit; font-size:14px; padding:6px 9px; border:1px solid var(--dune); border-radius:8px; background:#fff; color:var(--text); max-width:100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, .kpi:focus-visible { outline:2px solid var(--sky); outline-offset:1px; }
textarea { width:100%; resize:vertical; } input[type=checkbox] { accent-color:var(--ocean); }

.pagehead { display:flex; align-items:center; gap:12px; margin-bottom:14px; flex-wrap:wrap; } .pagehead .grow { flex:1; }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; align-items:center; } .toolbar input[type=search] { min-width:240px; border-radius:999px; padding-left:14px; }
.card { background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px 16px; margin-bottom:14px; box-shadow:0 1px 2px rgba(120,95,40,.05); }
.card > .head { display:flex; align-items:center; gap:10px; margin-bottom:8px; } .card > .head h2 { flex:1; }
.card.empty { text-align:center; padding:26px; } .card.empty .ic { color:var(--sky); }
.note { background:#fff6da; border:1px solid #efd58a; border-left:4px solid var(--sun); border-radius:10px; padding:9px 12px; font-size:13.5px; margin-bottom:12px; }
.note.done { background:#e3f5f1; border-color:#a6dcd3; border-left-color:var(--sea); }
.error { color:var(--coral); font-size:14px; margin:8px 0; white-space:pre-wrap; font-weight:500; }

.tablewrap { overflow-x:auto; background:#fff; border:1px solid var(--line); border-radius:14px; } .card .tablewrap { border:0; border-radius:0; }
table { border-collapse:collapse; width:100%; font-size:14px; }
th { text-align:left; font-size:11.5px; text-transform:uppercase; letter-spacing:.06em; color:var(--navy); padding:9px 10px; border-bottom:2px solid var(--sand2); white-space:nowrap; background:var(--foam); }
th.sortable { cursor:pointer; } td { padding:8px 10px; border-bottom:1px solid #f1eadb; vertical-align:top; }
tr:last-child td { border-bottom:0; } tr.click { cursor:pointer; } tr.click:hover td { background:#f3fafe; }
.pager { display:flex; gap:10px; align-items:center; justify-content:flex-end; margin-top:10px; font-size:13px; color:var(--muted); }
.chip { display:inline-block; font-size:12px; padding:1px 9px; border-radius:999px; background:var(--foam); color:#0d4a80; margin:1px 3px 1px 0; white-space:nowrap; }
.chip.gold { background:#fbeec4; color:#6d4c00; } .chip.green { background:#d9f2ed; color:#0f6e62; } .chip.red { background:#fde3da; color:#a3381a; } .chip.gray { background:var(--sand2); color:#5c4f33; }

.kpis { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:10px; margin-bottom:14px; }
.kpi { position:relative; background:#fff; border:1px solid var(--line); border-radius:14px; padding:12px 14px 12px; cursor:pointer; overflow:hidden; border-bottom:3px solid var(--sky); transition:transform .12s; }
.kpi:nth-child(3n+2) { border-bottom-color:var(--sun); } .kpi:nth-child(3n) { border-bottom-color:var(--sea); }
.kpi:hover { transform:translateY(-2px); box-shadow:0 6px 14px rgba(11,36,102,.10); }
.kpi .ic { position:absolute; right:10px; top:10px; color:var(--ocean); background:var(--foam); border-radius:50%; padding:6px; }
.kpi b { display:block; font:700 28px/1.1 Georgia,serif; color:var(--navy); } .kpi > span:last-child { font-size:12.5px; color:var(--muted); }
.kpi.warn { border-bottom-color:var(--coral); } .kpi.warn b { color:var(--coral); } .kpi.warn .ic { color:var(--coral); background:#fde9e2; }
.grid2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(340px,1fr)); gap:14px; } .grid2 .card { margin:0; }
.cols { display:grid; grid-template-columns:minmax(0,3fr) minmax(0,2fr); gap:14px; align-items:start; } @media (max-width:900px){ .cols { grid-template-columns:1fr !important; } }
.bars div.row { display:grid; grid-template-columns:minmax(90px,38%) 1fr 34px; gap:8px; align-items:center; font-size:13px; padding:3px 0; }
.bars .track { background:var(--sand2); border-radius:999px; height:11px; } .bars .fill { background:linear-gradient(90deg,var(--ocean),var(--sky)); height:11px; border-radius:999px; min-width:3px; } .bars .v { text-align:right; font-variant-numeric:tabular-nums; font-weight:600; color:var(--navy); }
dl.fields { display:grid; grid-template-columns:minmax(120px,34%) 1fr; gap:4px 12px; margin:0; font-size:14px; } dl.fields dt { color:var(--muted); } dl.fields dd { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }

.overlay { position:fixed; inset:0; background:rgba(11,36,102,.45); display:flex; align-items:flex-start; justify-content:center; padding:4vh 12px; overflow:auto; z-index:20; }
.modal { background:#fff; border-radius:16px; width:640px; max-width:100%; box-shadow:0 20px 50px rgba(11,36,102,.35); border-top:5px solid var(--sky); } .modal.wide { width:1040px; }
.modal > .mhead { display:flex; align-items:center; padding:14px 18px; border-bottom:1px solid var(--line); } .modal > .mhead h2 { flex:1; font-size:18px; }
.modal > .mbody { padding:14px 18px; } .modal > .mfoot { display:flex; gap:8px; justify-content:flex-end; padding:12px 18px; border-top:1px solid var(--line); background:var(--sand); border-radius:0 0 16px 16px; flex-wrap:wrap; }
.form { display:grid; grid-template-columns:1fr 1fr; gap:10px 14px; } .form .full { grid-column:1/-1; } @media (max-width:560px){ .form { grid-template-columns:1fr; } }
.form .f { display:block; font-size:13px; color:#3d4a5f; } .form .f > span:first-child { display:block; margin-bottom:3px; } .form .f > input, .form .f > select, .form .f > span > input[type=text] { width:100%; }
.req::after { content:" *"; color:var(--coral); }
.checks { display:flex; flex-wrap:wrap; gap:4px 14px; border:1px solid var(--dune); border-radius:8px; padding:8px; max-height:180px; overflow:auto; background:#fffdf8; } .checks label { font-size:13px; white-space:nowrap; }
.picker { position:relative; } .picker input { width:100%; } .picker-list { position:absolute; left:0; right:0; background:#fff; border:1px solid var(--line); border-radius:8px; z-index:3; box-shadow:0 6px 16px rgba(11,36,102,.15); }
.picker-item { padding:6px 10px; cursor:pointer; font-size:14px; } .picker-item:hover { background:var(--foam); } .picker-item small { color:var(--muted); }

/* sign-in: sky, sun, surf and sand */
.loginpage { min-height:100vh; position:relative; overflow:hidden; padding:1px 14px 150px;
  background:linear-gradient(180deg,#bfe6fb 0%,#e3f4fd 38%,#fdf3d9 68%,var(--sand2) 100%); }
.loginpage::after { content:""; position:absolute; left:0; right:0; bottom:0; height:120px; background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 120' preserveAspectRatio='none'%3E%3Cpath d='M0 40c75-30 225 30 300 0s225 30 300 0V120H0z' fill='%2335a7e6' opacity='.85'/%3E%3Cpath d='M0 66c75 24 225-24 300 0s225-24 300 0V120H0z' fill='%231877c2'/%3E%3Cpath d='M0 94c75-16 225 16 300 0s225 16 300 0V120H0z' fill='%230b2466'/%3E%3C/svg%3E") repeat-x bottom / 600px 120px; }
.loginpage .sun { position:absolute; right:9%; top:7%; width:120px; height:120px; border-radius:50%; background:radial-gradient(circle,#ffd86b 0%,var(--sun) 60%,rgba(246,185,59,0) 72%); opacity:.9; }
.login { max-width:430px; margin:7vh auto 0; position:relative; z-index:1; }
.login .card { padding:26px 28px; border:0; border-radius:20px; box-shadow:0 18px 40px rgba(11,36,102,.18); text-align:center; }
.login .biglogo { width:100%; max-width:340px; height:auto; } .login h1 { margin:6px 0 2px; }
.login form { text-align:left; } .login label { display:block; margin-top:12px; font-size:13px; } .login input { width:100%; margin-top:3px; padding:10px; } .login button { width:100%; margin-top:16px; padding:11px; font-size:15px; }
.login p .ic { color:var(--sea); }
.toast { position:fixed; bottom:18px; left:50%; transform:translateX(-50%); background:var(--navy); color:#fff; padding:9px 18px; border-radius:999px; z-index:40; font-size:14px; border-bottom:2px solid var(--sun); }
.replist button { display:block; width:100%; text-align:left; border:0; padding:6px 10px; border-radius:8px; font-weight:400; } .replist button.on { background:var(--navy); color:#fff; }
#print-area { display:none; }
@media print {
  body.printing > *:not(#print-area) { display:none !important; }
  body.printing #print-area { display:block; } body.printing { background:#fff; }
  #print-area table { font-size:11px; } #print-area th { background:#fff; }
}
