/* shell area styles: sign-in pages, Today, Getting started, Team, Account, Settings. Owned by the shell agent. Uses base.css tokens. */

/* ---------- Sign-in, sign-up, invite, reset, verify ----------
   Phones: one plain column on white, the product name at the top. Desktop: an asphalt panel with the day as tickets on
   the left, the form on the right. */
.auth-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); background: var(--surface); }
.auth-aside { display: none; }
.auth-main { display: grid; align-content: start; justify-items: center; gap: 20px; padding: calc(24px + var(--safe-top)) calc(16px + var(--safe-right)) calc(32px + var(--safe-bottom)) calc(16px + var(--safe-left)); min-width: 0; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: var(--fs-18); letter-spacing: -.01em; color: var(--ink); width: 100%; max-width: 420px; }
.auth-card { width: 100%; max-width: 420px; padding: 0; margin: 0; border: 0; background: none; }
.auth-card h1 { font-size: var(--fs-28); line-height: 1.15; margin: 4px 0 8px; }
.auth-lede { color: var(--ink-2); font-size: var(--fs-18); line-height: 1.4; margin-bottom: 24px; }
.auth-card > h1 + .auth-form, .auth-card > h1 + .invite-role, .auth-card > h1 + .callout { margin-top: 20px; }
.auth-form { gap: 18px; }
.auth-form .btn-primary { width: 100%; min-height: 52px; font-size: var(--fs-18); }
.auth-form .form-actions { margin-top: 6px; }
.auth-form .secondary, .auth-form .form-actions .btn-ghost { width: 100%; }
.auth-card hr { margin: 24px 0 8px; }
.auth-foot { width: 100%; max-width: 420px; color: var(--ink-2); font-size: var(--fs-15); margin: 8px 0 0; }
.auth-help { margin-top: 8px; }
.auth-help summary { cursor: pointer; color: var(--blue); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
/* Links on the sign-in pages ("Forgot your password?", "Create a free account", "Sign in"): 44px to tap. */
.auth-card a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.auth-help p { margin-top: 4px; }
.auth-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; color: var(--ink-2); font-size: var(--fs-15); }
.auth-points li { display: flex; gap: 10px; align-items: flex-start; }
.auth-points svg { color: var(--done); flex: none; margin-top: 2px; }
.invite-role { display: grid; gap: 6px; justify-items: start; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-sunk); border: 1px solid var(--line); margin-bottom: 20px; }
.auth-card .callout { margin-bottom: 16px; }
.auth-done { display: grid; justify-items: start; gap: 12px; }
.auth-done .done-icon { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; align-items: center; justify-content: center; background: var(--done); color: #fff; }
.auth-done p { color: var(--ink-2); font-size: var(--fs-18); line-height: 1.4; }
/* "Forgot your password?" on a server without email: who can make a link instead. */
.auth-ways { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.auth-ways li { line-height: 1.5; }
.auth-command { display: block; margin-top: 8px; padding: 10px 12px; overflow-wrap: anywhere; white-space: normal; user-select: all; }
.auth-sample { display: grid; gap: 12px; width: 100%; max-width: 380px; --notch-bg: var(--rail); }
.auth-sample .ticket { --notch-bg: var(--rail); border-color: var(--rail); }
.auth-sample .ticket-in_progress .ticket-stub { box-shadow: inset 0 0 0 1px var(--rail-line); }

@media (min-width: 960px) {
  .auth-page { grid-template-columns: minmax(380px, 5fr) minmax(0, 7fr); }
  .auth-aside { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 40px 48px; background: var(--rail); color: var(--rail-ink);
    position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; }
  .auth-aside .auth-brand { color: var(--rail-ink); }
  .auth-pitch { font-size: var(--fs-36); font-weight: 700; line-height: 1.1; letter-spacing: -.015em; color: #fff; max-width: 11em; margin: 0; text-wrap: balance; }
  .auth-aside .auth-foot { color: var(--rail-ink-3); margin: 0; }
  .auth-main { align-content: center; padding: 48px 32px; }
  .auth-main > .auth-brand, .auth-main > .auth-foot { display: none; }
}
@media (min-width: 960px) and (max-height: 720px) { .auth-sample .ticket:nth-child(3) { display: none; } .auth-pitch { font-size: var(--fs-28); } }

/* ---------- Banner (email not confirmed) ---------- */
.app-banner { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--warn-soft); border-bottom: 1px solid var(--warn-line); color: var(--ink); font-size: var(--fs-15); }
.app-banner > span { display: flex; gap: 8px; align-items: flex-start; min-width: 0; overflow-wrap: anywhere; }
.app-banner svg { flex: none; margin-top: 2px; color: var(--warn); }
.app-banner .btn { background: var(--surface); }

/* ---------- Today ---------- */
.today-page .lede { display: flex; flex-wrap: wrap; gap: 0 4px; }
.today-jobs .card-head { padding-bottom: 0; margin-bottom: 4px; }
.today-empty { padding: 4px 16px 16px; }
.today-drafts { margin-bottom: 16px; }
.today-empty .empty { border: 0; padding: 24px 8px 12px; }
.job-row { align-items: flex-start; gap: 14px; }
.job-time { flex: none; width: 66px; display: grid; gap: 1px; font-variant-numeric: tabular-nums; font-weight: 650; font-size: .92rem; line-height: 1.3; padding-top: 1px; }
.job-time .muted { font-weight: 500; }
.job-who { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.job-who.is-missing { color: var(--warn); font-weight: 600; }
.job-row .row-end { align-self: center; }
@media (max-width: 420px) { .job-row { gap: 10px; } .job-time { width: 58px; font-size: .86rem; } .job-row .row-end .badge { padding: 1px 7px; } }

/* Getting started card on Today */
.setup-card { border-color: var(--brand-line); background: var(--surface); }
.setup-card .card-head { align-items: flex-start; margin-bottom: 10px; }
.setup-card .progress { margin-bottom: 16px; }
.eyebrow { font-size: var(--fs-15); font-weight: 600; color: var(--blue); margin: 0 0 2px; }
.setup-next { padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: 12px; }
.setup-next h3 { margin: 0 0 4px; font-size: 1.05rem; }
.setup-mini { list-style: none; margin: 0; padding: 0; display: none; gap: 0; }
@media (min-width: 640px) { .setup-mini { display: grid; } }
@media (min-width: 640px) { .setup-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; } }
.setup-mini-link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: .93rem; font-weight: 550; }
.setup-mini-link:hover { background: var(--surface-3); color: var(--text); }
.setup-mini .is-done .setup-mini-link { color: var(--muted); }
.setup-mini .is-done .setup-mini-link .grow { text-decoration: line-through; text-decoration-color: var(--line-strong); }
.step-mark { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line-strong);
  color: var(--muted); font-size: .8rem; font-weight: 700; background: var(--surface); font-variant-numeric: tabular-nums; }
.step-mark.is-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.step-mark.is-waiting { border-color: var(--warn); color: var(--warn); border-style: dashed; }

/* Getting started page */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.step { display: flex; gap: 14px; align-items: flex-start; margin: 0; }
.step .step-mark { width: 32px; height: 32px; font-size: .9rem; margin-top: 2px; }
.step-body { flex: 1 1 auto; min-width: 0; }
.step-body h2 { margin: 0; font-size: 1.05rem; }
.step-body p { margin: 6px 0 12px; }
.step.is-done { background: var(--surface-2); box-shadow: none; }
.step.is-done h2 { color: var(--muted); }
.step.is-next { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }

/* ---------- Team ---------- */
.team-row { align-items: center; }
.team-row.is-off { background: var(--surface-2); }
.team-row.is-off .row-title { color: var(--muted); }
.team-seen { font-size: var(--text-xs); color: var(--subtle); }
.invite-card { border-color: var(--brand-line); box-shadow: var(--shadow); }
.invite-card .card-head { margin-bottom: 4px; }
.roles-help summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.roles-help[open] summary { margin-bottom: 4px; }
.share-url { font-family: var(--mono); font-size: .88rem; }
.share-message { min-height: 120px; }
.share .btn-group .btn { flex: 1 1 auto; }
@media (min-width: 560px) { .share .btn-group .btn { flex: 0 0 auto; } }
@media (max-width: 559px) { .team-row .row-end { flex-direction: column; align-items: flex-end; gap: 6px; } .team-row.row-stack-phone .row-end { flex-direction: row; } }

/* ---------- Account and settings ---------- */
.account-who { display: flex; gap: 16px; align-items: center; }
.account-who .strong { font-size: var(--fs-18); font-weight: 700; }
.settings-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
/* Wide screens: the pages inside Settings (messages, automations, import and export, integrations, plan) beside the
   business details, so they are in view on arrival. Cards other areas add stay in the left column. */
@media (min-width: 1200px) {
  .settings-page.page-narrow { max-width: 1120px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); grid-template-rows: auto auto auto auto 1fr; column-gap: 24px; align-items: start; }
  .settings-page > * { grid-column: 1; }
  .settings-page > .page-head { grid-column: 1 / -1; }
  .settings-page > .settings-index { grid-column: 2; grid-row: 2 / -1; }
}

/* ---------- Today: Needs you ---------- */
.needs-card .card-head { margin-bottom: 0; }
.needs-group + .needs-group { border-top: 1px solid var(--line); }
.needs-group-title { margin: 0; padding: 12px 16px 2px; font-size: var(--fs-15); font-weight: 700; color: var(--ink-2); }
@media (min-width: 960px) { .needs-group-title { padding: 14px 20px 2px; } }
.needs-row { align-items: center; }
.needs-row .needs-action { pointer-events: none; }
.needs-money { font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; white-space: nowrap; }
.needs-more { color: var(--brand); font-weight: 600; min-height: 44px; }

/* "See every step explained" and other links in a card's foot: 44px to tap. */
.card-foot a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; }
.card-foot:has(> a:only-child) { padding-top: 0; padding-bottom: 0; }

/* ---------- Tips: "Add this to your home screen" (crew, first visit) ---------- */
.tip-card { border-color: var(--brand-line); background: var(--surface); }
.tip-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.tip-head h2 { margin: 0; flex: 1 1 auto; font-size: 1.05rem; }
.tip-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.tip-close { margin: -8px -8px -8px 0; color: var(--muted); }
.tip-steps { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 6px; }
.tip-address { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.tip-url { overflow-wrap: anywhere; user-select: all; }
.tip-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

/* Start with the work they do, then get a link that works once. */
.invite-card .invite-lead{max-width:52ch;margin:0 0 14px}
.invite-card .choices{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));align-items:stretch;gap:8px}
.invite-card .choice{min-width:0;min-height:60px;align-items:flex-start;gap:9px;padding:11px 10px;background:var(--surface);border-radius:8px}
.invite-card .choice:hover,.invite-card .choice:has(input:checked){border-color:var(--blue)}.invite-card .choice:focus-within{outline:2px solid var(--blue);outline-offset:2px}.invite-card .choice input{margin-top:4px}
.invite-card .invite-ready-share .input-group .btn{min-height:44px}
@media(max-width:420px){.invite-card .choices{grid-template-columns:1fr}.invite-card .invite-ready-share .input-group{flex-wrap:wrap}.invite-card .invite-ready-share .input-group .btn-primary{width:100%;min-height:48px}}
