/* Shared workforce interface: contained forms, clear hierarchy, accessible controls. */
.workforce { --wf-accent: #3355c5; display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; min-width: 0; color: #172033; font-size: 14px; line-height: 1.5; }
.workforce h1 { font-size: clamp(25px,3vw,32px); font-weight: 650; letter-spacing: -.035em; line-height: 1.25; }
.workforce h2 { font-size: 17px; font-weight: 650; letter-spacing: -.015em; }
.workforce h3 { font-size: 14px; font-weight: 650; margin: 12px 0; }
.workforce p { color: #64748b; line-height: 1.7; }
.workforce > h1 + p { margin-top: -16px; }
.workforce a { color: var(--wf-accent); text-decoration: none; }
.workforce a:hover { color: #243c91; }
.wf-card { background: #fff; border: 1px solid #dce3ec; border-radius: 12px; padding: 24px; display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; min-width: 0; box-shadow: 0 2px 5px #17203303; }
.workforce form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; min-width: 0; max-width: 100%; }
.workforce .wf-field, .workforce .allocation-field { display: flex; flex: 1 1 180px; flex-direction: column; gap: 7px; min-width: 0; margin: 0; }
.workforce .wf-field:has(textarea) { flex-basis: 100%; }
.workforce .wf-field label, .workforce .allocation-field label { display: block; font-size: 12px; font-weight: 600; color: #475569; }
.workforce input:not([type=checkbox]):not([type=hidden]):not([type=submit]), .workforce select, .workforce textarea { box-sizing: border-box; width: 100%; min-width: 0; max-width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid #cbd5e1; border-radius: 7px; background-color: #fff; color: #1e293b; font: inherit; font-size: 13px; box-shadow: 0 1px 2px #0f172a03; transition: border-color .15s,box-shadow .15s; }
.workforce select { padding-right: 28px; }
.workforce input:hover, .workforce select:hover, .workforce textarea:hover { border-color: #94a3b8; }
.workforce input:focus, .workforce select:focus, .workforce textarea:focus { outline: none; border-color: #5572d9; box-shadow: 0 0 0 3px #5572d91a; }
.workforce textarea { resize: vertical; min-height: 90px; }
.workforce input[type=checkbox] { width: 16px; height: 16px; flex-shrink: 0; accent-color: var(--wf-accent); }
.workforce label:has(input[type=checkbox]) { display: inline-flex; align-items: center; gap: 9px; min-height: 42px; font-size: 13px; color: #475569; }
.workforce input[type=submit], .workforce button, .workforce .wf-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 1px solid var(--wf-accent); border-radius: 7px; background: var(--wf-accent); color: #fff; font-size: 13px; font-weight: 600; line-height: 1.5; cursor: pointer; transition: background .15s; }
.workforce input[type=submit]:hover, .workforce button:hover, .workforce .wf-button:hover { background: #2947ab; color: #fff; }
.workforce .wf-button-secondary { color: #475569; background: #fff; border-color: #d8e0ea; }
.workforce .wf-button-secondary:hover { background: #f1f5f9; color: #334155; }
.workforce .wf-button-danger { background: #fff; border-color: #fecaca; color: #b91c1c; }
.workforce .wf-button-danger:hover { background: #fff1f2; color: #991b1b; }
.workforce a:focus-visible, .workforce button:focus-visible, .workforce summary:focus-visible, .workforce input[type=submit]:focus-visible { outline: 2px solid var(--wf-accent); outline-offset: 3px; }
.workforce fieldset { width: 100%; min-width: 0; display: flex; flex-wrap: wrap; gap: 12px; border-top: 1px solid #e8edf3; padding-top: 16px; }
.workforce legend { font-size: 12px; font-weight: 600; color: #475569; padding-right: 12px; margin-bottom: 12px; }
.workforce fieldset label { padding: 8px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 7px; }
.workforce fieldset label:has(input[type=number]) { display: grid; gap: 8px; width: 220px; }
.workforce table { display: table; width: 100%; background: #fff; border-collapse: collapse; font-size: 13px; }
.workforce th { padding: 12px 18px; background: #f8fafc; text-align: left; color: #64748b; font-size: 11px; font-weight: 650; letter-spacing: .035em; }
.workforce td { padding: 16px 18px; border-top: 1px solid #edf0f5; text-align: left; color: #334155; font-variant-numeric: tabular-nums; }
.workforce tbody tr:hover { background: #fafbfd; }
.wf-table-wrap { border: 1px solid #dce3ec; border-radius: 12px; overflow-x: auto; background: #fff; }
.wf-card .wf-table-wrap { border-radius: 8px; }
.wf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.wf-page-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.wf-eyebrow { color: #64748b; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; }
.wf-breadcrumb { display: flex; gap: 8px; color: #94a3b8; font-size: 12px; }
.wf-breadcrumb a { color: #64748b; }
.wf-person { display: flex; align-items: center; gap: 16px; }
.wf-avatar { width: 48px; height: 48px; border: 1px solid #dce3ff; border-radius: 12px; background: #eef2ff; color: #465bb3; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 650; flex-shrink: 0; }
.wf-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dce3ec; border-radius: 20px; background: #f8fafc; color: #64748b; padding: 4px 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.wf-badge-active { background: #f0fdf4; border-color: #dcfce7; color: #15803d; }
.wf-badge-active::before { content: ''; width: 5px; height: 5px; background: #22c55e; border-radius: 50%; }
.wf-section-nav { display: flex; gap: 24px; overflow-x: auto; border-bottom: 1px solid #dce3ec; padding-bottom: 13px; }
.wf-section-nav a { font-size: 13px; font-weight: 500; color: #64748b; white-space: nowrap; }
.wf-section-nav a:hover { color: var(--wf-accent); }
.wf-card[id] { scroll-margin-top: 24px; }
.wf-section-heading { display: flex; align-items: flex-start; gap: 12px; }
.wf-section-heading > span { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid #e3e8f0; background: #f8fafc; border-radius: 8px; color: #64748b; font-size: 10px; font-weight: 650; flex-shrink: 0; }
.wf-section-heading p { font-size: 12px; margin-top: 4px; }
.wf-schedule { background: #fafbfd; border: 1px solid #e5eaf1; border-radius: 9px; padding: 20px; }
.workforce .wf-schedule { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); align-items: end; gap: 18px 16px; }
.workforce .wf-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: end; gap: 20px; }
.workforce .wf-form-footer { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 12px; border-top: 1px solid #e5eaf1; padding-top: 16px; margin-top: 4px; }
.workforce .wf-form-footer .wf-hint { margin-right: auto; max-width: 520px; }
.workforce .wf-hint { font-size: 12px; color: #64748b; }
.wf-schedule-record { border: 1px solid #e5eaf1; border-radius: 9px; background: #fff; overflow: hidden; }
.wf-schedule-record > summary { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 15px 18px; cursor: pointer; list-style: none; font-size: 13px; }
.wf-schedule-record > summary::-webkit-details-marker { display: none; }
.wf-schedule-record > summary::before { content: '›'; color: #94a3b8; font-size: 20px; line-height: 1; }
.wf-schedule-record[open] > summary::before { transform: rotate(90deg); }
.wf-schedule-record > summary strong { min-width: 95px; font-weight: 600; }
.wf-schedule-record > summary .wf-hint { margin-left: auto; }
.wf-schedule-record .wf-schedule { border: 0; border-top: 1px solid #e5eaf1; border-radius: 0; }
.wf-record-delete { padding: 0 20px 20px; background: #fafbfd; }
.workforce .wf-record-delete button { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.wf-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.wf-stat { padding: 20px 24px; background: #fff; border: 1px solid #dce3ec; border-radius: 10px; }
.wf-stat > span { display: block; color: #64748b; font-size: 12px; margin-bottom: 8px; }
.wf-stat > strong { font-size: 26px; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.wf-stat > small { display: block; color: #64748b; font-size: 11px; margin-top: 6px; }
.workforce .wf-empty { padding: 32px 24px; text-align: center; background: #fafbfd; border: 1px dashed #dce3ec; border-radius: 8px; color: #64748b; font-size: 13px; }
.workforce details:not(.wf-schedule-record) { width: 100%; font-size: 12px; color: #64748b; }
.workforce details:not(.wf-schedule-record) summary { cursor: pointer; padding: 8px 0; }
.workforce article { padding: 16px 0; border-top: 1px solid #edf0f5; }
.workforce ul { display: grid; gap: 8px; }
.workforce li { background: #fff; padding: 14px 18px; border: 1px solid #e2e8f0; border-radius: 8px; }
.workforce [role=alert] { width: 100%; padding: 14px 16px; border: 1px solid #fecaca; border-radius: 8px; background: #fff5f5; color: #991b1b; }
@media (max-width: 900px) { .workforce .wf-schedule { grid-template-columns: repeat(2,minmax(0,1fr)); } .workforce .wf-form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) { .workforce { gap: 20px; } .wf-page-header { flex-direction: column; align-items: flex-start; } .wf-card { padding: 18px; } .workforce .wf-schedule, .workforce .wf-form-grid { grid-template-columns: minmax(0,1fr); } .wf-stats { grid-template-columns: minmax(0,1fr); gap: 10px; } .wf-stat { padding: 16px 20px; } .workforce .wf-form-footer { justify-content: stretch; } .workforce .wf-form-footer input[type=submit] { width: 100%; } .wf-schedule-record > summary .wf-hint { margin-left: 0; width: 100%; } .wf-section-nav { gap: 20px; } .workforce .wf-field { flex-basis: 100%; } }
.workforce > header > p { margin-top: 8px; font-size: 13px; }
.workforce > form { background: #fff; border: 1px solid #dce3ec; border-radius: 12px; padding: 24px; }
.workforce > .wf-button { justify-self: start; }
.workforce > form:has(> .wf-card) { border: 0; padding: 0; background: transparent; }
.workforce .wf-card.wf-form-grid { width: 100%; }
.workforce .wf-card.wf-form-grid > details, .workforce .wf-card.wf-form-grid > .wf-field:has(textarea) { grid-column: 1 / -1; }

.production-model-card { scroll-margin-top: 24px; }
.production-model-card:target { border-color: #3355c5; box-shadow: 0 0 0 3px #3355c512; }
.workforce .production-model-card h3 { margin: 0; }

.production-full { grid-column: 1 / -1; width: 100%; }
.production-position { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1.4fr) minmax(90px,.6fr) auto; gap: 16px; align-items: start; padding: 20px 0; border-top: 1px solid #e5eaf1; }
.production-position > button { margin-top: 25px; }
.production-search { position: relative; }
.workforce .production-results { position: absolute; top: 72px; left: 0; right: 0; z-index: 20; display: block; max-height: 300px; overflow-y: auto; background: #fff; border: 1px solid #dce3ec; border-radius: 8px; box-shadow: 0 8px 24px #17203312; }
.workforce .production-results[hidden] { display: none; }
.workforce .production-results li { padding: 0; border: 0; border-radius: 0; }
.workforce .production-results button { display: block; width: 100%; text-align: left; padding: 12px; font-size: 13px; font-weight: 500; color: #172033; background: #fff; border: 0; border-radius: 0; cursor: pointer; }
.workforce .production-results button:hover, .workforce .production-results button[aria-selected=true] { background: #eef2ff; color: #2947ab; }
.production-step-form { padding: 16px 0; border-top: 1px solid #e5eaf1; }
.production-import-table, .production-import-table + .wf-form-footer { width: 100%; }
.production-import-table table { min-width: 950px; }
.production-import-table input[type=text] { width: 100%; min-width: 120px; }
.production-import-table select { margin-top: 8px; }
.production-import-finish { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; width: 100%; padding-top: 24px; border-top: 1px solid #e5eaf1; }
.workforce .production-error { color: #b91c1c; font-size: 12px; }
@media (max-width: 900px) { .production-position { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 600px) { .production-position { grid-template-columns: minmax(0,1fr); } .production-position > button { width: 100%; margin-top: 0; } }
