html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

/* Help Articles Tree Styles */
.help-articles-tree {
  min-height: 200px;
}

.help-articles-tree-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-article-item {
  margin: 5px 0;
  padding: 8px;
  border: 1px solid #e3e6f0;
  border-radius: 4px;
  background: #fff;
  transition: all 0.2s;
}

.help-article-item:hover {
  background: #f8f9fc;
  border-color: #d1d3e2;
}

.help-article-item.drag-over {
  border-color: #4e73df;
  background: #e7f1ff;
}

.help-article-node.dragging {
  opacity: 0.5;
}

.help-article-node {
  padding: 5px;
  cursor: move;
}

.help-article-actions {
  display: flex;
  gap: 5px;
}

.help-article-children {
  list-style: none;
  padding-left: 20px;
  margin-top: 5px;
}

.drag-handle {
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

/* Dashboard Styles */
.border-left-primary {
  border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
  border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
  border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
  border-left: 0.25rem solid #f6c23e !important;
}

.text-gray-800 {
  color: #5a5c69 !important;
}

.text-gray-300 {
  color: #dddfeb !important;
}

.font-weight-bold {
  font-weight: 700 !important;
}

.text-xs {
  font-size: 0.7rem !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.chart-area {
  position: relative;
  height: 20rem;
  width: 100%;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid #e3e6f0;
  border-radius: 0.35rem;
}

.card-header {
  padding: 0.75rem 1.25rem;
  margin-bottom: 0;
  background-color: #f8f9fc;
  border-bottom: 1px solid #e3e6f0;
}

.card-body {
  flex: 1 1 auto;
  padding: 1.25rem;
}

.shadow {
  box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}

.h-100 {
  height: 100% !important;
}

.py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.h-3 {
  font-size: 1.75rem;
}

.h-5 {
  font-size: 1.25rem;
}

.h-6 {
  font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .chart-area {
    height: 15rem;
  }
  
  .h-3 {
    font-size: 1.5rem;
  }
  
  .h-5 {
    font-size: 1.1rem;
  }
}

/* Loading spinner */
.spinner-border {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  vertical-align: text-bottom;
  border: 0.25em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
  to {
    transform: rotate(360deg);
  }
}

/* Dropdown styles */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  float: left;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  font-size: 0.85rem;
  color: #3a3b45;
  text-align: left;
  list-style: none;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #e3e6f0;
  border-radius: 0.35rem;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.25rem 1.5rem;
  clear: both;
  font-weight: 400;
  color: #3a3b45;
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
}

.dropdown-item:hover {
  color: #2e2f37;
  background-color: #f8f9fc;
}

.dropdown-header {
  display: block;
  padding: 0.5rem 1.5rem;
  margin-bottom: 0;
  font-size: 0.875rem;
  color: #858796;
  white-space: nowrap;
}

/* Form select styles */
.form-select {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: #3a3b45;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px 12px;
  border: 1px solid #e3e6f0;
  border-radius: 0.35rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-select:focus {
  border-color: #4e73df;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.form-select-sm {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  padding-left: 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.2rem;
}

.me-2 {
  margin-right: 0.5rem !important;
}

/* User list styles */
.fw-bold {
  font-weight: 700 !important;
}

.text-muted {
  color: #6c757d !important;
}

.small {
  font-size: 0.875em;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.p-2 {
  padding: 0.5rem !important;
}

.border-bottom {
  border-bottom: 1px solid #dee2e6 !important;
}

.d-flex {
  display: flex !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.align-items-center {
  align-items: center !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
  border-radius: 0.2rem;
}

.btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
}

.btn-outline-secondary:hover {
  color: #fff;
  background-color: #6c757d;
  border-color: #6c757d;
}

/* Input group styles */
.input-group {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  width: 100%;
}

.input-group .form-control {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group .btn {
  position: relative;
  z-index: 2;
}

/* User list item hover effect */
#usersList .d-flex:hover {
  background-color: #f8f9fa;
  border-radius: 0.25rem;
}

/* Dropdown menu positioning */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  display: none;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0.125rem 0 0;
  font-size: 0.85rem;
  color: #3a3b45;
  text-align: left;
  list-style: none;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #e3e6f0;
  border-radius: 0.35rem;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: 0.25rem 1.5rem;
  clear: both;
  font-weight: 400;
  color: #3a3b45;
  text-align: inherit;
  text-decoration: none;
  white-space: nowrap;
  background-color: transparent;
  border: 0;
}

.dropdown-item:hover {
  color: #2e2f37;
  background-color: #f8f9fc;
}

.dropdown-item i {
  margin-right: 0.5rem;
  width: 1rem;
  text-align: center;
}

/* Sidebar Menu Styles */
.sidebar-menu {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100vh;
  background-color: #2e2f37;
  color: #fff;
  z-index: 1000;
  transition: left 0.3s ease;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
}

.sidebar-menu.open {
  left: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #3a3b45;
  background-color: #1f2026;
}

.sidebar-brand {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
}

.sidebar-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.sidebar-close:hover {
  background-color: #3a3b45;
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu-item {
  margin: 0;
}

.sidebar-menu-link {
  display: flex;
  align-items: center;
  padding: 0.875rem 1.5rem;
  color: #d1d3d8;
  text-decoration: none;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.sidebar-menu-link:hover {
  background-color: #3a3b45;
  color: #fff;
  border-left-color: #4e73df;
}

.sidebar-menu-link.active {
  background-color: #3a3b45;
  color: #fff;
  border-left-color: #4e73df;
}

.sidebar-menu-link i {
  width: 24px;
  margin-right: 0.75rem;
  font-size: 1.1rem;
  text-align: center;
}

.sidebar-menu-link span {
  font-size: 0.95rem;
}

.sidebar-menu-item-logout {
  margin-top: 1rem;
  border-top: 1px solid #3a3b45;
  padding-top: 0.5rem;
}

.sidebar-menu-item-logout .sidebar-menu-link {
  color: #e74a3b;
}

.sidebar-menu-item-logout .sidebar-menu-link:hover {
  background-color: #3a3b45;
  color: #ff6b5a;
} 

/* Submenu Styles */
.sidebar-menu-item-has-children {
  position: relative;
}

.sidebar-menu-link-parent {
  cursor: pointer;
}

.sidebar-menu-arrow {
  transition: transform 0.3s ease;
}

.sidebar-menu-item-has-children.open .sidebar-menu-arrow {
  transform: rotate(180deg);
}

.sidebar-submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: #1f2026;
}

.sidebar-menu-item-has-children.open .sidebar-submenu {
  max-height: 500px;
}

.sidebar-submenu-link {
  padding-left: 3.5rem !important;
  font-size: 0.875rem;
}

.sidebar-submenu-link i {
  font-size: 0.9rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Top Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid #e3e6f0;
  z-index: 1001;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: left 0.3s ease;
}

.top-bar-content {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 1.5rem;
  justify-content: flex-start;
}

.menu-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #5a5c69;
  cursor: pointer;
  padding: 0.5rem;
  margin-right: 1rem;
  border-radius: 4px;
  transition: background-color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.menu-toggle:hover {
  background-color: #f8f9fc;
  color: #4e73df;
}

.top-bar-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: #5a5c69;
}

/* Main Content */
.main-content {
  margin-top: 60px;
  padding: 2rem;
  transition: margin-left 0.3s ease;
  min-height: calc(100vh - 60px);
}

/* Responsive adjustments */
@media (min-width: 992px) {
  .sidebar-menu {
    left: 0;
  }

  .sidebar-menu.open {
    left: 0;
  }

  .top-bar {
    left: 280px;
  }

  .main-content {
    margin-left: 280px;
  }

  .sidebar-close {
    display: none;
  }

  .sidebar-overlay {
    display: none;
  }

  /* Hide menu toggle on desktop since sidebar is always visible */
  .menu-toggle {
    display: none;
  }
}

@media (max-width: 991px) {
  .main-content {
    margin-left: 0;
  }
}

/* Modal Error */
#modalError {
  display: none;
}

/* Blog Post Image Preview */
.blog-post-image-preview {
  max-height: 300px;
}

/* Support Tickets Styles */
.support-tickets-list {
  min-height: 200px;
}

.ticket-messages-thread {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px;
}

.ticket-message {
  margin-bottom: 15px;
}

.user-message .message-content {
  text-align: left;
}

.admin-message .message-content {
  text-align: left;
}