/* Custom SixHands Admin CSS */

:root {
    --primary-color: #006A56;
    --secondary-color: #CEF580;
    --colors-sh_green-30: #B3D2CC;
    --colors-sh_dark-50: #829A95;
    --color-error: #F2240D;
}

* {
    box-sizing: border-box;
}

body,
h1 {
    font-size: 16px;
    line-height: 1.3;
    background: #FFF9ED;
    font-family: var(--font-family-base) !important;
}

body,
html {
    margin: 0;
    padding: 0;
}

/* Global: hide scrollbars but keep scroll functionality across all sizes */
html,
body {
    -ms-overflow-style: none;
    /* IE, Edge legacy */
    scrollbar-width: none;
    /* Firefox */
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge (Blink/WebKit) */
}

/* Force font for all elements using universal selector */
* {
    font-family: var(--font-family-base) !important;
}

/* Specific font overrides for common elements */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family-base) !important;
}

p,
span,
div,
a,
button,
input,
textarea,
select {
    font-family: var(--font-family-base) !important;
}

label,
legend,
caption {
    font-family: var(--font-family-base) !important;
}

/* Override AdminLTE specific classes */
.content-header h1,
.content-header h2,
.content-header h3,
.content-header h4,
.content-header h5,
.content-header h6 {
    font-family: var(--font-family-base) !important;
}

.card-title,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    font-family: var(--font-family-base) !important;
}

.navbar-brand,
.navbar-nav .nav-link,
.navbar-nav .nav-item {
    font-family: var(--font-family-base) !important;
}

.sidebar .nav-link,
.sidebar .nav-item,
.sidebar .brand-link,
.sidebar .brand-text {
    font-family: var(--font-family-base) !important;
}

/* Override form elements */
.form-control,
.form-select,
.form-check-input,
.form-check-label,
.input-group-text,
.btn {
    font-family: var(--font-family-base) !important;
}

/* Override table elements */
.table th,
.table td,
.table caption {
    font-family: var(--font-family-base) !important;
}

/* Override modal elements */
.modal-title,
.modal-header h1,
.modal-header h2,
.modal-header h3,
.modal-header h4,
.modal-header h5,
.modal-header h6,
.modal-body * {
    font-family: var(--font-family-base) !important;
}

i.fas,
i.far,
i.fal,
i.fab {
    font-family: "Font Awesome 5 Free" !important;
}

.content-header {
    padding: 15px 0.5rem;
}

.small-box {
    margin-bottom: 20px;
}

.small-box .inner {
    padding: 20px;
}

.small-box .icon {
    color: rgba(0, 0, 0, 0.15);
    z-index: 0;
}

.small-box .icon>i {
    font-size: 70px;
    position: absolute;
    right: 15px;
    top: 15px;
    transition: transform 0.3s linear;
}

.small-box:hover .icon>i {
    transform: scale(1.1);
}

.card {
    margin-bottom: 20px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    padding: 0.75rem 1.25rem;
    position: relative;
}

.card-title {
    float: left;
    font-size: 1.1rem;
    font-weight: 400;
    margin: 0;
}

.card-body {
    flex: 1 1 auto;
    min-height: 1px;
    padding: 1.25rem;
}

/* Login page customization */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    margin-top: 5%;
}

.login-logo {
    font-size: 2.1rem;
    font-weight: 300;
    margin-bottom: 0.9rem;
    text-align: center;
}

.login-card-body {
    border-radius: 0.375rem;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.125), 0 1px 3px rgba(0, 0, 0, 0.2);
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 0.2rem;
    color: #6c757d;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.3;
    padding: 0.375rem 0.75rem;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.icheck-primary>input:first-child:checked+input[type="hidden"]+label::before,
.icheck-primary>input:first-child:checked+label::before {
    background-color: #007bff;
    border-color: #007bff;
}

.customers-content {
    padding: 0;
}

/* Override table styles for customers page */
.data-table-container {
    /* border: 1px solid #e9ecef; */
    border-radius: 12px;
    background-color: #fafafa;
    margin: 0;
    box-shadow: 0 0 0 1.5px #006A56 !important;
    overflow-x: visible !important;
    overflow-y: hidden !important;
}

.data-table {
    border-radius: 12px;
    overflow: hidden;
}

.table-header th {
    background-color: #026a56;
    color: #FFF9ED;
    font-weight: 600;
    padding: 15px 12px;
}

.table-body {
    background-color: white;
    box-shadow: 0 0 0 1.5px #006A56 !important;
}

.table-row {
    /* border-left: 2px solid #006A56;
    border-right: 2px solid #006A56; */
}

.table-row:last-child {
    /* border-bottom: 2px solid #006A56; */
}

.table-cell {
    padding: 24px 12px;
    vertical-align: middle;
    /* white-space: nowrap; */
    overflow: hidden;
    text-overflow: ellipsis;
    /* max-width: 300px; */
    font-size: 16px;
    color: #05352C;

}

/* Customer ID column specific styling */
.table-cell:first-child {
    /* text-align: center; */
}

/* Checkbox styling */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-label {
    width: 18px;
    height: 18px;
    border: 2px solid #006A56;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    /* background-color: white; */
    transition: all 0.2s ease;
    margin: unset !important;
}

textarea {
    border-radius: 12px !important;
    padding: 12px 24px !important;
}

table tr th .checkbox-label {
    border: 2px solid #FFF9ED !important;
}

.checkbox-label:hover {
    border-color: #026a56;
}

input[type="checkbox"]:checked+.checkbox-label {
    background-color: #026a56;
    border-color: #026a56;
}

input[type="checkbox"]:checked+.checkbox-label::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

input[type="checkbox"] {
    display: none;
}

/* Sort icons styling */
.sort-icons i {
    font-size: 10px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.sort-icons i.active {
    opacity: 1;
    color: #ffd700;
}

/* Responsive adjustments */
/* @media (max-width: 768px) {
    .customers-content {
        padding: 10px;
    }

    .data-table-container {
        border-radius: 6px;
    }

    .table-header th,
    .table-cell {
        padding: 10px 8px;
    }
} */

.customers-content {
    padding: 0;
}

/* Override table styles for customers page */
.data-table-container {
    box-shadow: 0 0 0 1.5px #006A56 !important;
    border-radius: 12px;
    background-color: #fafafa;
    margin: 0;
    overflow-x: visible !important;
    overflow-y: hidden !important;
}

.data-table {
    border-radius: 12px;
    overflow: hidden;
}

.table-header th {
    background-color: #026a56;
    color: #FFF9ED;
    font-weight: 600;
    padding: 15px 12px;
}

.table-header tr {
    border-radius: 12px;
    overflow: hidden;
}

.table-body {
    background-color: white;
}

.table-row {
    /* border-left: 2px solid #006A56;
    border-right: 2px solid #006A56; */
}

.table-row:last-child {
    /* border-bottom: 2px solid #006A56; */
}

/* Customer ID column specific styling */
.table-cell:first-child {
    /* text-align: center; */
}

/* Checkbox styling */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-label {
    width: 18px;
    height: 18px;
    border: 2px solid #006A56;
    border-radius: 3px;
    cursor: pointer;
    position: relative;
    /* background-color: white; */
    transition: all 0.2s ease;
}

input[type="checkbox"]:checked+.checkbox-label {
    background-color: #026a56;
    border-color: #026a56;
}

input[type="checkbox"]:checked+.checkbox-label::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

input[type="checkbox"] {
    display: none;
}

/* Sort icons styling */
.sort-icons i {
    font-size: 10px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.sort-icons i.active {
    opacity: 1;
    color: #ffd700;
}

/* Responsive adjustments */
/* @media (max-width: 768px) {
    .customers-content {
        padding: 10px;
    }

    .data-table-container {
        border-radius: 6px;
    }

    .table-header th,
    .table-cell {
        padding: 10px 8px;
    }
} */

/* Form Input */
.form-input-group {
    margin-bottom: 24px;
}

.form-input-group:last-child {
    margin-bottom: 0;
}

.form-input-group .form-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

.form-input-group.is-invalid .form-label {
    color: var(--color-error);
}

.form-input-group .form-input {
    width: 100%;
    height: 46px;
    padding-left: 24px;
    padding-right: 12px;
    border: 1.5px solid var(--colors-sh_green-30);
    border-radius: 12px;
    font-size: 16px;
    color: var(--primary-color);
}

.form-input-group.is-invalid .form-input,
.form-input-group.is-invalid .form-input:focus {
    border-color: var(--color-error);
}

.form-input-group .form-input::placeholder {
    color: var(--colors-sh_dark-50);
    font-weight: 600;
}

.form-input-group .form-input:focus {
    outline: none;
    border: 1px solid var(--primary-color);
}

.btn-common-primary {
    height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border-radius: 999px;
    background: var(--primary-color);
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
}

.error-message {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--color-error);
}

.btn-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 24px;
}

/* End Form Input */

/* Login Page */
.auth-inner {
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
}

.auth-wrapper {
    max-width: 355px;
    width: 100%;
}

.auth-wrapper .auth-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    margin-bottom: 60px;
}

.auth-wrapper .auth-header img {
    width: 250px;
    height: 40px;
}

.auth-wrapper .auth-header h3 {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

.auth-wrapper .btn-wrapper {
    margin-top: 60px;
}

/* End Login Page */

/* Start modal common */
.customer-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.avatar-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
}

.avatar-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.first-circle {
    width: 60%;
    height: 100%;
    min-width: 20px;
    min-height: 20px;
}

.second-circle {
    width: 60%;
    height: 100%;
    min-width: 20px;
    min-height: 20px;
}

.avatar-text {
    font-size: inherit;
    line-height: 1.3;
}

/* Size variations */
.customer-avatar.w-8 .avatar-circle {
    min-width: 16px;
    min-height: 16px;
}

.customer-avatar.w-10 .avatar-circle {
    min-width: 20px;
    min-height: 20px;
}

.customer-avatar.w-12 .avatar-circle {
    min-width: 24px;
    min-height: 24px;
}

/* Color variations */
.bg-yellow-400 {
    background-color: #fbbf24;
}

.bg-green-500 {
    background-color: #10b981;
}

.bg-orange-500 {
    background-color: #f97316;
}

.bg-blue-400 {
    background-color: #60a5fa;
}

.bg-purple-500 {
    background-color: #8b5cf6;
}

.bg-pink-400 {
    background-color: #f472b6;
}

.bg-indigo-500 {
    background-color: #6366f1;
}

.bg-teal-400 {
    background-color: #2dd4bf;
}

.bg-red-500 {
    background-color: #ef4444;
}

.modal-title-custom {
    font-weight: 800;
    color: #026a56
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    padding: unset !important;
}

/* End modal common */

.modal-content {
    max-height: 90vh !important;
    overflow: scroll !important;
    box-shadow: none !important;
}

/* Hide scrollbar in modal content globally */
.modal-content {
    -ms-overflow-style: none;
    /* IE, Edge legacy */
    scrollbar-width: none;
    /* Firefox */
}

.modal-content::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge (Blink/WebKit) */
}

/* Utility: apply to any container to hide scrollbar */
.scrollbar-hidden {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hidden::-webkit-scrollbar {
    display: none;
}

select {
    padding: 10px 24px !important;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Ẩn spinner cho Firefox */
input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.45);
}

.remarks-display {
    border-top: 3px solid #CEF580;
    padding-top: 30px;
}

.mb-30px {
    margin-bottom: 30px;
}

/* Modal backdrop custom color */
.modal-backdrop {
    background-color: #F6EDDB !important;
}

.modal-backdrop.show {
    opacity: 0.95 !important;
}

.my-30px {
    margin-bottom: 30px;
    margin-top: 30px;
}

.add-remarks-form textarea {
    height: 150px;
    box-shadow: 0 0 0 1.5px #B3D2CC !important;
}

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

.btn-submit:hover {
    background-color: #026a56 !important;
    color: #CEF580 !important;
}

.text-add-remarks:hover {
    color: #026a56 !important;
}

.fa-power-off {
    display: none !important;
}

.main-header {
    border-bottom: none !important;
}

a:has(.fa-power-off) {
    border: none !important;
}

.table-header th {
    max-width: 144px;
}

.data-table td {
    max-width: 144px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Fix border-radius và disable scroll ngang cho các bảng trong modal customers */
#transactionsModal .data-table-container,
#ordersModal .data-table-container,
#loyaltyModal .data-table-container,
#giftsModal .data-table-container,
#redemptionsModal .data-table-container {
    border-radius: 12px !important;
    /* overflow: hidden !important; */
    /* overflow-x: hidden !important; */
    /* overflow-y: hidden !important; */
    max-width: 100% !important;
}

#transactionsModal .data-table-container .data-table,
#ordersModal .data-table-container .data-table,
#loyaltyModal .data-table-container .data-table,
#giftsModal .data-table-container .data-table,
#redemptionsModal .data-table-container .data-table {
    border-radius: 12px !important;
    /* overflow: hidden !important; */
    /* width: 100% !important;
    table-layout: auto !important; */
    max-width: 100% !important;
}

#transactionsModal .data-table-container .data-table thead,
#ordersModal .data-table-container .data-table thead,
#loyaltyModal .data-table-container .data-table thead,
#giftsModal .data-table-container .data-table thead,
#redemptionsModal .data-table-container .data-table thead {
    border-radius: 12px 12px 0 0 !important;
    /* overflow: hidden !important; */
}

#transactionsModal .data-table-container .data-table tbody tr:last-child td:first-child,
#ordersModal .data-table-container .data-table tbody tr:last-child td:first-child,
#loyaltyModal .data-table-container .data-table tbody tr:last-child td:first-child,
#giftsModal .data-table-container .data-table tbody tr:last-child td:first-child,
#redemptionsModal .data-table-container .data-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 12px !important;
    /* overflow: hidden !important; */
}

#transactionsModal .data-table-container .data-table tbody tr:last-child td:last-child,
#ordersModal .data-table-container .data-table tbody tr:last-child td:last-child,
#loyaltyModal .data-table-container .data-table tbody tr:last-child td:last-child,
#giftsModal .data-table-container .data-table tbody tr:last-child td:last-child,
#redemptionsModal .data-table-container .data-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 12px !important;
    /* overflow: hidden !important; */
}