/* Shared ERP form system. */
:root { --card: #fff; --sidebar: #10251b; --sidebar2: #0d1d16; --danger: #dc3545; --warning: #e0a100; }
* { box-sizing: border-box; }
body { margin: 0px; }
a { text-decoration: none; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0px auto 0px 0px; z-index: 1040; transition: 0.22s; }
.brand { height: 92px; padding: 13px 18px; display: flex; align-items: center; border-bottom: 1px solid rgba(255, 255, 255, 0.09); background: rgba(0, 0, 0, 0.1); }
.brand-logo { object-fit: contain; object-position: left center; }
.brand-meta { min-width: 0px; }
.brand-name { font-weight: 800; }
.brand-version { margin-top: 3px; }
.side-section { padding: 18px 17px 7px; color: rgb(111, 147, 128); font-size: 11px; font-weight: 800; letter-spacing: 1.2px; }
.nav-item { display: flex; align-items: center; gap: 12px; color: rgb(207, 224, 213); border-radius: 10px; padding: 10px 13px; margin: 3px 0px; font-weight: 600; transition: 0.18s; }
.nav-item i { width: 21px; text-align: center; font-size: 17px; }
.nav-item:hover { background: rgba(0, 184, 90, 0.12); color: rgb(255, 255, 255); }
.nav-item.active { background: linear-gradient(90deg,var(--brand),var(--brand2)); color: rgb(255, 255, 255); box-shadow: rgba(0, 155, 77, 0.22) 0px 7px 16px; }
.sidebar-footer { border-top-width: 1px; border-top-style: solid; line-height: 1.7; }
.main-wrap { transition: 0.22s; }
.topbar { background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; z-index: 1030; }
.topbar-left { display: flex; align-items: center; gap: 15px; }
.menu-toggle { border: 1px solid var(--line); background: rgb(255, 255, 255); color: rgb(64, 83, 73); width: 40px; height: 40px; border-radius: 10px; font-size: 18px; }
.page-title { font-weight: 800; }
.breadcrumb-mini { font-size: 12px; color: rgb(138, 153, 143); margin-top: 3px; }
.top-actions { display: flex; align-items: center; gap: 9px; }
.db-badge { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid rgb(207, 230, 216); border-radius: 999px; background: rgb(243, 251, 246); color: rgb(22, 115, 70); font-size: 11px; font-weight: 800; }
.top-action { width: 40px; height: 40px; border: 1px solid var(--line); background: rgb(255, 255, 255); color: rgb(82, 101, 90); border-radius: 10px; display: grid; place-items: center; }
.top-action:hover { color: var(--brand); border-color: rgb(183, 223, 199); }
.user-chip { display: flex; align-items: center; gap: 9px; padding-left: 9px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; color: var(--brand-dark); display: grid; place-items: center; font-weight: 800; }
.user-name { font-weight: 700; font-size: 13px; }
.user-role { font-size: 11px; color: rgb(137, 152, 143); }
.content { max-width: 1800px; }
.content-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.content-header h1 { font-size: 23px; font-weight: 850; margin: 0px; }
.content-header p { margin: 5px 0px 0px; color: var(--muted); }
.card, .stat-card { border: 1px solid var(--line); border-radius: 15px; background: var(--card); box-shadow: rgba(23, 34, 28, 0.043) 0px 4px 16px; overflow: hidden; }
.stat-card { padding: 18px; min-height: 120px; position: relative; }
.stat-card .value { font-size: 27px; font-weight: 850; line-height: 1.1; }
.stat-card .label { font-size: 12px; color: var(--muted); margin-top: 8px; }
.stat-icon { width: 45px; height: 45px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; }
.icon-green { background: rgb(230, 247, 237); color: rgb(0, 155, 77); }
.icon-blue { background: rgb(233, 242, 255); color: rgb(52, 120, 216); }
.icon-orange { background: rgb(255, 241, 221); color: rgb(199, 121, 0); }
.icon-purple { background: rgb(240, 234, 255); color: rgb(118, 81, 200); }
.icon-cyan { background: rgb(229, 248, 251); color: rgb(19, 141, 160); }
.icon-red { background: rgb(255, 232, 234); color: rgb(217, 54, 72); }
.btn-primary { background: var(--brand); border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-outline-primary:hover { border-color: rgb(143, 203, 170); }
.form-control, .form-select { border: 1px solid rgb(213, 224, 216); border-radius: 9px; min-height: 39px; }
.table { margin-bottom: 0px; }
.table th { background: rgb(247, 250, 248); color: rgb(82, 99, 90); font-size: 12px; font-weight: 800; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: rgb(246, 251, 248); }
.badge { padding: 0.45em 0.68em; }
.page-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar { background: rgb(248, 250, 249); border: 1px solid var(--line); border-radius: 11px; padding: 12px; margin-bottom: 16px; }
.alert { border: 0px; }
.empty-state { text-align: center; padding: 42px 20px; color: rgb(146, 161, 151); }
.empty-state i { font-size: 36px; display: block; margin-bottom: 8px; }
.section-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; margin: 0px; }
.section-title i { color: var(--brand); }
.quick-link { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; color: rgb(51, 67, 58); background: rgb(255, 255, 255); transition: 0.18s; }
.quick-link:hover { border-color: rgb(185, 222, 200); background: rgb(247, 252, 249); transform: translateY(-1px); }
.quick-link i { font-size: 19px; color: var(--brand); }
.workflow { display: flex; align-items: center; gap: 0px; overflow: auto; padding: 4px 0px 9px; }
.wf-step { min-width: 130px; text-align: center; }
.wf-dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; margin: 0px auto 7px; background: var(--brand-soft); color: var(--brand); font-weight: 800; border: 1px solid rgb(191, 228, 205); }
.wf-name { font-size: 12px; font-weight: 700; color: rgb(70, 86, 77); }
.wf-line { height: 2px; background: rgb(207, 227, 214); min-width: 36px; flex: 1 1 0%; }
.mobile-overlay { display: none; }
.sidebar-collapsed .brand { justify-content: center; padding: 0px; }
.sidebar-collapsed .brand-logo { width: 46px; }
.sidebar-collapsed .brand-meta, .sidebar-collapsed .nav-text, .sidebar-collapsed .side-section, .sidebar-collapsed .sidebar-footer { display: none; }
.sidebar-collapsed .nav-item { justify-content: center; padding: 11px; }
.sidebar-collapsed .nav-item i { margin: 0px; }
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .main-wrap { margin-left: 0px; width: 100%; }
  .mobile-open .sidebar { transform: translateX(0px); }
  .mobile-open .mobile-overlay { display: block; position: fixed; inset: 0px; background: rgba(10, 24, 16, 0.42); z-index: 1035; }
  .sidebar-collapsed .sidebar { width: 270px; transform: translateX(-100%); }
  .sidebar-collapsed .main-wrap { margin-left: 0px; width: 100%; }
  .topbar { padding: 0px 15px; }
  .user-name, .user-role { display: none; }
}
.erp-toast-wrap { position: fixed; top: 72px; right: 22px; z-index: 3000; display: flex; flex-direction: column; gap: 10px; }
.erp-toast { min-width: 280px; max-width: 420px; padding: 12px 16px; border-radius: 10px; background: rgb(255, 255, 255); border: 1px solid rgb(219, 227, 234); box-shadow: rgba(15, 23, 42, 0.16) 0px 10px 30px; font-size: 14px; animation: 0.18s ease-out 0s 1 normal none running erpToastIn; }
.erp-toast.success { border-left: 4px solid rgb(22, 163, 74); }
.erp-toast.danger { border-left: 4px solid rgb(220, 38, 38); }
.erp-toast.warning { border-left: 4px solid rgb(245, 158, 11); }
.erp-toast.info { border-left: 4px solid rgb(37, 99, 235); }
@keyframes erpToastIn { 
  0% { opacity: 0; transform: translateY(-8px); }
  100% { opacity: 1; transform: translateY(0px); }
}
@keyframes erpToastOut { 
  100% { opacity: 0; transform: translateY(-8px); }
}
:root { --brand: #08a99f; --brand2: #08a99f; --brand-dark: #078c84; --brand-soft: #e5f6f3; --ink: #202839; --muted: #778297; --bg: #f4f4fa; --line: #e5e8ef; }
body { font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif !important; color: rgb(32, 40, 57) !important; background: rgb(244, 244, 250) !important; font-size: 14px !important; }
.app-shell { height: 100vh; overflow: hidden; }
.sidebar { width: 280px; color: rgb(48, 57, 67); box-shadow: none; border: 0px; display: flex; flex-direction: column; overflow: hidden; padding: 0px 12px; background: rgb(244, 244, 250) !important; }
.sidebar .brand { min-height: 60px; height: 60px; padding: 8px; gap: 8px; border: 0px; }
.brand-logo { width: 82px; height: 35px; flex-shrink: 0; filter: none; }
.brand-meta { margin: 0px; overflow: hidden; }
.brand-name { color: rgb(48, 57, 67); font-size: 14px; white-space: normal; }
.brand-version { color: rgb(119, 130, 151); font-size: 11px; }
.sidebar nav { overflow: auto; flex: 1 1 0%; padding: 4px 0px; scrollbar-width: thin; }
.sidebar-footer { font-size: 11px; color: rgb(119, 130, 151); border-color: rgb(229, 229, 237); padding: 10px; margin: 0px; }
.sidebar .nav-item { min-height: 40px; margin: 2px 0px; padding: 8px 10px; border-radius: 6px; color: rgb(48, 57, 67); font-size: 14px; font-weight: 400; box-shadow: none !important; }
.sidebar .nav-item i { color: rgb(38, 175, 224); font-size: 17px; }
.sidebar .nav-item.active { background: rgb(226, 226, 235); color: rgb(31, 40, 55); }
.sidebar .nav-item:hover { background: rgb(233, 233, 241); color: rgb(31, 40, 55); }
.reference-menu-search { padding: 8px 10px; border: 0px; background: transparent; width: 100%; outline: none; font-size: 13px; }
.reference-menu-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; height: 40px; padding: 8px; color: rgb(48, 57, 67); }
.reference-menu-group > summary::before { content: " "; width: 15px; height: 12px; background: rgb(255, 213, 110); border: 1px solid rgb(224, 180, 77); border-radius: 2px; }
.reference-menu-group > summary::after { content: "›"; margin-left: auto; color: rgb(146, 153, 169); }
.reference-menu-group[open] > summary::after { content: "⌄"; }
.reference-menu-group .nav-item { padding-left: 28px; }
.reference-menu-group [hidden] { display: none !important; }
.main-wrap { height: calc(-16px + 100vh); min-width: 0px; min-height: 0px; border: 1px solid rgb(236, 235, 242); border-radius: 12px; background: rgb(249, 249, 252); display: flex; flex-direction: column; overflow: hidden; margin: 8px 8px 8px 280px !important; width: calc(100% - 288px) !important; }
.topbar { height: 52px; min-height: 52px; position: relative; top: auto; padding: 0px 16px; border-bottom: 1px solid rgb(229, 232, 239); box-shadow: none; }
.page-title { font-size: 14px; }
.breadcrumb-mini { display: none; }
.user-chip { background: transparent; border: 0px; }
.avatar { background: rgb(237, 89, 100); }
.content { overflow: auto; flex: 1 1 0%; min-height: 0px; background: rgb(243, 245, 250); padding: 18px 20px !important; }
.document-brand { display: none !important; }
.content-header { background: transparent !important; border: 0px !important; box-shadow: none !important; padding: 0px !important; margin: 4px 0px 18px !important; }
.content-header h1, .content h1 { font-size: 22px; letter-spacing: 0px; }
.card { background: white; overflow: visible; border: 1px solid rgb(229, 232, 239) !important; border-radius: 6px !important; box-shadow: none !important; }
.card-header { padding: 14px 18px !important; background: white !important; border-bottom: 1px solid rgb(238, 240, 245) !important; color: rgb(48, 127, 197) !important; font-size: 14px !important; font-weight: 600 !important; }
.card-body { padding: 18px; }
.btn { font-size: 14px; font-weight: 400; padding: 8px 14px; border-radius: 5px !important; }
.btn-sm { font-size: 13px; padding: 6px 10px; }
.btn-primary, .btn-success { background: rgb(8, 169, 159); border-color: rgb(8, 169, 159); color: white; }
.btn-primary:hover, .btn-success:hover { background: rgb(7, 140, 132); border-color: rgb(7, 140, 132); }
.btn-outline-primary { background: rgb(237, 244, 255); color: rgb(34, 106, 196); border-color: rgb(217, 232, 255); }
.btn-outline-primary:hover { background: rgb(223, 236, 255); color: rgb(34, 106, 196); }
.form-control, .form-select, input:not([type="checkbox"]):not([type="radio"]), textarea { font-family: inherit; min-height: 38px; border-radius: 5px !important; border-color: rgb(216, 223, 233) !important; }
.form-control:focus, .form-select:focus { border-color: rgb(100, 159, 230) !important; box-shadow: rgb(234, 242, 253) 0px 0px 0px 3px !important; }
.form-label { font-size: 14px; font-weight: 500; color: rgb(38, 51, 71); }
.table { font-size: 14px !important; }
.table thead th, .table th { background: rgb(88, 103, 126) !important; color: white !important; font-weight: 500 !important; font-size: 13px !important; padding: 12px 14px !important; border: 0px !important; }
.table td { color: rgb(38, 51, 71); padding: 12px 14px !important; border-width: 0px 0px 1px !important; border-style: none none solid !important; border-color: currentcolor currentcolor rgb(237, 240, 246) !important; border-image: none !important; }
.table tbody tr:hover { background: rgb(249, 251, 255); }
.table input { min-width: 70px; }
.badge { border-radius: 4px; font-weight: 400; }
.alert { padding: 12px 16px; line-height: 1.7; border-radius: 5px !important; }
.alert-info { background: rgb(242, 247, 255); border: 1px solid rgb(220, 233, 252); color: rgb(73, 106, 147); }
.alert-warning { background: rgb(255, 249, 237); border: 1px solid rgb(242, 223, 186); color: rgb(148, 112, 58); }
.nav-tabs { gap: 20px; border-color: rgb(229, 232, 239); }
.nav-tabs .nav-link { border: 0px; background: transparent; color: rgb(109, 123, 144); padding: 12px 0px; }
.nav-tabs .nav-link.active { color: rgb(51, 125, 218); border-bottom: 3px solid rgb(51, 125, 218); background: transparent; }
.modal-backdrop { background: rgb(24, 41, 64); }
.modal-backdrop.show { opacity: 0.34; }
.modal-dialog, .modal-dialog.modal-fullscreen, .modal-dialog.modal-xl, .modal-dialog.modal-lg { width: calc(100% - 48px) !important; max-width: 1120px !important; height: auto !important; margin: 3vh auto !important; min-height: 0px !important; }
.modal-dialog.modal-sm { max-width: 660px !important; }
.modal-content { overflow: hidden; display: flex; flex-direction: column; max-height: 94vh !important; border: 0px !important; border-radius: 5px !important; box-shadow: rgba(22, 48, 76, 0.2) 0px 15px 60px !important; }
.modal-header { flex-shrink: 0; padding: 15px 22px !important; border-bottom: 1px solid rgb(229, 232, 239) !important; background: white !important; }
.modal-title { font-size: 17px; font-weight: 600; color: rgb(32, 40, 57); }
.dialog-brand { display: none !important; }
.modal-body { overflow: auto; min-height: 0px; padding: 20px 25px !important; }
.modal-footer { flex-shrink: 0; justify-content: flex-end; padding: 12px 25px !important; background: white !important; border-top: 1px solid rgb(229, 232, 239) !important; }
.modal-content > form { display: flex; flex-direction: column; min-height: 0px; max-height: 94vh; }
.modal-content > form > .modal-body { flex: 1 1 0%; }
.reference-frame-dialog .modal-content { height: 94vh; }
.reference-frame-dialog .modal-body { overflow: hidden; flex: 1 1 0%; padding: 0px !important; }
.reference-frame-dialog iframe { border: 0px; width: 100%; height: 100%; display: block; }
.reference-frame-dialog .window-status { font-size: 12px; color: rgb(119, 130, 151); margin-right: auto; }
.reference-frame-dialog .window-title { flex: 1 1 0%; margin: 0px 12px 0px 0px; }
.reference-frame-dialog .window-actions { display: flex; gap: 8px; }
.window-embedded .sidebar, .window-embedded .topbar, .window-embedded .document-brand, .window-embedded .mobile-overlay { display: none !important; }
.window-embedded .main-wrap { border: 0px; border-radius: 0px; margin: 0px !important; width: 100% !important; height: 100vh !important; }
.window-embedded .content { background: white; padding: 20px 25px !important; }
.window-embedded .content-header { display: flex; justify-content: flex-end; }
.window-embedded .content-header h1, .window-embedded .content-header h2, .window-embedded .content-header p { display: none; }
.window-embedded .app-shell { height: 100vh; }
.sidebar-collapsed .sidebar { width: 78px; }
.sidebar-collapsed .main-wrap { margin-left: 78px !important; width: calc(100% - 86px) !important; }
.sidebar-collapsed .reference-menu-search, .sidebar-collapsed .reference-menu-group > summary { display: none; }
.sidebar-collapsed .reference-menu-group > .nav-item { padding-left: 10px; }
@media (max-width: 991px) {
  .main-wrap, .sidebar-collapsed .main-wrap { height: 100vh; border-radius: 0px; margin: 0px !important; width: 100% !important; }
  .sidebar { width: 280px; }
  .content { padding: 15px !important; }
  .modal-dialog, .modal-dialog.modal-fullscreen, .modal-dialog.modal-xl, .modal-dialog.modal-lg { width: calc(100% - 10px) !important; margin: 1vh auto !important; }
  .modal-content, .reference-frame-dialog .modal-content { max-height: 98vh !important; }
  .reference-frame-dialog .modal-content { height: 98vh; }
  .modal-body, .window-embedded .content { padding: 15px !important; }
  .modal-header, .modal-footer { padding: 12px 15px !important; }
}
@media print {
  .sidebar, .topbar, .modal-backdrop, .modal-header, .modal-footer { display: none !important; }
  .app-shell, .main-wrap, .content { height: auto !important; overflow: visible !important; margin: 0px !important; width: 100% !important; background: white !important; }
  .table th { background: white !important; color: black !important; }
}
.content { width: 100%; margin: 0px auto; }
.modal.show { align-items: center; justify-content: center; display: flex !important; }
.window-embedded .sidebar-collapsed .main-wrap { margin: 0px !important; width: 100% !important; }
.window-embedded .content-header h5 { display: none; }
.erp-ui .content { background: rgb(255, 255, 255); max-width: none; padding: 20px 24px !important; }
.erp-ui .main-wrap { background: white; }
.erp-ui .topbar { background: rgb(248, 248, 252); }
.erp-ui .content h1 { font-size: 19px; font-weight: 600; }
.erp-ui .content h2:not(.accordion-header), .service-heading { position: relative; color: rgb(48, 125, 242); font-size: 14px; font-weight: 600; border-bottom: 4px solid rgb(213, 229, 255); padding: 8px 0px 13px; margin: 24px 0px 22px; }
.erp-ui .content h2:not(.accordion-header)::after, .service-heading::after { content: ""; height: 8px; width: 126px; max-width: 35%; border-radius: 0px 9px; background: rgb(48, 125, 242); position: absolute; bottom: -4px; left: 0px; }
.erp-ui .card { border: 0px !important; border-radius: 0px !important; }
.service-form { padding-bottom: 18px; }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 24px; }
.service-grid.two { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
.service-field { display: flex; flex-direction: column; gap: 9px; font-size: 14px; color: rgb(20, 36, 60); font-weight: 600; min-width: 0px; }
.service-field input, .service-field select, .service-field textarea { font-weight: 400; width: 100%; }
.service-span { grid-column: 1 / -1; }
.erp-ui .form-control, .erp-ui .form-select { min-height: 34px; border: 1px solid rgb(214, 220, 234); font-size: 14px; border-radius: 4px !important; }
.erp-ui input[readonly], .service-readonly { color: rgb(136, 146, 163); font-weight: 400; padding: 8px; min-height: 34px; background: rgb(247, 248, 250) !important; border-color: transparent !important; }
.service-hint { color: rgb(96, 115, 140); font-size: 13px; margin: 8px 0px 25px; }
.erp-ui .table th { background: rgb(240, 242, 246) !important; color: rgb(20, 36, 60) !important; border: 1px solid rgb(225, 229, 238) !important; font-weight: 400 !important; padding: 10px 8px !important; }
.erp-ui .table td { border: 1px solid rgb(225, 229, 238) !important; padding: 7px 8px !important; }
.service-table-wrap { overflow-x: auto; max-width: 100%; margin: 14px 0px; }
.erp-ui .table input { min-width: 60px; }
.erp-ui .table .service-product-search { min-width: 190px; }
.service-picker { position: relative; }
.service-results { position: absolute; top: 100%; left: 0px; min-width: 100%; max-height: 290px; overflow: auto; background: white; z-index: 1090; box-shadow: rgba(21, 44, 73, 0.19) 0px 5px 20px; font-weight: 400; }
.service-results button { border: 1px solid rgb(224, 229, 237); padding: 10px; font-size: 13px; white-space: normal; }
.service-priorities { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; min-height: 34px; }
.service-priorities label { display: flex; align-items: center; gap: 5px; font-weight: 400; cursor: pointer; }
.service-priorities input { width: 16px; height: 16px; accent-color: rgb(8, 169, 159); }
.service-tag { padding: 3px 7px; border-radius: 3px; color: white; background: rgb(66, 196, 121); font-size: 13px; }
.service-tag.urgent { background: rgb(244, 172, 0); }
.service-tag.critical { background: rgb(244, 78, 86); }
.service-footer { position: sticky; bottom: -20px; background: white; border-top: 1px dashed rgb(224, 229, 237); padding: 12px 0px; display: flex; gap: 8px; z-index: 20; margin-top: 28px; }
.service-footer .btn { min-width: 120px; }
.service-footer .btn-outline-secondary { border-color: rgb(213, 219, 231); color: rgb(38, 51, 71); }
.service-add { color: rgb(0, 172, 168); border: 0px; background: white; padding: 7px 15px; }
.service-steps { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; padding: 15px 0px; color: rgb(104, 126, 153); }
.service-steps span { padding: 6px 14px; background: rgb(241, 245, 250); border-radius: 20px; }
.service-steps .current { background: var(--brand); color: #fff; font-weight: 700; }
.service-steps .done { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; border: 1px solid var(--brand-dark); }
.erp-ui .nav-item i { width: 20px; min-width: 20px; flex: 0 0 20px; text-align: center; }
.erp-ui .service-purple { color: rgb(145, 112, 255) !important; }
.erp-ui .service-orange { color: rgb(255, 158, 59) !important; }
.service-metrics { display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 16px; margin: 20px 0px; }
.service-metric { border: 1px solid rgb(230, 233, 240); padding: 20px; color: rgb(88, 112, 139); background: rgb(255, 255, 255); border-radius: 5px; }
.service-metric strong { display: block; font-size: 30px; color: rgb(39, 55, 80); margin-top: 8px; }
.service-bars { display: grid; gap: 14px; }
.service-bars a { display: grid; grid-template-columns: 80px minmax(0px, 1fr) 50px; gap: 15px; align-items: center; color: rgb(52, 68, 92); }
.service-bars progress { width: 100%; height: 17px; accent-color: rgb(48, 125, 242); }
.service-field textarea { max-width: 800px; }
.service-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 16px 0px; }
.service-toolbar input { max-width: 350px; }
.erp-ui .content .btn { white-space: normal; }
.service-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 20px; }
.service-detail-grid small { display: block; color: rgb(117, 132, 152); margin-bottom: 7px; }
.service-detail-grid p { overflow-wrap: anywhere; }
.service-row-links { display: flex; gap: 12px; flex-wrap: wrap; }
.erp-ui .content .card p { overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .service-grid, .service-detail-grid { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
  .service-metrics { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
}
@media (max-width: 650px) {
  .service-grid, .service-grid.two, .service-detail-grid { grid-template-columns: 1fr; }
  .erp-ui .content { padding: 15px !important; }
  .service-footer { bottom: -15px; }
  .service-metrics { gap: 8px; }
  .service-metric { padding: 12px; }
  .service-toolbar { align-items: stretch; }
  .service-toolbar input { width: 100%; }
}
.erp-ui .card-header, .erp-ui .erp-form-section { position: relative; color: rgb(48, 125, 242) !important; background: rgb(255, 255, 255) !important; border-bottom: 4px solid rgb(213, 229, 255) !important; padding: 8px 0px 13px !important; margin: 22px 0px !important; font-size: 14px !important; font-weight: 600 !important; }
.erp-ui .card-header::after, .erp-ui .erp-form-section::after { content: ""; height: 8px; width: 126px; max-width: 35%; position: absolute; bottom: -4px; left: 0px; background: rgb(48, 125, 242); border-radius: 0px 9px; }
.erp-ui .card-header h2, .erp-ui .card-header h3, .erp-ui .card-header h4, .erp-ui .card-header h5 { color: inherit; font-size: 16px !important; border: 0px !important; padding: 0px !important; margin: 0px !important; }
.erp-ui .card-header h2::after { display: none; }
.erp-ui .card-body { padding: 12px 0px 20px; }
.erp-ui .erp-entry-form > .row { row-gap: 22px !important; }
.erp-ui label.form-label { font-weight: 600; color: rgb(20, 36, 60); margin-bottom: 8px; }
.erp-ui .form-control.bg-light { background: rgb(247, 248, 250) !important; border-color: transparent !important; }
.erp-ui .modal-body { background: white; }
.erp-ui .modal .modal-header { background: rgb(248, 248, 252) !important; }
.erp-ui .modal-footer { justify-content: flex-start; gap: 8px; padding-left: 24px !important; border-top: 1px dashed rgb(224, 229, 237) !important; }
.erp-ui .modal-footer .btn-primary, .erp-ui .modal-footer .btn-success { order: -1; min-width: 120px; }
.erp-ui .modal-footer > .btn-close { order: 2; }
.erp-form-actions { position: sticky; bottom: -20px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 24px; z-index: 25; width: 100%; background: white !important; padding: 12px 0px !important; border-width: 1px 0px 0px !important; border-style: dashed none none !important; border-color: rgb(224, 229, 237) currentcolor currentcolor !important; border-image: none !important; }
.erp-form-actions .btn-primary, .erp-form-actions .btn-success { min-width: 120px; }
.erp-ui .content .card-footer { background: white; border-top: 1px dashed rgb(224, 229, 237); }
.erp-ui .btn-close { flex-shrink: 0; }
.erp-ui .table-responsive { max-width: 100%; }
.erp-ui .table td { overflow-wrap: anywhere; }
.erp-toast-wrap { pointer-events: auto; }
.erp-toast .btn-close { font-size: 10px; }
.erp-ui .sidebar .brand { background: transparent; }
.erp-ui .form-control[readonly] { cursor: default; }
.erp-ui .reference-frame-dialog .modal-footer { padding-top: 8px !important; padding-bottom: 8px !important; }
.erp-ui .reference-frame-dialog .window-status { max-width: 100%; white-space: normal; }
.erp-ui .reference-frame-dialog .window-actions:empty { display: none; }
.erp-ui .content .accordion-header { padding: 0px; margin: 0px; border: 0px; color: inherit; font-size: inherit; }
.erp-ui .content .accordion-header::after { display: none; }
@media (max-width: 650px) {
  .erp-form-actions { bottom: -15px; }
  .erp-ui .content .card-header { flex-wrap: wrap; gap: 12px; }
  .erp-ui .content .card-body { padding: 12px 0px; }
  .erp-ui .erp-entry-form .col-md-3, .erp-ui .erp-entry-form .col-md-4, .erp-ui .erp-entry-form .col-md-6 { width: 100%; }
  .erp-ui .modal-footer { padding-left: 15px !important; }
  .erp-toast-wrap { left: 12px; right: 12px; }
  .erp-toast { min-width: 0px; max-width: 100%; }
}
@media print {
  .erp-form-actions, .service-footer { display: none !important; }
  .erp-ui .card-header::after, .erp-ui .erp-form-section::after { display: none; }
  .erp-ui .card-header, .erp-ui .erp-form-section { border-bottom: 1px solid rgb(51, 51, 51) !important; color: rgb(0, 0, 0) !important; }
}
.erp-ui .content-header { flex-wrap: wrap; gap: 12px; }
.erp-ui .content-header > div { min-width: 0px; }
.erp-ui .card { min-width: 0px; }
.erp-ui .card.table-responsive { overflow-x: auto !important; }
/* Content-aware document columns: numeric space is reserved, text gets the rest. */
.erp-ui table.erp-sized-table { table-layout: fixed !important; max-width: none; }
.erp-ui .erp-sized-table th { position: relative; padding-right: 12px !important; }
.erp-column-tools { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 7px 0; color: #758297; font-size: 12px; }
.erp-column-tools-inline { margin-left: auto; align-self: flex-end; padding: 0; }
.erp-column-tools .btn { padding: 3px 8px; font-size: 12px; }
.erp-column-handle { position: absolute; top: 0; right: -4px; bottom: 0; width: 9px; z-index: 3; cursor: col-resize; touch-action: none; user-select: none; }
.erp-column-handle::after { content: ''; position: absolute; top: 15%; bottom: 15%; left: 4px; width: 2px; background: #b9c9df; }
.erp-column-handle:hover::after, .erp-column-handle:focus::after { width: 3px; background: #307df2; }
.erp-column-handle:focus-visible { outline: 2px solid #307df2; outline-offset: -1px; }
.erp-column-resizing, .erp-column-resizing * { cursor: col-resize !important; user-select: none !important; }
@media print { .erp-column-tools, .erp-column-handle { display: none !important; } }
.erp-ui .erp-sized-table th, .erp-ui .erp-sized-table td { white-space: normal; overflow-wrap: anywhere; }
.erp-ui .erp-sized-table [data-column-kind="index"], .erp-ui .erp-sized-table [data-column-kind="unit"] { text-align: center; }
.erp-ui .erp-sized-table td:is([data-column-kind="quantity"],[data-column-kind="price"],[data-column-kind="amount"]) { text-align: right; font-variant-numeric: tabular-nums; }
.erp-ui .erp-sized-table td input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.erp-ui .erp-sized-table td select { width: 100%; min-width: 0 !important; max-width: 100%; }
.erp-ui .erp-sized-table td input[type="number"] { padding-left: 5px; padding-right: 5px; text-align: right; font-variant-numeric: tabular-nums; }
.erp-ui .erp-sized-table [data-column-kind="action"] .d-flex { flex-wrap: nowrap; align-items:center; }
.erp-ui .erp-sized-table [data-column-kind="action"] input[type="number"] { flex: 0 1 100px; }
.erp-ui .erp-sized-table [data-column-kind="action"] .btn { white-space: nowrap; }
.erp-ui .erp-sized-table [data-column-kind="name"] .form-control,
.erp-ui .erp-sized-table [data-column-kind="description"] .form-control { min-width: 0; }
@media print {
 .erp-ui table.erp-sized-table { width: 100% !important; min-width: 0 !important; table-layout: auto !important; }
 .erp-ui table.erp-sized-table col { width: auto !important; }
}

/* Required incoming inspection codes remain distinct from ordinary fields. */
.erp-ui .quality-code-required { color: #c62828 !important; }
.erp-ui .quality-code-required label { color: inherit !important; font-weight: 600; }
.erp-ui .quality-code-required textarea { border-color: #c62828 !important; color: #c62828 !important; background-color: #fff8f8; }
.erp-ui .quality-code-required textarea:focus { box-shadow: 0 0 0 .2rem rgb(198 40 40 / 12%); }
