:root {
    --spacing-unit: 1px;
}

html,
body {
    font-family: "Be Vietnam" !important;
    /* height: 100% !important; */
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

header,
main {
    padding-left: 200px;
}
@media only screen and (max-width: 992px) {
    header,
    main,
    footer {
        padding-left: 0;
    }
    .container {
        width: 100%;
    }
    .modal .modal-footer {
        padding: 0.75rem !important;
    }
    .modal .modal-content {
        padding: 0.75rem !important;
    }
    .modal {
        width: 90%;
    }
}

div[ng-bind-html] img {
    width: 100% !important;
}
.row {
    margin-bottom: 8px;
}
/* color */
.maqr-green {
    background-color: #50b26a !important;
}
.maqr-green-text {
    color: #50b26a !important;
}
/* margin */
.m-0 {
    margin: 0px !important;
}
.my-0 {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}
.mx-0 {
    margin-left: 0px !important;
    margin-right: 0px !important;
}
/* Margin utilities - sử dụng CSS variables */
.mt-0 {
    margin-top: 0px !important;
}
.mt-4 {
    margin-top: 4px !important;
}
.mt-6 {
    margin-top: 6px !important;
}
.mt-8 {
    margin-top: 8px !important;
}
.mt-16 {
    margin-top: 16px !important;
}
.mt-24 {
    margin-top: 24px !important;
}
.mt-32 {
    margin-top: 32px !important;
}

.mb-0 {
    margin-bottom: 0px !important;
}
.mb-4 {
    margin-bottom: 4px !important;
}
.mb-8 {
    margin-bottom: 8px !important;
}

.ml-4 {
    margin-left: 4px !important;
}
.ml-8 {
    margin-left: 8px !important;
}

.mr-4 {
    margin-right: 4px !important;
}
.mr-8 {
    margin-right: 8px !important;
}
.mr-16 {
    margin-right: 16px !important;
}
.mr-24 {
    margin-right: 24px !important;
}

.my-0 {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}
.my-4 {
    margin-top: 4px !important;
    margin-bottom: 4px !important;
}
.my-8 {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}
.my-16 {
    margin-top: 16px !important;
    margin-bottom: 16px !important;
}
.my-24 {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
}

.mx-0 {
    margin-left: 0px !important;
    margin-right: 0px !important;
}
.mx-8 {
    margin-left: 8px !important;
    margin-right: 8px !important;
}
.mx-16 {
    margin-left: 16px !important;
    margin-right: 16px !important;
}
.mx-24 {
    margin-left: 24px !important;
    margin-right: 24px !important;
}

/* padding */
.px-0 {
    padding-left: 0px !important;
    padding-right: 0px !important;
}
.py-4 {
    padding-top: 4px !important;
    padding-bottom: 4px !important;
}
.pb-4 {
    padding-bottom: 4px !important;
}
.pb-16 {
    padding-bottom: 16px !important;
}
.p-8 {
    padding: 8px !important;
}
.px-8 {
    padding-left: 8px !important;
    padding-right: 8px !important;
}
.py-8 {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}
.pt-8 {
    padding-top: 8px !important;
}
.py-12 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

/* text */
.fs-15 {
    font-size: 1.15rem !important;
}
.fs-22 {
    font-size: 22px !important;
}
p {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
}
.text-bold {
    font-weight: 700 !important;
}
.text-justify {
    text-align: justify !important;
}
.text-uppercase {
    text-transform: uppercase !important;
}
.text-center {
    text-align: center !important;
}
.text-underline {
    text-decoration: underline !important;
}

/* modal */
.modal {
    border-radius: 8px !important;
}
.modal.bottom-sheet {
    min-height: 50vh !important;
    max-height: 80vh !important;
    border-radius: 0px !important;
}
.modal.right-sheet {
    top: 0 !important;
    right: 0 !important;
    left: auto !important;
    bottom: 0 !important;
    width: 500px !important;
    max-width: 90vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0px !important;
    transform: translateX(100%) !important;
    transition: transform 0.3s ease-in-out !important;
    overflow-y: auto !important;
}
.modal.right-sheet.open {
    transform: translateX(0) !important;
}
@media only screen and (max-width: 992px) {
    .modal.right-sheet {
        width: 85vw !important;
    }
}
.modal .modal-footer {
    padding: 0 24px !important;
}

.modal .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}
.modal-dangnhap {
    max-height: 80vh;
    max-width: 420px;
    padding: 20px;
}
/* table */
table {
    width: 100% !important;
    /* margin-bottom: 16px !important; */
}
table td {
    padding: 3px;
}
table.highlight td {
    padding: 3px;
    border-right: 1px solid rgba(0, 0, 0, 0.12) !important;
}
table.highlight td:last-child {
    border-right: none !important;
}
table td label > span {
    transform: translateY(4px);
}
table td label > span.lever {
    transform: translateY(-2px) !important;
}
table th {
    padding: 3px;
    /* border-right: 1px solid rgba(0, 0, 0, 0.12); */
}
table.highlight th {
    /* padding: 3px; */
    border-right: 1px solid rgba(0, 0, 0, 0.12);
}
table th:last-child {
    border-right: none;
}
table .ng-table {
    overflow-x: auto !important;
    width: 100% !important;
}
.pull-right {
    float: right !important;
}
.btn-default {
    margin-left: 8px !important;
    background-color: #9e9e9e !important;
    height: 28px !important;
    line-height: 28px !important;
    /* font-size: 14px !important; */
    box-shadow: none !important;
}

.btn-outline {
    box-shadow: none !important;
    background-color: #eeeeee;
    color: #343434;
    /* cursor: pointer !important; */
    border: 1px solid #bdbdbd !important;
    height: 26px !important;
    line-height: 24px !important;
    padding: 0 8px !important;
    /* font-size: 14px !important; */
}
.btn-outline-blue {
    background-color: #E3F2FD ;
    color: #2196F3;
    border: 1px solid #2196F3 !important;
    height: 26px !important;
    line-height: 24px !important;
    padding: 0 8px !important;
    /* font-size: 14px !important; */
}

/* .btn-flat:hover {
    background-color: #eeeeee !important;
} */
.btn-flat.disabled,
.btn-flat.btn-flat[disabled] {
    border: 1px solid #bdbdbd !important;
}

.btn-close {
    color: #424242 !important;
    background-color: #fff !important;
    border: 1px solid #424242 !important;
    box-shadow: none !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
}
.btn-save {
    background-color: #fff !important;
    box-shadow: none !important;
    border-radius: 6px !important;
    border: 1px solid #50b26a !important;
    color: #50b26a !important;
    font-weight: 700 !important;
}
.btn-new {
    background-color: #50b26a !important;
    box-shadow: none !important;
    border-radius: 6px !important;
    border: 1px solid #50b26a !important;
    color: #fff !important;
    font-weight: 700 !important;
}
.btn-white {
    /* background-color: #50b26a !important; */
    background-color: #fff !important;
    border: none !important;
    color: #424242 !important;
    /* font-weight: 700 !important; */
}
.btn-green {
    background-color: #50b26a !important;
    border: none !important;
    color: white !important;
    /* font-weight: 700 !important; */
}
.btn-delete {
    background-color: #ffebee !important;
    border: none !important;
    color: #f44336 !important;
    border: 1px solid #f44336 !important;
}
.btn {
    border-radius: 6px !important;
    box-shadow: none !important;
}
.btn-full {
    width: 100% !important;
}
.btn[disabled] {
    border: 1px solid #9f9f9f !important;
}
/* table mini, width , no border*/
table.mini td {
    padding: 0 2px !important;
}
table.mini tr {
    border: none !important;
}
/* dropdown */
.dropdown-taikhoan {
    border-radius: 8px !important;
    top: 72px !important;
    width: 200px !important;
}
.dropdown-doanhnghiep {
    border-radius: 8px !important;
    top: 72px !important;
    width: 360px !important;
    left: 212px !important;
}
.ngonngu {
    width: 200px !important;
}
.select-dropdown {
    top: 0px !important;
    /* height: 250px !important; */
}
.dropdown-content {
    max-height: 300px !important;
    border-radius: 6px;
    background-color: #eeeeee;
}
.dropdown-content li > a,
.dropdown-content li > span {
    color: #424242;
}

.trangchu-background {
    /* background-image: linear-gradient(to right, white, white 30%, transparent 70%), url("assets/img/trangchu.jpg"); */
    background-image: url("assets/img/404.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: calc(100vh - 64px);
    /* border-radius: 8px; */
}

/* @media only screen and (max-width: 602px) {
    .trangchu-background {
        background-image: linear-gradient(to bottom, white, white 30%, transparent 70%), url("assets/img/trangchu.jpg");
    }
} */
.t404-background {
    background-image: url("assets/img/404.jpg");
    /* background-size: cover; */
    background-position: center;
    background-repeat: no-repeat;
    height: calc(100vh - 64px);
    /* border-radius: 8px; */
}

/* border-radius */
.br-0 {
    border-radius: 0px !important;
}
.br-4 {
    border-radius: 4px !important;
}
.br-8 {
    border-radius: 8px !important;
}
.bt-1 {
    border-top: 1px solid #eeeeee !important;
}
.bb-1 {
    border-bottom: 1px solid #eeeeee !important;
}
.bb-grey {
    border-bottom: 1px solid #e0e0e0 !important;
}
.bd-1 {
    border: 1px solid #eeeeee !important;
}
.bd-0 {
    border: 0px !important;
}
.bd-grey {
    border: 1px solid #e0e0e0 !important;
}
.bd-dashed {
    border: 1px dashed #9e9e9e !important;
}
.bd-green {
    border: 1px solid #50b26a !important;
}
.bd-red {
    border: 1px solid #f44336 !important;
}

.sidenav {
    height: calc(100% - 64px);
    width: 188px !important;
    margin-left: 0.75rem !important;
    border-radius: 8px !important;
}
.sidenav li > a {
    padding: 0 4px;
    margin: 12px 4px;
    /* font-size: 16px; */
    height: 32px;
    line-height: 32px;
    border-radius: 4px !important;
}
.sidenav li > a > i,
.sidenav li > a > [class^="mdi-"],
.sidenav li > a li > a > [class*="mdi-"],
.sidenav li > a > i.material-icons {
    margin-right: 8px;
    height: 32px;
    line-height: 32px;
    /* color: #757575 !important; */
}
.icon {
    font-size: 15px;
    line-height: 22px;
    /* vertical-align: text-bottom !important;*/
    vertical-align: -2px !important;
}
/* Khi menu active thì icon chuyển màu */
.sidenav li > a.grey.lighten-2 i.material-icons {
    color: #424242 !important;
}
.sidenav li > a.blue.darken-3 i.material-icons {
    color: white !important;
}
.sidenav-active {
    background-color: #e8f5e9 !important;
    color: #50b26a !important;
    font-weight: 700 !important;
}
.sidenav-active i.material-icons {
    color: #50b26a !important;
}

/* CSS cho đồng hồ hiện thời gian */
.current-time {
    font-size: 1.5rem;
    font-weight: 100;
    padding: 8px 12px;
    border-radius: 4px;
    /* background-color: rgba(33, 150, 243, 0.1); */
    display: inline-block;
}

blockquote {
    border-left: 5px solid #50b26a;
}
.collection .collection-item.avatar:not(.circle-clipper) > .circle,
.collection .collection-item.avatar :not(.circle-clipper) > .circle {
    width: 42px !important;
}

.collection {
    border: none !important;
}

.ql-container {
    font-size: 16px !important;
}
.ql-toolbar.ql-snow {
    border-radius: 6px 6px 0 0;
}
.ql-container.ql-snow {
    border-radius: 0 0 6px 6px !important;
}

.card {
    border-radius: 6px !important;
    box-shadow: none !important;
    border: 1px solid #e0e0e0 !important;
}
.card-panel {
    margin-top: 0px;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    box-shadow: none !important;
    border: 1px solid #e0e0e0;
}

[type="checkbox"].filled-in:checked + span:not(.lever):after {
    border: 2px solid #616161 !important;
    background-color: #616161 !important;
}

.switch label input[type="checkbox"]:checked + .lever:after {
    background-color: #50b26a !important;
}

.switch label input[type="checkbox"]:checked + .lever {
    background-color: #e0e0e0 !important;
}
.switch label {
    color: #424242 !important;
    font-size: 15px !important;
}
input {
    border: 1px solid #ccc !important;
    padding: 0 1rem !important;
    border-radius: 6px !important;
    height: 36px !important;
    line-height: normal !important;
    transition: none !important;
    box-shadow: 0 0 0 !important;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"] {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-shadow: 0 0 0 !important;
}
/* label underline focus color */
.input-field input[type="text"]:focus,
.input-field input[type="password"]:focus,
.input-field input[type="email"]:focus,
.input-field input[type="number"]:focus {
    border: 1px solid #424242 !important;
    box-shadow: 0 0 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}
/* valid color */
.input-field input[type="text"].valid,
.input-field input[type="password"].valid,
.input-field input[type="email"].valid {
    box-shadow: 0 0 0 !important;
    border: 1px solid #ccc !important;
}
.input-field span {
    display: block;
    font-size: 15px !important;
    margin-bottom: 4px;
}
.input-field {
    margin: 0;
}
span.badge {
    /* padding: 0 !important; */
    float: left !important;
}
span.badge.new {
    font-size: 14px;
}
.tab-content {
    padding: 15px 0;
    display: none;
}

.tabs .indicator {
    background-color: #26a69a;
}
.tabs i {
    line-height: 48px;
}
.tabs .tab a:focus, .tabs .tab a:focus.active {
    background-color: white;
    outline: none;
}
.tabs .tab a.active {
    border-bottom: 4px solid #50b26a !important;
    color: #424242 !important;
    /* background-color: #eee; */
}
.tabs .tab a {
    color: #424242 !important;
    font-size: 1rem !important;
}
.tabs .tab {
    text-transform: none;
}
.tabs {
    border-bottom: 1px solid #e0e0e0;
}

.mw-250 {
    max-width: 250px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* .truncate {
    display: table-cell !important;
} */
/* i.left {
    margin-right: 4px !important;
} */
.ng-table th {
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ng-table-sort-header {
    cursor: pointer;
    background-color: #eeeeee;
}
.pagination li.active {
    background-color: #50b26a !important;
}
.collapsible-body {
    padding: 1rem !important;
}
.full {
    margin: 0 -0.75rem;
    border-radius: 0px !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}
/* color */
.habeco-green {
    background-color: #036337 !important;
}
.habeco-green-text {
    color: #036337 !important;
}
.habeco-gold {
    background-color: #c2a33e !important;
}
.habeco-gold-text {
    color: #c2a33e !important;
}
/* Leaflet Map */
/* #mapVitriquet {
    height: 450px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
} */
.map-container {
    height: 450px;
    width: 100%;
    border-radius: 8px;
    border: 1px solid #ddd;
}

/* CSS cho Leaflet Map */
#map {
    height: 400px !important;
    width: 100% !important;
    border: 2px solid #2196f3 !important;
    border-radius: 8px !important;
    z-index: 1 !important;
    position: relative !important;
    background: #f0f0f0 !important;
}

/* Đảm bảo Leaflet tiles hiển thị đúng */
.leaflet-container {
    height: 400px !important;
    width: 100% !important;
    position: relative !important;
    z-index: 1 !important;
}

.leaflet-tile {
    pointer-events: auto !important;
}

.leaflet-tile-pane {
    z-index: 1 !important;
}

.leaflet-map-pane {
    z-index: 1 !important;
}

/* Đảm bảo controls hiển thị */
.leaflet-control-zoom {
    z-index: 1000 !important;
}

.leaflet-control-attribution {
    z-index: 1000 !important;
}

/* Button styles for navigation tabs */
.breadcrumb-1 {
    background-color: #9e9e9e !important;
    color: white !important;
    clip-path: polygon(0px 0px, calc(100% - 8px) 0px, 100% 50%, calc(100% - 8px) 100%, 0px 100%);
}

.breadcrumb-2 {
    background-color: #50b26a !important;
    color: white !important;
    clip-path: polygon(0px 0px, calc(100% - 8px) 0px, 100% 50%, calc(100% - 8px) 100%, 0px 100%, 8px 50%);
}

/* Password visibility toggle */
.password-toggle-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle-icon {
    position: absolute;
    right: 8px;
    cursor: pointer;
    color: #757575;
    font-size: 20px;
    height: 2rem;
    user-select: none;
    transition: color 0.2s ease;
}
.password-toggle-icon:hover {
    color: #424242;
}
/* CSS cho select HTML5 native - hỗ trợ iOS */
.ios-select-fix {
    display: block !important;
    width: 100% !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    padding: 8px 30px 8px 8px !important;
    font-size: 16px !important;
    font-family: inherit !important;
    cursor: pointer !important;
    outline: none !important;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23333" d="M0 0l6 8 6-8z"/></svg>') !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    background-size: 12px !important;
    background-attachment: scroll !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 36px !important;
}

.ios-select-fix:focus {
    border-color: #036337 !important;
    box-shadow: 0 0 0 2px rgba(3, 99, 55, 0.1) !important;
}

.ios-select-fix option {
    padding: 8px !important;
    background-color: #fff !important;
    color: #333 !important;
}

/* Hỗ trợ cho iOS Safari */
@supports (-webkit-touch-callout: none) {
    .ios-select-fix {
        font-size: 16px !important;
        padding: 10px 30px 10px 10px !important;
        min-height: 44px !important;
    }
}
/* select */
.select2-container .select2-selection--single {
    height: 36px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}
.select2-container--default .select2-selection--single .select2-selection__clear {
    height: 36px;
}

/* ==================== Business Card Styles ==================== */
.business-card-wrapper {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.business-card {
    background: white;
    border-radius: 4px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); */
    border: 1px grey solid;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Kích thước chuẩn business card: 90mm x 54mm = 340px x 204px (96 DPI) */
    width: 340px;
    height: 204px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Phần trên: card-left và card-right nằm ngang */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-right: 12px;
}

.card-name {
    margin-bottom: 8px;
}

.card-name .name {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.card-name .title {
    font-size: 11px;
    color: #e74c3c;
    font-weight: 500;
    margin: 0;
    font-style: italic;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.company-name {
    font-size: 10px;
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 2px;
}

.company-address {
    font-size: 9px;
    color: #34495e;
    line-height: 1.4;
    margin-bottom: 4px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-item {
    display: flex;
    align-items: center;
    font-size: 11px;
    color: #2c3e50;
    line-height: 12px;
}

.contact-item .label {
    color: #e74c3c;
    font-weight: 700;
    width: 45px;
    margin-right: 6px;
}

.contact-item .value {
    color: #34495e;
}

.card-right {
    margin-left: 16px;
    display: flex;
    align-items: flex-start;
}

.qr-code {
    width: 80px;
    height: 80px;
    /* padding: 6px; */
    background: white;
    border: 2px solid #e74c3c;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.card-actions {
    margin-top: 20px;
}

.card-actions .btn {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 8px auto;
    display: block;
}

/* Responsive */
@media only screen and (max-width: 600px) {
    .business-card {
        flex-direction: column;
        padding: 24px;
        min-height: auto;
    }
    
    .card-left {
        min-height: auto;
        margin-bottom: 20px;
    }
    
    .card-name .name {
        font-size: 18px;
    }
    
    .card-right {
        margin-left: 0;
        align-self: center;
    }
    
    .qr-code {
        width: 100px;
        height: 100px;
    }
}

/* Print styles */
@media print {
    .business-card-wrapper {
        page-break-inside: avoid;
    }
    
    .card-actions {
        display: none !important;
    }
    
    .business-card {
        box-shadow: none;
        border: 1px solid #ddd;
        max-width: 350px;
    }
    
    /* Hide other elements when printing */
    .navbar-fixed,
    #sidenav_menu,
    .breadcrumb-1,
    .breadcrumb-2,
    .col.s12.m7.l8,
    .btn,
    h6.mt-0.text-bold.text-uppercase {
        display: none !important;
    }
    
    .col.s12.m5.l4 {
        width: 100% !important;
        margin: 0 !important;
    }
}