:root {
    --ulka-blue: #212f51;
    --ulka-blue-light: #2c3e6c;
    --ulka-orange: #f37021;
    --ulka-dark: #0f172a;
    --ulka-text-muted: #64748b;
    --ulka-primary: #212f51;
    /* rgb(33, 47, 81) */
    --ulka-secondary: #0ea5e9;
    --ulka-accent: #7c3aed;
    --admin-primary: #212f51;
    --admin-purple: #7c3aed;
    --ulka-radius-sm: 8px;
    --ulka-radius-md: 12px;
    --ulka-radius-lg: 16px;
    --ulka-space-sm: .5rem;
    --ulka-space-md: 1rem;
    --ulka-space-lg: 1.5rem;

    /* Bootstrap Overrides */
    --bs-primary: #212f51;
    --bs-primary-rgb: 33, 47, 81;
    --bs-primary-text-emphasis: #212f51;
    --bs-primary-bg-subtle: rgba(33, 47, 81, 0.1);
    --bs-primary-border-subtle: rgba(33, 47, 81, 0.2);
}


/* Base */
.cell-ellipsis {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logs-search {
    min-width: 180px;
}

.card-footer .pagination-sm .page-link {
    padding: .25rem .5rem;
}

.table-middle td {
    vertical-align: middle !important;
}

/* Auth layout + auth pages */
.auth-layout {
    min-height: 100vh;
    background: var(--bg-page);
    color: var(--text-primary);
    transition: background-color .2s ease, color .2s ease;
}

.auth-layout {
    --bg-page: #f3f6fb;
    --surface: #ffffff;
    --text-primary: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
}

.theme-dark .auth-layout,
.auth-layout.theme-dark,
[data-bs-theme="dark"] .auth-layout,
.auth-layout[data-bs-theme="dark"] {
    --bg-page: #0b1220;
    --surface: #121a2b;
    --text-primary: #e5e7eb;
    --text-muted: #94a3b8;
    --border-color: #273449;
}

.auth-layout .card,
.auth-layout .login-card-body,
.auth-layout .register-card-body {
    background: var(--surface) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary);
}

.auth-layout .form-control,
.auth-layout .form-select,
.auth-layout .input-group-text {
    background-color: var(--surface);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.auth-layout .form-control::placeholder {
    color: var(--text-muted);
}

.auth-layout .form-control:focus,
.auth-layout .form-select:focus {
    color: var(--text-primary);
    background-color: var(--surface);
    border-color: #60a5fa;
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .18);
}

.auth-layout .text-muted {
    color: var(--text-muted) !important;
}

.auth-skeleton-loader {
    border-radius: .6rem;
    background: linear-gradient(90deg, #e7ecf4 25%, #f7f9fc 37%, #e7ecf4 63%);
    background-size: 400% 100%;
    animation: authShimmer 1.2s ease-in-out infinite;
}

.theme-dark .auth-skeleton-loader,
[data-bs-theme="dark"] .auth-skeleton-loader {
    background: linear-gradient(90deg, #18243a 25%, #22304a 37%, #18243a 63%);
    background-size: 400% 100%;
}

@keyframes authShimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at 10% 20%, rgba(33, 47, 81, 0.15) 0%, transparent 40%), radial-gradient(circle at 90% 80%, rgba(243, 112, 33, 0.1) 0%, transparent 40%);
}

.auth-card {
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.5);
    max-width: 1100px;
    width: 100%;
    overflow: hidden;
    display: flex;
    min-height: 680px;
}

.auth-visual {
    background: linear-gradient(145deg, #18223c 0%, #2c3e6c 100%);
    padding: 60px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    width: 45%;
    position: relative;
    justify-content: space-between;
}

.auth-content {
    padding: 60px 80px;
    width: 55%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand-logo-container {
    background: white;
    padding: 20px;
    border-radius: 20px;
    display: inline-block;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: fit-content;
}

.brand-logo-container img {
    width: 260px;
    display: block;
}

.visual-text h2 {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 25px;
    color: #fff;
}

.visual-text p {
    font-size: 1.15rem;
    opacity: 0.9;
    line-height: 1.7;
    margin-bottom: 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 18px;
    border-radius: 12px;
    backdrop-filter: blur(5px);
    font-size: 0.95rem;
}

.auth-header h3 {
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--ulka-blue);
    margin-bottom: 10px;
}

.auth-header p {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

.auth-input {
    border: none !important;
    padding: 15px;
    font-weight: 500;
}

/* Auth inputs: add visible bordered style for login/register pages */
.auth-content .input-group {
    align-items: center;
    gap: 10px;
}

.auth-content .input-group .input-group-text {
    border: 1px solid var(--border-color);
    background: var(--surface);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-content .input-group .auth-input {
    border: 1px solid var(--border-color) !important;
    border-radius: 12px;
    padding: 12px 14px;
    background: var(--surface);
}

.btn-primary-ulka,
.btn-register-ulka {
    background: linear-gradient(135deg, #2c3e6c 0%, #18223c 100%);
    border: none;
    color: white;
    padding: 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 20px;
    box-shadow: 0 10px 20px rgba(33, 47, 81, 0.2);
    transition: all 0.3s;
}

.btn-primary-ulka:hover,
.btn-register-ulka:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(33, 47, 81, 0.3);
    filter: brightness(1.1);
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 35px 0;
    color: #94a3b8;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider:not(:empty)::before {
    margin-right: 1.5em;
}

.divider:not(:empty)::after {
    margin-left: 1.5em;
}

.btn-google {
    border: 2px solid #e2e8f0;
    background: #fff;
    padding: 14px;
    border-radius: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.2s;
}

.register-link,
.login-link {
    color: var(--ulka-orange);
    font-weight: 700;
    text-decoration: none;
}

.pending-card {
    max-width: 720px;
    margin: 40px auto;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(2, 6, 23, 0.12);
    background: var(--surface);
}

.pending-illustration {
    font-size: 64px;
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    color: white;
}

/* Landing */
.landing-nav {
    padding: 1.2rem 0;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.landing-brand,
.landing-link {
    color: var(--text-primary) !important;
}

.hero-section {
    padding: 100px 0;
    background: radial-gradient(circle at top right, color-mix(in srgb, var(--ulka-secondary) 12%, transparent) 0%, color-mix(in srgb, var(--surface) 95%, transparent) 50%);
    overflow: hidden;
    position: relative;
}

.hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(33, 47, 81, 0.1);
    color: var(--ulka-blue);
    border-radius: 50px;
    font-weight: 600;
    font-size: .85rem;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(to right, #2c3e6c, #0ea5e9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card {
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all .3s ease;
    height: 100%;
    background: var(--surface);
}

.feature-card h4 {
    color: var(--text-primary);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .05);
    border-color: var(--ulka-blue);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: color-mix(in srgb, var(--surface) 86%, var(--text-muted) 14%);
    color: var(--ulka-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.stats-bar {
    background: #18223c;
    color: #fff;
    padding: 60px 0;
    border-radius: 30px;
    margin-top: -50px;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-box {
    background: linear-gradient(135deg, #212f51 0%, #2c3e6c 100%);
    border-radius: 24px;
    padding: 4rem;
    color: #fff;
    text-align: center;
}

.btn-ulka {
    padding: .8rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    transition: transform .2s;
}

.btn-ulka:hover {
    transform: scale(1.05);
}

.theme-dark .hero-section {
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.08) 0%, #0b1220 60%);
}

.theme-dark .hero-badge {
    background: rgba(243, 112, 33, 0.2);
    color: #f37021;
}

.theme-dark .stats-bar {
    background: #121a2b;
    border-color: #273449;
}

.theme-dark footer {
    background: var(--surface) !important;
    border-top-color: var(--border-color) !important;
}

.theme-dark .feature-card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.45);
}

.theme-dark .text-gradient {
    background: linear-gradient(to right, #60a5fa, #fb923c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout & Sidebar fixes - Responsive */
.layout-fixed .app-header {
    position: fixed !important;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1037;
    height: 3.5rem;
    transition: left 0.3s ease-in-out;
}

.layout-fixed .app-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1038;
}

.layout-fixed .app-main {
    margin-top: 3.5rem;
    margin-left: 0;
    transition: margin-left 0.3s ease-in-out;
    min-height: calc(100vh - 3.5rem);
}

/* Large screens: Fixed Sidebar active */
@media (min-width: 992px) {
    .layout-fixed .app-header {
        left: 250px;
    }
    .sidebar-collapse.layout-fixed .app-header {
        left: 4.6rem;
    }
    .layout-fixed .app-main {
        margin-left: 250px;
    }
    .sidebar-collapse.layout-fixed .app-main {
        margin-left: 4.6rem;
    }
}

/* Navbar link visibility & premium hover effects (Refined Fix) */
.app-header .nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    color: #4b5563 !important;
}

.app-header .nav-link:hover {
    color: var(--ulka-primary) !important;
    background-color: rgba(33, 47, 81, 0.08);
}

[data-bs-theme="dark"] .app-header .nav-link {
    color: #94a3b8;
}

[data-bs-theme="dark"] .app-header .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Ensure icons inside follow parent color */
.app-header .navbar-nav .nav-link i {
    color: inherit;
    font-size: 1.2rem;
    line-height: 1;
}

/* Website Switcher override to keep its unique pill-shape */
.app-header .navbar-nav .nav-link.website-switcher-btn {
    padding: 6px 14px;
    border-radius: 999px;
    width: auto;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    color: #1f2937 !important;
}

[data-bs-theme="dark"] .app-header .navbar-nav .nav-link.website-switcher-btn {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc !important;
}

.sidebar-wrapper {
    height: calc(100% - 3.5rem);
    overflow-y: auto !important;
}

/* Dashboard reusable */
.business-dashboard-page .hub-header {
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    margin-top: -1rem;
    margin-bottom: 1.5rem;
    margin-left: calc(var(--bs-gutter-x) * -.5);
    margin-right: calc(var(--bs-gutter-x) * -.5);
}

.business-dashboard-page .metric-card {
    border: none;
    border-radius: 16px;
    transition: transform .2s, box-shadow .2s;
    background: var(--card-bg);
}

.business-dashboard-page .metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .05);
}

.business-dashboard-page .module-card {
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    transition: all .25s ease;
    text-align: center;
    padding: 1.5rem;
    height: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
}

.business-dashboard-page .module-card:hover {
    border-color: var(--ulka-accent);
    background: rgba(124, 58, 237, .04);
    transform: scale(1.03);
}

.business-dashboard-page .module-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    transition: all .3s;
}

.business-dashboard-page .module-card:hover .module-icon-wrap {
    transform: rotate(-5deg);
}

.business-dashboard-page .module-title {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: .25rem;
    font-size: .95rem;
}

.business-dashboard-page .module-desc {
    font-size: .75rem;
    color: var(--text-muted);
}

.business-dashboard-page .no-scrollbar::-webkit-scrollbar {
    display: none;
}

.business-dashboard-page.container-fluid {
    overflow-x: hidden;
}

.sa-dashboard {
    padding-top: 1rem;
}

.welcome-banner {
    background: linear-gradient(135deg, var(--admin-primary) 0%, var(--admin-purple) 100%);
    border-radius: 20px;
    padding: 30px;
    color: #fff;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(99, 102, 241, .2);
}

.welcome-banner::after {
    content: "";
    position: absolute;
    right: -50px;
    top: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, .1);
    border-radius: 50%;
}

.stat-box {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    transition: all .3s ease;
}

.stat-box:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 15px;
}

.sa-dashboard .module-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 18px;
    padding: 25px;
    height: 100%;
    transition: all .25s ease;
    text-decoration: none !important;
    display: flex;
    flex-direction: column;
}

.sa-dashboard .module-card:hover {
    border-color: var(--admin-purple);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .08);
    transform: translateY(-4px);
}

.sa-dashboard .module-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
}

.sa-dashboard .module-title {
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.sa-dashboard .module-desc {
    color: var(--text-muted);
    font-size: .85rem;
    line-height: 1.5;
    margin-bottom: 20px;
}

.module-footer {
    margin-top: auto;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: 0;
}

/* Menu builder */
.menu-item-row:focus {
    outline: none;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.3) !important;
    background-color: var(--bs-tertiary-bg) !important;
}

.menu-nested-list {
    list-style: none;
    margin: 0;
    padding-left: 28px;
    position: relative;
}

.menu-builder-container>.menu-nested-list {
    padding-left: 0;
}

.menu-nested-list:not(:empty) {
    border-left: 1px dashed var(--bs-border-color);
    margin-left: 10px;
}

.menu-builder-container>.menu-nested-list:not(:empty) {
    border-left: none;
    margin-left: 0;
}

.menu-nested-list li {
    position: relative;
    margin: 0;
    padding-bottom: 5px;
    padding-top: 5px;
}

.menu-nested-list li::before {
    content: "";
    position: absolute;
    top: 24px;
    left: -18px;
    width: 18px;
    height: 1px;
    border-top: 1px dashed var(--bs-border-color);
}

.menu-nested-list li:last-child::after {
    content: "";
    position: absolute;
    top: 24px;
    bottom: 0;
    left: -29px;
    width: 2px;
    background: var(--bs-body-bg);
}

.menu-item-row {
    background-color: var(--bs-body-secondary);
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    transition: all .2s ease;
    position: relative;
    z-index: 2;
}

.menu-item-row:hover {
    background-color: var(--bs-tertiary-bg);
    border-color: var(--bs-primary);
}

.shortcode-code {
    font-family: monospace;
    background: rgba(0, 0, 0, .1);
    padding: 2px 8px;
    border-radius: 4px;
    cursor: pointer;
}

/* Roles permission */
.permission-card {
    transition: all .2s ease;
    border: 1px solid var(--bs-border-color);
}

.permission-card:hover {
    border-color: var(--bs-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, .05);
}

.module-header {
    background-color: var(--bs-tertiary-bg);
    padding: 10px 15px;
    border-bottom: 1px solid var(--bs-border-color);
}

.action-label {
    font-size: .85rem;
    cursor: pointer;
}

.badge-view {
    background-color: #212f51;
}

.badge-create {
    background-color: #198754;
}

.badge-update {
    background-color: #ffc107;
    color: #000;
}

.badge-delete {
    background-color: #dc3545;
}

.badge-other {
    background-color: #6c757d;
}

/* Header switcher */
.website-switcher-btn {
    gap: 0.5rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.website-switcher-btn:hover {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    transform: translateY(-1px);
}

.website-switcher-btn .ws-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15) 0%, rgba(124, 58, 237, 0.05) 100%);
    border-radius: 10px;
    color: #7c3aed;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.website-switcher-btn .ws-label {
    max-width: 160px;
    line-height: 1.1;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

@media (max-width: 767.98px) {
    .website-switcher-btn .ws-label {
        display: none !important;
    }
    .website-switcher-btn {
        padding: 8px !important;
        border-radius: 50% !important;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .website-switcher-btn .ws-sub {
        display: none !important;
    }
}

.custom-dropdown-menu {
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 15px 35px rgba(0, 0, 0, .12), 0 5px 15px rgba(0, 0, 0, .04) !important;
    padding: 12px;
    min-width: 380px !important;
    max-width: 90vw;
    width: max-content;
    background-color: #ffffff;
    backdrop-filter: blur(10px);
}

.custom-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}
.custom-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 10px;
}
.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #d1d5db;
}

.website-switcher-item .dropdown-item {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.website-switcher-item .dropdown-item:hover {
    background-color: #f8fafc !important;
    border-color: rgba(124, 58, 237, 0.1);
    transform: translateX(4px);
}

.website-switcher-item .dropdown-item.active {
    background: linear-gradient(135deg, #212f51 0%, #2c3e6c 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(33, 47, 81, 0.2);
}

.website-switcher-main {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: -0.01em;
}

.website-switcher-sub {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 1px;
}

.website-switcher-item .dropdown-item.active .website-switcher-sub {
    color: rgba(255,255,255,0.7);
}

.theme-dark .website-switcher-btn,
[data-bs-theme="dark"] .website-switcher-btn {
    background: #1e293b;
    color: #f8fafc;
    border-color: #334155;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .2);
}

.theme-dark .website-switcher-btn:hover,
[data-bs-theme="dark"] .website-switcher-btn:hover {
    background: #334155;
    border-color: #475569;
}

.theme-dark .website-switcher-btn .ws-icon,
[data-bs-theme="dark"] .website-switcher-btn .ws-icon {
    background: rgba(139, 92, 246, .2);
    color: #a78bfa;
}

.theme-dark .dropdown-menu,
[data-bs-theme="dark"] .dropdown-menu {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .5);
}

.theme-dark .dropdown-menu input.form-control,
[data-bs-theme="dark"] .dropdown-menu input.form-control {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

.theme-dark .dropdown-menu input::placeholder,
[data-bs-theme="dark"] .dropdown-menu input::placeholder {
    color: #64748b;
}

.theme-dark .website-switcher-item .dropdown-item,
[data-bs-theme="dark"] .website-switcher-item .dropdown-item {
    color: #e5e7eb;
}

.theme-dark .website-switcher-item .dropdown-item:hover,
[data-bs-theme="dark"] .website-switcher-item .dropdown-item:hover {
    color: #fff;
}

.theme-dark .website-switcher-sub,
[data-bs-theme="dark"] .website-switcher-sub {
    color: #94a3b8;
}

.website-switcher-item .dropdown-item.active,
.website-switcher-item .dropdown-item:active {
    background-color: #212f51 !important;
    color: #fff !important;
}

.website-switcher-item .dropdown-item.active .website-switcher-sub {
    color: rgba(255, 255, 255, 0.8) !important;
}

.website-visit-link {
    opacity: 0.6;
    transition: all 0.2s;
    z-index: 5;
}

.website-visit-link:hover {
    opacity: 1;
    transform: scale(1.1);
    color: var(--ulka-primary) !important;
}

.website-switcher-item .dropdown-item.active+.website-visit-link {
    color: #fff !important;
    opacity: 0.9;
}

.website-switcher-item .dropdown-item.active+.website-visit-link:hover {
    opacity: 1;
}

.website-external-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.2);
    border-radius: 50%;
    color: #7c3aed;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
}

.website-external-link:hover {
    background: #7c3aed;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
    border-color: #7c3aed;
}

.theme-dark .website-external-link,
[data-bs-theme="dark"] .website-external-link {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.3);
    color: #a78bfa;
}

.theme-dark .website-external-link:hover,
[data-bs-theme="dark"] .website-external-link:hover {
    background: #7c3aed;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.theme-dark .dropdown-divider,
[data-bs-theme="dark"] .dropdown-divider {
    border-color: #334155;
}

.theme-dark .dropdown-header,
[data-bs-theme="dark"] .dropdown-header {
    color: #64748b;
}

/* Business profiles contacts */
.contact-row {
    transition: all .3s ease;
    border-left: 4px solid var(--bs-info) !important;
}

.contact-row:hover {
    border-color: var(--bs-primary) !important;
    background-color: var(--bs-secondary-bg) !important;
}

/* Users assign sites */
#assignSitesTable tbody tr {
    cursor: pointer;
}

/* Value settings */
.sortable-ghost {
    opacity: .6 !important;
    background-color: rgba(255, 255, 255, .02) !important;
    border: 1px dashed rgba(255, 255, 255, .06);
}

.sortable-chosen {
    background-color: rgba(255, 255, 255, .01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

#valueSettingWorkspace table th,
#valueSettingWorkspace table td {
    vertical-align: middle;
}

#valueSettingWorkspace table td .form-control.text-center {
    text-align: center;
}

#valueSettingWorkspace .btn-sm {
    padding: .25rem .5rem;
}

#valueSettingWorkspace td.text-end .btn {
    margin-left: .25rem;
}

.border-transparent-hover {
    border-color: transparent !important;
    background-color: transparent !important;
}

.border-transparent-hover:hover,
.border-transparent-hover:focus {
    border-color: var(--bs-border-color) !important;
    background-color: var(--bs-body-bg) !important;
}

.modal-card-wrap>.card {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    border-radius: .6rem;
    box-shadow: none !important;
    overflow: hidden;
}

.modal-backdrop.show {
    backdrop-filter: blur(3px) saturate(.9);
    background-color: rgba(0, 0, 0, .45);
}

/* Assets */
.file-preview-sm {
    width: 42px;
    height: 42px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.short-path-code {
    font-family: var(--bs-font-monospace);
    font-size: .75rem;
    background: var(--surface-2);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--sidebar-item-active);
    border: 1px solid var(--border-color);
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card.card-outline.card-primary .btn-group .btn-sm.btn-light {
    background: rgba(255, 255, 255, .03);
    color: var(--bs-body-color);
    border: 0;
    padding-left: .75rem;
    padding-right: .75rem;
}

.card.card-outline.card-primary .btn-group .btn-sm.btn-light i {
    font-size: 1.05rem;
    line-height: 1;
}

.card.card-outline.card-primary .btn-group .btn-sm.btn-light.border-start {
    border-left: 1px solid rgba(255, 255, 255, .06);
}

.card.card-outline.card-primary .btn-group .btn-sm.btn-light .text-info {
    color: var(--bs-info) !important;
}

.card.card-outline.card-primary .btn-group .btn-sm.btn-light .text-danger {
    color: var(--bs-danger) !important;
}

.asset-row-highlight {
    animation: assetRowPulse 1.2s ease-in-out 1;
}

.asset-row-highlight>td {
    background: rgba(25, 135, 84, .16) !important;
    box-shadow: inset 0 1px 0 rgba(25, 135, 84, .22), inset 0 -1px 0 rgba(25, 135, 84, .22);
}

.asset-row-highlight>td:first-child {
    border-left: 3px solid rgba(25, 135, 84, .85);
}

:root.theme-dark .asset-row-highlight>td,
:root[data-bs-theme="dark"] .asset-row-highlight>td {
    background: rgba(25, 135, 84, .28) !important;
    box-shadow: inset 0 1px 0 rgba(88, 214, 141, .45), inset 0 -1px 0 rgba(88, 214, 141, .45);
}

:root.theme-dark .asset-row-highlight>td:first-child,
:root[data-bs-theme="dark"] .asset-row-highlight>td:first-child {
    border-left: 4px solid #58d68d;
}

:root.theme-dark .asset-row-highlight .short-path-code,
:root[data-bs-theme="dark"] .asset-row-highlight .short-path-code {
    border-color: rgba(88, 214, 141, .55);
    background: rgba(88, 214, 141, .12);
}

@keyframes assetRowPulse {
    0% {
        background: rgba(25, 135, 84, .32);
    }

    100% {
        background: rgba(25, 135, 84, .16);
    }
}

#assetDropzone {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    padding: 20px;
    min-height: 140px;
    cursor: pointer;
}

#assetDropzone .dz-message {
    flex: 1 1 100%;
    text-align: center;
    pointer-events: none;
    margin-bottom: 8px;
}

#assetDropzone .dz-preview {
    display: flex !important;
    flex-direction: column;
    width: 150px !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    border-radius: 8px;
    padding: 6px !important;
    box-sizing: border-box;
}

#assetDropzone .dz-preview .dz-image {
    width: 100% !important;
    height: 96px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background: var(--surface-2);
}

#assetDropzone .dz-preview .dz-details {
    padding-top: 6px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#assetDropzone .dz-preview .dz-filename,
#assetDropzone .dz-preview .dz-size {
    font-size: .8rem;
    color: var(--bs-body-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#assetDropzone:hover {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, .06);
}

:root.theme-dark #assetDropzone,
:root[data-bs-theme="dark"] #assetDropzone {
    background: rgba(255, 255, 255, .02);
    border: 1px dashed rgba(255, 255, 255, .18);
    border-radius: 10px;
}

:root.theme-dark #assetDropzone .dz-message,
:root[data-bs-theme="dark"] #assetDropzone .dz-message {
    color: rgba(255, 255, 255, .82);
}

:root.theme-dark #assetDropzone .dz-message .text-muted,
:root[data-bs-theme="dark"] #assetDropzone .dz-message .text-muted {
    color: rgba(255, 255, 255, .58) !important;
}

:root.theme-dark #assetDropzone .dz-preview .dz-image,
:root[data-bs-theme="dark"] #assetDropzone .dz-preview .dz-image {
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .12);
}

:root.theme-dark #assetDropzone .dz-preview .dz-details,
:root[data-bs-theme="dark"] #assetDropzone .dz-preview .dz-details {
    color: rgba(255, 255, 255, .86);
}

#assetDropzone .dz-success-mark,
#assetDropzone .dz-error-mark,
#assetDropzone .dz-preview .dz-success-mark,
#assetDropzone .dz-preview .dz-error-mark {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    height: 0 !important;
}

/* Website configurations */
a.set-active-site {
    text-decoration: none !important;
    color: var(--bs-primary);
}

a.set-active-site:hover {
    text-decoration: none !important;
    color: #4a2bd6;
}

.custom-config-container {
    background-color: var(--bs-body-bg);
    border-color: var(--border-color);
}

.theme-dark .custom-config-container,
[data-bs-theme="dark"] .custom-config-container {
    background-color: var(--surface-2) !important;
    border-color: var(--border-color) !important;
}

.theme-dark .input-group-text,
[data-bs-theme="dark"] .input-group-text {
    background-color: var(--sidebar-item-hover) !important;
    border-color: var(--border-color) !important;
    color: var(--text-muted) !important;
}

.code-editor-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.code-editor-container {
    width: 100%;
    height: 260px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

.modal-editor-container {
    width: 100%;
    height: calc(100vh - 220px);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
}

/* Assigned users */
.user-avatar-circle {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--bs-primary) 0%, #7c3aed 100%);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.search-wrapper {
    background: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 2px;
    transition: all 0.2s;
}

.search-wrapper:focus-within {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), 0.15);
}

.access-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 16px;
    background: var(--bs-card-bg);
}

:root.theme-dark .search-wrapper,
:root[data-bs-theme="dark"] .search-wrapper {
    background: #0b1220;
    border-color: rgba(255, 255, 255, .04);
}

:root.theme-dark .select2-container--bootstrap-5 .select2-selection--single,
:root[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-selection--single {
    background: rgba(255, 255, 255, .02) !important;
    border: 1px solid rgba(255, 255, 255, .06) !important;
    color: #e6eef8 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

:root.theme-dark .select2-container--bootstrap-5 .select2-dropdown,
:root[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-dropdown {
    background: #071022 !important;
    border: 1px solid rgba(255, 255, 255, .04) !important;
    color: #e6eef8 !important;
    box-shadow: 0 10px 30px rgba(2, 6, 23, .6) !important;
    border-radius: 8px !important;
    padding: .35rem !important;
}

:root.theme-dark .select2-container--bootstrap-5 .select2-search__field,
:root[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-search__field {
    background: rgba(255, 255, 255, .02) !important;
    color: #e6eef8 !important;
    border: 1px solid rgba(255, 255, 255, .06) !important;
    padding: .35rem .5rem !important;
    border-radius: 6px !important;
}

:root.theme-dark .select2-container--bootstrap-5 .select2-results__option--highlighted,
:root[data-bs-theme="dark"] .select2-container--bootstrap-5 .select2-results__option--highlighted {
    background: rgba(124, 58, 237, .18) !important;
    color: #fff !important;
}

/* Website pages picker */
.custom-dropdown-menu .dropdown-item {
    cursor: pointer !important;
    transition: all .2s ease;
    border: 1px solid transparent;
}

.custom-dropdown-menu .dropdown-item:hover {
    background-color: #f8fafc !important;
    border-color: rgba(0,0,0,0.05);
    transform: scale(1.01);
}

.custom-dropdown-menu .dropdown-item:hover .text-muted,
.custom-dropdown-menu .dropdown-item:hover i {
    color: rgba(255, 255, 255, .8) !important;
}

.active-site-item {
    background-color: var(--bs-primary-bg-subtle) !important;
    color: var(--bs-primary) !important;
    border: 1px solid var(--bs-primary) !important;
}

.custom-dropdown-menu {
    max-height: 320px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45) !important;
    z-index: 1080;
}

.custom-context-card {
    overflow: visible !important;
}

.dropdown .custom-dropdown-menu {
    position: absolute !important;
    left: 0;
    right: auto;
    margin-top: .5rem;
}

.site-picker-btn {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color) !important;
    border-radius: 12px;
    padding: 10px 18px !important;
    cursor: pointer !important;
    transition: all .25s ease;
}

.site-picker-btn:hover {
    background-color: var(--bs-secondary-bg) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, .1) !important;
}

.site-icon-box {
    background: var(--bs-primary);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.search-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    padding: 0 12px;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.search-container:focus-within {
    border-color: #7c3aed;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1), 0 4px 12px rgba(0,0,0,0.05);
    background: #ffffff;
    max-width: 420px;
}

.search-container input {
    border: none !important;
    background: transparent !important;
    padding: 10px 12px !important;
    font-size: 0.95rem !important;
    box-shadow: none !important;
    width: 100%;
}

.search-container i {
    color: #94a3b8;
    font-size: 1.1rem;
}

.search-container:focus-within i {
    color: #7c3aed;
}

.custom-context-card,
.bg-content-card {
    background-color: var(--bs-body-bg) !important;
    border: 1px solid var(--bs-border-color) !important;
}

@media (max-width: 991px) {
    .auth-card {
        flex-direction: column;
        max-width: 500px;
    }

    .auth-visual {
        width: 100%;
        padding: 40px;
    }

    .auth-content {
        width: 100%;
        padding: 40px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .website-pages-index .table-responsive {
        overflow-x: auto !important;
    }

    .search-container {
        max-width: 100%;
    }
}

@media (min-width: 1200px) {

    #valueSettingFullEditModal .modal-dialog,
    #createGroupDataKeyModal .modal-dialog {
        max-width: 980px;
    }
}

.website-pages-index .table-responsive {
    overflow-x: auto !important;
}

/* Page up button */
.page-up-button {
    position: fixed;
    right: 1.25rem;
    bottom: 5.25rem;
    z-index: 1090;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .18);
}

.page-up-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .24);
}

.theme-dark .page-up-button,
[data-bs-theme="dark"] .page-up-button {
    box-shadow: 0 10px 25px rgba(0, 0, 0, .38);
}

/* Mega Settings Dropdown Redesign */
.mega-settings-dropdown {
    min-width: 520px !important;
    padding: 1.25rem !important;
    border-radius: 12px !important;
}

@media (max-width: 991.98px) {
    .mega-settings-dropdown {
        min-width: 280px !important;
        width: calc(100vw - 30px) !important;
        max-height: 80vh;
        overflow-y: auto;
    }
}

.mega-settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 767.98px) {
    .mega-settings-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.mega-settings-column {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mega-settings-column h6.dropdown-header {
    padding: 0 0 0.5rem 0 !important;
    margin-bottom: 0.5rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    font-size: 0.7rem !important;
    letter-spacing: 0.05rem;
    border-bottom: 1px solid var(--bs-border-color);
    color: var(--bs-primary) !important;
}

.mega-settings-column .dropdown-item {
    padding: 0.6rem 0.75rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.mega-settings-column .dropdown-item:hover {
    background-color: #f8fafc !important;
    transform: translateX(3px);
}

.mega-settings-column .dropdown-item i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

[data-bs-theme="dark"] .mega-settings-dropdown {
    background-color: var(--ulka-surface-1) !important;
    border-color: var(--ulka-border-color) !important;
}

[data-bs-theme="dark"] .mega-settings-column .dropdown-item:hover {
    background-color: var(--sidebar-item-hover) !important;
}

[data-bs-theme="dark"] .mega-settings-column h6.dropdown-header {
    color: var(--ulka-text-muted) !important;
    border-bottom-color: var(--ulka-border-color) !important;
}

/* Final override for navbar icon visibility */
.app-header .nav-link i,
.app-header .nav-link:hover i {
    color: inherit !important;
    font-size: 1.25rem !important;
}`n/* Global Bootstrap Primary Overrides */`n.btn-primary { background-color: var(--bs-primary) !important; border-color: var(--bs-primary) !important; color: #fff !important; }`n.btn-primary:hover, .btn-primary:focus, .btn-primary:active { background-color: #2c3e6c !important; border-color: #2c3e6c !important; color: #fff !important; }`n.text-primary { color: var(--bs-primary) !important; }`n.bg-primary { background-color: var(--bs-primary) !important; }`n.border-primary { border-color: var(--bs-primary) !important; }

/* HTMX Loading Indicators */
.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: inline-block;
    margin-left: 8px;
}
.htmx-request.htmx-indicator {
    display: inline-block;
}
.htmx-request .save-text {
    display: none;
}
