/* Walcott Crew Booking */
:root { --navy:#1F2A44; --blue:#2F80C0; --orange:#F28C28; --green:#3BA55D; --line:#cdd5e2; --bg:#f4f6fa; --text:#222; --muted:#667; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin:0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Carlito, Calibri, Arial, sans-serif; color:var(--text); background:var(--bg); font-size:15px; line-height:1.4; }
a { color:var(--blue); }
h1,h2,h3 { color:var(--navy); margin:0; }
[hidden] { display:none !important; }

/* buttons & fields */
.btn { display:inline-block; border:1px solid #9aa7bf; background:#fff; color:var(--navy); border-radius:6px; padding:7px 14px; font:inherit; font-weight:600; cursor:pointer; text-decoration:none; line-height:1.2; }
.btn:hover { background:#f0f4fa; }
.btn.pri { background:var(--orange); border-color:var(--orange); color:#fff; }
.btn.pri:hover { background:#e07f1c; }
.btn.danger { color:#9b2c26; border-color:#d98d88; }
.btn.sm { padding:4px 9px; font-size:13px; }
.btn.block { display:block; width:100%; padding:11px; margin-top:6px; font-size:16px; }
.btn.dis, .btn:disabled { background:#e5e8ee; color:#99a1b2; border-color:#d0d5df; cursor:not-allowed; }
label { display:block; font-size:13px; font-weight:600; color:#445; margin:10px 0 0; }
label small { font-weight:400; color:var(--muted); }
input, select, textarea { width:100%; font:inherit; color:var(--text); border:1px solid #aab5cb; border-radius:6px; padding:8px 10px; background:#fff; margin-top:3px; }
input:focus, select:focus { outline:2px solid #cfe3f5; border-color:var(--blue); }
input[disabled] { background:#eef1f6; color:#778; }
label.check { display:flex; gap:8px; align-items:center; font-weight:400; font-size:14px; }
label.check input { width:auto; margin:0; }
.grid2 { display:grid; grid-template-columns:1fr 1fr; gap:0 12px; }
.fl { font-size:11px; color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.3px; margin:10px 0 3px; }
.hint { color:var(--muted); font-size:13px; margin:6px 0; }
.center { text-align:center; }
.warn { color:#9b2c26; font-weight:600; }

.flash { padding:9px 12px; border-radius:6px; margin:10px 0; font-size:14px; border:1px solid; }
.flash.ok { background:#eaf6ee; border-color:#b8dcc2; color:#1F6B3A; }
.flash.error { background:#fdeceb; border-color:#efb7b3; color:#8a2a24; }
.flash.warn { background:#fff6e5; border-color:#f0d49a; color:#7a5200; }
.flash ul { margin:6px 0 0 18px; padding:0; }

/* auth pages */
.auth { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:20px; background:linear-gradient(#e9edf4,#dfe5ef); }
.authcard { background:#fff; border-radius:12px; box-shadow:0 4px 18px rgba(20,30,60,.2); padding:26px 24px; width:100%; max-width:380px; }
.authcard.wide { max-width:680px; }
.authcard .logo { display:block; width:190px; max-width:70%; margin:0 auto 14px; }
.authcard h1 { font-size:22px; text-align:center; margin-bottom:4px; }
.authcard h2 { font-size:15px; margin:16px 0 2px; }
.authcard .hint { text-align:center; }

/* app bar */
.dots { display:inline-flex; gap:3px; margin-right:6px; vertical-align:middle; }
.dots i { width:11px; height:11px; border-radius:50%; display:inline-block; }
.appbar { background:var(--navy); color:#fff; display:flex; align-items:center; gap:20px; padding:0 16px; height:48px; position:sticky; top:0; z-index:20; }
.appbar .brand { font-weight:700; display:flex; align-items:center; white-space:nowrap; }
.appbar .brand b { letter-spacing:.5px; }
.appbar .sep { opacity:.5; margin:0 8px; font-weight:400; }
.appbar .tabs { display:flex; gap:4px; flex:1; }
.appbar .tabs a { color:#fff; opacity:.75; text-decoration:none; padding:14px 10px 11px; border-bottom:3px solid transparent; }
.appbar .tabs a.on { opacity:1; border-bottom-color:var(--orange); }
.umenu { position:relative; }
.umenu summary { list-style:none; cursor:pointer; color:#fff; font-size:14px; padding:6px 0; }
.umenu summary::-webkit-details-marker { display:none; }
.umenu summary small { opacity:.75; }
.umenu.light summary { color:#fff; }
.umenu-body { position:absolute; right:0; top:100%; background:#fff; border-radius:8px; box-shadow:0 4px 16px rgba(0,0,0,.25); min-width:170px; padding:6px; z-index:30; }
.umenu-body a, .umenu-body button { display:block; width:100%; text-align:left; padding:9px 10px; border:0; background:none; font:inherit; color:var(--navy); text-decoration:none; border-radius:6px; cursor:pointer; }
.umenu-body a:hover, .umenu-body button:hover { background:#eef2f8; }

/* PM pages */
.pmmain { padding:14px 16px 30px; }
.pmmain.narrow { max-width:980px; margin:0 auto; }
.toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; background:#fff; border:1px solid var(--line); border-radius:8px 8px 0 0; padding:9px 12px; }
.toolbar .navbtns { display:flex; gap:4px; }
.toolbar .range { font-weight:700; color:var(--navy); font-size:16px; min-width:200px; }
.toolbar .sel { display:flex; align-items:center; gap:6px; margin:0; font-weight:600; }
.toolbar .sel select { width:auto; margin:0; padding:6px 8px; }
.toolbar .search { width:200px; margin:0; padding:7px 10px; }
.toolbar .grow { flex:1; }
.legend { display:flex; flex-wrap:wrap; gap:6px 16px; padding:7px 12px; background:#fff; border:1px solid var(--line); border-top:0; font-size:12.5px; color:#445; }
.lg { display:inline-flex; align-items:center; gap:6px; }
.dot { width:12px; height:12px; border-radius:3px; display:inline-block; }
.dot.hatch { background:repeating-linear-gradient(45deg,#cfd5df 0 2px,#eef0f4 2px 5px); border:1px solid #aab3c4; }
.dot.sickdot { background:#F9D5D3; border:1px solid #d98d88; }
.dot.freedot { background:#fff; border:1px dashed #8fa0bd; }
.gridwrap { overflow:auto; background:#fff; border:1px solid var(--line); border-top:0; border-radius:0 0 8px 8px; max-height:calc(100vh - 210px); }
.foot { color:var(--muted); font-size:13px; margin:10px 2px; }
table.grid { border-collapse:collapse; table-layout:fixed; width:100%; min-width:1000px; }
table.grid th, table.grid td { border:1px solid var(--line); }
table.grid thead th { position:sticky; background:#eef2f8; z-index:3; font-size:12.5px; color:var(--navy); padding:5px 2px; }
table.grid thead tr:first-child th { top:0; background:#dfe6f1; }
table.grid thead tr:nth-child(2) th { top:27px; font-weight:600; }
table.grid th.nm { width:170px; text-align:left; padding:6px 10px; left:0; z-index:5; }
table.grid td.nm { position:sticky; left:0; background:#fff; z-index:2; padding:4px 10px; height:58px; }
table.grid td.nm b { display:block; color:var(--navy); font-size:14px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
table.grid td.nm span { font-size:11.5px; color:#778; }
table.grid .wk2 { border-left:3px solid #6c7b99; }
table.grid th.dh.today { background:#FFE9CC; }
table.grid th.dh.wkend { background:#e3e7ee; }
table.grid td.c { padding:3px; height:58px; }
table.grid td.c.today { background:#fffaf2; }
table.grid td.c.past .cell { opacity:.55; }
.empty { text-align:center; color:var(--muted); padding:30px !important; }
.loading { padding:40px; text-align:center; color:var(--muted); }
.cell { width:100%; height:100%; min-height:50px; border:0; border-radius:5px; padding:5px 7px; text-align:left; font:inherit; font-size:12px; line-height:1.2; display:flex; flex-direction:column; justify-content:center; cursor:pointer; }
.cell b { font-weight:700; font-size:12.5px; overflow:hidden; text-overflow:ellipsis; }
.cell i { font-style:normal; font-size:11px; opacity:.85; }
.cell.job { border-left:5px solid; }
.cell.job.mine { box-shadow:inset 0 0 0 1.5px rgba(31,42,68,.35); }
.cell.job.sickjob { outline:2px solid #d98d88; outline-offset:-2px; }
.cell.leave { background:repeating-linear-gradient(45deg,#cfd5df 0 3px,#eceff4 3px 7px); color:#4c566b; border:1px solid #aab3c4; }
.cell.sick { background:#F9D5D3; color:#9b2c26; border:1px solid #d98d88; }
.cell.free { border:1.5px dashed #b3bed2; background:#fff; align-items:center; color:var(--blue); }
.cell.free .plus { font-size:20px; opacity:0; }
.cell.free:hover { border-color:var(--blue); background:#EAF3FB; }
.cell.free:hover .plus { opacity:1; }
.cell:focus-visible { outline:3px solid var(--blue); }

/* people page */
.phbar { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.ph { font-size:24px; }
.sh2 { font-size:17px; margin:22px 0 8px; }
.tablewrap { overflow-x:auto; background:#fff; border:1px solid var(--line); border-radius:8px; }
table.list { border-collapse:collapse; width:100%; min-width:720px; }
table.list th, table.list td { border:1px solid var(--line); padding:8px 10px; text-align:left; font-size:14px; vertical-align:middle; }
table.list th { background:var(--navy); color:#fff; font-size:13px; }
table.list tr.inactive td { color:#99a; background:#f7f8fa; }
table.list td.acts { white-space:nowrap; }
table.list td.acts form { display:inline; }
.st { display:inline-block; border-radius:12px; padding:2px 9px; font-size:12px; font-weight:700; }
.st-ok { background:#DDF1E3; color:#1F7A3F; } .st-wait { background:#FDE9D3; color:#A8590B; } .st-bad { background:#F9D5D3; color:#9b2c26; } .st-off { background:#e3e6ee; color:#566; }
.panel { background:#fff; border:1px solid var(--line); border-radius:10px; padding:14px 16px; margin:12px 0; }
.panel .sh2 { margin-top:0; }

/* modals */
.overlay { position:fixed; inset:0; background:rgba(20,30,60,.5); display:flex; align-items:center; justify-content:center; padding:16px; z-index:100; overflow:auto; }
.modal { background:#fff; border-radius:12px; box-shadow:0 8px 30px rgba(20,30,60,.4); width:100%; max-width:440px; overflow:visible; }
.mh { background:var(--navy); color:#fff; padding:12px 16px; font-weight:700; font-size:16px; border-radius:12px 12px 0 0; }
.mh small { display:block; font-weight:400; font-size:12.5px; opacity:.8; margin-top:2px; }
.mb { padding:6px 16px 12px; }
.mf { display:flex; justify-content:flex-end; gap:8px; padding:11px 16px 14px; border-top:1px solid #e3e8f0; background:#f8f9fc; border-radius:0 0 12px 12px; }
.mb .fi, .fi { border:1px solid #aab5cb; border-radius:6px; padding:8px 10px; background:#fff; min-height:36px; }
.mb .plain { padding:2px 0; }
.pill { display:inline-block; padding:3px 11px; border-radius:14px; font-size:13px; font-weight:700; }
.pill.l { background:#d9dee8; color:#3c465b; }
.pill.sickp { background:#F9D5D3; color:#9b2c26; margin-left:6px; }
.combo { position:relative; }
.combo .fi { width:100%; }
.sug { position:absolute; left:0; right:0; top:100%; background:#fff; border:1px solid #c4ccdb; border-radius:6px; box-shadow:0 4px 12px rgba(0,0,0,.18); z-index:5; margin-top:2px; overflow:hidden; }
.sug div { padding:8px 10px; border-bottom:1px solid #e9edf3; cursor:pointer; }
.sug div:hover { background:#EAF3FB; color:#1B5E96; font-weight:600; }
.sug div.newjob { color:var(--muted); font-style:italic; }
.radio { display:flex; flex-direction:column; gap:6px; font-size:14px; }
.radio label { display:flex; align-items:center; gap:8px; font-weight:400; margin:0; flex-wrap:wrap; }
.radio input[type=radio] { width:auto; margin:0; }
.radio input[type=date] { width:auto; margin:0; padding:4px 8px; }
.skiplist { margin:6px 0 6px 18px; padding:0; }

/* worker (phone-first) pages */
body.worker { padding-bottom:70px; background:#fff; }
.whead { background:var(--navy); color:#fff; padding:calc(10px + env(safe-area-inset-top)) 18px 16px; }
.wtop { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.wbrand { font-weight:700; font-size:14px; display:flex; align-items:center; }
.whead h1 { color:#fff; font-size:24px; }
.whead p { margin:2px 0 0; opacity:.8; font-size:13.5px; }
.wmain { max-width:560px; margin:0 auto; padding:12px 14px 30px; }
.rangebar { margin:0 0 4px; }
.rangebar label { display:flex; align-items:center; gap:8px; margin:0; font-weight:600; }
.rangebar select { width:auto; margin:0; padding:6px 8px; }
.wkl { font-size:12px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.4px; margin:16px 0 6px; }
.dr { display:flex; align-items:center; width:100%; text-align:left; border:0; border-left:5px solid transparent; border-radius:8px; margin-bottom:6px; padding:9px 10px 9px 0; background:#f4f6fa; font:inherit; text-decoration:none; color:var(--text); }
button.dr { cursor:pointer; }
.dr .d { width:64px; padding-left:10px; font-weight:700; color:var(--navy); font-size:13px; line-height:1.2; flex:none; }
.dr .d em { display:block; font-style:normal; font-size:10px; color:var(--orange); text-transform:uppercase; }
.dr .t { flex:1; line-height:1.25; min-width:0; }
.dr .t b { display:block; font-size:15px; }
.dr .t i { font-style:normal; font-size:12.5px; opacity:.85; }
.dr .ch { font-size:22px; color:#99a; padding-right:4px; }
.dr.job .d { color:inherit; }
.dr.job.sickday { outline:2px solid #d98d88; outline-offset:-2px; }
.dr.leave { background:repeating-linear-gradient(45deg,#cfd5df 0 3px,#eceff4 3px 7px); color:#4c566b; border-left-color:#8e99b0; }
.dr.leave .d { color:#4c566b; }
.dr.leave.sickleave { background:#F9D5D3; color:#9b2c26; border-left-color:#d98d88; }
.dr.leave.sickleave .d { color:#9b2c26; }
.dr.leave.past { opacity:.65; }
.dr.free { background:#fff; border:1px dashed #b3bed2; border-left-width:1px; color:#778; }
.dr form { margin:0 8px 0 0; }
.linkbtn { background:none; border:0; color:#9b2c26; font:inherit; font-weight:700; font-size:13px; cursor:pointer; padding:6px; }
.seg { display:flex; border:1px solid #9aa7bf; border-radius:8px; overflow:hidden; margin:3px 0 4px; }
.seg label { flex:1; margin:0; }
.seg input { position:absolute; opacity:0; width:0; }
.seg span { display:block; text-align:center; padding:9px 0; font-weight:600; color:var(--navy); cursor:pointer; }
.seg input:checked + span { background:var(--navy); color:#fff; }
.seg input:focus-visible + span { outline:3px solid var(--blue); }
.wnav { position:fixed; left:0; right:0; bottom:0; display:flex; background:#f6f8fb; border-top:1px solid #d6dce8; padding-bottom:env(safe-area-inset-bottom); z-index:40; }
.wnav a { flex:1; text-align:center; padding:13px 0 14px; color:#778; text-decoration:none; font-size:14px; font-weight:600; border-top:3px solid transparent; margin-top:-1px; }
.wnav a.on { color:var(--blue); border-top-color:var(--blue); }

/* worker bottom sheet */
.sheetwrap { position:fixed; inset:0; z-index:90; display:flex; align-items:flex-end; justify-content:center; }
.sheetdim { position:absolute; inset:0; background:rgba(20,30,60,.5); }
.sheetbox { position:relative; background:#fff; width:100%; max-width:560px; border-radius:18px 18px 0 0; padding:18px 18px calc(18px + env(safe-area-inset-bottom)); box-shadow:0 -4px 20px rgba(0,0,0,.3); }
.sheetbox h2 { font-size:21px; }
.sdate { color:var(--muted); margin-bottom:6px; }
.spm { font-size:17px; font-weight:700; }
.snote { background:#f4f6fa; border-radius:8px; padding:8px 10px; }
.bigbtn { display:block; text-align:center; border-radius:10px; padding:13px 0; font-weight:700; font-size:16px; margin-top:10px; text-decoration:none; border:1px solid var(--navy); background:#fff; color:var(--navy); width:100%; font-family:inherit; cursor:pointer; }
.bigbtn.o { background:var(--orange); border-color:var(--orange); color:#fff; }

@media (max-width: 720px) {
  .grid2 { grid-template-columns:1fr; }
  .appbar { gap:10px; padding:0 10px; }
  .appbar .brand { font-size:13px; }
  .appbar .brand b, .appbar .brand .sep { display:none; }
  .appbar .tabs { justify-content:flex-end; }
  .umenu summary small { display:none; }
  .pmmain { padding:10px 8px 24px; }
  .toolbar { gap:8px; padding:8px; }
  .toolbar .range { order:-1; flex:1 0 100%; min-width:0; font-size:15px; white-space:nowrap; }
  .toolbar .search { width:100%; order:9; }
  .toolbar .grow { display:none; }
  .legend { font-size:12px; gap:4px 12px; }
  table.grid { min-width:880px; }
  table.grid th.nm { width:104px; padding:6px; }
  table.grid td.nm { padding:4px 6px; }
  table.grid td.nm b { font-size:13px; }
  .gridwrap { max-height:none; }
}
