/* CallTime. Dark by default; the Light mode button sets data-theme="light".
   Green = booked, amber = offered or waiting on someone, red = open. */
:root {
  color-scheme: dark;
  --bg: #151614; --panel: #1f201e; --raise: #292a26; --text: #ecebe6; --dim: #a3a29c; --line: #34352f;
  --ok-bg: #1e3a20; --ok: #a9dcae; --wait-bg: #40300f; --wait: #f3cf8a;
  --open-bg: #431c1c; --open: #f2b0b0; --na-bg: #2b2c28; --na: #c4c3bd;
  --accent: #8cb8ec; --on-accent: #151614;
  --violet: #b3a2ec; --teal: #7fcfbf; --orange: #eba27c; --blue: #85b9f0;
  --rose: #e5a0c5; --lime: #b8d47b; --gold: #e0c975; --gray: #bcbdb6;
}
:root[data-theme=light] {
  color-scheme: light;
  --bg: #f6f5f2; --panel: #fff; --raise: #f0efea; --text: #1d1d1b; --dim: #6b6a66; --line: #dfddd6;
  --ok-bg: #e3f1e3; --ok: #23652a; --wait-bg: #fbf0d9; --wait: #7a4d06;
  --open-bg: #fbe5e5; --open: #8f2424; --na-bg: #efeee9; --na: #5f5e5a;
  --accent: #1f5fa8; --on-accent: #fff;
  --violet: #7652be; --teal: #247866; --orange: #b45520; --blue: #28679c;
  --rose: #a13f77; --lime: #596e19; --gold: #806607; --gray: #62645c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0 auto; max-width: 1440px; padding: 12px 20px 56px; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, "Segoe UI", system-ui, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1 { font-size: 19px; margin: 4px 0 10px; }
h2 { font-size: 14px; font-weight: 600; color: var(--dim); margin: 22px 0 8px; }
h3 { font-size: 15px; margin: 0 0 4px; }
p { margin: 6px 0; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.muted { color: var(--dim); }
.small { font-size: 13px; }
.alert { color: var(--open); }
.warnline { color: var(--wait); }
.narrow { max-width: 760px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Header */
.top { display: flex; align-items: center; gap: 6px 18px; flex-wrap: wrap; padding: 2px 0 10px; margin-bottom: 14px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 17px; color: var(--text); }
.brand:hover { text-decoration: none; }
.top nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 14px; }
.count { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: var(--wait-bg); color: var(--wait); font-size: 12px; text-align: center; }
.who { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }
#live-dot { font-size: 10px; color: var(--dim); }
#live-dot.ok { color: var(--ok); }
#live-dot.down { color: var(--open); }

/* Buttons and forms */
button, .button { font: inherit; font-size: 13px; line-height: 1.3; padding: 5px 11px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
button:hover, .button:hover { border-color: var(--dim); text-decoration: none; }
button.go, .button.go { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 600; }
button.quiet { background: transparent; border-color: transparent; color: var(--accent); padding: 5px 6px; }
button.quiet:hover { border-color: var(--line); }
button.danger { color: var(--open); }
form { margin: 0; }
form.inline { display: inline; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
input, select, textarea { font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 7px 9px; }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox] { width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--accent); flex: none; }
.form label { display: block; margin: 0 0 12px; font-size: 13px; color: var(--dim); }
.form label > input, .form label > select, .form label > textarea { display: block; width: 100%; margin-top: 4px; }
.form label > .password-toggle { margin-top: 4px; }
label.check, .form label.check { display: flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 12px; }
.counts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 2px 0 10px; }
.form .counts label { display: flex; align-items: center; gap: 6px; margin: 0; color: var(--text); font-size: 14px; }
.form .counts input[type=number] { width: 64px; margin: 0; display: inline-block; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 4px; margin: 0 0 12px; }
legend { font-size: 13px; color: var(--dim); padding: 0 4px; }

/* Panels, rows, strips */
.frame { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 0 0 14px; }
.frame > h2:first-child, .frame > h1:first-child, .frame > .titlebar:first-child h2 { margin-top: 0; }
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.titlebar h1, .titlebar h2 { margin-bottom: 8px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.row:last-child { border-bottom: 0; }
details > summary { cursor: pointer; color: var(--accent); font-size: 13px; padding: 3px 0; }
details[open] > summary { margin-bottom: 6px; }
.strip { display: flex; gap: 4px 16px; flex-wrap: wrap; align-items: baseline; background: var(--wait-bg); color: var(--wait); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 12px; }
.strip a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.hint { font-size: 12px; color: var(--dim); margin: 8px 0 0; }

/* Pills: the three states, plus avails */
.pill { display: inline-block; border-radius: 4px; padding: 0 5px; margin: 2px 2px 0 0; font-size: 11px; line-height: 1.6; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; color: var(--text); }
a.pill:hover { text-decoration: none; filter: brightness(1.1); }
.pill.booked { background: var(--ok-bg); color: var(--ok); }
.pill.offered { background: var(--wait-bg); color: var(--wait); }
.pill.ready { background: transparent; box-shadow: inset 0 0 0 1px var(--wait); color: var(--wait); }
.pill.open { background: var(--open-bg); color: var(--open); }
.pill.na { background: var(--na-bg); color: var(--na); }
.pill.av { background: transparent; box-shadow: inset 0 0 0 1px var(--ok); color: var(--ok); }
.off { background: repeating-linear-gradient(45deg, var(--na-bg), var(--na-bg) 4px, transparent 4px, transparent 8px); color: var(--na); }

/* Board */
.bar { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; flex-wrap: wrap; font-size: 13px; margin: 0 0 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; flex-wrap: wrap; }
.seg a { padding: 3px 11px; color: var(--text); }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--accent); color: var(--on-accent); }
.seg a:hover { text-decoration: none; background: var(--raise); }
.seg a.on:hover { background: var(--accent); }
.weeknav { display: flex; align-items: center; gap: 8px; }
.weeknav b { font-size: 14px; }
.weeknav a.arrow { font-size: 18px; line-height: 1; padding: 0 6px; }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.two.has-panel { grid-template-columns: minmax(0, 2.2fr) minmax(300px, 1fr); }
.two > aside { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; margin: 0; }
.lanes { display: grid; grid-template-columns: 112px repeat(7, minmax(0, 1fr)); gap: 3px; font-size: 12px; }
.hd { color: var(--dim); text-align: center; padding: 2px 0 4px; font-size: 12px; }
.hd.today { color: var(--accent); font-weight: 700; }
.lane { padding: 6px; font-size: 12px; font-weight: 600; border-left: 4px solid var(--c, var(--line)); background: var(--panel); border-radius: 0 5px 5px 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; overflow-wrap: anywhere; }
.lane a { color: var(--text); }
.lane small { font-weight: 400; color: var(--dim); }
.cell { border: 1px solid var(--line); border-radius: 5px; min-height: 66px; padding: 3px; background: var(--panel); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cell.today { border-color: var(--accent); }
.cell.off { background: repeating-linear-gradient(45deg, var(--na-bg), var(--na-bg) 4px, var(--panel) 4px, var(--panel) 8px); }
.offlabel { font-size: 11px; color: var(--na); padding: 0 3px; }
.cell .add { margin-top: auto; text-align: center; color: var(--dim); opacity: .3; font-size: 15px; line-height: 1; padding: 3px 0; border-radius: 4px; }
.cell.empty .add { margin: 0; flex: 1; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.cell .add:hover { opacity: 1; background: var(--raise); text-decoration: none; }
.gig { display: block; border-left: 3px solid var(--c, var(--line)); padding: 2px 4px 3px 6px; line-height: 1.3; color: var(--text); border-radius: 0 4px 4px 0; min-width: 0; }
.gig:hover { background: var(--raise); text-decoration: none; }
.gig.sel { outline: 2px solid var(--accent); outline-offset: 1px; }
.gig .t { display: block; font-weight: 600; font-size: 12px; overflow-wrap: anywhere; }
.gig .pill { white-space: normal; overflow-wrap: anywhere; }
.gig .when { color: var(--dim); font-weight: 400; }
.gig.cancelled { opacity: .55; }
.gig.cancelled .t { text-decoration: line-through; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; font-size: 12px; }
.month .cell { min-height: 96px; }
.month .dnum { font-size: 11px; color: var(--dim); padding: 0 2px; }
.month .cell.today .dnum { color: var(--accent); font-weight: 700; }
.month .cell.other { opacity: .45; }
.days { display: none; }
.days .day { margin: 0 0 14px; }
.days .day h3 { font-size: 13px; color: var(--dim); margin: 0 0 6px; }
.days .day h3.today { color: var(--accent); }
.days .gig { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line)); border-radius: 6px; padding: 8px 10px; margin-bottom: 6px; }
.days .gig .t { font-size: 14px; }
.days .pill { font-size: 12px; }
.boardfoot { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 13px; }
.ask { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; }
.ask input, .ask select { padding: 4px 7px; font-size: 13px; }

/* Gig panel */
.gigpanel { font-size: 14px; }
.gighead { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.gighead h1 { font-size: 17px; margin: 0; }
.gighead .venue { font-size: 13px; font-weight: 600; color: var(--c, var(--dim)); }
.meta { font-size: 13px; color: var(--dim); margin: 2px 0 6px; }
.links { display: flex; gap: 4px 12px; flex-wrap: wrap; align-items: center; font-size: 13px; margin: 6px 0; }
.links .file { display: inline-flex; align-items: center; gap: 2px; }
.pos { border-top: 1px solid var(--line); padding: 10px 0 6px; margin-top: 8px; }
.pos .head { display: flex; justify-content: space-between; align-items: flex-start; gap: 6px 10px; flex-wrap: wrap; }
.pos .head .what { min-width: 0; }
.pos .head .what b { margin-right: 4px; }
.pos .note { font-size: 13px; color: var(--dim); margin: 2px 0 0; }
.pos details { margin-top: 6px; }
.pos .row { padding: 4px 0; font-size: 13px; }
.pos .row.skip > span:first-child { color: var(--dim); }
.pos .row button { padding: 2px 8px; font-size: 12px; }
.pos .row button.quiet { padding: 2px 5px; }
.change { margin-top: 6px; }
.change form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 4px 0; }
.change input { padding: 4px 7px; font-size: 13px; }
/* Declining an offer is final, so it sits behind a second tap instead of beside Confirm. */
.decline { margin-top: 8px; }
.decline > summary { padding: 8px 2px; cursor: pointer; color: var(--dim); font-size: 14px; }
.decline > p { margin: 2px 2px 6px; }
.decline form button { width: 100%; min-height: 44px; }

/* Crew and templates pages */
.people .row { align-items: flex-start; }
.people .name { font-weight: 600; }
.people .rank { color: var(--dim); }
.avs { display: flex; flex-wrap: wrap; gap: 0 2px; margin-top: 2px; }
.linkbox { width: 100%; min-width: 220px; font-size: 12px; color: var(--dim); }
.venuebox { border-left: 4px solid var(--c, var(--line)); }
.msg .row, .msg { align-items: flex-start; }

/* Settings, written as sentences */
.sentences p { margin: 0 0 8px; line-height: 2.3; font-size: 14px; }
.sentences input, .sentences select { display: inline-block; width: auto; padding: 3px 6px; margin: 0 2px; font-size: 14px; }
.sentences input[type=number] { width: 64px; text-align: center; }
.sentences input.tel { width: 140px; }

/* Crew member pages: phone first */
.phone { max-width: 480px; margin: 0 auto; }
.phone h1 { font-size: 20px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 8px 0; font-size: 14px; }
.card.waiting { border-color: var(--wait); }
.card .title { font-weight: 600; font-size: 15px; }
.card .when { color: var(--dim); }
.big { display: flex; gap: 10px; margin-top: 12px; }
.big form { flex: 1; display: flex; }
.big button { flex: 1; padding: 12px; font-size: 16px; border-radius: 10px; }
.dropline { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; }
.monthbar { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.monthbar a { font-size: 18px; line-height: 1; padding: 2px 8px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; text-align: center; margin: 6px 0; }
.cal .wd { color: var(--dim); font-size: 11px; }
.cal .d { min-height: 50px; border-radius: 7px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 2px; font-size: 13px; min-width: 0; }
.cal .d form { display: flex; }
.cal .d .daybtn { flex: 1; padding: 6px 0; border: 0; background: transparent; color: inherit; font-size: 13px; min-height: 30px; }
.cal .d .n { padding: 6px 0; min-height: 30px; }
.cal .d.av { box-shadow: inset 0 0 0 1.5px var(--ok); color: var(--ok); }
.cal .d.off { background: repeating-linear-gradient(45deg, var(--na-bg), var(--na-bg) 4px, var(--panel) 4px, var(--panel) 8px); color: var(--na); }
.cal .d.other { opacity: .35; }
.cal .d.past { opacity: .6; }
.tag { display: block; border-radius: 4px; font-size: 10px; line-height: 1.5; padding: 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag.booked { background: var(--ok-bg); color: var(--ok); }
.tag.offered { background: var(--wait-bg); color: var(--wait); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; }
.key { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--line); vertical-align: -2px; margin-right: 4px; }
.key.av { box-shadow: inset 0 0 0 1.5px var(--ok); }

/* Sign-in, demo */
.signin { max-width: 380px; margin: 9vh auto 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 13px; margin: 6px 0; }
.mailboxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.bubble { background: var(--ok-bg); color: var(--text); padding: 8px 12px; border-radius: 14px; font-size: 13px; margin: 4px 0 10px; }
.bubble small { color: var(--dim); display: block; }

/* Narrower screens */
@media (max-width: 1100px) {
  .two.has-panel { grid-template-columns: minmax(0, 1fr); }
  .two > aside { position: static; max-height: none; order: -1; }
}
@media (max-width: 760px) {
  body { padding: 10px 12px 48px; }
  .lanes, .month, .hint { display: none; }
  .days { display: block; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .top nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .top nav a { white-space: nowrap; }
  .bar { gap: 8px; }
  .weeknav { order: -1; width: 100%; justify-content: space-between; }
  button, .button { padding: 7px 12px; }
  .pos .row button { padding: 5px 10px; }
}

/* v1.2 application shell */
body.booker-shell { max-width: none; padding: 0; min-height: 100vh; }
.booker-shell .workspace { margin-left: 224px; padding: 28px 32px 64px; max-width: 1440px; min-height: 100vh; }
.rail { position: fixed; inset: 0 auto 0 0; width: 224px; display: flex; flex-direction: column; gap: 12px; padding: 22px 16px 16px; border-right: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, var(--bg)); z-index: 20; }
.rail .brand, .mobiletop .brand, .private-shell .brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brandmark { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--on-accent); background: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: -.04em; }
.quickadd { width: 100%; min-height: 38px; }
.rail nav { display: flex; flex-direction: column; gap: 2px; }
.rail nav > a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 7px 9px; border-radius: 8px; color: var(--dim); }
.rail nav > a > span { width: 18px; text-align: center; }
.rail nav > a:hover { color: var(--text); background: var(--raise); text-decoration: none; }
.rail nav > a.on { color: var(--text); background: var(--raise); font-weight: 600; }
.rail nav .count { margin-left: auto; }
.rail-search { position: relative; margin-top: 4px; }
.rail-search input { width: 100%; padding-right: 42px; background: var(--bg); }
kbd { position: absolute; right: 7px; top: 7px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; color: var(--dim); background: var(--panel); font: 10px/1.5 inherit; }
.railfoot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; }
.railfoot .identity { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 8px 6px; border-top: 1px solid var(--line); font-size: 13px; }
.railfoot button { font-size: 12px; color: var(--dim); }
.mobiletop { display: none; }
.private-shell { max-width: 100%; padding-top: 12px; }
.private-shell > .top, .private-shell > .workspace { max-width: 920px; margin-left: auto; margin-right: auto; }
.private-shell > .workspace { min-height: 70vh; }
.setup-callout { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 11px 14px; margin-bottom: 18px; border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); font-size: 13px; }

/* Page rhythm and reusable profile patterns */
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin: 0 0 22px; }
.pagehead h1, .profilehead h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.1; letter-spacing: -.035em; margin: 2px 0 5px; }
.pagehead p, .profilehead p { color: var(--dim); max-width: 650px; margin: 0; }
.eyebrow { color: var(--accent); font-size: 11px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.lede { max-width: 630px; color: var(--dim); font-size: 16px; margin-bottom: 24px; }
.sectionhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 10px; }
.sectionhead h2, .sectionhead h3 { margin: 0; color: var(--text); }
.sectionhead p { margin-top: 2px; }
.empty-state { padding: 24px; border-style: dashed; }
.empty-state h2 { color: var(--text); font-size: 17px; margin: 0 0 5px; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.rowlink { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 2px; border-bottom: 1px solid var(--line); color: var(--text); }
.rowlink:last-child { border: 0; }
.rowlink span:first-child { display: flex; flex-direction: column; }
.rowlink small { color: var(--dim); }
.rowlink:hover { text-decoration: none; background: var(--raise); }
.taglist { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.taglist span { padding: 1px 7px; border-radius: 999px; background: var(--raise); color: var(--dim); font-size: 11px; }

/* Setup and settings */
.presetgrid, .toolgrid, .directory { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 22px; }
.preset button { width: 100%; min-height: 100px; padding: 16px; align-items: flex-start; flex-direction: column; text-align: left; white-space: normal; background: var(--panel); }
.preset button b { font-size: 15px; }
.preset button span { color: var(--dim); font-size: 12px; }
.setup-questions fieldset { padding: 15px; }
.choicecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 7px; }
.choicecards label { margin: 0; position: relative; }
.choicecards input { position: absolute; opacity: 0; }
.choicecards span { display: block; height: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); cursor: pointer; }
.choicecards input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.toolcard { min-height: 190px; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: var(--bg); }
.toolcard.on { background: var(--panel); border-color: color-mix(in srgb, var(--accent) 32%, var(--line)); }
.toolcard h3 { margin-top: 8px; }
.toolcard p { color: var(--dim); font-size: 13px; }
.toolcard > small { display: block; color: var(--dim); }
.tooltop { display: flex; align-items: center; justify-content: space-between; }
.toolicon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--raise); color: var(--accent); }
button.switch { width: 42px; height: 24px; padding: 2px; border-radius: 999px; justify-content: flex-start; background: var(--raise); }
button.switch span { width: 18px; height: 18px; border-radius: 50%; background: var(--dim); transition: transform .15s; }
button.switch.on { background: var(--accent); border-color: var(--accent); }
button.switch.on span { background: var(--on-accent); transform: translateX(16px); }
.settingsgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fieldgroups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.fieldgroups > div { padding: 12px; border-radius: 9px; background: var(--bg); }
.fieldrow { border-bottom: 1px solid var(--line); padding: 8px 0; }
.fieldrow summary { display: flex; justify-content: space-between; color: var(--text); }
.fieldrow summary small { color: var(--dim); font-weight: 400; }
.fieldrow.archived { opacity: .6; }
.compact { padding: 8px 0; }
.compact input + input { margin-top: 5px; }
.addfield { margin-top: 10px; }

/* Directories and profiles */
.profilecard { display: grid; grid-template-columns: 5px 1fr auto; align-items: center; gap: 12px; min-height: 92px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--text); }
.profilecard:hover { border-color: var(--dim); text-decoration: none; }
.profilecard .swatch { align-self: stretch; border-radius: 5px; background: var(--c, var(--line)); }
.profilecard > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.profilecard small { color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profilecard.archived { opacity: .55; }
.profilecard.addcard { display: block; }
.profilecard.addcard summary { padding: 20px 8px; }
.chev { color: var(--dim); font-size: 20px; }
.profile { max-width: 1100px; }
.profilehead { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 22px; }
.profilehead .back { grid-column: 1 / -1; font-size: 13px; }
.avatar { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--raise); color: var(--accent); font-size: 21px; font-weight: 700; }
.venueavatar { border-radius: 12px; color: var(--c, var(--accent)); }
.profilegrid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, .8fr); gap: 16px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.stats span { display: flex; align-items: baseline; gap: 5px; padding: 7px; border-radius: 7px; background: var(--bg); color: var(--dim); font-size: 12px; }
.stats b { color: var(--text); font-size: 17px; }
.copyline { display: flex; gap: 6px; }
.copyline input { min-width: 0; flex: 1; font-size: 12px; }
.fieldfacts { margin: 9px 0; padding: 8px 10px; border-radius: 8px; background: var(--bg); }
.fieldfacts > div { display: grid; grid-template-columns: minmax(80px, .35fr) 1fr; gap: 8px; padding: 3px 0; }
.fieldfacts dt { color: var(--dim); font-size: 12px; }
.fieldfacts dd { margin: 0; white-space: pre-wrap; }

/* Search and month sheet */
.searchbig { display: flex; gap: 7px; margin: 14px 0 18px; }
.searchbig input { flex: 1; font-size: 17px; padding: 10px 12px; }
.result { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; padding: 10px 4px; border-bottom: 1px solid var(--line); color: var(--text); }
.result:last-child { border: 0; }
.result:hover { background: var(--raise); text-decoration: none; }
.resulticon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--raise); color: var(--accent); }
.result > span:nth-child(2) { display: flex; flex-direction: column; }
.result small { color: var(--dim); }
.sheetwrap { overflow: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.monthsheet { border-collapse: separate; border-spacing: 0; min-width: 760px; width: 100%; font-size: 12px; }
.monthsheet th, .monthsheet td { padding: 7px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.monthsheet thead th { position: sticky; top: 0; z-index: 2; background: var(--raise); color: var(--dim); }
.monthsheet .stickycol { position: sticky; left: 0; z-index: 1; min-width: 210px; text-align: left; background: var(--panel); }
.monthsheet thead .stickycol { z-index: 3; background: var(--raise); }
.monthsheet .stickycol > * { display: block; }
.monthsheet .stickycol small { color: var(--dim); font-weight: 400; }
.monthsheet .mark button { width: 30px; height: 30px; padding: 0; border-radius: 50%; }
.monthsheet .mark.available { color: var(--ok); }
.monthsheet .mark.request { color: var(--wait); font-weight: 700; }
.monthsheet .mark.off, .monthsheet .mark.paused { color: var(--dim); }
.sheetactions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

/* Crew preferences */
.answerlist { margin: 8px 0 12px; }
.answerlist label { display: grid; grid-template-columns: 1fr 118px; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.answerlist label > span { display: flex; flex-direction: column; }
.answerlist small { color: var(--dim); }
.cal.withparts .d { min-height: 75px; }
.partmarks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: auto; }
.partmarks form { min-width: 0; }
.partmarks button.part { width: 100%; min-width: 0; padding: 2px 0; border-radius: 3px; font-size: 9px; color: var(--dim); }
.partmarks button.available { color: var(--ok); border-color: var(--ok); }
.partmarks button.off { color: var(--na); background: var(--na-bg); }
.preferencecard hr { margin: 16px 0; }
.booker-pref { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.booker-pref > p { margin: 0; }
.booker-pref:last-child { border: 0; }

#toast { position: fixed; right: 18px; bottom: 18px; z-index: 100; padding: 9px 13px; border-radius: 8px; background: var(--ok-bg); color: var(--ok); box-shadow: 0 6px 24px #0005; opacity: 0; pointer-events: none; transform: translateY(6px); transition: .15s; }
#toast.show { opacity: 1; transform: none; }
#toast.bad { background: var(--open-bg); color: var(--open); }

@media (max-width: 900px) {
  .booker-shell .workspace { margin-left: 190px; padding: 24px 20px 56px; }
  .rail { width: 190px; }
  .fieldgroups, .settingsgrid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  body.booker-shell { padding-bottom: 64px; }
  .booker-shell .workspace { margin: 0; padding: 72px 12px 34px; }
  .rail { inset: auto 0 0; width: auto; height: 60px; padding: 5px 8px; border: 0; border-top: 1px solid var(--line); flex-direction: row; overflow-x: auto; }
  .rail > .brand, .rail > .quickadd, .rail > .rail-search, .rail > .railfoot { display: none; }
  .rail nav { width: 100%; flex-direction: row; justify-content: space-around; gap: 2px; }
  .rail nav > a { min-width: 54px; min-height: 48px; padding: 4px 7px; flex-direction: column; justify-content: center; gap: 0; font-size: 10px; white-space: nowrap; }
  .rail nav > a[href="/sent"], .rail nav > a[href="/demo"] { display: none; }
  .rail nav .count { position: absolute; margin: -25px 0 0 28px; }
  .mobiletop { position: fixed; inset: 0 0 auto; z-index: 15; display: flex; align-items: center; justify-content: space-between; height: 58px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
  .mobileactions { display: flex; align-items: center; gap: 5px; }
  .setup-callout, .pagehead, .profilehead { align-items: flex-start; }
  .setup-callout { flex-direction: column; }
  .pagehead { flex-direction: column; margin-bottom: 17px; }
  .pagehead h1, .profilehead h1 { font-size: 27px; }
  .profilehead { grid-template-columns: auto 1fr; }
  .profilehead > .button { grid-column: 1 / -1; }
  .profilegrid { grid-template-columns: 1fr; }
  .presetgrid, .toolgrid, .directory { grid-template-columns: 1fr; }
  .choicecards { grid-template-columns: 1fr; }
  .answerlist label { grid-template-columns: 1fr; }
  .copyline { flex-wrap: wrap; }
  .copyline input { flex-basis: 100%; }
}

.strip.past { background: var(--na-bg); color: var(--na); }
/* The order of operations for a desk that has not got going yet. */
.firstrun .steps { margin: 6px 0 4px; padding-left: 20px; }
.firstrun .steps li { margin: 4px 0; }
.firstrun .steps li.done { color: var(--dim); text-decoration: line-through; }
.firstrun .steps li.done a { color: var(--dim); }
/* A gig that has already happened settles down: its open seats are a fact, not an alarm. */
.gig.over { opacity: .72; }
.rail a[data-count]::after { content: attr(data-count); margin-left: auto; background: var(--wait-bg); color: var(--wait); border-radius: 9px; padding: 0 7px; font-size: 11px; font-weight: 600; }
.gig.over .pill.open { background: var(--na-bg); color: var(--na); }
.people .record { margin-top: 2px; }

/* Posting avails, and the strip that shows a crew member how one booker sees them. */
.postbar { margin-top: 10px; }
.postbar .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.postbar input[type=date] { font: inherit; font-size: 13px; padding: 5px 7px; border-radius: 8px; border: 1px solid var(--line); background: var(--raise); color: var(--text); }
.mirror { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; margin: 6px 0; }
.mirror .m { border: 1px solid var(--line); border-radius: 5px; height: 26px; font-size: 10px; line-height: 24px; text-align: center; color: var(--dim); }
.mirror .m.free { border-color: var(--ok); color: var(--ok); }
.mirror .m.off { background: var(--open-bg); border-color: transparent; color: var(--open); }
.mirror .m.na { background: var(--na-bg); border-color: transparent; color: var(--na); }
.mirror .m.np { background: var(--raise); border-color: transparent; }

/* Engineer's page: section bar, schedule, offers (see docs/crew-page.md) */
.crewpage { padding-bottom: 40px; }
.crewpage h1 { margin-bottom: 2px; }
.sectionnav { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; margin: 10px 0 4px; background: var(--bg); border-bottom: 1px solid var(--line); }
.sectionnav a { flex: 0 0 auto; padding: 7px 14px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-size: 14px; }
.sectionnav a:hover { text-decoration: none; border-color: var(--dim); }
.crewsec { scroll-margin-top: 58px; }
.crewsec > h2 { font-size: 16px; color: var(--text); margin-top: 18px; }
.dayhead { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 2px; font-size: 14px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.rel { padding: 1px 8px; border-radius: 9px; background: var(--raise); color: var(--text); font-size: 12px; text-transform: none; letter-spacing: 0; }
.rel.now { background: var(--wait-bg); color: var(--wait); font-weight: 600; }
.gigcard.next { border-color: var(--accent); }
.gigcard .eyebrow { margin-bottom: 2px; }
.gigtime { margin: 4px 0 2px; font-size: 15px; }
.gigtime .gday { font-weight: 600; }
.where { margin: 2px 0 6px; }
.reach { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.reach .button { padding: 9px 14px; }
.bookedwho { text-decoration: none; }
.bookedwho:hover { text-decoration: none; }
.bookedwho:hover .pill.booked { filter: brightness(1.1); }
.offercard .big button { min-height: 48px; }
.gotit button { width: 100%; min-height: 46px; margin-top: 10px; }
.recent { padding: 4px 14px; }
.recentrow { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.recentrow:last-child { border-bottom: 0; }
.addgig { padding: 0; } .addgig > summary { padding: 12px 14px; cursor: pointer; font-weight: 600; color: var(--accent); } .addgig > .form { padding: 0 14px 14px; }
.gigcard.own { border-left: 3px solid var(--teal); }
.mybox { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; } .mybox summary { cursor: pointer; font-size: 14px; } .mybox .form { margin-top: 8px; }
.mybox .ok { color: var(--ok); }
.notes { white-space: pre-wrap; }
.moneysum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .moneysum > div { display: flex; flex-direction: column; gap: 2px; } .moneysum b { font-size: 18px; }
.moneyrow .row { display: flex; gap: 6px; align-items: center; } .moneyrow input { width: 70px; }
.tag.own { background: var(--teal); color: var(--on-accent); }
.crewpage .row { flex-wrap: wrap; }
.crewpage .row.stretch select, .crewpage .row.stretch button { flex: 1 1 auto; }
.daycard .card { border-color: var(--wait); border-width: 2px; }
.bigtime { font-size: 34px; font-weight: 700; line-height: 1.1; margin: 4px 0 0; }
.updated { text-align: center; margin-top: 24px; }
.importbox { margin: 0 14px 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.invtable { width: 100%; border-collapse: collapse; margin: 14px 0; }
.invtable th, .invtable td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; }
.invtable tfoot td { border-bottom: 0; font-size: 16px; }
@media print { .top, .noprint, .sectionnav { display: none !important; } body { background: #fff; color: #000; } .invtable th, .invtable td { border-color: #bbb; } .muted { color: #444; } }
.sharehead { margin: 4px 0 8px; font-size: 16px; }
.sharebox { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0; }
.sharebox p { margin: 2px 0; }
.sharebox .copyline { margin-top: 8px; }

/* Advance sheets */
.advh { margin: 14px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--dim); }
.runofshow { list-style: none; margin: 4px 0; padding: 0; }
.runofshow li { display: grid; grid-template-columns: 9.5em 1fr; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.runofshow li:last-child { border: 0; }
.actblock { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; }
.laborlist { width: 100%; border-collapse: collapse; } .laborlist td { padding: 5px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
details.advance { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; } details.advance summary { cursor: pointer; color: var(--accent); }
.advancesheet h1 { margin-top: 2px; }
.advanceform h3 { margin: 18px 0 2px; }
.advrow { display: grid; gap: 6px; margin: 4px 0; } .advrow.sched { grid-template-columns: 7.5em 7.5em 1fr; } .advrow.labor { grid-template-columns: 1.4fr 4em 7.5em 1fr; }
.advgroup { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; padding: 0 12px; } .advgroup summary { padding: 10px 0; cursor: pointer; font-weight: 600; }
.advfields { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px 12px; padding-bottom: 12px; }
@media (max-width: 680px) { .advrow.sched { grid-template-columns: 6.5em 6.5em 1fr; } .advrow.labor { grid-template-columns: 1fr 4em 6.5em; } .advrow.labor input:last-child { grid-column: 1 / -1; } }
@media print { .rail, .mobiletop, .noprint { display: none !important; } .advancesheet { max-width: 100%; } }

.rolecards { display: grid; gap: 10px; margin: 14px 0; }
.rolecard { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.rolecard:hover { border-color: var(--accent); text-decoration: none; }
.rolecard b { font-size: 16px; } .rolecard span { color: var(--dim); font-size: 14px; }

/* Feedback: one small control on every signed-in page */
.feedbackbox { margin: 28px auto 8px; max-width: 480px; }
@media (min-width: 1000px) { .feedbackbox { position: fixed; right: 14px; bottom: 14px; z-index: 20; margin: 0; max-width: 340px; } }
.feedbackbox > summary { list-style: none; cursor: pointer; padding: 9px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text); font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.feedbackbox > summary::-webkit-details-marker { display: none; }
.feedbackbox[open] > summary { margin-left: auto; width: fit-content; }
.feedbackbox form { margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.kindpick { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.kindpick label { display: flex; gap: 6px; align-items: center; }
.feedbackbox textarea { width: 100%; }

.invitebox { max-width: 520px; margin-bottom: 6px; }

/* The engineer's page on a wide screen: schedule and money in a main column, calendar and settings
   beside it. Under 1000px nothing here applies and it is the phone layout. */
@media (min-width: 1000px) {
  body.private-shell:has(.crewpage) > .top, body.private-shell:has(.crewpage) > .workspace { max-width: 1240px; }
  .crewpage.phone { max-width: none; }
  .crewpage .pagehead h1 { font-size: 26px; }
  .crewpage .sectionnav { justify-content: flex-start; }
  .crewcols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(340px, 1fr); gap: 28px; align-items: start; margin-top: 8px; }
  .crewcols .colside { min-width: 0; }
  .crewcols .cal .d { min-height: 64px; }
  .crewcols .offercard .big { max-width: 420px; }
}
@media (min-width: 1500px) {
  body.private-shell:has(.crewpage) > .top, body.private-shell:has(.crewpage) > .workspace { max-width: 1380px; }
  .crewcols { grid-template-columns: minmax(0, 1.7fr) minmax(400px, 1fr); }
}

/* Crew page header and settings groups */
.crewhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.deskjump { flex: 0 0 auto; margin-top: 18px; }
.setgroup h3 { margin: 0 0 8px; font-size: 15px; }
.setgroup form + form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.setgroup .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 680px) { .setgroup .grid3 { grid-template-columns: 1fr 1fr; } }

/* Booker menu on a phone: what the sidebar footer holds on a wider screen */
.mobilemenu { position: relative; }
.mobilemenu > summary { list-style: none; cursor: pointer; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.mobilemenu > summary::-webkit-details-marker { display: none; }
.mobilemenu .menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: 0 6px 24px rgba(0,0,0,.35); z-index: 30; }
.mobilemenu .menu a, .mobilemenu .menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: transparent; color: var(--text); font-size: 14px; border-radius: 6px; }
.mobilemenu .menu a:hover, .mobilemenu .menu button:hover { background: var(--raise); text-decoration: none; }
.mobilemenu .menu .who { padding: 6px 10px; color: var(--dim); font-size: 13px; }

.advancebox > summary { cursor: pointer; }
details.actform { border: 1px solid var(--line); border-radius: 10px; margin: 8px 0; padding: 0 12px; }
details.actform > summary { padding: 10px 0; cursor: pointer; }
details.actform[open] { padding-bottom: 10px; }

.pitch h2 { font-size: 17px; margin: 0 0 6px; color: var(--text); }
.pitchlist { margin: 0 0 12px; padding-left: 18px; } .pitchlist li { margin: 3px 0; }
