﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
  white-space: normal;
  text-align: center;
  word-break: break-all;
}

/* Provide sufficient contrast against white background */
a {
  color: #0366d6;
}

.btn-primary {
  color: #fff;
  background-color: #1b6ec2;
  border-color: #1861ac;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link,
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  color: #fff;
  background-color: var(--bs-primary, var(--atf-primary, #0d6efd)) !important;
  border-color: var(--bs-primary, var(--atf-primary, #0d6efd)) !important;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  font-size: 16px;
}

.atf-chat-menu-link.has-unread {
  color: #dc3545 !important;
}

.atf-chat-menu-badge {
  position: absolute;
  top: .1rem;
  right: -.35rem;
  min-width: 1rem;
  padding: .14rem .3rem;
  font-size: .62rem;
  line-height: 1;
}

.atf-chat-menu-popup {
  position: absolute;
  z-index: 1080;
  right: -.25rem;
  bottom: calc(100% + .4rem);
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #e9ecef;
  box-shadow: 0 .35rem .85rem rgba(13, 110, 253, .35);
  animation: atf-chat-popup .2s ease-out;
}

.atf-chat-menu-popup img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.atf-chat-menu-popup-fallback {
  color: #0d6efd;
  font-weight: 600;
}

@keyframes atf-chat-popup {
  from { opacity: 0; transform: translateY(.5rem) scale(.75); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.border-top {
  border-top: 1px solid #e5e5e5;
}
.border-bottom {
  border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
  box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
  font-size: 1rem;
  line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
}

body {
  /* Margin bottom by footer height */
  margin-bottom: 0;
}

main[role="main"] > .automation-page {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Maintenance inventory has several preview tables and confirmation panels.
   The shared application frame intentionally hides body overflow, therefore
   this page owns its vertical scroll area. */
main[role="main"] > .inventory-balance-maintenance-page {
    height: 100%;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.inventory-balance-maintenance-page > .container-fluid {
    min-height: 100%;
    padding-bottom: 24px;
}

.footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  white-space: nowrap;
  line-height: 60px; /* Vertically center the text there */
}

.form-group {
    margin: 1rem;
    
}

    .form-group label {
        font-weight: bold;
        font-size: inherit;
        margin-bottom: 2px;
        margin-top: 2px;
        margin-bottom: 6px;
        color: var(--label-font-color);
    }
    .form-group input {
        font-size: inherit;
    }

.navbar .dropdown-menu .dropdown-item {
    font-size: 0.875rem; /* tương đương class 'small' */
}

.user-activity-popup-host {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1080;
    width: min(240px, calc(100vw - 32px));
    pointer-events: none;
}

.user-activity-popup {
    overflow: hidden;
    border: 1px solid #b9d6ff;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .18);
    color: #1f2937;
    pointer-events: auto;
}

.user-activity-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #eaf3ff;
    border-bottom: 1px solid #cfe3ff;
    font-size: 13px;
}

.user-activity-popup-close {
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.user-activity-popup-body {
    max-height: 260px;
    overflow-y: auto;
}

.user-activity-popup-item {
    padding: 8px 10px;
    border-bottom: 1px solid #edf2f7;
}

.user-activity-popup-item:last-child {
    border-bottom: 0;
}

.user-activity-popup-name {
    font-weight: 600;
    font-size: 13px;
}

.user-activity-popup-meta {
    margin-top: 2px;
    color: #667085;
    font-size: 12px;
}

.language-select-form {
    min-width: 0;
}

.language-select-form .select2-container {
    min-width: 56px;
    font-size: 11px;
}

.language-select-form .select2-selection--single {
    height: 28px !important;
    min-height: 28px !important;
    border-color: #ced4da !important;
}

.language-select-form .select2-selection__rendered {
    height: 26px !important;
    line-height: 26px !important;
    padding-left: 5px !important;
    padding-right: 15px !important;
    font-size: 11px !important;
}

.language-select-form .select2-selection__arrow {
    height: 26px !important;
    width: 14px !important;
}

.language-option {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
    white-space: nowrap;
    font-size: 11px;
}

.language-flag {
    width: 16px;
    height: 11px;
    object-fit: cover;
    flex: 0 0 auto;
    border: 1px solid rgba(0, 0, 0, .12);
}

.language-dropdown .select2-results__option {
    padding: 4px 8px !important;
    font-size: 11px !important;
}

/* Modern UI refresh */
:root {
    --atf-control-font-size: 12px;
    --atf-detail-font-size: 11px;
    --atf-control-height: 28px;
    --atf-detail-row-height: 24px;
    --atf-detail-head-height: 24px;
    --atf-detail-foot-height: 28px;
    --atf-list-row-height: 22px;
    --atf-list-head-height: 22px;
    --atf-list-foot-height: 18px;
    --atf-voucher-detail-cell-height: 22px;
    --label-font-size: var(--atf-control-font-size);
    --input-font-size: var(--atf-control-font-size);
    --row-font-size: var(--atf-control-font-size);
    --detail-font-size: var(--atf-detail-font-size);
    --input-height: var(--atf-control-height);
    --row-height: var(--atf-control-height);
    --combo-row-h: var(--atf-control-height);
    --detail-row-h: var(--atf-detail-row-height);
    --detail-head-h: var(--atf-detail-head-height);
    --detail-foot-h: var(--atf-detail-foot-height);
    --list-table-font-size: var(--atf-detail-font-size);
    --list-table-detail-row-h: 22px;
    --list-table-detail-head-h: 22px;
    --list-table-detail-foot-h: 18px;
    --atf-bg: #f4f7fb;
    --atf-surface: #ffffff;
    --atf-surface-muted: #f8fafc;
    --atf-line: #d9e2ec;
    --atf-line-strong: #b8c7d6;
    --atf-text: #172033;
    --atf-muted: #5f6f82;
    --atf-primary: #0b6fbe;
    --atf-primary-dark: #084f87;
    --atf-primary-soft: #e6f2fb;
    --atf-success: #198754;
    --atf-warning: #b7791f;
    --atf-danger: #c0392b;
    --label-font-color: #20324a;
    --br-header-color: #e6f2fb;
    --br-detail-color: #eaf4fc;
    --border-color: 1px solid var(--atf-line);
}

@media (min-width: 1600px) {
    :root {
        --atf-control-font-size: 14px;
        --atf-detail-font-size: 13px;
        --atf-control-height: 32px;
        --atf-detail-row-height: 26px;
        --atf-detail-head-height: 26px;
        --atf-detail-foot-height: 30px;
        --atf-list-row-height: 24px;
        --atf-list-head-height: 24px;
        --atf-list-foot-height: 20px;
        --atf-voucher-detail-cell-height: 24px;
        --list-table-detail-row-h: 24px;
        --list-table-detail-head-h: 24px;
        --list-table-detail-foot-h: 20px;
    }
}

html,
body {
    color: var(--atf-text);
    background: var(--atf-bg);
    font-family: "Segoe UI", Arial, sans-serif;
}

a {
    color: var(--atf-primary);
}

a:hover {
    color: var(--atf-primary-dark);
}

.navbar {
    background: var(--atf-surface) !important;
    border-bottom: 1px solid var(--atf-line) !important;
    box-shadow: 0 2px 10px rgba(23, 32, 51, .08);
}

.navbar .nav-link {
    color: #24364d !important;
    min-height: var(--nav-height, 42px);
    display: inline-flex;
    align-items: center;
    padding-left: 10px;
    padding-right: 10px;
    font-size: var(--atf-control-font-size) !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--atf-primary-dark) !important;
    background: var(--atf-primary-soft);
}

.nav-item.dropdown:hover {
    border-bottom-color: var(--atf-primary);
}

.dropdown .dropdown-menu,
.dropdown-submenu .sub-menu {
    border: 1px solid var(--atf-line);
    border-radius: 6px;
    background: var(--atf-surface);
    box-shadow: 0 12px 28px rgba(23, 32, 51, .16);
}

.dropdown-menu .dropdown-item {
    color: var(--atf-text);
    border-bottom: 0;
    border-radius: 4px;
    margin: 1px 6px;
    padding: 5px 10px;
    min-height: 30px;
    font-size: var(--atf-control-font-size) !important;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    color: var(--atf-primary-dark);
    background: var(--atf-primary-soft);
    border-bottom: 0;
}

.btn {
    border-radius: 5px;
    font-weight: 600;
    font-size: var(--atf-control-font-size) !important;
}

.modal-footer .btn,
.card-footer .btn,
#FormFooter .btn,
.form-modal .btn.btn-sm,
.fa-actions .btn {
    align-items: center;
    display: inline-flex;
    gap: .25rem;
    justify-content: center;
    letter-spacing: 0;
}

.modal-footer .btn-sm,
.card-footer .btn-sm,
#FormFooter .btn-sm,
.form-modal .btn-sm {
    min-height: 28px;
    padding-left: .65rem;
    padding-right: .65rem;
}

.modal-footer .btn i,
.card-footer .btn i,
#FormFooter .btn i,
.form-modal .btn i,
.fa-actions .btn i {
    font-size: .95em;
    line-height: 1;
}

.btn-success,
.btn-danger {
    border-width: 0;
    box-shadow: 0 2px 6px rgba(23, 32, 51, .12);
}

.btn-success:hover,
.btn-danger:hover {
    box-shadow: 0 4px 10px rgba(23, 32, 51, .18);
    transform: translateY(-1px);
}

.btn-success:active,
.btn-danger:active {
    box-shadow: 0 1px 4px rgba(23, 32, 51, .14);
    transform: translateY(0);
}

.btn-primary {
    background-color: var(--atf-primary);
    border-color: var(--atf-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--atf-primary-dark);
    border-color: var(--atf-primary-dark);
}

.card,
.modal-content,
.user-activity-popup {
    border-color: var(--atf-line);
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(23, 32, 51, .08);
}

.card-header,
.modal-header,
.work-page .card-header,
.list-page .card-header {
    color: var(--atf-text);
    background: var(--atf-primary-soft) !important;
    border-color: var(--atf-line);
    font-weight: 700;
}

.card-header.bg-primary,
.modal-header.bg-primary,
.work-page .card-header.bg-primary,
.list-page .card-header.bg-primary,
.form-modal .card-header.bg-primary,
.form-modal .modal-header.bg-primary,
.form-modal #FormHeader > .card-header.bg-primary {
    color: #ffffff !important;
    background: var(--bs-primary, var(--atf-primary)) !important;
    background-color: var(--bs-primary, var(--atf-primary)) !important;
    border-color: var(--bs-primary, var(--atf-primary)) !important;
}

.card-header.bg-primary .modal-title,
.modal-header.bg-primary .modal-title,
.form-modal .card-header.bg-primary .modal-title,
.form-modal .modal-header.bg-primary .modal-title {
    color: #ffffff !important;
}

.form-modal > .card-header,
.form-modal > .modal-header,
.form-modal .modal-title-header {
    color: #ffffff !important;
    background: var(--bs-primary, var(--atf-primary)) !important;
    border-color: var(--bs-primary, var(--atf-primary)) !important;
    font-weight: 700;
}

.form-modal > .card-header .modal-title,
.form-modal > .modal-header .modal-title,
.form-modal .modal-title-header .modal-title {
    color: #ffffff !important;
}

.form-modal .my-card .card-header {
    color: var(--atf-text);
    background: var(--atf-primary-soft) !important;
    border-color: var(--atf-line);
    font-weight: 700;
}

.card-footer,
.modal-footer {
    background: var(--atf-surface-muted);
    border-color: var(--atf-line);
}

.list-page,
.work-page,
.filter-sidebar,
.detail-table-container .list-table-wrapper {
    background: var(--atf-bg);
}

/* Shared resize handle for standard catalog/list tables. */
main table.my-table .atf-list-col-resizer {
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    touch-action: none;
    z-index: 12;
}

main table.my-table .atf-list-col-resizer::after {
    content: "";
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 3px;
    width: 1px;
    background: rgba(13, 110, 253, .32);
}

main table.my-table .atf-list-col-resizer:hover::after,
main table.my-table.atf-list-column-resizing .atf-list-col-resizer::after {
    background: rgba(13, 110, 253, .9);
}

main table.my-table.atf-list-column-resizing,
main table.my-table.atf-list-column-resizing * {
    cursor: col-resize !important;
    user-select: none;
}

.filter-sidebar {
    border-right-color: var(--atf-line);
}

.form-group label,
.myform-group label,
.form-label,
.col-form-label,
.form-check label,
.form-modal .form-row-group label,
.form-modal .card-detail .card-header {
    color: var(--label-font-color) !important;
    font-size: var(--atf-control-font-size);
}

.form-control,
.form-select,
.form-select-sm,
.form-control-sm,
.form-modal .form-row-group > input:not([type="checkbox"]):not([type="radio"]),
.form-modal .form-row-group > select,
.select2-container .select2-selection--single {
    border-color: var(--atf-line) !important;
    border-radius: 5px !important;
    color: var(--atf-text);
    background-color: var(--atf-surface);
    font-size: var(--atf-control-font-size) !important;
    min-height: var(--atf-control-height);
}

.select2-container,
.select2-container .select2-selection__rendered,
.select2-results__option,
.select2-search--dropdown .select2-search__field {
    font-size: var(--atf-control-font-size);
}

.form-control:focus,
.form-select:focus,
.form-select-sm:focus,
.form-modal .form-row-group > input:not([type="checkbox"]):not([type="radio"]):focus,
.form-modal .form-row-group > select:focus,
.select2-container--focus .select2-selection--single,
.select2-container--open .select2-selection--single {
    border-color: var(--atf-primary) !important;
    box-shadow: 0 0 0 .12rem rgba(11, 111, 190, .16) !important;
}

.form-modal .form-row-group > .form-check-input,
.form-check-input {
    width: 1.05em !important;
    height: 1.05em !important;
    min-height: 1.05em !important;
    max-height: 1.05em !important;
    min-width: 1.05em;
    max-width: 1.05em;
    padding: 0 !important;
    flex: 0 0 auto;
    margin-top: .18em;
    vertical-align: top;
    background-color: #fff !important;
    border: 1px solid #b8c7d6 !important;
    border-radius: .25em !important;
    box-shadow: none !important;
}

.form-modal .form-row-group > .form-check-input:checked,
.form-check-input:checked {
    background-color: var(--bs-primary, var(--atf-primary)) !important;
    border-color: var(--bs-primary, var(--atf-primary)) !important;
}

.form-modal .form-row-group > .form-check-input:focus,
.form-check-input:focus {
    border-color: var(--bs-primary, var(--atf-primary)) !important;
    box-shadow: 0 0 0 .16rem rgba(11, 111, 190, .18) !important;
}

.form-modal .form-row-group > .form-check-input:disabled,
.form-check-input:disabled {
    cursor: not-allowed;
    filter: none;
    opacity: .55;
}

.table,
.my-table,
.detailTable {
    color: var(--atf-text);
}

.table,
.list-page .my-table,
.work-page .table,
.table-detail-card-flex .table,
.main-table-content .table {
    font-size: var(--atf-detail-font-size) !important;
}

.detailTable,
.listDetail-wrapper,
.voucher-detail-table,
.voucher-detail-table .form-control,
.voucher-detail-table .form-select,
.voucher-detail-table .select2-container,
.voucher-detail-table .select2-selection__rendered,
.detailTable .form-control,
.detailTable .form-select,
.detailTable .select2-container,
.detailTable .select2-selection__rendered {
    font-size: var(--atf-detail-font-size) !important;
}

.table > :not(caption) > * > *,
.list-page .my-table td,
.detailTable td,
.detailTable th {
    border-color: var(--atf-line);
}

.list-page .my-table thead th,
.listDetail-wrapper thead th,
.detailTable thead th,
.cash-payment-form .detailTable thead th,
.purchase-voucher-form .detailTable thead th,
.purchase-service-form .detailTable thead th {
    color: #16324f;
    background: #dceefb !important;
    border-color: var(--atf-line-strong);
    font-weight: 700;
}

.list-page .my-table tbody tr:hover td,
.detailTable tbody tr:hover td {
    color: var(--atf-primary-dark);
    background: #f0f7fd;
}

.voucher-detail-table input:focus,
.voucher-detail-table select:focus,
.voucher-detail-table .form-control:focus,
.voucher-detail-table .form-select:focus,
.voucher-detail-table .select2-container--focus .select2-selection--single,
.voucher-detail-table .select2-container--open .select2-selection--single {
    border-color: var(--atf-primary) !important;
    box-shadow: inset 0 0 0 1px rgba(11, 111, 190, .24) !important;
}

.alert {
    border-radius: 6px;
    border-color: transparent;
    box-shadow: 0 8px 20px rgba(23, 32, 51, .08);
}

.language-select-form .select2-selection--single {
    background: var(--atf-surface-muted) !important;
}

#customContextMenu {
    border-color: var(--atf-line);
    border-radius: 6px;
    box-shadow: 0 12px 28px rgba(23, 32, 51, .16);
}

/* Empty native date inputs display the browser's format hint (for example dd/mm/yyyy).
   Keep that hint visually secondary; entered dates retain the normal form-control style. */
input[type="date"].atf-date-format-hint,
input[type="date"].atf-date-format-hint::-webkit-datetime-edit,
input[type="date"].atf-date-format-hint::-webkit-datetime-edit-text,
input[type="date"].atf-date-format-hint::-webkit-datetime-edit-day-field,
input[type="date"].atf-date-format-hint::-webkit-datetime-edit-month-field,
input[type="date"].atf-date-format-hint::-webkit-datetime-edit-year-field {
    color: #98a2ad !important;
    font-weight: 400 !important;
}

@media (max-width: 767.98px) {
    html,
    body {
        overflow-x: hidden;
    }

    main {
        min-width: 0;
        max-width: 100vw;
    }

    main .container,
    main .container-sm,
    main .container-md,
    main .container-lg,
    main .container-xl,
    main .container-xxl {
        width: 100% !important;
        max-width: none !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    main .w-25,
    main .w-50,
    main .w-75 {
        width: 100% !important;
    }

    main .card,
    main .modal-content,
    main .form-modal,
    main .list-page,
    main .work-page {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    main .row {
        min-width: 0;
    }

    main [class^="col-"],
    main [class*=" col-"] {
        min-width: 0;
    }

    main .form-control,
    main .form-select,
    main textarea,
    main .select2-container {
        max-width: 100% !important;
    }

    main .btn {
        white-space: nowrap;
    }

    main .main-content-flex-container {
        flex-direction: column;
        overflow: auto;
    }

    main .filter-sidebar {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        border-right: 0;
        border-bottom: 1px solid var(--atf-line);
    }

    main .main-table-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow-x: auto;
    }

    main .atf-mobile-table-scroll,
    main .table-responsive,
    main .list-table-wrapper,
    main .detail-table-container .list-table-wrapper {
        max-width: 100%;
        overflow-x: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }

    main .atf-mobile-table-scroll {
        max-height: calc(100dvh - 220px);
        border: 1px solid var(--atf-line);
        border-radius: 6px;
        background: var(--atf-surface);
    }

    main .atf-mobile-table-scroll > table,
    main .table-responsive > table {
        min-width: 720px;
        margin-bottom: 0;
    }

    main .atf-mobile-table-scroll > .detailTable,
    main .atf-mobile-table-scroll > .voucher-detail-table,
    main .atf-mobile-table-scroll > .my-table,
    main .table-responsive > .detailTable,
    main .table-responsive > .voucher-detail-table,
    main .table-responsive > .my-table {
        min-width: 1000px;
    }

    main .pagination {
        flex-wrap: nowrap;
        width: max-content;
    }

    main .pagination-wrap,
    main .paging-wrap {
        overflow-x: auto;
    }

    .navbar .nav-link {
        width: 100%;
        justify-content: flex-start;
    }

    .dropdown .dropdown-menu,
    .dropdown-submenu .sub-menu {
        border-radius: 4px;
    }
}

