:root {
  --color-product-bg: #f0f7ff;
  --color-product-border: #cce5ff;
  --color-scrollbar-thumb: #ddd;
  --color-input-border: #ced4da;
  --color-clear-btn: #888;
  --font-size-sm: 14px;
  --font-size-xs: 0.75rem;
  --input-height: 31px;
  --color-white: #fff;
  --color-text-muted: #666;
  --color-border-primary: #0d6efd;
  --color-scrollbar-thumb-hover: #c1c1c1;
  --scrollbar-width: 8px;
  --font-family-base: "Roboto", sans-serif;
  --min-height-body: 100vh;
  --padding-admin-container-left: 250px;
  --width-sidebar: 250px;
  --width-sidebar-collapsed: 70px;
  --sidebar-current-width: var(--width-sidebar);

  --bg-sidebar: #ffffff;
  --border-sidebar: 1px solid #e0e0e0;
  --height-sidebar: calc(100vh - 56px);
  --top-sidebar: 56px;
  --left-sidebar: 0;
  --z-index-sidebar: 1000;
  --padding-top-sidebar: 10px;
  --padding-bottom-sidebar: 50px;
  --box-shadow-sidebar: 2px 0 6px rgba(0, 0, 0, 0.05);
  --transition-sidebar-scrollbar: scrollbar-color 0.3s;
  --bg-sidebar-hover-track: #f1f1f1;
  --color-scrollbar-thumb-active: #a8a8a8;
  --color-sidebar-link: #333;
  --padding-sidebar-link: 12px 20px;
  --font-size-sidebar-link: 14px;
  --transition-sidebar-link: background-color 0.2s ease, color 0.2s ease;
  --border-radius-sidebar-link: 0 20px 20px 0;
  --margin-bottom-sidebar-link: 6px;
  --bg-sidebar-link-hover: #e9f2ff;
  --color-sidebar-link-hover: #0d6efd;
  --font-weight-sidebar-active: 600;
  --font-size-sidebar-icon: 18px;
  --margin-right-sidebar-icon: 10px;
  --padding-content: 20px;
  --bg-content: #f8f9fa;
  --bg-footer: #f1f1f1;
  --padding-footer: 10px 0;
  --box-shadow-navbar: 0 2px 8px rgba(0, 0, 0, 0.05);
  --z-index-navbar: 1030;
  --font-weight-navbar-brand: 600;
  --font-size-navbar-text: 14px;
  --font-size-btn-logout: 14px;
  --border-radius-btn-logout: 6px;
}

.notification-dropdown {
  position: relative;
}

.notification-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid #e9edf2;
  border-radius: 12px;
  background: #fff;
  color: #49566a;
  font-size: 1.2rem;
  transition: all .2s ease;
}

.notification-toggle:hover,
.notification-toggle[aria-expanded="true"] {
  background: #f3f6fb;
  color: #0d6efd;
  border-color: #dbe7ff;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  border-radius: 20px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.notification-menu {
  width: 380px;
  max-width: calc(100vw - 24px);
  margin-top: 10px !important;
  overflow: hidden;
  border: 1px solid #e9edf2;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, .14);
}

.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  background: #fff;
  border-bottom: 1px solid #edf0f4;
}

.notification-header h6 {
  color: #172033;
  font-size: 15px;
  font-weight: 700;
}

.notification-header p {
  color: #8791a2;
  font-size: 12px;
}

.notification-count {
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 20px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 700;
}

.notification-list {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.notification-list::-webkit-scrollbar {
  width: 5px;
}

.notification-list::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: #d8dee8;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  color: #334155;
  text-decoration: none;
  border-bottom: 1px solid #f0f2f6;
  background: #fff;
  transition: background .2s ease;
}

.notification-item:last-child {
  border-bottom: 0;
}

.notification-item:hover {
  background: #f8fafc;
  color: #334155;
}

.notification-item.is-unread {
  background: #f5f9ff;
}

.notification-item.is-unread:hover {
  background: #edf5ff;
}

.notification-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  font-size: 19px;
}

.notification-icon.import {
  background: #eaf2ff;
  color: #2563eb;
}

.notification-icon.order {
  background: #e7f8ee;
  color: #16834a;
}

.notification-icon.return {
  background: #fff1e6;
  color: #ea580c;
}

.notification-icon.product {
  background: #f1eaff;
  color: #7c3aed;
}

.notification-icon.default {
  background: #f1f5f9;
  color: #64748b;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.notification-title {
  color: #263449;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.notification-item.is-unread .notification-title {
  color: #172033;
  font-weight: 700;
}

.notification-dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: #3b82f6;
}

.notification-message {
  margin: 0 0 7px;
  color: #697586;
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  white-space: normal;
}

.notification-time {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #9aa3b2;
  font-size: 11px;
}

.notification-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 35px 16px;
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
}

.notification-empty i {
  font-size: 27px;
}

.notification-footer {
  padding: 11px 16px;
  background: #fff;
  border-top: 1px solid #edf0f4;
  color: #9aa3b2;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 480px) {
  .notification-menu {
    position: fixed !important;
    top: 62px !important;
    right: 12px !important;
    left: auto !important;
    width: calc(100vw - 24px);
    max-width: none;
    margin: 0 !important;
  }

  .notification-list {
    max-height: min(55vh, 400px);
  }
}

h5, h6 {
  font-size: 14px !important;
}

body,
button,
input,
select,
textarea {
  font-size: 13px !important;
}

body {
  min-height: var(--min-height-body);
  display: flex;
  flex-direction: column;
  font-family: var(--font-family-base);
  overflow-x: hidden;
}

label,
.form-label,
.col-form-label {
  font-size: 13px !important;
}

th, tr, a, option, strong, small, p, div, li, td {
  font-size: 13px !important;
}

body.sidebar-is-collapsed {
  --sidebar-current-width: var(--width-sidebar-collapsed);
}

.admin-container {
  flex: 1;
  display: flex;
  padding-left: var(--sidebar-current-width);
  transition: padding-left 0.3s ease;
  width: 100%;
  box-sizing: border-box;
}

.sidebar {
  width: var(--sidebar-current-width);
  background-color: var(--bg-sidebar);
  border-right: var(--border-sidebar);
  height: var(--height-sidebar);
  position: fixed !important;
  top: var(--top-sidebar);
  left: var(--left-sidebar);
  z-index: var(--z-index-sidebar);
  padding-top: var(--padding-top-sidebar);
  padding-bottom: var(--padding-bottom-sidebar);
  box-shadow: var(--box-shadow-sidebar);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
  transition: width 0.3s ease, var(--transition-sidebar-scrollbar);
}

.sidebar:hover {
  scrollbar-color: var(--color-scrollbar-thumb-hover) var(--bg-sidebar-hover-track);
}

.sidebar::-webkit-scrollbar {
  width: var(--scrollbar-width);
}

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

.sidebar::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}

.sidebar:hover::-webkit-scrollbar-track {
  background: var(--bg-sidebar-hover-track);
}

.sidebar:hover::-webkit-scrollbar-thumb {
  background: var(--color-scrollbar-thumb-hover);
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--color-scrollbar-thumb-active);
}

.sidebar a {
  color: var(--color-sidebar-link);
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: var(--padding-sidebar-link);
  font-size: var(--font-size-sidebar-link);
  transition: var(--transition-sidebar-link);
  border-radius: var(--border-radius-sidebar-link);
  margin-bottom: 0;
  border-top: calc(var(--margin-bottom-sidebar-link) / 2) solid transparent;
  border-bottom: calc(var(--margin-bottom-sidebar-link) / 2) solid transparent;
  background-clip: padding-box;
  white-space: nowrap;
}

.sidebar a:hover {
  background-color: var(--bg-sidebar-link-hover);
  color: var(--color-sidebar-link-hover);
}

.sidebar a.active {
  background-color: var(--color-white);
  color: var(--color-sidebar-link-hover);
  font-weight: var(--font-weight-sidebar-active);
}

.sidebar a.active i {
  color: var(--color-sidebar-link-hover);
}

.sidebar a i {
  margin-right: var(--margin-right-sidebar-icon);
  font-size: var(--font-size-sidebar-icon);
  flex-shrink: 0;
}

body.sidebar-is-collapsed .sidebar a {
  justify-content: center;
  padding: 12px 0;
  border-radius: 0;
  width: 100%;
}

body.sidebar-is-collapsed .sidebar a i {
  margin-right: 0 !important;
  margin-left: 0 !important;
}

body.sidebar-is-collapsed .sidebar a span {
  display: none;
}

.sidebar-tooltip {
  position: fixed;
  top: 0;
  left: calc(var(--width-sidebar-collapsed) + 8px);
  transform: translateY(-50%);
  padding: 6px 12px;
  background-color: #212529;
  color: #ffffff;
  font-size: 13px;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.12s ease, visibility 0.12s ease;
}

.sidebar-tooltip::before {
  content: "";
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-right-color: #212529;
}

.sidebar-tooltip.show {
  opacity: 1;
  visibility: visible;
}

.content,
.main-content {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  padding: var(--padding-content);
  background-color: var(--bg-content);
  box-sizing: border-box;
  overflow-x: hidden;
  font-size: 14px;
}

.admin-container .row {
  margin-left: -12px;
  margin-right: -12px;
}

.admin-container .row > [class*="col-"] {
  min-width: 0;
  max-width: 100%;
}

.card {
  min-width: 0;
}

canvas {
  max-width: 100% !important;
}

footer {
  background-color: var(--bg-footer);
  text-align: center;
  padding: var(--padding-footer);
  font-size: 14px;
}

.navbar {
  box-shadow: var(--box-shadow-navbar);
  z-index: var(--z-index-navbar);
}

.navbar-brand {
  font-weight: var(--font-weight-navbar-brand);
  color: var(--color-border-primary) !important;
  font-size: 16px !important;
}

.navbar-text {
  font-size: var(--font-size-navbar-text);
}

.btn-logout {
  font-size: var(--font-size-btn-logout);
  border-radius: var(--border-radius-btn-logout);
}

.fs-7 {
  font-size: 13px !important;
}

.select2-container .select2-selection--single {
  height: var(--input-height);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: var(--input-height);
  font-size: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: var(--input-height);
}

.select2-container--default .select2-selection--single .select2-selection__clear {
  height: 29px;
}

.select2-container--default .select2-selection--multiple,
.select2-container--bootstrap-5 .select2-selection--multiple {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  overflow-x: auto !important;
  white-space: nowrap !important;
  min-height: var(--input-height) !important;
  height: var(--input-height) !important;
  padding: 0 20px 0 4px !important;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.select2-container--default .select2-selection--multiple::-webkit-scrollbar,
.select2-container--bootstrap-5 .select2-selection--multiple::-webkit-scrollbar {
  display: none;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 2px !important;
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  overflow: visible !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
  display: inline-flex !important;
  align-items: center !important;
  margin: 0 !important;
  padding: 0 4px !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  flex-shrink: 0 !important;
  color: #212529 !important;
  background-color: #e9ecef !important;
  border: 1px solid #ced4da !important;
}

.select2-container--default .select2-selection--multiple .select2-search--inline,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search--inline {
  flex-shrink: 0 !important;
  margin: 0 !important;
}

.select2-container--default .select2-selection--multiple .select2-search__field,
.select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field {
  margin: 0 !important;
  height: 22px !important;
  font-size: 14px !important;
}

.select2-container--bootstrap-5 .select2-selection {
  height: 33.1px !important;
  min-height: 33.1px !important;
  padding-top: 1px !important;
}

.select2-container--bootstrap-5 .select2-selection__rendered {
  line-height: 28px !important;
}

.select2-container--bootstrap-5 .select2-selection__arrow {
  height: 31px !important;
}

.select2-selection__placeholder, .select2-selection__rendered {
  font-size: 13px !important;
}

.select2-container--bootstrap-5 .select2-results__option {
  font-size: 13px !important;
}

.select2-container--bootstrap-5 .select2-selection,
.select2-container--bootstrap-5 .select2-search__field {
  font-size: 13px !important;
}
