.work-head { display: flex; gap: 16px; justify-content: space-between; align-items: flex-end; margin: 0 0 20px; }
.work-head h1 { margin: 0; font-size: clamp(23px, 2.3vw, 31px); line-height: 1.25; }
.work-head p, .work-muted { color: var(--muted); margin: 6px 0 0; }
.work-panel {
    min-width: 0; background: var(--surface); border: 1px solid var(--line);
    border-radius: 13px; margin: 0 0 16px; padding: 18px 22px;
}
.work-panel h2 { font-size: 1.08rem; line-height: 1.4; margin: 0 0 14px; }
.work-panel summary { cursor: pointer; font-weight: 700; }
.work-panel details > summary { margin-bottom: 0; }
.work-form { display: grid; gap: 13px 16px; grid-template-columns: repeat(3, minmax(0,1fr)); margin-top: 12px; }
.work-form .wide { grid-column: 1 / -1; }
.work-form label, .work-filter label { display: grid; gap: 5px; font-weight: 600; color: var(--ink); font-size: .91rem; }
.work-form label.check, .work-filter label.work-check { display: flex; align-items: center; gap: 8px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
.work-form :is(input, select, textarea):not([type=checkbox]):not([type=hidden]), .work-filter :is(input, select):not([type=checkbox]), .work-inline-input {
    width: 100%; min-width: 0; border: 1px solid #bacbcc; background: var(--surface); color: var(--ink);
    border-radius: 8px; padding: 8px 11px; min-height: 40px; font: inherit; font-weight: 400;
}
.work-form input::placeholder, .work-filter input::placeholder { color: var(--muted); }
.work-form textarea { min-height: 66px; resize: vertical; }
.work-form fieldset { border: 1px solid var(--line); border-radius: 7px; min-width: 0; padding: 10px 14px; }
.work-form fieldset label { font-weight: 400; }
.work-chips { display: flex; flex-wrap: wrap; gap: 7px 13px; }
.work-filter, .work-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.work-filter label { min-width: min(150px,100%); flex: 1; }
.work-actions { align-items: center; }
.work-button {
    display: inline-flex; justify-content: center; align-items: center; border: 1px solid var(--accent);
    border-radius: 8px; min-height: 40px; padding: 7px 15px; background: var(--accent); color: #fff;
    font: inherit; font-size: .9rem; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.work-button:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.work-button.secondary { background: var(--surface); color: var(--accent-deep); border-color: #b7cecb; }
.work-button.secondary:hover { background: var(--accent-soft); border-color: #9bbdb8; }
.work-button.danger { background: #fff; color: #912f2a; border-color: #c89f99; }
.work-button.danger:hover { background: #fff1ef; border-color: #c99b92; }
.work-button.small { min-height: 32px; padding: 3px 9px; font-size: .85rem; }
.work-button:disabled { opacity: .5; cursor: not-allowed; }
.work-table { overflow: auto; }
.work-table table { width: 100%; border-collapse: collapse; }
.work-table th { color: #365361; background: #edf4f4; text-align: left; font-weight: 650; white-space: nowrap; }
.work-table th small { color: var(--muted); font-weight: 550; }
.work-table :is(th,td) { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.work-table tr:last-child td { border-bottom: 0; }
.work-table a:not(.work-button) { color: var(--accent-deep); text-decoration-color: #83aaa5; }
.work-table tbody tr:hover { background: #f5f9f8; }
.work-table td.work-actions { display: table-cell; }
.work-table td.work-actions a { display: inline-block; margin-right: 8px; white-space: nowrap; }
.import-preview-scroll {
    max-height: min(65vh, 38rem);
    border: 1px solid var(--line);
}
.import-preview-scroll:focus-visible { outline: 2px solid var(--accent-deep); outline-offset: 2px; }
.import-preview-scroll table { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 0; }
.import-preview-scroll thead { position: sticky; top: 0; z-index: 2; }
.import-preview-scroll .import-preview-groups th { background: #dfecec; }
.import-preview-scroll .import-source-column { min-width: 7rem; max-width: 22rem; white-space: pre-wrap; }
.import-preview-scroll td { max-width: 22rem; overflow-wrap: anywhere; }
.import-preview-scroll .import-preview-row-number { position: sticky; left: 0; z-index: 1; }
.import-preview-scroll td.import-preview-row-number { background: #fff; }
.import-preview-scroll tr:hover td.import-preview-row-number { background: #f5f9f8; }
@media (any-pointer: fine) {
    .import-preview-scroll table { cursor: grab; }
    .import-preview-scroll.is-dragging table { cursor: grabbing; user-select: none; }
}
.work-feedback, .work-errors { padding: 10px 15px; border: 1px solid; border-radius: 7px; margin-bottom: 14px; }
.work-feedback { background: #eaf6ef; color: #194732; border-color: #abcdbb; }
.work-errors { background: #fff2ef; color: #852f2a; border-color: #d5a4a0; }
.work-errors ul { margin: 0; padding-left: 21px; }
.work-tag { color: #285369; background: #e9f2f7; border-radius: 999px; display: inline-block; padding: 2px 9px; font-size: .85em; white-space: nowrap; }
.work-tag.done { color: #1c603a; background: #e2f3e9; }
.work-tag.overdue { color: #853f16; background: #fff0dc; }
.work-steps { margin: 0; display: flex; flex-wrap: wrap; gap: 5px; padding: 0; list-style: none; }
.work-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 12px 0 18px; }
.work-kpi { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: var(--surface); }
.work-kpi strong { font-size: 1.65rem; display: block; line-height: 1.16; font-variant-numeric: tabular-nums; }
.work-kpi span { color: var(--muted); }
.work-order-by { display: grid; gap: 8px; }
.work-order-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.work-order-pick select { flex: 1; }
.work-metadata { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.work-metadata div { border-bottom: 1px solid var(--line); padding: 8px; overflow-wrap: anywhere; }
.work-metadata dt { font-size: .85rem; color: var(--muted); }
.work-metadata dd { margin: 0; font-size: 1rem; white-space: pre-line; }
.work-empty { color: var(--muted); padding: 14px 0; }
.work-print-sheet { max-width: 210mm; margin: 0 auto; color: #192533; background: #fff; border: 1px solid var(--line); padding: 22px; }
.work-print-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; border-bottom: 2px solid #213445; padding-bottom: 12px; }
.work-print-header img { width: 27mm; height: 27mm; image-rendering: pixelated; }
.work-print-header .work-print-id { font-size: 1.15rem; font-weight: bold; }
.work-print-sheet table { width:100%; border-collapse: collapse; margin-top: 12px; }
.work-print-sheet :is(th,td) { border:1px solid #858e97; padding: 8px; text-align: left; }
.work-print-sheet .work-print-empty { min-width: 30mm; }
.work-board { font-size: clamp(15px,1.5vw,22px); }
@media(max-width:900px){ .work-form {grid-template-columns: repeat(2,minmax(0,1fr));} .work-kpis{grid-template-columns:repeat(2,minmax(0,1fr));} }
@media(max-width:580px){ .work-form,.work-metadata{grid-template-columns:1fr;} .work-head {align-items: flex-start; flex-direction: column;} .work-panel{padding:14px;} .work-table :is(th,td){padding: 6px 9px;} }
@media print {
    :is(.site-header,.site-footer,.skip-link,.work-no-print) { display: none !important; }
    body,.main-content { margin: 0 !important; padding: 0 !important; background: #fff !important; max-width: none !important; }
    .work-print-sheet { border: 0; padding: 0; max-width: none; }
    .work-print-sheet tr { break-inside: avoid; }
    .work-print-sheet table thead { display: table-header-group; }
}
