/* ==========================================================================
   BUSYBEE APP - Shared Application Styles
   ========================================================================== */

/* ==========================================================================
   APP LAYOUT
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg-secondary);
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  margin-left: 260px;
  transition: margin-left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.app-sidebar.collapsed ~ .app-main,
body.sidebar-collapsed .app-main {
  margin-left: 72px;
}

.app-content {
  flex: 1;
  padding: 24px;
  overflow-x: clip;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */
.app-sidebar {
  width: 260px;
  height: 100vh;
  /* Dynamic viewport units keep the bottom account card visible on mobile
     browsers where the address bar makes 100vh taller than the screen. */
  height: 100dvh;
  max-height: 100dvh;
  background: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1040;
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.app-sidebar.collapsed {
  width: 72px;
}

.app-sidebar.collapsed .sidebar-label,
.app-sidebar.collapsed .sidebar-brand-text,
.app-sidebar.collapsed .sidebar-nav-link span,
.app-sidebar.collapsed .sidebar-section-title,
.app-sidebar.collapsed .sidebar-user-info,
.app-sidebar.collapsed .sidebar-user-email,
.app-sidebar.collapsed .sidebar-bottom-text {
  display: none;
}

.app-sidebar.collapsed .sidebar-nav-link {
  justify-content: center;
  padding: 12px;
}

.app-sidebar.collapsed .sidebar-nav-link i {
  margin: 0;
}

.app-sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 16px 12px;
}

.app-sidebar.collapsed .sidebar-brand .brand-mark {
  margin: 0;
}

.app-sidebar.collapsed .sidebar-nav-section {
  padding: 8px 10px;
}

/* Sidebar Brand */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border-color);
  text-decoration: none;
}

.sidebar-brand .brand-mark {
  width: 36px;
  height: 36px;
  min-width: 36px;
  background: var(--gradient-yellow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.sidebar-brand:hover .brand-mark {
  transform: rotate(-10deg) scale(1.05);
}

.sidebar-brand-text {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-primary);
}

.sidebar-brand .sidebar-badge {
  margin-left: auto;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(245, 197, 24, 0.15);
  color: var(--yellow);
  letter-spacing: 0.05em;
}

/* Sidebar Nav Scroll */
.sidebar-nav-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-nav-scroll::-webkit-scrollbar {
  width: 4px;
}

.sidebar-nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav-scroll::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.sidebar-nav-divider {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* Sidebar Sections */
.sidebar-nav-section {
  padding: 12px 14px;
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding-left: 12px;
}

/* Sidebar Nav Links */
.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.sidebar-nav-link i {
  font-size: 1.1rem;
  color: var(--text-muted);
  width: 22px;
  text-align: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.sidebar-nav-link:hover {
  background: rgba(245, 197, 24, 0.08);
  color: var(--yellow);
}

.sidebar-nav-link:hover i {
  color: var(--yellow);
}

.sidebar-nav-link.active {
  background: var(--gradient-yellow);
  color: var(--black);
  font-weight: 600;
}

.sidebar-nav-link.active i {
  color: var(--black);
}

.sidebar-nav-link .sidebar-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(245, 197, 24, 0.15);
  color: var(--yellow);
}

.sidebar-nav-link.active .sidebar-badge {
  background: rgba(0, 0, 0, 0.15);
  color: var(--black);
}

/* Sidebar User */
.sidebar-user {
  padding: 16px 14px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border-color);
  margin-top: auto;
  flex: 0 0 auto;
  /* Keep the account block reachable even when the navigation is long. */
  position: sticky;
  bottom: 0;
  background: var(--bg-card);
  z-index: 2;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-user-card:hover {
  background: rgba(245, 197, 24, 0.08);
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.sidebar-user-info {
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.7rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.sidebar-user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Sidebar Bottom */
.sidebar-bottom {
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
/* The admin top header must stay pinned to the top of the viewport while the
   page scrolls. `overflow-x: visible` on the body is required: an overflow
   value other than `visible` on body turns it into a scroll container and
   silently breaks position: sticky in several browsers. Horizontal overflow
   is clipped by .app-content instead. */
body.role-admin {
  overflow-x: visible;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1030;
  gap: 16px;
  flex-wrap: wrap;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-toggle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-primary);
  font-size: 1.1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.topbar-toggle:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.topbar-breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.topbar-breadcrumb a:hover {
  color: var(--yellow);
}

.topbar-breadcrumb .current {
  color: var(--text-primary);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-breadcrumb i {
  font-size: 0.7rem;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 14px;
  min-width: 220px;
  transition: var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--yellow);
}

.topbar-search i {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.topbar-search input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  width: 100%;
}

.topbar-search input::placeholder {
  color: var(--text-muted);
}

.topbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition);
}

.topbar-icon-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.topbar-icon-btn .notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  background: var(--yellow);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

.topbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gradient-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.topbar-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.3);
}

/* ==========================================================================
   PROFILE DROPDOWN
   ========================================================================== */
.profile-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.profile-dropdown .topbar-avatar.dropdown-toggle::after {
  display: none;
}

.profile-dropdown-menu {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 8px;
  min-width: 240px;
  margin-top: 12px !important;
}

.profile-dropdown-menu .dropdown-divider {
  margin: 6px 4px;
  border-color: var(--border-color);
}

.profile-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 12px;
}

.profile-header-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: var(--gradient-yellow);
  color: var(--black);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-header-info {
  min-width: 0;
}

.profile-header-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-header-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-dropdown-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.profile-dropdown-menu .dropdown-item i {
  font-size: 1.05rem;
  color: var(--text-secondary);
  width: 20px;
  text-align: center;
  transition: all 0.15s ease;
}

.profile-dropdown-menu .dropdown-item:hover {
  background: var(--bg-card-alt);
  color: var(--text-primary);
  transform: translateX(2px);
}

.profile-dropdown-menu .dropdown-item:hover i {
  color: var(--yellow);
}

.profile-dropdown-menu .dropdown-item.active,
.profile-dropdown-menu .dropdown-item:active {
  background: var(--bg-card-alt);
  color: var(--text-primary);
}

.profile-dropdown-menu .profile-logout {
  color: #FF5F57;
}

.profile-dropdown-menu .profile-logout i {
  color: #FF5F57;
}

.profile-dropdown-menu .profile-logout:hover {
  background: rgba(255, 95, 87, 0.1);
  color: #FF5F57;
}

.profile-dropdown-menu .profile-logout:hover i {
  color: #FF5F57;
}

/* ==========================================================================
   AUTH PAGES
   ========================================================================== */
.auth-layout {
  min-height: 100vh;
  display: flex;
  background: var(--bg-primary);
}

.auth-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.auth-left-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #111111 0%, #1A1A1A 50%, #0E0E0E 100%);
}

.auth-left-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64' viewBox='0 0 56 64'%3E%3Cpath d='M28 0l24 14v28L28 56 4 42V14L28 0zm0 6L8 18v28l20 12 20-12V18L28 6z' fill='%23F5C518' fill-opacity='0.05'/%3E%3C/svg%3E");
  background-size: 56px 64px;
  opacity: 0.4;
}

.auth-left-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #FFFFFF;
  max-width: 400px;
}

.auth-left-content .brand-mark-lg {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: var(--gradient-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-size: 2rem;
  margin: 0 auto 24px;
  animation: beeBuzz 2s ease-in-out infinite;
}

.auth-left-content h2 {
  font-size: 1.8rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 12px;
}

.auth-left-content p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

.auth-left-glow {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 197, 24, 0.12) 0%, transparent 70%);
  bottom: -150px;
  right: -100px;
  z-index: 1;
}

.auth-right {
  width: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: var(--bg-secondary);
  overflow-x: hidden;
  overflow-y: auto;
}

.auth-form-wrapper {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}

.auth-topbar {
  position: absolute;
  top: 20px;
  inset-inline-end: 24px;
  z-index: 5;
}

.auth-right .language-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.auth-form-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.auth-form-header p a {
  color: var(--yellow);
  font-weight: 600;
}

.auth-form-header p a:hover {
  text-decoration: underline;
}

/* Auth brand logo */
.auth-head {
  text-align: center;
}

.auth-head .auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--yellow) 0%, var(--yellow-bright) 100%);
  box-shadow: 0 12px 28px rgba(245, 197, 24, 0.35);
  font-family: var(--font-primary);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #1A1A1A;
  animation: beeBuzz 2s ease-in-out infinite;
}

.auth-head .auth-logo i {
  font-size: 1.3rem;
  color: #1A1A1A;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

/* Auth Form Elements */
.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-form .form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card-alt);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: var(--font-primary);
  transition: var(--transition);
}

.auth-form .form-control:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.15);
  outline: none;
}

.auth-form .form-control::placeholder {
  color: var(--text-muted);
}

.auth-form .input-group {
  position: relative;
}

.auth-form .input-group .form-control {
  padding-right: 44px;
}

.auth-form .input-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  transition: var(--transition);
}

.auth-form .input-toggle:hover {
  color: var(--yellow);
}

.auth-form .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-form .form-check-input {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card-alt);
  cursor: pointer;
  accent-color: var(--yellow);
}

.auth-form .form-check-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.auth-form .form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.auth-form .form-link {
  font-size: 0.85rem;
  color: var(--yellow);
  font-weight: 600;
  text-decoration: none;
}

.auth-form .form-link:hover {
  text-decoration: underline;
}

.auth-form .btn-auth {
  width: 100%;
  padding: 14px;
  font-size: 1rem;
}

.auth-form .divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
}

.auth-form .divider::before,
.auth-form .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-form .divider span {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.auth-form .social-btn {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: var(--transition);
  font-family: var(--font-primary);
}

.auth-form .social-btn:hover {
  border-color: var(--yellow);
  background: var(--bg-card-alt);
}

.auth-form .social-btn i {
  font-size: 1.2rem;
}

/* Auth social section (login / register) */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 22px 0 18px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-social {
  display: flex;
  gap: 12px;
}

.social-btn {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: var(--font-primary);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: var(--transition);
}

.social-btn i {
  font-size: 1.15rem;
  color: var(--text-secondary);
}

.social-btn:hover {
  border-color: var(--yellow);
  background: var(--bg-card-alt);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

/* Shared social button motion (sheen + lift) */
.social-btn {
  position: relative;
  overflow: hidden;
}

.social-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(245, 197, 24, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.65s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  pointer-events: none;
}

.social-btn:hover::after {
  left: 150%;
}

.social-btn > * {
  position: relative;
  z-index: 1;
}

.social-btn .social-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Google */
.social-btn-google {
  background: #ffffff;
  border-color: #dadce0;
  color: #3c4043;
}

.social-btn-google:hover {
  background: #ffffff;
  border-color: #4285f4;
  color: #202124;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(66, 133, 244, 0.22);
}

.social-btn-google:hover .social-icon {
  transform: rotate(-8deg) scale(1.12);
}

[data-theme="dark"] .social-btn-google {
  background: #2d2e34;
  border-color: #5f6368;
  color: #e8eaed;
}

[data-theme="dark"] .social-btn-google:hover {
  background: #3a3b41;
  border-color: #4285f4;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(66, 133, 244, 0.32);
}

/* GitHub */
.social-btn-github {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.social-btn-github:hover {
  background: #24292f;
  border-color: #24292f;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(36, 41, 47, 0.35);
}

.social-btn-github:hover .social-icon {
  transform: scale(1.15) rotate(8deg);
}

[data-theme="dark"] .social-btn-github:hover {
  background: #f5f5f5;
  border-color: #f5f5f5;
  color: #111111;
  box-shadow: 0 10px 24px rgba(255, 255, 255, 0.2);
}

/* Password Strength */
.password-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.password-strength .bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--border-color);
  transition: var(--transition);
}

.password-strength .bar.active {
  background: #FF5F57;
}

.password-strength .bar.active.medium {
  background: #FF9800;
}

.password-strength .bar.active.strong {
  background: #28C840;
}

.password-strength-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Verification Code Input */
.code-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0;
}

.code-inputs input {
  width: 52px;
  height: 58px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card-alt);
  color: var(--text-primary);
  transition: var(--transition);
}

.code-inputs input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.15);
  outline: none;
}

/* Success State */
.auth-success {
  text-align: center;
  padding: 40px 0;
}

.auth-success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(40, 200, 64, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: #28C840;
  font-size: 2rem;
}

.auth-success h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.auth-success p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  max-width: 360px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Error text */
.form-error {
  font-size: 0.8rem;
  color: #FF5F57;
  margin-top: 6px;
  display: none;
}

.form-error.show {
  display: block;
}

/* ==========================================================================
   ONBOARDING
   ========================================================================== */
.onboarding-layout {
  min-height: 100vh;
  display: flex;
  background: var(--bg-primary);
}

.onboarding-sidebar {
  width: 280px;
  background: linear-gradient(135deg, #111111 0%, #1A1A1A 50%, #0E0E0E 100%);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.onboarding-sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64' viewBox='0 0 56 64'%3E%3Cpath d='M28 0l24 14v28L28 56 4 42V14L28 0zm0 6L8 18v28l20 12 20-12V18L28 6z' fill='%23F5C518' fill-opacity='0.05'/%3E%3C/svg%3E");
  background-size: 56px 64px;
  opacity: 0.3;
}

.onboarding-sidebar .sidebar-brand {
  border-bottom: none;
  padding: 0 0 32px;
}

.onboarding-sidebar .sidebar-brand .brand-mark {
  background: var(--gradient-yellow);
}

.onboarding-sidebar .sidebar-brand .sidebar-brand-text {
  color: #FFFFFF;
}

.onboarding-steps {
  position: relative;
  z-index: 2;
}

.onboarding-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: var(--transition);
}

.onboarding-step .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
  transition: var(--transition);
}

.onboarding-step .step-text {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 500;
}

.onboarding-step.active .step-num {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--black);
}

.onboarding-step.active .step-text {
  color: #FFFFFF;
  font-weight: 600;
}

.onboarding-step.completed .step-num {
  background: rgba(40, 200, 64, 0.2);
  border-color: #28C840;
  color: #28C840;
}

.onboarding-step.completed .step-text {
  color: rgba(255, 255, 255, 0.6);
}

.onboarding-main {
  flex: 1;
  display: flex;
  /* flex-start + margin:auto on the card (see below) instead of align-items:center.
     With align-items:center a card taller than the viewport is centered and its
     TOP gets clipped above the scroll area — the step title/hex appears cut in
     half and cannot be scrolled to. The auto-margin pattern centres when there
     is spare room and starts at the top when there is not. */
  align-items: flex-start;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}

.onboarding-form-wrapper {
  width: 100%;
  max-width: 560px;
  margin: auto;
}

.onboarding-form-wrapper h2 {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.onboarding-form-wrapper > p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-size: 0.95rem;
}

.onboarding-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Tool Selection Cards */
.tool-selection-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.tool-select-card {
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-card);
  position: relative;
}

.tool-select-card:hover {
  border-color: rgba(245, 197, 24, 0.5);
  transform: translateY(-2px);
}

.tool-select-card.selected {
  border-color: var(--yellow);
  background: rgba(245, 197, 24, 0.08);
}

.tool-select-card.selected::after {
  content: '\F26A';
  font-family: 'bootstrap-icons';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.tool-select-card .tool-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(245, 197, 24, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  font-size: 1.3rem;
  margin: 0 auto 10px;
}

.tool-select-card.selected .tool-icon {
  background: var(--gradient-yellow);
  color: var(--black);
}

.tool-select-card .tool-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.tool-select-card .tool-desc {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Onboarding Complete */
.onboarding-complete {
  text-align: center;
  padding: 40px 0;
}

.onboarding-complete-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--gradient-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  color: var(--black);
  font-size: 2.5rem;
  animation: beeBuzz 2s ease-in-out infinite;
}

.onboarding-complete h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.onboarding-complete p {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 400px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* ==========================================================================
   ONBOARDING REDESIGN — step heads, fields, welcome, mobile bar
   ========================================================================== */

/* Alert */
.ob-alert {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 18px;
  border-radius: 14px;
  background: #FFF1F0;
  border: 1px solid rgba(255, 95, 87, 0.35);
  color: #8A1F1A;
  font-size: 0.88rem;
  box-shadow: 0 12px 32px rgba(255, 95, 87, 0.15);
}

.ob-alert i {
  color: #FF5F57;
  font-size: 1.15rem;
  line-height: 1.4;
}

.ob-alert ul {
  padding-left: 18px;
}

/* Sidebar footer */
.onboarding-sidebar-foot {
  position: relative;
  z-index: 2;
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  font-weight: 500;
}

.onboarding-sidebar-foot i {
  color: var(--yellow);
  font-size: 0.95rem;
}

/* Mobile top bar + progress */
.ob-mobile-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1040;
  background: linear-gradient(135deg, #111111 0%, #1A1A1A 50%, #0E0E0E 100%);
  padding: 12px 18px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}

.ob-mobile-bar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
}

.ob-mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.ob-mobile-brand span {
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.ob-mobile-brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--gradient-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-size: 0.9rem;
}

.ob-mobile-step-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.ob-progress-track {
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.ob-progress-fill {
  height: 100%;
  width: 20%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--yellow), #FFD84D);
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Step header inside each panel */
.ob-step-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 28px;
}

.ob-step-badge {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--gradient-yellow);
  color: var(--black);
  font-weight: 800;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(245, 197, 24, 0.35);
}

.ob-step-head h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin: 0 0 4px;
  color: var(--text-primary);
  line-height: 1.2;
}

.ob-step-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.5;
}

/* Labels */
.ob-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--text-primary);
  margin-bottom: 7px;
  letter-spacing: 0.01em;
}

.ob-label i {
  color: var(--yellow);
  font-size: 0.95rem;
}

.ob-req {
  color: #FF5F57;
}

/* Input wrapper with focus glow */
.ob-field {
  margin-bottom: 18px;
}

.ob-input-wrap {
  position: relative;
}

.ob-input-wrap .form-control {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.92rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.ob-input-wrap .form-control::placeholder {
  color: var(--text-muted);
}

.ob-input-wrap .form-control:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.15);
  background: var(--bg-card);
  color: var(--text-primary);
}

.ob-input-wrap select.form-control {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  cursor: pointer;
}

.ob-select-arrow {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.8rem;
  pointer-events: none;
}

.ob-error {
  display: block;
  color: #FF5F57;
  font-size: 0.8rem;
  margin-top: 5px;
  font-weight: 500;
}

.ob-input-wrap .is-invalid {
  border-color: #FF5F57 !important;
}

/* Action rows */
.onboarding-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.ob-btn-grow {
  flex: 1;
}

.ob-actions-center {
  justify-content: center;
}

.ob-btn-lg {
  min-width: 200px;
  padding: 13px 30px;
  font-size: 0.98rem;
}

/* Welcome hero */
.ob-welcome {
  text-align: center;
}

.ob-welcome-hex {
  width: 104px;
  height: 104px;
  border-radius: 30px;
  background: rgba(245, 197, 24, 0.12);
  border: 1.5px solid rgba(245, 197, 24, 0.3);
  color: var(--yellow);
  font-size: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  animation: beeBuzz 2.4s ease-in-out infinite;
  box-shadow: 0 0 0 12px rgba(245, 197, 24, 0.05);
}

.ob-welcome-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 26px;
}

.ob-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 50px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.76rem;
  font-weight: 600;
}

.ob-chip i {
  color: var(--yellow);
  font-size: 0.85rem;
}

.ob-welcome h2 {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.ob-welcome > p {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
  max-width: 440px;
  margin: 0 auto 8px;
}

.ob-skip-link {
  display: inline-block;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.25s ease;
}

.ob-skip-link:hover {
  color: var(--yellow);
}

/* Complete step extras */
.ob-complete-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 28px;
}

.ob-complete-tags span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 50px;
  background: rgba(40, 200, 64, 0.1);
  border: 1px solid rgba(40, 200, 64, 0.25);
  color: #1E8C34;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Tool cards polish */
.tool-select-card {
  outline: none;
}

.tool-select-card:focus-visible {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.18);
}

/* Main scroll area gets room for the fixed mobile bar */
@media (max-width: 991.98px) {
  .onboarding-main {
    padding: 96px 20px 32px;
    align-items: flex-start;
  }

  .onboarding-form-wrapper {
    max-width: 520px;
    margin: 0 auto;
  }
}

/* Tablet & down: earlier single column + tighter tools */
@media (max-width: 767.98px) {
  .onboarding-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tool-selection-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .tool-select-card {
    padding: 16px 10px;
  }

  .ob-step-head h2 {
    font-size: 1.3rem;
  }

  .ob-welcome h2 {
    font-size: 1.55rem;
  }
}

/* Phones */
@media (max-width: 420px) {
  .onboarding-main {
    padding: 92px 14px 24px;
  }

  .tool-selection-grid {
    grid-template-columns: 1fr 1fr;
  }

  .tool-select-card .tool-icon {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }

  .onboarding-actions {
    flex-direction: column;
  }

  .onboarding-actions .btn-bee,
  .onboarding-actions .btn-outline-bee {
    width: 100%;
  }

  .ob-btn-lg {
    min-width: 0;
    width: 100%;
  }

  .ob-step-head {
    gap: 12px;
  }

  .ob-step-badge {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1rem;
  }
}

/* ==========================================================================
   DATE INPUTS
   Native date fields are used across the app (forms + table filters).
   Without an explicit color-scheme the browser paints the value, the
   calendar indicator and the picker popup with the OS default scheme,
   which makes them unreadable/invisible inside the dark theme.
   ========================================================================== */
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"] {
  color-scheme: light;
  min-height: 38px;
  min-width: 0;
  cursor: pointer;
}

[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="datetime-local"],
[data-theme="dark"] input[type="month"],
[data-theme="dark"] input[type="week"],
[data-theme="dark"] input[type="time"] {
  color-scheme: dark;
}

.form-control-sm[type="date"],
.form-control-sm[type="datetime-local"],
.form-control-sm[type="month"],
.form-control-sm[type="week"],
.form-control-sm[type="time"] {
  min-height: 31px;
}

/* Keep the calendar trigger visible and clickable in both themes. */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.55;
  padding: 2px;
  border-radius: 6px;
  transition: var(--transition);
  filter: none;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover,
input[type="week"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
  background: rgba(245, 197, 24, 0.15);
}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="week"]::-webkit-calendar-picker-indicator,
[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator:hover,
[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator:hover,
[data-theme="dark"] input[type="week"]::-webkit-calendar-picker-indicator:hover,
[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator:hover {
  filter: invert(1);
}

/* Firefox renders the indicator through a pseudo element instead. */
input[type="date"]::-moz-calendar-picker-indicator,
input[type="datetime-local"]::-moz-calendar-picker-indicator,
input[type="month"]::-moz-calendar-picker-indicator,
input[type="week"]::-moz-calendar-picker-indicator,
input[type="time"]::-moz-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.55;
}

input[type="date"]::-moz-calendar-picker-indicator:hover,
input[type="datetime-local"]::-moz-calendar-picker-indicator:hover,
input[type="month"]::-moz-calendar-picker-indicator:hover,
input[type="week"]::-moz-calendar-picker-indicator:hover,
input[type="time"]::-moz-calendar-picker-indicator:hover {
  opacity: 1;
}

/* The editable segments must stay legible on both themes. */
input[type="date"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit,
input[type="month"]::-webkit-datetime-edit,
input[type="week"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
  color: var(--text-primary);
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

input[type="date"]:invalid::-webkit-datetime-edit,
input[type="date"].is-invalid::-webkit-datetime-edit {
  color: var(--text-primary);
}

input[type="date"].form-control,
input[type="datetime-local"].form-control,
input[type="month"].form-control,
input[type="week"].form-control,
input[type="time"].form-control {
  line-height: 1.4;
}

/* Empty date fields show a placeholder dash instead of a bare gap. */
input[type="date"]:not(:focus):invalid::-webkit-datetime-edit-year-field,
input[type="date"]:not(:focus):invalid::-webkit-datetime-edit-month-field,
input[type="date"]:not(:focus):invalid::-webkit-datetime-edit-day-field {
  opacity: 0.55;
}

@media (max-width: 575.98px) {
  input[type="date"],
  input[type="datetime-local"],
  input[type="month"],
  input[type="week"],
  input[type="time"] {
    width: 100%;
  }
}

/* ==========================================================================
   PAGE HEADER
   ========================================================================== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
}

.page-header p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.page-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   STAT CARDS
   ========================================================================== */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 20px;
  transition: var(--transition);
  height: 100%;
}

.stat-card:hover {
  border-color: rgba(245, 197, 24, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(245, 197, 24, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.stat-card-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.stat-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-card-change {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}

.stat-card-change.up {
  color: #28C840;
}

.stat-card-change.down {
  color: #FF5F57;
}

/* ==========================================================================
   DATA CARDS & TABLES
   ========================================================================== */
.data-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  height: 100%;
}

.app-content > .data-card {
  height: auto;
}

.data-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 12px;
}

.data-card-header h5 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.data-card-header h5 i {
  color: var(--yellow);
}

.data-card-body {
  padding: 20px;
}

.data-card-body.no-padding {
  padding: 0;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  background: var(--bg-card-alt);
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  text-align: left;
  white-space: nowrap;
}

.data-table tbody td {
  padding: 14px 16px;
  font-size: 0.88rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: var(--transition);
}

.data-table tbody tr:hover {
  background: rgba(245, 197, 24, 0.04);
}

.data-table .user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.data-table .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.data-table .user-avatar.yellow { background: rgba(245, 197, 24, 0.15); color: var(--yellow); }
.data-table .user-avatar.cyan { background: rgba(0, 188, 212, 0.15); color: #00BCD4; }
.data-table .user-avatar.green { background: rgba(40, 200, 64, 0.15); color: #28C840; }
.data-table .user-avatar.purple { background: rgba(156, 39, 176, 0.15); color: #9C27B0; }
.data-table .user-avatar.blue { background: rgba(33, 150, 243, 0.15); color: #2196F3; }
.data-table .user-avatar.orange { background: rgba(255, 152, 0, 0.15); color: #FF9800; }

.data-table .user-name {
  font-weight: 600;
}

.data-table .user-email {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Table actions */
.table-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-action-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.table-action-btn:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(245, 197, 24, 0.08);
}

.table-action-btn.danger:hover {
  border-color: #FF5F57;
  color: #FF5F57;
  background: rgba(255, 95, 87, 0.08);
}

/* ==========================================================================
   BADGES
   ========================================================================== */
.badge-bee {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
}

.badge-bee.yellow { background: rgba(245, 197, 24, 0.15); color: var(--yellow); }
.badge-bee.green { background: rgba(40, 200, 64, 0.15); color: #28C840; }
.badge-bee.red { background: rgba(255, 95, 87, 0.15); color: #FF5F57; }
.badge-bee.blue { background: rgba(33, 150, 243, 0.15); color: #2196F3; }
.badge-bee.purple { background: rgba(156, 39, 176, 0.15); color: #9C27B0; }
.badge-bee.cyan { background: rgba(0, 188, 212, 0.15); color: #00BCD4; }
.badge-bee.orange { background: rgba(255, 152, 0, 0.15); color: #FF9800; }
.badge-bee.dark { background: var(--bg-card-alt); color: var(--text-muted); border: 1px solid var(--border-color); }

/* ==========================================================================
   FILTER TABS
   ========================================================================== */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 4px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  background: transparent;
  font-family: var(--font-primary);
}

.filter-tab:hover {
  color: var(--text-primary);
}

.filter-tab.active {
  background: var(--gradient-yellow);
  color: var(--black);
  font-weight: 600;
}

/* ==========================================================================
   EMPTY STATE
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(245, 197, 24, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--yellow);
  font-size: 2rem;
}

.empty-state h5 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 360px;
  margin: 0 auto;
}

/* ==========================================================================
   TOAST NOTIFICATIONS
   ========================================================================== */
.toast-container-bee {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast-bee {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  max-width: 400px;
  animation: toastIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

.toast-bee.removing {
  animation: toastOut 0.3s ease forwards;
}

.toast-bee-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.toast-bee-icon.success { background: rgba(40, 200, 64, 0.15); color: #28C840; }
.toast-bee-icon.error { background: rgba(255, 95, 87, 0.15); color: #FF5F57; }
.toast-bee-icon.warning { background: rgba(245, 197, 24, 0.15); color: var(--yellow); }
.toast-bee-icon.info { background: rgba(33, 150, 243, 0.15); color: #2196F3; }

.toast-bee-content {
  flex: 1;
}

.toast-bee-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.toast-bee-message {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.toast-bee-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(40px); }
}

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: 18px 24px;
}

.modal-header .modal-title {
  font-size: 1.1rem;
  font-weight: 700;
}

.modal-header .btn-close {
  filter: var(--text-primary);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: 16px 24px;
}

/* ==========================================================================
   KANBAN BOARD
   ========================================================================== */
.kanban-board {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 16px;
  min-height: 400px;
}

.kanban-column {
  min-width: 280px;
  max-width: 320px;
  flex-shrink: 0;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.kanban-column-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 700;
}

.kanban-column-count {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
}

.kanban-cards {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.kanban-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.kanban-card:hover {
  border-color: rgba(245, 197, 24, 0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.kanban-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.kanban-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.kanban-card-avatars {
  display: flex;
}

.kanban-card-avatars .avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 700;
  margin-left: -6px;
  border: 2px solid var(--bg-card);
}

.kanban-card-avatars .avatar-sm:first-child {
  margin-left: 0;
}

/* ==========================================================================
   CHAT / CONNECT
   ========================================================================== */
.chat-layout {
  display: flex;
  height: calc(100vh - 130px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
}

.chat-sidebar {
  width: 320px;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
}

.chat-sidebar-header h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.chat-list {
  flex: 1;
  overflow-y: auto;
}

.chat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-color);
}

.chat-item:hover {
  background: rgba(245, 197, 24, 0.04);
}

.chat-item.active {
  background: rgba(245, 197, 24, 0.08);
  border-left: 3px solid var(--yellow);
}

.chat-item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}

.chat-item-info {
  flex: 1;
  min-width: 0;
}

.chat-item-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.chat-item-preview {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-item-meta {
  text-align: right;
  flex-shrink: 0;
}

.chat-item-time {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.chat-item-unread {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
}

/* Chat Main */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
}

.chat-main-header .chat-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-main-header .chat-user-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-main-header .chat-user-status {
  font-size: 0.75rem;
  color: #28C840;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-message {
  display: flex;
  gap: 10px;
  max-width: 70%;
}

.chat-message.sent {
  margin-left: auto;
  flex-direction: row-reverse;
}

.chat-message-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.chat-message.received .chat-message-bubble {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 4px;
}

.chat-message.sent .chat-message-bubble {
  background: var(--gradient-yellow);
  color: var(--black);
  border-bottom-right-radius: 4px;
}

.chat-message-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.chat-message.sent .chat-message-time {
  text-align: right;
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-input-area .form-control {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 24px;
  background: var(--bg-card-alt);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-primary);
}

.chat-input-area .form-control:focus {
  border-color: var(--yellow);
  outline: none;
}

.chat-send-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: var(--gradient-yellow);
  color: var(--black);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.chat-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(245, 197, 24, 0.4);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination-bee {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-bee-info {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pagination-bee-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}

.pagination-bee-btns button {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  font-family: var(--font-primary);
}

.pagination-bee-btns button:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.pagination-bee-btns button.active {
  background: var(--gradient-yellow);
  color: var(--black);
  border-color: transparent;
}

/* ==========================================================================
   SETTINGS / PROFILE SECTIONS
   ========================================================================== */
.settings-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 20px;
}

.settings-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.settings-section-header h5 {
  font-size: 1rem;
  font-weight: 700;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
}

.settings-row:last-child {
  border-bottom: none;
}

.settings-row-info h6 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.settings-row-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Toggle Switch */
.toggle-switch {
  width: 44px;
  height: 24px;
  background: var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
  border: none;
}

.toggle-switch.active {
  background: var(--yellow);
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.toggle-switch.active::after {
  transform: translateX(20px);
  background: var(--black);
}

/* ==========================================================================
   PROFILE PAGE
   ========================================================================== */
.profile-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 20px;
}

.profile-cover {
  height: 120px;
  background: linear-gradient(135deg, #111111, #1A1A1A);
  position: relative;
}

.profile-cover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='64' viewBox='0 0 56 64'%3E%3Cpath d='M28 0l24 14v28L28 56 4 42V14L28 0zm0 6L8 18v28l20 12 20-12V18L28 6z' fill='%23F5C518' fill-opacity='0.08'/%3E%3C/svg%3E");
  background-size: 56px 64px;
  opacity: 0.5;
}

.profile-info-section {
  padding: 0 24px 24px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  flex-wrap: wrap;
}

.profile-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-weight: 800;
  font-size: 1.5rem;
  border: 4px solid var(--bg-card);
  flex-shrink: 0;
}

.profile-info-text {
  padding-bottom: 4px;
}

.profile-info-text h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.profile-info-text p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   NOTIFICATION ITEMS
   ========================================================================== */
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

.notification-item:hover {
  background: rgba(245, 197, 24, 0.04);
}

.notification-item.unread {
  background: rgba(245, 197, 24, 0.04);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--yellow);
}

.notification-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notification-content {
  flex: 1;
  min-width: 0;
}

.notification-text {
  font-size: 0.88rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.notification-text strong {
  font-weight: 600;
}

.notification-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ==========================================================================
   ADMIN SPECIFIC
   ========================================================================== */
.admin-topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.admin-sidebar {
  border-right: 1px solid var(--border-color);
}

/* ==========================================================================
   RESPONSIVE - APP
   ========================================================================== */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }

  .app-sidebar.show {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
  }

  .app-main,
  .app-sidebar.collapsed ~ .app-main,
  body.sidebar-collapsed .app-main {
    margin-left: 0;
  }

  .sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    display: none;
  }

  .sidebar-overlay.show {
    display: block;
  }

  .topbar-toggle {
    display: flex;
  }

  /* Only the search that lives in the top bar is hidden on small screens;
     content search filters (.topbar-search inside cards/chat) must stay. */
  .app-topbar .topbar-search {
    display: none;
  }

  .auth-right {
    width: 100%;
    padding: 24px;
  }

  .auth-left {
    display: none;
  }

  .onboarding-sidebar {
    display: none;
  }

  .onboarding-main {
    /* keep clearance for the fixed .ob-mobile-bar (≈58px tall) so it never
       covers the step title on tablets/phones */
    padding: 92px 24px 24px;
  }

  .tool-selection-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .chat-sidebar {
    width: 100%;
  }

  .chat-main {
    display: none;
  }

  .chat-main.active {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1050;
  background: var(--bg-secondary);
  }

  .chat-layout {
    height: calc(100vh - 130px);
  }
}

@media (max-width: 575.98px) {
  .app-content {
    padding: 16px;
  }

  .app-topbar {
    gap: 10px;
    padding: 10px 14px;
  }

  .app-topbar .language-toggle {
    padding: 0 10px;
  }

  .app-topbar .language-toggle-label,
  .app-topbar .language-chevron {
    display: none;
  }

  .app-topbar .topbar-right {
    gap: 8px;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-header-actions {
    width: 100%;
  }

  .code-inputs input {
    width: 44px;
    height: 50px;
    font-size: 1.2rem;
  }

  .tool-selection-grid {
    grid-template-columns: 1fr 1fr;
  }

  .onboarding-form .form-row {
    grid-template-columns: 1fr;
  }

  .kanban-board {
    padding-bottom: 8px;
  }

  .kanban-column {
    min-width: 260px;
  }
}

/* ==========================================================================
   SCROLLBAR FOR APP
   ========================================================================== */
.app-sidebar::-webkit-scrollbar,
.chat-list::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.app-sidebar::-webkit-scrollbar-thumb,
.chat-list::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 2px;
}

/* ==========================================================================
   VIEW TOGGLE (LIST / KANBAN)
   ========================================================================== */
.view-toggle {
  display: flex;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.view-toggle-btn {
  padding: 6px 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-primary);
}

.view-toggle-btn.active {
  background: var(--gradient-yellow);
  color: var(--black);
}

.view-toggle-btn:hover:not(.active) {
  color: var(--yellow);
}

/* ==========================================================================
   SEARCH FILTER BAR
   ========================================================================== */
.search-filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-filter-bar .topbar-search {
  min-width: 200px;
}

/* ==========================================================================
   HELP PAGE
   ========================================================================== */
.help-search {
  max-width: 600px;
  margin: 0 auto 40px;
  position: relative;
}

.help-search .form-control {
  width: 100%;
  padding: 16px 20px 16px 48px;
  border: 2px solid var(--border-color);
  border-radius: 16px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font-primary);
}

.help-search .form-control:focus {
  border-color: var(--yellow);
  outline: none;
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.15);
}

.help-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

.help-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  height: 100%;
}

.help-category-card:hover {
  border-color: rgba(245, 197, 24, 0.4);
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.help-category-card .help-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(245, 197, 24, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  font-size: 1.4rem;
  margin: 0 auto 14px;
}

.help-category-card h5 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.help-category-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* FAQ Item */
.faq-app-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 10px;
  overflow: hidden;
}

.faq-app-button {
  width: 100%;
  padding: 16px 20px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-primary);
  text-align: left;
}

.faq-app-button i {
  color: var(--yellow);
  transition: transform 0.3s ease;
}

.faq-app-button.active i {
  transform: rotate(45deg);
}

.faq-app-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-app-body.open {
  max-height: 300px;
}

.faq-app-body-inner {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ==========================================================================
   SERVICE ASSISTANT CHAT WIDGET
   ========================================================================== */
.bee-chat-widget {
  position: fixed;
  left: auto;
  right: max(6px, env(safe-area-inset-right));
  bottom: max(6px, env(safe-area-inset-bottom));
  transform: none;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  /* The closed panel still occupies layout space; never let the empty
     container swallow clicks meant for the page beneath it. */
  pointer-events: none;
}

/* Public website assistant: bottom-left corner + AI badge */
.bee-chat-widget[data-mode="public"] {
  left: max(18px, env(safe-area-inset-left));
  right: auto;
  bottom: max(18px, env(safe-area-inset-bottom));
  align-items: flex-start;
  flex-direction: column-reverse;
}

.bee-chat-launcher {
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
  font-size: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  box-shadow: none;
  transition: none;
  position: relative;
  flex-shrink: 0;
  pointer-events: auto;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}

.bee-chat-launcher::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 96px;
  height: 96px;
  transform: translateX(-50%);
  border-radius: 50%;
  pointer-events: auto;
}

.bee-chat-launcher:focus-visible {
  outline: none;
}

.bee-chat-launcher:focus-visible::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 96px;
  height: 96px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 2px solid rgba(56, 217, 255, .85);
  box-shadow: 0 0 0 4px rgba(56, 217, 255, .15), 0 0 18px rgba(56, 217, 255, .55);
  pointer-events: none;
}

.bee-robot {
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 96px;
  height: 96px;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .35));
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s ease, filter .3s ease;
}

.bee-chat-launcher:hover .bee-robot {
  transform: translateX(-50%) scale(1.05);
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .4)) drop-shadow(0 0 14px rgba(36, 200, 255, .18));
}

.bee-chat-launcher.is-pressed .bee-robot {
  transform: translateX(-50%) scale(.94);
}

.bee-robot-shadow {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 62px;
  height: 14px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .5), rgba(0, 0, 0, .18) 45%, transparent 72%);
  filter: blur(2px);
  animation: beeRobotShadow 4.8s ease-in-out infinite;
}

.bee-robot-float {
  position: absolute;
  inset: 0;
  animation: beeRobotFloat 4.8s ease-in-out infinite;
  will-change: transform;
}

.bee-robot-head {
  position: absolute;
  left: 50%;
  top: 18px;
  width: 58px;
  height: 48px;
  margin-left: -29px;
  border-radius: 27px 27px 19px 19px / 31px 31px 21px 21px;
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, .32), transparent 28%),
    linear-gradient(145deg, #4a5058 0%, #22262c 30%, #0b0d10 62%, #050607 100%);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow:
    inset 0 2px 2px rgba(255, 255, 255, .24),
    inset 0 -9px 12px rgba(0, 0, 0, .85),
    0 7px 14px rgba(0, 0, 0, .45);
  transform-style: preserve-3d;
  transform: translate3d(var(--robot-head-tx, 0px), var(--robot-head-ty, 0px), 0) rotateY(var(--robot-head-x, 0deg)) rotateX(var(--robot-head-y, 0deg));
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
  z-index: 3;
}

.bee-robot-head-idle {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-origin: 50% 82%;
  animation: beeRobotHeadIdle 6.4s ease-in-out infinite;
}

.bee-robot-head-shine {
  position: absolute;
  top: 4px;
  left: 9px;
  right: 9px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .36), transparent);
  opacity: .55;
  filter: blur(.3px);
  pointer-events: none;
}

.bee-robot-face {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 12px;
  bottom: 8px;
  border-radius: 17px;
  background:
    radial-gradient(circle at 50% 22%, rgba(10, 51, 80, .85), transparent 48%),
    linear-gradient(180deg, #06121d 0%, #02070c 100%);
  border: 1px solid rgba(56, 217, 255, .18);
  box-shadow:
    inset 0 0 14px rgba(0, 174, 255, .14),
    inset 0 3px 7px rgba(0, 0, 0, .85);
  overflow: hidden;
}

.bee-robot-eyes {
  position: absolute;
  top: 9px;
  left: 50%;
  display: flex;
  gap: 12px;
  transform: translateX(-50%) translate(var(--robot-eye-x, 0px), var(--robot-eye-y, 0px));
  transition: transform .18s ease-out;
}

.bee-robot-eye {
  position: relative;
  width: 9px;
  height: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 50%;
  animation: beeRobotBlink 5.4s infinite;
}

.bee-robot-eye-core {
  display: block;
  width: 8px;
  height: 9px;
  border-radius: 50% 50% 46% 46%;
  background: radial-gradient(circle at 35% 28%, #f4ffff 0%, #8ff2ff 18%, #38d9ff 42%, #0b8dff 72%, #003b8f 100%);
  box-shadow:
    0 0 5px #5fe6ff,
    0 0 12px rgba(36, 200, 255, .9),
    0 0 22px rgba(0, 140, 255, .55),
    inset 0 0 3px #fff;
  transition: box-shadow .25s ease;
}

.bee-chat-launcher:hover .bee-robot-eye-core,
.bee-chat-launcher.is-curious .bee-robot-eye-core {
  box-shadow:
    0 0 7px #aef6ff,
    0 0 16px rgba(36, 200, 255, 1),
    0 0 28px rgba(0, 140, 255, .7),
    inset 0 0 4px #fff;
}

.bee-robot-smile {
  position: absolute;
  left: 50%;
  bottom: 7px;
  width: 18px;
  height: 9px;
  margin-left: -9px;
  border-bottom: 2px solid rgba(140, 235, 255, .9);
  border-radius: 0 0 50% 50%;
  box-shadow: 0 2px 6px rgba(0, 180, 255, .55);
  transition: width .25s ease, height .25s ease, margin-left .25s ease;
}

.bee-chat-launcher:hover .bee-robot-smile,
.bee-chat-launcher.is-curious .bee-robot-smile {
  width: 20px;
  height: 11px;
  margin-left: -10px;
}

.bee-robot-ear {
  position: absolute;
  top: 17px;
  width: 11px;
  height: 22px;
  border-radius: 7px;
  background: linear-gradient(145deg, #4a5058 0%, #1b1e23 45%, #07080a 100%);
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .22),
    inset 0 -4px 6px rgba(0, 0, 0, .8),
    0 4px 8px rgba(0, 0, 0, .35);
  z-index: 2;
}

.bee-robot-ear::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 3px;
  width: 3px;
  height: 10px;
  border-radius: 3px;
  background: linear-gradient(180deg, #6ff0ff, #0b8dff);
  box-shadow: 0 0 6px rgba(56, 217, 255, .9);
  opacity: .9;
}

.bee-robot-ear-left {
  left: -9px;
  transform: rotateY(18deg) rotate(-3deg);
}

.bee-robot-ear-right {
  right: -9px;
  transform: rotateY(-18deg) rotate(3deg);
}

.bee-robot-antenna {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 2px;
  height: 20px;
  margin-left: -1px;
  border-radius: 2px;
  background: linear-gradient(180deg, #9aa3ad 0%, #3a3f46 60%, #1b1e23 100%);
  transform-origin: 50% 100%;
  animation: beeRobotAntenna 5s ease-in-out infinite;
  z-index: 4;
}

.bee-robot-antenna-tip {
  position: absolute;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #f4ffff 0%, #8ff2ff 22%, #38d9ff 48%, #0b8dff 100%);
  box-shadow:
    0 0 7px #5fe6ff,
    0 0 15px rgba(36, 200, 255, .9),
    0 0 24px rgba(0, 140, 255, .6);
  animation: beeRobotTip 2.4s ease-in-out infinite;
}

.bee-robot-body {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 44px;
  height: 34px;
  margin-left: -22px;
  border-radius: 16px 16px 14px 14px;
  background:
    radial-gradient(circle at 32% 20%, rgba(255, 255, 255, .2), transparent 30%),
    linear-gradient(155deg, #454b53 0%, #1d2126 38%, #090b0e 75%, #040506 100%);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .2),
    inset 0 -7px 10px rgba(0, 0, 0, .85),
    0 6px 12px rgba(0, 0, 0, .4);
  transform-origin: 50% 0;
  transform: rotateY(var(--robot-body-x, 0deg)) rotateX(var(--robot-body-y, 0deg));
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1);
  z-index: 2;
}

.bee-robot-body-idle {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  transform-origin: 50% 0;
  animation: beeRobotBodyIdle 6.8s ease-in-out infinite;
}

.bee-robot-chest {
  position: absolute;
  top: 9px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #f4ffff 0%, #8ff2ff 22%, #38d9ff 48%, #0b8dff 100%);
  box-shadow:
    0 0 6px #5fe6ff,
    0 0 14px rgba(36, 200, 255, .9),
    0 0 22px rgba(0, 140, 255, .55);
  animation: beeRobotCore 2.6s ease-in-out infinite;
}

.bee-robot-arm {
  position: absolute;
  top: 7px;
  width: 8px;
  height: 21px;
  border-radius: 5px;
  background: linear-gradient(145deg, #4a5058 0%, #1b1e23 50%, #07080a 100%);
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .2),
    inset 0 -3px 5px rgba(0, 0, 0, .8);
  transform-origin: 50% 0;
}

.bee-robot-arm::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 2px;
  width: 2px;
  height: 7px;
  border-radius: 2px;
  background: rgba(56, 217, 255, .85);
  box-shadow: 0 0 5px rgba(56, 217, 255, .8);
}

.bee-robot-arm-left {
  left: -6px;
  animation: beeRobotArmLeft 4.6s ease-in-out infinite;
}

.bee-robot-arm-right {
  right: -6px;
  animation: beeRobotArmRight 4.6s ease-in-out infinite;
}

.bee-robot-base {
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 30px;
  height: 7px;
  margin-left: -15px;
  border-radius: 50%;
  background: linear-gradient(180deg, #2a2e34, #07080a);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 3px 6px rgba(0, 0, 0, .5);
}

.bee-robot-close {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .9);
  background: #17170f;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
  display: none;
  place-items: center;
  pointer-events: none;
  z-index: 6;
}

.bee-robot-close::before,
.bee-robot-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  margin-left: -6px;
  margin-top: -1px;
  border-radius: 2px;
  background: #f5c518;
}

.bee-robot-close::before {
  transform: rotate(45deg);
}

.bee-robot-close::after {
  transform: rotate(-45deg);
}

.bee-chat-widget.open .bee-chat-launcher::before {
  display: none;
}

.bee-chat-widget.open .bee-chat-launcher:focus-visible::after {
  bottom: 0;
  width: 48px;
  height: 48px;
}

.bee-chat-widget.open .bee-robot {
  opacity: 0;
  transform: translateX(-50%) scale(.8);
}

.bee-chat-widget.open .bee-robot-close {
  display: grid;
}

@keyframes beeRobotFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -5px, 0); }
}

@keyframes beeRobotShadow {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: .8; }
  50% { transform: translateX(-50%) scale(.86); opacity: .55; }
}

@keyframes beeRobotHeadIdle {
  0%, 100% { transform: rotate(-1.2deg) translateY(0); }
  50% { transform: rotate(1.4deg) translateY(-1px); }
}

@keyframes beeRobotBodyIdle {
  0%, 100% { transform: rotate(0.8deg); }
  50% { transform: rotate(-1deg); }
}

@keyframes beeRobotBlink {
  0%, 43%, 47%, 100% { transform: scaleY(1); }
  45% { transform: scaleY(.08); }
}

@keyframes beeRobotAntenna {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

@keyframes beeRobotTip {
  0%, 100% { opacity: .85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.15); }
}

@keyframes beeRobotCore {
  0%, 100% { opacity: .8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

@keyframes beeRobotArmLeft {
  0%, 100% { transform: rotate(8deg); }
  50% { transform: rotate(12deg); }
}

@keyframes beeRobotArmRight {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(-12deg); }
}


.bee-chat-panel {
  width: 392px;
  max-width: calc(100vw - 32px);
  height: 610px;
  max-height: calc(100vh - 116px);
  max-height: calc(100dvh - 116px);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 22px;
  box-shadow: 0 28px 80px -18px rgba(0, 0, 0, 0.45), 0 10px 30px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(22px) scale(0.95);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: bottom left;
}

.bee-chat-widget.open .bee-chat-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.bee-chat-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  background:
    radial-gradient(circle at 12% 15%, rgba(245, 197, 24, 0.24), transparent 38%),
    radial-gradient(circle at 92% 100%, rgba(0, 188, 212, 0.16), transparent 42%),
    linear-gradient(135deg, #211e15 0%, #11100c 100%);
  color: #fff;
  box-shadow: inset 0 3px 0 var(--yellow);
  overflow: hidden;
}

.bee-chat-header::after {
  content: "";
  position: absolute;
  inset: auto -24px -46px auto;
  width: 150px;
  height: 150px;
  border-radius: 32%;
  transform: rotate(28deg);
  border: 18px solid rgba(245, 197, 24, 0.07);
  pointer-events: none;
}

.bee-chat-header-avatar {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 14px;
  background: var(--gradient-yellow);
  color: #17150f;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 7px 18px -4px rgba(245, 197, 24, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.bee-chat-header-spark {
  position: absolute;
  top: -6px;
  inset-inline-end: -6px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #17150f;
  font-size: 0.58rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.bee-chat-header-info {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.bee-chat-header-title {
  font-weight: 900;
  font-size: 1.02rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.bee-chat-header-status {
  margin-top: 4px;
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.68);
  display: flex;
  align-items: center;
  gap: 6px;
}

.bee-chat-header-status span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #28C840;
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(40, 200, 64, 0.16);
  animation: beeChatStatus 2.2s ease-in-out infinite;
}

@keyframes beeChatStatus {
  0%, 100% { box-shadow: 0 0 0 3px rgba(40, 200, 64, 0.14); }
  50% { box-shadow: 0 0 0 6px rgba(40, 200, 64, 0.04); }
}

.bee-chat-header-close {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.bee-chat-header-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: rotate(90deg);
}

.bee-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 11px;
  background:
    radial-gradient(circle at 100% 0%, rgba(245, 197, 24, 0.055), transparent 34%),
    var(--bg-card);
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 197, 24, 0.35) transparent;
}

.bee-chat-messages::-webkit-scrollbar {
  width: 6px;
}

.bee-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(245, 197, 24, 0.35);
  border-radius: 999px;
}

.bee-chat-msg {
  max-width: 84%;
  padding: 11px 14px;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.58;
  word-break: break-word;
  animation: beeChatIn 0.25s ease;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.045);
}

@keyframes beeChatIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.bee-chat-msg.bot {
  align-self: flex-start;
  background: var(--bg-card-alt);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-bottom-left-radius: 5px;
}

[dir="rtl"] .bee-chat-msg.bot {
  align-self: flex-end;
  border-bottom-left-radius: 16px;
  border-bottom-right-radius: 5px;
}

.bee-chat-msg.user {
  align-self: flex-end;
  background: var(--gradient-yellow);
  color: var(--black);
  border-bottom-right-radius: 5px;
  box-shadow: 0 6px 18px -6px rgba(245, 197, 24, 0.65);
}

[dir="rtl"] .bee-chat-msg.user {
  align-self: flex-start;
  border-bottom-right-radius: 16px;
  border-bottom-left-radius: 5px;
}

.bee-chat-msg.typing {
  display: flex;
  gap: 5px;
  align-items: center;
  padding: 12px 16px;
}

.bee-chat-msg.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: beeChatTyping 1.2s ease-in-out infinite;
}

.bee-chat-msg.typing span:nth-child(2) { animation-delay: 0.2s; }
.bee-chat-msg.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes beeChatTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.bee-chat-quick {
  padding: 10px 18px 13px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.bee-chat-quick-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 9px;
}

.bee-chat-quick-title i {
  color: var(--yellow);
  font-size: 0.8rem;
}

.bee-chat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.bee-chat-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color);
  background: var(--bg-card-alt);
  color: var(--text-primary);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.bee-chat-chip i {
  color: var(--yellow);
  font-size: 0.82rem;
}

.bee-chat-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 197, 24, 0.7);
  background: rgba(245, 197, 24, 0.1);
  color: var(--text-primary);
}

.bee-chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.bee-chat-input input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border-color);
  background: var(--bg-card-alt);
  color: var(--text-primary);
  border-radius: 50px;
  padding: 10px 16px;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.bee-chat-input input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.12);
}

.bee-chat-input input:disabled {
  opacity: 0.65;
}

.bee-chat-input button {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border: none;
  border-radius: 50%;
  background: var(--gradient-yellow);
  color: var(--black);
  font-size: 1.05rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.bee-chat-input button:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(245, 197, 24, 0.4);
}

.bee-chat-input button:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.bee-chat-footnote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 14px 10px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 600;
}

.bee-chat-footnote i {
  color: var(--yellow);
  font-size: 0.72rem;
}

.bee-chat-action {
  display: inline-block;
  margin: 6px 6px 0 0;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--yellow, #f5c518);
  background: transparent;
  color: var(--text-primary, #1a1a1a);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.bee-chat-action:hover {
  background: var(--yellow, #f5c518);
  color: var(--black, #000);
}

@media (min-width: 992px) {
  .public-site .back-to-top {
    bottom: 108px;
  }
}

@media (max-width: 575.98px) {
  .bee-chat-widget {
    right: 0;
    left: 0;
    bottom: 0;
    transform: none;
    align-items: flex-end;
    padding: 0 max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left));
    pointer-events: none;
  }

  .public-site .back-to-top {
    bottom: 92px;
    right: 18px;
  }

  .bee-chat-launcher {
    pointer-events: auto;
  }

  .bee-chat-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(58px + env(safe-area-inset-bottom));
    top: auto;
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 94px);
    height: calc(100dvh - 94px);
    max-height: calc(100vh - 94px);
    max-height: calc(100dvh - 94px);
    margin-bottom: 0;
    border-radius: 22px 22px 0 0;
    transform: translateY(115%);
    transform-origin: bottom center;
    pointer-events: none;
  }

  .bee-chat-widget.open .bee-chat-panel {
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .bee-chat-header {
    padding: 15px 16px;
  }

  .bee-chat-quick {
    padding: 9px 14px 11px;
  }

  .bee-chat-messages {
    padding: 15px 14px 12px;
  }

  .bee-chat-widget[data-mode="public"] {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0 max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    align-items: flex-start;
  }

  .bee-chat-widget[data-mode="public"] .bee-chat-panel {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bee-chat-launcher,
  .bee-robot,
  .bee-robot-head,
  .bee-robot-body,
  .bee-robot-eyes,
  .bee-chat-panel,
  .bee-chat-msg,
  .bee-chat-chip,
  .bee-chat-input button,
  .bee-chat-header-close {
    transition: none;
  }

  .bee-robot-float,
  .bee-robot-shadow,
  .bee-robot-head-idle,
  .bee-robot-body-idle,
  .bee-robot-eye,
  .bee-robot-antenna,
  .bee-robot-antenna-tip,
  .bee-robot-chest,
  .bee-robot-arm,
  .bee-chat-header-status span,
  .bee-chat-msg,
  .bee-chat-msg.typing span {
    animation: none;
  }
}

/* Language switcher in dashboard topbars */
.app-topbar .language-toggle {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.app-topbar .language-toggle:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* ==========================================================================
   RTL (Dari) dashboard adjustments
   ========================================================================== */
@media (min-width: 992px) {
  [dir="rtl"] .app-main,
  [dir="rtl"] body.sidebar-collapsed .app-main {
    margin-left: 0;
    margin-right: 260px;
  }

  [dir="rtl"] body.sidebar-collapsed .app-main {
    margin-right: 72px;
  }

  [dir="rtl"] .app-sidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid var(--border-color);
  }
}

[dir="rtl"] .topbar-breadcrumb i.bi-chevron-right {
  transform: scaleX(-1);
}

/* Keep the assistant launcher in its physical corner under RTL (Dari) */
[dir="rtl"] .bee-chat-widget {
  align-items: flex-start;
}

[dir="rtl"] .bee-chat-widget[data-mode="public"] {
  align-items: flex-end;
}

[dir="rtl"] .filter-tabs {
  flex-direction: row-reverse;
}

[dir="rtl"] .admin-stat-change,
[dir="rtl"] .stat-card-change,
[dir="rtl"] .health-status,
[dir="rtl"] .health-label {
  flex-direction: row-reverse;
}

/* Hide the fixed sidebar's internal scrollbar (keeps internal scroll) */
.app-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
}
.app-sidebar {
  scrollbar-width: none;
}

/* ==========================================================================
   RESPONSIVE DATA TABLES
   Every `table.data-table` receives a `bb-stack` class from app.js which
   copies each column heading onto the matching cell (`data-label`). On small
   screens the rows turn into readable cards instead of squished columns.
   ========================================================================== */
@media (max-width: 767.98px) {
  .data-table.bb-stack {
    display: block;
    border-collapse: separate;
  }

  .data-table.bb-stack thead {
    display: none;
  }

  .data-table.bb-stack tbody {
    display: block;
  }

  .data-table.bb-stack tbody tr {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px 4px;
    margin: 0 0 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }

  .data-table.bb-stack tbody tr:hover {
    background: var(--bg-card);
    border-color: rgba(245, 197, 24, 0.45);
    box-shadow: var(--shadow-md);
  }

  .data-table.bb-stack tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: auto;
    padding: 11px 14px;
    border-bottom: 1px dashed var(--border-color);
    text-align: end;
    white-space: normal;
  }

  .data-table.bb-stack tbody td:last-child {
    border-bottom: none;
  }

  .data-table.bb-stack tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: start;
  }

  .data-table.bb-stack tbody td:not([data-label])::before {
    display: none;
  }

  .data-table.bb-stack tbody td[colspan] {
    justify-content: center;
    text-align: center;
    border-bottom: none;
  }

  .data-table.bb-stack tbody td[colspan]::before {
    display: none;
  }

  .data-table.bb-stack tbody td > * {
    min-width: 0;
  }

  .data-table.bb-stack .user-cell {
    justify-content: flex-end;
    text-align: start;
  }

  .data-table.bb-stack .table-actions {
    justify-content: flex-end;
  }
}

/* ==========================================================================
   TEAMMATES TABLE
   Nine columns need a fixed, wrapping layout on wide cards. When the card
   itself becomes too narrow, the same table turns into stacked cards so no
   name, email, task badge or date is squeezed or clipped.
   ========================================================================== */
.bb-teammates-scroll {
  container: bb-teammates / inline-size;
  overflow-x: auto;
}

.bb-teammates-table {
  table-layout: fixed;
  width: 100%;
}

.bb-teammates-table thead th {
  padding-left: 12px;
  padding-right: 12px;
  vertical-align: bottom;
  white-space: normal;
  overflow-wrap: anywhere;
}

.bb-teammates-table tbody td {
  padding-left: 12px;
  padding-right: 12px;
  overflow-wrap: anywhere;
}

.bb-teammates-table th:nth-child(1) { width: 6%; }
.bb-teammates-table th:nth-child(2) { width: 15%; }
.bb-teammates-table th:nth-child(3) { width: 9%; }
.bb-teammates-table th:nth-child(4) { width: 16%; }
.bb-teammates-table th:nth-child(5) { width: 17%; }
.bb-teammates-table th:nth-child(6) { width: 7%; }
.bb-teammates-table th:nth-child(7) { width: 9%; }
.bb-teammates-table th:nth-child(8) { width: 9%; }
.bb-teammates-table th:nth-child(9) { width: 12%; }

.bb-teammates-table .bb-name-cell {
  min-width: 0;
}

.bb-task-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.bb-task-badges .badge-bee {
  max-width: 100%;
}

@container bb-teammates (max-width: 1099.98px) {
  .data-table.bb-teammates-table.bb-stack {
    display: block;
    border-collapse: separate;
  }

  .data-table.bb-teammates-table.bb-stack thead {
    display: none;
  }

  .data-table.bb-teammates-table.bb-stack tbody {
    display: block;
  }

  .data-table.bb-teammates-table.bb-stack tbody tr {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 6px 4px;
    margin: 0 0 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
  }

  .data-table.bb-teammates-table.bb-stack tbody tr:hover {
    background: var(--bg-card);
    border-color: rgba(245, 197, 24, 0.45);
    box-shadow: var(--shadow-md);
  }

  .data-table.bb-teammates-table.bb-stack tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: auto;
    padding: 11px 14px;
    border-bottom: 1px dashed var(--border-color);
    text-align: end;
    white-space: normal;
  }

  .data-table.bb-teammates-table.bb-stack tbody td:last-child {
    border-bottom: none;
  }

  .data-table.bb-teammates-table.bb-stack tbody td::before {
    content: attr(data-label);
    flex: 0 0 auto;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: start;
  }

  .data-table.bb-teammates-table.bb-stack tbody td:not([data-label])::before,
  .data-table.bb-teammates-table.bb-stack tbody td[colspan]::before {
    display: none;
  }

  .data-table.bb-teammates-table.bb-stack tbody td[colspan] {
    justify-content: center;
    text-align: center;
    border-bottom: none;
  }

  .data-table.bb-teammates-table.bb-stack tbody td > * {
    min-width: 0;
  }

  .data-table.bb-teammates-table.bb-stack .bb-name-cell {
    text-align: end;
  }

  .data-table.bb-teammates-table.bb-stack .bb-task-badges,
  .data-table.bb-teammates-table.bb-stack .table-actions {
    justify-content: flex-end;
  }
}

/* ==========================================================================
   TASK STATUS CARDS (circular design)
   ========================================================================== */
.task-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.task-status-card {
  --sc: var(--yellow);
  --sc-bg: rgba(245, 197, 24, 0.16);
  --sc-bg-hover: rgba(245, 197, 24, 0.24);
  --sc-border: rgba(245, 197, 24, 0.45);
  --sc-glow: rgba(245, 197, 24, 0.24);
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-primary);
  height: 100%;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              box-shadow 0.35s ease, border-color 0.35s ease;
}

.task-status-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--sc);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.task-status-card.blue {
  --sc: #2196F3;
  --sc-bg: rgba(33, 150, 243, 0.14);
  --sc-bg-hover: rgba(33, 150, 243, 0.24);
  --sc-border: rgba(33, 150, 243, 0.5);
  --sc-glow: rgba(33, 150, 243, 0.24);
}

.task-status-card.yellow {
  --sc: #F5C518;
  --sc-bg: rgba(245, 197, 24, 0.16);
  --sc-bg-hover: rgba(245, 197, 24, 0.26);
  --sc-border: rgba(245, 197, 24, 0.5);
  --sc-glow: rgba(245, 197, 24, 0.24);
}

.task-status-card.purple {
  --sc: #9C27B0;
  --sc-bg: rgba(156, 39, 176, 0.14);
  --sc-bg-hover: rgba(156, 39, 176, 0.24);
  --sc-border: rgba(156, 39, 176, 0.5);
  --sc-glow: rgba(156, 39, 176, 0.24);
}

.task-status-card.green {
  --sc: #28C840;
  --sc-bg: rgba(40, 200, 64, 0.14);
  --sc-bg-hover: rgba(40, 200, 64, 0.24);
  --sc-border: rgba(40, 200, 64, 0.5);
  --sc-glow: rgba(40, 200, 64, 0.24);
}

.task-status-card:hover {
  transform: translateY(-5px);
  border-color: var(--sc-border);
  box-shadow: 0 14px 34px var(--sc-glow);
}

.task-status-card:hover::before {
  transform: scaleX(1);
}

.task-status-circle {
  position: relative;
  width: 62px;
  height: 62px;
  min-width: 62px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--sc);
  background: var(--sc-bg);
  border: 3px solid var(--sc-border);
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94), background 0.35s ease;
}

.task-status-circle::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed var(--sc-border);
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.4s ease, transform 0.5s ease;
}

.task-status-card:hover .task-status-circle {
  transform: scale(1.08) rotate(-8deg);
  background: var(--sc-bg-hover);
}

.task-status-card:hover .task-status-circle::after {
  opacity: 0.7;
  transform: scale(1);
  animation: bb-status-spin 6s linear infinite;
}

@keyframes bb-status-spin {
  to { transform: rotate(360deg); }
}

.task-status-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.task-status-name {
  font-weight: 800;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-status-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.task-status-hint i {
  color: var(--sc);
  font-size: 1.2rem;
  line-height: 0;
}

.task-status-arrow {
  margin-inline-start: auto;
  color: var(--text-muted);
  font-size: 0.95rem;
  opacity: 0;
  transform: translateX(-6px);
  transition: var(--transition);
}

.task-status-card:hover .task-status-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--sc);
}

[dir="rtl"] .task-status-arrow {
  transform: translateX(6px) scaleX(-1);
}

[dir="rtl"] .task-status-card:hover .task-status-arrow {
  transform: translateX(0) scaleX(-1);
}

@media (max-width: 991.98px) {
  .task-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .task-status-grid {
    grid-template-columns: 1fr;
  }
}

/* Coloured dot used inside status badges */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  flex-shrink: 0;
}

.badge-bee .status-dot {
  box-shadow: 0 0 0 3px var(--bg-card);
}

/* ==========================================================================
   AUTH PAGE ENHANCEMENTS (depth, hover & motion)
   ========================================================================== */
.auth-left {
  background: #0E0E0E;
}

.auth-left-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(245, 197, 24, 0.14), transparent 45%),
              radial-gradient(circle at 85% 75%, rgba(245, 197, 24, 0.1), transparent 42%);
  animation: authAurora 14s ease-in-out infinite alternate;
}

@keyframes authAurora {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); }
  100% { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

.auth-left-float {
  position: absolute;
  color: rgba(245, 197, 24, 0.16);
  font-size: 3rem;
  z-index: 1;
  animation: authFloat 7s ease-in-out infinite;
}

.auth-left-float.f1 { top: 12%; left: 14%; animation-delay: 0s; }
.auth-left-float.f2 { top: 68%; left: 20%; font-size: 2rem; animation-delay: -2.2s; }
.auth-left-float.f3 { top: 24%; right: 16%; font-size: 2.4rem; animation-delay: -4s; }
.auth-left-float.f4 { bottom: 16%; right: 22%; animation-delay: -1.2s; }

@keyframes authFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-18px) rotate(10deg); }
}

.auth-left-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 28px;
  text-align: left;
}

.auth-left-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.auth-left-feature i {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 197, 24, 0.14);
  color: var(--yellow);
  font-size: 1rem;
}

.auth-left-feature:hover {
  transform: translateX(6px);
  background: rgba(245, 197, 24, 0.1);
  border-color: rgba(245, 197, 24, 0.35);
}

[dir="rtl"] .auth-left-feature:hover {
  transform: translateX(-6px);
}

[dir="rtl"] .auth-left-features {
  text-align: right;
}

/* Form panel gets a soft glow card on larger screens */
.auth-form-wrapper {
  position: relative;
}

.auth-form-wrapper::before {
  content: '';
  position: absolute;
  inset: -30px;
  border-radius: 32px;
  background: radial-gradient(circle at 50% 0%, rgba(245, 197, 24, 0.1), transparent 60%);
  opacity: 0;
  z-index: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.auth-form-wrapper:focus-within::before {
  opacity: 1;
}

.auth-form-wrapper > * {
  position: relative;
  z-index: 1;
}

.auth-form .form-control:hover {
  border-color: rgba(245, 197, 24, 0.55);
}

.auth-form .form-control:focus {
  background: var(--bg-card);
  transform: translateY(-1px);
}

.auth-form .btn-auth {
  position: relative;
  overflow: hidden;
}

.auth-form .btn-auth::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s ease;
}

.auth-form .btn-auth:hover::after {
  left: 140%;
}

/* ==========================================================================
   FORM CONTROLS, SELECTS & OPTIONS (unified design system)
   Applies to every dashboard/admin/page form. Overrides Bootstrap defaults
   with a bordered, rounded, theme-aware look plus a branded focus ring.
   ========================================================================== */
.form-control,
.form-select {
  border: 1.5px solid var(--border-color);
  border-radius: 11px;
  background-color: var(--bg-card-alt);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-primary);
  padding: 0.6rem 0.9rem;
  line-height: 1.5;
  transition: border-color 0.25s ease, box-shadow 0.25s ease,
              background-color 0.25s ease, transform 0.2s ease;
}

.form-select {
  padding-right: 2.5rem;
  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='%23555' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 14px 11px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.form-control:hover,
.form-select:hover {
  border-color: rgba(245, 197, 24, 0.55);
  background-color: var(--bg-card);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--yellow);
  background-color: var(--bg-card);
  color: var(--text-primary);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.16);
  outline: none;
}

.form-control:disabled,
.form-select:disabled,
.form-control[readonly] {
  background-color: var(--bg-secondary);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 1;
}

.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #FF5F57;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(255, 95, 87, 0.16);
}

/* Labels */
.form-label,
.col-form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

/* Native option list (stays readable in both themes) */
.form-select option,
.form-control option {
  background-color: var(--bg-card);
  color: var(--text-primary);
  padding: 8px;
}

/* Input group polish */
.input-group > .form-control,
.input-group > .form-select {
  border-radius: 11px;
}

.input-group-text {
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-card-alt);
  color: var(--text-muted);
  border-radius: 11px;
}

/* Sizes */
.form-control-sm,
.form-select-sm {
  border-radius: 9px;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.form-select-sm {
  padding-right: 2rem;
  background-position: right 0.6rem center;
  background-size: 12px 10px;
}

.form-control-lg,
.form-select-lg {
  border-radius: 13px;
  padding: 0.8rem 1.1rem;
  font-size: 1rem;
}

.form-select-lg {
  padding-right: 2.8rem;
}

/* Checkboxes & radios */
.form-check-input {
  border: 1.5px solid var(--border-color);
  background-color: var(--bg-card-alt);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.form-check-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, 0.16);
}

.form-check-input:checked {
  background-color: var(--yellow);
  border-color: var(--yellow);
}

.form-check-input:checked[type="checkbox"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='none' stroke='%23111' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3E%3C/svg%3E");
}

.form-check-input:checked[type="radio"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3E%3Ccircle r='2' fill='%23111'/%3E%3C/svg%3E");
}

/* RTL */
[dir="rtl"] .form-select {
  background-position: left 0.9rem center;
  padding-right: 0.9rem;
  padding-left: 2.5rem;
}

[dir="rtl"] .form-select-sm {
  background-position: left 0.6rem center;
  padding-right: 0.65rem;
  padding-left: 2rem;
}

[dir="rtl"] .form-select-lg {
  padding-right: 1.1rem;
  padding-left: 2.8rem;
}

/* ==========================================================================
   AUTH  EMAIL CHECKER, PASSWORD REQUIREMENTS & OTP VERIFY
   ========================================================================== */

/* Live email feedback */
.field-feedback {
  min-height: 1.1rem;
  margin-top: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--text-secondary);
}

.field-feedback.is-valid::before {
  content: "\2713 ";
  font-weight: 700;
}

.field-feedback.is-invalid::before {
  content: "\2715 ";
  font-weight: 700;
}

.field-feedback.is-valid {
  color: #28C840;
}

.field-feedback.is-invalid {
  color: #FF5F57;
}

.field-feedback.is-checking {
  color: var(--text-muted);
}

/* Input state colours driven by the checker */
.auth-form .form-control.bb-valid,
.auth-form .form-control.bb-valid:focus {
  border-color: #28C840;
  box-shadow: 0 0 0 3px rgba(40, 200, 64, 0.15);
}

.auth-form .form-control.bb-invalid,
.auth-form .form-control.bb-invalid:focus {
  border-color: #FF5F57;
  box-shadow: 0 0 0 3px rgba(255, 95, 87, 0.15);
}

.auth-form .form-control.bb-checking,
.auth-form .form-control.bb-checking:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.18);
}

/* Password requirements checklist */
.pw-checks {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px 16px;
}

.pw-checks li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  transition: color 0.25s ease;
}

.pw-checks li i {
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 0 0 auto;
  transition: color 0.25s ease, transform 0.25s ease;
}

.pw-checks li.ok {
  color: #28C840;
}

.pw-checks li.ok i {
  color: #28C840;
  transform: scale(1.12);
}

@media (max-width: 420px) {
  .pw-checks {
    grid-template-columns: 1fr;
  }
}

/* OTP verify  expiry timer pill */
.verify-timer {
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 auto 20px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: rgba(245, 197, 24, 0.12);
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: 999px;
  transition: var(--transition);
}

.verify-timer i {
  color: var(--yellow);
}

.verify-timer.is-expired {
  color: #FF5F57;
  background: rgba(255, 95, 87, 0.1);
  border-color: rgba(255, 95, 87, 0.35);
}

.verify-timer.is-expired i {
  color: #FF5F57;
}

/* Responsive tweak for the OTP boxes on small screens */
@media (max-width: 400px) {
  .code-inputs {
    gap: 7px;
  }

  .code-inputs input {
    width: 44px;
    height: 52px;
    font-size: 1.2rem;
  }
}


/* ==========================================================================
   AUTH PAGES  keep the floating language switcher clear of the brand logo
   On small phones the top-right language dropdown can sit over the BUSYBEE
   logo, so we push the form content down and top-align it.
   ========================================================================== */
@media (max-width: 483px) {
  .auth-right {
    align-items: flex-start;
    padding-top: 92px;
  }
}

/* Keep the auth card comfortable on narrow screens while preserving its
   background and rounded corners. */
@media (max-width: 575.98px) {
  .auth-form-wrapper {
    padding: 28px 20px;
    border-radius: 20px;
  }
}

/* Social sign-in buttons: press + keyboard focus polish */
.social-btn:active {
  transform: translateY(0) scale(0.985);
}

.social-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.35), 0 6px 16px rgba(0, 0, 0, 0.08);
}

.social-btn-google:focus-visible {
  box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.30), 0 6px 16px rgba(66, 133, 244, 0.18);
}

.social-btn-github:focus-visible {
  box-shadow: 0 0 0 3px rgba(36, 41, 47, 0.28), 0 6px 16px rgba(36, 41, 47, 0.20);
}

/* ==========================================================================
   RESPONSIVE POLISH (small screens)
   Stack side-by-side settings rows so their controls never crowd or push the
   layout wider than the viewport.
   ========================================================================== */
@media (max-width: 575.98px) {
  .settings-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .settings-row-info {
    min-width: 0;
  }
}

/* ==========================================================================
   WELCOME / ONBOARDING — mobile clearance, language switcher, RTL fitting
   ========================================================================== */

/* The mobile step bar is position:fixed. Always keep at least the bar height
   plus breathing room above the content, so the bar can never cover the top
   of the welcome card (half the hex logo + the title). */
@media (max-width: 991.98px) {
  .onboarding-main {
    padding: 92px 20px 32px;
    align-items: flex-start;
    overflow-y: visible;
  }
}

@media (max-width: 420px) {
  .onboarding-main {
    padding: 86px 14px 24px;
  }
}

.onboarding-layout {
  min-height: 100vh;
  min-height: 100dvh;
}

/* Mobile bar row: brand on the left, language switch + step counter right */
.ob-mobile-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

/* Language switcher sits on the dark bar / dark sidebar, so it needs light
   borders and light text instead of the light-theme variables. */
.ob-mobile-bar .language-toggle,
.onboarding-sidebar .language-toggle {
  border-color: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  padding: 7px 12px;
  font-size: 0.82rem;
}

.ob-mobile-bar .language-toggle:hover,
.onboarding-sidebar .language-toggle:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

.ob-mobile-bar .language-toggle > i,
.onboarding-sidebar .language-toggle > i {
  color: inherit;
}

.onboarding-sidebar-foot {
  flex-wrap: wrap;
  gap: 10px;
}

.ob-foot-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.78rem;
  font-weight: 500;
}

.ob-foot-secure i {
  color: var(--yellow);
  font-size: 0.95rem;
}

@media (max-width: 575.98px) {
  .ob-mobile-bar .language-toggle-label {
    display: none;
  }

  .ob-mobile-bar .language-toggle {
    padding: 7px 9px;
    gap: 5px;
  }
}

/* Translated titles must wrap instead of overflowing the card */
.onboarding-form-wrapper h2,
.ob-welcome h2,
.ob-welcome > p,
.ob-step-head h2 {
  overflow-wrap: break-word;
}

/* RTL (Farsi): mirror the directional arrows and the select caret */
[dir="rtl"] .onboarding-actions .bi-arrow-right,
[dir="rtl"] .onboarding-actions .bi-arrow-left,
[dir="rtl"] .ob-skip-link .bi-arrow-right {
  transform: scaleX(-1);
}

[dir="rtl"] .ob-input-wrap select.form-control {
  padding-right: 14px;
  padding-left: 40px;
}

[dir="rtl"] .ob-select-arrow {
  right: auto;
  left: 14px;
}

/* ==========================================================================
   SERVICE ASSISTANT - GOLD ACCENT
   The robot launcher (the "chatbot button") originally used a blue/cyan glow.
   Recolor every accent to the BusyBee gold so the button matches the brand.
   ========================================================================== */
.bee-robot-eye-core {
  background: radial-gradient(circle at 35% 28%, #fffbe8 0%, #ffe98a 18%, #f5c518 42%, #d9a207 72%, #6b4c00 100%);
  box-shadow:
    0 0 5px #ffe066,
    0 0 12px rgba(245, 197, 24, .9),
    0 0 22px rgba(201, 150, 8, .55),
    inset 0 0 3px #fff;
}

.bee-chat-launcher:hover .bee-robot-eye-core,
.bee-chat-launcher.is-curious .bee-robot-eye-core {
  box-shadow:
    0 0 7px #fff2b0,
    0 0 16px rgba(245, 197, 24, 1),
    0 0 28px rgba(201, 150, 8, .7),
    inset 0 0 4px #fff;
}

.bee-robot-smile {
  border-bottom-color: rgba(255, 226, 130, .95);
  box-shadow: 0 2px 6px rgba(245, 197, 24, .55);
}

.bee-robot-ear::after {
  background: linear-gradient(180deg, #ffe98a, #d9a207);
  box-shadow: 0 0 6px rgba(245, 197, 24, .9);
}

.bee-robot-face {
  border-color: rgba(245, 197, 24, .2);
  box-shadow:
    inset 0 0 14px rgba(245, 197, 24, .16),
    inset 0 3px 7px rgba(0, 0, 0, .85);
}

.bee-robot-antenna-tip {
  background: radial-gradient(circle at 35% 32%, #fffbe8 0%, #ffe98a 22%, #f5c518 48%, #d9a207 100%);
  box-shadow:
    0 0 7px #ffe066,
    0 0 15px rgba(245, 197, 24, .9),
    0 0 24px rgba(201, 150, 8, .6);
}

.bee-robot-chest {
  background: radial-gradient(circle at 35% 32%, #fffbe8 0%, #ffe98a 22%, #f5c518 48%, #d9a207 100%);
  box-shadow:
    0 0 6px #ffe066,
    0 0 14px rgba(245, 197, 24, .9),
    0 0 22px rgba(201, 150, 8, .55);
}

.bee-robot-arm::after {
  background: rgba(245, 197, 24, .9);
  box-shadow: 0 0 5px rgba(245, 197, 24, .85);
}

.bee-chat-launcher:focus-visible::after {
  border-color: rgba(245, 197, 24, .9);
  box-shadow: 0 0 0 4px rgba(245, 197, 24, .18), 0 0 18px rgba(245, 197, 24, .6);
}

.bee-chat-launcher:hover .bee-robot {
  filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .4)) drop-shadow(0 0 14px rgba(245, 197, 24, .22));
}

.bee-chat-header {
  background:
    radial-gradient(circle at 12% 15%, rgba(245, 197, 24, 0.26), transparent 38%),
    radial-gradient(circle at 92% 100%, rgba(245, 197, 24, 0.12), transparent 42%),
    linear-gradient(135deg, #211e15 0%, #11100c 100%);
}

/* ==========================================================================
   ADMIN DRAWER GUARANTEE (phones/tablets)
   High-specificity safety net so the fixed sidebar can never sit over the
   page content below the desktop breakpoint, even if another stylesheet
   re-declares sidebar/main properties.
   ========================================================================== */
@media (max-width: 991.98px) {
  body .app-layout .app-sidebar {
    transform: translateX(-100%) !important;
    visibility: hidden;
    box-shadow: none;
  }

  body .app-layout .app-sidebar.show {
    transform: translateX(0) !important;
    visibility: visible;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
  }

  body .app-layout .app-main,
  body .app-layout .app-sidebar.collapsed ~ .app-main,
  body.sidebar-collapsed .app-layout .app-main {
    margin-left: 0 !important;
    width: 100%;
  }

  body .app-layout .app-content {
    width: 100%;
    overflow-x: clip;
  }

  [dir="rtl"] body .app-layout .app-sidebar {
    transform: translateX(100%) !important;
  }
  [dir="rtl"] body .app-layout .app-sidebar.show {
    transform: translateX(0) !important;
  }
}

:root {
  --bb-skel-base: #E9E9E6;
  --bb-skel-alt: #F2F2EF;
  --bb-skel-shine: rgba(255, 216, 77, 0.30);
  --bb-skel-shine-soft: rgba(255, 255, 255, 0.42);
  --bb-skel-surface: var(--bg-card);
}

[data-theme="dark"] {
  --bb-skel-base: #2C2C2C;
  --bb-skel-alt: #353535;
  --bb-skel-shine: rgba(255, 212, 59, 0.18);
  --bb-skel-shine-soft: rgba(255, 255, 255, 0.07);
  --bb-skel-surface: var(--bg-card);
}

.bb-skel-host {
  position: relative !important;
  overflow: hidden;
}

.bb-skel-host > *:not(.bb-skel-layer) {
  opacity: 0;
  transition: opacity 0.22s ease;
}

.bb-skel-layer {
  box-sizing: border-box;
  position: absolute;
  inset: 0;
  z-index: 20;
  overflow: hidden;
  border-radius: inherit;
  background: var(--bb-skel-surface);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.bb-skel-layer.is-visible {
  opacity: 1;
}

.bb-skel-art,
.bb-skel,
.bb-skel-row,
.bb-skel-tr,
.bb-skel-bars {
  box-sizing: border-box;
  min-width: 0;
}

.bb-skel-art {
  position: absolute;
  inset: 0;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-content: start;
}

.bb-skel {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bb-skel-base);
}

.bb-skel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 12%, var(--bb-skel-shine-soft) 42%, var(--bb-skel-shine) 52%, transparent 82%);
  transform: translateX(-100%);
  animation: bb-skel-shimmer 1.55s ease-in-out infinite;
}

@keyframes bb-skel-shimmer {
  100% { transform: translateX(100%); }
}

.bb-skel--avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.bb-skel--avatar-sm {
  width: 30px;
  height: 30px;
}

.bb-skel--avatar-xl {
  width: 84px;
  height: 84px;
}

.bb-skel--image {
  width: 100%;
  height: 104px;
  border-radius: 12px;
}

.bb-skel--title {
  width: 52%;
  height: 14px;
  border-radius: 7px;
}

.bb-skel--line {
  width: 100%;
  height: 10px;
  border-radius: 6px;
}

.bb-skel--line-medium {
  width: 64%;
}

.bb-skel--line-short {
  width: 42%;
}

.bb-skel--value {
  width: 72%;
  height: 24px;
  border-radius: 9px;
}

.bb-skel--button {
  width: 104px;
  height: 34px;
  border-radius: 10px;
}

.bb-skel--pill {
  width: 72px;
  height: 18px;
  border-radius: 999px;
}

.bb-skel--bubble {
  height: 34px;
}

.bb-skel-bubble--left {
  width: 62%;
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
}

.bb-skel-bubble--right {
  width: 48%;
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
  background: var(--bb-skel-alt);
}

.bb-skel-art--stat {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: 38px 10px 24px 10px;
  column-gap: 14px;
  row-gap: 12px;
  align-content: center;
}

.bb-skel-art--stat > :nth-child(1) { grid-column: 1; grid-row: 1; }
.bb-skel-art--stat > :nth-child(2) { grid-column: 2; grid-row: 1; align-self: center; }
.bb-skel-art--stat > :nth-child(3) { grid-column: 1 / -1; grid-row: 3; }
.bb-skel-art--stat > :nth-child(4) { grid-column: 1 / -1; grid-row: 4; }

.bb-skel-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bb-skel-row .bb-skel--line:not(.bb-skel--line-short) {
  flex: 1;
}

.bb-skel-row .bb-skel--line-short {
  flex: 0 0 38%;
}

.bb-skel-art--list .bb-skel-row:nth-of-type(even) .bb-skel,
.bb-skel-art--table .bb-skel-tr:nth-of-type(even) .bb-skel {
  background: var(--bb-skel-alt);
}

.bb-skel-art--table {
  gap: 10px;
}

.bb-skel-tr {
  display: grid;
  grid-template-columns: 1.6fr 1fr 72px 0.8fr;
  gap: 14px;
  align-items: center;
  height: 26px;
}

.bb-skel--cell-a { width: 84%; }
.bb-skel--cell-b { width: 72%; }
.bb-skel--cell-d { width: 64%; }

.bb-skel-art--profile {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  grid-template-rows: 18px 12px 34px;
  column-gap: 18px;
  row-gap: 12px;
  align-content: center;
}

.bb-skel-art--profile > :nth-child(1) { grid-column: 1; grid-row: 1 / 4; }
.bb-skel-art--profile > :nth-child(2) { grid-column: 2; grid-row: 1; }
.bb-skel-art--profile > :nth-child(3) { grid-column: 2; grid-row: 2; }
.bb-skel-art--profile > :nth-child(4) { grid-column: 3; grid-row: 2 / 4; align-self: center; }

.bb-skel-art--product {
  display: grid;
  grid-template-columns: 120px 1fr;
  grid-template-rows: 104px 12px 10px 34px;
  column-gap: 16px;
  row-gap: 12px;
  align-content: center;
}

.bb-skel-art--product > :nth-child(1) { grid-column: 1; grid-row: 1 / 4; }
.bb-skel-art--product > :nth-child(2) { grid-column: 2; grid-row: 1; }
.bb-skel-art--product > :nth-child(3) { grid-column: 2; grid-row: 2; }
.bb-skel-art--product > :nth-child(4) { grid-column: 2; grid-row: 4; justify-self: start; }

.bb-skel-art--chart {
  display: grid;
  grid-template-rows: 14px 1fr;
  gap: 18px;
}

.bb-skel-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 80px;
  padding-top: 8px;
}

.bb-skel--bar {
  flex: 1;
  height: 48%;
  border-radius: 6px 6px 3px 3px;
}

.bb-skel-bars .bb-skel--bar:nth-child(2) { height: 64%; }
.bb-skel-bars .bb-skel--bar:nth-child(3) { height: 40%; }
.bb-skel-bars .bb-skel--bar:nth-child(4) { height: 78%; }
.bb-skel-bars .bb-skel--bar:nth-child(5) { height: 56%; }
.bb-skel-bars .bb-skel--bar:nth-child(6) { height: 70%; }
.bb-skel-bars .bb-skel--bar:nth-child(7) { height: 46%; }

.bb-skel-art--search {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 12px;
}

.bb-skel-art--search .bb-skel--line {
  flex: 1;
  height: 38px;
  border-radius: 10px;
}

.bb-skel-art--chat {
  justify-content: flex-end;
}

.bb-skel-image-host {
  position: relative;
  overflow: hidden;
}

.bb-skel-image-host::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: var(--bb-skel-base);
  pointer-events: none;
}

.bb-skel-image-host::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(100deg, transparent 12%, var(--bb-skel-shine-soft) 42%, var(--bb-skel-shine) 52%, transparent 82%);
  transform: translateX(-100%);
  animation: bb-skel-shimmer 1.55s ease-in-out infinite;
  pointer-events: none;
}

.bb-skel-image-host img {
  opacity: 0;
  transition: opacity 0.22s ease;
}

.bb-skel-image-host.is-skel-loaded::before,
.bb-skel-image-host.is-skel-loaded::after {
  opacity: 0;
}

.bb-skel-image-host.is-skel-loaded img {
  opacity: 1;
}

table.bf-table .bf-loading {
  position: relative;
  height: 54px;
  padding: 0 !important;
  color: transparent !important;
  text-align: left;
  overflow: hidden;
  background-image:
    linear-gradient(var(--bb-skel-base), var(--bb-skel-base)),
    linear-gradient(var(--bb-skel-alt), var(--bb-skel-alt)),
    linear-gradient(var(--bb-skel-base), var(--bb-skel-base)),
    linear-gradient(var(--bb-skel-alt), var(--bb-skel-alt));
  background-repeat: no-repeat;
  background-size: 18% 10px, 12% 10px, 10% 10px, 14% 10px;
  background-position: 16px 18px, 34% 18px, 58% 18px, 78% 18px;
}

table.bf-table .bf-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 12%, var(--bb-skel-shine-soft) 42%, var(--bb-skel-shine) 52%, transparent 82%);
  transform: translateX(-100%);
  animation: bb-skel-shimmer 1.55s ease-in-out infinite;
}

@media (max-width: 640px) {
  .bb-skel-art { padding: 14px; }
  .bb-skel-art--profile {
    grid-template-columns: 64px 1fr;
    grid-template-rows: 16px 10px 34px 34px;
    column-gap: 14px;
    row-gap: 10px;
  }
  .bb-skel-art--profile .bb-skel--avatar-xl { width: 64px; height: 64px; }
  .bb-skel-art--profile > :nth-child(1) { grid-row: 1 / 3; }
  .bb-skel-art--profile > :nth-child(2) { grid-row: 1; }
  .bb-skel-art--profile > :nth-child(3) { grid-row: 2; }
  .bb-skel-art--profile > :nth-child(4) { grid-column: 2; grid-row: 4; justify-self: start; }
  .bb-skel-art--product {
    grid-template-columns: 84px 1fr;
    grid-template-rows: 78px 12px 10px 34px;
    column-gap: 12px;
    row-gap: 10px;
  }
  .bb-skel-art--product .bb-skel--image { height: 78px; }
  .bb-skel-art--product > :nth-child(1) { grid-row: 1 / 4; }
  .bb-skel-art--product > :nth-child(4) { grid-row: 4; }
  .bb-skel-tr { grid-template-columns: 1.4fr 0.8fr 0.7fr; gap: 10px; }
  .bb-skel-tr > :nth-child(4) { display: none; }
  .bb-skel-row { gap: 8px; }
  .bb-skel-row .bb-skel--line-short { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bb-skel::after,
  .bb-skel-image-host::after,
  table.bf-table .bf-loading::after {
    animation: none;
    transform: none;
    opacity: 0.35;
  }
  .bb-skel-layer,
  .bb-skel-host > *:not(.bb-skel-layer),
  .bb-skel-image-host img {
    transition: none;
  }
}
