/* ========== Dropdown redesign ========== */
.dropdown-menu {
    padding: 8px !important;
    min-width: 200px;
    border: 1px solid hsl(var(--border-color) / 0.8) !important;
    border-radius: 14px !important;
    box-shadow: 0 10px 40px hsl(var(--black) / 0.12), 0 4px 12px hsl(var(--black) / 0.06) !important;
    background-color: hsl(var(--white)) !important;
}

.dropdown-menu.show {
    visibility: visible;
    opacity: 1;
    transform: scale(1) translateY(0) !important;
}

/* User dropdown (profile menu) */
.user-dropdown .dropdown-menu {
    width: 260px !important;
    padding: 10px !important;
    border-radius: 14px !important;
}

.user-dropdown .user-dropdown-item {
    border-radius: 10px;
    margin-bottom: 2px;
}

.user-dropdown .user-dropdown-item:last-child {
    margin-bottom: 0;
}

.user-dropdown-link {
    padding: 10px 14px !important;
    border-radius: 10px;
    gap: 12px !important;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-dropdown-link:hover {
    background: hsl(var(--section-bg)) !important;
    color: hsl(var(--base)) !important;
}

.user-dropdown-link .icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: hsl(var(--section-bg));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

.user-dropdown-link:hover .icon {
    background: hsl(var(--base) / 0.12);
    color: hsl(var(--base));
}

.user-dropdown .devide {
    border-top: 1px solid hsl(var(--border-color) / 0.6);
    margin: 6px 4px;
    list-style: none;
    padding: 0;
}

/* Dashboard header right: align theme toggle + user dropdown on desktop */
.dashboard-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.dashboard-header-right .theme-toggle {
    margin: 0;
    flex-shrink: 0;
}

.dashboard-header-right .lang-box {
    display: inline-flex;
    align-items: center;
}

/* Lang box dropdown in dashboard */
.dashboard-header-right .dropdown-menu {
    border-radius: 14px !important;
    box-shadow: 0 10px 40px hsl(var(--black) / 0.12) !important;
}

/* ========== Dark theme ========== */
.theme-dark {
    --white: 222 25% 12%;
    --section-bg: 222 25% 16%;
    --body-color: 220 15% 78%;
    --text-color: 220 12% 62%;
    --heading-color: 0 0% 98%;
    --border-color: 220 18% 28%;
    --background-color: 222 25% 10%;
    --box-shadow: 0 2px 15px hsl(var(--black) / 0.4);
}

.theme-dark body,
.theme-dark .dashboard-body,
.theme-dark .dashboard__right {
    background-color: hsl(var(--background-color)) !important;
}

.theme-dark .dashboard-header,
.theme-dark .dashboard-header-wrapper {
    background-color: hsl(var(--white)) !important;
    border-color: hsl(var(--border-color));
}

.theme-dark .sidebar-menu {
    background-color: hsl(var(--white)) !important;
    border-color: hsl(var(--border-color));
}

.theme-dark .user-info-wrapper {
    background-color: hsl(var(--section-bg)) !important;
}

.theme-dark .user-info-content .name {
    color: hsl(var(--heading-color));
}

.theme-dark .user-info-content .phone {
    color: hsl(var(--body-color));
}

.theme-dark .dropdown-menu {
    background-color: hsl(var(--white)) !important;
    border-color: hsl(var(--border-color)) !important;
    box-shadow: 0 10px 40px hsl(var(--black) / 0.4) !important;
}

.theme-dark .user-dropdown-link {
    color: hsl(var(--body-color)) !important;
}

.theme-dark .user-dropdown-link:hover {
    background: hsl(var(--section-bg)) !important;
    color: hsl(var(--heading-color)) !important;
}

.theme-dark .user-dropdown .devide {
    border-color: hsl(var(--border-color));
}

.theme-dark .sidebar-menu-list__link {
    color: hsl(var(--body-color));
}

.theme-dark .sidebar-menu-list__link:hover,
.theme-dark .sidebar-menu-list__item.active > .sidebar-menu-list__link {
    color: hsl(var(--heading-color));
}

.theme-dark .sidebar-menu .menu-title {
    color: hsl(var(--text-color));
}

.theme-dark .breadcrumb-plugins-wrapper h4,
.theme-dark .dashboard-body h4 {
    color: hsl(var(--heading-color));
}

.theme-dark .card,
.theme-dark .custom--card {
    background-color: hsl(var(--white)) !important;
    border-color: hsl(var(--border-color));
}

.theme-dark .form--control,
.theme-dark .form-control {
    background-color: hsl(var(--section-bg));
    border-color: hsl(var(--border-color));
    color: hsl(var(--heading-color));
}

.theme-dark .form--control::placeholder {
    color: hsl(var(--text-color));
}

.theme-dark .dashboard__inner,
.theme-dark .dashboard {
    background-color: hsl(var(--background-color));
}

.theme-dark .notification-bar,
.theme-dark .navigation-bar {
    background-color: hsl(var(--section-bg));
    color: hsl(var(--body-color));
}

.theme-dark .breadcrumb-plugins-wrapper form {
    background: hsl(var(--white));
    border-color: hsl(var(--border-color));
}

.theme-dark .sidebar-search .form--control {
    background: hsl(var(--section-bg));
    border-color: hsl(var(--border-color));
    color: hsl(var(--heading-color));
}

/* Theme toggle button */
.theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid hsl(var(--border-color));
    background: hsl(var(--section-bg));
    color: hsl(var(--body-color));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.theme-toggle:hover {
    background: hsl(var(--base) / 0.1);
    color: hsl(var(--base));
    border-color: hsl(var(--base) / 0.3);
}

.theme-dark .theme-toggle {
    background: hsl(var(--section-bg));
    border-color: hsl(var(--border-color));
    color: hsl(var(--body-color));
}

.theme-dark .theme-toggle:hover {
    background: hsl(var(--border-color));
    color: hsl(var(--heading-color));
}

.theme-toggle .theme-icon-light,
.theme-toggle .theme-icon-dark {
    font-size: 1.25rem;
}

.theme-toggle .theme-icon-dark {
    display: none;
}

.theme-toggle .theme-icon-light {
    display: inline-block;
}

.theme-dark .theme-toggle .theme-icon-dark {
    display: inline-block;
}

.theme-dark .theme-toggle .theme-icon-light {
    display: none;
}

/* Sidebar theme toggle full width */
.sidebar-theme-toggle .theme-toggle {
    max-width: 160px;
}

/* Logo: light vs dark (switch in dark mode) */
.light-show {
    display: inline-block !important;
}
.dark-show {
    display: none !important;
}
.theme-dark .light-show {
    display: none !important;
}
.theme-dark .dark-show {
    display: inline-block !important;
}

/* Sidebar logo: same size for both so layout doesn’t shift */
.sidebar-logo__link .sidebar-logo__img {
    max-height: 100%;
    width: auto;
    vertical-align: middle;
}

/* ========== Dark mode: fix all text for readability ========== */
.theme-dark .dashboard-body,
.theme-dark .dashboard__right {
    color: hsl(var(--body-color));
}

.theme-dark .dashboard-body p,
.theme-dark .dashboard-body span:not(.badge):not(.btn),
.theme-dark .dashboard-body li,
.theme-dark .dashboard__right p,
.theme-dark .dashboard__right span:not(.badge):not(.btn),
.theme-dark .dashboard__right li {
    color: inherit;
}

.theme-dark .text-muted,
.theme-dark .text--muted {
    color: hsl(var(--text-color)) !important;
}

.theme-dark .card .card-title,
.theme-dark .custom--card .card-title,
.theme-dark .card .card-header,
.theme-dark .custom--card .card-header,
.theme-dark .card-body,
.theme-dark .custom--card .card-body {
    color: hsl(var(--body-color));
}

.theme-dark .form--label,
.theme-dark .form-label,
.theme-dark label {
    color: hsl(var(--heading-color)) !important;
}

.theme-dark .table,
.theme-dark .table td,
.theme-dark .table th,
.theme-dark .table tbody tr td {
    color: hsl(var(--body-color));
}

.theme-dark .table thead th {
    color: hsl(var(--heading-color));
}

.theme-dark .alert {
    color: hsl(var(--body-color));
}

.theme-dark .alert-danger { background: hsl(0 50% 20%); border-color: hsl(0 40% 30%); color: hsl(0 10% 92%); }
.theme-dark .alert-success { background: hsl(142 40% 18%); border-color: hsl(142 35% 28%); color: hsl(142 20% 90%); }
.theme-dark .alert-info { background: hsl(210 40% 18%); border-color: hsl(210 35% 28%); color: hsl(210 20% 90%); }
.theme-dark .alert-warning { background: hsl(38 50% 18%); border-color: hsl(38 45% 28%); color: hsl(38 15% 92%); }

.theme-dark small {
    color: hsl(var(--text-color));
}

.theme-dark a:not(.btn):not(.nav-link) {
    color: hsl(var(--base));
}

.theme-dark a:not(.btn):not(.nav-link):hover {
    color: hsl(var(--base-l-200));
}

/* ========== Floating WhatsApp (customer care) ========== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    animation: whatsapp-bounce 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    color: #fff !important;
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-float:focus {
    color: #fff !important;
}

@keyframes whatsapp-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
