/* ============================================================
   eClassified Admin — Shell (header + sidebar + footer)
   Modern refresh layered over the Yelpify base. Uses
   --admin-panel-color and --admin-panel-rgb from :root
   (both set inline in layouts/app.blade.php).
   ============================================================ */

body {
    font-family: 'Urbanist', 'Nunito', sans-serif;
    background: #f5f7fb;
    color: #0C111C;
    -webkit-font-smoothing: antialiased;
}

/* =====================================================
   Top bar
   ===================================================== */
.topbar { box-shadow: none !important; border-bottom: none !important; }
.topbar .navbar-collapse {
    border-bottom: none !important;
    min-height: 68px;
    padding: 0 24px;
    background: #fff;
}
.topbar .navbar-header {
    background: #0b0f18;
    display: flex; align-items: center; justify-content: center;
    padding: 0 16px;
}
.topbar .navbar-brand img { max-height: 40px; width: auto; }

.topbar .navbar-nav .nav-item > .nav-link {
    color: #3b4060 !important;
    padding: 9px 12px !important;
    border-radius: 10px;
    transition: background .15s, color .15s;
}
.topbar .navbar-nav .nav-item > .nav-link:hover,
.topbar .navbar-nav .nav-item > .nav-link:focus {
    background: #f0f2f7;
    color: #0C111C !important;
}
.topbar .navbar-nav .nav-item > .nav-link .mdi { font-size: 22px; }

/* Sidebar-collapse toggle — override the base pill (dark gray circle from style.css)
   to match the shell design: brand-tinted pill with a bold icon that's actually visible. */
.topbar .navbar-nav > .nav-item > .nav-link.sidebartoggler {
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .12) !important;
    border-radius: 999px !important;
    padding: 8px 12px !important;
    width: 40px; height: 40px;
    margin: 0 4px !important;
    transition: background .15s;
}
.topbar .navbar-nav > .nav-item > .nav-link.sidebartoggler:hover {
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .22) !important;
}
.topbar .sidebartoggler .mdi {
    font-size: 22px !important;
    color: var(--admin-panel-color) !important;
    line-height: 1;
}
/* Mobile hamburger (visible only on small screens) */
.topbar .nav-toggler .mdi { font-size: 22px !important; color: #3b4060 !important; }
.topbar .nav-toggler:hover .mdi { color: var(--admin-panel-color) !important; }

/* View site pill */
.viewSiteUrl {
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .10) !important;
    color: var(--admin-panel-color) !important;
    border-radius: 999px !important;
    padding: 8px 18px !important;
    font-weight: 600;
    font-size: 13.5px;
    margin: 0 8px;
    transition: background .15s, box-shadow .15s;
    line-height: 1;
    display: inline-flex; align-items: center;
}
.viewSiteUrl:hover {
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .18) !important;
    box-shadow: 0 4px 14px rgba(var(--admin-panel-rgb, 132, 74, 239), .18);
    text-decoration: none;
}

/* Custom language dropdown */
.ec-lang { position: relative; margin: 0 8px; }
.ec-lang-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 12px 6px 14px;
    height: 36px;
    border-radius: 999px;
    background: #f5f7fb;
    border: none;
    color: #0C111C;
    font-size: 13.5px; font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.ec-lang-btn:hover { background: #ecf0f6; }
.ec-lang-btn .fa-globe { color: #3b4060; font-size: 13px; }
.ec-lang-btn .ec-lang-chev { color: #64748b; font-size: 16px; transition: transform .15s; }
.ec-lang.open .ec-lang-btn .ec-lang-chev { transform: rotate(180deg); }
.ec-lang-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(var(--admin-panel-rgb, 132, 74, 239), .18); }

.ec-lang-menu {
    position: absolute; top: calc(100% + 6px); right: 0;
    min-width: 160px;
    list-style: none; padding: 6px; margin: 0;
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
    z-index: 1050;
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity .12s, transform .12s;
}
.ec-lang.open .ec-lang-menu { opacity: 1; transform: translateY(0); pointer-events: auto; }
.ec-lang-menu li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px; color: #3b4060;
    cursor: pointer;
    transition: background .12s, color .12s;
}
.ec-lang-menu li:hover { background: #f5f7fb; color: #0C111C; }
.ec-lang-menu li.active { color: var(--admin-panel-color); font-weight: 700; background: rgba(var(--admin-panel-rgb, 132, 74, 239), .08); }
.ec-lang-menu li .mdi { font-size: 18px; }

/* User chip */
.topbar .navbar-nav .nav-item.dropdown > .d-flex.align-items-center {
    padding: 4px 14px 4px 4px;
    border-radius: 999px;
    background: #f5f7fb;
    transition: background .15s;
    gap: 8px;
    cursor: pointer;
}
.topbar .navbar-nav .nav-item.dropdown > .d-flex.align-items-center:hover { background: #ecf0f6; }
.topbar .navbar-nav .nav-item.dropdown > .d-flex.align-items-center::after { display: none; }
.topbar .profile-pic {
    width: 34px !important; height: 34px !important; border-radius: 50%; object-fit: cover;
    border: 2px solid #fff;
}
.topbar .nav-item-user h5 { font-size: 14px; font-weight: 600; margin: 0; color: #0C111C; }
.topbar .navbar-nav .nav-item.dropdown > .d-flex.align-items-center .nav-link { padding: 0 !important; background: transparent !important; }

/* User dropdown menu */
.topbar .dropdown-menu {
    border: 1px solid #eef1f6;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
    padding: 6px;
    min-width: 240px;
    margin-top: 8px;
}
.dropdown-user > li > a {
    padding: 10px 12px !important;
    border-radius: 8px !important;
    font-size: 14px;
    color: #3b4060 !important;
    display: flex; align-items: center; gap: 10px;
    transition: background .12s, color .12s;
}
.dropdown-user > li > a:hover {
    background: #f5f7fb !important;
    color: var(--admin-panel-color) !important;
}
.dropdown-user > li > a i { color: #8a90a6; font-size: 16px; width: 18px; }
.dropdown-user > li > a:hover i { color: var(--admin-panel-color); }
.dw-user-box { padding: 14px 12px 12px; }
.dw-user-box .u-text h4 { font-size: 15px; font-weight: 700; margin: 0; color: #0C111C; }
.dw-user-box .u-text p { font-size: 12.5px; margin: 2px 0 0; color: #8a90a6; }
.dropdown-menu > li.divider,
.dropdown-menu > li[role="separator"] { border-top: 1px solid #eef1f6; margin: 4px 0; }

/* =====================================================
   Sidebar
   ===================================================== */
/* Kill legacy orange right-border from base CSS on ALL states */
.sidebar-nav > ul > li > a,
.sidebar-nav ul li > a,
.sidebar-nav ul li ul li > a,
.sidebar-nav ul li ul li.active a,
.sidebar-nav ul li ul li a:hover {
    border-right: none !important;
}

/* Sidebar shell — locked to viewport, own its scroll */
.left-sidebar {
    background: #0C111C !important;
    border-right: none !important;
    box-shadow: 6px 0 24px rgba(0, 0, 0, .5) !important;
    position: fixed !important;
    top: 0 !important; bottom: 0 !important;
    inset-inline-start: 0 !important;   /* auto-flips in RTL: left in LTR, right in RTL */
    inset-inline-end: auto !important;
    height: 100vh !important;
    padding-top: 60px !important;
    overflow: hidden !important;
    z-index: 20;
    box-sizing: border-box !important;
}
/* Explicit RTL fallback for browsers ignoring inset-inline-* */
html[dir="rtl"] .left-sidebar,
body.rtl .left-sidebar {
    left: auto !important;
    right: 0 !important;
    box-shadow: -6px 0 24px rgba(0, 0, 0, .5) !important;
}
/* Explicit scroll region — beats every legacy inline height/position */
.scroll-sidebar {
    height: calc(100vh - 60px) !important;
    max-height: calc(100vh - 60px) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    scroll-behavior: smooth !important;
    padding-bottom: 24px !important;
    position: static !important;
    width: 100% !important;
    box-sizing: border-box;
}
/* Neutralise any slimScroll wrapper that survived the JS unwrap */
.left-sidebar .slimScrollDiv,
.left-sidebar div.slimScrollDiv {
    height: calc(100vh - 60px) !important;
    max-height: calc(100vh - 60px) !important;
    overflow: visible !important;
    width: 100% !important;
    position: static !important;
}
.left-sidebar .slimScrollBar,
.left-sidebar .slimScrollRail { display: none !important; }

/* ── Search ─────────────────────────────────────────── */
.sidebar-search { padding: 16px 14px 8px !important; }
.sidebar-search input {
    width: 100% !important;
    background: rgba(255, 255, 255, .06) !important;
    border: 1px solid rgba(255, 255, 255, .09) !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, .85) !important;
    font-size: 13px !important;
    padding: 8px 14px !important;
    outline: none !important;
    box-shadow: none !important;
    transition: all .2s !important;
}
.sidebar-search input::placeholder { color: rgba(255, 255, 255, .32) !important; }
.sidebar-search input:focus {
    border-color: rgba(var(--admin-panel-rgb, 132, 74, 239), .5) !important;
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .04) !important;
    box-shadow: 0 0 0 3px rgba(var(--admin-panel-rgb, 132, 74, 239), .07) !important;
}

/* ── Nav wrapper ─────────────────────────────────────── */
.sidebar-nav { background: transparent !important; padding: 0 !important; }
.sidebar-nav ul { padding: 0 10px !important; margin: 0 !important; }

/* ── Section labels ──────────────────────────────────── */
.sidebar-nav > ul > li.nav-subtitle {
    margin: 20px 0 5px !important;
    padding: 0 6px !important;
    border: none !important;
    background: transparent !important;
}
.sidebar-nav > ul > li.nav-subtitle .nav-subtitle-span {
    color: rgba(255, 255, 255, .32) !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 1.8px !important;
    text-transform: uppercase !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
    width: auto !important;
    display: block !important;
}

/* ── List items ──────────────────────────────────────── */
.sidebar-nav ul li { list-style: none !important; margin-bottom: 3px !important; }

/* Top-level link base */
.sidebar-nav > ul > li > a {
    color: rgba(255, 255, 255, .9) !important;
    padding: 6px 10px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    transition: background .2s, color .2s, border-color .2s !important;
    background: transparent !important;
    border: 1.5px solid transparent !important;
    position: relative !important;
}

/* ── Icon Badge ──────────────────────────────────────── */
.sidebar-nav > ul > li > a i {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 9px !important;
    background: rgba(255, 255, 255, .12) !important;
    color: rgba(255, 255, 255, .92) !important;
    font-size: 17px !important;
    transition: background .2s, color .2s, box-shadow .2s !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

/* ── Hover ───────────────────────────────────────────── */
.sidebar-nav > ul > li > a:hover {
    background: rgba(255, 255, 255, .05) !important;
    color: rgba(255, 255, 255, .95) !important;
    border-color: rgba(255, 255, 255, .1) !important;
}
.sidebar-nav > ul > li > a:hover i {
    background: rgba(255, 255, 255, .11) !important;
    color: rgba(255, 255, 255, .85) !important;
}

/* ── ACTIVE — brand-color border + brand-tinted icon badge ─ */
.sidebar-nav > ul > li.active > a,
.sidebar-nav > ul > li > a.active {
    background: transparent !important;
    color: #fff !important;
    font-weight: 600 !important;
    border: 1.5px solid rgba(var(--admin-panel-rgb, 132, 74, 239), .55) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
}
.sidebar-nav > ul > li.active > a i,
.sidebar-nav > ul > li > a.active i {
    background: var(--admin-panel-color) !important;
    color: #fff !important;
    box-shadow: 0 3px 14px rgba(var(--admin-panel-rgb, 132, 74, 239), .45) !important;
}

/* ── Expand arrow ────────────────────────────────────── */
.sidebar-nav .has-arrow::after {
    border-color: rgba(255, 255, 255, .35) !important;
    right: 12px !important;
    width: 7px !important;
    height: 7px !important;
    transition: all .22s ease !important;
}
.sidebar-nav .has-arrow[aria-expanded="true"]::after,
.sidebar-nav .active > .has-arrow::after,
.sidebar-nav li > .has-arrow.active::after {
    border-color: var(--admin-panel-color) !important;
}

/* ── Sub-menu container ──────────────────────────────── */
.sidebar-nav ul li > ul {
    padding: 4px 0 6px 0 !important;
    background: rgba(0, 0, 0, .18) !important;
    border-radius: 0 0 10px 10px !important;
    margin: -4px 1px 4px 1px !important;
    border: 1.5px solid rgba(var(--admin-panel-rgb, 132, 74, 239), .3) !important;
    border-top: none !important;
}

/* Sub-menu links */
.sidebar-nav ul li ul li > a {
    padding: 7px 12px 7px 18px !important;
    font-size: 12.5px !important;
    color: rgba(255, 255, 255, .55) !important;
    border-radius: 7px !important;
    display: flex !important;
    align-items: center !important;
    font-weight: 400 !important;
    border: none !important;
    transition: color .18s, background .18s !important;
}
.sidebar-nav ul li ul li a::before {
    content: "" !important;
    width: 5px !important;
    height: 5px !important;
    min-width: 5px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .25) !important;
    display: inline-block !important;
    margin-right: 10px !important;
    transition: background .18s, transform .18s !important;
    border: none !important;
    position: static !important;
    flex-shrink: 0 !important;
}
.sidebar-nav ul li ul li a::after { display: none !important; }

.sidebar-nav ul li ul li a:hover {
    color: rgba(255, 255, 255, .85) !important;
    background: rgba(255, 255, 255, .05) !important;
}
.sidebar-nav ul li ul li a:hover::before { background: rgba(var(--admin-panel-rgb, 132, 74, 239), .75) !important; }

.sidebar-nav ul li ul li.active > a,
.sidebar-nav ul li ul li > a.active {
    color: var(--admin-panel-color) !important;
    background: transparent !important;
    font-weight: 500 !important;
    border: none !important;
}
.sidebar-nav ul li ul li.active > a::before,
.sidebar-nav ul li ul li > a.active::before { background: var(--admin-panel-color) !important; }

/* ── Version footer ──────────────────────────────────── */
.version-info {
    color: rgba(255, 255, 255, .35) !important;
    font-size: 11px !important;
    text-align: center !important;
    padding: 10px 16px 28px !important;
    margin: 0 !important;
}

/* ── Scrollbar ───────────────────────────────────────── */
/* Cover every scrollable node inside the sidebar (scroll-sidebar, slimScrollDiv,
   the sidebar-nav ul, and left-sidebar itself) so the thumb picks up the brand
   colour regardless of which element the browser is actually rendering. */
.left-sidebar,
.left-sidebar *,
.scroll-sidebar,
.left-sidebar .slimScrollDiv,
.left-sidebar .sidebar-nav,
.left-sidebar .sidebar-nav ul {
    scrollbar-color: var(--admin-panel-color) transparent !important;
    scrollbar-width: thin !important;
}
.left-sidebar ::-webkit-scrollbar,
.left-sidebar::-webkit-scrollbar,
.scroll-sidebar::-webkit-scrollbar { width: 6px !important; height: 6px !important; background: transparent !important; }
.left-sidebar ::-webkit-scrollbar-track,
.left-sidebar::-webkit-scrollbar-track,
.scroll-sidebar::-webkit-scrollbar-track { background: transparent !important; }
.left-sidebar ::-webkit-scrollbar-thumb,
.left-sidebar::-webkit-scrollbar-thumb,
.scroll-sidebar::-webkit-scrollbar-thumb {
    background: var(--admin-panel-color) !important;
    border-radius: 999px !important;
    border: none !important;
    box-shadow: none !important;
}
.left-sidebar ::-webkit-scrollbar-corner,
.left-sidebar::-webkit-scrollbar-corner,
.scroll-sidebar::-webkit-scrollbar-corner { background: transparent !important; }

/* ═════════════════════════════════════════════════════════════
   Mini-sidebar (collapsed) — icon-only rail + hover flyouts
   Uses very-high-specificity selectors to override Yelpify base.
   ═════════════════════════════════════════════════════════════ */

/* Sidebar itself: narrow rail, overflow visible so flyouts escape */
.mini-sidebar .left-sidebar { width: 60px !important; overflow: visible !important; }
.mini-sidebar .scroll-sidebar { overflow-y: auto !important; overflow-x: visible !important; }

/* Hide search + section labels when collapsed */
.mini-sidebar .sidebar-search,
.mini-sidebar .sidebar-nav > ul > li.nav-subtitle,
.mini-sidebar .version-info { display: none !important; }

.mini-sidebar .sidebar-nav ul { padding: 0 !important; }
.mini-sidebar .sidebar-nav #sidebarnav > li { position: relative !important; }

/* KILL Yelpify's "hover expands item to 260px + light bg" behavior */
.mini-sidebar .sidebar-nav #sidebarnav > li:hover > a {
    width: 44px !important;
    background: transparent !important;
}
.mini-sidebar .sidebar-nav #sidebarnav > li:hover > a .hide-menu { display: none !important; }

/* Each top-level item becomes an icon-only 44px square, centered */
.mini-sidebar .sidebar-nav > ul > li > a,
.mini-sidebar .sidebar-nav #sidebarnav > li > a {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    margin: 4px auto !important;
    gap: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    border: 1.5px solid transparent !important;
    border-radius: 10px !important;
    background: transparent !important;
    overflow: visible !important;
}
.mini-sidebar .sidebar-nav > ul > li > a i,
.mini-sidebar .sidebar-nav #sidebarnav > li > a i {
    width: 34px !important; height: 34px !important;
    background: rgba(255, 255, 255, .10) !important;
    color: rgba(255, 255, 255, .90) !important;
    font-size: 17px !important;
    border-radius: 9px !important;
}
.mini-sidebar .sidebar-nav > ul > li > a .hide-menu { display: none !important; }

/* Hover: tinted icon */
.mini-sidebar .sidebar-nav #sidebarnav > li:hover > a i {
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .18) !important;
    color: var(--admin-panel-color) !important;
}

/* Active: brand-color border + solid brand icon badge */
.mini-sidebar .sidebar-nav > ul > li.active > a {
    border: 1.5px solid rgba(var(--admin-panel-rgb, 132, 74, 239), .55) !important;
}
.mini-sidebar .sidebar-nav > ul > li.active > a i {
    background: var(--admin-panel-color) !important;
    color: #fff !important;
}

/* Hide arrows in mini mode */
.mini-sidebar .sidebar-nav .has-arrow::after { display: none !important; }

/* Collapse the in-sidebar submenus completely in mini mode (the flyout panel handles them) */
.mini-sidebar .sidebar-nav #sidebarnav > li > ul,
.mini-sidebar .sidebar-nav > ul > li > ul { display: none !important; }

/* Logo visibility: full logo in normal mode, icon-only when collapsed.
   Base CSS uses `.light-logo` / `.dark-logo` classes with a lower-specificity
   selector; my ID-based rules here override cleanly. */
.topbar .navbar-brand #main-logo  { display: inline-block !important; }
.topbar .navbar-brand #small-logo { display: none !important; }
.mini-sidebar .topbar .navbar-brand #main-logo  { display: none !important; }
.mini-sidebar .topbar .navbar-brand #small-logo { display: inline-block !important; }

/* Cancel the base style.css rotate(180deg) it applies to the WHOLE .sidebartoggler
   button when body.mini-sidebar is set — we swap the icon class in JS instead
   (mdi-arrow-left ↔ mdi-arrow-right), which is more reliable. If the base
   rotation stays, it double-flips our icon back to pointing left. */
.mini-sidebar .topbar .top-navbar .navbar-nav > .nav-item > .nav-link.sidebartoggler,
.mini-sidebar .topbar .sidebartoggler {
    transform: none !important;
}

/* ═════════════════════════════════════════════════════════════
   #mini-hover-panel — floating flyout populated by menu.blade.php JS
   Only shown in mini-sidebar mode (JS gates it).
   ═════════════════════════════════════════════════════════════ */
#mini-hover-panel {
    position: fixed;
    left: 68px;           /* just past the 60px rail + small gap */
    min-width: 200px;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    background: #131a26;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 10px;
    box-shadow: 4px 6px 22px rgba(0, 0, 0, .55);
    z-index: 99999;
    display: none;
    padding: 5px;
}
#mini-hover-panel .mhp-label {
    padding: 8px 12px 7px;
    color: rgba(255, 255, 255, .95);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}
#mini-hover-panel .mhp-label.has-sub {
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    margin-bottom: 3px;
}
#mini-hover-panel .mhp-link {
    display: block;
    padding: 8px 12px;
    color: rgba(255, 255, 255, .68);
    font-size: 13px;
    border-radius: 7px;
    text-decoration: none !important;
    white-space: nowrap;
    transition: background .15s, color .15s;
}
#mini-hover-panel .mhp-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}
/* RTL: flyout appears on the left of the (right-anchored) rail */
html[dir="rtl"] #mini-hover-panel {
    left: auto;
    right: 68px;
}

/* Collapsible arrow indicator */
.sidebar-nav .has-arrow::after {
    border-color: rgba(255, 255, 255, .40) !important;
    border-width: 1.5px 0 0 1.5px !important;
    width: 7px; height: 7px;
    right: 18px;
    transition: transform .18s, border-color .12s;
}
.sidebar-nav .has-arrow[aria-expanded="true"]::after,
.sidebar-nav .active > .has-arrow::after,
.sidebar-nav ul li a.has-arrow:hover::after {
    border-color: #fff !important;
}
.sidebar-nav > ul > li.active > .has-arrow::after { border-color: var(--admin-panel-color) !important; }

/* Version label at the bottom */
.version-info {
    color: rgba(255, 255, 255, .30);
    font-size: 11.5px;
    text-align: center;
    padding: 20px 8px 12px;
    margin: 0;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
    background: #fff !important;
    border-top: 1px solid #eef1f6;
    color: #8a90a6 !important;
    font-size: 13px;
    padding: 14px 24px !important;
    text-align: center;
    box-shadow: none;
}

/* =====================================================
   Page content shell
   ===================================================== */
main.py-4 { padding: 0 0 40px !important; }
/* Give the first child inside main a subtle top margin so it doesn't
   glue to the header, without the visible gray band a padding-top would create. */
main.py-4 > * { margin-top: 0; }

.card {
    border-radius: 14px;
    border: 1px solid #eef1f6;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.card-header {
    border-radius: 14px 14px 0 0 !important;
    background: #fff;
    border-bottom: 1px solid #eef1f6;
    padding: 16px 20px;
}
.card-body { padding: 20px; }

/* Page title header */
.page-titles {
    background: transparent;
    box-shadow: none;
    padding: 4px 4px 20px !important;
    margin: 0 0 6px;
    border-bottom: none;
}
.page-titles h3 { font-weight: 800; font-size: 22px; color: #0C111C; }
.page-titles .top-title-wrap p { font-size: 13.5px; color: #8a90a6; }
.page-titles .module-title-icon {
    font-size: 32px;
    color: var(--admin-panel-color);
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .10);
    width: 52px; height: 52px;
    border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
}
.page-titles .top-title-left .icon { margin-right: 14px !important; }
.breadcrumb {
    background: transparent;
    padding-left: 0;
    padding-right: 0;
    margin: 0;
    font-size: 13px;
}
.breadcrumb-item a { color: #8a90a6; }
.breadcrumb-item a:hover { color: var(--admin-panel-color); }
.breadcrumb-item.active { color: #0C111C; font-weight: 600; }

/* =====================================================
   Dynamic brand color everywhere — replaces the hardcoded
   #FF7E56 / #FF683A peach from the legacy base with the
   admin's --admin-panel-color choice.
   ===================================================== */

/* Settings hub cards */
.settings-card-link:hover .settings-card {
    border-color: var(--admin-panel-color) !important;
}
.settings-card-icon {
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .12) !important;
    color: var(--admin-panel-color) !important;
}
.settings-card-link:hover .settings-card-arrow {
    color: var(--admin-panel-color) !important;
}

/* Buttons */
.btn-primary,
.btn-primary.disabled,
.btn-primary:hover,
.btn-primary.disabled:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active {
    background: var(--admin-panel-color) !important;
    border-color: var(--admin-panel-color) !important;
    color: #fff !important;
}
.btn-primary:hover { filter: brightness(.92); }
.btn-primary:focus, .btn-primary.focus {
    box-shadow: 0 0 0 3px rgba(var(--admin-panel-rgb, 132, 74, 239), .25) !important;
}
.btn-warning, .btn-warning:hover, .btn-warning:focus {
    background: var(--admin-panel-color) !important;
    border-color: var(--admin-panel-color) !important;
    color: #fff !important;
}
.btn-themecolor,
.btn-themecolor:hover,
.btn-themecolor.disabled,
.btn-themecolor:focus,
.btn-themecolor:active {
    background: var(--admin-panel-color) !important;
    border-color: var(--admin-panel-color) !important;
    color: #fff !important;
}
.btn-outline-primary {
    color: var(--admin-panel-color) !important;
    border-color: var(--admin-panel-color) !important;
    background: transparent !important;
}
.btn-outline-primary:hover {
    background: var(--admin-panel-color) !important;
    color: #fff !important;
}

/* Text + link colors */
.text-themecolor,
.text-primary,
.text-warning,
.text-info,
html body .text-themecolor {
    color: var(--admin-panel-color) !important;
}
a { color: var(--admin-panel-color); }
a:hover, a:focus { color: var(--admin-panel-color); filter: brightness(.85); }
.blue-text, .btn-link { color: var(--admin-panel-color) !important; }

/* Pagination */
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
    background: var(--admin-panel-color) !important;
    border-color: var(--admin-panel-color) !important;
    color: #fff !important;
}
.pagination > li > a.page-link { color: var(--admin-panel-color); }
.pagination > li > a.page-link:hover {
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .10) !important;
    color: var(--admin-panel-color) !important;
    border-color: rgba(var(--admin-panel-rgb, 132, 74, 239), .40) !important;
}

/* Tabs */
.nav-tabs.card-header-tabs .nav-link.active,
.nav-tabs.card-header-tabs .nav-link:hover {
    background: var(--admin-panel-color) !important;
    border-color: var(--admin-panel-color) var(--admin-panel-color) #fff !important;
    color: #fff !important;
}
.profile-tab li a.nav-link.active,
.customtab li a.nav-link.active,
.profile-tab li a.nav-link:hover,
.customtab li a.nav-link:hover {
    color: var(--admin-panel-color) !important;
    border-bottom-color: var(--admin-panel-color) !important;
}

/* Backgrounds */
.bg-theme, .bg-info { background-color: var(--admin-panel-color) !important; }

/* Checkboxes / Radios accent */
[type="checkbox"], [type="radio"] {
    accent-color: var(--admin-panel-color);
}

/* Table row indicator */
.stylish-table tbody tr:hover,
.stylish-table tbody tr.active {
    border-left-color: var(--admin-panel-color) !important;
}
.table tr td.redirecttopage { color: var(--admin-panel-color) !important; }

/* SweetAlert action buttons */
.swal2-actions .swal2-confirm,
.swal2-actions .swal2-styled.swal2-confirm {
    background: var(--admin-panel-color) !important;
    border-color: var(--admin-panel-color) !important;
}

/* Toastr success */
.toast-success { background-color: var(--admin-panel-color) !important; }

/* Card head count / badges */
.card-head-count {
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .12) !important;
    color: var(--admin-panel-color) !important;
}

/* Rating stars */
ul.rating { color: var(--admin-panel-color) !important; }

/* Scrollbar — neutral subtle color everywhere (overrides the legacy peach from base) */
* { scrollbar-color: rgba(128, 128, 128, .35) transparent !important; scrollbar-width: thin !important; }
::-webkit-scrollbar { width: 8px !important; height: 8px !important; }
::-webkit-scrollbar-track { background: transparent !important; }
::-webkit-scrollbar-thumb {
    background: rgba(128, 128, 128, .35) !important;
    border-radius: 999px !important;
    border: 2px solid transparent !important;
    background-clip: padding-box !important;
}
::-webkit-scrollbar-thumb:hover { background: rgba(128, 128, 128, .55) !important; background-clip: padding-box !important; }

/* Sidebar scrollbar — light tint derived from the admin brand color so it
   automatically follows whatever color the admin sets in Branding (was hard-
   coded lavender before, which stayed purple when the brand changed to orange). */
.scroll-sidebar,
.scroll-sidebar * {
    scrollbar-color: color-mix(in srgb, var(--admin-panel-color) 45%, #ffffff 55%) transparent !important;
    scrollbar-width: thin !important;
}
.scroll-sidebar::-webkit-scrollbar,
.scroll-sidebar *::-webkit-scrollbar { width: 6px !important; height: 6px !important; background: transparent !important; }
.scroll-sidebar::-webkit-scrollbar-track,
.scroll-sidebar *::-webkit-scrollbar-track { background: transparent !important; }
.scroll-sidebar::-webkit-scrollbar-thumb,
.scroll-sidebar *::-webkit-scrollbar-thumb {
    /* Fallback for browsers without color-mix (mixes brand rgb with white via rgba stack) */
    background: rgb(var(--admin-panel-rgb, 132, 74, 239)) !important;
    background: color-mix(in srgb, var(--admin-panel-color) 45%, #ffffff 55%) !important;
    border-radius: 999px !important;
    border: none !important;
    background-clip: border-box !important;
    min-height: 40px !important;
}
.scroll-sidebar::-webkit-scrollbar-thumb:hover,
.scroll-sidebar *::-webkit-scrollbar-thumb:hover {
    background: color-mix(in srgb, var(--admin-panel-color) 45%, #ffffff 55%) !important;
}

/* =====================================================
   Dashboard
   ===================================================== */
.dashboard-page .container-fluid { padding: 4px 4px 0; }

/* Hero welcome banner */
.ec-hero-banner {
    background: linear-gradient(120deg,
        rgba(var(--admin-panel-rgb, 132, 74, 239), .95) 0%,
        rgba(var(--admin-panel-rgb, 132, 74, 239), .78) 55%,
        #0b0f18 100%);
    border-radius: 18px;
    padding: 26px 30px;
    color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 20px;
    box-shadow: 0 12px 30px rgba(var(--admin-panel-rgb, 132, 74, 239), .18);
    position: relative; overflow: hidden;
}
.ec-hero-banner::before {
    content: ''; position: absolute; width: 320px; height: 320px; border-radius: 50%;
    background: rgba(255, 255, 255, .06); top: -100px; right: -80px;
}
.ec-hero-banner::after {
    content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .10); bottom: -80px; left: 30%;
}
.ec-hero-text { position: relative; z-index: 2; }
.ec-hero-text h3 { font-weight: 800; font-size: 22px; margin: 0 0 6px; color: #fff; }
.ec-hero-text p { margin: 0; font-size: 14px; color: rgba(255, 255, 255, .78); }
.ec-hero-actions { position: relative; z-index: 2; display: flex; gap: 10px; flex-wrap: wrap; }
.ec-hero-btn {
    background: #fff; color: #0C111C !important;
    border-radius: 10px; padding: 10px 18px; font-weight: 600; font-size: 13.5px;
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none !important; transition: transform .12s, box-shadow .15s;
    border: none;
}
.ec-hero-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0, 0, 0, .20); color: #0C111C !important; }
.ec-hero-btn-outline {
    background: transparent; color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .3);
}
.ec-hero-btn-outline:hover { background: rgba(255, 255, 255, .10); color: #fff !important; }

/* KPI cards */
.ec-kpi-row { margin: 6px -8px 4px; }
.ec-kpi-row > [class*="col-"] { padding: 0 8px; }
.ec-kpi {
    background: #fff;
    border: 1px solid #eef1f6;
    border-radius: 16px;
    padding: 20px 20px 18px;
    position: relative; overflow: hidden;
    transition: transform .12s, box-shadow .15s;
    height: 100%;
}
.ec-kpi:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(15, 23, 42, .06); }
.ec-kpi::before { display: none; }
.ec-kpi.kpi-brand { --kpi-accent: var(--admin-panel-color); --kpi-tint: rgba(var(--admin-panel-rgb, 132, 74, 239), .10); }
.ec-kpi.kpi-blue  { --kpi-accent: #3b82f6; --kpi-tint: rgba(59, 130, 246, .10); }
.ec-kpi.kpi-amber { --kpi-accent: #f59e0b; --kpi-tint: rgba(245, 158, 11, .10); }
.ec-kpi.kpi-green { --kpi-accent: #22c55e; --kpi-tint: rgba(34, 197, 94, .10); }

.ec-kpi-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.ec-kpi-icon {
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--kpi-tint);
    color: var(--kpi-accent);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 22px;
}
.ec-kpi-label { font-size: 13px; color: #8a90a6; font-weight: 600; }
.ec-kpi-value { font-size: 28px; font-weight: 800; color: #0C111C; line-height: 1.05; margin-bottom: 10px; }
.ec-kpi-foot { font-size: 12.5px; color: #64748b; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ec-kpi-foot a { color: var(--kpi-accent); font-weight: 600; text-decoration: none; }
.ec-kpi-foot a:hover { text-decoration: underline; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.dot-green { background: #22c55e; }
.dot-amber { background: #f59e0b; }

/* Cards */
.ec-card {
    border-radius: 14px;
    border: 1px solid #eef1f6;
    height: 100%;
    display: flex; flex-direction: column;
}
.ec-card > .card-body { flex: 1; }
.ec-card .card-header { background: #fff; border-bottom: 1px solid #f0f2f7; }
.ec-card .card-header h5 { font-weight: 700; font-size: 15.5px; color: #0C111C; }
.ec-card .card-header small { display: block; margin-top: 2px; font-size: 12.5px; }

/* Force rows on the dashboard to keep siblings the same height */
.dashboard-page .row { align-items: stretch; }

/* Filter row inside cards */
.ec-filters { gap: 8px; }
.ec-filters .form-control-sm {
    border-radius: 8px; border: 1px solid #e2e6ef; font-size: 13px;
    padding: 6px 10px; min-width: 130px;
}
.ec-filters .form-control-sm:focus {
    border-color: var(--admin-panel-color);
    box-shadow: 0 0 0 3px rgba(var(--admin-panel-rgb, 132, 74, 239), .12);
    outline: none;
}
.ec-filters > div { gap: 8px; }

/* Link-style CTA */
.ec-link-btn {
    color: var(--admin-panel-color); font-weight: 600; font-size: 13px;
    text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.ec-link-btn:hover { text-decoration: underline; color: var(--admin-panel-color); }

/* Ads by Status list */
.ec-status-list { list-style: none; padding: 12px 4px 0; margin: 0; }
.ec-status-list li {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 6px;
    border-bottom: 1px dashed #f0f2f7;
    font-size: 13.5px;
}
.ec-status-list li:last-child { border-bottom: none; }
.ec-status-list .ec-status-name { flex: 1; color: #3b4060; }
.ec-status-list .ec-status-count { font-weight: 700; color: #0C111C; }
.ec-status-list .ec-status-pct { color: #8a90a6; font-size: 12px; width: 44px; text-align: right; }

/* Recent ads table */
.ec-recent-table { font-size: 14px; }
.ec-recent-table thead th {
    background: #f9fafc; color: #64748b; font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: .4px;
    border-top: 1px solid #f0f2f7; border-bottom: 1px solid #eef1f6;
    padding: 12px 16px;
}
.ec-recent-table tbody td {
    padding: 14px 16px; border-top: 1px solid #f5f7fb;
    vertical-align: middle; color: #0C111C;
}
.ec-recent-table tbody tr:hover { background: #fafbfd; }
.ec-thumb {
    width: 44px; height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: #f5f7fb; border: 1px solid #eef1f6;
}
.ec-ad-title { font-weight: 600; color: #0C111C; }
.ec-badge {
    display: inline-block; padding: 4px 10px; border-radius: 999px;
    font-size: 11.5px; font-weight: 700; text-transform: capitalize;
    letter-spacing: .2px;
}
.ec-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: 8px;
    color: #8a90a6; margin-left: 4px;
    transition: background .12s, color .12s;
}
.ec-icon-btn:hover {
    background: rgba(var(--admin-panel-rgb, 132, 74, 239), .10);
    color: var(--admin-panel-color); text-decoration: none;
}

/* Top categories list */
.ec-cat-list { list-style: none; padding: 8px 12px 12px; margin: 0; }
.ec-cat-list li { padding: 0; margin: 0 0 4px; }
.ec-cat-list li a {
    display: block; padding: 10px 12px; border-radius: 10px;
    text-decoration: none; transition: background .12s;
}
.ec-cat-list li a:hover { background: #f5f7fb; text-decoration: none; }
.ec-cat-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ec-cat-name { font-weight: 600; color: #0C111C; font-size: 13.5px; }
.ec-cat-count { font-size: 12px; color: #64748b; background: #f0f2f7; border-radius: 999px; padding: 2px 10px; font-weight: 600; }
.ec-cat-bar { height: 5px; border-radius: 999px; background: #f0f2f7; overflow: hidden; }
.ec-cat-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--admin-panel-color), rgba(var(--admin-panel-rgb, 132, 74, 239), .55));
    border-radius: 999px;
    transition: width .3s;
}

/* User avatar in recent-users table */
.ec-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #f5f7fb;
    border: 1px solid #eef1f6;
}

/* Pending action queue */
.ec-queue-card .card-body { padding: 12px; }
.ec-queue-list { list-style: none; padding: 0; margin: 0; }
.ec-queue-list li {
    display: flex; align-items: center; gap: 12px;
    padding: 12px;
    border-radius: 12px;
    margin-bottom: 8px;
    background: var(--q-tint, #f5f7fb);
    transition: transform .12s, box-shadow .15s;
}
.ec-queue-list li:last-child { margin-bottom: 0; }
.ec-queue-list li:hover { transform: translateX(2px); box-shadow: 0 8px 18px rgba(15, 23, 42, .05); }
.ec-queue-list .q-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 20px; color: var(--q-accent, #64748b);
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .04);
}
.ec-queue-list .q-body { flex: 1; min-width: 0; }
.ec-queue-list .q-title { font-weight: 700; font-size: 13.5px; color: #0C111C; line-height: 1.2; }
.ec-queue-list .q-sub { font-size: 12px; color: #64748b; margin-top: 2px; }
.ec-queue-list .q-cta {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px; border-radius: 999px;
    background: #fff; color: var(--q-accent, #64748b) !important;
    font-weight: 700; font-size: 13.5px;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, .04);
    transition: background .12s, color .12s;
}
.ec-queue-list .q-cta:hover { background: var(--q-accent, #64748b); color: #fff !important; }

.ec-queue-list .q-amber  { --q-accent: #f59e0b; --q-tint: rgba(245, 158, 11, .08); }
.ec-queue-list .q-blue   { --q-accent: #3b82f6; --q-tint: rgba(59, 130, 246, .08); }
.ec-queue-list .q-red    { --q-accent: #ef4444; --q-tint: rgba(239, 68, 68, .08); }
.ec-queue-list .q-green  { --q-accent: #22c55e; --q-tint: rgba(34, 197, 94, .08); }
