body {
  font-family: 'Poppins', sans-serif;
  background: #f8f9fa;
  color: #262626;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(1px);
  display: none;
  z-index: 1030;
}

.overlay.show {
  display: block;
}

.sidebar {
  width: 240px;
  background: #fff;
  transition: width 0.3s, left 0.3s, right 0.3s;
  border-right: 1px solid #e5e5e5;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  right: auto;
  padding-top: 60px;
  z-index: 1030;
}

[dir="rtl"] .sidebar {
  left: auto !important;
  right: 0 !important;
  border-right: 0;
  border-left: 1px solid #e5e5e5;
}

.sidebar .logo-area {
  position: absolute;
  top: 0;
  left: 0;
  right: auto;
  height: 60px;
  width: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 17px;
  color: #262626;
  border-bottom: 1px solid #e5e5e5;
}

.sidebar-brand {
  max-width: 100%;
}

.sidebar-brand-logo {
  max-width: 150px;
  max-height: 34px;
  width: auto;
  height: auto;
  object-fit: contain;
}

[dir="rtl"] .sidebar .logo-area {
  left: auto !important;
  right: 0 !important;
  padding-left: 0;
  padding-right: 17px;
}

.sidebar .nav-link {
  color: #262626;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: 14px;
  font-weight: 400;
  gap: 12px;
  white-space: nowrap;
  margin: 1px 12px;
  border-radius: 8px;
  width: calc(100% - 24px);
  overflow: hidden;
  text-align: left;
  box-sizing: border-box;
}

.sidebar-nav-form {
  width: 100%;
}

.sidebar-nav-form .nav-link {
  cursor: pointer;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  color: #4f46d8;
  background-color: rgba(79, 70, 216, 0.095);
}

.sidebar .nav-link .ti {
  font-size: 18px;
  flex: 0 0 18px;
}

.sidebar .nav-text,
.logo-text {
  transition: opacity 0.2s;
}

.sidebar .nav-text {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed {
  width: 60px;
}

.sidebar.collapsed .nav-link {
  margin: 0;
  background-color: transparent;
  padding: 8px 0;
  width: 100%;
  justify-content: center;
  gap: 0;
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .logo-text {
  display: none;
}

.sidebar.collapsed .sidebar-brand-logo {
  max-width: 28px;
}

.topbar {
  height: 60px;
  margin-left: 240px;
}

.topbar-user-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.topbar-user-trigger:hover {
  background: rgba(79, 70, 216, 0.08);
}

.user-menu-dropdown {
  min-width: 260px;
  border: 1px solid #e8eaf4;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(34, 42, 84, 0.12);
}

.user-menu-header {
  background: linear-gradient(180deg, #ffffff 0%, #f7f8ff 100%);
}

.user-menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: #262626;
  border-radius: 12px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.user-menu-link:hover {
  background: rgba(79, 70, 216, 0.08);
  color: #4f46d8;
}

.user-menu-link .ti {
  font-size: 18px;
}

.user-menu-button {
  text-align: inherit;
}

[dir="rtl"] .topbar {
  margin-left: 0;
  margin-right: 240px;
}

.topbar.full {
  margin-left: 60px;
}

[dir="rtl"] .topbar.full {
  margin-left: 0;
  margin-right: 60px;
}

.content {
  margin-left: 240px;
}

[dir="rtl"] .content {
  margin-left: 0;
  margin-right: 240px;
}

.content.full {
  margin-left: 60px;
}

[dir="rtl"] .content.full {
  margin-left: 0;
  margin-right: 60px;
}

.avatar {
  position: relative;
  display: inline-block;
  width: 3rem;
  height: 3rem;
}

.avatar-sm {
  width: 2rem;
  height: 2rem;
}

.avatar-md {
  width: 2.5rem;
  height: 2.5rem;
}

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

.btn-icon {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  justify-content: center;
  align-items: center;
  font-size: 0.92969rem;
  font-weight: 400;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
}

.btn-icon.btn-sm {
  font-size: 0.875rem;
  width: 2.1875rem;
  height: 2.1875rem;
}

.icon-md {
  width: 2.5rem;
  height: 2.5rem;
  line-height: 2.5rem;
}

.icon-shape {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  vertical-align: middle;
}

.branding-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e9ecef;
  border-radius: 18px;
  padding: 1.25rem;
}

.branding-preview {
  min-height: 180px;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  background: radial-gradient(circle at top, rgba(13, 110, 253, 0.08), transparent 55%), #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.branding-preview img {
  max-width: 100%;
  max-height: 90px;
  object-fit: contain;
}

.branding-preview-favicon img {
  max-height: 64px;
}

.branding-preview-loader img {
  max-height: 72px;
}

.loader-brand-image {
  max-width: 120px;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.mt-6 {
  margin-top: 4rem !important;
}

.ms-n2 {
  margin-left: -0.5rem !important;
}

[dir="rtl"] .ms-n2 {
  margin-left: 0 !important;
  margin-right: -0.5rem !important;
}

[dir="rtl"] .sidebar .nav-link,
[dir="rtl"] .sidebar .logo-area,
[dir="rtl"] .list-group-item,
[dir="rtl"] .dropdown-item,
[dir="rtl"] .table,
[dir="rtl"] .card-header,
[dir="rtl"] .card-body,
[dir="rtl"] .form-label,
[dir="rtl"] .form-control,
[dir="rtl"] .form-select,
[dir="rtl"] p,
[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3,
[dir="rtl"] h4,
[dir="rtl"] h5,
[dir="rtl"] h6,
[dir="rtl"] td,
[dir="rtl"] th,
[dir="rtl"] small,
[dir="rtl"] label {
  text-align: right;
}

[dir="rtl"] .sidebar .nav-link,
[dir="rtl"] .sidebar .logo-area,
[dir="rtl"] .list-group-item,
[dir="rtl"] .topbar .dropdown-item {
  flex-direction: row-reverse;
}

[dir="rtl"] .sidebar .nav-link {
  justify-content: flex-start;
  text-align: right;
}

[dir="rtl"] .sidebar .sidebar-nav-form .nav-link {
  direction: rtl;
}

[dir="rtl"] .sidebar.collapsed .nav-link {
  justify-content: center;
  flex-direction: row;
  direction: ltr;
}

[dir="rtl"] .topbar .dropdown-menu,
[dir="rtl"] .dropdown-menu-end {
  right: auto !important;
  left: 0 !important;
}

[dir="rtl"] .topbar .navbar,
[dir="rtl"] .card-header,
[dir="rtl"] .table,
[dir="rtl"] .list-group-item,
[dir="rtl"] .row,
[dir="rtl"] .col,
[dir="rtl"] main {
  direction: rtl;
}

@media (max-width: 992px) {
  .sidebar {
    left: -240px;
    right: auto;
  }

  [dir="rtl"] .sidebar {
    left: auto !important;
    right: -240px !important;
  }

  .sidebar.mobile-show {
    left: 0;
    right: auto;
  }

  [dir="rtl"] .sidebar.mobile-show {
    left: auto !important;
    right: 0 !important;
  }

  .topbar {
    margin-left: 0 !important;
    width: 100% !important;
  }

  [dir="rtl"] .topbar {
    margin-right: 0 !important;
  }

  .content {
    margin-left: 0 !important;
  }

  [dir="rtl"] .content {
    margin-right: 0 !important;
  }
}
