@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --primary-color: #38b6ff;
  --primary-dark: #2281b8;
  --primary-light: #55c5ff;
  --accent-color: #f72d8d;
  --bg-primary: #0a0e27;
  --bg-secondary: #131829;
  --bg-tertiary: #1a1f3a;
  --text-primary: #ffffff;
  --text-secondary: #b0b5c8;
  --border-color: #252d47;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'IBM Plex Sans', sans-serif;
}

/* ========== TOPBAR ========== */
#page-topbar {
  position: fixed;
  top: 0;
  right: 0;
  left: 250px;
  z-index: 1002;
  background-color: var(--bg-secondary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid var(--border-color);
}

.navbar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  height: 70px;
  padding: 0 calc(1.25rem / 2) 0 0;
}

.navbar-header .dropdown .show.header-item {
  background-color: rgba(56, 182, 255, 0.1);
}

body[data-sidebar-size="sm"] #page-topbar {
  left: 70px;
}

/* ========== NAVBAR BRAND ========== */
.navbar-brand-box {
  padding: 0 1.5rem;
  width: 250px;
  /* position: fixed; */
  z-index: 1;
  background-color: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
}

.logo {
  line-height: 70px;
}

.logo .logo-sm {
  display: none;
}

.logo-dark {
  display: block;
  color: var(--primary-light);
  font-weight: 700;
}

.logo-light {
  display: none;
}

/* ========== APP SEARCH ========== */
.app-search {
  padding: calc(32px / 2) 0;
  margin-left: 10px;
}

.app-search .form-control {
  border: none;
  height: 38px;
  padding-left: 40px;
  padding-right: 20px;
  background-color: var(--bg-tertiary);
  border-radius: 5px;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.app-search .form-control:focus {
  background-color: var(--bg-tertiary);
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(56, 182, 255, 0.1);
  color: var(--text-primary);
}

.app-search span {
  position: absolute;
  z-index: 10;
  font-size: 16px;
  line-height: 38px;
  left: 13px;
  top: 0;
  color: var(--text-secondary);
}

/* ========== SIDEBAR ========== */
.vertical-menu {
  width: 250px;
  z-index: 1005;
  background: var(--bg-secondary);
  bottom: 0;
  margin-top: 0;
  position: fixed;
  top: 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  border-right: 1px solid var(--border-color);
}

.main-content {
  margin-left: 250px;
  overflow: hidden;
}

.main-content .content {
  padding: 0 15px 10px 15px;
  margin-top: 70px;
}

.sidebar-menu-scroll {
  height: 100vh;
  margin-top: 5px;
  overflow-y: auto;
}

#sidebar-menu {
  padding: 10px 0 30px 0;
}

#sidebar-menu .mm-active > .has-arrow:after {
  transform: rotate(-180deg);
}

#sidebar-menu .has-arrow:after {
  content: "\f0140";
  font-family: "Material Design Icons";
  display: block;
  float: right;
  transition: transform 0.2s;
  font-size: 1rem;
  color: var(--primary-color);
}

#sidebar-menu ul li a {
  display: block;
  padding: 0.6rem 1.1rem;
  color: var(--text-secondary);
  position: relative;
  font-size: 15px;
  font-weight: 500;
  transition: var(--transition);
  margin: 0 10px;
  border-radius: 3px;
}

#sidebar-menu ul li a i {
  display: inline-block;
  min-width: 1.5rem;
  padding-bottom: 0.125em;
  font-size: 1.05rem;
  line-height: 1.40625rem;
  vertical-align: middle;
  color: var(--text-secondary);
  transition: var(--transition);
}

#sidebar-menu ul li a:hover {
  color: var(--primary-light);
  background-color: rgba(56, 182, 255, 0.1);
}

#sidebar-menu ul li a:hover i {
  color: var(--primary-light);
}

#sidebar-menu ul li ul.sub-menu {
  padding: 0;
}

#sidebar-menu ul li ul.sub-menu li a {
  padding: 0.4rem 1.5rem 0.4rem 3.5rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin: 0;
  background-color: transparent;
  font-size: 14.4px;
}

#sidebar-menu ul li ul.sub-menu li a:hover {
  color: var(--primary-light);
  background-color: rgba(56, 182, 255, 0.08);
}

.menu-title {
  padding: 12px 20px !important;
  letter-spacing: 0.05em;
  pointer-events: none;
  cursor: default;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
}

.mm-active {
  color: var(--primary-light) !important;
}

.mm-active > a {
  background-color: rgba(56, 182, 255, 0.15);
  color: var(--primary-light) !important;
}

.mm-active > a > i {
  color: var(--primary-light) !important;
}

.mm-active .active {
  color: var(--primary-light) !important;
}

.mm-active .active i {
  color: var(--primary-light) !important;
}

.mm-active > i {
  color: var(--primary-light) !important;
}

/* ========== SIDEBAR COMPACT MODE ========== */
body[data-sidebar-size="sm"] .main-content {
  margin-left: 70px;
}

body[data-sidebar-size="sm"] .navbar-brand-box {
  width: 70px !important;
}

body[data-sidebar-size="sm"] .logo span.logo-lg {
  display: none;
}

body[data-sidebar-size="sm"] .logo span.logo-sm {
  display: block;
}

body[data-sidebar-size="sm"] .vertical-menu {
  position: absolute;
  width: 70px !important;
  z-index: 1001;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu .badge,
body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu .collapse.in,
body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu .menu-title {
  display: none !important;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li > a {
  padding: 15px 0;
  transition: none;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li > a i {
  font-size: 1.3rem;
  text-align: center;
  min-width: 50px;
  padding-bottom: 0;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li > a span {
  display: none;
  padding-left: 25px;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li:hover > a {
  position: relative;
  width: calc(180px + 70px);
  color: var(--primary-light);
  background-color: rgba(56, 182, 255, 0.15);
  transition: none;
  box-shadow: inset 0 3px 10px 0 rgba(56, 182, 255, 0.15);
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li:hover > a i {
  color: var(--primary-light);
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li:hover > a span {
  display: inline;
}

body[data-sidebar-size="sm"] .vertical-menu #sidebar-menu > ul > li:hover > ul {
  display: block;
  left: 70px;
  position: absolute;
  width: 190px;
  height: auto !important;
  box-shadow: 3px 5px 10px 0 rgba(0, 0, 0, 0.3);
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

/* ========== PAGE CONTENT ========== */
.page-content {
  padding: calc(70px + 1.25rem) calc(1.25rem / 2) 60px calc(1.25rem / 2);
}

.page-title-box {
  padding-bottom: 1.25rem;
}

.page-title-box .breadcrumb {
  background-color: transparent;
  padding: 0;
}

.page-title-box h4 {
  font-weight: 600;
  font-size: 18px !important;
  color: var(--text-primary);
}

/* ========== HEADER ITEMS ========== */
.header-item {
  height: 70px;
  box-shadow: none !important;
  color: var(--text-secondary);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
}

.header-item:hover {
  color: var(--primary-light);
}

.noti-icon i {
  font-size: 22px;
  color: var(--text-secondary);
  transition: var(--transition);
}

.noti-icon:hover i {
  color: var(--primary-light);
}

.noti-icon .badge {
  position: absolute;
  top: 12px;
  right: 5px;
  background-color: var(--accent-color);
}

.header-profile-user {
  height: 36px;
  width: 36px;
  background-color: rgba(56, 182, 255, 0.2);
  padding: 3px;
  border: 2px solid var(--border-color);
  border-radius: 50%;
}

/* ========== FOOTER ========== */
.footer {
  bottom: 0;
  padding: 20px calc(1.25rem / 2);
  position: absolute;
  right: 0;
  color: var(--text-secondary);
  left: 250px;
  height: 60px;
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
}

body[data-sidebar-size="sm"] .footer {
  left: 70px;
}

/* ========== CARDS ========== */
.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.card:hover {
  /* box-shadow: 0 8px 24px rgba(56, 182, 255, 0.15); */
  border-color: var(--primary-color);
}

.card-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.card-body {
  color: var(--text-secondary);
}

/* ========== BUTTONS ========== */
.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #000;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary:hover {
  background-color: var(--primary-light);
  border-color: var(--primary-light);
  color: #000;
  box-shadow: 0 4px 15px rgba(56, 182, 255, 0.4);
}

.btn-outline-primary {
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #000;
}

.btn-secondary {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #000;
}

.btn-success {
  background-color: var(--success);
  border-color: var(--success);
}

.btn-success:hover {
  background-color: #059669;
  border-color: #059669;
}

.btn-danger {
  background-color: var(--danger);
  border-color: var(--danger);
}

.btn-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
}

.btn-warning {
  background-color: var(--warning);
  border-color: var(--warning);
  color: #000;
}

.btn-warning:hover {
  background-color: #d97706;
  border-color: #d97706;
  color: #000;
}

.btn-info {
  background-color: var(--info);
  border-color: var(--info);
}

.btn-info:hover {
  background-color: #2563eb;
  border-color: #2563eb;
}

/* ========== TABLES ========== */
.table {
  color: var(--text-primary);
  border-color: var(--border-color);
}

.table thead th {
  background-color: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.table tbody tr {
  border-color: var(--border-color);
  transition: var(--transition);
}

.table tbody tr:hover {
  background-color: #2b2e3b;
}

.table tbody td {
  color: var(--text-secondary);
  vertical-align: middle;
}

/* ========== FORMS ========== */
.form-control,
.form-select {
  background-color: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--bg-tertiary);
  border-color: var(--primary-color);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(56, 182, 255, 0.1);
}

.form-control::placeholder {
  color: var(--text-secondary);
}

.form-label {
  color: var(--text-primary);
  font-weight: 500;
}

.input-group-text {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

/* ========== ALERTS ========== */
.alert {
  border-radius: 8px;
  border: none;
  transition: var(--transition);
}

.alert-primary {
  background-color: rgba(56, 182, 255, 0.15);
  color: var(--primary-light);
  border-left: 4px solid var(--primary-color);
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.15);
  color: var(--info);
  border-left: 4px solid var(--info);
}

/* ========== BADGES ========== */
.badge {
  padding: 0.4rem 0.8rem;
  font-weight: 600;
  border-radius: 20px;
  font-size: 12px;
}

.badge-primary {
  background-color: rgba(56, 182, 255, 0.2);
  color: var(--primary-light);
}

.badge-success {
  background-color: rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.badge-warning {
  background-color: rgba(245, 158, 11, 0.2);
  color: var(--warning);
}

.badge-danger {
  background-color: rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.badge-info {
  background-color: rgba(59, 130, 246, 0.2);
  color: var(--info);
}

/* ========== DROPDOWNS ========== */
.dropdown-menu {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.dropdown-item {
  color: var(--text-secondary);
  transition: var(--transition);
}

.dropdown-item:hover,
.dropdown-item.active {
  background-color: rgba(56, 182, 255, 0.1);
  color: var(--primary-light);
}

/* ========== MODALS ========== */
.modal-content {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
}

.modal-header {
  background-color: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

.modal-body {
  color: var(--text-secondary);
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-tertiary);
}

.btn-close {
  filter: invert(1);
}

/* ========== NAV ========== */
.nav-tabs {
  border-bottom: 1px solid var(--border-color);
}

.nav-tabs .nav-link {
  color: var(--text-secondary);
  transition: var(--transition);
  border-bottom: 2px solid transparent;
}

.nav-tabs .nav-link:hover {
  color: var(--primary-light);
  border-bottom-color: var(--primary-color);
}

.nav-tabs .nav-link.active {
  background-color: transparent;
  color: var(--primary-light);
  border-bottom-color: var(--primary-color);
  border-bottom-width: 2px;
}

.nav-pills .nav-link {
  color: var(--text-secondary);
  transition: var(--transition);
  border-radius: 8px;
}

.nav-pills .nav-link:hover {
  background-color: rgba(56, 182, 255, 0.1);
  color: var(--primary-light);
}

.nav-pills .nav-link.active {
  background-color: var(--primary-color);
  color: #000;
}

/* ========== PAGINATION ========== */
.pagination {
  gap: 4px;
}

.page-link {
  background-color: var(--bg-tertiary);
  border-color: var(--border-color);
  color: var(--text-secondary);
  transition: var(--transition);
}

.page-link:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #000;
}

.page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #000;
}

/* ========== TEXT & COLORS ========== */
.text-muted {
  color: var(--text-secondary) !important;
}

.text-primary {
  color: var(--primary-light) !important;
}

.text-success {
  color: var(--success) !important;
}

.text-warning {
  color: var(--warning) !important;
}

.text-danger {
  color: var(--danger) !important;
}

.text-info {
  color: var(--info) !important;
}

/* ========== BORDER ========== */
.border {
  border-color: var(--border-color) !important;
}

.border-primary {
  border-color: var(--primary-color) !important;
}

.border-success {
  border-color: var(--success) !important;
}

.border-warning {
  border-color: var(--warning) !important;
}

.border-danger {
  border-color: var(--danger) !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
  body[data-sidebar-size="sm"] #page-topbar {
    left: 0;
  }

  #page-topbar {
    left: 0;
  }

  .vertical-menu {
    width: 0;
  }

  body.sidebar-enable .vertical-menu {
    width: 250px;
  }

  .main-content {
    margin-left: 0 !important;
  }

  .footer {
    left: 0 !important;
  }

  .page-content {
    padding: calc(70px + 1rem) 1rem 60px 1rem;
  }
}

@media (max-width: 576px) {
  .navbar-brand-box {
    width: auto;
  }

  .page-title-box .page-title-right {
    display: none;
  }

  .card {
    margin-bottom: 1rem;
  }
}

/* ========== UTILITIES ========== */
.shadow-sm {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.shadow {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.shadow-lg {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2) !important;
}

.rounded {
  border-radius: 8px;
}

.rounded-pill {
  border-radius: 50px;
}

.bg-light {
  background-color: var(--bg-tertiary) !important;
}

.bg-dark {
  background-color: var(--bg-primary) !important;
}

/* ========== HIGHLIGHT ========== */
.highlight {
  background: var(--bg-tertiary);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* ========== TRANSITIONS ========== */
* {
  transition: var(--transition);
}