@import url("https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200..1000;1,200..1000&display=swap");

@font-face {
  font-family: "SFProDisplay";
  src: url("../fonts/SFProDisplay-Bold.woff2") format("woff2"),
    url("../fonts/SFProDisplay-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SFProDisplay";
  src: url("../fonts/SFProDisplay-Regular.woff2") format("woff2"),
    url("../fonts/SFProDisplay-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SFProDisplay";
  src: url("../fonts/SFProDisplay-Medium.woff2") format("woff2"),
    url("../fonts/SFProDisplay-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

html {
  font-size: 13px;
}

body {
  font-family: "SFProDisplay", sans-serif;
  background: transparent;
  position: relative;
  overflow: hidden;
}

#app {
  padding: 45px 10px 10px 10px;
  background-image: linear-gradient(100deg, #1e55d1 0%, #ac8edd 100%);
}

[class*="ag-theme-"] {
  font-family: "SFProDisplay", sans-serif !important;
}

/* Pinned bottom row - TỔNG CỘNG */
.ag-floating-bottom {
  font-weight: bold !important;
  background-color: #ffffff !important;
  border-top: 2px solid #dee2e6 !important;
}

.ag-floating-bottom .ag-row {
  background-color: #ffffff !important;
}

.ag-floating-bottom .ag-cell {
  font-weight: 600 !important;
  color: #212529 !important;
  background-color: #ffffff !important;
}

/* Currency Filter Dropdown */
#currencyFilter {
  width: auto;
  min-width: unset;
  padding: 2px 20px 2px 6px !important;
}

.ag-watermark {
  display: none !important;
}

#contextMenu,
#contextMenuCategory,
#contextMenuPhoi,
#contextMenuWhatsApp,
#contextMenuInsta {
  background-color: #fff;
  z-index: 9999999 !important;
  position: fixed;
}

#contextMenu:not(.open) {
  top: -999px;
  left: -999px;
}

#contextMenuCategory:not(.open),
#contextMenuPhoi:not(.open),
#contextMenuWhatsApp:not(.open),
#contextMenuInsta:not(.open) {
  display: none;
}

.account-wrapper {
  width: calc(100% - 350px);
  height: calc(100vh - 55px);
}

#app:not([data="clone"]) #accounts {
  overflow: hidden;
  padding-right: 350px;
}

#accounts .ag-ltr .ag-cell {
  padding: 10px;
}

.app-wrapper {
  background: #fff;
}

#userInfo a {
  position: absolute;
  top: 0;
  right: 0;
}

#panel {
  width: 370px;
  position: absolute;
  top: 40px;
  right: 10px;
  bottom: 10px;
}

#adPanel {
  width: 350px;
  position: absolute;
  background: #fff;
  top: 105px;
  height: calc(100% - 157px);
  right: 10px;
}

#app[data="via"] #adPanel {
  height: calc(100% - 115px) !important;
}

.folded #adPanel {
  width: 0px !important;
  margin-left: 0 !important;
}

#adPanel #foldButton .ri-arrow-drop-left-line,
.folded #adPanel #foldButton .ri-arrow-drop-right-line {
  display: none;
}

.folded #adPanel #foldButton .ri-arrow-drop-left-line {
  display: block;
}

#viaPanel {
  padding-right: 350px !important;
}

.folded #viaPanel {
  padding-right: 0 !important;
}

#foldButton {
  position: absolute;
  width: 23px;
  height: 40px;
  background: #fff;
  right: 349px;
  top: 50%;
  margin-top: -20px;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  font-size: 30px;
  line-height: 40px;
  text-align: left;
  cursor: pointer;
  z-index: 99;
}

.folded #adPanel #foldButton {
  right: -10px;
}

.folded #app:not([data="clone"]) #accounts {
  padding-right: 0;
}

#header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  color: #fff;
  padding: 0 10px;
  height: 40px;
}

.header-top a:hover {
  background: #0000003b;
}

.header-top {
  height: 45px;
}
.header-bottom {
  height: 40px;
  background: rgb(0 0 0 / 10%);
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
  width: calc(100vw - 400px);
}

#header .titleBarButtons button {
  border: 0;
  background: transparent;
  border-radius: 5px;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-left: 8px;
  cursor: pointer;
  -webkit-app-region: no-drag;
  font-size: 16px;
}

.ag-root-wrapper.ag-layout-normal {
  border: 0 !important;
}

/* .nav-tabs {
    background-color: #f5f7f7;
}

.nav-link.active {
    border-top-color: transparent!important;
}

.nav-item:first-child .nav-link.active {
    border-left: 0!important;
} */

.ag-header-cell:last-child:after {
  display: none;
}

/* .ag-header-cell .ag-header-cell-text:before {
    font-family: 'remixicon' !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin-right: 5px;
}

.ag-header-cell[col-id="account"] .ag-header-cell-text:before {
    content: '\f264'
}

.ag-header-cell[col-id="email"] .ag-header-cell-text:before {
    content: '\eef6'
}

.ag-header-cell[col-id="passMail"] .ag-header-cell-text:before {
    content: '\eef8'
}

.ag-header-cell[col-id="cookies"] .ag-header-cell-text:before {
    content: '\ec16'
} */

#contextMenu {
  background-color: #fff;
  z-index: 9999999999999 !important;
  position: fixed;
}

#contextMenu:not(.open) {
  top: -999px;
  left: -999px;
}

.form-switch.form-switch-md {
  margin-bottom: 0.75rem; /* JUST FOR STYLING PURPOSE */
}

.form-switch.form-switch-md .form-check-input {
  height: 1.25rem;
  width: calc(2rem + 0.5rem);
  border-radius: 3rem;
  margin-top: 0;
}

.control-btn {
  padding: 0 20px 0 10px;
  display: flex;
  align-items: center;
  font-weight: 700;
}

.control-btn i {
  width: 23px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 18px;
  font-weight: 400;
  background: none !important;
  background-color: transparent !important;
  border-radius: 0 !important;
}

#checkingScreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#category {
  white-space: nowrap;
  font-size: 0;
  padding: 0 5px;
}

.cat-item:not(.active):before {
  content: "";
  left: -1px;
  position: absolute;
  top: 10px;
  width: 1px;
  bottom: 10px;
  background: rgb(255 255 255 / 24%);
}

.cat-item.active:after,
.cat-item.active:before,
.tool-item.active:after,
.tool-item.active:before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="4.894" height="4.91" viewBox="0 0 4.894 4.91"><path id="Path_1" data-name="Path 1" d="M4.895,5H0V.09A5.045,5.045,0,0,0,4.895,5Z" transform="translate(-0.001 -0.09)" fill="%23fff"/></svg>');
  bottom: 0;
  right: -5px;
  top: inherit;
}

.cat-item.active:before,
.tool-item.active:before {
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="5" height="5" viewBox="0 0 5 5"><defs><clipPath id="clip-Web_1920_1"><rect width="5" height="5"/></clipPath></defs><g id="Web_1920_1" data-name="Web 1920 Ã¢â‚¬â€œ 1" clip-path="url(%23clip-Web_1920_1)"><path id="Path_1" data-name="Path 1" d="M0,5H4.895V.09A5.045,5.045,0,0,1,0,5Z" transform="translate(0.105 0)" fill="%23fff"/></g></svg>');
  right: inherit;
  left: -5px;
}

.cat-item,
.tool-item,
#addCategory {
  border: 0;
  padding: 10px 20px;
  font-weight: 700;
  color: #fff;
  height: 40px;
  display: inline-block;
  background: transparent;
  font-size: 1rem;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  position: relative;
}

.cat-item.active,
.tool-item.active {
  color: #666;
  background: #fff;
}

.cat-item:not(.active):hover,
.tool-item:not(.active):hover {
  background: rgb(0 0 0 / 12%);
}

.tool-item.active:first-child:before {
  left: 0px;
  bottom: -3px;
  background: #fff;
}

.tool-item.active:last-child:after {
  right: 0px;
  bottom: -3px;
  background: #fff;
}

.category-nav-wrapper {
  position: relative;
}

/* .category-nav-wrapper:before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: -30px;
  width: 30px;
  background: linear-gradient(to right, #ff000000 0%,#0000001f 100%);
} */

button.category-nav {
  background: transparent;
  color: #fff;
}

button.category-nav:disabled {
  opacity: 0.5;
}

#addCategory {
  background: transparent;
}

#logs {
  height: 400px;
  overflow-y: auto;
}

.log-item {
  display: flex;
}

.log-item label {
  width: 100%;
  display: block;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
}

.log-item input:checked + label {
  background-color: #0d6efd;
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
  padding: 10px;
}

::-webkit-scrollbar-track-piece {
  background: #fff;
}

::-webkit-scrollbar-thumb {
  background: #c2c2c2;
  border-radius: 5px;
}

.phoiItem {
  position: relative;
  cursor: pointer;
}

.phoiItem.active {
  background-color: #f5f5f5;
}

.phoiItem.active i {
  display: block;
}

.phoiItem i {
  display: none;
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 1;
}

.modal-backdrop,
.modal {
  /* top: 40px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  width: inherit;
  height: inherit;
  background: transparent; */
}

#regModal .modal-dialog {
  max-width: calc(100% - 100px) !important;
}

.swal2-backdrop-show {
  background-color: transparent !important;
}

.swal2-popup {
  box-shadow: 0 0.3rem 1rem rgba(0, 0, 0, 0.15) !important;
  border: 1px solid #e2e2e2;
  padding: 10px 12px !important;
  border-radius: 22px !important;
}

.swal2-popup .swal2-title {
  padding: 0 0 8px 0 !important;
  margin: 0 !important;
}

.swal2-popup .swal2-html-container {
  padding: 0 !important;
  margin: 0 !important;
}

.swal2-popup .swal2-html-container input[type="radio"],
.swal2-popup .swal2-html-container input[type="checkbox"] {
  width: 16px !important;
  height: 16px !important;
  float: right !important;
  margin-left: auto !important;
  margin-right: -5px !important;
}

.swal2-popup .swal2-html-container label {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.swal2-popup .swal2-actions {
  margin: 8px 0 0 0 !important;
  padding: 0 !important;
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu:hover .dropdown-menu {
  display: block;
}

.dropdown-submenu .dropdown-menu {
  display: none;
  bottom: -50px;
  position: absolute;
  left: calc(100% - 25px);
  margin-top: -1px;
  z-index: 99999999;
}

.checkbox-lg .form-check-input {
  top: 0.8rem;
  scale: 1.4;
  margin-right: 0.7rem;
}

.checkbox-lg .form-check-label {
  padding-top: 13px;
}

#menuButton {
  position: absolute;
  background: #fff;
  z-index: 99;
  width: 30px;
  height: 50px;
  top: 50%;
  margin-top: -25px;
  border: 0;
  right: 370px;
  padding: 0;
  border-top-left-radius: 7px;
  border-bottom-left-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: -5px 0 5px 0 rgb(0 0 0 / 9%);
  font-size: 20px;
}

.ri-arrow-left-s-line {
  display: none;
}

body.hideMenu #panel {
  width: 0;
}

body.hideMenu #menuButton .ri-arrow-right-s-line {
  display: none;
}

body.hideMenu #menuButton .ri-arrow-left-s-line {
  display: block;
}

body.hideMenu #menuButton {
  right: 0;
}

body.hideMenu .account-wrapper,
body.hideMenu .header-bottom {
  width: calc(100vw - 20px);
}

.saveLogStatus .spinner-border {
  display: none;
}

.saveLogStatus.running .spinner-border {
  display: block;
}

#loadingScreen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999999;
  background: #ffffff7a;
}

.swal2-actions.swal2-loading {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ffffffc7;
  z-index: 999;
}

.loader {
  width: 80px;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 8px solid #e8e6ff;
  border-right-color: #2a5ad2;
  animation: l2 1s infinite linear;
}

@keyframes l2 {
  to {
    transform: rotate(1turn);
  }
}

.moreCard {
  position: absolute;
  min-width: 100px;
  z-index: 999;
  background: #fff;
  line-height: initial;
}
.cardItem:not(:last-child) {
  margin-bottom: 10px;
}

#adSelect .select2-container .select2-selection--single {
  height: inherit;
  border: 0;
  box-shadow: none !important;
  outline: none !important;
}

#adSelect
  .select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  top: 3px;
}

#adSelect
  .select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  padding-left: 0;
}

.select2-container .select2-selection--single {
  height: 33px;
  border: var(--bs-border-width) solid var(--bs-border-color);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
  border-radius: var(--bs-border-radius);
}
.select2-container--default
  .select2-selection--single
  .select2-selection__rendered {
  line-height: 33px;
}
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  top: 4px;
}
.select2-container--open .select2-dropdown {
  border: var(--bs-border-width) solid var(--bs-border-color);
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}
.select2-search--dropdown .select2-search__field {
  border: var(--bs-border-width) solid var(--bs-border-color);
  outline: none;
}
.select2-container--default .select2-results__option--selected {
  background-color: transparent;
}
.select2-container {
  width: 100% !important;
}

.phoiItem {
  position: relative;
  cursor: pointer;
}

.phoiItem.active {
  background-color: #f5f5f5;
}

.phoiItem.active i {
  display: block;
}

.phoiItem i {
  display: none;
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 1;
}

.avatar-letter {
  width: 30px;
  min-width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100%;
  color: #00000057;
  font-weight: 900;
  font-size: 16px;
  font-family: "Nunito", serif;
  line-height: 30px;
  flex-shrink: 0;
}

.avatar-letter:after {
  content: attr(data-letter);
}

.avatar-letter[data-letter="0"] {
  background-color: #6c757d;
}
.avatar-letter[data-letter="A"],
.avatar-letter[data-letter="1"] {
  background-color: #e25f50;
}
.avatar-letter[data-letter="B"],
.avatar-letter[data-letter="2"] {
  background-color: #f25e90;
}
.avatar-letter[data-letter="C"],
.avatar-letter[data-letter="3"] {
  background-color: #bc67cb;
}
.avatar-letter[data-letter="D"],
.avatar-letter[data-letter="4"] {
  background-color: #9672cf;
}
.avatar-letter[data-letter="E"],
.avatar-letter[data-letter="5"] {
  background-color: #7984ce;
}
.avatar-letter[data-letter="F"],
.avatar-letter[data-letter="6"] {
  background-color: #5c96fa;
}
.avatar-letter[data-letter="G"],
.avatar-letter[data-letter="7"] {
  background-color: #7bdeeb;
}
.avatar-letter[data-letter="H"],
.avatar-letter[data-letter="8"] {
  background-color: #45d0e2;
}
.avatar-letter[data-letter="I"],
.avatar-letter[data-letter="9"] {
  background-color: #48b7ad;
}
.avatar-letter[data-letter="J"] {
  background-color: #52bc89;
}
.avatar-letter[data-letter="K"] {
  background-color: #9ace5f;
}
.avatar-letter[data-letter="L"] {
  background-color: #d4e34a;
}
.avatar-letter[data-letter="M"] {
  background-color: #f9d715;
}
.avatar-letter[data-letter="N"] {
  background-color: #fac400;
}
.avatar-letter[data-letter="O"] {
  background-color: #ffaa00;
}
.avatar-letter[data-letter="P"] {
  background-color: #ff8b61;
}
.avatar-letter[data-letter="Q"] {
  background-color: #c2c2c2;
}
.avatar-letter[data-letter="R"] {
  background-color: #8ea3af;
}
.avatar-letter[data-letter="S"] {
  background-color: #a1877d;
}
.avatar-letter[data-letter="T"] {
  background-color: #a3a3a3;
}
.avatar-letter[data-letter="U"] {
  background-color: #b0b6e3;
}
.avatar-letter[data-letter="V"] {
  background-color: #b49cde;
}
.avatar-letter[data-letter="W"] {
  background-color: #c2c2c2;
}
.avatar-letter[data-letter="X"] {
  background-color: #7bdeeb;
}
.avatar-letter[data-letter="Y"] {
  background-color: #bcaaa4;
}
.avatar-letter[data-letter="Z"] {
  background-color: #aed77f;
}

input[name="delay"]::-webkit-inner-spin-button,
input[name="delay"]::-webkit-outer-spin-button,
input[name="limit"]::-webkit-inner-spin-button,
input[name="limit"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.swal2-container {
  background: #00000057 !important;
}

[data-bs-theme="dark"] .dark-bg {
  background: #2f333d !important;
}

[data-bs-theme="dark"] .dark-border-0 {
  border: 0 !important;
}

[data-bs-theme="dark"] .dark-border {
  border-color: #49505780 !important;
}

[data-bs-theme="dark"] .dark-link {
  color: var(--bs-body-color) !important;
}

[data-bs-theme="dark"] .dark-body-bg {
  background: var(--bs-body-bg) !important;
}

[data-bs-theme="dark"] {
  --bs-body-bg: #272b34;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-track-piece {
  background: #2f333d;
}

[data-bs-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #ffffff0f;
}

/* ========================================
   CUSTOM CHECKBOX STYLES
   ======================================== */

/* Custom tất cả checkbox (không phải switch) với màu #6366f1 */
.form-check:not(.form-switch) .form-check-input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid #d1d5db;
  background-color: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-check:not(.form-switch) .form-check-input[type="checkbox"]:hover {
  border-color: #6366f1;
}

.form-check:not(.form-switch) .form-check-input[type="checkbox"]:checked {
  background-color: #6366f1;
  border-color: #6366f1;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
  background-size: 14px;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.4);
}

.form-check:not(.form-switch) .form-check-input[type="checkbox"]:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* Custom checkbox với label component */
.custom-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  margin-bottom: 8px;
}

.custom-checkbox:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.custom-checkbox input[type="checkbox"] {
  display: none;
}

.custom-checkbox .checkbox-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  transition: all 0.2s ease;
  background: #fff;
  flex-shrink: 0;
}

.custom-checkbox .checkbox-icon i {
  font-size: 14px;
  color: transparent;
  transition: all 0.2s ease;
}

.custom-checkbox input[type="checkbox"]:checked + .checkbox-icon {
  background: #84cc16;
  border-color: #84cc16;
  box-shadow: 0 2px 8px rgba(132, 204, 22, 0.4);
}

.custom-checkbox input[type="checkbox"]:checked + .checkbox-icon i {
  color: #fff;
}

.custom-checkbox .checkbox-label {
  font-weight: 500;
  flex-grow: 1;
}

/* Dark mode */
[data-bs-theme="dark"]
  .form-check:not(.form-switch)
  .form-check-input[type="checkbox"] {
  background-color: #2f333d;
  border-color: #6c757d;
}

[data-bs-theme="dark"]
  .form-check:not(.form-switch)
  .form-check-input[type="checkbox"]:checked {
  background-color: #84cc16;
  border-color: #84cc16;
}

[data-bs-theme="dark"] .custom-checkbox {
  background: #343a40;
  border-color: #495057;
}

[data-bs-theme="dark"] .custom-checkbox:hover {
  background: #3d444b;
  border-color: #6c757d;
}

[data-bs-theme="dark"] .custom-checkbox .checkbox-icon {
  background: #2f333d;
  border-color: #6c757d;
}

/* Skeleton loading animation cho các ô đang chờ dữ liệu */
.cell-loading {
  background: #f0f0f0;
  animation: pulse 1.2s infinite ease-in-out;
  border-radius: 4px;
  min-height: 16px;
}

@keyframes pulse {
  0%,
  100% {
    background: #e8e8e8;
  }
  50% {
    background: #f8f8f8;
  }
}

/* Placeholder text cho skeleton */
.cell-loading-placeholder {
  display: inline-block;
  width: 70%;
  height: 16px;
  background: #e0e0e0;
  animation: pulse 1.2s infinite ease-in-out;
  border-radius: 4px;
}
