@import url("variables.css");

body {
    font-family: "Google Sans Flex", sans-serif;
}

/* Universal Theme Button Classes */
.btn-theme-primary,
.btn-theme-cancel,
.btn-theme-danger {
    font-weight: 600;
    border-radius: 12px;
    padding: 12px 28px;
    transition: all 0.2s ease;
    font-size: 16px;
    line-height: 140%;
    letter-spacing: 0.3px;
}
.btn-theme-primary {
    background-color: var(--theme-primary) !important;
    border-color: var(--theme-primary) !important;
    color: #ffffff !important;
}
.btn-theme-primary:hover,
.btn-theme-primary:focus {
    background-color: #77759b !important;
    border-color: #77759b !important;
    color: #ffffff !important;
}
.btn-theme-cancel {
    background-color: #fff !important;
    border: 2px solid var(--theme-primary) !important;
    color: var(--theme-primary) !important;
    box-shadow: 0px 2px 3.4px 0px #5b52e24d;
}
.btn-theme-cancel:hover,
.btn-theme-cancel:focus {
    background-color: var(--theme-primary) !important;
    color: #fff !important;
}
.btn-theme-danger {
    background-color: var(--theme-danger) !important;
    border-color: var(--theme-danger) !important;
    color: #ffffff !important;
}
.btn-theme-danger:hover,
.btn-theme-danger:focus {
    background-color: var(--theme-danger-hover) !important;
    border-color: var(--theme-danger-hover) !important;
    color: #ffffff !important;
}

/* Reusable Reason Pill Components */
.reason-pill {
    cursor: pointer;
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    background-color: var(--theme-pill-bg);
    color: var(--theme-pill-color);
    border: 1px solid var(--theme-pill-border);
    transition: all 0.2s ease;
    display: inline-block;
    margin-bottom: 6px;
    margin-right: 6px;
}
.reason-pill:hover,
.reason-pill.active {
    background-color: var(--theme-pill-active-bg);
    color: var(--theme-pill-active-color);
    border-color: var(--theme-pill-active-border);
}

/* Universal DataTables Toolbar Select & Reset Filter Controls */
.filter-select {
    height: 38px;
    border-radius: 6px;
    border: 1px solid var(--surface-border);
    font-size: 13px;
    font-weight: 500;
    color: var(--theme-cancel-color);
    background-color: var(--surface-card);
    padding: 6px 12px;
}
.filter-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.btn-reset-icon {
    height: 38px;
    width: 38px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid var(--surface-border);
    background-color: var(--surface-card);
    transition: all 0.2s ease;
}
.btn-reset-icon:hover {
    background-color: var(--theme-cancel-hover-bg);
    color: var(--text-primary);
    border-color: var(--theme-cancel-border);
}

/* Universal KPI Metric Cards & Icons */
.figma-card {
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 20px;
    height: 100%;
    box-shadow: var(--surface-shadow);
    transition: all 0.2s ease-in-out;
}
.figma-card:hover {
    box-shadow: var(--surface-shadow-hover);
}

.figma-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}
.icon-amber {
    background: #fef3c7;
    color: #d97706;
}
.icon-purple {
    background: #ede9fe;
    color: #7c3aed;
}
.icon-olive {
    background: #ecfdf5;
    color: #059669;
}
.icon-slate {
    background: #f1f5f9;
    color: #475569;
}
.icon-blue {
    background: #e0f2fe;
    color: #0284c7;
}

.stat-delta-badge {
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.delta-positive {
    color: #059669;
}
.delta-negative {
    color: #dc2626;
}
.delta-neutral {
    color: #d97706;
}

.badge-status {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
}
.badge-confirmed {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}
.badge-pending {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}
.badge-failed {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

/* Universal Avatar Initials */
.avatar-initials {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}
.avatar-teal {
    background: #ccfbf1;
    color: #0f766e;
}
.avatar-purple {
    background: #ede9fe;
    color: #6d28d9;
}
.avatar-green {
    background: #dcfce7;
    color: #15803d;
}
.avatar-pink {
    background: #fce7f3;
    color: #be185d;
}

.error {
    color: rgb(249, 52, 52);
}

.app-header .user-link-box {
    width: 44px;
    height: 44px;
    border-radius: 44px;
    overflow: hidden;
    border: 2px solid var(--borderColor);
}

.app-header .user-link-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gap-5 {
    gap: 20px;
}

.gap-4 {
    gap: 16px;
}

.gap-3 {
    gap: 12px;
}

.gap-2 {
    gap: 8px;
}

.google-setting-alert .alert.alert-warning {
    font-size: 14px;
    margin-bottom: 0 !important;
}

.table,
.table th,
.table td {
    border-color: var(--borderColor) !important;
}

table thead tr th {
    background-color: var(--lightBg) !important;
}

table tr th {
    color: #0b0b0b !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 27px;
    white-space: nowrap;
}

table tbody td {
    color: #333;
    /* font-family: "SF Pro Display"; */
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    word-break: break-all;
}

table {
    border-radius: 6px;
    width: 100% !important;
}

.table th:first-child {
    border-radius: 6px 0 0 6px;
}

.table th:last-child {
    border-radius: 0 6px 6px 0px;
}

.card .table-responsive-data .table thead th {
    padding: 10px 14px !important;
}

.card .table-responsive-data .table td,
.card .table-responsive-data .table tbody td {
    padding: 10px 14px !important;
    vertical-align: middle;
}

.table td .action-btns1 .text-info {
    color: #1497fa !important;
}

.table td .action-btns1 .text-primary {
    color: #7b92ff !important;
}

.table td .action-btns1 .text-danger {
    color: #ef3956 !important;
}

.pagination {
    flex-wrap: wrap;
}

.pagination .paginate_button .page-link {
    color: #898787;
    /* font-family: "SF Pro Display"; */
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: 20px;
}

.pagination .page-item.active .page-link {
    color: #fff;
}

.table-responsive-data .col-sm-12 {
    overflow: auto;
}

.swal2-container .swal2-popup {
    border-radius: 12px;
    padding: 32px;
}

.swal2-container .swal2-popup .swal2-title {
    color: #333;
    font-size: 28px;
    line-height: 42px;
    margin-bottom: 6px;
}

.swal2-container .swal2-popup .swal2-html-container {
    color: #898787;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
}

.swal2-container .swal2-popup .swal2-actions {
    margin-top: 30px;
    padding: 0;
    gap: 16px;
}

.swal2-actions .swal2-cancel,
.swal2-actions .swal2-deny,
.swal2-actions .swal2-confirm {
    padding: 15px 22px;
    color: #fff;
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 24px;
    margin: 0;
}

.swal2-container .swal2-popup .swal2-actions .swal2-confirm {
    background-color: var(--mainColor);
}

.swal2-container .swal2-popup .swal2-actions .swal2-cancel {
    background: #aaa;
}

.form-control::placeholder,
.number-select input::placeholder {
    color: #898787 !important;
    font-size: 16px;
    font-weight: 400;
}

.number-select input {
    border-left: 1px solid #d1d1d1 !important;
    padding-left: 12px;
}

.ct-btn-w {
    min-width: 130px;
}

.card .fill-header-bg {
    border-radius: 12px !important;
    background: #f8f9fa !important;
}

.card-table-title {
    color: #333;
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 27px;
}

div.dataTables_wrapper div.dataTables_length select {
    height: 36px !important;
    padding: 0 5px;
    text-align: center;
}

div.dataTables_wrapper div.dataTables_filter input {
    padding: 6px 15px;
}

.removeSocialMedia,
.removeExternalLink {
    background-color: transparent;
    padding: 0;
    border: 0;
    text-align: center;
    width: 100%;
}

.removeSocialMedia i,
.removeExternalLink i {
    font-size: 22px;
    color: #f7284a;
}

.card-max-width {
    max-width: 837px;
    width: 100%;
}

.list-product-table table tr td .objectContain,
.showList-product-img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.list-product-table table tr td .objectContain,
.showList-occasion-img {
    width: 100px;
    height: 80px;
    object-fit: contain;
    border-radius: 4px;
}

.product-img-ct {
    width: 180px;
    height: 180px;
    object-fit: contain;
    border-radius: 12px;
}

.text-ellipsis {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

select.form-control:not([size]):not([multiple]) {
    height: auto !important;
}

.ct-select-border .select2-container--default .select2-selection--multiple {
    border: 1px solid #d1d1d1 !important;
    border-radius: 6px;
    padding: 5px 30px 5px 16px;
}

.select-arrow-be::before {
    content: "";
    right: 14px;
    top: 20px;
    border-color: #888 transparent transparent transparent;
    border-style: solid;
    border-width: 5px 5px 0 5px;
    width: 6px;
    height: 6px;
    position: absolute;
    z-index: 7;
}

.select-arrow-be select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.select2-container .select2-search--inline .select2-search__field {
    font-size: 16px !important;
}

.multiple-select-width .select2-container {
    width: 100% !important;
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    background-position: right calc(0.375em + 1.1875rem) center;
}

.logo-width-table {
    width: 59px;
    height: 53px;
    border-radius: 4px;
    object-fit: cover;
}

.user-data-dropdown .user {
    color: #0b0b0b;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
}

.user-data-dropdown .border-bottom {
    border-bottom: 1px solid var(--borderColor) !important;
}

.user-data-dropdown .dropdown-item {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    border-radius: 12px;
}

.user-profile-img {
    max-width: 290px;
    max-height: 290px;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.object-cover {
    object-fit: cover;
}
.round-12 {
    border-radius: 12px;
}
.login-card-width {
    max-width: 550px;
    width: 100%;
    border-radius: 12px;
    margin: 0 auto;
    padding: 44px;
    background: #1a233d;
    color: #fff;
}

.login-card-width .logo-name-text {
    margin: 35px 0;
}

.login-card-width .login-logo img {
    width: 180px;
    height: auto;
    object-fit: contain;
}

.login-card-width .login-title {
    color: #1a4598;
    /* font-family: "SF Pro Display"; */
    font-size: 40px;
    font-weight: 700;
    line-height: 60px;
}

.login-card-width .text {
    color: #fff;
    /* font-family: "SF Pro Display"; */
    font-size: 22px;
    font-weight: 400;
    line-height: 27px;
    margin-bottom: 0px;
}

.login-card-width .form-label {
    /* font-family: "SF Pro Display"; */
    font-size: 16px;
    line-height: 27px;
    color: #fff;
}

.login-card-width .btn-block {
    margin-top: 54px;
}

.login-card-width .custom-control-label:after,
.login-card-width .custom-control-label:before {
    height: 20px;
    width: 20px;
}

.login-card-width .custom-control-label:before {
    border: 1px solid #d1d1d1;
}

.login-card-width .custom-control.custom-checkbox .custom-control-label {
    padding-left: 10px;
}

.login-card-width .ct-btn-w {
    width: fit-content;
    margin: 50px auto 0 auto;
    border-radius: 12px;
    padding: 12px;
}

#back-to-top .feather-chevrons-up {
    font-size: 26px;
    line-height: 47px;
}

.fs-20 .view-eye-btn {
    width: 50px !important;
    height: 40px !important;
    border-radius: 9px;
}

.select2-container--default
    .select2-selection--multiple
    .select2-selection__choice {
    white-space: normal;
    text-overflow: ellipsis;
    word-break: break-all;
}

.card-text {
    font-size: 16px;
    font-weight: 500;
    line-height: 26px;
    color: #898787;
}

.card-text strong {
    color: #333;
}

.card-header .arrow-btn {
    transition: all 0.5s ease;
}

/* .card-header .arrow-btn:not(.collapsed){
    transform: scaleY(-1);
} */
.card-header .arrow-btn[aria-expanded="true"] {
    transform: scaleY(-1);
}

.rounded-3 {
    border-radius: 6px;
}

.text-16 {
    font-weight: 400;
    font-size: 16px !important;
    line-height: 28px;
}

.icons-logo {
    display: none;
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.sidebar-mini .full-logo {
    width: 100%;
    object-fit: contain;
    height: 49px;
}

.sidebar-mini.sidenav-toggled .full-logo,
.sidebar-mini.sidenav-toggled.sidenav-toggled1 .icons-logo {
    display: none;
}

.sidebar-mini.sidenav-toggled .icons-logo,
.sidebar-mini.sidenav-toggled.sidenav-toggled1 .full-logo {
    display: block;
}

.login-logo-ct {
    max-width: 240px;
    width: 100%;
    margin-bottom: 15px;
}

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

.breadcrumb1 {
    background-color: transparent !important;
    display: flex;
    align-items: center;
    padding: 0;
    margin-bottom: 0;
}
.breadcrumb1 .breadcrumb-item1 {
    font-size: 15px;
    font-weight: 500;
    color: #64748b;
}
.breadcrumb1 .breadcrumb-item1 a {
    color: #64748b !important;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}
.breadcrumb1 .breadcrumb-item1 a:hover {
    color: var(--mainColor, #ea3a3c) !important;
    text-decoration: underline;
}
.breadcrumb1 .breadcrumb-item1.active {
    color: var(--mainColor, #ea3a3c) !important;
    font-weight: 600 !important;
}
.breadcrumb1 .breadcrumb-item1 + .breadcrumb-item1:before {
    content: "/" !important;
    color: #94a3b8 !important;
    opacity: 0.6;
    padding: 0 10px !important;
}

.ct-check-btn-l .form-check {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
}

.ct-check-btn-l .form-check .form-check-input {
    width: 16px;
    height: 17px;
    position: relative;
    margin: 0;
}
.ct-check-btn-l .form-check .form-check-label {
    font-size: 16px;
    line-height: normal;
    margin: 0;
}
.main-product-img {
    width: 100%;
    max-width: 450px;
    max-height: 450px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}
.gallery-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    margin: 5px;
}
.gallery-item {
    position: relative;
    display: inline-block;
    margin: 5px;
}
.gallery-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.gallery-delete-btn:hover {
    background: #c82333;
}

.main-image-item {
    position: relative;
    display: inline-block;
}
.main-delete-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 25px;
    height: 25px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.main-delete-btn:hover {
    background: #c82333;
}
.addon-row td {
    vertical-align: middle;
}
.existing-gallery-img {
    position: relative;
    display: inline-block;
    margin: 5px;
}
.existing-delete-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}
.existing-delete-btn:hover {
    background: #c82333;
}

.addon-item {
    border: 1px solid #ddd;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    background: #f9f9f9;
}
.remove-addon {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 2px 8px;
    cursor: pointer;
}
.image-preview-container {
    text-align: center;
    margin-top: 20px;
}

.select-items {
    width: 80%;
}

.select-predefined-items,
.select-edit-predefined-items {
    width: 100% !important;
}

.select-items .select2-container {
    width: 100% !important;
}
.select-items .select2-container--default .select2-selection--single,
.select-items .select2-container--default .select2-selection--multiple {
    height: 43px;
    line-height: 36px;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
}

.select-items
    .select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    padding-left: 12px;
    color: #495057;
    line-height: 31px !important;
}

.select-items.select-predefined-items
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__rendered {
    color: #495057;
    line-height: 31px !important;
}

.select-predefined-items
    .select2-container
    .select2-search--inline
    .select2-search__field {
    height: 100%;
}

.select-items
    .select2-container--default
    .select2-selection--single
    .select2-selection__clear,
.select-items
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__clear {
    display: none;
}

.addon-select-option {
    padding: 8px 12px;
}

.addon-name {
    font-weight: 600;
    color: #333;
}

.addon-price {
    color: #28a745;
    font-weight: 500;
}

.addon-category {
    color: #6c757d;
    font-size: 0.875em;
}

.select-predefined-items
    .select2-container--default
    .select2-selection--multiple
    .select2-selection__choice {
    background-color: #a3a4a5 !important;
}

.select-predefined-items .select2-selection__choice__remove {
    display: none;
}

.predefined-show-section .info-card {
    background: white;
    border-radius: 0.5rem;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.predefined-show-section .info-card h5 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.predefined-show-section .info-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.predefined-show-section .info-item:last-child {
    border-bottom: none;
}

.predefined-show-section .info-label {
    font-weight: 600;
    color: #6c757d;
    min-width: 100px;
    margin-right: 15px;
}

.predefined-show-section .info-value {
    flex: 1;
}

.predefined-show-section .item-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.predefined-show-section .product-info,
.predefined-show-section .addon-info {
    display: flex;
    align-items: center;
}

.predefined-show-section .item-details h6 {
    margin: 0 0 5px 0;
    font-weight: 600;
}

.predefined-show-section .item-details small {
    color: #6c757d;
}

.predefined-show-section .summary-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 0.75rem;
    padding: 25px;
    margin-bottom: 20px;
}

.predefined-show-section .summary-card h5 {
    color: white;
    margin-bottom: 20px;
    font-weight: 600;
}

.predefined-show-section .summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.predefined-show-section .summary-item:last-child {
    border-bottom: none;
}

.predefined-show-section .summary-label {
    font-weight: 500;
    opacity: 0.9;
}

.predefined-show-section .summary-value {
    font-weight: 600;
}

.predefined-show-section .status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.predefined-show-section .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.predefined-show-section .status-dot.active {
    background-color: #28a745;
}

.predefined-show-section .status-dot.inactive {
    background-color: #dc3545;
}

.predefined-show-section .action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.page-predefined-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.table-responsive table {
    min-width: 800px;
}
table tbody tr td:first-child {
    padding-left: 25px !important;
}
/* @media =========
=================== */

@media (max-width: 1200px) {
    .select-items {
        width: 100%;
    }
}

@media (max-width: 1540px) and (min-width: 1200px) {
    .select-items {
        width: 70%;
    }
}

@media (max-width: 980px) {
    .table-responsive-data .dataTables_wrapper .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    div.dataTables_wrapper div.dataTables_filter label {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .page-predefined-actions {
        margin-top: 15px;
        justify-content: flex-start;
    }

    .predefined-show-section .action-buttons {
        justify-content: flex-start;
    }
}

@media (max-width: 600px) {
    .page-header {
        align-items: flex-start;
    }

    .breadcrumb1 .breadcrumb-item1 {
        font-size: 14px;
        line-height: 22px;
    }

    .breadcrumb-item1 + .breadcrumb-item1:before {
        padding-left: 9px;
        padding-right: 9px;
    }

    .btn {
        padding: 8px 15px;
    }

    .breadcrumb1 {
        margin-top: 8px;
    }

    .swal2-container .swal2-popup {
        padding: 20px;
    }

    .ct-btn-w {
        min-width: 79px;
    }

    .card-body {
        padding: 20px;
    }

    .card-header {
        padding: 16px 20px 0 30px;
    }

    .list-product-table table tr td .objectContain,
    .showList-product-img {
        width: 80px;
        height: 60px;
    }

    .product-img-ct {
        width: 100%;
        height: auto;
    }

    .login-card-width {
        padding: 20px;
    }

    .login-card-width .login-title {
        font-size: 31px;
        line-height: 41px;
    }

    .login-card-width .logo-name-text {
        margin: 21px 0;
    }

    .login-card-width .btn-block {
        margin-top: 30px;
    }
}

@media (max-width: 500px) {
    .predefined-show-section .item-image {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================================================
   Select2 Theme & Bootstrap 4 Form Integration
   ========================================================================== */

/* Disable borders and background on the outer container when it has .form-control */
.select2-container.form-control {
    border: none !important;
    padding: 0 !important;
    background: transparent !important;
    height: auto !important;
}

/* Base selection box styling */
.select2-container--default .select2-selection--single {
    height: 43px !important;
    border: 1px solid #d1d1d1 !important;
    border-radius: 6px !important;
    background-color: #fff !important;
    display: flex !important;
    align-items: center !important;
    transition:
        border-color 0.15s ease-in-out,
        box-shadow 0.15s ease-in-out !important;
}

/* Inner rendering styling */
.select2-container--default
    .select2-selection--single
    .select2-selection__rendered {
    color: #495057 !important;
    font-size: 14px !important;
    padding-left: 12px !important;
    padding-right: 30px !important;
    line-height: 36px !important;
}

/* Base style for placeholders */
.select2-container--default
    .select2-selection--single
    .select2-selection__placeholder {
    color: #898787 !important;
}

/* Hide or position clear cross (allowClear option button) */
.select2-container--default
    .select2-selection--single
    .select2-selection__clear {
    margin-right: 15px !important;
    color: #aaa !important;
    font-size: 16px !important;
    line-height: 36px !important;
    float: right !important;
}

/* Arrow position and height styling */
.select2 .selection .select2-selection__rendered {
    width: 100% !important;
    padding: 0;
}
.select2-container--default
    .select2-selection--single
    .select2-selection__arrow {
    display: flex !important;
    height: 43px !important;
    width: 40px !important;
}
.select2-container--default
    .select2-selection--single
    .select2-selection__arrow
    b {
    border-color: #888 transparent transparent transparent !important;
    border-style: solid !important;
    border-width: 5px 4px 0 4px !important;
    margin-left: 0 !important;
    margin-top: 0 !important;
    position: relative !important;
}

.select2-container--default.select2-container--open
    .select2-selection--single
    .select2-selection__arrow
    b {
    border-color: transparent transparent #888 transparent !important;
    border-width: 0 4px 5px 4px !important;
}

/* Highlighted result styling */
.select2-dropdown {
    border: 1px solid #d1d1d1 !important;
    border-radius: 6px !important;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.1),
        0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    z-index: 9999 !important;
}

.select2-container--default
    .select2-results__option--highlighted[aria-selected] {
    background-color: var(--mainColor) !important;
    color: #fff !important;
}

/* Validation (is-invalid state) styling */
.select2-container .select2-selection.is-invalid {
    border-color: #dc3545 !important;
}

.select2-container--default.select2-container--focus
    .select2-selection--single {
    outline: 0 !important;
    height: 43px !important;
}

/* Fix for skewed/rotated DataTable parent rows when expanded */
table.dataTable tr.parent {
    -webkit-animation: none !important;
    animation: none !important;
    transform: none !important;
    transform-origin: initial !important;
}

/* Disable all transitions and animations on DataTables elements */
.dataTable,
.dataTable *,
.dataTables_processing {
    -webkit-transition: none !important;
    transition: none !important;
    -webkit-animation: none !important;
    animation: none !important;
}

/* Custom Pill Toggle Switches (from PocketProp / Pizza) */
.custom-toggle-pill {
    position: relative;
    display: inline-block;
    width: 66px;
    height: 26px;
    margin-bottom: 0;
    vertical-align: middle;
}

.custom-toggle-pill input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    border: 1.5px solid #d3d7de;
    transition: 0.3s;
    border-radius: 20px;
    box-sizing: border-box;
}

.toggle-knob {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ced4da;
    transition: 0.3s;
    border-radius: 50%;
    z-index: 2;
}

.toggle-text-active,
.toggle-text-inactive {
    position: absolute;
    font-size: 12px;
    font-weight: 700;
    font-family: sans-serif;
    user-select: none;
    transition: opacity 0.2s;
    line-height: 1;
    letter-spacing: -0.5px;
}

.toggle-text-active {
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #3870ff;
    opacity: 0;
}

.toggle-text-inactive {
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    opacity: 1;
}

/* Checked State Styles */
.custom-toggle-pill input:checked + .toggle-slider {
    background-color: #fff;
    border-color: #3870ff;
}

.custom-toggle-pill input:checked + .toggle-slider .toggle-knob {
    transform: translate(43px, -50%);
    background-color: #3870ff;
}

.custom-toggle-pill input:checked + .toggle-slider .toggle-text-active {
    opacity: 1;
}

.custom-toggle-pill input:checked + .toggle-slider .toggle-text-inactive {
    opacity: 0;
}

/* Disabled/loading state */
.custom-toggle-pill input:disabled + .toggle-slider {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Action Icons Styling */
.action-btns1 {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.2s;
}
.action-btns1:hover {
    background-color: #f1f5f9;
}

/* ========================================================
   Global Scrollable DataTable & Container Styles
   ======================================================== */
.card-body,
.tab-pane,
.tab-content {
    overflow-x: hidden !important;
}

.table-responsive-data {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 8px;
}

.table-responsive-data table,
div.dataTables_wrapper table.dataTable {
    width: 100% !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
}

div.dataTables_wrapper {
    width: 100%;
    overflow-x: hidden !important;
}

div.dataTables_wrapper > .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

div.dataTables_wrapper div.dataTables_filter {
    text-align: right;
    margin-bottom: 14px;
}

div.dataTables_wrapper div.dataTables_filter label {
    margin-bottom: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #64748b;
}

div.dataTables_wrapper div.dataTables_filter input {
    border-radius: 20px;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background-color: #ffffff;
    padding: 6px 14px;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

div.dataTables_wrapper div.dataTables_filter input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(217, 93, 101, 0.15);
}

div.dataTables_wrapper div.dataTables_length label {
    font-weight: 500;
    color: #64748b;
    font-size: 13px;
}

div.dataTables_wrapper div.dataTables_length select {
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    padding: 4px 8px;
    font-size: 13px;
}

/* ==========================================================================
   UNIFIED ADMIN KPI CARDS & COMPONENT SYSTEM (CSS Grid + CSS Variables)
   ========================================================================== */

/* 1. Responsive KPI Grid System */
.kpi-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    width: 100%;
}

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

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

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

@media (max-width: 1399px) {
    .kpi-grid-6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .kpi-grid-5 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .kpi-grid-6,
    .kpi-grid-5,
    .kpi-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .kpi-grid-6,
    .kpi-grid-5,
    .kpi-grid-4 {
        grid-template-columns: 1fr;
    }
}

/* 2. Universal KPI Stat Card */
.kpi-card {
    background: #fff;
    border: 1px solid var(--kpi-card-border);
    border-radius: var(--kpi-card-radius);
    box-shadow: var(--kpi-card-shadow);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 84px;
    height: 100%;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--kpi-card-shadow-hover);
}

.kpi-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--kpi-title-color);
    margin-bottom: 6px;
    text-transform: capitalize;
    letter-spacing: 0.1px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--kpi-value-color);
    margin: 0;
    line-height: 1.2;
}

.kpi-subtext-danger {
    color: var(--kpi-red-color);
    font-size: 11.5px;
    font-weight: 600;
    background: var(--kpi-red-bg);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    white-space: nowrap;
}

.kpi-subtext,
.kpi-subtext-muted {
    font-size: 11.5px;
    color: var(--kpi-subtext-color);
    margin-top: 2px;
    font-weight: 500;
}

/* 3. Color-Coded KPI Icon Circles */
.kpi-icon,
.kpi-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.kpi-icon-blue,
.icon-bg-blue,
.icon-indigo,
.icon-blue {
    background: var(--kpi-blue-bg) !important;
    color: var(--kpi-blue-color) !important;
}
.kpi-icon-green,
.icon-bg-green,
.icon-green,
.icon-olive {
    background: var(--kpi-green-bg) !important;
    color: var(--kpi-green-color) !important;
}
.kpi-icon-amber,
.icon-bg-amber,
.icon-amber {
    background: var(--kpi-amber-bg) !important;
    color: var(--kpi-amber-color) !important;
}
.kpi-icon-purple,
.icon-bg-purple,
.icon-purple {
    background: var(--kpi-purple-bg) !important;
    color: var(--kpi-purple-color) !important;
}
.kpi-icon-red,
.icon-bg-red,
.icon-red {
    background: var(--kpi-red-bg) !important;
    color: var(--kpi-red-color) !important;
}
.icon-bg-teal,
.icon-teal {
    background: var(--kpi-teal-bg) !important;
    color: var(--kpi-teal-color) !important;
}
.icon-bg-pink,
.icon-pink {
    background: var(--kpi-pink-bg) !important;
    color: var(--kpi-pink-color) !important;
}
.icon-slate {
    background: var(--kpi-slate-bg) !important;
    color: var(--kpi-slate-color) !important;
}

/* 3. Universal Filter Select Toolbar */
.filter-select {
    height: 38px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    background-color: #ffffff;
    padding: 6px 12px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.filter-select:focus {
    border-color: #8b7fe8;
    box-shadow: 0 0 0 2px rgba(139, 127, 232, 0.15);
}

/* 4. Filter Pills Bar (For Analytics & Date Ranges) */
.filter-pills-group {
    display: inline-flex;
    align-items: center;
    background: var(--surface-card);
    border: 1px solid var(--surface-border);
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.filter-pill-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

.filter-pill-btn:hover {
    color: var(--kpi-blue-color);
    background: var(--kpi-blue-bg);
}

.filter-pill-btn.active {
    background: #818cf8 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(129, 140, 248, 0.35);
}

/* 5. Custom Datepicker Input Trigger */
.custom-datepicker-wrapper {
    position: relative;
    display: inline-block;
}

.custom-datepicker-input {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 14px 8px 34px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    height: 38px;
    width: 190px;
    outline: none;
    transition: all 0.15s ease-in-out;
}

.custom-datepicker-input:hover,
.custom-datepicker-input:focus {
    border-color: #818cf8;
    box-shadow: 0 0 0 2px rgba(129, 140, 248, 0.15);
}

/* 6. Standard Pill Status Badges */
.badge-status-completed,
.badge-status-active,
.badge-status-approved,
.badge-status-paid {
    background: #d1fae5;
    color: #065f46;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
}

.badge-status-pending,
.badge-status-in_review {
    background: #fef3c7;
    color: #92400e;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
}

.badge-status-rejected,
.badge-status-failed,
.badge-status-suspended,
.badge-status-cancelled {
    background: #fee2e2;
    color: #991b1b;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
}

.badge-status-inactive,
.badge-status-closed {
    background: #f1f5f9;
    color: #475569;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    display: inline-block;
}

/* 7. Action Button Outlines */
.btn-action-reject {
    border: 1px solid #fca5a5 !important;
    color: #dc2626 !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out;
}

.btn-action-reject:hover {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #b91c1c !important;
}

.btn-action-accept {
    border: 1px solid #86efac !important;
    color: #16a34a !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.15s ease-in-out;
}

.btn-action-accept:hover {
    background: #f0fdf4 !important;
    border-color: #22c55e !important;
    color: #15803d !important;
}

/* ==========================================================================
   Header Dropdown Cards & Positioning (No Inline Styles)
   ========================================================================== */
.header-notify,
.profile-dropdown {
    position: relative !important;
}

.header-dropdown-card {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    margin-top: 10px !important;
    margin-right: 0 !important;
    border-radius: 16px !important;
    border: 1px solid var(--borderColor, #e5e7eb) !important;
    box-shadow:
        0 10px 30px -5px rgba(0, 0, 0, 0.08),
        0 4px 12px -2px rgba(0, 0, 0, 0.04) !important;
    background: #ffffff !important;
    z-index: 1050 !important;
    overflow: hidden !important;
    transform: none !important;
}

.header-notif-dropdown {
    min-width: 320px;
    max-width: 350px;
    width: 340px;
}

.header-profile-dropdown {
    min-width: 220px;
}

.notif-badge-pulse {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #ef4444;
    border: 2px solid #ffffff;
    display: inline-block;
}

.notif-header-title {
    font-size: 15px;
}

.notif-badge-text {
    font-size: 11px;
}

.notification-list-scroll {
    max-height: 280px;
    overflow-y: auto;
}

.admin-notif-item {
    transition: background 0.15s ease;
}

.admin-notif-item .notif-icon-circle {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

.admin-notif-item .notif-item-title {
    font-size: 13.5px;
}

.admin-notif-item .notif-item-time {
    font-size: 11px;
    margin-top: 2px;
}

.opacity-40 {
    opacity: 0.4;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-header-box {
    border-radius: 12px;
}

.profile-user-name {
    font-size: 15px;
    line-height: 1.3;
}

.profile-user-role {
    font-size: 12.5px;
}

.profile-dropdown-item {
    border-radius: 8px;
    transition: background 0.15s ease;
}

.header-dropdown-card .dropdown-item:hover,
.header-dropdown-card .dropdown-item:focus {
    background-color: #706ea31f !important;
    color: var(--primaryText, #706ea3) !important;
}

.dropdown-menu-arrow.dropdown-menu-right:before {
    border-bottom-color: var(--borderColor, #e5e7eb) !important;
    right: 14px !important;
    left: auto !important;
}

.dropdown-menu-arrow.dropdown-menu-right:after {
    border-bottom-color: #ffffff !important;
    right: 15px !important;
    left: auto !important;
}

@media (max-width: 500px) {
    .header-notif-dropdown {
        min-width: 300px;
        max-width: 300px;
        width: 300px;
    }
    .header-dropdown-card {
        right: -56px !important;
    }
    .profile-dropdown .header-profile-dropdown {
        right: 0 !important;
    }
}
