:root {
  --bs-primary: #1c468e;
  --bs-primary-dark: #14346a;
  --bs-primary-hover: #14346a;
  --bs-primary-light: #4a6db7;
  --bs-bg-light: #e7ebf7;
  --bs-text-light: #ffffff;
  --bs-text-dark: #1c468e;

  --ts-purple: #262541;
  --ts-purple-soft: rgba(255, 255, 255, 0.08);
  --ts-purple-border: rgba(255, 255, 255, 0.12);
}

  h1, h2, h3, h4, h5, h6, p {
    color: #262541 !important;
  }
  
  .card-body a {
        color: #262541 !important;
  }

/* Sidebar */
.sidebar {
  width: 190px;
  min-width: 190px;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  background-color: var(--ts-purple);
  color: #fff;
  z-index: 1000;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
}

.sidebar .sidebar-brand {
  padding: 0.5rem 0.5rem 1rem;
  margin-bottom: 0.75rem;
  text-align: center;
  border-bottom: 1px solid var(--ts-purple-border);
}

.sidebar .sidebar-brand img {
  width: 110px;
  height: auto;
}

.sidebar .nav {
  gap: 0.15rem;
}

.admin-nav-heading {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: rgba(255, 255, 255, 0.45);
  margin: 1rem 0 0.35rem;
  padding: 0 0.5rem;
}

.sidebar .nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  color: rgba(255, 255, 255, 0.78) !important;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.55rem 0.55rem;
  border-radius: 5px;
  text-decoration: none;
  line-height: 1.2;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.sidebar .nav-link:hover {
  background: var(--ts-purple-soft);
  color: #fff !important;
}

.sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff !important;
}

.admin-nav-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.admin-nav-label i {
  width: 16px;
  font-size: 0.92rem;
  opacity: 0.9;
}

.admin-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.35rem;
  border-radius: 999px;
  background: #dc3545;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

/* Right side container */
.flex-grow-1 {
  margin-left: 190px;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top bar */
.topbar {
  background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
  min-height: 48px;
  padding: 0 1rem;
  color: var(--bs-text-dark);
  display: flex;
  justify-content: flex-end !important;
  align-items: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
  position: static !important;
  z-index: auto;
}

.text-dark {
  color: var(--bs-text-dark) !important;
}

/* Topbar button */
.admin-topbar-button,
.btn.btn-dark {
  background: var(--ts-purple) !important;
  border-color: var(--ts-purple) !important;
  border-radius: 5px;
  font-weight: 600;
}

.admin-topbar-button:hover,
.btn.btn-dark:hover {
  background: #1d1c35 !important;
  border-color: #1d1c35 !important;
}

/* Main content */
main {
  background-color: var(--bs-primary-bg);
  padding: 1rem;
  overflow-y: auto;
  flex-grow: 1;
}

.admin-user-menu {
  position: relative;
}

.admin-user-menu-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid #e5e5e5;
  background: #fff;
  color: #262541;
  border-radius: 5px;
  padding: 0.25rem 0.45rem 0.25rem 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.admin-user-menu-button:hover,
.admin-user-menu-button:focus {
  background: #f7f7fb;
  color: #262541;
  outline: none;
}

.admin-user-menu-avatar,
.admin-user-menu-avatar-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50px;
  flex: 0 0 auto;
}

.admin-user-menu-avatar {
  background: #262541;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

.admin-user-menu-avatar-img {
  object-fit: cover;
  background: #f3f3f8;
}

.admin-user-menu-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-dropdown {
  border: 1px solid #eee;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  padding: 0.45rem;
  min-width: 210px;
}

.admin-user-dropdown .dropdown-header {
  color: #262541;
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 0.55rem 0.75rem;
}

.admin-user-dropdown .dropdown-header strong {
  color: #262541;
  font-size: 0.9rem;
}

.admin-user-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  border-radius: 5px;
  color: #262541;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
}

.admin-user-dropdown .dropdown-item:hover {
  background: #f3f3f8;
  color: #262541;
}

.admin-user-dropdown .dropdown-item.text-danger {
  color: #dc3545 !important;
}

.admin-user-dropdown .dropdown-divider {
  margin: 0.35rem 0;
}

.media-preview img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
}

.media-url {
    font-size: 12px;
    word-break: break-all;
}

.copy-btn {
    width: 100%;
}

