@font-face {
    font-family: 'Almarai';
    src: url(../fonts/almarai/almarai-regular.ttf) format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Almarai';
    src: url(../fonts/almarai/almarai-bold.ttf) format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Almarai';
    src: url(../fonts/almarai/almarai-extrabold.ttf) format('truetype');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Almarai';
    src: url(../fonts/almarai/almarai-light.ttf) format('truetype');
    font-weight: 300;
    font-style: normal;
}

:root,
[data-bs-theme="light"] {
    --main-bg: #ffffff;
    --main-text: #c8ac5a;
    --main-hover: #212121;
    /* --spinner-color: #212121; */
    --sidebar-width: 260px;

}

[data-bs-theme="dark"] {
    --main-bg: #212121;
    --main-text: #c8ac5a;
    --main-hover: #ffffff;
    /* --spinner-color: #d3d3d3; */
    --sidebar-width: 260px;
}

body {
    background-color: var(--main-bg) !important;
    color: var(--main-text) !important;
    font-family: 'Almarai', sans-serif !important;
}

a {
    color: var(--main-text) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--main-hover) !important;
    transition: color 0.3s ease;
}

.dropdown-toggle::after {
    display: none !important;
}

.bg-gold {
    background-color: #c8ac5a !important;
    color: #212529 !important;
}

.btn-gold {
    background-color: #c8ac5a !important;
    color: #212529 !important;
}

.btn-gold:hover {
    color: #ffffff !important;
    transition: color 0.3s ease;
}

.form-check-input:checked {
    background-color: var(--main-text);
    border-color: var(--main-text);
}

.form-floating label {
    right: 0;
    left: auto;
    text-align: right;
}

.form-control:focus {
    box-shadow: none;
}

.page-link {
    border: 1px solid #c8ac5a !important;
    transition: color 0.3s ease;
    font-weight: 400;
}

.page-link:focus {
    box-shadow: none;
}

/* .dropdown-item:active {
    background-color: #c8ac5a !important;
} */

.pagination .page-first,
.pagination .page-last {
    display: inline-block !important;
}

.card {
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

#sidebar {
  min-width: var(--sidebar-width);
  max-width: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-right 0.4s;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

#sidebar.collapsed {
  margin-right: calc(-1 * var(--sidebar-width));
}

#sidebar .list-group-item {
  border-radius: 0;
}

#sidebar .list-group-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

@media (max-width: 768px) {
  #sidebar {
    margin-left: calc(-1 * var(--sidebar-width));
  }

  #sidebar.show {
    margin-left: 0;
  }
}

/* Scrollbar Styling */
#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-track {
  background: #2c3e50;
}

#sidebar::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background: #777;
}

ul.list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-dropdown [aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.sidebar-dropdown [aria-expanded="false"] .fa-chevron-down {
    transform: rotate(0);
    transition: transform 0.3s ease;
}
.nav-dropdown [aria-expanded="true"] .fa-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.nav-dropdown [aria-expanded="false"] .fa-chevron-down {
    transform: rotate(0);
    transition: transform 0.3s ease;
}

.notification-dot {
    width: 4px;
    height: 4px;
    background: var(--main-hover);
    border-radius: 50%;
    border: 1px;
}

@media (max-width: 768px) {
  #sidebar {
    margin-left: calc(-1 * var(--sidebar-width));
  }

  #sidebar.show {
    margin-left: 0;
  }
}

.sidebar-icon {
    font-size: 1.2rem; /* أو أي حجم موحد */
    width: 24px;
    text-align: center;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px; /* مسافة ثابتة بين الأيقونة والنص */
    padding: 8px 16px;
}

.toast {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 90%;
    background-color: #f44336;
    color: #fff;
    padding: 14px 18px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: top 0.5s ease;
}

.toast.show {
    top: 20px;
}

.toast-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}

.spinner-wrapper {
    color: #c8ac5a;
    background-color: #212121;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 0.2s;
}

.spinner-border {
    width: 50px;
    height: 50px;
}