.allocation-guide { color: var(--ink); }
.main-content:has([data-panel="organizations"]:not(.hidden) #organizationPools:not(.hidden)) > .topbar { display: none; }
.allocation-container > .section-heading { justify-content: flex-end; margin-bottom: 8px; }
.allocation-container > .section-heading > div:first-child, .allocation-container > .form-hint { display: none; }
.allocation-intro { position: relative; }
.allocation-guide-refresh { float: right; }
.allocation-intro { margin: 0 0 24px; }
.allocation-intro h2 { margin: 12px 0 8px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.025em; }
.allocation-guide p { color: var(--muted); line-height: 1.6; }
.allocation-guide h3 { margin: 0 0 18px; font-size: 20px; }
.allocation-guide h4 { margin: 0 0 8px; font-size: 16px; }
.allocation-summary { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 24px; align-items: center; background: var(--soft); padding: 24px; margin-bottom: 24px; }
.allocation-summary > div { min-width: 0; }
.allocation-summary h3 { overflow-wrap: anywhere; margin-bottom: 12px; }
.allocation-summary strong { display: block; font-size: 28px; }
.allocation-summary span { color: var(--muted); line-height: 1.5; }
.allocation-status { display: inline-flex; align-items: center; gap: 8px; color: var(--warning) !important; background: #fff4e2; padding: 8px 10px; font-size: 14px; font-weight: 700; }
.allocation-status.pass { color: var(--success) !important; background: #eaf7f0; }
.allocation-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px 0 24px; }
.allocation-progress button { display: flex; gap: 12px; align-items: center; padding: 12px; min-height: 52px; background: var(--soft); color: var(--muted); border: 0; font-weight: 700; text-align: left; }
.allocation-progress button[aria-current] { background: #eaf0ff; color: var(--primary); }
.allocation-step-number { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 32px; background: #dce4f2; }
.allocation-step-number.complete { background: #eaf7f0; color: var(--success); }
.allocation-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 24px; align-items: start; }
.allocation-panel { background: var(--soft); padding: 24px; min-width: 0; }
.allocation-panel form, form.allocation-panel { display: grid; gap: 8px; }
.allocation-panel p { margin: 0 0 12px; }
.allocation-panel .form-hint { margin: 0 0 10px; }
.allocation-panel label { font-size: 15px; }
.allocation-guide input, .allocation-guide select { background: #fff; min-height: 46px; box-shadow: inset 0 0 0 1px #d8e1ee; }
.allocation-guide input:focus-visible, .allocation-guide select:focus-visible { outline: 3px solid #94aafa; outline-offset: 2px; }
.allocation-guide input[type=checkbox] { width: 22px; height: 22px; min-height: 22px; accent-color: var(--primary); box-shadow: none; }
.allocation-toggle { display: flex; flex-direction: row; align-items: center; gap: 14px; padding: 14px 0; }
.allocation-toggle span small { display: block; color: var(--muted); margin-top: 6px; font-weight: 400; }
.allocation-task, .allocation-condition { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding: 20px 0; border-bottom: 1px solid var(--line); }
.allocation-task p, .allocation-condition p { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.allocation-task .ghost-button, .allocation-condition .ghost-button { flex: 0 0 auto; min-height: 44px; color: var(--primary); background: #fff; }
.allocation-checks { display: grid; gap: 16px; margin-bottom: 24px; }
.allocation-checks .allocation-status { background: transparent; padding: 0; }
.allocation-note { background: #eaf0ff; padding: 16px; font-size: 14px; }
.allocation-notice { background: #fff4e2; color: var(--warning); padding: 24px; margin-bottom: 24px; }
.allocation-notice h3 { margin-bottom: 8px; }
.allocation-notice.pass { background: #eaf7f0; color: var(--success); }
.allocation-notice p { margin: 0; }
.allocation-error { color: var(--danger); background: #fff0f2; padding: 16px; margin-bottom: 20px; overflow-wrap: anywhere; }
.allocation-error .ghost-button { margin-left: 12px; background: #fff; }
.allocation-footer { display: flex; gap: 16px; justify-content: space-between; align-items: center; margin-top: 24px; background: white; padding: 16px 0; }
.allocation-footer button { min-height: 46px; }
.allocation-guide button:disabled { opacity: .5; cursor: not-allowed; }
.allocation-inspection-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.allocation-inspection-heading label { min-width: min(320px, 100%); }
.allocation-large-number { display: block; font-size: 48px; }
.allocation-management { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.allocation-management > summary { font-weight: 700; padding: 14px 0; cursor: pointer; color: var(--muted); }
.allocation-pool-cards > article { background: var(--soft); padding: 0 0 20px; margin-bottom: 24px; }
.allocation-pool-cards > article > button { margin-left: 24px; }
.allocation-pool-cards .allocation-summary { margin-bottom: 0; }
.allocation-plan-table th, .allocation-plan-table td { white-space: normal; }
.allocation-plan-table td { overflow-wrap: anywhere; }
.allocation-plan-table th:first-child { width: 50px; }
.allocation-return { background: #eaf0ff; padding: 12px 20px; margin-bottom: 20px; }
.allocation-return .ghost-button { background: transparent; color: var(--primary); }
.allocation-loading { padding: 12px 0; }
@media (max-width: 1100px) {
  .allocation-columns { grid-template-columns: minmax(0, 1fr); }
  .allocation-summary { grid-template-columns: repeat(3, 1fr); }
  .allocation-summary > div:first-child { grid-column: 1 / -1; }
  .allocation-progress { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .allocation-guide-refresh { float: none; margin-bottom: 12px; }
  .allocation-panel, .allocation-summary, .allocation-notice { padding: 18px; }
  .allocation-summary { gap: 16px; }
  .allocation-summary span { font-size: 12px; }
  .allocation-task, .allocation-condition, .allocation-inspection-heading { align-items: start; flex-direction: column; }
  .allocation-footer { flex-wrap: wrap; }
  .allocation-footer .primary-button { flex: 1 1 220px; }
  .allocation-plan-table { min-width: 450px; }
}
