:root {
  --blue: #007bff;
  --indigo: #6610f2;
  --purple: #6f42c1;
  --pink: #e83e8c;
  --red: #dc3545;
  --orange: #fd7e14;
  --yellow: #ffc107;
  --green: #28a745;
  --teal: #20c997;
  --cyan: #17a2b8;
  --white: #fff;
  --gray: #6c757d;
  --gray-dark: #343a40;
  --primary: #8b27eb;
  --secondary: #aa66f4;
  --success: #00e5a0;
  --info: #18c7f5;
  --warning: #ffd54f;
  --danger: #e5399e;
  --light: #f3e5ff;
  --dark: #2a006a;
  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --font-family-sans-serif: "Raleway", sans-serif;
  --font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --background-primary: #e8ebf2;
}

.btn-close {
  color: #212529;
  background: #f3e5ff linear-gradient(180deg, #f5e9ff, #f3e5ff) repeat-x;
  border-color: #f3e5ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 1px 1px rgba(0, 0, 0, 0.075);

  width: 30px;
  height: 30px;

  padding: 0;
  margin: 0;
  border-radius: 50%;
  font-weight: 500;
}
.btn-close:hover {
  color: #212529;
  background: #e1bfff linear-gradient(180deg, #e6c8ff, #e1bfff) repeat-x;
  border-color: #dbb2ff;
}
.btn-close:focus,
.btn-close.focus {
  color: #212529;
  background: #e1bfff linear-gradient(180deg, #e6c8ff, #e1bfff) repeat-x;
  border-color: #dbb2ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 1px 1px rgba(0, 0, 0, 0.075), 0 0 0 0.2rem rgba(212, 200, 223, 0.5);
}
.btn-close.disabled,
.btn-close:disabled {
  color: #212529;
  background-color: #f3e5ff;
  border-color: #f3e5ff;
  background-image: none;
}
.btn-close:not(:disabled):not(.disabled):active,
.btn-close:not(:disabled):not(.disabled).active,
.show > .btn-close.dropdown-toggle {
  color: #212529;
  background-color: #dbb2ff;
  background-image: none;
  border-color: #d6a5ff;
}
.btn-close:not(:disabled):not(.disabled):active:focus,
.btn-close:not(:disabled):not(.disabled).active:focus,
.show > .btn-close.dropdown-toggle:focus {
  box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125),
    0 0 0 0.2rem rgba(212, 200, 223, 0.5);
}

.sidebar-container {
  background: linear-gradient(235deg, var(--primary), rgba(170, 102, 244, 0.6));
  background: linear-gradient(180deg, #2c2c54, #4b3b75);
  background: #2e2e48;
  color: rgba(255, 255, 255, 0.85);
}

.sidebar-container.active {
  display: block !important;
}

.sidebar {
  display: block;
}

.sidebar-header {
  margin: 0;
  padding: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);

  background-color: var(--secondary);
}

.sidebar img.avatar,
.sidebar i.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 0 4px var(--primary);
  cursor: pointer;
}

.btn-upgrade {
  background: rgb(255 175 202 / 80%);
  border: 0px;
  color: #333;

  transition: color 0.3s ease, background-color 0.3s ease;
}

a.btn-upgrade,
.sidebar a.btn-upgrade {
  color: var(--primary);
  font-weight: 800;
}

a.btn-upgrade:hover,
.sidebar a.btn-upgrade:hover {
  background: var(--primary);
  color: #ffffff;
  font-weight: 500;
}

.icon-upgrade {
  animation: upDown 1s ease-in-out infinite;
  display: inline-block; /* cần để transform hoạt động đúng */
}

@keyframes upDown {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px); /* di chuyển lên */
  }
}

.sidebar i.avatar:hover {
  box-shadow: 0 0 2px var(--primary), 0 0 4px var(--primary),
    0 0 8px var(--primary);
  transition: box-shadow 0.3s ease;
}

.sidebar-border {
  padding-top: 8px;
}

.sidebar a {
  color: var(--light);
  color: #e0e0e0;

  display: block;
  line-height: 30px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;

  padding: 8px 16px 8px 16px;
  transition: color 0.3s ease, background-color 0.3s ease;
}

.sidebar a:hover {
  background-color: var(--secondary);
  color: #ffffff;
  font-weight: 500;
}

.sidebar a i {
  margin-right: 8px;
}

.sidebar .menu .item {
  display: block;
  line-height: 2rem;
}

.sidebar .menu .item .sub-item {
  display: block;
  line-height: 2rem;
  padding-left: 2.5rem;
}

.sidebar .menu .sub-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar .menu .dropdown {
  margin-left: 0.75rem;
}

.content {
  padding: 8px;
}

header {
  display: flex;
  flex-direction: row;
  align-items: center;

  padding: 16px;
  background-color: var(--background-primary);
}

.sidebar-toggler {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;
  border-radius: 4px;

  cursor: pointer;
  background-color: #eee2ff;
  border: 1px solid #dccfef;
  color: rgb(94, 53, 177);
  opacity: 0.8;

  transform: scale(1);
  transition: opacity 0.3s ease, transform 0.3s ease;

  margin-right: 16px;
}

.sidebar-toggler.hiding {
  opacity: 0;
  transform: scale(0.8);
}

.sidebar-toggler.hidden {
  display: none;
}

div.sidebar-toggler:hover {
  color: rgb(237, 231, 246);
  background: #5e35b1;
}

a.logo {
  text-decoration: none;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo-main {
  font-weight: 800;
  font-size: 1.5rem;
  color: var(--secondary);
  transition: color 0.3s ease;
}

.logo-sub {
  margin-left: 8px;
  font-size: 1.2rem;
  font-weight: 500;
  color: #555;
  transition: color 0.3s ease;
}

.logo:hover .logo-main {
  color: var(--primary);
}

.logo:hover .logo-sub {
  color: #000;
}

div.wrapper {
  height: 100vh;
}

footer {
  padding: 16px;
  text-align: center;
  width: 100%;
}

.container.auth {
  margin-top: 4rem;
}

.chart-view {
  width: 100%;
  height: 100%;
}

@media screen and (max-width: 768px) {
  .sidebar-container {
    display: none;
  }
  .sidebar-container.show {
    display: block;
  }
  .sidebar-toggler.hidden {
    display: flex;
  }

  .chart-view {
    border-right: 0px !important;
    width: 100vw;
    height: calc(100vh - 95px);
  }

  .chart-view iframe {
    height: 100% !important;
  }

  #tab {
    background-color: white;
    opacity: 1;
    position: absolute;
    top: calc(100vh - 95px);
    left: 0;
    width: 100vw;
    height: 38px;
    border-left: 0px !important;
    border-top: 1px solid #ccc;
    padding: 0px !important;
  }

  #tab div.nav.flex-column {
    flex-direction: row !important;
    justify-content: space-evenly;
    align-items: center;
    width: 100%;
  }

  #tab .nav-link {
    writing-mode: unset;
    width: 33%;
    border-radius: 0;
  }


  #tab-pages .content-wrapper {
    overflow-y: scroll;
  }

  .tab-container {
    position: absolute;
    width: 100vw;
    height: calc(100vh - 95px);
    max-height: calc(100vh - 95px);
    min-width: unset;
    background-color: white;    
    overflow-y: scroll;
  }
}
