html,
body {
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.page-head h1 {
  font-size: 22px;
  line-height: 1.2;
}

.page-head p {
  font-size: 12.5px;
}

.btn {
  height: 34px;
  font-size: 12px;
}

.btn-sm {
  height: 29px;
  font-size: 11px;
}

.portal-switch-btn,
.search-global input,
.toolbar input,
.toolbar select,
.field input,
.field select,
.field textarea {
  font-size: 12px;
}

.portal-switch-btn {
  cursor: pointer;
  border-color: color-mix(in srgb, var(--portal-accent, var(--regen)) 18%, #d6dee7);
  background: color-mix(in srgb, var(--portal-accent, var(--regen)) 4%, #ffffff);
}

.portal-switch-btn i,
.user-menu-btn i {
  font-size: 9px;
  color: #778391;
}

.portal-switch-menu {
  width: 244px;
}

.portal-switch-item {
  min-height: 34px;
  color: #263546;
  text-decoration: none;
}

.portal-switch-item.active {
  background: color-mix(in srgb, var(--portal-accent, var(--regen)) 9%, #ffffff);
  color: var(--portal-accent, var(--regen));
  font-weight: 600;
}

.topbar {
  border-top: 3px solid var(--portal-accent, var(--regen));
}

.app-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.main {
  min-height: 100vh;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: calc(100% - var(--sidebar));
  max-width: 100%;
  overflow-x: hidden;
}

.content {
  flex: 1 0 auto;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

.app-footer {
  flex: 0 0 auto;
  margin-top: auto;
}

.portal-switch-btn:hover,
.portal-switch-btn[aria-expanded="true"] {
  color: var(--portal-accent, var(--regen));
  background: color-mix(in srgb, var(--portal-accent, var(--regen)) 8%, #ffffff);
}

.search-global:focus-within i {
  color: var(--portal-accent, var(--regen));
}

.search-global input:focus {
  border-color: color-mix(in srgb, var(--portal-accent, var(--regen)) 44%, #d6dee7);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-accent, var(--regen)) 12%, #ffffff);
}

.toolbar input,
.toolbar select {
  height: 34px;
}

.kpi-label,
.field label,
.production-code,
.production-stats span,
.production-vessel span {
  font-size: 10.5px;
}

.kpi-value {
  font-size: 20px;
}

.kpi-sub,
.production-live,
.production-empty-note,
.pagination,
.regen-dt-footer {
  font-size: 10.5px;
}

table,
.dt-container,
.select2-container,
.select2-dropdown {
  font-size: 12px;
}

.table-wrap {
  width: 100%;
  max-height: none !important;
  overflow-x: auto;
  overflow-y: visible !important;
  background: #ffffff;
}

.table-wrap > table,
.table-wrap > .dt-container,
.dt-container .dt-layout-cell.dt-layout-full,
.dt-container .dt-layout-cell:only-child,
.dt-container .dt-layout-row,
.dt-container .dt-layout-cell,
.dt-container,
.dt-container .dt-layout-table,
.dt-container .dt-scroll,
.dt-container .dt-scroll-head,
.dt-container .dt-scroll-headInner,
.dt-container .dt-scroll-body,
.dt-container table.dataTable {
  max-height: none !important;
  width: 100% !important;
}

.table-wrap > table,
.table-wrap > .dt-container,
.dt-container .dt-layout-cell.dt-layout-full,
.dt-container .dt-layout-cell:only-child,
.dt-container .dt-layout-row,
.dt-container .dt-layout-cell {
  display: block !important;
}

.dt-container .dt-scroll-headInner,
.dt-container table.dataTable {
  min-width: 100% !important;
}

.dt-container table.dataTable {
  max-width: none !important;
  table-layout: fixed !important;
}

.dt-container table.dataTable.table-fill-columns,
.dt-container .dt-scroll-head table.dataTable.table-fill-columns,
.dt-container .dt-scroll-body table.dataTable.table-fill-columns {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: fixed !important;
}

.dt-container.has-fill-table .dt-scroll-headInner,
.dt-container.has-fill-table .dt-scroll-headInner table,
.dt-container.has-fill-table .dt-scroll-body table {
  width: 100% !important;
  min-width: 100% !important;
}

.dt-container.has-fill-table colgroup col {
  width: auto !important;
  min-width: 0 !important;
}

.dt-container table.dataTable.table-fill-columns > thead > tr > th,
.dt-container table.dataTable.table-fill-columns > tbody > tr > td {
  min-width: 0 !important;
}

.dt-container table.dataTable.table-fill-columns > tbody > tr > td.table-empty-cell,
.dt-container table.dataTable.table-fit-columns > tbody > tr > td.table-empty-cell {
  width: 100% !important;
  min-width: 100% !important;
}

.dt-container table.dataTable.table-fit-columns > tbody > tr > td {
  white-space: normal !important;
  overflow-wrap: anywhere;
}

th,
td,
.dt-container table.dataTable > thead > tr > th,
.dt-container table.dataTable > tbody > tr > td {
  padding: 10px 11px;
}

.dt-container table.dataTable > thead > tr > th {
  background: #f7f9fb !important;
}

.dt-container table.dataTable > thead > tr {
  background: #f7f9fb !important;
}

.dt-container table.dataTable > tbody > tr:hover > * {
  box-shadow: inset 0 0 0 9999px color-mix(in srgb, var(--portal-accent, var(--regen)) 6%, #ffffff) !important;
}

.dt-container table.dataTable > tbody > tr:hover .btn,
.dt-container table.dataTable > tbody > tr:hover .badge {
  box-shadow: none !important;
}

.dt-container table.dataTable > tbody > tr:hover .btn-success,
.dt-container table.dataTable > tbody > tr:hover .btn-success:hover,
.btn.btn-success:hover:not(:disabled),
.btn.btn-success:focus-visible:not(:disabled),
.btn.btn-success {
  background: #28764e !important;
  border-color: #28764e !important;
  color: #ffffff !important;
}

.btn.btn-success:disabled,
.btn.btn-success:disabled:hover,
.btn.btn-success.disabled,
.btn.btn-success.disabled:hover {
  background: #2f875a !important;
  border-color: #2f875a !important;
  color: #ffffff !important;
  opacity: .55;
}

.btn.btn-primary:hover:not(:disabled),
.btn.btn-primary:focus-visible:not(:disabled) {
  background: var(--regen-700) !important;
  border-color: var(--regen-700) !important;
  color: #ffffff !important;
}

.dt-container td.dt-empty,
.dt-container .dt-empty {
  text-align: center !important;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--single .select2-selection__rendered {
  min-height: 34px;
  line-height: 34px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 34px;
}

.field .select2-container {
  max-width: 100%;
}

.select2-dropdown {
  width: auto !important;
  min-width: 0 !important;
  max-width: min(420px, calc(100vw - 32px));
  border-color: #d6dee7;
  border-radius: 7px;
  box-shadow: 0 12px 28px rgba(16, 24, 40, 0.14);
}

.select2-search--dropdown {
  padding: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
  height: 34px;
  border: 1px solid #d6dee7;
  border-radius: 6px;
  outline: none;
  padding: 0 10px;
}

.select2-results__option {
  padding: 9px 11px;
  line-height: 1.4;
  white-space: normal;
}

.production-card h3 {
  font-size: 15px;
}

.production-vessel strong,
.production-stats strong {
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 12px;
  border-right: 1px solid var(--border-2);
}

.topbar-action,
.user-menu-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #566579;
}

.topbar-action:hover,
.user-menu-btn:hover {
  color: var(--portal-accent, var(--regen));
  background: color-mix(in srgb, var(--portal-accent, var(--regen)) 9%, #ffffff);
}

.counter {
  top: -2px;
  right: -3px;
  min-width: 17px;
  height: 17px;
  line-height: 13px;
  font-size: 9px;
  font-weight: 700;
}

.user-menu {
  position: relative;
  gap: 9px;
  min-height: 34px;
  padding-left: 12px;
  border-left: 1px solid var(--border-2);
}

.user-menu .avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid #e6ebf0;
  background: #eef3f7;
  color: #47586a;
  font-size: 12px;
}

.user-text {
  min-width: 118px;
  line-height: 1.25;
}

.user-text strong {
  font-size: 13px;
  letter-spacing: 0;
}

.user-text span {
  margin-top: 2px;
  font-size: 10.5px;
}

.user-pop-panel {
  position: absolute;
  top: 42px;
  right: 0;
  width: 260px;
}

.user-pop-panel .pop-item {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border-2);
  background: #fff;
  text-align: left;
  color: #263546;
  text-decoration: none;
}

.user-pop-panel .pop-item:hover {
  background: #f6f8fa;
}

.pop-item-form {
  margin: 0;
}

.pop-item-form .pop-item {
  cursor: pointer;
}

.sidebar-account {
  display: grid;
  gap: 4px;
  border-bottom: 1px solid var(--border-2);
  margin: 0 -10px 10px;
  padding: 0 10px 10px;
}

.sidebar-account a {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px;
  border-radius: 6px;
  color: #596574;
  font-size: 12px;
}

.sidebar-account a:hover {
  background: #f3f5f7;
  color: #263546;
}

.sidebar-account i {
  width: 16px;
  text-align: center;
  color: #778391;
  font-size: 12px;
}

.profile-foot {
  margin: 0 -14px -14px;
}

.tabbar {
  overflow-x: auto;
  scrollbar-width: thin;
  min-height: 48px;
  align-items: flex-end;
  gap: 18px;
  padding: 0 14px;
  background: #fff;
}

.tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  height: 48px;
  padding: 0 2px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #657184;
  white-space: nowrap;
  border-bottom-width: 2px;
  border-bottom-color: transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.tab:hover {
  color: #25364a;
}

.tab.active {
  color: #132338;
  font-weight: 700;
  border-bottom-color: var(--portal-accent, #b98217);
}

button.tab {
  appearance: none;
}

.tab:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--portal-accent, var(--regen)) 35%, #ffffff);
  outline-offset: -2px;
}

.required-mark {
  color: var(--danger);
  font-weight: 700;
  margin-left: 3px;
}

.field > label:not(:has(.required-mark)):has(+ input[required])::after,
.field > label:not(:has(.required-mark)):has(+ select[required])::after,
.field > label:not(:has(.required-mark)):has(+ textarea[required])::after {
  content: " *";
  color: var(--danger);
  font-weight: 700;
}

.field input.is-invalid,
.field select.is-invalid,
.field textarea.is-invalid,
.field.field-invalid input,
.field.field-invalid select,
.field.field-invalid textarea {
  border-color: var(--danger) !important;
  background: #fff8f8;
  box-shadow: 0 0 0 2px rgba(196, 72, 72, 0.08) !important;
}

.field.field-invalid .select2-container--default .select2-selection--single,
.field select.is-invalid + .select2-container--default .select2-selection--single {
  border-color: var(--danger) !important;
  background: #fff8f8;
  box-shadow: 0 0 0 2px rgba(196, 72, 72, 0.08) !important;
}

.file-dropzone {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 168px;
  place-items: center;
  padding: 18px;
  border: 2px dashed #cbd5e1;
  border-radius: 16px;
  background: #fff;
  color: #102236;
  text-align: center;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
  overflow: hidden;
}

.file-dropzone:hover,
.file-dropzone.is-dragover,
.file-dropzone:focus-within {
  border-color: var(--portal-accent, var(--regen));
  background: color-mix(in srgb, var(--portal-accent, var(--regen)) 4%, #ffffff);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--portal-accent, var(--regen)) 10%, transparent);
}

.file-dropzone.is-invalid,
.field.field-invalid .file-dropzone {
  border-color: var(--danger);
  background: #fff8f8;
}

.file-dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-dropzone-content {
  position: relative;
  z-index: 1;
  display: grid;
  width: 100%;
  min-width: 0;
  justify-items: center;
  gap: 5px;
  pointer-events: none;
}

.file-dropzone-icon {
  display: inline-flex;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  border: 1px solid #e5ebf1;
  border-radius: 999px;
  background: #fff;
  color: #5f6f82;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  font-size: 21px;
}

.file-dropzone strong {
  display: -webkit-box;
  max-width: min(100%, 420px);
  overflow: hidden;
  color: #102236;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.file-dropzone-hint {
  color: #e86f00;
  font-size: 12px;
  line-height: 1.35;
}

.file-dropzone-help {
  color: #6b778a;
  font-size: 11.5px;
  line-height: 1.45;
}

.file-preview {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 360px);
  min-width: 0;
  justify-items: center;
  gap: 8px;
  margin-top: 10px;
  pointer-events: none;
}

.file-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 168px;
  object-fit: contain;
  border: 1px solid #dde5ee;
  border-radius: 12px;
  background: #f8fafc;
}

.file-preview .file-preview-name {
  display: inline-flex;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #dde5ee;
  border-radius: 10px;
  background: #f8fafc;
  color: #324054;
  font-size: 11.5px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview .file-preview-name i {
  flex: 0 0 auto;
}

.file-preview .file-preview-name span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-dropzone:has(.file-preview:not(.hidden)) {
  align-content: center;
}

.field-error {
  color: var(--danger);
  font-size: 10px;
  line-height: 1.35;
}

.field-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.field .check-field {
  width: 100%;
  min-height: 34px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #f8fafc;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.field .check-field:hover {
  border-color: #bdd6ea;
  background: #fbfdff;
}

.field .check-field input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}

.field .check-field span {
  min-width: 0;
  display: block;
  overflow-wrap: anywhere;
}

.check-field-hint {
  margin-top: 3px;
  padding-left: 26px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.modal.audit-cleanup-modal {
  width: min(560px, 95vw);
}

.audit-cleanup-modal .modal-content {
  display: grid;
  gap: 12px;
}

.audit-cleanup-modal .form-section {
  margin-bottom: 0;
}

.audit-cleanup-note {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #f0d8aa;
  border-radius: 9px;
  background: #fffaf0;
}

.audit-cleanup-note > span {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #fff2d7;
  color: #9a6a17;
}

.audit-cleanup-note strong {
  display: block;
  color: #17263a;
  font-size: 12.5px;
  line-height: 1.35;
}

.audit-cleanup-note p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.role-permission-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.role-permission-section {
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  background: #fff;
}

.role-permission-head {
  min-height: 36px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border-2);
  font-weight: 700;
  color: #394758;
  cursor: pointer;
}

.role-permission-head input,
.role-action-check input {
  width: 14px;
  height: 14px;
  accent-color: var(--portal-accent, var(--regen));
}

.role-permission-table-wrap {
  overflow: auto;
}

.role-permission-table {
  min-width: 880px;
  width: 100%;
  border-collapse: collapse;
}

.role-permission-table th {
  position: static;
  background: #fff;
  color: #657283;
  font-size: 10px;
  padding: 11px 10px;
}

.role-permission-table th:first-child,
.role-permission-table td:first-child {
  min-width: 250px;
  text-align: left;
}

.role-permission-table th:not(:first-child),
.role-permission-table td:not(:first-child) {
  width: 90px;
  text-align: center;
}

.role-permission-table td {
  padding: 8px 10px;
  white-space: nowrap;
}

.role-action-check {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #697788;
  font-size: 9px;
  line-height: 1.1;
  cursor: pointer;
}

.table-loading {
  min-height: 74px;
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #6d7a8a;
  font-size: 12px;
}

.table-wrap {
  position: relative;
}

.table-loading i {
  color: var(--portal-accent, var(--regen));
}

.dt-container > .dt-processing,
.dt-container > .dt-processing * {
  display: none !important;
}

.erp-table-loader {
  position: absolute;
  inset: 43px 0 auto;
  z-index: 5;
  margin: 0;
  width: 100%;
  min-height: 74px;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #6d7a8a;
  font-size: 12px;
}

.erp-table-loader i {
  color: var(--portal-accent, var(--regen));
}

.erp-table-loader.hidden {
  display: none !important;
}

.dt-container.is-processing .dt-empty .empty,
.dt-container.is-processing .dt-empty .table-empty-state,
.dt-container.is-processing td.table-empty-cell .empty,
.dt-container.is-processing td.table-empty-cell .table-empty-state {
  opacity: 0 !important;
}

.attention-list {
  gap: 0;
}

.attention-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.attention-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.attention-item strong,
.metric-row strong {
  line-height: 1.35;
}

.attention-item span,
.metric-row span {
  display: block;
  line-height: 1.35;
}

.balance-card {
  min-width: 0;
}

.balance-card .note {
  margin-top: 3px;
  color: #66758a;
  font-size: 10.5px;
  line-height: 1.35;
}

.profile-photo-preview span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #eef3f7;
  color: #47586a;
  font-size: 34px;
  font-weight: 700;
}

.profile-page-backdrop {
  display: block;
  min-height: auto;
  padding: 0;
  background: transparent;
}

.profile-page-backdrop .profile-modal {
  width: 100%;
  max-height: none;
  border-color: var(--border);
  border-radius: var(--radius);
  box-shadow: none;
}

.profile-page-backdrop .profile-password-modal {
  width: 100%;
}

.profile-page-backdrop .modal-head {
  height: 48px;
  padding: 0 14px;
}

.profile-page-backdrop .modal-head h3 {
  font-size: 13px;
  font-weight: 600;
}

.profile-page-backdrop .modal-content {
  padding: 14px;
  overflow: visible;
}

.profile-page-backdrop .modal-foot {
  min-height: 56px;
  padding: 10px 14px;
}

.profile-photo-card,
.profile-account-section {
  box-shadow: none;
}

.profile-layout {
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 16px;
}

.profile-layout .profile-photo-card {
  min-height: 292px;
  justify-content: center;
  border-radius: 8px;
  background: #fbfcfd;
}

.profile-layout .profile-photo-preview {
  width: 120px;
  height: 120px;
}

.profile-layout .profile-photo-preview span {
  font-size: 38px;
}

.profile-layout .profile-photo-card strong {
  font-size: 13px;
  margin-top: 12px;
}

.profile-layout .profile-photo-card > span {
  font-size: 10.5px;
}

.profile-layout .profile-note {
  margin: 12px;
}

.profile-account-section {
  margin: 0;
}

.profile-reset-section {
  margin: 0;
}

.profile-reset-section .profile-note {
  margin: 0 12px 12px;
}

.mt-12 {
  margin-top: 12px;
}

.dt-container .regen-dt-footer {
  display: grid;
  grid-template-columns: minmax(160px, auto) 1fr minmax(210px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  color: #6a7686;
}

.dt-container .dt-length {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dt-container .dt-length select {
  width: 76px;
  min-height: 34px;
  border: 1px solid #d6dee7;
  border-radius: 6px;
  background: #fff;
  padding: 0 28px 0 10px;
  color: #516174;
}

.dt-container .dt-info {
  justify-self: center;
  color: #697789;
}

.dt-container .dt-paging {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
}

.dt-container .dt-paging .dt-paging-button {
  width: 32px;
  min-width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #8a96a6 !important;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
  padding: 0;
  margin: 0;
  box-shadow: none !important;
}

.dt-container .dt-paging .dt-paging-button:hover {
  border-color: #d8e0e8 !important;
  background: #f7f9fb !important;
  color: #44566b !important;
}

.dt-container .dt-paging .dt-paging-button.current,
.dt-container .dt-paging .dt-paging-button.current:hover {
  border-color: #b9c3ce !important;
  background: #fff !important;
  color: #263546 !important;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06) !important;
}

.dt-container .dt-paging .dt-paging-button.disabled,
.dt-container .dt-paging .dt-paging-button.disabled:hover {
  opacity: 0.42;
  border-color: transparent !important;
  background: transparent !important;
  cursor: not-allowed;
}

.dt-container .dt-paging .ellipsis {
  color: #a5afba;
  padding: 0 3px;
}

@media (max-width: 760px) {
  .dt-container .regen-dt-footer {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .dt-container .dt-info,
  .dt-container .dt-paging {
    justify-self: start;
  }

  .user-text {
    display: none;
  }

  .user-pop-panel {
    position: fixed;
    top: 54px;
    right: 10px;
    left: 10px;
    width: auto;
  }
}

@media (max-width: 900px) {
  .profile-page-backdrop {
    padding: 0;
  }

  .profile-page-backdrop .profile-modal,
  .profile-page-backdrop .profile-password-modal {
    width: 100%;
    max-height: none;
  }

  .profile-layout {
    grid-template-columns: 1fr;
  }

  .profile-layout .profile-photo-card {
    min-height: auto;
  }
}

/* production-ready auth and portal picker */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px;
  background:
    linear-gradient(180deg, #f7f9fb 0%, #eef3f7 100%);
}

.auth-card {
  width: min(1120px, 100%);
  min-height: 620px;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  border-radius: 16px;
  border-color: #d9e2eb;
  box-shadow: 0 24px 70px rgba(16, 24, 40, 0.10);
}

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 64px 68px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.auth-brand-main {
  position: relative;
  z-index: 1;
}

.auth-brand img {
  width: 226px;
  max-width: 78%;
}

.auth-brand h1 {
  max-width: 420px;
  margin-top: 56px;
  color: #102236;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
}

.auth-brand p {
  max-width: 460px;
  color: #657184;
  font-size: 14px;
}

.auth-feature-list {
  display: grid;
  gap: 10px;
  max-width: 390px;
  margin-top: 30px;
}

.auth-feature-list span {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  color: #43566d;
  font-size: 12.5px;
  font-weight: 600;
}

.auth-feature-list i {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eef6ff;
  color: var(--regen);
  font-size: 12px;
}

.auth-meta {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #7d8998;
  font-size: 12px;
  font-weight: 500;
}

.auth-footer,
.app-footer {
  width: 100%;
  color: #7b8796;
  font-size: 11px;
  font-weight: 400 !important;
  letter-spacing: 0.04em;
  text-align: center;
}

.app-footer {
  margin-top: auto;
  padding: 18px 24px;
  border-top: 1px solid #e4ebf2;
  background: rgba(255, 255, 255, 0.78);
}

.auth-form {
  justify-content: center;
  padding: 64px 68px;
  background: #fff;
}

.auth-form-head {
  margin-bottom: 26px;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  height: 22px;
  margin-bottom: 12px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--regen);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.auth-form h2 {
  margin-bottom: 8px;
  color: #102236;
  font-size: 28px;
  line-height: 1.25;
}

.auth-form-head p {
  max-width: 360px;
  margin: 0;
  color: #657184;
  font-size: 13.5px;
  line-height: 1.55;
}

.auth-form .flash-alert {
  margin-bottom: 20px;
}

.auth-form .stack {
  gap: 13px;
}

.company-setting-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 12px;
  align-items: start;
  max-width: 100%;
}

.company-setting-layout > .stack,
.company-setting-aside,
.company-setting-aside .card {
  min-width: 0;
}

.company-setting-aside {
  position: sticky;
  top: 82px;
}

.company-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--border, #d9e1ea);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
}

.company-logo-box img {
  display: block;
  width: min(230px, 90%);
  max-width: 100%;
  height: auto;
}

.company-preview-btn {
  min-width: 0;
  justify-content: center;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
}

.company-sequence-wrap {
  max-height: 280px;
  overflow: auto;
}

.company-sequence-wrap table {
  min-width: 280px;
}

@media (max-width: 1180px) {
  .company-setting-layout {
    grid-template-columns: 1fr;
  }

  .company-setting-aside {
    position: static;
  }
}

.auth-form .field label {
  font-size: 11.5px;
}

.auth-form .field input {
  height: 42px;
  border-radius: 8px;
  background: #fff;
}

.auth-form .field input:focus {
  border-color: #8eb5de;
  box-shadow: 0 0 0 3px rgba(12, 88, 166, 0.12);
}

.auth-remember {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 9px;
  width: fit-content;
  color: #4f5f73;
  font-size: 12.5px;
  font-weight: 600;
}

.auth-remember input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  accent-color: var(--regen);
  margin: 0;
}

.auth-form .btn-primary {
  height: 42px;
  border-radius: 9px;
  font-size: 12.5px;
}

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #e8edf2;
  border-radius: 8px;
  background: #f8fafc;
  color: #657184;
  font-size: 11.5px;
  line-height: 1.45;
}

.auth-note i {
  margin-top: 2px;
  color: var(--regen);
}

.auth-note span {
  display: block;
}

@media (max-width: 1080px) {
  .auth-card {
    width: min(720px, 100%);
    grid-template-columns: 1fr;
  }

  .auth-brand {
    display: none;
  }

  .auth-form {
    padding: 48px;
  }
}

.portal-shell {
  min-height: 100vh;
  padding: 24px 28px 36px;
  background:
    linear-gradient(180deg, #f7f9fb 0%, #eef3f7 100%);
}

.portal-head,
.portal-hero,
.portal-content {
  max-width: 1200px;
}

.portal-head {
  margin: 0 auto 18px;
  height: 54px;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
}

.portal-head img {
  width: 178px;
}

.portal-user-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.portal-user {
  padding: 7px 10px;
  border: 1px solid #e3e9ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #263546;
}

.portal-user strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.25;
}

.portal-user small {
  display: block;
  margin-top: 2px;
  color: #7a8796;
  font-size: 10px;
}

.portal-logout {
  width: 38px;
  height: 38px;
  border: 1px solid #e3e9ef;
  border-radius: 10px;
  background: #fff;
  color: #647386;
}

.portal-logout:hover {
  background: #fff7f7;
  border-color: #efd4d4;
  color: var(--danger);
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: end;
  margin: 0 auto 18px;
  padding: 26px 28px;
  border: 1px solid #dce4ec;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 10px 34px rgba(16, 24, 40, 0.06);
}

.portal-eyebrow {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef6fd;
  color: var(--regen);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.portal-hero h1 {
  margin: 14px 0 8px;
  color: #102236;
  font-size: 30px;
  line-height: 1.18;
  letter-spacing: 0;
}

.portal-hero p {
  max-width: 660px;
  margin: 0;
  color: #637185;
  font-size: 13px;
  line-height: 1.65;
}

.portal-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 10px;
}

.portal-summary div {
  min-height: 74px;
  padding: 14px;
  border: 1px solid #e3e9ef;
  border-radius: 10px;
  background: #fbfcfd;
}

.portal-summary span {
  display: block;
  color: #102236;
  font-size: 18px;
  font-weight: 800;
}

.portal-summary small {
  display: block;
  margin-top: 4px;
  color: #7a8796;
  font-size: 10.5px;
}

.portal-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  margin: 0 0 14px;
}

.portal-section-head h2 {
  margin: 0 0 4px;
  color: #102236;
  font-size: 20px;
  line-height: 1.25;
}

.portal-section-head p {
  margin: 0;
  color: #6f7b8b;
  font-size: 12px;
}

.portal-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.portal-card {
  display: flex;
  min-height: 214px;
  flex-direction: column;
  padding: 18px;
  border-color: #dce4ec;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.portal-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.09);
}

.portal-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.portal-icon {
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid #edf1f5;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 17px;
}

.portal-badge {
  max-width: 130px;
  overflow: hidden;
  padding-top: 2px;
  font-size: 9.5px;
  font-weight: 800;
  text-align: right;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-card-body {
  flex: 1;
}

.portal-card h3 {
  color: #102236;
  font-size: 15px;
  line-height: 1.25;
}

.portal-card p {
  margin-top: 8px;
  color: #667386;
  font-size: 12px;
}

.portal-open {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid #eef2f5;
  font-size: 12px;
}

@media (max-width: 1000px) {
  .portal-hero {
    grid-template-columns: 1fr;
  }

  .portal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .auth-shell {
    padding: 18px;
    align-items: center;
  }

  .auth-card {
    min-height: auto;
  }

  .auth-form {
    padding: 34px 24px;
  }

  .portal-shell {
    padding: 18px;
  }

  .portal-head {
    height: auto;
    align-items: flex-start;
    gap: 14px;
  }

  .portal-head img {
    width: 150px;
  }

  .portal-user {
    padding: 6px;
  }

  .portal-user div {
    display: none;
  }

  .portal-hero {
    padding: 22px;
  }

  .portal-hero h1 {
    font-size: 25px;
  }

  .portal-summary,
  .portal-grid {
    grid-template-columns: 1fr;
  }
}

/* Final ERP polish: portal header, status badge, alert, and custom confirm modal. */
.portal-user-wrap {
  gap: 8px;
}

.portal-user {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.portal-user .avatar {
  width: 40px;
  height: 40px;
  border: 1px solid #e4ebf2;
  background: #edf3f7;
}

.portal-user strong {
  font-size: 13.5px;
}

.portal-user small {
  font-size: 10.5px;
}

.portal-logout {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.portal-logout:hover {
  background: #f3f6f9;
  border-color: transparent;
  color: #b42318;
}

.portal-hero {
  grid-template-columns: 1fr;
  align-items: start;
}

.portal-summary {
  display: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  height: 26px;
  max-width: 100%;
  padding: 4px 12px 0;
  border-radius: 999px;
  border-width: 1px;
  border-style: solid;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  letter-spacing: 0;
  vertical-align: middle;
}

.badge > * {
  line-height: 1;
}

.badge-success {
  background: #eaf8f1;
  color: #1f7a4d;
  border-color: #bfe9d3;
}

.badge-warning {
  background: #fff8e8;
  color: #8a641d;
  border-color: #edd79b;
}

.badge-danger {
  background: #fff1f1;
  color: #a63f3f;
  border-color: #edc5c5;
}

.badge-neutral {
  background: #f4f6f8;
  color: #5f6f82;
  border-color: #dfe6ee;
}

.badge-info {
  background: #eef6ff;
  color: #246693;
  border-color: #cfe4f6;
}

.attention-item .badge,
.table-wrap .badge {
  min-width: 56px;
}

.dashboard-panel {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dashboard-panel-body {
  padding: 0 !important;
  flex: 1 1 auto;
}

.dashboard-panel .dashboard-table-toolbar {
  padding: 14px 18px;
  border-bottom: 1px solid #e6ebf0;
}

.dashboard-panel .dashboard-table-toolbar .search {
  max-width: 420px;
}

.dashboard-panel .dt-container {
  width: 100%;
}

.dashboard-panel .regen-dt-footer {
  border-top: 1px solid #e6ebf0;
}

.dashboard-panel .dashboard-table-wrap {
  border-radius: 0;
  border: 0;
  box-shadow: none;
  width: 100%;
  overflow-x: auto;
}

.dashboard-panel .dashboard-table {
  display: table !important;
  width: 100% !important;
  min-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.dashboard-panel .dashboard-table thead {
  display: table-header-group !important;
}

.dashboard-panel .dashboard-table tbody {
  display: table-row-group !important;
}

.dashboard-panel .dashboard-table tr {
  display: table-row !important;
}

.dashboard-panel .dashboard-table th,
.dashboard-panel .dashboard-table td {
  display: table-cell !important;
}

.dashboard-panel .dashboard-table thead tr {
  background: #f7f9fb !important;
}

.dashboard-panel .dashboard-table thead th {
  border-top: 0 !important;
}

.dashboard-panel .dashboard-table th,
.dashboard-panel .dashboard-table td {
  white-space: nowrap;
}

.dashboard-panel .dashboard-table td[colspan] {
  white-space: normal;
  width: 100%;
}

.dashboard-panel .table-empty-state {
  min-height: 245px;
}

.dashboard-panel-body > .table-empty-state {
  min-height: 320px;
  height: 100%;
}

.dashboard-panel .attention-list {
  display: grid;
  padding: 14px 18px;
}

.dashboard-panel .attention-item {
  min-height: 56px;
  padding: 10px 0;
}

.dashboard-panel .attention-item .badge {
  min-width: 72px;
  max-width: 180px;
  flex: 0 0 auto;
}

.table-wrap td .badge,
.dt-container table.dataTable td .badge {
  max-width: 190px;
}

.attention-item {
  gap: 12px;
}

.attention-item > div {
  min-width: 0;
}

.dashboard-panel .balance-grid {
  padding: 14px 18px;
}

.dashboard-panel .quick-access-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-panel .metric-row,
.dashboard-panel > .card-body > .muted {
  margin: 0 18px;
}

.dashboard-panel .metric-row:first-child {
  margin-top: 8px;
}

.dashboard-panel .metric-row:last-child {
  margin-bottom: 8px;
}

.accounting-filter-toolbar {
  align-items: stretch;
}

.accounting-filter-toolbar .search {
  flex: 1 1 280px;
  max-width: none;
}

.accounting-filter-toolbar input[type="month"],
.accounting-filter-toolbar select,
.accounting-filter-toolbar .select2-container {
  flex: 0 1 220px;
  min-width: 180px;
}

.accounting-filter-toolbar .btn {
  flex: 0 0 auto;
}

.number-column {
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  text-align: center !important;
  color: #6f7c8d;
  font-weight: 700;
  white-space: nowrap;
}

th.number-column {
  color: #536477;
}

.table-wrap > table th.number-column,
.table-wrap > table td.number-column,
.dashboard-panel .dashboard-table th.number-column,
.dashboard-panel .dashboard-table td.number-column,
.dt-container table.dataTable > thead > tr > th.number-column,
.dt-container table.dataTable > tbody > tr > td.number-column {
  padding-left: 8px !important;
  padding-right: 8px !important;
  text-align: center !important;
}

.table-wrap > table th.number-column .dt-column-title,
.dashboard-panel .dashboard-table th.number-column .dt-column-title,
.dt-container table.dataTable > thead > tr > th.number-column .dt-column-title {
  display: block;
  width: 100%;
  text-align: center;
}

.table-wrap > table th:first-child,
.table-wrap > table td:first-child,
.dashboard-panel .dashboard-table th:first-child,
.dashboard-panel .dashboard-table td:first-child,
.dt-container table.dataTable > thead > tr > th:first-child,
.dt-container table.dataTable > tbody > tr > td:first-child {
  text-align: center !important;
}

.money-control {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}

.money-control:focus-within {
  border-color: #9fb8d2;
  box-shadow: 0 0 0 2px rgba(12, 88, 166, 0.06);
}

.money-control > span {
  min-width: 42px;
  align-self: stretch;
  display: grid;
  place-items: center;
  border-right: 1px solid #e6ecf2;
  background: #f8fafc;
  color: #5f6f82;
  font-size: 11px;
  font-weight: 800;
}

.money-control > input.money-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.money-control > input.money-input:focus {
  border: 0;
  box-shadow: none;
}

.password-control {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-control > input {
  width: 100%;
  padding-right: 42px;
}

.auth-form .password-control > input {
  height: 42px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #536477;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
  background: #eef6ff;
  color: var(--regen);
  outline: none;
}

.field input.money-input.is-invalid,
.field.field-invalid input.money-input {
  border: 0;
  box-shadow: none;
}

.field:has(input.money-input.is-invalid) .money-control,
.field.field-invalid .money-control {
  border-color: #df4f4f;
  box-shadow: 0 0 0 2px rgba(223, 79, 79, 0.08);
}

.flash-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #dfe7ee;
  border-radius: 8px;
  background: #fff;
  color: #24364a;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
  font-size: 12.5px;
  font-weight: 600;
}

.flash-icon {
  width: 26px;
  height: 26px;
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 999px;
}

.flash-success {
  border-color: #cfe9da;
  background: #f4fbf7;
  color: #236746;
}

.flash-success .flash-icon {
  background: #e2f5ea;
  color: #1f7a4d;
}

.flash-danger {
  border-color: #edc5c5;
  background: #fff6f6;
  color: #993c3c;
}

.flash-danger .flash-icon {
  background: #ffe8e8;
  color: #b42318;
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.38);
}

.confirm-backdrop.hidden {
  display: none;
}

.confirm-dialog {
  width: min(420px, 100%);
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #d7e0e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(16, 24, 40, 0.18);
}

.confirm-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--portal-accent, var(--regen));
  font-size: 16px;
}

.confirm-copy h3 {
  margin: 0;
  color: #12263c;
  font-size: 15px;
  line-height: 1.35;
}

.confirm-copy p {
  margin: 5px 0 0;
  color: #637185;
  font-size: 12.5px;
  line-height: 1.55;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.image-preview-backdrop {
  position: fixed;
  inset: 0;
  z-index: 270;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(2px);
}

.image-preview-backdrop.hidden {
  display: none;
}

.image-preview-dialog {
  width: min(920px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d7e0e8;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.24);
}

.image-preview-head {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 16px;
  border-bottom: 1px solid #dde5ee;
}

.image-preview-head h3 {
  margin: 0;
  color: #142033;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.image-preview-body {
  padding: 14px;
  overflow: auto;
  background: #f8fafc;
}

.image-preview-body img {
  width: 100%;
  max-height: 74vh;
  display: block;
  object-fit: contain;
  border-radius: 10px;
  background: #0f172a;
}

.image-preview-body p {
  margin: 10px 0 0;
  color: #66758a;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 720px) {
  .portal-user div {
    display: block;
  }

  .portal-user strong {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .confirm-dialog {
    border-radius: 10px;
  }

  .image-preview-backdrop {
    padding: 10px;
  }

  .image-preview-dialog {
    width: 100%;
    max-height: 94vh;
    border-radius: 10px;
  }

  .image-preview-body {
    padding: 10px;
  }
}

.table-wrap {
  width: 100%;
  max-height: none !important;
  overflow-x: auto;
  overflow-y: visible !important;
  background: #ffffff;
}

.table-wrap > table,
.dt-container table.dataTable {
  width: 100% !important;
  max-width: none !important;
  border-collapse: collapse !important;
  table-layout: auto !important;
}

.dt-container table.dataTable.table-fill-columns,
.dt-container .dt-scroll-head table.dataTable.table-fill-columns,
.dt-container .dt-scroll-body table.dataTable.table-fill-columns {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: fixed !important;
}

.dt-container.has-fill-table .dt-scroll-headInner,
.dt-container.has-fill-table .dt-scroll-headInner table,
.dt-container.has-fill-table .dt-scroll-body table {
  width: 100% !important;
  min-width: 100% !important;
}

.dt-container.has-fill-table colgroup col {
  width: auto !important;
  min-width: 0 !important;
}

.dt-container table.dataTable.table-fill-columns > thead > tr > th,
.dt-container table.dataTable.table-fill-columns > tbody > tr > td {
  min-width: 0 !important;
}

.dt-container .dt-scroll,
.dt-container .dt-scroll-head,
.dt-container .dt-scroll-headInner,
.dt-container .dt-scroll-body {
  max-height: none !important;
  width: 100% !important;
}

.dt-container .dt-scroll-body {
  overflow-x: auto !important;
  overflow-y: visible !important;
  max-height: none !important;
}

.dt-container .dt-layout-table {
  overflow: visible !important;
}

.dt-container .dt-scroll-body thead {
  display: none !important;
  height: 0 !important;
  visibility: collapse !important;
}

.dt-container .dt-scroll-body thead th,
.dt-container .dt-scroll-body thead td {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  border: 0 !important;
  line-height: 0 !important;
  overflow: hidden !important;
  color: transparent !important;
}

.dt-container .dt-scroll-body thead th *,
.dt-container .dt-scroll-body thead td * {
  display: none !important;
}

.dt-container .dt-scroll-body thead th::before,
.dt-container .dt-scroll-body thead th::after,
.dt-container .dt-scroll-body thead td::before,
.dt-container .dt-scroll-body thead td::after {
  content: "" !important;
  display: none !important;
}

.table-wrap th,
.table-wrap td,
.dt-container table.dataTable > thead > tr > th,
.dt-container table.dataTable > tbody > tr > td {
  padding: 12px 14px !important;
  border-bottom: 1px solid #eef1f3 !important;
  vertical-align: middle;
  white-space: nowrap;
}

.table-wrap thead th,
.dt-container table.dataTable > thead > tr > th {
  background: #f7f9fb !important;
  color: #5f6f82;
  font-weight: 700;
}

.table-wrap tbody tr:hover > td,
.dt-container table.dataTable > tbody > tr:hover > * {
  background: color-mix(in srgb, var(--portal-accent, var(--regen)) 5%, #ffffff) !important;
  box-shadow: none !important;
}

.table-wrap tbody tr:hover .btn-success,
.dt-container table.dataTable > tbody > tr:hover .btn-success,
.dt-container table.dataTable > tbody > tr:hover .btn-success:hover,
.btn.btn-success:hover:not(:disabled),
.btn.btn-success:focus-visible:not(:disabled),
.btn.btn-success {
  background: #28764e !important;
  border-color: #28764e !important;
  color: #ffffff !important;
}

.table-wrap td[colspan],
.dt-container td.dt-empty {
  padding: 0 !important;
  white-space: normal !important;
}

.table-wrap td.table-empty-cell,
.dt-container td.table-empty-cell,
.dt-container td.dt-empty {
  width: 100% !important;
  min-width: 100% !important;
  border-bottom: 1px solid #eef1f3 !important;
}

.table-wrap .empty,
.dt-container .empty,
.table-empty-state {
  width: 100%;
  min-width: 100%;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 34px 18px;
  text-align: center;
  color: #718090;
}

.table-wrap .empty i,
.dt-container .empty i {
  margin: 0;
  color: #acb7c2;
  font-size: 30px;
}

.table-wrap .empty h3,
.dt-container .empty h3 {
  margin: 0;
  color: #5f6f82;
  font-size: 13px;
  font-weight: 500;
}

.table-wrap .empty p,
.dt-container .empty p {
  margin: 0;
  color: #718090;
  font-size: 11px;
}

.table-wrap .cell-main,
.dt-container table.dataTable .cell-main {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.3;
}

.table-wrap .cell-sub,
.dt-container table.dataTable .cell-sub {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.35;
  margin-top: 3px;
}

.table-wrap > table.erp-data-table,
.dt-container table.dataTable.erp-data-table {
  table-layout: auto !important;
}

.dashboard-table-wrap,
.dashboard-table-wrap > table,
.dashboard-table,
.dashboard-table-fill {
  width: 100% !important;
  min-width: 100% !important;
}

.dashboard-table,
.dashboard-table-fill {
  display: table !important;
  table-layout: fixed !important;
  border-collapse: collapse !important;
}

.dashboard-table thead,
.dashboard-table-fill thead {
  display: table-header-group !important;
}

.dashboard-table tbody,
.dashboard-table-fill tbody {
  display: table-row-group !important;
}

.dashboard-table tr,
.dashboard-table-fill tr {
  display: table-row !important;
}

.dashboard-table th,
.dashboard-table td,
.dashboard-table-fill th,
.dashboard-table-fill td {
  display: table-cell !important;
}

.dashboard-table thead tr,
.dashboard-table-fill thead tr {
  background: #f7f9fb !important;
}

.dashboard-table td[colspan],
.dashboard-table-fill td[colspan] {
  width: 100% !important;
  white-space: normal !important;
}

.table-wrap > table.erp-route-commercial-targets,
.dt-container table.dataTable.erp-route-commercial-targets {
  min-width: 1760px !important;
}

.erp-route-commercial-targets th:nth-child(2),
.erp-route-commercial-targets td:nth-child(2) {
  min-width: 250px !important;
  width: 250px !important;
  max-width: 250px !important;
}

.erp-route-commercial-targets th:nth-child(3),
.erp-route-commercial-targets td:nth-child(3) {
  min-width: 110px !important;
  width: 110px !important;
}

.erp-route-commercial-targets th:nth-child(7),
.erp-route-commercial-targets td:nth-child(7),
.erp-route-commercial-targets th:nth-child(8),
.erp-route-commercial-targets td:nth-child(8),
.erp-route-commercial-targets th:nth-child(9),
.erp-route-commercial-targets td:nth-child(9) {
  min-width: 145px !important;
}

.line-items,
.form-section .table-responsive,
.modal-content .table-responsive,
.card-body .table-responsive,
.role-permission-table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
}

.line-items table,
.modal-content .form-section table,
.card-body table:not(.doc-table),
.role-permission-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: auto;
}

.line-items table th,
.line-items table td,
.modal-content .form-section table th,
.modal-content .form-section table td,
.card-body table:not(.doc-table) th,
.card-body table:not(.doc-table) td,
.role-permission-table th,
.role-permission-table td {
  padding: 11px 12px !important;
  border-bottom: 1px solid #eef1f3;
  vertical-align: middle;
  white-space: nowrap;
}

.line-items table th,
.modal-content .form-section table th,
.card-body table:not(.doc-table) th,
.role-permission-table th {
  position: static;
  background: #f7f9fb !important;
  color: #5f6f82;
  font-weight: 700;
}

.line-items table tbody tr:hover > td,
.modal-content .form-section table tbody tr:hover > td,
.card-body table:not(.doc-table) tbody tr:hover > td,
.role-permission-table tbody tr:hover > td {
  background: color-mix(in srgb, var(--portal-accent, var(--regen)) 5%, #ffffff) !important;
}

.line-items input,
.line-items select,
.modal-content .form-section table input,
.modal-content .form-section table select {
  min-width: 120px;
}

.modal-backdrop {
  background: rgba(15, 23, 42, .38);
  backdrop-filter: blur(2px);
}

.modal {
  border-radius: 10px;
  border: 1px solid #d8e0e8;
  box-shadow: 0 22px 55px rgba(15, 23, 42, .22);
}

.modal.modal-lg {
  width: min(1180px, 96vw);
}

.modal-head {
  min-height: 56px;
  height: auto;
  padding: 0 18px;
  border-bottom: 1px solid #dde5ee;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.modal-head h3 {
  margin: 0;
  color: #142033;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
}

.modal-head .close-btn {
  width: 34px;
  height: 34px;
  min-width: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: #263546;
  text-decoration: none;
}

.modal-head .close-btn:hover {
  background: #f1f5f9;
  color: var(--portal-accent, var(--regen));
}

.modal-content {
  padding: 16px;
}

.modal-foot {
  min-height: 64px;
  padding: 12px 18px;
  border-top: 1px solid #dde5ee;
  background: #fbfcfd;
}

.btn.is-loading {
  pointer-events: none;
  opacity: .72;
}

@media (max-width: 768px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .app-shell,
  .main,
  .topbar,
  .content,
  .card {
    width: 100%;
    max-width: 100%;
  }

  .content {
    padding: 14px 10px 28px !important;
    overflow-x: hidden;
  }

  .page-head {
    gap: 12px;
    margin-bottom: 16px;
  }

  .page-head h1 {
    font-size: 21px;
    line-height: 1.25;
  }

  .page-actions {
    gap: 8px;
  }

  .card {
    border-radius: 10px;
  }

  .card-head,
  .toolbar,
  .card-body {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .dashboard-panel .quick-access-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    gap: 10px;
  }

  .toolbar .search,
  .toolbar select {
    min-width: 100%;
    max-width: 100%;
  }

  .table-wrap {
    margin-inline: -12px;
    width: calc(100% + 24px);
    max-width: calc(100% + 24px);
    padding-inline: 12px;
    scroll-padding-inline: 12px;
  }

  .table-wrap th,
  .table-wrap td,
  .dt-container table.dataTable > thead > tr > th,
  .dt-container table.dataTable > tbody > tr > td {
    padding: 13px 14px !important;
    line-height: 1.45;
  }

  .regen-dt-footer {
    row-gap: 12px;
    padding: 13px 14px !important;
  }

  .regen-dt-footer .dt-info {
    width: 100%;
    text-align: center;
    order: 3;
  }

  .regen-dt-footer .dt-length,
  .regen-dt-footer .dt-paging {
    flex: 1 1 auto;
  }

  .regen-dt-footer .dt-paging {
    justify-content: flex-end;
  }

  .tabbar {
    gap: 8px;
    overflow-x: auto;
    max-width: 100%;
    padding-inline: 12px;
    scroll-padding-inline: 12px;
  }

  .tab {
    min-width: max-content;
    padding-inline: 12px;
    height: 42px;
  }

  .line-items,
  .role-permission-table-wrap {
    margin-inline: -12px;
    width: calc(100% + 24px);
    padding-inline: 12px;
    scroll-padding-inline: 12px;
  }

  .line-items table,
  .modal-content .form-section table,
  .card-body table:not(.doc-table),
  .role-permission-table {
    min-width: 680px;
  }

  .modal-backdrop {
    padding: 12px !important;
    align-items: flex-end;
  }

  .modal {
    width: 100% !important;
    max-height: 94vh;
    border-radius: 12px 12px 0 0;
  }

  .modal-head {
    min-height: 54px;
    padding-inline: 16px !important;
  }

  .modal-content {
    padding: 16px 14px !important;
  }

  .modal-foot {
    gap: 10px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom)) !important;
  }

  .modal-foot .btn {
    min-width: 96px;
  }
}

.portal-dot,
.portal-switch-item .dot {
  width: 9px;
  height: 9px;
  min-width: 9px;
  border-radius: 999px;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 9%, transparent);
}

.portal-switch {
  min-width: 0;
}

.portal-switch-btn {
  max-width: min(270px, 36vw);
  overflow: hidden;
}

.portal-switch-btn span:not(.portal-dot) {
  min-width: 0;
  overflow: hidden;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-global {
  min-width: 240px;
}

.topbar-action {
  border: 1px solid transparent;
  border-radius: 999px;
}

.topbar-action i {
  font-size: 15px;
}

.topbar-actions:empty {
  display: none;
}

@media (max-width: 900px) {
  .main {
    width: 100%;
    max-width: 100vw;
  }

  .topbar {
    height: auto;
    min-height: 58px;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
    overflow-x: hidden;
  }

  .portal-switch {
    flex: 1 1 auto;
    max-width: calc(100% - 46px);
  }

  .portal-switch-btn {
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
  }

  .search-global {
    order: 10;
    display: block !important;
    flex: 1 0 100%;
    max-width: none;
    min-width: 0;
    width: 100%;
    margin: 0;
  }

  .search-global input {
    height: 38px;
  }

  .top-spacer {
    display: none;
  }

  .topbar-actions {
    margin-left: auto;
    padding-right: 8px;
  }

  .user-menu {
    padding-left: 8px;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 7px;
    padding-inline: 8px;
  }

  .mobile-menu {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: grid;
    place-items: center;
    border-radius: 8px;
  }

  .portal-switch {
    flex: 1 1 0;
    max-width: none;
  }

  .portal-switch-btn {
    height: 38px;
    padding-inline: 10px;
    gap: 8px;
  }

  .topbar-actions {
    order: 2;
    margin-left: 0;
    padding-right: 0;
    border-right: 0;
  }

  .topbar-action,
  .user-menu-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
  }

  .user-menu {
    order: 3;
    margin-left: auto;
    border-left: 0;
    gap: 6px;
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  html,
  body {
    width: 100% !important;
    max-width: 100dvw !important;
    overflow-x: hidden !important;
    background: var(--bg) !important;
  }

  .app-shell {
    display: block !important;
    width: 100dvw !important;
    max-width: 100dvw !important;
    overflow-x: hidden !important;
  }

  .sidebar {
    width: min(var(--sidebar), 82dvw) !important;
  }

  .main {
    width: 100dvw !important;
    max-width: 100dvw !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    overflow-x: hidden !important;
  }

  .topbar,
  .content,
  .app-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .content {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .page-head,
  .kpi-grid,
  .grid-main-aside,
  .grid-2,
  .grid-3,
  .stack,
  .card,
  .dashboard-panel,
  .dashboard-panel-body,
  .tabbar {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .table-wrap,
  .dashboard-table-wrap,
  .dt-container,
  .dt-container .dt-layout-table,
  .dt-container .dt-scroll,
  .dt-container .dt-scroll-head,
  .dt-container .dt-scroll-body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    overflow-x: auto !important;
  }

  .dashboard-panel .dashboard-table,
  .dashboard-table,
  .dashboard-table-fill {
    min-width: 560px !important;
  }
}

@media (max-width: 520px) {
  .content {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .topbar {
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  .card-head,
  .toolbar,
  .card-body {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

@media print {
  .app-shell > aside,
  .sidebar,
  .topbar,
  .no-print {
    display: none !important;
  }

  body {
    background: #fff !important;
  }

  main {
    padding: 0 !important;
  }

  article header {
    display: flex !important;
  }
}
