/* ============================================================
   APH WEB SYSTEM
   WORKSPACE.CSS

   PC Frontend
   Modern Enterprise / Excel-like UI
   ============================================================ */

/* ============================================================
   APPLICATION
   ============================================================ */

.aph-app {
  display: flex;
  flex-direction: column;

  width: 100%;
  height: 100vh;

  overflow: hidden;

  background-color: #ffffff;
}

/* ============================================================
   HEADER
   ============================================================ */

.aph-header {
  position: relative;
  z-index: 50;

  display: flex;
  align-items: center;
  justify-content: space-between;

  flex: 0 0 42px;

  width: 100%;
  height: 42px;

  padding: 0 14px;

  border-bottom: 1px solid #d9e2ec;

  background-color: #ffffff;
}

/* ============================================================
   HEADER BRAND
   ============================================================ */

.aph-header__brand {
  display: flex;
  align-items: center;

  min-width: 0;

  gap: 8px;
}

.aph-header__brand-logo {
  display: block;

  width: 29px;
  height: 29px;

  flex: 0 0 29px;

  object-fit: contain;
}

.aph-header__brand-text {
  overflow: hidden;

  color: #163a5f;

  font-size: 15px;
  font-weight: 700;

  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ============================================================
   USER MENU
   ============================================================ */

.aph-user-menu {
  position: relative;

  height: 100%;
}

.aph-user-menu__button {
  display: flex;
  align-items: center;

  height: 100%;

  gap: 7px;

  padding: 0 7px;

  border: 0;

  background-color: transparent;

  color: #163a5f;

  font-family: inherit;

  cursor: pointer;
}

.aph-user-menu__button:hover {
  background-color: #f2f6fa;
}

.aph-user-menu__avatar {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 27px;
  height: 27px;

  border-radius: 50%;

  background-color: #1f5f99;

  color: #ffffff;

  font-size: 12px;
  font-weight: 700;
}

.aph-user-menu__name {
  color: #163a5f;

  font-size: 13px;
  font-weight: 600;

  white-space: nowrap;
}

.aph-user-menu__arrow {
  color: #607d96;

  font-size: 11px;
}

/* ============================================================
   USER DROPDOWN
   ============================================================ */

.aph-user-menu__dropdown {
  position: absolute;

  top: calc(100% + 1px);
  right: 0;

  z-index: 100;

  width: 230px;

  padding: 6px 0;

  border: 1px solid #d6e0e9;

  background-color: #ffffff;

  box-shadow: 0 5px 14px rgba(26, 58, 88, 0.14);
}

.aph-user-menu__dropdown[hidden] {
  display: none;
}

.aph-user-menu__profile {
  padding: 9px 12px;
}

.aph-user-menu__profile-name {
  margin-bottom: 6px;

  color: #163a5f;

  font-size: 14px;
  font-weight: 700;
}

.aph-user-menu__profile-row {
  display: flex;
  justify-content: space-between;

  gap: 12px;

  color: #60758a;

  font-size: 12px;
}

.aph-user-menu__profile-row strong {
  color: #314d67;

  font-weight: 600;

  max-width: 140px;

  overflow-wrap: anywhere;

  text-align: right;
}

.aph-user-menu__divider {
  height: 1px;

  margin: 4px 0;

  background-color: #e4ebf1;
}

.aph-user-menu__item {
  display: flex;
  align-items: center;

  width: 100%;
  height: 32px;

  padding: 0 12px;

  border: 0;

  background-color: transparent;

  color: #28465f;

  font-family: inherit;
  font-size: 13px;

  text-align: left;

  cursor: pointer;
}

.aph-user-menu__item:hover {
  background-color: #f1f6fa;
}

.aph-user-menu__item--logout {
  color: #c93838;
}

/* ============================================================
   MODULE BAR
   ============================================================ */

.aph-module-bar {
  position: relative;
  z-index: 40;

  flex: 0 0 36px;

  width: 100%;
  height: 36px;

  border-bottom: 1px solid #102f4d;

  background-color: #163a5f;
}

.aph-module-bar__items {
  display: flex;

  width: 100%;
  height: 100%;

  padding: 0 8px;

  overflow: visible;
}

.aph-module-item {
  position: relative;

  display: flex;

  flex: 1 1 0;

  min-width: 0;

  height: 100%;
}

.aph-module-button {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  padding: 0 12px;

  border: 0;

  background-color: transparent;

  color: #ffffff;

  font-family: inherit;
  font-size: 13px;
  font-weight: 700;

  white-space: nowrap;

  cursor: pointer;
}

.aph-module-button:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.aph-module-button--open {
  background-color: #286a9f;
}

.aph-module-button--open::after {
  position: absolute;

  right: 12px;
  bottom: 0;
  left: 12px;

  height: 2px;

  background-color: #73bff2;

  content: "";
}

/* ============================================================
   MODULE MENU
   ============================================================ */

.aph-module-menu {
  position: absolute;

  top: 100%;
  left: 0;

  z-index: 90;

  width: 100%;
  min-width: 150px;

  padding: 4px 0;

  border: 1px solid #d5dee7;

  background-color: #ffffff;

  box-shadow: 0 5px 14px rgba(26, 58, 88, 0.14);
}

.aph-module-menu[hidden] {
  display: none;
}

.aph-module-menu__item {
  display: flex;
  align-items: center;

  width: 100%;
  height: 32px;

  padding: 0 12px;

  border: 0;

  background-color: transparent;

  color: #28465f;

  font-family: inherit;
  font-size: 13px;

  text-align: left;

  cursor: pointer;
}

.aph-module-menu__item:hover {
  background-color: #edf5fb;

  color: #174f80;
}

.aph-module-menu__auto-refresh-indicator {
  margin-left: 4px;
  color: #b42318;
  font-size: 12px;
  font-weight: 700;
}

.aph-module-menu__empty {
  display: flex;
  align-items: center;

  min-height: 32px;

  padding: 0 12px;

  color: #8b9bab;

  font-size: 12px;
}

/* ============================================================
   TOOLBAR
   ============================================================ */

.aph-toolbar {
  position: relative;
  z-index: 30;

  display: flex;
  align-items: center;

  flex: 0 0 38px;

  width: 100%;
  height: 38px;

  padding: 0 10px;

  border-bottom: 1px solid #d9e2ec;

  background-color: #ffffff;
}

.aph-toolbar__actions {
  display: flex;
  align-items: center;

  min-width: 0;

  height: 100%;

  gap: 1px;
}

.aph-toolbar__date-area {
  display: flex;
  align-items: center;

  margin-left: auto;

  height: 100%;
}

.aph-toolbar-button {
  display: inline-flex;
  align-items: center;

  height: 30px;

  padding: 0 7px;

  border: 0;
  border-radius: 3px;

  background-color: transparent;

  color: #315570;

  font-family: inherit;
  font-size: 13px;

  cursor: pointer;
}

.aph-toolbar-button:hover:not(:disabled) {
  background-color: #eef4f8;
}

.aph-toolbar-button:disabled {
  opacity: 0.34;

  cursor: default;
}

.aph-toolbar-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 17px;

  font-size: 15px;
}

.aph-toolbar-button__label {
  margin-left: 4px;

  white-space: nowrap;
}

.aph-toolbar-button[data-action="search"] {
  color: #23669c;
}

.aph-toolbar-button[data-action="add"] {
  color: #27834b;
}

.aph-toolbar-button[data-action="edit"] {
  color: #23669c;
}

.aph-toolbar-button[data-action="delete"] {
  color: #c33a3a;
}

.aph-toolbar-button[data-action="clear-frame"] {
  color: #9b2c2c;
  font-weight: 700;
}

.aph-toolbar-button[data-action="refresh"] {
  color: #23669c;
}

.aph-toolbar-button[data-action="export"] {
  color: #217346;
}

.aph-toolbar-button--font-size {
  justify-content: center;
  min-width: 28px;
  padding: 0 5px;
  color: #315570;
  font-weight: 700;
}

/* ============================================================
   DATE CONTROL
   ============================================================ */

.aph-date-control {
  display: inline-flex;
  align-items: center;

  height: 29px;
  min-width: 205px;

  padding: 0 8px;

  border: 1px solid #cbd8e2;
  border-radius: 3px;

  background-color: #ffffff;

  color: #274b67;

  font-family: inherit;
  font-size: 12px;

  cursor: pointer;
}

.aph-date-control[hidden] {
  display: none;
}

.aph-date-control:hover {
  border-color: #9fb8ca;

  background-color: #f8fbfd;
}

.aph-date-control__icon {
  width: 18px;

  margin-right: 5px;

  color: #3574a6;
}

.aph-date-control__text {
  flex: 1 1 auto;

  white-space: nowrap;
}

.aph-date-control__arrow {
  margin-left: 8px;

  color: #637c90;

  font-size: 10px;
}

/* ============================================================
   WORKSPACE
   ============================================================ */

.aph-workspace {
  position: relative;

  display: flex;
  flex: 1 1 auto;
  flex-direction: column;

  min-width: 0;
  min-height: 0;

  overflow: hidden;

  background-color: #ffffff;
}

/* Kiểm Mộc / Bảng thao tác kiểm: two independent vertical input buffers. */
.aph-kiem-moc {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  padding: 8px;
  color: #263f52;
  font-size: 13px;
}

.aph-kiem-moc__layout {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(240px, 3fr);
  gap: 20px;
  flex: 1;
  min-height: 0;
}

.aph-kiem-moc__buffers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  min-height: 0;
  overflow-y: auto;
}

.aph-kiem-moc__panel {
  min-width: 0;
  border: 1px solid #c5d1db;
  background: #fff;
}

.aph-kiem-moc__panel h2 {
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #c5d1db;
  color: #173a59;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
}

.aph-kiem-moc__buffers .aph-kiem-moc__panel:first-child h2 { background: #dceaf4; }
.aph-kiem-moc__buffers .aph-kiem-moc__panel:last-child h2 { background: #e0eee5; }
.aph-kiem-moc__recent h2 { background: #eee8da; }

.aph-kiem-moc__panel form { padding: 8px; }
.aph-kiem-moc__column { min-width: 0; padding: 0; margin: 0; border: 0; }
.aph-kiem-moc__panel form .aph-kiem-moc__column { width: min(100%, 336px); margin: 0 auto; }
.aph-kiem-moc__column:disabled { opacity: .65; }
.aph-kiem-moc .aph-form-row,
.aph-dialog--kiem-moc .aph-form-row { grid-template-columns: 66px minmax(0, 1fr); gap: 6px; margin-bottom: 5px; }
.aph-kiem-moc__panel form .aph-form-row { grid-template-columns: 82px minmax(0, 1fr); }
.aph-kiem-moc .aph-form-row input,
.aph-dialog--kiem-moc .aph-form-row input { height: 28px; }
.aph-kiem-moc__panel form .aph-form-row label,
.aph-kiem-moc__panel form .aph-form-row input,
.aph-kiem-moc__panel form .aph-kiem-moc__save { font-size: 18px; }
.aph-kiem-moc__panel form .aph-form-row input { text-align: center; }
.aph-kiem-moc__panel form .aph-form-row input[name="mtt"] { font-weight: 700; }
.aph-kiem-moc__save { display: block; width: 100%; margin-top: 5px; }
.aph-kiem-moc__error { color: #b42318; min-height: 18px; padding: 2px 0; overflow-wrap: anywhere; }
.aph-kiem-moc__options { margin-bottom: 6px; }
.aph-kiem-moc__options button { margin-left: 8px; }
.aph-kiem-moc__recent { display: flex; flex-direction: column; min-height: 0; }
.aph-kiem-moc__grid { flex: 1; height: auto; }
.aph-kiem-moc__grid-status { padding: 3px 6px; color: #65798a; }
.aph-kiem-moc__grid-status:empty { display: none; }
.aph-grid--kiem-moc { width: 100%; }
.aph-bao-cao-ngay { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.aph-bao-cao-ngay__grid { flex: 1; min-height: 0; }
.aph-bao-cao-ngay__status { min-height: 20px; padding: 2px 7px; color: #b42318; }
.aph-bao-cao-ngay__success-detail { display: block; margin-top: 5px; font-size: 14px; font-weight: 400; }
.aph-bao-cao-ngay__success-warning { display: block; margin-top: 5px; color: #b42318; font-size: 14px; font-weight: 600; }
.aph-grid--bao-cao-ngay .aph-grid-header__text { text-align: center; }
.aph-grid--bao-cao-ngay tbody tr:not(.aph-grid-empty-row) { cursor: pointer; }
.aph-grid--bao-cao-ngay tbody td:nth-child(-n+5) { text-align: center; }
.aph-grid--bao-cao-ngay tbody td:nth-child(n+6) { text-align: left; }
.aph-dialog--bao-cao-ngay-search { width: min(420px, calc(100vw - 24px)); }
.aph-dialog--bao-cao-ngay-add {
  display: flex; flex-direction: column; width: min(70%, 1120px);
  min-width: min(790px, 100%);
  max-height: calc(100% - 24px); min-height: 0;
}
.aph-bao-cao-ngay__summary {
  display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: center;
  gap: 0; padding: 8px 12px; border-bottom: 1px solid #c5d1db;
  background: #f1f5f8; color: #284b66; font-size: 14px;
}
.aph-bao-cao-ngay__summary span { padding: 2px 10px; text-align: center; white-space: nowrap; }
.aph-bao-cao-ngay__summary span + span { border-left: 1px solid #c5d1db; }
.aph-bao-cao-ngay__summary strong { color: #173a59; font-size: 15px; }
.aph-bao-cao-ngay__warning { padding: 0 12px; color: #b42318; font-weight: 700; }
.aph-bao-cao-ngay__warning:empty { display: none; }
.aph-bao-cao-ngay__add-status { min-height: 22px; padding: 3px 12px; color: #b42318; }
.aph-bao-cao-ngay__form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.aph-bao-cao-ngay__add-scroll { flex: 1; min-height: 0; overflow: auto; }
.aph-bao-cao-ngay__add-table { width: 100%; min-width: 665px; table-layout: fixed; border-collapse: collapse; font-size: 14px; }
.aph-bao-cao-ngay__add-table col:nth-child(1) { width: 14%; }
.aph-bao-cao-ngay__add-table col:nth-child(2), .aph-bao-cao-ngay__add-table col:nth-child(3) { width: 7.5%; }
.aph-bao-cao-ngay__add-table col:nth-child(4), .aph-bao-cao-ngay__add-table col:nth-child(5) { width: 35.5%; }
.aph-bao-cao-ngay__add-table th {
  position: sticky; top: 0; z-index: 1; height: 34px;
  background: #dce8f1; color: #173a59; font-weight: 700; text-align: center; text-transform: uppercase;
}
.aph-bao-cao-ngay__add-table tr { height: 38px; }
.aph-bao-cao-ngay__add-table th, .aph-bao-cao-ngay__add-table td { padding: 2px 7px; border: 1px solid #c5d1db; }
.aph-bao-cao-ngay__add-table td:nth-child(-n+3) { text-align: center; }
.aph-bao-cao-ngay__add-table td:nth-child(n+4) { text-align: left; }
.aph-bao-cao-ngay__add-table input {
  box-sizing: border-box; width: 100%; height: 30px; padding: 3px 8px;
  border: 1px solid #aebdca; font: inherit; font-size: 16px; text-align: left;
}
.aph-bao-cao-ngay__add-table tr.is-saved { background: #fce8e6; color: #8b1b14; }
.aph-bao-cao-ngay__add-table tr.is-saved input { background: #f8dedb; color: #8b1b14; cursor: not-allowed; }
.aph-dialog--bao-cao-ngay-add .aph-dialog__footer { flex: 0 0 auto; margin: 0; padding: 8px 12px; }
.aph-dialog--bao-cao-ngay-add .aph-dialog-button { height: 34px; min-width: 86px; }
.aph-dialog--bao-cao-ngay-add .aph-dialog-button--save { min-width: 132px; }
.aph-kiem-moc .aph-grid--kiem-moc th { padding: 0; text-align: center; }
.aph-grid--kiem-moc .aph-grid-header { padding: 0 20px; }
.aph-grid--kiem-moc .aph-grid-header__text { text-align: center; }
.aph-kiem-moc .aph-grid--kiem-moc td,
.aph-kiem-moc .aph-grid--kiem-moc td[data-type="number"] { text-align: center; }
.aph-kiem-moc__mtt-col { width: 48%; }
.aph-kiem-moc__kg-col { width: 14%; }
.aph-kiem-moc__location-col { width: 18%; }
.aph-kiem-moc__toast {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  width: fit-content;
  max-width: calc(100% - 24px);
  padding: 8px 12px;
  border: 1px solid #c7dccb;
  background: #e7f3ea;
  color: #1f6b3a;
  z-index: 210;
  overflow-wrap: anywhere;
}
.aph-kiem-moc__toast--create {
  top: 50%;
  bottom: auto;
  left: 50%;
  right: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  width: max-content;
  max-width: min(90%, 900px);
  padding: 24px 30px;
  border-color: #a8cfb7;
  background: #f1faf3;
  box-shadow: 0 6px 18px rgba(30, 58, 80, 0.16);
  color: #195b32;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.25;
  pointer-events: none;
  transform: translate(-50%, -50%);
}
.aph-kiem-moc__toast-icon { flex: none; font-size: 48px; line-height: 1; }
.aph-kiem-moc__toast--create strong { font-weight: 800; }
.aph-kiem-moc__toast[hidden], .aph-kiem-moc__options[hidden] { display: none; }
.aph-dialog--kiem-moc { width: min(520px, 100%); max-height: 100%; display: flex; flex-direction: column; }
.aph-dialog--kiem-moc .aph-dialog__form { min-height: 0; overflow-y: auto; }
.aph-dialog--kiem-moc .aph-kiem-moc__find { grid-template-columns: 66px minmax(0, 1fr) auto; }
.aph-kiem-moc__audit { padding-bottom: 5px; margin-bottom: 5px; border-bottom: 1px solid #c5d1db; }
.aph-dialog--kiem-moc-frame { width: min(430px, 100%); }
.aph-dialog--kiem-moc-frame .aph-form-row { grid-template-columns: 66px minmax(0, 1fr); }
.aph-dialog--kiem-moc-frame .aph-form-row input { text-align: center; }
.aph-kiem-moc__frame-result { min-height: 20px; font-weight: 600; }
.aph-kiem-moc__frame-result.is-success { color: #1f6b3a; }
.aph-kiem-moc__frame-result.is-error { color: #b42318; }

@media (max-width: 1000px) {
  .aph-kiem-moc__layout { grid-template-columns: minmax(440px, 7fr) minmax(230px, 3fr); overflow-x: auto; }
  .aph-kiem-moc__buffers { gap: 12px; }
  .aph-kiem-moc__panel form { padding: 6px; }
}

.aph-workspace__placeholder {
  width: 100%;
  height: 100%;

  padding: 8px 10px;

  color: #6d8193;

  font-size: 13px;
}

.aph-operation-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  color: #6d8193;
}

/* ============================================================
   GRID CONTAINER
   ============================================================ */

.aph-grid-container {
  width: 100%;
  height: 100%;

  min-width: 0;
  min-height: 0;

  overflow: auto;

  background-color: #ffffff;
}

/* ============================================================
   GRID
   ============================================================ */

.aph-grid {
  width: max-content;

  /*
       Giữ theo quyết định của APH:
       Grid luôn tối thiểu bằng Workspace.
       Nếu tổng width nhỏ hơn màn hình,
       Browser sẽ kéo giãn để lấp đầy.
    */
  min-width: 100%;

  border-collapse: collapse;
  border-spacing: 0;

  table-layout: fixed;

  background-color: #ffffff;

  color: #263f52;

  font-size: 13px;
}

/* ============================================================
   GRID HEADER
   ============================================================ */

.aph-grid th {
  position: sticky;

  top: 0;

  z-index: 5;

  height: 32px;

  padding: 0;

  border-top: 1px solid #c5d1db;
  border-right: 1px solid #c5d1db;
  border-bottom: 1px solid #b7c6d2;

  background-color: #e2eaf1;

  color: #173a59;

  font-weight: 700;

  text-align: left;

  white-space: nowrap;
}

.aph-grid th:first-child {
  border-left: 1px solid #c5d1db;
}

.aph-grid-header {
  position: relative;

  display: flex;
  align-items: center;

  width: 100%;
  height: 100%;

  min-width: 0;

  padding: 0 26px 0 7px;
}

.aph-grid-header__text {
  display: block;

  width: 100%;

  min-width: 0;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

/* ============================================================
   GRID FILTER BUTTON
   ============================================================ */

.aph-grid-filter-button {
  position: absolute;

  top: 50%;
  right: 5px;

  z-index: 6;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 18px;
  height: 22px;

  padding: 0;

  border: 0;
  border-radius: 2px;

  background-color: transparent;

  color: #607d94;

  font-family: inherit;
  font-size: 9px;

  cursor: pointer;

  transform: translateY(-50%);
}

.aph-grid-filter-button:hover {
  background-color: #dfe9f1;

  color: #1d5f91;
}

/* Cột đang có Filter */
.aph-grid-filter-button.is-filtered {
  background-color: transparent;

  color: #e6223c;

  font-size: 11px;
  font-weight: 700;
}

/* ============================================================
   GRID COLUMN RESIZE
   ============================================================ */

.aph-grid-resize-handle {
  position: absolute;

  top: 0;
  right: -3px;
  bottom: 0;

  z-index: 10;

  width: 7px;

  cursor: col-resize;

  touch-action: none;
}

.aph-grid-resize-handle:hover::after {
  position: absolute;

  top: 3px;
  right: 3px;
  bottom: 3px;

  width: 1px;

  background-color: #3e7eaa;

  content: "";
}

.aph-grid.is-column-resizing {
  user-select: none;
}

body.aph-is-grid-resizing,
body.aph-is-grid-resizing * {
  cursor: col-resize !important;

  user-select: none !important;
}

/* ============================================================
   GRID CELL
   ============================================================ */

.aph-grid td {
  height: 30px;

  padding: 4px 7px;

  overflow: hidden;

  border-right: 1px solid #c9d4dc;
  border-bottom: 1px solid #c9d4dc;

  background-color: #ffffff;

  color: #263f52;

  font-size: var(--aph-grid-data-font-size, 13px);

  vertical-align: middle;

  white-space: nowrap;

  text-overflow: ellipsis;
}

.aph-grid td:first-child {
  border-left: 1px solid #c9d4dc;
}

/* ============================================================
   ROW STATES
   ============================================================ */

.aph-grid tbody tr:hover td {
  background-color: #f4f8fb;
}

.aph-grid tbody tr.is-selected td {
  background-color: #dcecf7;
}

/* ============================================================
   CELL ALIGNMENT
   ============================================================ */

.aph-grid td[data-type="number"],
.aph-grid .is-number {
  text-align: right;
}

.aph-grid td[data-align="center"],
.aph-grid .is-center {
  text-align: center;
}

.aph-grid--kho-moc-nhap-kho th,
.aph-grid--kho-moc-nhap-kho .aph-grid-header__text {
  text-align: center;
}

.aph-grid--kho-moc-nhap-kho .aph-grid-header {
  padding-right: 26px;
  padding-left: 26px;
}

/* ============================================================
   EXCEL-LIKE FILTER POPUP
   ============================================================ */

.aph-grid-filter-popup {
  position: fixed;

  z-index: 1000;

  width: 260px;
  max-height: 430px;

  overflow: hidden;

  border: 1px solid #aebdca;

  border-radius: 3px;

  background-color: #ffffff;

  box-shadow: 0 7px 22px rgba(25, 50, 70, 0.22);

  color: #29475f;

  font-family: inherit;
  font-size: 12px;
}

/* ============================================================
   FILTER POPUP HEADER
   ============================================================ */

.aph-grid-filter-popup__header {
  display: flex;
  align-items: center;

  height: 31px;

  padding: 0 10px;

  border-bottom: 1px solid #d8e1e8;

  background-color: #eef3f7;

  color: #173a59;

  font-size: 12px;
  font-weight: 700;
}

/* ============================================================
   FILTER SEARCH
   ============================================================ */

.aph-grid-filter-popup__search {
  padding: 7px;
}

.aph-grid-filter-popup__search-input {
  width: 100%;
  height: 29px;

  padding: 0 8px;

  border: 1px solid #b9c9d5;
  border-radius: 2px;

  background-color: #ffffff;

  color: #29475f;

  font-family: inherit;
  font-size: 12px;
}

.aph-grid-filter-popup__search-input:focus {
  border-color: #4c8dbd;

  outline: 1px solid #4c8dbd;

  outline-offset: -1px;
}

/* ============================================================
   FILTER SORT
   ============================================================ */

.aph-grid-filter-popup__sort {
  display: flex;
  flex-direction: column;

  padding: 0 4px 4px;
}

.aph-grid-filter-popup__sort-button {
  display: flex;
  align-items: center;

  width: 100%;
  height: 27px;

  padding: 0 8px;

  border: 0;

  background-color: transparent;

  color: #34556d;

  font-family: inherit;
  font-size: 12px;

  text-align: left;

  cursor: pointer;
}

.aph-grid-filter-popup__sort-button:hover {
  background-color: #edf5fa;

  color: #175d8e;
}

/* ============================================================
   FILTER DIVIDER
   ============================================================ */

.aph-grid-filter-popup__divider {
  height: 1px;

  background-color: #dce4ea;
}

/* ============================================================
   FILTER VALUE AREA
   ============================================================ */

.aph-grid-filter-popup__values {
  padding: 4px 0;
}

.aph-grid-filter-popup__value-list {
  max-height: 190px;

  overflow-y: auto;
  overflow-x: hidden;

  border-top: 1px solid #edf1f4;
}

/* ============================================================
   FILTER VALUE
   ============================================================ */

.aph-grid-filter-popup__value {
  display: flex;
  align-items: center;

  min-height: 27px;

  padding: 3px 9px;

  gap: 7px;

  color: #344f64;

  cursor: pointer;

  user-select: none;
}

.aph-grid-filter-popup__value:hover {
  background-color: #f1f6fa;
}

.aph-grid-filter-popup__value[hidden] {
  display: none;
}

.aph-grid-filter-popup__value--all {
  font-weight: 600;
}

.aph-grid-filter-popup__value input {
  flex: 0 0 auto;

  margin: 0;

  cursor: pointer;
}

.aph-grid-filter-popup__value span {
  min-width: 0;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

/* ============================================================
   FILTER FOOTER
   ============================================================ */

.aph-grid-filter-popup__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 6px;

  padding: 7px;

  border-top: 1px solid #d8e1e8;

  background-color: #f7f9fb;
}

/* ============================================================
   FILTER BUTTONS
   ============================================================ */

.aph-grid-filter-popup__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 58px;
  height: 27px;

  padding: 0 10px;

  border-radius: 2px;

  font-family: inherit;
  font-size: 12px;

  cursor: pointer;
}

.aph-grid-filter-popup__button--cancel {
  border: 1px solid #b8c6d1;

  background-color: #ffffff;

  color: #3f5b70;
}

.aph-grid-filter-popup__button--cancel:hover {
  background-color: #edf2f5;
}

.aph-grid-filter-popup__button--apply {
  border: 1px solid #286b9c;

  background-color: #2e77aa;

  color: #ffffff;
}

.aph-grid-filter-popup__button--apply:hover {
  background-color: #286b9c;
}

/* ============================================================
   SHEET BAR
   ============================================================ */

.aph-sheet-bar {
  position: relative;
  z-index: 20;

  display: flex;
  align-items: center;

  flex: 0 0 34px;

  width: 100%;
  height: 34px;

  padding: 0 6px;

  border-top: 1px solid #cfd9e2;

  background-color: #f4f7f9;

  overflow: hidden;
}

.aph-sheet-bar__tabs {
  display: flex;
  align-items: center;

  flex: 1 1 auto;

  min-width: 0;
  height: 100%;

  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.aph-sheet-bar__tabs::-webkit-scrollbar {
  display: none;
}

.aph-sheet-bar__actions {
  display: flex;
  align-items: center;
  gap: 2px;

  flex: 0 0 auto;

  height: 28px;
  margin-left: 5px;
  padding-left: 5px;

  border-left: 1px solid #cfd9e2;
  background-color: #f4f7f9;
}

.aph-sheet-help-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  padding: 0;

  border: 0;
  background-color: transparent;
  color: #286da3;

  font-family: "Segoe UI Symbol", Arial, sans-serif;
  font-size: 17px;
  line-height: 1;

  cursor: pointer;
}

.aph-sheet-help-button:hover:not(:disabled) {
  background-color: #e5eef5;
}

.aph-sheet-help-button:focus-visible {
  outline: 2px solid #286da3;
  outline-offset: -2px;
}

.aph-sheet-help-button:disabled {
  color: #aab7c2;
  opacity: 0.55;
  cursor: default;
}

.aph-sheet {
  display: inline-flex;
  align-items: center;

  flex: 0 0 auto;

  height: 28px;

  margin-right: 3px;

  padding: 0 8px;

  border: 1px solid #cfd9e2;
  border-bottom: 0;

  background-color: #ffffff;

  color: #284b66;

  font-size: 12px;

  cursor: pointer;
}

.aph-sheet:hover {
  background-color: #edf4f9;
}

.aph-sheet--active,
.aph-sheet.is-active {
  border-color: #286da3;

  background-color: #286da3;

  color: #ffffff;
}

.aph-sheet__title {
  max-width: 180px;

  overflow: hidden;

  text-overflow: ellipsis;

  white-space: nowrap;
}

.aph-sheet__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 17px;
  height: 17px;

  margin-left: 6px;

  padding: 0;

  border: 0;

  background-color: transparent;

  color: inherit;

  font-size: 14px;

  cursor: pointer;
}

.aph-sheet-add {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  margin-left: 3px;

  border: 0;

  background-color: transparent;

  color: #286da3;

  font-size: 20px;

  cursor: pointer;

  position: sticky;
  right: 0;
  z-index: 1;

  flex: 0 0 28px;

  background-color: #f4f7f9;
}

.aph-sheet-add:hover:not(:disabled) {
  background-color: #e5eef5;
}

.aph-sheet-add:disabled {
  color: #aab7c2;

  opacity: 0.55;

  cursor: default;
}

/* ============================================================
   DIALOG OVERLAY
   ============================================================ */

.aph-dialog-overlay {
  position: absolute;

  inset: 0;

  z-index: 200;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 20px;

  background-color: rgba(30, 48, 63, 0.25);
}

/* ============================================================
   DIALOG
   ============================================================ */

.aph-dialog {
  width: min(520px, 100%);

  border: 1px solid #aebdca;

  background-color: #ffffff;

  box-shadow: 0 10px 28px rgba(24, 47, 66, 0.22);
}

.aph-dialog--user-menu {
  width: min(460px, 100%);
}

.aph-dialog--documentation {
  display: flex;
  flex-direction: column;

  width: min(760px, 100%);
  max-height: calc(100% - 24px);
}

.aph-documentation-dialog__body {
  min-height: 0;
  padding: 12px 16px;
  overflow-y: auto;
}

.aph-documentation-section + .aph-documentation-section {
  margin-top: 14px;
}

.aph-documentation-section__heading {
  margin: 0 0 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #dbe3e9;
  color: #284b66;
  font-size: 13px;
}

.aph-documentation-section p,
.aph-documentation-section ul {
  margin: 5px 0;
}

.aph-documentation-section ul {
  padding-left: 21px;
}

.aph-documentation-section li {
  margin: 3px 0;
  color: #354f63;
  font-size: 13px;
  line-height: 1.45;
}

.aph-documentation-group {
  margin: 8px 0 0 8px;
}

.aph-documentation-group__heading {
  margin: 0 0 3px;
  color: #405c72;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
}

.aph-dialog__footer.aph-documentation-dialog__footer {
  flex: 0 0 auto;
  margin: 0;
}

.aph-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 38px;

  padding: 0 10px 0 14px;

  border-bottom: 1px solid var(--aph-grid-header-bg);

  background-color: var(--aph-grid-header-bg);
}

.aph-dialog__title {
  color: #ffffff;

  font-size: 14px;
  font-weight: 700;
}

.aph-dialog__close {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 28px;
  height: 28px;

  border: 0;

  background-color: transparent;

  color: #ffffff;

  font-size: 20px;

  cursor: pointer;
}

.aph-dialog__close:hover {
  background-color: rgba(255, 255, 255, 0.16);

  color: #ffffff;
}

/* ============================================================
   DIALOG FORM
   ============================================================ */

.aph-dialog__form {
  padding: 14px 16px;
}

.aph-dialog--kho-moc-add {
  width: min(920px, 100%);
}

.aph-batch-add-layout {
  display: grid;
  grid-template-columns:
    minmax(320px, 350px)
    minmax(420px, 1fr);
  gap: 16px;
}

.aph-batch-add-section-title {
  margin-bottom: 9px;
  color: #405c72;
  font-size: 12px;
  font-weight: 700;
}

.aph-form-row.aph-form-row--compact {
  grid-template-columns: 100px auto;
  justify-content: start;
  gap: 10px;
}

.aph-form-row .aph-common-input {
  width: auto;
}

.aph-form-row .aph-common-input--date {
  width: 138px;
}

.aph-form-row .aph-common-input--text {
  width: 195px;
}

.aph-form-row .aph-common-input--machine {
  width: 72px;
}

.aph-batch-detail-table-wrap {
  max-height: 330px;
  overflow: auto;
  border: 1px solid var(--aph-grid-border);
}

.aph-batch-detail-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.aph-batch-detail-column--tt {
  width: 70px;
}

.aph-batch-detail-column--weight {
  width: 100px;
}

.aph-batch-detail-table th {
  height: 29px;
  padding: 0 7px;
  border-right: 1px solid var(--aph-grid-border);
  border-bottom: 1px solid var(--aph-grid-border);
  background-color: #f1f4f6;
  color: #405c72;
  text-align: left;
  font-weight: 700;
}

.aph-batch-detail-table th.is-center,
.aph-batch-detail-table input[data-field="tt"],
.aph-batch-detail-table input[data-field="tlNhap"] {
  text-align: center;
}

.aph-required-mark,
.aph-sap-soi-required,
.aph-nhap-soi-row-field__label b,
.aph-calculation-mark,
.aph-dialog--xuat-soi .aph-xuat-soi-calculation-mark {
  font-size: 18px;
  line-height: 1;
  vertical-align: middle;
}

.aph-required-mark {
  margin-left: 2px;
  color: #c62828;
}

.aph-batch-detail-table td {
  padding: 0;
  border-right: 1px solid var(--aph-grid-border);
  border-bottom: 1px solid var(--aph-grid-border);
  background-color: #ffffff;
}

.aph-batch-detail-table th:last-child,
.aph-batch-detail-table td:last-child {
  border-right: 0;
}

.aph-batch-detail-table input {
  width: 100%;
  height: 28px;
  min-width: 0;
  padding: 0 7px;
  border: 0;
  outline: 0;
  background-color: transparent;
  font: inherit;
}

.aph-batch-detail-table input:focus {
  box-shadow: inset 0 0 0 2px #4c8dbd;
}

.aph-batch-detail-table tr.is-error td,
.aph-batch-detail-table td.is-error {
  background-color: #fff0f0;
}

.aph-batch-detail-table td.is-error input {
  box-shadow: inset 0 0 0 1px #b42318;
}

.aph-form-row {
  display: grid;

  grid-template-columns:
    120px
    minmax(0, 1fr);

  align-items: center;

  gap: 10px;

  margin-bottom: 8px;
}

.aph-form-row label {
  color: #405c72;

  font-size: 13px;
  font-weight: 600;
}

.aph-form-row input,
.aph-form-row select,
.aph-form-row textarea {
  width: 100%;

  min-width: 0;

  border: 1px solid #bdcbd6;
  border-radius: 2px;

  background-color: #ffffff;

  color: #263f52;

  font-family: inherit;
  font-size: 13px;
}

.aph-form-row input,
.aph-form-row select {
  height: 30px;

  padding: 0 8px;
}

.aph-form-row textarea {
  min-height: 64px;

  padding: 6px 8px;

  resize: vertical;
}

.aph-form-row input:focus,
.aph-form-row select:focus,
.aph-form-row textarea:focus {
  border-color: #4c8dbd;

  outline: 1px solid #4c8dbd;

  outline-offset: -1px;
}

.aph-form-row input[readonly] {
  background-color: #f1f4f6;

  color: #65798a;
}

.aph-detail-readonly-value {
  min-height: 30px;
  padding: 6px 8px;
  border: 1px solid #d6e0e7;
  border-radius: 2px;
  background-color: #f6f8fa;
  color: #263f52;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.aph-user-dialog__label {
  color: #405c72;
  font-size: 13px;
  font-weight: 600;
}

.aph-user-permission-list {
  max-height: 320px;
  margin-top: 6px;
  overflow-y: auto;
  border: 1px solid #d6e0e7;
  background-color: #ffffff;
}

.aph-user-permission-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.aph-user-permission-table th,
.aph-user-permission-table td {
  height: 28px;
  padding: 5px 8px;
  border-right: 1px solid #d6e0e7;
  border-bottom: 1px solid #d6e0e7;
  color: #263f52;
  overflow-wrap: anywhere;
}

.aph-user-permission-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #eef3f7;
  color: #173a59;
  font-weight: 700;
  text-align: left;
}

.aph-user-permission-table th:first-child,
.aph-user-permission-table td:first-child {
  width: 52px;
  text-align: center;
}

.aph-user-permission-table th:last-child,
.aph-user-permission-table td:last-child {
  border-right: 0;
}

.aph-user-permission-table tbody tr:last-child td {
  border-bottom: 0;
}

.aph-user-dialog__message {
  padding: 12px 10px;
  color: #65798a;
  font-size: 13px;
  text-align: center;
}

.aph-user-dialog__message--error {
  color: #b42318;
}

/* ============================================================
   INPUT UNIT
   ============================================================ */

.aph-input-with-unit {
  display: flex;
  align-items: center;

  min-width: 0;
}

.aph-input-with-unit input {
  flex: 1 1 auto;

  min-width: 0;
}

.aph-input-with-unit > span {
  display: flex;
  align-items: center;
  justify-content: center;

  flex: 0 0 38px;

  height: 30px;

  margin-left: -1px;

  border: 1px solid #bdcbd6;

  background-color: #f1f4f6;

  color: #62788a;

  font-size: 12px;
}

/* ============================================================
   DIALOG FOOTER
   ============================================================ */

.aph-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 7px;

  margin: 12px -16px -14px;

  padding: 10px 16px;

  border-top: 1px solid #dbe3e9;

  background-color: #f8fafb;
}

.aph-dialog-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 72px;
  height: 30px;

  padding: 0 13px;

  border: 1px solid transparent;
  border-radius: 2px;

  font-family: inherit;
  font-size: 13px;
  font-weight: 600;

  cursor: pointer;
}

.aph-dialog-button--save {
  border-color: #277743;

  background-color: #2d8a4d;

  color: #ffffff;
}

.aph-dialog-button--save:hover {
  background-color: #277743;
}

.aph-dialog-button--cancel {
  border-color: #b9c6d0;

  background-color: #ffffff;

  color: #425e73;
}

.aph-dialog-button--cancel:hover {
  background-color: #edf2f5;
}

/* ============================================================
   RESPONSIVE SAFETY
   ============================================================ */

@media (max-width: 850px) {
  .aph-toolbar-button {
    padding-right: 5px;
    padding-left: 5px;
  }

  .aph-date-control {
    min-width: 175px;
  }
}

@media (max-width: 700px) {
  .aph-header {
    padding-right: 8px;
    padding-left: 8px;
  }

  .aph-header__brand-text {
    font-size: 14px;
  }

  .aph-user-menu__name {
    max-width: 90px;

    overflow: hidden;

    text-overflow: ellipsis;
  }
}
.aph-delete-message {
  min-height: 24px;
  margin-top: 8px;
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
}

.aph-add-message {
  min-height: 24px;
  margin-top: 8px;
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
}

.aph-dialog-button:disabled {
  opacity: 0.42;
  cursor: default;
}

/* ============================================================
   SYSTEM - USER
   ============================================================ */

.aph-toolbar-button[hidden] {
  display: none;
}

.aph-toolbar-button[data-action="change-password"],
.aph-toolbar-button[data-action="activate"] {
  color: #27834b;
}

.aph-toolbar-button[data-action="deactivate"] {
  color: #b14545;
}

.aph-user-operation {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.aph-user-operation__message {
  flex: 0 0 auto;
  min-height: 29px;
  padding: 6px 10px;
  border-bottom: 1px solid #d7e1e8;
  background-color: #f5f9fc;
  color: #315570;
  font-size: 12px;
}

.aph-user-operation__message[hidden] {
  display: none;
}

.aph-user-operation__message.is-error {
  background-color: #fff3f2;
  color: #a62929;
}

.aph-user-operation__grid {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.aph-grid--system-user th,
.aph-grid--system-user .aph-grid-header__text {
  text-align: center;
}

.aph-user-status {
  display: inline-block;
  min-width: 66px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.aph-user-status.is-active {
  border-color: #acd2b7;
  background-color: #edf8f0;
  color: #26703d;
}

.aph-user-status.is-inactive {
  border-color: #d6c2c2;
  background-color: #f7f1f1;
  color: #8a4646;
}

.aph-grid-empty-row td {
  height: 46px;
  color: #6d8193;
  text-align: center;
}

.aph-thong-ke-det {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.aph-thong-ke-det__message {
  flex: 0 0 auto;
  min-height: 29px;
  padding: 6px 10px;
  border-bottom: 1px solid #c5d1db;
  background-color: #eef5fa;
  color: #405c72;
}

.aph-thong-ke-det__message[hidden] {
  display: none;
}
.aph-thong-ke-det__message.is-error {
  background-color: #fff3f2;
  color: #a62929;
}
.aph-thong-ke-det__grid {
  flex: 1 1 auto;
  min-height: 0;
}

/* Kho Sợi - Nhập Sợi */
.aph-nhap-soi {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.aph-nhap-soi__message {
  flex: 0 0 auto;
}

.aph-nhap-soi__message.is-error,
.aph-nhap-soi-dialog__message.is-error {
  color: #b42318;
}

.aph-nhap-soi__grid {
  flex: 1 1 auto;
  min-height: 0;
}

.aph-grid--kho-soi-nhap-soi th,
.aph-grid--kho-soi-nhap-soi .aph-grid-header__text {
  text-align: center;
  white-space: nowrap;
}

.aph-grid--kho-soi-nhap-soi .aph-grid-header {
  padding-right: 26px;
  padding-left: 26px;
}

/* Shared Lookup Combobox / Calculation Input */
.aph-lookup-combobox {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.aph-lookup-combobox > input {
  width: 100%;
  height: 100%;
  min-width: 0;
}

.aph-lookup-combobox__list {
  position: fixed;
  z-index: 1200;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid #91a9bb;
  background: #fff;
  box-shadow: 0 3px 9px rgba(30, 58, 80, 0.18);
  color: #203e57;
  font-size: 12px;
}

.aph-lookup-combobox__list[hidden] {
  display: none;
}

.aph-lookup-combobox__option {
  min-height: 27px;
  padding: 5px 7px;
  overflow: hidden;
  border-bottom: 1px solid #e1e8ed;
  cursor: pointer;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aph-lookup-combobox__option:last-child {
  border-bottom: 0;
}

.aph-lookup-combobox__option:hover,
.aph-lookup-combobox__option.is-active {
  background: #dcebf5;
  color: #153f5d;
}

.aph-lookup-combobox.is-invalid > input,
.aph-calculation-input.is-invalid {
  background: #fff4f3 !important;
  box-shadow: inset 0 0 0 1px #c93434;
}

/* Kho Sợi - Sắp Sợi */
.aph-sap-soi {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.aph-sap-soi__grid {
  flex: 1 1 auto;
  min-height: 0;
}

.aph-sap-soi__message {
  flex: 0 0 auto;
}

.aph-sap-soi__message.is-error,
.aph-sap-soi-dialog__message.is-error {
  color: #b42318;
}

.aph-grid--kho-soi-sap-soi th,
.aph-grid--kho-soi-sap-soi .aph-grid-header__text {
  text-align: center;
  white-space: nowrap;
}

.aph-grid--kho-soi-sap-soi .aph-grid-header {
  padding-right: 26px;
  padding-left: 26px;
}

.aph-grid--kho-soi-sap-soi td[data-column="maVai"],
.aph-grid--kho-soi-sap-soi td[data-column="maSoi"],
.aph-grid--kho-soi-sap-soi td[data-column="sapSoi"] {
  font-weight: 700;
}

.aph-dialog--sap-soi {
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.aph-dialog--sap-soi-search {
  width: min(460px, calc(100vw - 32px));
}

.aph-dialog--sap-soi-batch {
  width: min(1010px, calc(100vw - 24px));
}

.aph-dialog--sap-soi-batch .aph-dialog__form {
  padding: 10px 12px;
}

.aph-dialog--sap-soi-batch .aph-sap-soi-dialog__message {
  min-height: 16px;
  margin-top: 4px;
}

.aph-dialog--sap-soi-batch .aph-dialog__footer {
  margin: 6px -12px -10px;
  padding: 7px 12px;
}

.aph-sap-soi-dialog__form {
  min-height: 0;
}

.aph-sap-soi-dialog__scroll {
  min-height: 0;
  overflow: auto;
}

.aph-sap-soi-dialog__message {
  min-height: 18px;
  margin-top: 10px;
  color: #526b80;
  font-size: 12px;
}

.aph-sap-soi-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.aph-sap-soi-row,
.aph-sap-soi-detail__field {
  display: grid;
  grid-template-columns: 86px 8px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 32px;
  margin: 0;
}

.aph-sap-soi-row {
  color: #294861;
  font-size: 12px;
  font-weight: 600;
}

.aph-sap-soi-row > span,
.aph-sap-soi-detail__field > span {
  color: #526b80;
  white-space: nowrap;
}

.aph-sap-soi-row > i,
.aph-sap-soi-detail__field > i {
  color: #718799;
  font-style: normal;
  text-align: center;
}

.aph-sap-soi-row input {
  width: 100%;
  height: 30px;
  min-width: 0;
  padding: 0 7px;
  border: 1px solid #b9c8d5;
  background: #fff;
  color: #213f58;
  font: inherit;
  font-weight: 400;
}

.aph-sap-soi-row input[readonly] {
  background: #eef3f7;
}

.aph-sap-soi-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

.aph-sap-soi-detail > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.aph-sap-soi-detail__field {
  padding: 3px 0;
  border-bottom: 1px solid #e2e9ef;
  font-size: 12px;
}

.aph-sap-soi-detail__field strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #203e57;
  font-size: 13px;
  font-weight: 600;
}

.aph-sap-soi-detail__field.is-key strong {
  color: #124e78;
  font-size: 14px;
  font-weight: 700;
}

.aph-sap-soi-batch__table-wrap {
  overflow: auto;
  border: 1px solid #b9c8d5;
  background: #fff;
}

.aph-sap-soi-batch__table {
  width: 100%;
  min-width: 770px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #203e57;
  font-size: 12px;
}

.aph-sap-soi-batch__table th,
.aph-sap-soi-batch__table td {
  height: 30px;
  padding: 0;
  overflow: hidden;
  border-right: 1px solid #d4dee6;
  border-bottom: 1px solid #d4dee6;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aph-sap-soi-batch__table th {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: 0 5px;
  background: #dfeaf2;
  color: #294861;
}

.aph-sap-soi-batch__table:not(.is-saved) th:nth-child(1) { width: 32px; }
.aph-sap-soi-batch__table:not(.is-saved) th:nth-child(2) { width: 110px; }
.aph-sap-soi-batch__table:not(.is-saved) th:nth-child(3) { width: 95px; }
.aph-sap-soi-batch__table:not(.is-saved) th:nth-child(4) { width: 80px; }
.aph-sap-soi-batch__table:not(.is-saved) th:nth-child(5) { width: 170px; }
.aph-sap-soi-batch__table:not(.is-saved) th:nth-child(6) { width: 145px; }
.aph-sap-soi-batch__table:not(.is-saved) th:nth-child(7) { width: 105px; }
.aph-sap-soi-batch__table:not(.is-saved) th:nth-child(8) { width: 105px; }
.aph-sap-soi-batch__table:not(.is-saved) th:nth-child(9) { width: 135px; }
.aph-sap-soi-batch__table:not(.is-saved) { min-width: 980px; }
.aph-sap-soi-batch__table input[name="sapSoi"],
.aph-sap-soi-batch__table input[name="daSap"],
.aph-sap-soi-batch__table input[name="tonKho"] { text-align: right; }

.aph-sap-soi-required {
  color: #c93434;
}

.aph-sap-soi-batch__table:not(.is-saved) td:nth-child(2) input,
.aph-sap-soi-batch__table:not(.is-saved) td:nth-child(3) input,
.aph-sap-soi-batch__table:not(.is-saved) td:nth-child(2) select,
.aph-sap-soi-batch__table:not(.is-saved) td:nth-child(3) select {
  text-align: center;
  text-align-last: center;
}

.aph-sap-soi-batch__table input,
.aph-sap-soi-batch__table select {
  width: 100%;
  height: 29px;
  min-width: 0;
  padding: 0 5px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #203e57;
  font: inherit;
}

.aph-sap-soi-batch__table input[readonly],
.aph-xuat-soi-batch__table .aph-batch-readonly {
  background: #eef3f7;
}

.aph-sap-soi-batch__table input[name="sapSoi"][type="number"],
.aph-sap-soi-row input[name="sapSoi"][type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.aph-sap-soi-batch__table input[name="sapSoi"][type="number"]::-webkit-inner-spin-button,
.aph-sap-soi-batch__table input[name="sapSoi"][type="number"]::-webkit-outer-spin-button,
.aph-sap-soi-row input[name="sapSoi"][type="number"]::-webkit-inner-spin-button,
.aph-sap-soi-row input[name="sapSoi"][type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.aph-sap-soi-batch__table td:focus-within {
  box-shadow: inset 0 0 0 2px #397aa8;
}

.aph-sap-soi-batch__table.is-saved th:nth-child(1) { width: 32px; }
.aph-sap-soi-batch__table.is-saved th:nth-child(2) { width: 45px; }
.aph-sap-soi-batch__table.is-saved th:nth-child(3) { width: 100px; }
.aph-sap-soi-batch__table.is-saved th:nth-child(4) { width: 90px; }
.aph-sap-soi-batch__table.is-saved th:nth-child(5) { width: 170px; }
.aph-sap-soi-batch__table.is-saved th:nth-child(6) { width: 145px; }
.aph-sap-soi-batch__table.is-saved th:nth-child(7) { width: 75px; }
.aph-sap-soi-batch__table.is-saved th:nth-child(8) { width: 110px; }
.aph-sap-soi-batch__table.is-saved .is-generated {
  background: #fff3b8;
  color: #173f5f;
  font-size: 14px;
  font-weight: 700;
}

.aph-sap-soi-batch__success {
  display: flex;
  justify-content: center;
  padding: 14px 0 6px;
  color: #20a24a;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
}

.aph-sap-soi-delete__text {
  margin: 0 0 10px;
  color: #294861;
  font-size: 13px;
}

/* Kho Sợi / Xuất Sợi */
.aph-xuat-soi {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.aph-xuat-soi__grid { flex: 1 1 auto; min-height: 0; }
.aph-xuat-soi__message { flex: 0 0 auto; }
.aph-xuat-soi__message.is-error,
.aph-xuat-soi-dialog__message.is-error { color: #b42318; }
.aph-grid--kho-soi-xuat-soi th,
.aph-grid--kho-soi-xuat-soi .aph-grid-header__text {
  text-align: center;
  white-space: nowrap;
}
.aph-grid--kho-soi-xuat-soi .aph-grid-header { padding-right: 26px; padding-left: 26px; }
.aph-grid--kho-soi-xuat-soi td[data-column="maVai"],
.aph-grid--kho-soi-xuat-soi td[data-column="maSoi"] { font-weight: 700; }

.aph-dialog--xuat-soi {
  display: flex;
  flex-direction: column;
  width: min(820px, calc(100vw - 32px));
  max-height: calc(100% - 16px);
}
.aph-dialog--xuat-soi-search { width: min(460px, calc(100vw - 32px)); }
.aph-dialog--xuat-soi-batch { width: min(1260px, calc(100vw - 24px)); }
.aph-dialog--xuat-soi-batch:has(.aph-xuat-soi-batch__table:not(.is-saved)) {
  width: min(1076px, calc(100vw - 24px));
}
.aph-xuat-soi-dialog__form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.aph-xuat-soi-dialog__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}
.aph-dialog--xuat-soi-batch .aph-xuat-soi-dialog__scroll {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.aph-xuat-soi-dialog__message {
  flex: 0 0 auto;
  min-height: 18px;
  margin-top: 8px;
  color: #526b80;
  font-size: 12px;
}
.aph-dialog--xuat-soi .aph-dialog__footer { flex: 0 0 auto; }
.aph-xuat-soi-search { display: flex; flex-direction: column; gap: 6px; }
.aph-xuat-soi-row,
.aph-xuat-soi-detail__field {
  display: grid;
  grid-template-columns: 86px 8px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 32px;
  margin: 0;
}
.aph-xuat-soi-row { color: #294861; font-size: 12px; font-weight: 600; }
.aph-xuat-soi-row > span,
.aph-xuat-soi-detail__field > span { color: #526b80; white-space: nowrap; }
.aph-xuat-soi-row > i,
.aph-xuat-soi-detail__field > i { color: #718799; font-style: normal; text-align: center; }
.aph-xuat-soi-row input {
  width: 100%; height: 30px; min-width: 0; padding: 0 7px;
  border: 1px solid #b9c8d5; background: #fff;
  color: #213f58; font: inherit; font-weight: 400;
}
.aph-xuat-soi-row input[readonly] { background: #eef3f7; }
.aph-xuat-soi-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}
.aph-xuat-soi-detail > div { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.aph-xuat-soi-detail__field {
  padding: 3px 0; border-bottom: 1px solid #e2e9ef; font-size: 12px;
}
.aph-xuat-soi-detail__field strong {
  min-width: 0; overflow-wrap: anywhere; color: #203e57; font-size: 13px; font-weight: 600;
}
.aph-xuat-soi-detail__field.is-key strong { color: #124e78; font-size: 14px; font-weight: 700; }

.aph-xuat-soi-batch__table-wrap {
  flex: 1 1 auto; min-height: 0; overflow: auto;
  border: 1px solid #b9c8d5; background: #fff;
}
.aph-xuat-soi-batch__table-wrap.is-saved {
  display: flex; flex-direction: column;
}
.aph-xuat-soi-batch__table-wrap.is-saved .aph-xuat-soi-batch__table {
  flex: 0 0 auto;
}
.aph-calculation-mark,
.aph-dialog--xuat-soi .aph-xuat-soi-calculation-mark {
  margin-left: 2px; color: #20a24a;
}
.aph-xuat-soi-batch__table {
  width: 100%; min-width: 1100px; border-collapse: separate; border-spacing: 0;
  table-layout: fixed; color: #203e57; font-size: 12px;
}
.aph-xuat-soi-batch__table:not(.is-saved) { width: 1020px; min-width: 1020px; }
.aph-xuat-soi-batch__table th,
.aph-xuat-soi-batch__table td {
  height: 30px; padding: 0 5px; overflow: hidden;
  border-right: 1px solid #d4dee6; border-bottom: 1px solid #d4dee6;
  text-overflow: ellipsis; white-space: nowrap;
}
.aph-xuat-soi-batch__table th {
  position: sticky; z-index: 2; top: 0; background: #dfeaf2;
  color: #294861; text-align: center;
}
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(1) { width: 85px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(2) { width: 85px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(3) { width: 75px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(4) { width: 75px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(5) { width: 130px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(6) { width: 120px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(7) { width: 75px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(8) { width: 75px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(9) { width: 75px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(10) { width: 75px; }
.aph-xuat-soi-batch__table:not(.is-saved) th:nth-child(11) { width: 150px; }
.aph-xuat-soi-batch__table td:nth-child(1),
.aph-xuat-soi-batch__table td:nth-child(2) { font-weight: 700; }
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(1),
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(2) { text-align: center; }
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(5),
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(6),
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(11) { text-align: left; }
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(7),
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(8) { color: #c62828; font-weight: 700; }
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(3),
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(4),
.aph-xuat-soi-batch__table:not(.is-saved) td:nth-child(n+7):nth-child(-n+10),
.aph-xuat-soi-batch__table.is-saved td:nth-child(6),
.aph-xuat-soi-batch__table.is-saved td:nth-child(7) { text-align: right; }
.aph-xuat-soi-batch__table input {
  width: 100%; height: 29px; min-width: 0; padding: 0 4px;
  border: 0; border-radius: 0; outline: 0; background: transparent;
  color: #203e57; font: inherit;
}
.aph-xuat-soi-batch__table input[name="xuat"],
.aph-xuat-soi-batch__table input[name="taiNhap"] { text-align: right; }
.aph-xuat-soi-batch__table td:focus-within { box-shadow: inset 0 0 0 2px #397aa8; }
.aph-xuat-soi-batch__table.is-saved th:nth-child(1) { width: 60px; }
.aph-xuat-soi-batch__table.is-saved th:nth-child(2) { width: 115px; }
.aph-xuat-soi-batch__table.is-saved th:nth-child(3) { width: 110px; }
.aph-xuat-soi-batch__table.is-saved th:nth-child(4) { width: 145px; }
.aph-xuat-soi-batch__table.is-saved th:nth-child(5) { width: 135px; }
.aph-xuat-soi-batch__table.is-saved th:nth-child(6),
.aph-xuat-soi-batch__table.is-saved th:nth-child(7) { width: 105px; }
.aph-xuat-soi-batch__table.is-saved th:nth-child(8) { width: 170px; }
.aph-xuat-soi-batch__table.is-saved .is-generated {
  background: #fff3b8; color: #173f5f; font-weight: 700;
}
.aph-xuat-soi-batch__empty { margin: 12px; color: #526b80; font-size: 12px; }
.aph-xuat-soi-delete__text { margin: 0 0 10px; color: #294861; font-size: 13px; }
@media (max-width: 680px) {
  .aph-xuat-soi-detail { grid-template-columns: minmax(0, 1fr); }
}

.aph-dialog--nhap-soi {
  width: min(900px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.aph-dialog--nhap-soi-search {
  width: min(460px, calc(100vw - 32px));
}

.aph-dialog--nhap-soi-batch {
  display: flex;
  flex-direction: column;
  width: min(1500px, 100%);
  height: min(546px, 100%);
  max-height: 100%;
  overflow: hidden;
}

.aph-dialog--nhap-soi-batch > .aph-dialog__header {
  flex: 0 0 38px;
}

.aph-nhap-soi-batch__form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.aph-nhap-soi-batch__shared-fields {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 34px;
  margin-bottom: 10px;
}

.aph-nhap-soi-batch__date-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #294861;
  font-size: 12px;
  font-weight: 600;
}

.aph-nhap-soi-batch__date-field input {
  width: 150px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid #b9c8d5;
  background: #fff;
  color: #203e57;
  font: inherit;
  font-weight: 400;
}

.aph-nhap-soi-batch__date-field input[readonly] {
  background: #eef3f7;
}

.aph-nhap-soi-batch__date-field input.is-error {
  border-color: #d94545;
  box-shadow: 0 0 0 1px #d94545;
}

.aph-nhap-soi-batch__table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid #b9c8d5;
  background: #fff;
}

.aph-nhap-soi-batch__table {
  width: 100%;
  min-width: 980px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  color: #203e57;
  font-size: 12px;
}

.aph-nhap-soi-batch__table th,
.aph-nhap-soi-batch__table td {
  height: 29px;
  padding: 0;
  border-right: 1px solid #d4dee6;
  border-bottom: 1px solid #d4dee6;
  vertical-align: middle;
}

.aph-nhap-soi-batch__table th {
  position: sticky;
  z-index: 2;
  top: 0;
  padding: 0 6px;
  background: #dfeaf2;
  color: #294861;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aph-nhap-soi-batch__table th:first-child,
.aph-nhap-soi-batch__table td:first-child {
  position: sticky;
  z-index: 1;
  left: 0;
  width: 30px;
  min-width: 30px;
  background: #edf3f7;
  text-align: center;
}

.aph-nhap-soi-batch__table th:first-child {
  z-index: 3;
  background: #d7e4ed;
}

.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(2) { width: 52px; }
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(3) { width: 160px; }
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(4) { width: 150px; }
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(5) { width: 50px; }
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(6) { width: 58px; }
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(7) { width: 46px; }
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(8) { width: 78px; }
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(9) { width: 90px; }
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(10) { width: 86px; }
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(11) { width: 150px; }

.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th,
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td,
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) input,
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) select {
  text-align: center;
}

.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) select {
  text-align-last: center;
}

.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(3),
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(4),
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) th:nth-child(11),
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(3),
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(4),
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(11),
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(3) select,
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(3) input,
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(4) input,
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(11) input {
  text-align: left;
  text-align-last: left;
}

.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(3) select,
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(3) input,
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(4) input,
.aph-nhap-soi-batch__table:not(.aph-nhap-soi-batch__table--saved) td:nth-child(11) input {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aph-nhap-soi-batch__table input,
.aph-nhap-soi-batch__table select {
  width: 100%;
  height: 28px;
  min-width: 0;
  padding: 0 5px;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: #203e57;
  font: inherit;
}

.aph-nhap-soi-batch__table select {
  padding-right: 1px;
}

.aph-nhap-soi-batch__table .aph-lookup-combobox {
  height: 28px;
}

.aph-nhap-soi-batch__table input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.aph-nhap-soi-batch__table input[type="number"]::-webkit-inner-spin-button,
.aph-nhap-soi-batch__table input[type="number"]::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

.aph-nhap-soi-batch__table td:focus-within {
  box-shadow: inset 0 0 0 2px #397aa8;
}

.aph-nhap-soi-batch__table tr.is-error td:first-child,
.aph-nhap-soi-batch__table td.is-error {
  background-color: #fff0ee;
  box-shadow: inset 0 0 0 1px #d94545;
}

.aph-nhap-soi-batch__table--saved {
  min-width: 1125px;
  table-layout: fixed;
}

.aph-nhap-soi-batch__table--saved th,
.aph-nhap-soi-batch__table--saved td {
  min-width: 0;
  padding: 5px 6px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aph-nhap-soi-batch__table--saved th:nth-child(2) { width: 52px; }
.aph-nhap-soi-batch__table--saved th:nth-child(3) { width: 92px; }
.aph-nhap-soi-batch__table--saved th:nth-child(4) { width: 52px; }
.aph-nhap-soi-batch__table--saved th:nth-child(5) { width: 160px; }
.aph-nhap-soi-batch__table--saved th:nth-child(6) { width: 150px; }
.aph-nhap-soi-batch__table--saved th:nth-child(7) { width: 50px; }
.aph-nhap-soi-batch__table--saved th:nth-child(8) { width: 58px; }
.aph-nhap-soi-batch__table--saved th:nth-child(9) { width: 46px; }
.aph-nhap-soi-batch__table--saved th:nth-child(10) { width: 78px; }
.aph-nhap-soi-batch__table--saved th:nth-child(11) { width: 90px; }
.aph-nhap-soi-batch__table--saved th:nth-child(12) { width: 86px; }
.aph-nhap-soi-batch__table--saved th:nth-child(13) { width: 150px; }

.aph-nhap-soi-batch__table--saved th:nth-child(5),
.aph-nhap-soi-batch__table--saved th:nth-child(6),
.aph-nhap-soi-batch__table--saved th:nth-child(13),
.aph-nhap-soi-batch__table--saved td:nth-child(5),
.aph-nhap-soi-batch__table--saved td:nth-child(6),
.aph-nhap-soi-batch__table--saved td:nth-child(13) {
  text-align: left;
}

.aph-nhap-soi-batch__table--saved .aph-nhap-soi-batch__generated {
  min-width: 0;
  background: #fff3b8;
  color: #173f5f;
  font-size: 14px;
  font-weight: 700;
}

.aph-nhap-soi-batch__table-wrap.is-saved {
  display: flex;
  flex-direction: column;
}

.aph-nhap-soi-batch__table-wrap.is-saved .aph-nhap-soi-batch__table--saved {
  flex: 0 0 auto;
}

.aph-nhap-soi-batch__success-check {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  padding: 8px 0;
}

.aph-nhap-soi-batch__success-check svg {
  width: 92px;
  height: 72px;
  color: #20a24a;
}

.aph-nhap-soi-batch__footer {
  flex: 0 0 auto;
}

.aph-nhap-soi-batch__form > .aph-nhap-soi-dialog__message {
  flex: 0 0 auto;
}

.aph-nhap-soi-dialog__form {
  min-height: 0;
}

.aph-nhap-soi-dialog__scroll {
  overflow: auto;
}

.aph-nhap-soi-edit,
.aph-nhap-soi-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 28px;
}

.aph-nhap-soi-vertical-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.aph-nhap-soi-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.aph-nhap-soi-row-field,
.aph-nhap-soi-detail__field {
  display: grid;
  grid-template-columns: 92px 8px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  min-height: 32px;
  margin: 0;
}

.aph-nhap-soi-row-field {
  color: #294861;
  font-size: 12px;
  font-weight: 600;
}

.aph-nhap-soi-row-field__label,
.aph-nhap-soi-detail__label {
  min-width: 0;
  color: #526b80;
  white-space: nowrap;
}

.aph-nhap-soi-row-field__label b {
  color: #c93434;
}

.aph-nhap-soi-row-field__separator {
  color: #718799;
  text-align: center;
}

.aph-nhap-soi-row-field input,
.aph-nhap-soi-row-field select {
  width: 100%;
  height: 30px;
  min-width: 0;
  padding: 0 7px;
  border: 1px solid #b9c8d5;
  background: #fff;
  color: #213f58;
  font: inherit;
  font-weight: 400;
}

.aph-nhap-soi-row-field input[readonly] {
  background: #eef3f7;
  color: #344f65;
}

.aph-nhap-soi-row-field__key {
  color: #124e78 !important;
  font-weight: 700 !important;
}

.aph-nhap-soi-dialog__message {
  min-height: 18px;
  margin-top: 10px;
  color: #526b80;
  font-size: 12px;
}

.aph-nhap-soi-detail__field {
  padding: 3px 0;
  border-bottom: 1px solid #e2e9ef;
  font-size: 12px;
}

.aph-nhap-soi-detail__field strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #203e57;
  font-size: 13px;
  font-weight: 600;
}

.aph-nhap-soi-detail__field.is-key strong {
  color: #124e78;
  font-size: 14px;
  font-weight: 700;
}

.aph-nhap-soi-delete__text,
.aph-nhap-soi-delete__note {
  margin: 0 0 10px;
  color: #294861;
  font-size: 13px;
}

.aph-nhap-soi-delete__note {
  color: #687f92;
  font-size: 12px;
}

@media (max-width: 760px) {
  .aph-nhap-soi-edit,
  .aph-nhap-soi-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.aph-khach-hang {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.aph-khach-hang__message {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-bottom: 1px solid #c5d1db;
  background: #eef5fa;
  color: #405c72;
}

.aph-khach-hang__message[hidden] {
  display: none;
}

.aph-khach-hang__message.is-error {
  background: #fff3f2;
  color: #a62929;
}

.aph-khach-hang__grid {
  flex: 1 1 auto;
  min-height: 0;
}

.aph-grid--danh-muc-khach-hang {
  min-width: 0;
  margin-right: auto;
  margin-left: auto;
}

.aph-grid--danh-muc-khach-hang th,
.aph-grid--danh-muc-khach-hang .aph-grid-header__text {
  text-align: center;
}

.aph-grid--danh-muc-khach-hang td {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aph-khach-hang-status {
  display: inline-block;
  min-width: 88px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.aph-khach-hang-status.is-active {
  border-color: #a9cfb4;
  background: #e8f4eb;
  color: #28643a;
}

.aph-khach-hang-status.is-inactive {
  border-color: #d8b5b5;
  background: #f8eaea;
  color: #8a3333;
}

.aph-dialog--khach-hang {
  width: min(480px, calc(100vw - 32px));
}

.aph-dialog--khach-hang .aph-required-mark,
.aph-khach-hang-dialog__note {
  color: #b42318;
}

.aph-dialog--khach-hang .aph-required-mark {
  font-weight: 700;
}

.aph-dialog--khach-hang input[readonly] {
  background: #f3f6f8;
  color: #29475f;
  cursor: default;
}

.aph-khach-hang-dialog__note {
  margin-top: -2px;
  color: #c62828;
  font-size: 13px;
  line-height: 18px;
  text-align: center;
}

.aph-khach-hang-dialog__message {
  min-height: 18px;
  color: #a62929;
  font-size: 12px;
}

/* DonHang / MaVai */
.aph-ma-vai__grid {
  flex: 1 1 auto;
  min-height: 0;
}

.aph-grid--don-hang-ma-vai {
  min-width: 0;
  margin-right: auto;
  margin-left: auto;
}

.aph-grid--don-hang-ma-vai th,
.aph-grid--don-hang-ma-vai .aph-grid-header__text {
  text-align: center;
}

.aph-grid--don-hang-ma-vai td {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aph-grid--don-hang-ma-vai td.aph-ma-vai-grid__key {
  font-weight: 700;
}

.aph-dialog--ma-vai {
  display: flex;
  flex-direction: column;
  width: min(1240px, calc(100vw - 40px));
  max-height: calc(100% - 24px);
}

.aph-ma-vai-dialog__form {
  min-height: 0;
  overflow-y: auto;
}

.aph-ma-vai-dialog__columns {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 18px;
}

.aph-ma-vai-dialog__column {
  min-width: 0;
}

.aph-ma-vai-form-field {
  margin-bottom: 9px;
}

.aph-ma-vai-form-field label {
  display: block;
  margin-bottom: 3px;
  color: #405c72;
  font-size: 12px;
  font-weight: 600;
}

.aph-ma-vai-form-field input,
.aph-ma-vai-form-field select {
  display: block;
  width: 100%;
  height: 30px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid #bdcbd6;
  border-radius: 2px;
  background: #ffffff;
  color: #263f52;
  font-family: inherit;
  font-size: 13px;
}

.aph-ma-vai-form-field input:focus,
.aph-ma-vai-form-field select:focus {
  border-color: #4c8dbd;
  outline: 1px solid #4c8dbd;
  outline-offset: -1px;
}

.aph-ma-vai-form-field input[readonly] {
  background: #f1f4f6;
  color: #65798a;
}

.aph-ma-vai-form-field input:disabled,
.aph-ma-vai-form-field select:disabled {
  border-color: #d5dde3;
  background: #e9eef2;
  color: #8493a0;
  cursor: not-allowed;
}

.aph-ma-vai-form-field .aph-ma-vai-price-input {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.aph-ma-vai-dialog__message {
  min-height: 18px;
  color: #a62929;
  font-size: 12px;
}

.aph-dialog--ma-vai-detail {
  display: flex;
  flex-direction: column;
  height: auto;
  width: min(1180px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.aph-ma-vai-detail__form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.aph-ma-vai-detail__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.aph-ma-vai-detail__columns {
  display: grid;
  grid-template-columns:
    minmax(0, 0.7fr)
    minmax(0, 1fr)
    minmax(0, 1.3fr)
    minmax(0, 0.5fr);
  gap: 0 18px;
}

.aph-ma-vai-detail__column {
  min-width: 0;
}

.aph-ma-vai-detail__field {
  min-width: 0;
  margin-bottom: 8px;
}

.aph-ma-vai-detail__label {
  margin-bottom: 3px;
  color: #405c72;
  font-size: 12px;
  font-weight: 600;
}

.aph-ma-vai-detail__value {
  min-width: 0;
  min-height: 30px;
  padding: 5px 8px;
  overflow: hidden;
  font-size: 13px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aph-ma-vai-detail__field--primary .aph-ma-vai-detail__value {
  border-color: #b8d0df;
  background: #eaf3f8;
  color: #173f5c;
  font-size: 15px;
  font-weight: 700;
}

.aph-ma-vai-detail__field--numeric .aph-ma-vai-detail__value {
  text-align: right;
}

.aph-ma-vai-detail__field--center .aph-ma-vai-detail__value {
  text-align: center;
}

.aph-ma-vai-detail__audit {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 18px;
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid #dbe3e9;
}

.aph-ma-vai-detail__footer {
  flex: 0 0 auto;
  justify-content: flex-end;
}

@media (max-width: 1050px) {
  .aph-ma-vai-dialog__columns,
  .aph-ma-vai-detail__columns,
  .aph-ma-vai-detail__audit {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .aph-ma-vai-dialog__columns,
  .aph-ma-vai-detail__columns,
  .aph-ma-vai-detail__audit {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* DonHang / GCNhuom */
.aph-gc-nhuom__grid {
  flex: 1 1 auto;
  min-height: 0;
}

.aph-grid--don-hang-gc-nhuom {
  margin-right: auto;
  margin-left: auto;
}

.aph-grid--don-hang-gc-nhuom th,
.aph-grid--don-hang-gc-nhuom .aph-grid-header__text {
  text-align: center;
}

.aph-grid--don-hang-gc-nhuom td {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aph-dialog--gc-nhuom {
  width: min(900px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
}

.aph-dialog--gc-nhuom-delete {
  width: min(440px, calc(100vw - 40px));
}

.aph-gc-nhuom-dialog__form {
  overflow-y: auto;
}

.aph-gc-nhuom-dialog__columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 18px;
}

.aph-gc-nhuom-dialog__column {
  min-width: 0;
}

.aph-gc-nhuom-dialog__message {
  min-height: 18px;
  color: #a62929;
  font-size: 12px;
}

/* Keep migrated lookup inputs in the original form tracks and control height. */
.aph-dialog--so-don-hang .aph-lookup-combobox,
.aph-dialog--gc-nhuom .aph-lookup-combobox,
.aph-dialog--ma-vai .aph-lookup-combobox,
.aph-nhap-soi-edit .aph-lookup-combobox {
  height: 30px;
}

.aph-dialog--so-don-hang .aph-lookup-combobox > input,
.aph-dialog--gc-nhuom .aph-lookup-combobox > input {
  width: 100%;
}

@media (max-width: 760px) {
  .aph-gc-nhuom-dialog__columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

.aph-thong-ke-kiem-moc {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.aph-thong-ke-kiem-moc__message {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-bottom: 1px solid #c5d1db;
  background: #eef5fa;
  color: #405c72;
}

.aph-thong-ke-kiem-moc__message[hidden] {
  display: none;
}

.aph-thong-ke-kiem-moc__message.is-error {
  background: #fff3f2;
  color: #a62929;
}

.aph-thong-ke-kiem-moc__grid {
  flex: 1 1 auto;
  min-height: 0;
}

.aph-grid--thong-ke-kiem-moc {
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}

.aph-grid--thong-ke-kiem-moc th,
.aph-grid--thong-ke-kiem-moc .aph-grid-header__text {
  text-align: center;
  vertical-align: middle;
}

.aph-grid--thong-ke-kiem-moc td {
  height: 27px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aph-grid--thong-ke-kiem-moc .aph-thong-ke-kiem-moc__month-row td {
  border-top-color: #c7dccb;
  border-bottom-color: #c7dccb;
  background: #e7f3ea;
  color: #203f57;
  font-weight: 700;
}

.aph-grid--thong-ke-kiem-moc .aph-thong-ke-kiem-moc__item-row td {
  background: #ffffff;
}

.aph-thong-ke-kiem-moc__hierarchy {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-left: 5px;
}

.aph-thong-ke-kiem-moc__item-row .aph-thong-ke-kiem-moc__hierarchy {
  padding-left: 23px;
}

.aph-thong-ke-kiem-moc__hierarchy > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aph-thong-ke-kiem-moc__toggle,
.aph-thong-ke-kiem-moc__toggle-spacer {
  flex: 0 0 18px;
  width: 18px;
  height: 20px;
  margin-right: 2px;
}

.aph-thong-ke-kiem-moc__toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: #315f7d;
  font: inherit;
  cursor: pointer;
}

.aph-thong-ke-kiem-moc__toggle:hover,
.aph-thong-ke-kiem-moc__toggle:focus-visible {
  background: #d7e5ee;
  outline: 1px solid #79a2bd;
}

.aph-grid--thong-ke-kiem-moc td.aph-thong-ke-kiem-moc__right {
  text-align: right;
  padding-right: 7px;
}

.aph-grid--thong-ke-kiem-moc td:first-child {
  text-align: left;
}

.aph-grid--thong-ke-kiem-moc td.aph-thong-ke-kiem-moc__center {
  text-align: center;
}

.aph-grid--thong-ke-kiem-moc .aph-thong-ke-kiem-moc__month-row
  td.aph-thong-ke-kiem-moc__alert-metric:not(.aph-thong-ke-kiem-moc__alert-value) {
  font-weight: 400;
}

.aph-grid--thong-ke-kiem-moc td.aph-thong-ke-kiem-moc__alert-value {
  color: #a62929;
  font-weight: 700;
}

.aph-grid--thong-ke-det {
  min-width: 0;
}
.aph-grid--thong-ke-det th,
.aph-grid--thong-ke-det .aph-grid-header__text {
  text-align: center;
}
.aph-grid--thong-ke-det td {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.aph-grid--thong-ke-det td[data-column="maVai"],
.aph-grid--thong-ke-det td[data-column="soCay"] {
  font-weight: 700;
}

.aph-thong-ke-det__sort {
  width: 100%;
  min-width: 0;
  padding: 0 22px;
  overflow: hidden;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.aph-dialog--thong-ke-det-detail {
  display: flex;
  flex-direction: column;
  width: min(1000px, 100%);
  max-width: 1200px;
  max-height: calc(100% - 24px);
}

.aph-dialog--thong-ke-det-detail .aph-dialog__header {
  min-height: 44px;
  height: auto;
}

.aph-dialog--thong-ke-det-detail .aph-dialog__title {
  font-size: 19px;
}

.aph-thong-ke-det-detail__form {
  min-height: 0;
  overflow-y: auto;
}

.aph-thong-ke-det-detail__columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 16px;
}

.aph-thong-ke-det-detail__column {
  min-width: 0;
}

.aph-thong-ke-det-detail__field {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 7px;
}

.aph-thong-ke-det-detail__label {
  min-width: 0;
  margin: 0;
  color: #405c72;
  font-size: 14px;
  font-weight: 600;
}

.aph-thong-ke-det-detail__value {
  min-width: 0;
  min-height: 32px;
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1.35;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.aph-thong-ke-det-detail__field--fabric .aph-thong-ke-det-detail__label {
  color: #244f6d;
  font-weight: 700;
}

.aph-thong-ke-det-detail__field--fabric .aph-thong-ke-det-detail__value {
  border-color: #b8d0df;
  background-color: #eaf3f8;
  color: #173f5c;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
  overflow-wrap: normal;
}

.aph-thong-ke-det-detail__field--stock .aph-thong-ke-det-detail__value {
  font-weight: 700;
}

.aph-thong-ke-det-detail__field--long-text .aph-thong-ke-det-detail__value {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  overflow-wrap: anywhere;
}

.aph-thong-ke-det-detail__field--long-text {
  align-items: start;
}

.aph-thong-ke-det-detail__field--long-text .aph-thong-ke-det-detail__label {
  padding-top: 5px;
}

/* ============================================================
   THONG KE - SAN LUONG DET
   ============================================================ */

.aph-san-luong-det {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.aph-san-luong-det__switcher {
  display: flex;
  flex: 0 0 auto;
  align-items: end;
  min-height: 34px;
  padding: 4px 8px 0;
  border-bottom: 1px solid #b9c9d5;
  background: #edf3f7;
}

.aph-san-luong-det__mode {
  min-height: 29px;
  padding: 4px 14px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 2px 2px 0 0;
  background: transparent;
  color: #405c72;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.aph-san-luong-det__mode:hover {
  background: #e1ebf2;
  color: #173a59;
}

.aph-san-luong-det__mode.is-active {
  border-color: #9fb5c5;
  background: #ffffff;
  color: #174f7a;
}

.aph-san-luong-det__mode:focus-visible {
  outline: 2px solid #3b82b4;
  outline-offset: -2px;
}

.aph-san-luong-det__message {
  flex: 0 0 auto;
  min-height: 29px;
  padding: 6px 10px;
  border-bottom: 1px solid #d7e1e8;
  background: #f5f9fc;
  color: #315570;
  font-size: 12px;
}

.aph-san-luong-det__message[hidden] {
  display: none;
}

.aph-san-luong-det__message.is-error {
  background: #fff3f2;
  color: #a62929;
}

.aph-san-luong-det__grid {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.aph-san-luong-det__content {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
}

.aph-san-luong-det__content.has-chart {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
}

.aph-san-luong-det__chart {
  min-width: 0;
  min-height: 0;
  padding: 8px 8px 2px;
  overflow: auto;
  border-left: 1px solid #b9c9d5;
  background: #fbfdfe;
}

.aph-san-luong-det__chart[hidden] {
  display: none;
}

.aph-san-luong-det__chart-header {
  min-height: 38px;
  padding: 0 3px 5px;
  border-bottom: 1px solid #d7e1e8;
}

.aph-san-luong-det__chart-header h3 {
  margin: 0;
  color: #203f57;
  font-size: 13px;
  line-height: 20px;
}

.aph-san-luong-det__chart-header span {
  color: #607b8e;
  font-size: 11px;
}

.aph-san-luong-det__chart-state {
  display: grid;
  min-height: 260px;
  place-items: center;
  padding: 12px;
  color: #607486;
  font-size: 12px;
  text-align: center;
}

.aph-san-luong-det__chart-state.is-error {
  color: #a62929;
}

.aph-san-luong-det__chart-svg {
  display: block;
  width: 100%;
  min-width: 390px;
  max-height: 340px;
}

.aph-san-luong-det__chart-gridline {
  stroke: #d8e2e9;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.aph-san-luong-det__chart-axis-label {
  fill: #587083;
  font-size: 10px;
}

.aph-san-luong-det__chart-value-label {
  fill: #294e67;
  font-size: 10px;
  font-weight: 600;
  pointer-events: none;
}

.aph-san-luong-det__chart-bar {
  fill: #2777a8;
}

.aph-san-luong-det__chart-bar.is-zero {
  fill: #a8bfce;
}

.aph-san-luong-det__chart-column:hover .aph-san-luong-det__chart-bar,
.aph-san-luong-det__chart-column:focus .aph-san-luong-det__chart-bar {
  fill: #15577f;
}

.aph-san-luong-det__chart-column:focus {
  outline: none;
}

.aph-san-luong-det__donuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  padding: 7px 0;
}
.aph-san-luong-det__donut-item {
  min-width: 0;
  padding: 4px;
  border: 1px solid #d5e4db;
  background: #fff;
}
.aph-san-luong-det__donut-item h4 {
  margin: 0 0 2px;
  color: #2f6f4e;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}
.aph-san-luong-det__donut-body {
  display: grid;
  grid-template-columns: minmax(160px, 62%) minmax(120px, 38%);
  gap: 2px;
  align-items: center;
  min-width: 0;
}
.aph-san-luong-det__donut-body svg {
  display: block;
  width: 100%;
  max-height: 175px;
}
.aph-san-luong-det__donut-body svg text {
  fill: #315f4a;
  font-size: 11px;
  font-weight: 700;
}
.aph-san-luong-det__donut-body ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.aph-san-luong-det__donut-body li {
  display: grid;
  grid-template-columns: 8px minmax(0, 95px) 34px;
  gap: 2px;
  align-items: center;
  justify-content: start;
  min-width: 0;
  font-size: 13px;
  line-height: 21px;
}
.aph-san-luong-det__donut-body li > span {
  width: 7px;
  height: 7px;
  background: var(--aph-donut-color);
}
.aph-san-luong-det__donut-body li b {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.aph-san-luong-det__donut-body li em {
  color: #587166;
  font-style: normal;
  text-align: right;
  white-space: nowrap;
}
.aph-san-luong-det__donut-empty {
  display: grid;
  min-height: 158px;
  place-items: center;
  color: #708178;
  font-size: 11px;
}
.aph-grid--san-luong-det {
  min-width: 100%;
}

.aph-san-luong-det[data-view="ngay"] .aph-grid--san-luong-det {
  min-width: 0;
  margin-left: auto;
  margin-right: auto;
}
.aph-san-luong-det[data-view="ma-vai"] {
  --aph-view-accent: #c96b18;
  --aph-view-accent-soft: #fff2e5;
  --aph-view-accent-light: #fff8f1;
}
.aph-san-luong-det[data-view="khach-hang"] {
  --aph-view-accent: #2f855a;
  --aph-view-accent-soft: #e8f5ed;
  --aph-view-accent-light: #f3faf6;
}
.aph-san-luong-det[data-view="hinh-thuc"] {
  --aph-view-accent: #8b2635;
  --aph-view-accent-soft: #f8e9ec;
  --aph-view-accent-light: #fcf4f5;
}
.aph-san-luong-det[data-view]:not([data-view="ngay"])
  .aph-san-luong-det__mode.is-active {
  border-color: color-mix(in srgb, var(--aph-view-accent) 55%, #fff);
  background: var(--aph-view-accent-soft);
  color: var(--aph-view-accent);
}
.aph-san-luong-det[data-view]:not([data-view="ngay"])
  .aph-san-luong-det__group-row--level-0
  td {
  border-top-color: color-mix(in srgb, var(--aph-view-accent) 45%, #c5d2dc);
  background: var(--aph-view-accent-soft);
  color: color-mix(in srgb, var(--aph-view-accent) 72%, #203f57);
}
.aph-san-luong-det[data-view]:not([data-view="ngay"])
  .aph-san-luong-det__group-row--level-1
  td {
  background: var(--aph-view-accent-light);
}
.aph-san-luong-det[data-view]:not([data-view="ngay"])
  .aph-san-luong-det__chart {
  border-left-color: color-mix(in srgb, var(--aph-view-accent) 45%, #b9c9d5);
}
.aph-san-luong-det[data-view]:not([data-view="ngay"])
  .aph-san-luong-det__chart-header {
  border-bottom-color: color-mix(in srgb, var(--aph-view-accent) 35%, #d7e1e8);
  box-shadow: inset 3px 0 0 var(--aph-view-accent);
  padding-left: 9px;
}
.aph-san-luong-det[data-view]:not([data-view="ngay"])
  .aph-san-luong-det__chart-header
  h3 {
  color: var(--aph-view-accent);
}

.aph-grid--san-luong-det th,
.aph-grid--san-luong-det .aph-grid-header__text {
  text-align: center;
}

.aph-grid--san-luong-det td {
  height: 27px;
}

.aph-san-luong-det__group-row--level-0 td {
  border-top-color: #aebfcb;
  border-bottom-color: #c5d2dc;
  background: #e8f0f5;
  color: #203f57;
  font-weight: 700;
}

.aph-san-luong-det__group-row--level-1 td {
  background: #f2f6f9;
  color: #31536c;
  font-weight: 600;
}

.aph-san-luong-det__detail-row td {
  background: #ffffff;
}

.aph-san-luong-det__hierarchy {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-left: calc(var(--aph-hierarchy-level) * 18px);
}

.aph-san-luong-det__hierarchy--level-0 {
  --aph-hierarchy-level: 0;
}

.aph-san-luong-det__hierarchy--level-1 {
  --aph-hierarchy-level: 1;
}

.aph-san-luong-det__hierarchy--level-2 {
  --aph-hierarchy-level: 2;
}

.aph-san-luong-det__hierarchy > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aph-san-luong-det__toggle,
.aph-san-luong-det__toggle-spacer {
  flex: 0 0 18px;
  width: 18px;
  height: 20px;
  margin-right: 2px;
}

.aph-san-luong-det__toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: #315f7d;
  font: inherit;
  font-size: 13px;
  line-height: 20px;
  cursor: pointer;
}

.aph-san-luong-det__toggle:hover,
.aph-san-luong-det__toggle:focus-visible {
  background: #d7e5ee;
  outline: 1px solid #79a2bd;
}

@media (max-width: 700px) {
  .aph-san-luong-det__switcher {
    overflow-x: auto;
  }

  .aph-san-luong-det__mode {
    flex: 0 0 auto;
  }
}

@media (max-width: 1050px) {
  .aph-san-luong-det__content.has-chart {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(260px, 1fr) auto;
    overflow: auto;
  }

  .aph-san-luong-det__content.has-chart .aph-san-luong-det__grid {
    min-height: 260px;
  }

  .aph-san-luong-det__chart {
    border-top: 1px solid #b9c9d5;
    border-left: 0;
  }
}

@media (max-width: 620px) {
  .aph-san-luong-det__donuts {
    grid-template-columns: minmax(0, 1fr);
  }
  .aph-san-luong-det__donut-body {
    grid-template-columns: minmax(145px, 55%) minmax(145px, 45%);
  }
}

.aph-dialog--thong-ke-det-detail .aph-dialog-button {
  font-size: 15px;
}

.aph-dialog--system-user {
  width: min(560px, 100%);
}

.aph-user-dialog-fields > .aph-form-row > span:first-child {
  color: #405c72;
  font-size: 13px;
  font-weight: 600;
}

.aph-user-active-option,
.aph-user-role-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
}

.aph-form-row .aph-user-active-option input,
.aph-form-row .aph-user-role-option input {
  width: auto;
  height: auto;
  margin: 0;
}

.aph-form-row--user-roles {
  align-items: start;
}

.aph-form-row--user-roles > span {
  padding-top: 6px;
}

.aph-user-role-selector {
  max-height: 190px;
  padding: 5px 8px;
  overflow-y: auto;
  border: 1px solid #bdcbd6;
  background-color: #ffffff;
}

.aph-user-role-option:hover {
  background-color: #f1f6f9;
}

.aph-user-role-empty {
  padding: 4px 0;
  color: #6d8193;
  font-size: 12px;
}

.aph-user-form-message {
  min-height: 20px;
  margin-top: 4px;
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 850px) {
  .aph-batch-add-layout {
    grid-template-columns: 1fr;
  }
}

.aph-delete-confirm-button {
  border-color: #b83333;
  background-color: #c63d3d;
  color: #ffffff;
}

.aph-delete-confirm-button:hover:not(:disabled) {
  background-color: #aa2f2f;
}

.aph-delete-confirm-button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* ============================================================
   SYSTEM - ROLE
   ============================================================ */

.aph-role-operation {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.aph-role-operation__message {
  flex: 0 0 auto;
  min-height: 29px;
  padding: 6px 10px;
  border-bottom: 1px solid #d7e1e8;
  background-color: #f5f9fc;
  color: #315570;
  font-size: 12px;
}

.aph-role-operation__message[hidden] {
  display: none;
}
.aph-role-operation__message.is-error {
  background-color: #fff3f2;
  color: #a62929;
}
.aph-role-operation__grid {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
.aph-grid--system-role th,
.aph-grid--system-role .aph-grid-header__text {
  text-align: center;
}

.aph-role-status,
.aph-role-permission-count {
  display: inline-block;
  min-width: 54px;
  padding: 2px 7px;
  border: 1px solid #c8d5de;
  border-radius: 2px;
  background-color: #f3f7fa;
  color: #315570;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.aph-role-status.is-active {
  border-color: #acd2b7;
  background-color: #edf8f0;
  color: #26703d;
}
.aph-role-status.is-inactive {
  border-color: #d6c2c2;
  background-color: #f7f1f1;
  color: #8a4646;
}
.aph-dialog--system-role {
  width: min(600px, 100%);
}
.aph-dialog--role-permissions {
  width: min(850px, 100%);
}
.aph-role-dialog-fields > .aph-form-row > span:first-child {
  color: #405c72;
  font-size: 13px;
  font-weight: 600;
}
.aph-role-active-option {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 27px;
}
.aph-form-row .aph-role-active-option input {
  width: auto;
  height: auto;
  margin: 0;
}
.aph-role-form-message {
  min-height: 20px;
  margin-top: 4px;
  color: #b42318;
  font-size: 12px;
  font-weight: 600;
}
.aph-role-delete-warning {
  margin: 6px 0;
  padding: 7px 9px;
  border: 1px solid #e3c2c2;
  background: #fff5f4;
  color: #9a3030;
  font-size: 12px;
}
.aph-form-row--role-permissions {
  align-items: start;
}
.aph-role-code-list {
  max-height: 260px;
  overflow-y: auto;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.aph-role-permission-matrix {
  max-height: min(58vh, 500px);
  overflow-y: auto;
  border: 1px solid #c8d5de;
  background: #fff;
}

.aph-role-permission-module h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 6px 9px;
  border-bottom: 1px solid #bdcbd6;
  background: #dfeaf2;
  color: #173a59;
  font-size: 13px;
}

.aph-role-permission-business__title {
  padding: 5px 10px;
  border-bottom: 1px solid #dce4ea;
  background: #f3f6f8;
  color: #405c72;
  font-size: 12px;
  font-weight: 700;
}
.aph-role-permission-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 4px 10px;
  border-bottom: 1px solid #e2e8ed;
  font-size: 12px;
}
.aph-role-permission-option:hover {
  background: #f5f9fc;
}
.aph-role-permission-option input {
  width: auto;
  height: auto;
  margin: 0;
}
.aph-role-permission-option strong {
  display: block;
  color: #263f52;
  font-family: Consolas, monospace;
  font-size: 12px;
}
.aph-role-permission-option small {
  display: block;
  color: #6a7e8e;
}
.aph-role-permission-option em {
  color: #a04b34;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.aph-role-permission-option.is-inactive {
  background: #faf5f2;
  opacity: 0.78;
}
.aph-toolbar-button[data-action="permissions"] {
  color: #315f87;
}

/* ============================================================
   SYSTEM - PERMISSION
   ============================================================ */

.aph-permission-operation {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.aph-permission-operation__message {
  flex: 0 0 auto;
  min-height: 29px;
  padding: 6px 10px;
  border-bottom: 1px solid #d7e1e8;
  background-color: #f5f9fc;
  color: #315570;
  font-size: 12px;
}

.aph-permission-operation__message[hidden] {
  display: none;
}
.aph-permission-operation__message.is-error {
  background-color: #fff3f2;
  color: #a62929;
}
.aph-permission-operation__grid {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
.aph-grid--system-permission th,
.aph-grid--system-permission .aph-grid-header__text {
  text-align: center;
}

.aph-permission-status {
  display: inline-block;
  min-width: 66px;
  padding: 2px 7px;
  border: 1px solid transparent;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.aph-permission-status.is-active {
  border-color: #acd2b7;
  background-color: #edf8f0;
  color: #26703d;
}
.aph-permission-status.is-inactive {
  border-color: #d6c2c2;
  background-color: #f7f1f1;
  color: #8a4646;
}
.aph-dialog--system-permission {
  width: min(620px, 100%);
}
.aph-permission-dialog-fields > .aph-form-row > span:first-child {
  color: #405c72;
  font-size: 13px;
  font-weight: 600;
}

/* Kho Sợi - Xuất Ngoài reuses the compact Sắp Sợi dialog/table styles. */
.aph-grid--kho-soi-xuat-ngoai th[data-column="xuat"] .aph-grid-header {
  padding-left: 7px;
}

.aph-grid--kho-soi-ton-kho-soi td[data-column="maSoi"],
.aph-grid--kho-soi-ton-kho-soi td[data-column="tonKho"] {
  font-weight: 700;
}

.aph-grid--kho-soi-ton-kho-soi {
  min-width: 0;
  margin-right: auto;
  margin-left: auto;
}

.aph-grid--kho-soi-ton-kho-soi tr.aph-ton-kho-soi__row--negative td {
  color: #b42318;
  font-weight: 700;
}

.aph-grid--kho-soi-ton-kho-soi td[data-column="lot"] {
  text-align: left;
}

.aph-grid--kho-soi-ton-kho-soi td[data-column="tonKho"] {
  text-align: right;
}

.aph-dialog--ton-kho-soi-detail {
  width: min(420px, calc(100vw - 32px));
}

.aph-ton-kho-soi-detail {
  grid-template-columns: minmax(0, 1fr);
}

.aph-ton-kho-soi-detail .aph-sap-soi-detail__field {
  grid-template-columns: 108px 8px minmax(0, 1fr);
}

.aph-ton-kho-soi-detail .aph-sap-soi-detail__field strong {
  text-align: center;
}

.aph-dialog--xuat-ngoai-batch {
  width: min(1400px, calc(100vw - 24px));
}
.aph-dialog--xuat-ngoai-batch .aph-sap-soi-row {
  max-width: 310px;
  margin-bottom: 8px;
}
.aph-xuat-ngoai-batch__table:not(.is-saved) { min-width: 1270px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(1) { width: 32px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(2) { width: 90px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(3) { width: 100px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(4) { width: 165px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(5) { width: 130px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(6) { width: 100px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(7) { width: 90px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(8) { width: 115px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(9) { width: 135px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(10) { width: 100px; }
.aph-xuat-ngoai-batch__table:not(.is-saved) th:nth-child(11) { width: 140px; }
.aph-xuat-ngoai-batch__table input[name="xuat"],
.aph-xuat-ngoai-batch__table input[name="tonKho"] { text-align: right; }
.aph-xuat-ngoai-batch__table input[name="tonKho"] { font-weight: 700; }
.aph-xuat-ngoai-batch__table.is-saved { min-width: 1200px; }
.aph-xuat-ngoai-batch__table.is-saved th:nth-child(n+2) { width: auto; }
.aph-xuat-ngoai-batch__table.is-saved td:nth-child(n+4) { text-align: left; padding: 0 5px; }
.aph-xuat-ngoai-batch__table.is-saved td:nth-child(6) { text-align: right; }

.aph-moc-ton { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.aph-moc-ton__grid { flex: 1; min-height: 0; }
.aph-moc-ton__status { min-height: 20px; padding: 2px 7px; color: #b42318; }
.aph-grid--moc-ton { min-width: 0; margin-inline: auto; }
.aph-grid--moc-ton tbody td,
.aph-grid--moc-ton tbody td[data-type="number"] { text-align: center; }
.aph-grid--moc-ton tbody tr.aph-moc-ton__row--has-note td,
.aph-grid--kiem-moc-chi-tiet tbody tr.aph-kiem-moc-chi-tiet__row--warning td {
  background: #fff0ef;
  color: #a52218;
  font-weight: 600;
}
.aph-grid--moc-ton tbody tr.aph-moc-ton__row--missing-nhap td {
  background: #e7f3ea;
  color: #1f6b3a;
  font-weight: 600;
}
.aph-grid--moc-ton tbody tr.aph-moc-ton__row--has-note.is-selected td,
.aph-grid--kiem-moc-chi-tiet tbody tr.aph-kiem-moc-chi-tiet__row--warning.is-selected td {
  background: #cce3fa;
  color: #8c1b14;
}
.aph-grid--moc-ton tbody tr.aph-moc-ton__row--missing-nhap.is-selected td {
  background: #cce3fa;
  color: #1f6b3a;
}
.aph-dialog--moc-ton-search { width: min(440px, calc(100vw - 32px)); }
.aph-moc-ton__search-fields { display: grid; gap: 6px; padding: 12px 16px; }

.aph-kiem-moc-chi-tiet { display: flex; flex-direction: column; width: 100%; height: 100%; min-height: 0; }
.aph-kiem-moc-chi-tiet__grid { flex: 1; min-height: 0; }
.aph-kiem-moc-chi-tiet__status { min-height: 20px; padding: 2px 7px; color: #b42318; }
.aph-grid--kiem-moc-chi-tiet { min-width: 0; }
.aph-grid--kiem-moc-chi-tiet tbody tr:not(.aph-grid-empty-row) { cursor: pointer; }
.aph-grid--kiem-moc-chi-tiet tbody td,
.aph-grid--kiem-moc-chi-tiet tbody td[data-type="number"] { text-align: center; }
.aph-grid--kiem-moc-chi-tiet th:is([data-column="ab"], [data-column="c"], [data-column="d"],
  [data-column="e"], [data-column="f"], [data-column="g"], [data-column="loi"]) .aph-grid-header { padding-left: 26px; }
.aph-grid--kiem-moc-chi-tiet th:is([data-column="ab"], [data-column="c"], [data-column="d"],
  [data-column="e"], [data-column="f"], [data-column="g"], [data-column="loi"]) .aph-grid-header__text { text-align: center; }
.aph-dialog--kiem-moc-chi-tiet-search { width: min(440px, calc(100vw - 32px)); }
.aph-dialog--kiem-moc-chi-tiet-edit,
.aph-dialog--kiem-moc-chi-tiet-detail {
  display: flex; flex-direction: column; min-height: 0;
  max-height: min(85vh, calc(100% - 16px)); overflow: hidden;
  width: min(70%, 920px); min-width: min(760px, 100%);
}
.aph-dialog--kiem-moc-chi-tiet-edit .aph-dialog__header,
.aph-dialog--kiem-moc-chi-tiet-detail .aph-dialog__header { flex: 0 0 38px; }
.aph-dialog--kiem-moc-chi-tiet-edit .aph-dialog__title,
.aph-dialog--kiem-moc-chi-tiet-detail .aph-dialog__title { font-size: 15px; }
.aph-dialog--kiem-moc-chi-tiet-edit .aph-dialog__form {
  display: flex; flex: 1 1 auto; flex-direction: column;
  min-height: 0; padding: 0; overflow: hidden;
}
.aph-kiem-moc-chi-tiet__dialog-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px 12px; }
.aph-kiem-moc-chi-tiet__edit-message { min-height: 20px; padding: 2px 14px; color: #b42318; }
.aph-dialog--kiem-moc-chi-tiet-edit .aph-dialog__footer,
.aph-dialog--kiem-moc-chi-tiet-detail .aph-dialog__footer { flex: 0 0 auto; margin: 0; padding: 8px 14px; }
.aph-dialog--kiem-moc-chi-tiet-edit .aph-dialog-button,
.aph-dialog--kiem-moc-chi-tiet-detail .aph-dialog-button { font-size: 14px; }
.aph-kiem-moc-chi-tiet__dialog-fields { display: grid; grid-template-columns: 0.85fr 1.10fr 0.85fr; gap: 12px; }
.aph-kiem-moc-chi-tiet__dialog-column { min-width: 0; display: grid; align-content: start; gap: 5px; }
.aph-kiem-moc-chi-tiet__dialog-column h3 { margin: 0 0 3px; padding-bottom: 4px; border-bottom: 1px solid #d4dfe7; color: var(--aph-header-text); font-size: 15px; font-weight: 700; text-transform: uppercase; }
.aph-kiem-moc-chi-tiet__dialog-field { min-width: 0; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 5px; align-items: center; font-size: 15px; }
.aph-kiem-moc-chi-tiet__dialog-column:nth-child(2) .aph-kiem-moc-chi-tiet__dialog-field { grid-template-columns: 42px minmax(0, 1fr); }
.aph-kiem-moc-chi-tiet__dialog-column:nth-child(3) .aph-kiem-moc-chi-tiet__dialog-field { grid-template-columns: 58px minmax(0, 1fr); }
.aph-kiem-moc-chi-tiet__dialog-column:first-child .aph-kiem-moc-chi-tiet__dialog-field > span,
.aph-kiem-moc-chi-tiet__dialog-column:first-child .aph-kiem-moc-chi-tiet__dialog-field > label { white-space: nowrap; }
.aph-kiem-moc-chi-tiet__dialog-field > span,
.aph-kiem-moc-chi-tiet__dialog-field > label { color: #405c72; font-weight: 600; }
.aph-kiem-moc-chi-tiet__dialog-field strong,
.aph-kiem-moc-chi-tiet__dialog-field input {
  min-width: 0; min-height: 30px; padding: 3px 6px; border: 1px solid #d4dfe7;
  color: #29475f; font-size: 15px; font-weight: 400; text-align: center;
}
.aph-kiem-moc-chi-tiet__dialog-field strong { display: flex; align-items: center; justify-content: center; background: #f3f6f8; overflow-wrap: anywhere; }
.aph-kiem-moc-chi-tiet__dialog-field input { width: 100%; height: 30px; border-color: #bdcbd6; border-radius: 2px; background: #fff; font-family: inherit; }
.aph-kiem-moc-chi-tiet__dialog-field .aph-lookup-combobox { min-width: 0; height: 30px; }
@media (max-width: 760px) {
  .aph-kiem-moc-chi-tiet__dialog-fields { grid-template-columns: minmax(0, 1fr); }
}
.aph-thong-ke-kcs-moc {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.aph-thong-ke-kcs-moc__status:not(:empty) {
  padding: 6px 10px;
  border-bottom: 1px solid #e6c9a5;
  background: #fff7ed;
  color: #704321;
}

.aph-thong-ke-kcs-moc__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}

.aph-thong-ke-kcs-moc__grid {
  min-width: 0;
  min-height: 0;
}

.aph-grid--thong-ke-kcs-moc th {
  border-color: #9c4d11;
  background-color: #b45b13;
  color: #fff;
}

.aph-grid--thong-ke-kcs-moc th:not(:first-child) .aph-grid-header {
  padding-right: 7px;
}

.aph-grid--thong-ke-kcs-moc th:not(:first-child) .aph-grid-header__text {
  text-align: center;
}

.aph-grid--thong-ke-kcs-moc td {
  height: 27px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aph-grid--thong-ke-kcs-moc td[data-type="number"] {
  text-align: center;
}

.aph-grid--thong-ke-kcs-moc .aph-thong-ke-kcs-moc__row--0 td {
  background: #fbe8d0;
  color: #633714;
  font-weight: 700;
}

.aph-grid--thong-ke-kcs-moc .aph-thong-ke-kcs-moc__row--1 td {
  background: #fff2e2;
  color: #704321;
  font-weight: 600;
}

.aph-grid--thong-ke-kcs-moc tbody tr.is-selected td {
  background: #dcecf7;
}

.aph-thong-ke-kcs-moc__label {
  display: flex;
  align-items: center;
  min-width: 0;
}

.aph-thong-ke-kcs-moc__label--1 { padding-left: 18px; }
.aph-thong-ke-kcs-moc__label--2 { padding-left: 36px; }

.aph-thong-ke-kcs-moc__label > span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.aph-thong-ke-kcs-moc__toggle,
.aph-thong-ke-kcs-moc__toggle-space {
  flex: 0 0 18px;
  width: 18px;
  margin-right: 3px;
}

.aph-thong-ke-kcs-moc__toggle {
  padding: 0;
  border: 0;
  background: transparent;
  color: #9a541e;
  font: inherit;
  cursor: pointer;
}

.aph-thong-ke-kcs-moc__toggle:focus-visible {
  outline: 1px solid #c66a1b;
}

.aph-thong-ke-kcs-moc__chart {
  min-width: 0;
  min-height: 0;
  padding: 8px;
  overflow: auto;
  border-left: 1px solid #e6c9a5;
  background: #fffcf8;
}

.aph-thong-ke-kcs-moc__chart-empty {
  display: grid;
  min-height: 260px;
  place-items: center;
  color: #80664f;
  font-size: 12px;
}

.aph-thong-ke-kcs-moc__svg {
  display: block;
  width: 100%;
  min-width: 380px;
  max-height: 350px;
}

.aph-thong-ke-kcs-moc__svg text {
  fill: #755b43;
  font-size: 10px;
}

.aph-thong-ke-kcs-moc__svg .aph-thong-ke-kcs-moc__data-label {
  fill: #4a3528;
  font-weight: 600;
  pointer-events: none;
}

.aph-thong-ke-kcs-moc__gridline {
  stroke: #eadccb;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.aph-thong-ke-kcs-moc__svg circle:focus-visible {
  stroke: #704321;
  stroke-width: 2;
}

.aph-thong-ke-kcs-moc__legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px 12px;
  font-size: 11px;
}

.aph-thong-ke-kcs-moc__legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.aph-thong-ke-kcs-moc__legend i {
  width: 12px;
  height: 3px;
}

@media (max-width: 1050px) {
  .aph-thong-ke-kcs-moc__content {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(260px, 1fr) auto;
    overflow: auto;
  }

  .aph-thong-ke-kcs-moc__chart {
    border-top: 1px solid #e6c9a5;
    border-left: 0;
  }
}
