/* =====================================================================
   Crew portal — mobile-first
   ===================================================================== */
body.crew { background: var(--bg); }
.crew-app { max-width: 560px; margin-inline: auto; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); box-shadow: 0 0 60px rgba(0,0,0,.06); }

/* Top bar */
.crew-top { position: sticky; top: 0; z-index: 20; background: var(--brand-2); color: #fff; padding-top: env(safe-area-inset-top); }
.crew-top-inner { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; }
.crew-brand { display: flex; align-items: center; gap: .6rem; }
.crew-brand .brand-mark { width: 36px; height: 36px; }
.crew-brand strong { display: block; font-size: .95rem; line-height: 1.1; }
.crew-brand span { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.crew-brand.big .brand-mark { width: 44px; height: 44px; }
.crew-logout { color: rgba(255,255,255,.8); padding: 8px; border-radius: 10px; }
.crew-logout:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Main */
.crew-main { flex: 1; padding: 1.1rem 1.1rem calc(90px + env(safe-area-inset-bottom)); }
.flash { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: 10px; font-weight: 600; }
.flash-error { background:#fee2e2; color:#b91c1c; } .flash-ok { background:#dcfce7; color:#15803d; }

.crew-greeting { margin-bottom: 1.1rem; }
.crew-greeting h1 { font-size: 2rem; }
.crew-page-title { font-size: 1.6rem; margin-bottom: 1rem; }
.crew-back { display: inline-block; color: var(--brand); font-weight: 700; margin-bottom: 1rem; }
.section-eyebrow { display: flex; align-items: center; gap: .4rem; font-size: .74rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--brand); margin-bottom: .7rem; }
.section-eyebrow svg { color: var(--accent); }

/* Next auction card */
.next-card { background: #fff; border-radius: var(--radius-lg); padding: 1.3rem; box-shadow: var(--shadow); position: relative;
  border-top: 5px solid #cbd5e1; overflow: hidden; }
.next-card.status-confirmed { border-top-color: var(--ok); }
.next-card.status-pending { border-top-color: var(--warn); }
.next-card.status-declined { border-top-color: var(--danger); }
.next-datechip { position: absolute; top: 1.2rem; right: 1.2rem; text-align: center; background: var(--brand); color: #fff;
  border-radius: 14px; padding: .5rem .7rem; line-height: 1; box-shadow: var(--shadow-sm); }
.next-datechip span { display: block; font-size: .66rem; text-transform: uppercase; opacity: .9; }
.next-datechip strong { display: block; font-family: var(--display); font-size: 1.8rem; margin: 2px 0; }
.next-title { font-size: 1.35rem; padding-right: 68px; margin-bottom: .6rem; }
.next-role { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.role-badge { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: .3rem .7rem; border-radius: 999px; background: var(--brand-2); color: #fff; }
.role-badge.role-lead_auctioneer { background: var(--brand); }
.role-badge.role-ringman { background: var(--accent); color: #3a2a00; }

.time-row { display: flex; gap: .6rem; margin-bottom: 1rem; }
.time-box { flex: 1; background: #f6f7fb; border-radius: 13px; padding: .8rem; text-align: center; }
.time-box.highlight { background: color-mix(in srgb, var(--accent) 20%, #fff); }
.tb-label { display: flex; align-items: center; justify-content: center; gap: .3rem; font-size: .7rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.tb-label svg { width: 14px; height: 14px; }
.time-box strong { display: block; font-size: 1.35rem; margin-top: .25rem; }

.loc-row { display: flex; align-items: center; gap: .7rem; background: #f6f7fb; border-radius: 13px; padding: .85rem; margin-bottom: 1rem; }
.loc-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--brand); color: #fff; flex: 0 0 auto; }
.loc-text { flex: 1; min-width: 0; }
.loc-text strong { display: block; }
.loc-text span { font-size: .82rem; color: var(--muted); }
.loc-go { display: flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 800; color: var(--brand); white-space: nowrap; }

.instr-box { background: #fff8ec; border: 1px solid #fce8c4; border-radius: 13px; padding: .9rem; margin-bottom: 1rem; }
.instr-box.note { background: #eef2ff; border-color: #dbe1ff; }
.instr-label { display: flex; align-items: center; gap: .35rem; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); margin-bottom: .4rem; }
.instr-box.note .instr-label { color: var(--info); }
.instr-box p { font-size: .9rem; color: var(--ink-soft); }

.respond-row { border-top: 1px solid var(--line); padding-top: 1rem; }
.current-status { font-size: .85rem; margin-bottom: .7rem; color: var(--muted); }
.current-status.status-pill-confirmed strong { color: var(--ok); }
.current-status.status-pill-pending strong { color: var(--warn); }
.current-status.status-pill-declined strong { color: var(--danger); }
.respond-btns { display: flex; gap: .6rem; }
.respond-btns .btn { flex: 1; }
.btn.is-on { outline: 3px solid color-mix(in srgb, var(--ok) 40%, transparent); }
.btn-ghost.is-on { outline-color: color-mix(in srgb, var(--danger) 40%, transparent); border-color: var(--danger); color: var(--danger); }

/* Mini list */
.mini-list { display: flex; flex-direction: column; gap: .6rem; }
.mini-list.dim { opacity: .7; }
.mini-card { display: flex; align-items: center; gap: .8rem; background: #fff; border-radius: 14px; padding: .8rem; box-shadow: var(--shadow-sm); }
.mini-date { flex: 0 0 44px; text-align: center; }
.mini-date span { display: block; font-size: .66rem; text-transform: uppercase; color: var(--brand); font-weight: 800; }
.mini-date strong { display: block; font-size: 1.4rem; font-family: var(--display); line-height: 1; }
.mini-info { flex: 1; min-width: 0; }
.mini-info strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-info .muted { font-size: .8rem; }
.status-dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; flex: 0 0 auto; }
.status-dot.status-confirmed { background: var(--ok); }
.status-dot.status-pending { background: var(--warn); }
.status-dot.status-declined { background: var(--danger); }

/* Empty */
.crew-empty { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.crew-empty svg { margin: 0 auto 1rem; opacity: .4; }
.crew-empty h3 { color: var(--ink); margin-bottom: .4rem; }
.crew-empty .btn { margin-top: 1rem; }

/* Tab bar */
.crew-tabbar { position: sticky; bottom: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom); }
.crew-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: .7rem 0 .6rem;
  color: var(--muted); font-size: .68rem; font-weight: 700; }
.crew-tabbar a.active { color: var(--brand); }
.crew-tabbar a.active svg { transform: translateY(-1px); }

/* Availability */
.avail-help { margin-bottom: 1rem; font-size: .9rem; }
.avail-legend { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .6rem; }
.al-btn { display: flex; align-items: center; gap: .35rem; border: 1.5px solid var(--line); background: #fff; border-radius: 999px;
  padding: .4rem .7rem; font-weight: 700; font-size: .78rem; }
.al-btn i { width: 12px; height: 12px; border-radius: 50%; }
.al-btn.available i { background: var(--ok); }
.al-btn.tentative i { background: var(--warn); }
.al-btn.unavailable i { background: var(--danger); }
.al-btn.clear i { background: #cbd5e1; }
.al-btn.sel { border-color: var(--brand); background: color-mix(in srgb,var(--brand) 8%, #fff); }
.avail-mode { font-size: .82rem; color: var(--muted); margin-bottom: .8rem; }
.cal-toolbar.crew { display: flex; align-items: center; justify-content: center; gap: .8rem; margin-bottom: .6rem; }
.cal-toolbar.crew .cal-title { font-size: 1.05rem; min-width: 150px; }
.crew-cal { border-radius: var(--radius); }
.crew-cal .cal-weekdays span { padding: .5rem 0; }
.crew-cal .cal-cell { min-height: 46px; display: flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); }
.crew-cal .cal-cell .cal-num { font-size: .9rem; }
.cal-cell.avail { cursor: pointer; background: #fff; }
.cal-cell.avail.other { background: #fafbfe; pointer-events: none; }
.cal-cell.avail.av-available { background: color-mix(in srgb,var(--ok) 22%, #fff); }
.cal-cell.avail.av-tentative { background: color-mix(in srgb,var(--warn) 22%, #fff); }
.cal-cell.avail.av-unavailable { background: color-mix(in srgb,var(--danger) 20%, #fff); }
.cal-cell.avail.today .cal-num { font-weight: 800; color: var(--brand); }
.cal-cell.avail.has-job { box-shadow: inset 0 0 0 2px var(--brand); }
.avail-note-hint { margin-top: 1rem; font-size: .82rem; display: flex; align-items: center; gap: .5rem; }

/* Crew login */
.crew-login { background: var(--brand-2); }
.clogin-hero { position: relative; min-height: 100vh; overflow: hidden; color: #fff; padding: env(safe-area-inset-top) 1.3rem 2rem;
  display: flex; align-items: center; background: linear-gradient(165deg,#0b1120,#161f36 55%,#0b1120); }
.clogin-hero::before { content:""; position:absolute; inset:0;
  background: radial-gradient(600px 380px at 80% 0%, color-mix(in srgb,var(--brand) 55%, transparent), transparent 60%); }
.clogin-grid { position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.05) 1px,transparent 1px);
  background-size: 40px 40px; }
.clogin-inner { position: relative; width: 100%; max-width: 420px; margin-inline: auto; }
.clogin-title { font-size: clamp(2.4rem,10vw,3.4rem); margin: 1.6rem 0 .6rem; }
.clogin-sub { color: rgba(255,255,255,.75); margin-bottom: 1.6rem; }
.clogin-card { background: #fff; color: var(--ink); border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-lg); }
.clogin-back { display: block; text-align: center; margin-top: 1.3rem; color: rgba(255,255,255,.75); font-size: .88rem; }

@media (min-width: 620px){
  .crew-app { margin-top: 0; border-radius: 0; }
}
