/* Presentation layer shared by the customer and worker hosts.
   Keep content functional; reserve semantic colors for actual state and risk. */
:root {
  font-family: "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --canvas: #f6f7f9;
  --surface: #fff;
  --surface-soft: #f7f8fa;
  --ink: #252d3a;
  --muted: #616d7e;
  --muted-strong: #465365;
  --primary: #365a85;
  --primary-dark: #29476a;
  --primary-soft: #edf2f8;
  --navy: #365a85;
  --navy-2: #29476a;
  --blue-soft: #edf2f8;
  --line: #e2e6ec;
  --line-strong: #bcc6d2;
  --radius: 10px;
  --shadow: 0 8px 28px rgb(28 40 58 / 8%);
  --shadow-small: none;
}
body { font-size: 14px; line-height: 1.65; }
body:has(.task-auth-dialog[open]) { overflow: hidden; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, strong { font-weight: 600; }
.topbar { background: var(--surface); box-shadow: none; }
.brand-mark, .task-auth-mark { background: var(--primary); border-radius: 8px; box-shadow: none; }
.brand strong { letter-spacing: 0; font-weight: 600; }
.brand small { letter-spacing: 0; }
.avatar { background: var(--primary-soft); color: var(--primary); }
.sidebar { background: var(--surface); }
.nav-item { font-weight: 500; border-radius: 8px; }
.nav-item.active { background: var(--primary-soft); color: var(--primary); box-shadow: none; }
.nav-item:hover { transform: none; }
.support-card, .safety-card { background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; padding: 20px 6px 0; }
.support-card p, .safety-card p { font-size: 12px; color: var(--muted); }
.welcome-row { padding: 0; margin-bottom: 26px; background: none; border: 0; border-radius: 0; box-shadow: none; }
.welcome-row h1 { font-size: 28px; font-weight: 600; letter-spacing: 0; line-height: 1.4; margin-bottom: 6px; }
.welcome-row p:last-child { font-size: 14px; color: var(--muted); }
.eyebrow { color: var(--muted); font-weight: 500; letter-spacing: 0; }
.panel, .metric-grid article, .market-card, .work-card, .task-workspace { box-shadow: none; }
.panel-heading h2, .section-heading h2 { font-size: 20px; font-weight: 600; letter-spacing: 0; }
.field > span, .choice-card strong, .stepper strong { font-size: 13px; font-weight: 600; }
.field small, .choice-card small, .save-state, .material-heading p, .material-security-note, .privacy-note, .subtle { font-size: 12px; line-height: 1.65; }
.field input, .field select, .field textarea { font-size: 14px; border-radius: 7px; }
.primary-button, .secondary-button { font-size: 13px; font-weight: 600; border-radius: 7px; box-shadow: none; }
.primary-button { background: var(--primary); border-color: var(--primary); }
.primary-button:hover { background: var(--primary-dark); transform: none; }
.secondary-button { background: #fff; }
.material-builder, .formula-card, .explain-box, .money-flow { background: var(--surface-soft); border-radius: 8px; }
.material-heading h3 { font-size: 16px; }
.metric-icon { color: var(--muted) !important; background: var(--surface-soft) !important; border-radius: 8px; }
.metric-grid small, .metric-grid p, .money-flow span, .money-flow small, .table-row small, .profile-check small { font-size: 12px; }
.metric-grid strong { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.market-card p, .market-card small, .market-card li, .work-card p, .work-card small, .work-card li, .filter-strip > span { font-size: 12px; line-height: 1.7; }
.market-card h3, .work-card h3 { font-size: 16px; }
.tabs button, .table-row, .table-row strong, .profile-check strong, .notice span, .agreement { font-size: 13px; }
.task-auth-dialog { width: min(480px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.task-auth-dialog::backdrop { background: #f1f3f6; backdrop-filter: none; }
.task-auth-card { padding: 28px; }
.task-auth-heading { margin-bottom: 24px; gap: 12px; }
.task-auth-heading p { font-size: 12px; }
.task-auth-heading h1 { margin-top: 5px; font-size: 24px; font-weight: 600; }
.task-auth-mark { width: 40px; height: 40px; flex-basis: 40px; font-size: 18px; font-weight: 600; }
.task-auth-tabs { padding: 0; gap: 20px; background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
.task-auth-tabs button { padding: 0 0 10px; min-height: 38px; font-size: 14px; font-weight: 500; border-radius: 0; }
.task-auth-tabs button[aria-selected="true"] { background: none; color: var(--primary); box-shadow: 0 2px 0 var(--primary); }
.task-auth-status:empty { display: none; }
.task-auth-dialog form { gap: 16px; margin-top: 20px; }
.task-auth-dialog label { font-size: 13px; font-weight: 500; }
.task-auth-dialog label small { font-size: 12px; line-height: 1.6; }
.task-auth-dialog input { border-radius: 7px; font-size: 14px; }
.task-auth-primary, .task-auth-secondary { border-radius: 7px; font-size: 14px; font-weight: 600; }
.task-auth-primary { background: var(--primary); border-color: var(--primary); }
.task-auth-note { padding: 0; margin: 16px 0 8px; color: var(--muted); background: none; border: 0; border-radius: 0; }
.task-auth-note, .task-auth-note span { font-size: 12px; line-height: 1.65; }
.task-auth-environment { padding: 10px 12px; margin: 0 0 20px; color: #70541e; background: #faf7ee; border: 1px solid #e8dfc8; border-radius: 7px; font-size: 12px; line-height: 1.65; }
.task-registration-kinds { gap: 10px; }
.task-registration-kinds label { padding: 12px; border-radius: 7px; background: #fff; }
.task-registration-kinds label:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); box-shadow: none; }
.task-auth-dialog input[type="radio"], .task-auth-dialog input[type="checkbox"] { accent-color: var(--primary); }
.task-auth-dialog hr { margin: 22px 0; }
:focus-visible { outline: 3px solid #365a8580; outline-offset: 3px; }
@media (max-width: 720px) {
  .welcome-row h1 { font-size: 24px; }
  .panel-heading h2, .section-heading h2 { font-size: 18px; }
  .task-auth-card { padding: 22px; }
  .nav-item { font-size: 11px; }
  .metric-grid article { min-width: 0; }
  .metric-grid strong { font-size: 22px; }
  .metric-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Apple-inspired 2026 visual system: quiet content surfaces, one accent color,
   generous type, and translucent chrome only for navigation and controls. */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Helvetica Neue", "Microsoft YaHei UI", system-ui, sans-serif;
  --canvas: #f5f5f7;
  --surface: #fff;
  --surface-soft: #f7f7f9;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --muted-strong: #424245;
  --primary: #452540;
  --primary-dark: #321A2E;
  --primary-soft: #FFF0F4;
  --navy: #452540;
  --navy-2: #321A2E;
  --blue-soft: #FFF0F4;
  --teal: #00875a;
  --teal-soft: #eaf8f2;
  --green: #248a3d;
  --orange: #b85c00;
  --orange-soft: #fff5e8;
  --red: #d70015;
  --red-soft: #fff0f1;
  --line: rgb(0 0 0 / 8%);
  --line-strong: rgb(0 0 0 / 16%);
  --radius: 22px;
  --shadow: 0 2px 8px rgb(0 0 0 / 4%), 0 18px 50px rgb(0 0 0 / 7%);
  --shadow-small: 0 1px 3px rgb(0 0 0 / 4%), 0 8px 24px rgb(0 0 0 / 6%);
  --spring: cubic-bezier(.2, .8, .2, 1);
}

html { background: var(--canvas); }
body {
  color: var(--ink);
  background: radial-gradient(circle at 70% -20%, rgb(201 88 121 / 7%), transparent 34rem), var(--canvas);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, strong { font-weight: 600; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }

.topbar {
  height: 64px;
  border-bottom: 1px solid rgb(0 0 0 / 7%);
  background: rgb(255 255 255 / 78%);
  box-shadow: 0 1px 0 rgb(255 255 255 / 65%);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.app-shell { min-height: calc(100vh - 64px); }
.sidebar { top: 64px; height: calc(100vh - 64px); }
.brand { gap: 11px; }
.brand-mark, .task-auth-mark {
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 7px 18px rgb(69 37 64 / 16%);
  font-weight: 700;
}
.brand strong { color: var(--ink); font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.brand small { margin-top: 0; color: var(--muted); font-size: 12px; }
.top-actions { gap: 12px; }
.profile-copy strong { color: var(--ink); font-size: 14px; }
.profile-copy small { color: var(--muted); font-size: 12px; }
.avatar { color: var(--primary); background: var(--primary-soft); border: 0; box-shadow: inset 0 0 0 1px rgb(69 37 64 / 9%); }
.environment-badge { padding: 6px 10px; color: #8a4b00; background: #fff7e8; border-color: rgb(184 92 0 / 18%); font-size: 12px; font-weight: 600; }
.online-toggle { min-height: 44px; color: var(--muted-strong); font-size: 13px; }
.online-toggle span { box-shadow: inset 0 0 0 1px rgb(0 0 0 / 7%); }
.online-toggle input:checked + span { background: #34c759; }
.online-toggle:has(input:focus-visible) { border-radius: 999px; outline: 3px solid rgb(69 37 64 / 34%); outline-offset: 3px; }

.sidebar {
  background: rgb(255 255 255 / 82%);
  border-color: rgb(0 0 0 / 7%);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.sidebar nav { gap: 6px; }
.nav-item { min-height: 46px; padding: 8px 12px; color: var(--muted-strong); border-radius: 12px; font-size: 14px; font-weight: 550; transition: color 160ms ease, background 160ms ease; }
.nav-item > span { color: inherit; background: transparent; border: 0; border-radius: 9px; font-size: 13px; font-weight: 650; }
.nav-item:hover { color: var(--ink); background: rgb(0 0 0 / 4%); transform: none; }
.nav-item.active { color: var(--primary); background: var(--primary-soft); box-shadow: inset 0 0 0 1px rgb(69 37 64 / 5%); }
.nav-item.active > span { color: #fff; background: var(--primary); }
.support-card, .safety-card { padding: 20px 6px 0; color: var(--muted-strong); background: transparent; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.support-card strong, .safety-card strong { font-size: 14px; }
.support-card p, .safety-card p { margin-block: 7px 11px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.support-card a, .safety-card a, .support-card button, .safety-card button, .text-button { color: var(--primary); font-size: 13px; font-weight: 600; }

.main-content { max-width: 1320px; }
.welcome-row { padding: 4px 2px 10px; margin-bottom: 26px; overflow: visible; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.welcome-row h1 { margin-bottom: 7px; color: var(--ink); font-size: clamp(32px, 4vw, 44px); font-weight: 650; line-height: 1.08; letter-spacing: -.04em; }
.welcome-row p:last-child { color: var(--muted); font-size: 16px; line-height: 1.5; }
.eyebrow { color: var(--primary); font-size: 13px; font-weight: 650; letter-spacing: .02em; text-transform: none; }
.date-chip { min-height: 42px; padding: 10px 14px; color: var(--muted-strong); border-color: var(--line); border-radius: 999px; font-size: 13px; font-weight: 550; }

.panel, .metric-grid article, .task-workspace, .work-card { background: var(--surface); border-color: var(--line); border-radius: var(--radius); box-shadow: var(--shadow-small); }
.panel { overflow: clip; }
.panel-heading { padding: 26px 28px 20px; }
.panel-heading h2, .section-heading h2 { color: var(--ink); font-size: 22px; font-weight: 650; line-height: 1.2; letter-spacing: -.025em; }
.section-block { margin-top: 36px; }
.section-heading { margin-bottom: 14px; }
.save-state, .status-pill, .privacy-badge { border-radius: 999px; font-size: 12px; font-weight: 600; }
.save-state { padding: 6px 10px; color: var(--muted-strong); background: var(--surface-soft); }

.field { gap: 8px; }
.field > span, .choice-card strong, .stepper strong, .agreement { color: var(--ink); font-size: 14px; font-weight: 600; }
.field small, .choice-card small, .save-state, .material-heading p, .material-security-note, .privacy-note, .subtle { color: var(--muted); font-size: 13px; line-height: 1.55; }
input, select, textarea, .field input, .field select, .field textarea {
  min-height: 48px;
  padding: 11px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 16px;
  box-shadow: inset 0 1px 2px rgb(0 0 0 / 2%);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
textarea, .field textarea { line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #98989d; }
input:hover, select:hover, textarea:hover { border-color: rgb(0 0 0 / 28%); }
input:focus, select:focus, textarea:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgb(69 37 64 / 13%); }

.primary-button, .secondary-button, .danger-button, .task-auth-primary, .task-auth-secondary { min-height: 44px; padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: none; transition: transform 160ms var(--spring), background 160ms ease, border-color 160ms ease; }
.primary-button, .task-auth-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.primary-button:hover, .task-auth-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.secondary-button, .task-auth-secondary { color: var(--primary); background: #fff; border-color: var(--line-strong); }
.secondary-button:hover, .task-auth-secondary:hover { background: var(--primary-soft); border-color: rgb(69 37 64 / 22%); transform: none; }
.danger-button { color: #fff; background: var(--red); border-color: var(--red); }
.primary-button:active, .secondary-button:active, .danger-button:active { transform: scale(.98); }
button:disabled { opacity: .46; filter: grayscale(.25); }

.stepper { padding-inline: 28px; }
.stepper li { color: #8e8e93; }
.stepper li > span { width: 32px; height: 32px; background: var(--surface-soft); border: 1px solid var(--line-strong); font-size: 13px; }
.stepper li.active > span { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 5px var(--primary-soft); }
.stepper li.complete > span { background: var(--green); border-color: var(--green); }
.stepper li.complete { color: var(--green); }
.stepper li:not(:last-child)::after { height: 1px; }
.form-step { padding: 28px; }
.material-builder, .formula-card, .explain-box, .money-flow, .task-description, .criteria-preview, .work-meta div, .work-criteria, .delivery-criteria, .prepayment-receipt { background: var(--surface-soft); border-color: var(--line); border-radius: 16px; }
.material-builder { padding: 20px; }
.material-heading h3 { font-size: 17px; }
.material-row { border-radius: 14px; box-shadow: none; }
.choice-card, .payment-card { min-height: 80px; border-color: var(--line-strong); border-radius: 16px; }
.choice-card:hover, .payment-card:hover { transform: translateY(-1px); border-color: rgb(69 37 64 / 36%); box-shadow: var(--shadow-small); }
.choice-card.selected, .payment-card.selected { color: var(--ink); background: var(--primary-soft); border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.choice-icon, .pay-logo { border-radius: 12px; }
.explain-box { color: #744300; background: var(--orange-soft); border-color: rgb(184 92 0 / 14%); }
.explain-box > span { background: #ff9f0a; border-radius: 10px; }
.criterion > span { color: var(--primary); background: var(--primary-soft); }
.formula-card { color: var(--ink); background: var(--teal-soft); border-color: rgb(0 135 90 / 12%); }
.formula-card strong { font-size: 14px; }
.formula-card small { font-size: 12px; }
.prepayment-receipt > strong { color: var(--ink); font-size: 32px; font-weight: 650; letter-spacing: -.03em; }
.receipt-line, .summary-list dt, .summary-list dd { font-size: 13px; }
.wizard-actions { padding: 16px 28px; background: rgb(255 255 255 / 84%); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); }

.metric-grid { gap: 14px; }
.metric-grid article { min-height: 112px; padding: 20px; }
.metric-icon { color: var(--primary) !important; background: var(--primary-soft) !important; border-radius: 12px; }
.metric-grid small, .metric-grid p, .money-flow span, .money-flow small, .table-row small, .profile-check small { font-size: 13px; }
.metric-grid strong { color: var(--ink); font-size: 28px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.market-list { gap: 12px; padding: 12px; background: var(--surface-soft); }
.market-card { padding: 22px; background: #fff; border: 1px solid var(--line); border-radius: 18px; transition: transform 180ms var(--spring), box-shadow 180ms ease; }
.market-card:hover { background: #fff; transform: translateY(-2px); box-shadow: var(--shadow-small); }
.market-card p, .market-card small, .market-card li, .work-card p, .work-card small, .work-card li, .filter-strip > span { font-size: 13px; line-height: 1.55; }
.market-card h3, .work-card h3 { font-size: 17px; line-height: 1.35; }
.budget strong { color: var(--ink); font-size: 22px; font-weight: 650; }
.task-tags span, .status-pill { min-height: 26px; padding-inline: 9px; font-size: 12px; }
.tabs { padding: 4px; background: #ededf0; border: 0; border-radius: 10px; }
.tabs button { min-height: 34px; padding-inline: 14px; border-radius: 8px; font-size: 13px; font-weight: 550; }
.tabs button.active { color: var(--ink); box-shadow: 0 1px 4px rgb(0 0 0 / 12%); }
.filter-strip { padding: 13px 24px; background: var(--surface-soft); }
.work-board { gap: 14px; }
.work-card { padding: 20px; border-radius: 18px; }
.work-meta span, .work-actions p, .customer-mini, .owned-materials p, .owned-materials small { font-size: 12px; }
.work-meta strong, .owned-materials strong { font-size: 13px; }
.money-flow { padding: 18px; }
.money-flow strong { color: var(--ink); font-size: 20px; }
.table-row { min-height: 64px; font-size: 14px; }
.table-row strong { font-size: 14px; }
.profile-check { min-height: 64px; }
.profile-check strong { font-size: 14px; }
.profile-check > span { font-size: 12px; }

.task-workspace { overflow: hidden; }
.task-list { background: var(--surface-soft); }
.task-card { border-radius: 14px; }
.task-card:hover, .task-card.selected { background: #fff; transform: none; box-shadow: var(--shadow-small); }
.task-card h3, .detail-section h3 { font-size: 15px; }
.task-card-meta, .detail-top p, .frozen-grid p, .frozen-criteria li, .update-row strong, .review-card, .delivery-card { font-size: 13px; }
.task-detail { padding: 28px; }
.detail-top h2 { font-size: 24px; font-weight: 650; letter-spacing: -.02em; }
.budget-number strong { color: var(--ink); font-size: 24px; }
.frozen-grid > div, .review-card, .delivery-card, .reference-materials, .dispute-party { border-radius: 14px; }
.delivery-card pre { font-size: 13px; }
.score-ring { background: var(--primary); }
.progress-track i { background: var(--primary); }
.reference-materials { background: var(--surface-soft); border-color: var(--line); }
.stepper small, .material-detected, .material-provider, .reference-materials li small, .reference-materials > p,
.timeline li, .frozen-grid span, .frozen-criteria span, .frozen-criteria small, .update-row p, .update-row time,
.delivery-heading small, .delivery-card > p, .delivery-evidence, .score-copy small, .settlement-split span,
.settlement-note, .dispute-party ol, .dispute-party dl, .owned-materials li > span, .work-progress span,
.accept-summary span, .accept-summary p, .criteria-detail strong, .criteria-detail p, .criteria-detail small,
.criteria-empty, .work-criteria > strong, .delivery-criteria > strong, .dispute-detail, .dispute-statement,
.money-flow small, .profile-check small { font-size: 12px; line-height: 1.55; }
.reference-materials li strong, .update-row strong, .delivery-heading strong, .score-copy strong,
.settlement-split strong, .owned-materials li strong, .work-meta strong { font-size: 13px; }
.task-auth-account summary, .task-auth-account button, .task-auth-account-kind { font-size: 12px; }

.modal, .task-session-dialog, .task-auth-dialog { border: 1px solid rgb(255 255 255 / 55%); border-radius: 24px; box-shadow: 0 28px 90px rgb(0 0 0 / 24%); }
.modal { max-height: calc(100dvh - 32px); overflow: auto; }
.modal::backdrop, .task-session-dialog::backdrop, .task-auth-dialog::backdrop { background: rgb(29 29 31 / 34%); backdrop-filter: saturate(120%) blur(14px); -webkit-backdrop-filter: saturate(120%) blur(14px); }
.modal form, .dialog-body { padding: 28px; }
.dialog-body > h2 { margin: 0 0 10px; color: var(--ink); font-size: 24px; font-weight: 650; letter-spacing: -.025em; }
.dialog-body > p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.modal-heading h2, .task-session-dialog h2 { font-size: 24px; font-weight: 650; letter-spacing: -.025em; }
.close-button, .task-session-dialog header button { width: 38px; height: 38px; color: var(--muted-strong); background: #f2f2f4; border: 0; border-radius: 50%; }
.notice, .modal-note, .task-session-intro { padding: 13px 14px; border-radius: 14px; font-size: 13px; }
.notice strong, .notice span { font-size: 13px; }
.modal .modal-actions { position: sticky; bottom: -28px; margin: 22px -28px -28px; padding: 16px 28px 22px; background: rgb(255 255 255 / 88%); border-top: 1px solid var(--line); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.toast { right: 24px; bottom: 24px; padding: 14px 18px; color: #fff; background: rgb(29 29 31 / 88%); border: 1px solid rgb(255 255 255 / 16%); border-radius: 14px; box-shadow: 0 18px 50px rgb(0 0 0 / 22%); backdrop-filter: blur(18px); font-size: 14px; }

.task-auth-dialog { width: min(500px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); }
.task-auth-card { padding: 32px; }
.task-auth-heading { margin-bottom: 22px; flex-direction: column; align-items: center; gap: 0; text-align: center; }
.task-auth-heading > div { margin-top: 20px; width: 100%; }
.task-auth-heading .page-brand-tagline { margin: 8px 0 0; color: var(--primary); font-size: 14px; }
.task-auth-heading p { color: var(--muted); font-size: 13px; }
.task-auth-heading h1 { margin-top: 4px; font-size: 28px; font-weight: 650; letter-spacing: -.035em; }
.task-auth-mark { width: 44px; height: 44px; flex-basis: 44px; font-size: 18px; }
.task-auth-tabs { padding: 4px; gap: 4px; background: #ededf0; border: 0; border-radius: 11px; }
.task-auth-tabs button { min-height: 38px; padding: 0 10px; color: var(--muted-strong); border-radius: 9px; font-size: 14px; font-weight: 550; }
.task-auth-tabs button[aria-selected="true"] { color: var(--ink); background: #fff; box-shadow: 0 1px 5px rgb(0 0 0 / 14%); }
.task-auth-status:empty { display: none; }
.task-auth-dialog form { gap: 17px; margin-top: 20px; }
.task-auth-dialog label { color: var(--ink); font-size: 14px; font-weight: 550; }
.task-auth-dialog label small { font-size: 13px; line-height: 1.5; }
.task-auth-dialog input { min-height: 48px; border-radius: 12px; font-size: 16px; }
.task-auth-note { padding: 13px 14px; margin: 15px 0; color: var(--muted-strong); background: var(--surface-soft); border: 0; border-radius: 14px; }
.task-auth-note, .task-auth-note span, .task-auth-security, .task-auth-welcome, .task-auth-brandline { font-size: 13px; line-height: 1.55; }
.task-auth-welcome, .task-auth-brandline { color: var(--muted); text-align: center; }
.task-auth-security { color: var(--muted); background: var(--surface-soft); }
.task-auth-environment { padding: 12px 14px; margin-bottom: 20px; color: #744300; background: var(--orange-soft); border-color: rgb(184 92 0 / 14%); border-radius: 14px; font-size: 13px; }
.task-registration-kinds { gap: 10px; }
.task-auth-dialog .task-registration-kinds label { padding: 14px; background: #fff; border-radius: 14px; }
.task-auth-dialog .task-registration-kinds label:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.task-auth-dialog input[type="radio"], .task-auth-dialog input[type="checkbox"] { accent-color: var(--primary); }
.task-session-row { min-height: 68px; border-radius: 14px; }
.task-session-row strong { font-size: 14px; }
.task-session-row small { font-size: 12px; }

:focus-visible { outline: 3px solid rgb(69 37 64 / 34%); outline-offset: 3px; }

@media (max-width: 480px) {
  .brand > .page-brand-role:last-child { display: none; }
}

@media (max-width: 720px) {
  .topbar { padding-inline: 14px; }
  .main-content { padding-inline: 14px; }
  .welcome-row h1 { font-size: 32px; }
  .welcome-row p:last-child { font-size: 15px; }
  .panel-heading h2, .section-heading h2 { font-size: 21px; }
  .task-auth-card { padding: 24px; }
  .task-auth-heading h1 { font-size: 25px; }
  .nav-item { min-height: 54px; font-size: 12px; }
  .metric-grid article { min-width: 0; min-height: 94px; }
  .metric-grid strong { font-size: 24px; }
  .sidebar { background: rgb(255 255 255 / 82%); box-shadow: 0 -1px 0 rgb(0 0 0 / 7%), 0 -8px 30px rgb(0 0 0 / 5%); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); }
  .modal { width: 100%; max-width: none; max-height: 92dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .modal .modal-actions { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}

@media (max-width: 820px) {
  .topbar { height: 64px; }
  .app-shell { min-height: calc(100vh - 64px); }
  .sidebar { position: fixed; z-index: 30; top: auto; bottom: 0; width: 100%; height: calc(68px + env(safe-area-inset-bottom)); padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid var(--line); }
  .sidebar nav { grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .nav-item { display: grid; justify-items: center; gap: 1px; min-height: 54px; padding: 2px 4px; font-size: 12px; }
  .nav-item > span { width: 26px; height: 26px; flex-basis: 26px; font-size: 12px; }
  .support-card, .safety-card { display: none; }
  .main-content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}


/* Password and email-code login share one compact switch in standalone hosts. */
.task-login-methods { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-bottom:16px; }
.task-login-methods button { min-height:44px; padding:8px 12px; border:1px solid var(--line,#d5dce6); border-radius:10px; background:transparent; color:inherit; }
.task-login-methods button[aria-selected="true"] { font-weight:700; background:var(--surface-2,#eef2f7); }
.task-auth-code-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; align-items:stretch; }
.task-auth-code-row input { min-width:0; }
.task-auth-code-send { min-height:44px; padding:8px 12px; white-space:nowrap; }
