 
.permission-note-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 16px}.permission-note-grid>div{border:1px solid #e5ebf0;border-radius:10px;padding:12px;background:#f8fafc}.permission-note-grid b,.permission-note-grid span{display:block}.permission-note-grid span{margin-top:5px;color:#627d98;font-size:12px;line-height:1.45}.permission-matrix-wrap{max-height:62vh}.permission-matrix th{min-width:105px;white-space:normal}.permission-matrix th:first-child{min-width:260px;position:sticky;left:0;z-index:3;background:#f8fafc}.permission-matrix td:first-child{position:sticky;left:0;z-index:2;background:#fff}.permission-matrix td:first-child small{display:block;color:#829ab1;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;margin-top:3px}.permission-cell{text-align:center}.permission-cell .badge{min-width:32px;justify-content:center}@media(max-width:900px){.permission-note-grid{grid-template-columns:1fr}.permission-matrix th:first-child{min-width:220px}}

 
body[data-page="reports.create"] .product-linked-fields{
  display:grid;
  grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);
  gap:9px 10px;
  align-items:start;
}
body[data-page="reports.create"] .product-linked-fields>label{min-width:0;margin:0}
body[data-page="reports.create"] .product-linked-fields select{min-height:36px;margin-top:3px;padding:7px 9px;font-size:12.5px}
body[data-page="reports.create"] .product-linked-fields .field-hint{font-size:10.5px;line-height:1.35}
body[data-page="reports.create"] .product-linked-fields select.is-scan-locked{border-color:#86efac;background:#f0fdf4}
body[data-page="reports.create"] #product-code-select:disabled{cursor:not-allowed;background:#f5f7fa;color:#829ab1}
@media(max-width:760px){body[data-page="reports.create"] .product-linked-fields{grid-template-columns:1fr 1.25fr}}
@media(max-width:430px){body[data-page="reports.create"] .product-linked-fields{grid-template-columns:1fr}}

 
body[data-page="reports.create"] .product-code-color-control{position:relative;display:block;margin-top:3px}
body[data-page="reports.create"] .product-code-color-control select{margin-top:0;width:100%;transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease}
body[data-page="reports.create"] .product-code-color-control.has-product-color select{padding-left:34px;border-color:color-mix(in srgb,var(--selected-product-color) 42%,#cbd5e1);background:linear-gradient(90deg,color-mix(in srgb,var(--selected-product-color) 7%,#fff),#fff 34%)}
body[data-page="reports.create"] .product-code-color-dot{position:absolute;left:11px;top:50%;z-index:2;width:13px;height:13px;transform:translateY(-50%);border-radius:50%;background:var(--selected-product-color,#94a3b8);border:1px solid rgba(15,23,42,.24);box-shadow:0 0 0 2px #fff,0 1px 3px rgba(15,23,42,.16);pointer-events:none}
body[data-page="reports.create"] .product-code-color-dot[hidden]{display:none}
body[data-page="reports.create"] .product-code-color-control.has-product-color select:focus{border-color:var(--selected-product-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--selected-product-color) 16%,transparent)}
\n\n 
body[data-page="reports.create"] .product-code-field{min-width:0;margin:0}
body[data-page="reports.create"] .product-code-field-label{display:block;color:var(--gray-700);font-size:12px;font-weight:700}
body[data-page="reports.create"] .product-code-native-select{position:absolute!important;left:8px!important;bottom:2px!important;width:1px!important;height:1px!important;min-height:1px!important;margin:0!important;padding:0!important;opacity:0!important;pointer-events:none!important}
body[data-page="reports.create"] .product-code-picker-trigger{position:relative;width:100%;min-height:36px;margin:0;padding:7px 32px 7px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#172033;font:inherit;font-size:12.5px;font-weight:700;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease}
body[data-page="reports.create"] .product-code-picker-trigger:hover:not(:disabled){border-color:#60a5fa}
body[data-page="reports.create"] .product-code-picker-trigger:focus-visible{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.14)}
body[data-page="reports.create"] .product-code-picker-trigger:disabled{cursor:not-allowed;background:#f5f7fa;color:#829ab1}
body[data-page="reports.create"] .product-code-picker-chevron{position:absolute;right:10px;top:50%;transform:translateY(-55%);font-size:18px;font-weight:500;color:#64748b;transition:transform .16s ease}
body[data-page="reports.create"] .product-code-picker-trigger[aria-expanded="true"] .product-code-picker-chevron{transform:translateY(-45%) rotate(180deg)}
body[data-page="reports.create"] .product-code-color-control.has-product-color .product-code-picker-trigger{padding-left:34px;border-color:color-mix(in srgb,var(--selected-product-color) 42%,#cbd5e1);background:linear-gradient(90deg,color-mix(in srgb,var(--selected-product-color) 7%,#fff),#fff 34%)}
body[data-page="reports.create"] .product-code-color-control.has-product-color .product-code-picker-trigger:focus-visible{border-color:var(--selected-product-color);box-shadow:0 0 0 3px color-mix(in srgb,var(--selected-product-color) 16%,transparent)}
body[data-page="reports.create"] .product-code-options{position:absolute;z-index:70;left:0;right:0;top:calc(100% + 5px);max-height:280px;overflow:auto;padding:4px;border:1px solid #cbd5e1;border-radius:9px;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.16)}
body[data-page="reports.create"] .product-code-options[hidden]{display:none}
body[data-page="reports.create"] .product-code-option{width:100%;min-height:42px;padding:7px 9px;border:0;border-radius:6px;background:#fff;color:#172033;display:grid;grid-template-columns:22px minmax(0,1fr);gap:8px;align-items:center;text-align:left;cursor:pointer}
body[data-page="reports.create"] .product-code-option:hover,body[data-page="reports.create"] .product-code-option:focus-visible{outline:none;background:#f1f5f9}
body[data-page="reports.create"] .product-code-option.is-selected{background:#eaf3ff;color:#0b4fa2}
body[data-page="reports.create"] .product-code-option>i{width:15px;height:15px;justify-self:center;border-radius:50%;background:var(--option-color,#94a3b8);border:1px solid rgba(15,23,42,.26);box-shadow:0 0 0 2px #fff,0 1px 3px rgba(15,23,42,.14)}
body[data-page="reports.create"] .product-code-option>span{min-width:0}
body[data-page="reports.create"] .product-code-option b{display:block;overflow:hidden;font-size:12.5px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
body[data-page="reports.create"] .product-code-option small{display:block;margin-top:2px;color:#64748b;font-size:10.5px;font-weight:600}
body[data-page="reports.create"] .product-code-option[hidden]{display:none}
@media(max-width:520px){body[data-page="reports.create"] .product-code-options{max-height:240px}body[data-page="reports.create"] .product-code-option{min-height:46px;grid-template-columns:24px minmax(0,1fr)}body[data-page="reports.create"] .product-code-option>i{width:17px;height:17px}}

/* Nút chỉnh quyền trực tiếp trong ma trận; phù hợp cả màn hình cảm ứng. */
.permission-cell form[data-role-permission-toggle]{margin:0;display:flex;justify-content:center}
.rf-permission-toggle{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;border:1px solid #d5e1ea;border-radius:9px;background:#fff;color:#566879;min-height:36px;min-width:103px;padding:5px 8px;cursor:pointer;font-size:12px;font-weight:650;white-space:nowrap;transition:background .12s,border-color .12s}
.rf-permission-toggle:hover{background:#f4f9ff;border-color:#86b9ef}
.rf-permission-toggle:focus-visible{outline:3px solid #91c2f8;outline-offset:2px}
.rf-permission-toggle.is-on{border-color:#a3d9ba;color:#147a4d;background:#f0fdf4}
.rf-permission-toggle.is-off{background:#f8fafc}
.rf-permission-toggle:disabled{opacity:.6;cursor:wait}
.rf-permission-track{position:relative;display:inline-flex;width:29px;height:16px;flex-shrink:0;background:#bac8d3;border-radius:10px;transition:background .12s}
.rf-permission-track>span{position:absolute;top:2px;left:2px;width:12px;height:12px;background:white;border-radius:50%;box-shadow:0 1px 3px rgba(0,0,0,.2);transition:transform .12s}
.rf-permission-toggle.is-on .rf-permission-track{background:#169b59}
.rf-permission-toggle.is-on .rf-permission-track>span{transform:translateX(13px)}
.rf-permission-locked{display:inline-flex;align-items:center;justify-content:center;min-width:103px;min-height:35px;border:1px dashed #ccd6df;background:#f4f6f9;color:#7b8997;border-radius:9px;font-size:12px;font-weight:650}
.rf-permission-locked.is-on{color:#2a754c;background:#f0f7f1}
.rf-permission-feedback{position:sticky;bottom:12px;z-index:5;min-height:0;margin:8px 0 0;color:#147a4d;font-weight:650;font-size:13px}
.rf-permission-feedback:not(:empty){padding:10px 12px;border-radius:9px;background:#f0fdf4;border:1px solid #b2e3c6}
.rf-permission-feedback.is-error:not(:empty){color:#a52127;background:#fff1f1;border-color:#ffc7c7}
