#historyOrderLibraryPanel[hidden] { display: none; }
#historyOrderLibraryPanel { padding: 22px 0 14px; }
.history-order-heading { margin: 0 0 16px; font-size: 22px; color: #14263f; }
.history-order-toolbar { display: flex; align-items: flex-end; gap: 12px; padding: 18px 16px; margin-bottom: 14px; border: 1px solid var(--line, #dbe4f1); border-radius: 8px; background: #fff; }
.history-order-toolbar label { display: grid; gap: 7px; min-width: 220px; width: 360px; max-width: 50%; font-size: 12px; color: var(--muted, #70819a); }
.history-order-toolbar input { width: 100%; height: 38px; }
.history-order-toolbar > button { min-height: 38px; }
.history-order-create-button { margin-left: auto; white-space: nowrap; }
.history-order-maintenance-button { white-space: nowrap; }
.history-order-maintenance { margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--line, #dbe4f1); border-radius: 8px; background: #fff; font-size: 13px; }
.history-order-maintenance-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-order-maintenance-heading h4 { margin: 0; font-size: 15px; }
.history-order-maintenance p { margin: 10px 0 0; line-height: 1.6; }
.history-order-maintenance-diagnostics { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; color: var(--muted, #70819a); }
.history-order-maintenance-diagnostics strong { color: #14263f; font-variant-numeric: tabular-nums; }
.history-order-table-wrap { border: 1px solid var(--line, #dbe4f1); border-radius: 8px; overflow: auto; max-height: min(86vh, 1100px); overscroll-behavior: contain; scrollbar-gutter: stable; background: #fff; }
.history-order-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.history-order-table th { position: sticky; top: 0; z-index: 2; box-sizing: border-box; padding: 13px 20px; height: 50px; line-height: 24px; color: #14263f; background: #f5f7fa; border-bottom: 1px solid var(--line, #dbe4f1); border-right: 1px solid #e9eef6; font-size: 16px; font-weight: 650; }
.history-order-table th:nth-child(5), .history-order-table th:nth-child(6) { text-align: right; }
.history-order-table .column-resizer:focus { outline: 2px solid var(--blue, #3e62f6); outline-offset: -4px; }
.history-order-cell { position: relative; box-sizing: border-box; padding: 24px 40px 24px 20px !important; min-height: 74px; vertical-align: top; border-bottom: 1px solid var(--line, #dbe4f1); border-right: 1px solid #e9eef6; color: #1c2e49; font-size: 16px; line-height: 1.6; }
.history-order-cell:nth-child(5), .history-order-cell:nth-child(6) { text-align: right; padding-right: 33px !important; font-variant-numeric: tabular-nums; }
.history-order-table tr:last-child td { border-bottom: 0; }
.history-order-table td:last-child, .history-order-table th:last-child { border-right: 0; }
.history-order-value { white-space: pre-wrap; overflow-wrap: anywhere; }
.history-order-table .history-order-cell { font-size: 16px; line-height: 1.6; }
.history-order-cell:first-child .history-order-value { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-order-edit { position: absolute; right: 7px; top: 22px; opacity: 0; visibility: visible; pointer-events: none; transform: none; transition: opacity .12s; padding: 3px !important; color: #75849a !important; background: transparent !important; border: 0 !important; }
.history-order-edit .icon-svg { width: 17px; height: 17px; }
.history-order-cell:hover { background: #f8fbff; }
.history-order-cell:hover .history-order-edit, .history-order-cell:focus-within .history-order-edit { opacity: 1; pointer-events: auto; }
.history-order-cell.is-editing { padding: 12px !important; text-align: left; }
.history-order-cell input, .history-order-cell textarea { width: 100%; min-width: 0; }
.history-order-cell textarea { min-height: 90px; }
.history-order-edit-actions { display: flex; gap: 8px; margin-top: 10px; }
.history-order-edit-actions button { padding: 5px 10px; }
.history-order-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 14px; color: #62748e; font-size: 14px; }
.history-order-pagination { display: flex; gap: 12px; align-items: center; }
.history-order-pagination > button, .history-order-page-number { display: grid; place-items: center; min-width: 36px; height: 36px; border-radius: 6px; }
.history-order-page-number { border: 1px solid var(--blue, #3e62f6); color: var(--blue, #3e62f6); background: #f6f9ff; }
.history-order-create-form { margin: 0 0 16px; padding: 20px; border: 1px solid var(--line, #dbe4f1); border-radius: 8px; background: #fff; }
.history-order-create-form h4 { margin: 0 0 16px; }
.history-order-create-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.history-order-create-fields label { display: grid; gap: 7px; font-size: 13px; color: #62748e; }
.history-order-create-fields input, .history-order-create-fields textarea { width: 100%; }
.history-order-create-fields textarea { min-height: 64px; }
@media (max-width: 720px) { .history-order-toolbar { flex-wrap: wrap; } .history-order-toolbar label { flex: 1; max-width: none; } .history-order-create-fields { grid-template-columns: 1fr; } }
@media (hover: none) { .history-order-edit { opacity: .75; pointer-events: auto; } }
@media (prefers-reduced-motion: reduce) { .history-order-edit { transition: none; } }
