:root {
  --primary-color: #d64e2d;
  --primary-hover: #c23d1c;
  --primary-light: #f8e6e3;
  --primary-dark: #a83a1d;
}

/* --- Base Reset --- */
body,
html {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
}

/* --- Sidebar --- */
.sidebar {
  position: fixed;
  top: 0;
  /* bottom: 0; */
  left: 0;
  width: 250px;
  background: #fff;
  border-right: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  z-index: 1000;
  overflow-x: hidden;
}

.sidebar.collapsed {
  width: 80px;
}

/* --- Sidebar Header --- */
.sidebar-header {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border-bottom: 1px solid #ddd;
  transition: all 0.3s ease;
}

.sidebar-header img.logo {
  height: 44px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-header img.logo {
  height: 25px;
}

/* --- Navigation Links --- */
.nav-link {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: #333;
  font-weight: 500;
  border-radius: 12px;
  margin: 8px 12px;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
}

.nav-link i {
  font-size: 20px;
  transition: all 0.3s ease;
  width: 24px;
  text-align: center;
}

.nav-link span {
  margin-left: 10px;
  transition: all 0.3s ease;
}

.nav-link.active {
  background-color: #3787f4;
  color: #fff;
}

.nav-link:hover {
  background-color: #5a9bf8;
  color: #fff;
}

.nav-link:hover i {
  transform: scale(1.1);
}

.sidebar.collapsed .nav-link {
  justify-content: center;
  padding: 10px;
  width: 48px;
  height: 48px;
  margin: 8px auto;
}

.sidebar.collapsed .nav-link span {
  display: none;
}

/* --- Bottom Controls --- */
.bottom-controls {
  margin-top: auto;
  padding: 10px;
  border-top: 1px solid #ddd;
}

.bottom-controls button {
  width: 100%;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  transition: all 0.3s ease;
}

.bottom-controls span {
  margin-left: 8px;
  transition: all 0.3s ease;
}

.sidebar.collapsed .bottom-controls span {
  display: none;
}

.submenu {
  margin-left: 1.5rem !important;
  white-space: normal;
  word-break: break-word;
}

.submenu a.nav-link {
  white-space: normal;
  word-break: break-word;
}

/* --- Main Layout --- */
.page-container {
  margin-left: 250px;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.3s ease;
}

.sidebar.collapsed+.page-container {
  margin-left: 80px;
}

/* --- Top Bar --- */
.topbar {
  height: 60px;
  background: white;
  border-bottom: 1px solid #ddd;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

/* --- Page Content --- */
.page-content {
  flex-grow: 1;
  overflow-y: auto;
  background: #EBEEF3;
  padding: 20px;
}

/* --- Avatar Circle --- */
.avatar {
  background: #007bff;
  color: #fff;
  font-size: 14px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Avatar with Primary Color --- */
.avatar-primary {
  background-color: var(--primary-color);
  color: #fff;
  font-size: 14px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.avatar-primary:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

.btn-check:focus+.btn-light,
.btn-light:focus {
  box-shadow: none !important;
}

/* CKEditor Styles */
.ck-editor__editable {
  min-height: 300px !important;
}

.ck-editor__editable_inline {
  padding: 0 1rem !important;
}

.ck.ck-editor {
  width: 100%;
}

.ck.ck-content {
  font-size: 14px;
  line-height: 1.6;
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
  box-shadow: none;
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__clear,
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
  top: 25%;
}