@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap");

/* === Phase 1: CSS Variables & Base Resets === */
:root {
    /* Core Colors */
    --base-bg: #000e2a;
    --panel-bg: #1e293b;
    --accent-active: #e80000;
    --accent-hover: #ff1a1a;
    --accent-link: #d90d0d;
    --accent-dark: #990000;
    --accent-glow: rgba(232, 0, 0, 0.3);

    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-nav: #737474;

    /* Fonts */
    --font-body: "Inter", sans-serif;
    --font-display: "Plus Jakarta Sans", sans-serif;

    /* Surfaces & Glassmorphism */
    --glass-bg-base: rgba(15, 23, 42, 0.7);
    --glass-bg-light: rgba(30, 41, 59, 0.2);
    --glass-bg-dark: rgba(15, 23, 42, 0.9);
    --surface-overlay: rgba(255, 255, 255, 0.03);
    --surface-hover: rgba(255, 255, 255, 0.05);

    /* Borders & Dividers */
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-glass: rgba(255, 255, 255, 0.08);

    /* Layout & Shadow */
    --sidebar-width: 280px;
    --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --card-radius: 12px;
    --transition-fast: 0.15s ease;
    --transition-standard: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* === Scrollbars === */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--panel-bg);
}
::-webkit-scrollbar-thumb {
    background: var(--accent-active);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-active) var(--panel-bg);
}

body {
    font-family: "Inter", sans-serif;
    background-color: var(--base-bg);
    background-image: url(../images/Background.png);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

a {
    color: var(--accent-link);
}
a:hover {
    color: var(--accent-active);
    text-decoration: none;
}

/* === Phase 2: CSS Grid Layout === */
.layout-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100lvh;
}
.table .dropdown-menu,
.glass-tile {
    background: linear-gradient(
        225deg,
        var(--glass-bg-base) 0%,
        var(--glass-bg-light) 100%
    ) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--border-glass) !important;
}
.glass-tile-dark {
    background: linear-gradient(
        180deg,
        var(--glass-bg-dark) 0%,
        var(--glass-bg-light) 100%
    );
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    background-size: 200%;
}
.sidebar .dropdown.show .dropdown-menu.show {
    background: linear-gradient(
        180deg,
        var(--accent-dark) 0%,
        var(--glass-bg-dark) 100%
    ) !important;
    border: 1px solid var(--border-glass) !important;
}

/* Sidebar */
.sidebar {
    background-size: 150%;
    border-right: none;
    position: sticky;
    top: 0;
    height: 100lvh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 200;
}

.sidebar-logo {
    flex-shrink: 0;
    margin: 30px 0 10px 30px;
    gap: 0.5rem;

    a {
        display: flex;
        align-items: center;
        justify-content: start;
        margin-left: -20px;

        img {
            min-height: 50px;
        }
        span {
            color: var(--text-primary);
            font-size: 20px;
            font-weight: 700;
            transition: color 0.5s;
            margin-top: -8px;
            &:hover {
                color: var(--accent-active);
            }
        }
    }
}
.sidebar-nav {
    flex: 1;
    padding: 0.5rem 0;
    overflow-y: auto;
}

.sidebar-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav-list .nav-item {
    position: relative;
}

/* Primary nav link */
.sidebar-nav-list .nav-link {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.25rem;
    margin: 0 1rem 0.5rem;
    border-radius: 12px;
    border: 1px solid transparent;
    color: var(--text-nav) !important;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    transition: all 0.25s ease;
}

/* Icon in primary nav link */
.sidebar-nav-list .nav-link > i {
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    opacity: 0.6;
    transition: all 0.25s ease;
}

/* Hover state: Glassmorphic */
.sidebar-nav-list .nav-link:hover {
    color: var(--text-primary) !important;
}

.sidebar-nav-list {
    .nav-item.active .nav-link.dropdown-toggle,
    .nav-link.dropdown-toggle:hover {
        &::after {
            opacity: 1 !important;
        }
    }
}
/* Active state: Glassmorphic + Accent Color */
.sidebar-nav-list .nav-item.active .nav-link {
    color: var(--text-primary) !important;
    background-color: rgb(14 47 100 / 20%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: rgb(255 255 255 / 23%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-nav-list .nav-item.active > .nav-link > i {
    opacity: 1;
}

.sidebar-nav-list .nav-link:hover > i {
    opacity: 1;
}

/* Dropdown toggle: pin chevron to right edge via absolute positioning */
.sidebar-nav-list .nav-link.dropdown-toggle {
    position: relative;
    padding-right: 2.75rem;
}

.sidebar-nav-list .nav-link.dropdown-toggle::after {
    content: "";
    display: block;
    width: 0.5rem;
    height: 0.5rem;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    border-top: none;
    border-left: none;
    position: absolute;
    right: 1.25rem;
    top: calc(50% - 0.35rem);
    margin: 0;
    transform: rotate(45deg);
    transform-origin: center;
    opacity: 0.4;
    transition:
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.18s ease;
    vertical-align: unset;
}

/* Chevron points up when open */
.sidebar-nav-list .nav-item.show > .nav-link.dropdown-toggle::after {
    transform: rotate(-135deg);
    top: calc(50% - 0.15rem);
    opacity: 0.7;
}

/* ??? Inline accordion submenu ??? */
/* Fix: Bootstrap 4 + Popper.js injects position:absolute and transform inline.
   Both need !important to override inline styles. Visibility is then controlled
   via max-height/opacity so display:block stays constant. */
.sidebar-nav-list .dropdown-menu {
    display: block !important;
    position: static !important;
    transform: translateY(-6px) !important;
    inset: auto !important;
    float: none !important;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0.5rem 0.25rem 1.75rem !important;
    min-width: unset;
    /* Collapsed state */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition:
        max-height 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.22s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.22s ease;
    will-change: max-height, opacity, transform;
}

/* Expanded when Bootstrap adds .show to the parent <li> */
.sidebar-nav-list .nav-item.show > .dropdown-menu {
    max-height: 420px;
    opacity: 1;
    transform: translateY(0) !important;
    padding: 0.35rem 0 !important;
}

/* Suppress entry transition on first paint (server/JS-rendered open state) */
.sidebar-nav-list .nav-item.no-anim > .dropdown-menu,
.sidebar-nav-list .nav-item.no-anim > .dropdown-toggle::after {
    transition: none !important;
}

/* Sub-menu item: mirror main nav-link pill style */
.sidebar-nav-list .dropdown-menu .dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 0.65rem;
    color: var(--text-nav) !important;
    background: transparent;
    padding: 0.6rem 1rem !important;
    font-size: 0.84rem;
    font-weight: 500;
    white-space: normal;
    border: 1px solid transparent;
    border-radius: 10px !important;
    text-decoration: none !important;
    line-height: 1.4;
    transition: all 0.25s ease;
}

/* Override inline span margin so flex gap controls spacing */
.sidebar-nav-list .dropdown-menu .dropdown-item .dropdown-icon {
    margin-right: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Sized SVG icons ? scaled-down match of main nav (25px ? 20px) */
.sidebar-nav-list .dropdown-menu .dropdown-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity 0.25s ease;
}

/* FontAwesome fallback icon */
.sidebar-nav-list .dropdown-menu .dropdown-item > i,
.sidebar-nav-list .dropdown-menu .dropdown-item .dropdown-icon > i {
    width: 1.1rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.85rem;
    opacity: 0.6;
    transition: opacity 0.25s ease;
}

.sidebar-nav-list .dropdown-menu .dropdown-item:hover {
    color: var(--text-primary) !important;
}

.sidebar-nav-list .dropdown-menu .dropdown-item:hover svg,
.sidebar-nav-list .dropdown-menu .dropdown-item:hover > i,
.sidebar-nav-list .dropdown-menu .dropdown-item:hover .dropdown-icon > i {
    opacity: 1;
}

.sidebar-nav-list .dropdown-menu .dropdown-item.active {
    color: var(--text-primary) !important;
    border-color: rgb(255 255 255 / 23%);
    background-color: rgb(14 47 100 / 20%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar-nav-list .dropdown-menu .dropdown-item.active svg,
.sidebar-nav-list .dropdown-menu .dropdown-item.active > i,
.sidebar-nav-list .dropdown-menu .dropdown-item.active .dropdown-icon > i {
    opacity: 1;
}

/* Secondary nav in sidebar */
.sidebar-secondary-nav {
    border-top: 1px solid var(--border-subtle);
    padding-top: 0.3rem;
    flex-shrink: 0;
}

.sidebar-secondary-nav .list-group {
    border-radius: 0;
}

.sidebar-secondary-nav .list-group-item {
    display: flex !important;
    align-items: center;
    gap: 0.6rem;
    background: transparent !important;
    border: none !important;
    border-left: 2px solid transparent !important;
    color: var(--text-secondary) !important;
    border-radius: 0 !important;
    padding: 0.45rem 1.25rem !important;
    font-size: 0.82rem;
    font-weight: 500;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}

.sidebar-secondary-nav .list-group-item i {
    width: 1rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    opacity: 0.55;
    transition: opacity 0.15s;
}

.sidebar-secondary-nav .list-group-item:hover,
.sidebar-secondary-nav .list-group-item.active {
    background-color: var(--surface-hover) !important;
    color: var(--text-primary) !important;
    border-left-color: var(--accent-active) !important;
}

.sidebar-secondary-nav .list-group-item:hover i,
.sidebar-secondary-nav .list-group-item.active i {
    opacity: 1;
}

/* Main area */
.main-area {
    display: flex;
    flex-direction: column;
    min-height: 100lvh;
    border-top-left-radius: 40px;
}

/* Top bar */
.top-bar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    padding: 2.5rem 3.5rem 1rem;
    gap: 0.75rem;
    min-height: 56px;
    flex-wrap: nowrap;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.top-bar .page-header {
    flex: 1;
    margin: 0;
    min-width: 0;
}

.top-bar .page-header h3 {
    color: var(--text-primary);
    font-size: 3rem;
    font-weight: 400;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    margin: 0;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-left: auto;
    flex-shrink: 0;
}

.sidebar-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border-glass);
}

.top-bar-right .top-nav ul,
.top-bar-right .navbar-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.top-bar-right .nav-link,
.top-bar-right .top-nav .dropdown-toggle {
    color: var(--text-secondary) !important;
    font-size: 0.875rem;
    padding: 0.3rem 0.6rem !important;
    text-decoration: none;
}

.top-bar-right .nav-link:hover,
.top-bar-right .top-nav .dropdown-toggle:hover {
    color: var(--text-primary) !important;
}

/* Content area */
.content-area {
    flex: 1;
    padding: 2.5rem;
    min-height: 100lvh;
}

/* Mobile sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 150;
}

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

/* Footer */
.row.footer {
    border-top: 1px solid var(--border-subtle);
    margin-top: 1rem;
}
.row.footer p {
    color: var(--text-secondary);
    font-size: 0.8rem;
}
.row.footer a {
    color: var(--accent-link);
}

/* === Phase 3: Dark Mode ? Cards & Panels === */

/* Base card: rounded, shadowed, elevated */
.card-blesta {
    background: linear-gradient(
        200deg,
        var(--glass-bg-dark) 0%,
        var(--glass-bg-light) 100%
    ) !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--text-primary);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background-size: 200%;
    border-radius: 12px !important;
    box-shadow: var(--card-shadow) !important;
    overflow: hidden;
}
.card {
    background: transparent;
    border: none !important;
}

/* Dashboard widget cards: hover lift */
.cards .card {
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.cards .card:hover {
    box-shadow:
        0 12px 28px rgba(0, 0, 0, 0.45),
        0 4px 10px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-2px);
}

/* Card header: clearly distinct with red left accent */
.card-header,
.card-blesta > .card-header,
.panel .panel-heading {
    background: var(--surface-overlay) !important;
    border-bottom: 1px solid var(--border-glass) !important;
    border-left: 3px solid var(--accent-active) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1.1rem 0.75rem 1rem !important;
}

/* Header title text: uppercase, tracked */
.card-header h3,
.card-header h4,
.card-header .h3,
.card-header .h4,
.card-blesta > .card-header h3,
.card-blesta > .card-header h4 {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
}

/* Card-links (tab navigation inside header) */
.card-links,
.panel-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.card-links > li > a,
.panel-links > li > a {
    color: var(--text-secondary) !important;
    font-size: 0.78rem !important;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    text-decoration: none !important;
    transition:
        color 0.15s,
        background 0.15s;
}

.card-links > li > a:hover,
.panel-links > li > a:hover {
    color: var(--text-primary) !important;
    background: var(--surface-hover);
}

.card-links > li.active > a,
.panel-links > li.active > a {
    color: var(--accent-active) !important;
}

.card-links > li + li::before,
.panel-links > li + li::before {
    content: "|";
    color: var(--border-glass) !important;
    padding: 0 4px;
}

/* Link buttons inside header (e.g. "Make Payment") */
.card-links .btn,
.panel-links .btn {
    font-size: 0.72rem !important;
    padding: 0.2rem 0.65rem !important;
    border-radius: 4px !important;
}

/* Card body */
.card-body,
.panel .panel-body {
    color: var(--text-primary);
    padding: 1.1rem 1.25rem 4rem !important;
    overflow: visible;
}

/* Card footer */
.card-footer,
.panel .panel-footer {
    background: rgba(0, 0, 0, 0.18) !important;
    border-top: 1px solid var(--border-subtle) !important;
    color: var(--text-primary);
    padding: 0.65rem 1.25rem !important;
}

/* Panel aliases */
.panel {
    background-color: var(--panel-bg);
    border-color: var(--border-subtle);
}
.panel-body {
    color: var(--text-primary);
}

/* List group */
.list-group-item {
    background-color: var(--panel-bg) !important;
    border-color: var(--border-subtle) !important;
    color: var(--text-secondary);
}

.list-group-item h4 {
    color: var(--accent-link) !important;
}

.list-group-item.active {
    background-color: rgba(232, 0, 0, 0.1) !important;
    color: var(--text-primary) !important;
    border-left: 3px solid var(--accent-active) !important;
}

a.list-group-item:hover,
a.list-group-item:focus,
.list-group.list-options a.list-group-item:hover,
.list-group.list-options a.list-group-item:focus {
    background-color: var(--surface-hover) !important;
    color: var(--text-primary);
}

.list-group-item.credits {
    color: var(--accent-link) !important;
}
.top-focus-box {
    background-color: var(--surface-hover) !important;
}

/* Widget filter form */
form.widget_filter_form {
    background: var(--surface-overlay) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 6px !important;
    padding: 0.7rem 1rem !important;
    margin-bottom: 0.75rem !important;
}

/* Pagination */
.pagination .page-link {
    background: var(--surface-hover);
    border-color: var(--border-glass);
    color: var(--text-secondary);
    font-size: 0.8rem;
    transition:
        background 0.15s,
        color 0.15s;
}

.pagination .page-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.14);
    color: var(--text-primary);
}

.pagination .page-item.active .page-link,
div.pagination ul.pagination li.active .page-link,
div.pagination ul.pagination li.active a {
    background-color: var(--accent-active) !important;
    border-color: var(--accent-active) !important;
    color: #fff !important;
}

.pagination .page-item.disabled .page-link {
    background: transparent;
    border-color: var(--border-subtle);
    color: rgba(255, 255, 255, 0.2);
}

/* Alert messages */
.alert {
    border-left-width: 3px !important;
    border-radius: 8px !important;
    font-size: 0.875rem;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1) !important;
    border-color: rgba(23, 162, 184, 0.35) !important;
    color: #9dd8e2 !important;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1) !important;
    border-color: rgba(40, 167, 69, 0.35) !important;
    color: #8dd4a0 !important;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1) !important;
    border-color: rgba(255, 193, 7, 0.35) !important;
    color: #ffe08a !important;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1) !important;
    border-color: rgba(220, 53, 69, 0.35) !important;
    color: #f1a0a9 !important;
}

/* === Phase 3: Buttons === */
.btn {
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    transition:
        background 0.15s,
        border-color 0.15s,
        box-shadow 0.15s;
}

/* === Phase 3: Inputs === */
.form-control {
    background-color: var(--surface-hover) !important;
    border-color: var(--border-glass) !important;
    color: var(--text-primary) !important;
    border-radius: 6px;
}

.form-control:focus {
    background-color: var(--surface-hover) !important;
    border-color: var(--accent-link) !important;
    box-shadow: 0 0 0 0.2rem rgba(217, 13, 13, 0.2) !important;
    color: var(--text-primary) !important;
}

.form-control::placeholder {
    color: var(--text-secondary);
    opacity: 1;
}

.input-group-text {
    background-color: var(--border-glass) !important;
    border-color: var(--border-glass) !important;
    color: var(--text-secondary);
}

select.form-control option {
    background-color: var(--panel-bg);
    color: var(--text-primary);
}

/* Dark dropdowns */
.dropdown-menu {
    background-color: var(--panel-bg);
    border-color: var(--border-subtle);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.dropdown-item {
    color: var(--text-secondary);
}
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--surface-hover);
    color: var(--text-primary);
}
.dropdown-divider {
    border-top-color: var(--border-subtle);
}

/* Modal */
.modal-content {
    background-color: var(--panel-bg);
    border-color: var(--border-subtle);
    color: var(--text-primary);
}
.modal-header {
    border-bottom-color: var(--border-subtle);
}
.modal-footer {
    border-top-color: var(--border-subtle);
}
.close {
    color: var(--text-secondary);
    text-shadow: none;
    opacity: 0.8;
}
.close:hover {
    color: var(--text-primary);
}

/* Misc overrides */
hr {
    border-color: var(--border-subtle);
}
.text-muted {
    color: var(--text-secondary) !important;
}
.badge-pill {
    font-size: 0.7rem;
}

/* Suppress old layout elements */
.header,
.nav-content,
div.title {
    display: none !important;
}

/* === Responsive === */
@media (max-width: 991px) {
    .layout-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        width: var(--sidebar-width);
        height: 100lvh;
        z-index: 200;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-area {
        min-height: 100lvh;
    }
}

/* === Dashboard: Hero + 2�2 Cards Layout === */
.dashboard-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 1.5rem;
}

.dashboard-hero-card {
    border-radius: 20px !important;
    overflow: hidden;
    position: relative;
    background-image: url("../images/main-card-bg.png");
    background-size: cover;
    background-position: center;
    min-height: 320px;
}

.dashboard-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgb(0 0 0) 0%, rgb(0 0 0 / 32%) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
}

.dashboard-hero-top {
    width: 100%;
}

.dashboard-hero-eyebrow {
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    color: #a0aec0;
    margin-bottom: 8px;
}

.dashboard-hero-name {
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.dashboard-hero-sub {
    font-size: 1rem;
    color: #a0aec0;
    line-height: 1.7;
    margin: 0;
}

.dashboard-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    background: transparent;
    border: none;
    color: #fff !important;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: opacity 0.2s ease;
    align-self: flex-start;
}

.dashboard-hero-btn:hover {
    opacity: 0.7;
    color: #fff !important;
}

/* Right side: 2�2 cards grid */
.dashboard-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin: 0 !important;
    padding: 0 !important;

    &:has(.loading_container.skeleton-cards-grid) {
        grid-template-columns: 1fr;
    }
}

.dashboard-cards-grid > div {
    padding: 0 !important;
    margin-bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
}

.dashboard-cards-grid .dash-card-one-container {
    margin-bottom: 0;
    height: 100%;
}

.dashboard-cards-grid .dash-card-one {
    height: 100%;
    margin-bottom: 0;
}

@media (max-width: 991px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

    .dashboard-hero-card {
        min-height: 240px;
    }
}

/* === Sidebar Promo Card === */
.sidebar-promo-card {
    margin: 0 15px 8px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    padding: 16px 16px 14px;
    background-image: url("../images/card-image-croped.jpeg");
    background-size: cover;
    background-position: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.sidebar-promo-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        37deg,
        rgb(0 0 0 / 37%) 0%,
        rgb(6 0 0 / 26%) 50%
    );
    pointer-events: none;
}

.sidebar-promo-icon {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.22);
}

.sidebar-promo-title {
    position: relative;
    z-index: 1;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.25;
}

.sidebar-promo-subtitle {
    position: relative;
    z-index: 1;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.68);
    margin-bottom: 14px;
    line-height: 1.45;
}

.sidebar-promo-btn {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    padding: 9px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    color: #fff !important;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-decoration: none !important;
    text-transform: uppercase;
    transition: background 0.2s ease;
}

.sidebar-promo-btn:hover {
    background: rgba(0, 0, 0, 0.6);
    color: #fff !important;
}

.sidebar-bottom-action .logout-link:hover {
    background: var(--surface-hover);
    color: var(--text-primary) !important;
}
.sidebar-nav-list .nav-item .nav-link {
    border-radius: 8px;
    margin: 4px 12px;
    transition:
        background 0.3s,
        color 0.3s;
    font-weight: 500;

    svg {
        width: 20px;
        height: 20px;
        margin-right: 10px;
    }
}
.sidebar-user-profile .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-primary) !important;
}

.top-bar-right {
    display: flex;
    align-items: center;
}

/* === Dashboard Feature Cards === */
.dash-card-one-container {
    position: relative;
}
.dash-card-one {
    position: relative;
    padding: 2.2rem;
    box-shadow: var(--card-shadow);
    border-radius: 24px;
    margin-bottom: 25px;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
    z-index: 1;
}

.dash-card-one-container:before {
    content: "";
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    bottom: -10px;
    border-radius: 24px;
    background: var(--surface-overlay);
    z-index: 0;
}
.dash-card-one .icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.9);
    background: var(--surface-hover);
    border: 1px solid var(--border-subtle);
    flex-shrink: 0;
}
.dash-card-one .value {
    font-size: 36px;
    letter-spacing: -0.36px;
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 5px;
    line-height: 1;
}
.dash-card-one .label-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 15px;
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;

    svg {
        width: 50px;
        height: 50px;
        margin-bottom: 20px;
    }
}

.outline-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    background-color: var(--surface-hover);
    border: 1px solid var(--border-subtle);
    font-weight: 600;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    transition:
        background-color 0.3s,
        border-color 0.3s;
    &:has(svg) {
        padding: 0.4rem 0.6rem;
    }
    svg {
        width: 16px;
        height: 16px;
    }

    &:hover {
        color: var(--text-primary);
        background-color: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.15);
    }
}

.table-badge {
    padding: 4px 8px;
    border-radius: 50%;
}
.talbe-expand-logo {
    td:last-of-type {
        position: relative;
        &::after {
            position: absolute !important;
            top: 30%;
            right: 41%;
        }
    }
}

/* === Nav Tabs: Modern Underline Style === */
.nav-tabs {
    border-bottom: 1px solid var(--border-glass) !important;
    gap: 0.1rem;
    background: transparent;
    padding: 0 0.5rem;
    flex-wrap: wrap;
}

.nav-tabs .nav-item .nav-link,
.nav-tabs > .nav-item > a.nav-link {
    color: var(--text-secondary) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    padding: 0.7rem 1.1rem !important;
    font-weight: 500 !important;
    font-size: 0.82rem !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    margin-bottom: -1px !important;
    transition:
        color 0.2s ease,
        border-color 0.2s ease !important;
    position: relative;
}

.nav-tabs .nav-item .nav-link::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    right: 50%;
    height: 2px;
    background: var(--accent-active) !important;
    transition: left 0.25s ease, right 0.25s ease;
    border-radius: 2px 2px 0 0;
}
.nav li.nav-item a.nav-link.active:hover,
.nav li.nav-item a.nav-link.active:focus {
    color: var(--text-secondary) !important;
}
.nav .nav-tabs li.nav-item a.nav-link {
    &:hover {
        color: var(--text-secondary) !important;
        background: transparent !important;
        border-color: transparent !important;
    }
}

.nav-tabs .nav-item .nav-link:hover::after {
    left: 25%;
    right: 25%;
    background: var(--border-glass);
}

.nav-tabs .nav-item .nav-link.active,
.nav-tabs > .nav-item > a.nav-link.active {
    color: var(--text-primary) !important;
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
}

.nav-tabs .nav-item .nav-link.active::after {
    left: 0 !important;
    right: 0 !important;
    background: var(--accent-active) !important;
}

.tab-content {
    padding-top: 1.5rem;
}

/* === Phase 4: Modern Card Components === */
.card-blesta-header {
    padding: 1.5rem 1.5rem 0 !important;
    border-left: none !important;
}

.card-blesta-title {
    font-size: 1.5rem !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    color: var(--text-primary) !important;
    font-weight: 500 !important;
}

.card-blesta-nav {
    border-bottom: 1px solid var(--border-glass) !important;
    flex-wrap: nowrap !important;
    padding-bottom: 0 !important;
}

.nav li.nav-item .nav-link.card-blesta-nav-item {
    margin-bottom: -1px !important;
}

.nav li.nav-item .nav-link.card-blesta-nav-link {
    color: var(--text-primary) !important;
    border-bottom: 2px solid transparent !important;
    font-weight: 500 !important;
    transition: color 0.2s !important;
}

.nav li.nav-item .nav-link.card-blesta-nav-link.card-blesta-active {
    color: var(--accent-active) !important;
    border-bottom: 2px solid var(--accent-active) !important;
}

.card-blesta-badge {
    background: rgba(255, 255, 255, 0.1) !important;
}

.btn-icon-dots {
    background: transparent !important;
    border: none !important;
    color: inherit !important;
    box-shadow: none !important;
    padding: 0.25rem 0.5rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.card-blesta-footer {
    background: rgba(0, 0, 0, 0.18) !important;
    border-top: 1px solid var(--border-subtle) !important;
}

/* === Topbar User Dropdown === */
.topbar-user-dropdown {
    position: relative;
}

.topbar-user-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: background 0.3s, border-color 0.3s, transform 0.2s;
}

.topbar-user-profile:hover,
.topbar-user-dropdown.is-open .topbar-user-profile {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-active);
    transform: scale(1.05);
}

.topbar-user-menu {
    min-width: 170px;
    padding: 0.4rem 0 !important;
    border-radius: 10px !important;
    margin-top: 0.5rem !important;
    display: none;
}

.topbar-user-dropdown.is-open .topbar-user-menu,
.topbar-user-dropdown.show .topbar-user-menu {
    display: block;
}

.topbar-user-menu .dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.55rem 1rem !important;
    border-radius: 0 !important;
    transition: background 0.15s, color 0.15s;
}

.topbar-user-menu .dropdown-item svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.topbar-user-menu .dropdown-item:hover svg {
    opacity: 1;
}

.topbar-user-menu .topbar-logout-item {
    color: var(--accent-active) !important;
}

.topbar-user-menu .topbar-logout-item:hover {
    background: rgba(232, 0, 0, 0.1) !important;
    color: var(--accent-hover) !important;
}

.topbar-user-menu .dropdown-divider {
    margin: 0.25rem 0 !important;
}

body.client-login .container-md {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.client-login .row.login {
    margin: 0 !important;
    padding: 0 !important;
}

.login-split-wrapper {
    display: flex;
    min-height: 100lvh;
    justify-content: center;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.login-image-side {
    background-image: url("../images/login-page-image.png");
    /*background-image: url('../images/login-page-image-v2.png');*/
    background-size: 150% 100%;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        40deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10%;
}

.login-split-wrapper .login-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    transition:
        transform 0.2s ease,
        border-color 0.2s ease;

    img {
        width: 36px;
        height: 36px;
        transition: transform 0.3s ease;
    }
}

.login-image-content h1 {
    font-size: 4rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.login-image-content p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    z-index: 10;
}

.login-container {
    width: 100%;
    height: 100%;
}

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

.login-box {
    position: relative;
    width: 100%;
    max-width: 550px;
    border-radius: 20px !important;
    padding: 36px !important;
    box-shadow:
        0 24px 60px -20px rgba(0, 0, 0, 0.55),
        0 0 0 1px var(--border-glass) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    background: rgb(14 20 36 / 0.39) !important;
    overflow: hidden;
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;

    .login-brand {
        img {
            margin-bottom: -5px;
        }
        &:hover {
            text-decoration: none;
            border-color: rgba(232, 0, 0, 0.4);
        }
        &:hover img {
            transform: scale(1.08);
        }
    }
    .login-brand .login-brand span {
        display: none;
    }

    .login-header {
        text-align: center;
    }
}

.login-header {
    text-align: left;
    margin-bottom: 36px;
    position: relative;
    z-index: 2;
}

.login-title {
    font-family: "Inter", sans-serif;
    font-weight: 600;
    font-size: 1.6rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin: 0 0 6px;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    font-weight: 400;
}

.login-header h4 {
    font-family: "Inter", sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.login-header p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.login-body {
    position: relative;
    z-index: 2;
}

.form-group-modern {
    margin-bottom: 14px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    isolation: isolate;
}

.input-wrapper > i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
    transition: color 0.2s ease;
    pointer-events: none;
    z-index: 2;
}

.form-control-modern {
    width: 100%;
    height: 54px;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 20px 18px 8px 48px !important;
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
    font-family: "Inter", sans-serif !important;
    font-weight: 400 !important;
    letter-spacing: 0;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease !important;
    box-shadow: none !important;
}

.form-control-modern::placeholder {
    color: transparent;
}

.form-control-modern:hover {
    border-color: rgba(255, 255, 255, 0.14) !important;
}

.form-control-modern:focus {
    border-color: var(--accent-active) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    box-shadow: 0 0 0 3px rgba(232, 0, 0, 0.12) !important;
    outline: none !important;
}

.float-label {
    position: absolute;
    left: 48px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.92rem;
    font-weight: 400;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    padding: 0;
    margin: 0;
    text-transform: none;
    letter-spacing: 0;
    z-index: 1;
}

.form-control-modern:focus ~ .float-label,
.form-control-modern:not(:placeholder-shown) ~ .float-label,
.form-control-modern:-webkit-autofill ~ .float-label {
    top: 6px;
    transform: translateY(0);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    left: 48px;
}

/* Keep autofill text legible on dark glass surface */
.form-control-modern:-webkit-autofill,
.form-control-modern:-webkit-autofill:hover,
.form-control-modern:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary);
    transition: background-color 5000s ease-in-out 0s;
    box-shadow: 0 0 0 1000px rgba(14, 20, 36, 0.92) inset !important;
}

.input-wrapper:focus-within > i {
    color: var(--accent-active);
}

.input-underline {
    display: none;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 18px 0 24px;
    flex-wrap: wrap;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.custom-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}
.custom-checkbox input[type="checkbox"]:hover {
    border-color: rgba(232, 0, 0, 0.4);
}
.custom-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(
        135deg,
        var(--accent-active) 0%,
        var(--accent-dark) 100%
    );
    border-color: var(--accent-active);
    box-shadow: 0 0 0 3px rgba(232, 0, 0, 0.18);
}
.custom-checkbox input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox label {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin: 0;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
}

.forgot-link {
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
}
.forgot-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 100%;
    height: 1px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}
.forgot-link:hover {
    color: var(--accent-hover);
    text-decoration: none;
}
.forgot-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-modern-primary {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: var(--accent-active);
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    color: #fff;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: transform 0.15s ease;
    box-shadow: 0 4px 14px -4px rgba(232, 0, 0, 0.5) !important;
}
.btn-modern-primary:hover {
    transform: scale(1.02) translateY(-1px);
}
.btn-modern-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px -2px rgba(232, 0, 0, 0.5);
}

.btn-modern-primary i {
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}
.btn-modern-primary:hover i {
    transform: translateX(3px);
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-sep {
    color: var(--text-muted);
    font-size: 0.85rem;
    opacity: 0.6;
}

.forgot-username-link {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: color 0.2s;
    font-weight: 500;
}
.forgot-username-link:hover {
    color: var(--accent-hover);
    text-decoration: none;
}

.captcha-wrapper {
    margin: 6px 0 22px;
    display: flex;
    justify-content: center;
}

/* Responsive adjustments for split layout */
@media (max-width: 1200px) {
    .login-image-content h1 {
        font-size: 3rem;
    }
    .login-form-side {
        width: 500px;
    }
}

@media (max-width: 991px) {
    .login-image-side {
        display: none;
    }
    .login-form-side {
        width: 100%;
        background: transparent;
        padding: 20px;
    }
    .login-box {
        padding: 32px 24px !important;
    }
}

@media (max-width: 576px) {
    .login-box {
        padding: 28px 20px !important;
        border-radius: 16px !important;
    }
    .login-title {
        font-size: 1.4rem;
    }
    .login-split-wrapper .login-brand {
        font-size: 1.25rem;
    }
    .login-split-wrapper .login-brand img {
        width: 30px;
        height: 30px;
    }
}

/* === Enhanced Form Controls (all content-area forms) === */

.tab-content {
    padding-top: 2rem;
}

/* Section headings inside tab panes */
.tab-pane h4 {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
    margin: 0 0 2rem !important;
    padding-bottom: 0.85rem !important;
    padding-left: 0.9rem !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    position: relative;
    display: block !important;
}

.tab-pane h4::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.05em;
    bottom: 0.2em;
    width: 3px;
    background: var(--accent-active);
    border-radius: 2px;
}

/* Form groups: more breathing room */
.content-area .form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Inside table cells, form-group margin breaks vertical centering */
.table td .form-group {
    margin-bottom: 0 !important;
}

/* Phone number row buttons ? match field vibe */
.table td .btn-group .btn-light {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.09) !important;
    color: var(--text-secondary) !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em;
    padding: 0.5rem 0.9rem !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

.table td .btn-group .btn-light:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: var(--text-primary) !important;
}

/* Labels: tiny uppercase tracked annotations */
.content-area .form-group > label:not(.inline):not(.form-check-label) {
    display: block;
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
    margin-bottom: 0.55rem !important;
    transition: color 0.2s ease;
}

/* Label blushes red when its input is focused */
.content-area .form-group:has(.form-control:focus) > label:not(.inline) {
    color: rgba(232, 0, 0, 0.75) !important;
}

/* Enhanced form controls */
.content-area .form-control {
    height: 52px !important;
    padding: 0.875rem 1.125rem !important;
    font-size: 0.875rem !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 10px !important;
    color: var(--text-primary) !important;
    transition: border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease !important;
    line-height: 1.2;
}

.content-area .form-control:hover {
    border-color: rgba(255, 255, 255, 0.16) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.content-area .form-control:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: var(--accent-active) !important;
    box-shadow: 0 0 0 3px rgba(232, 0, 0, 0.13), 0 2px 12px rgba(0, 0, 0, 0.2) !important;
    outline: none !important;
}

/* Custom select chevron */
.content-area select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 12px 8px !important;
    padding-right: 2.75rem !important;
    cursor: pointer;
}

/* Username display paragraph ? matches input height/style */
#authentication .form-group p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 0 1.125rem;
    margin: 0;
    height: 52px;
    display: flex;
    align-items: center;
    letter-spacing: 0.01em;
}

/* Checkbox cards */
.content-area .card.bg-light {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    padding: 1rem 1.25rem !important;
}

/* Checkbox labels */
.content-area .checkbox {
    margin-bottom: 0.5rem;
}

.content-area .checkbox label {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 500;
}

/* 2FA expanded options panel */
#two_factor_options {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

#two_factor_options h4 {
    margin-top: 0 !important;
}

/* Form actions bar */
.form-actions-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-top: 1.5rem;
    margin-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

/* Modern submit button ? covers both explicit class and any btn-light submit in content-area */
.btn-edit-submit,
/*.content-area form a.btn.btn-light[href],*/
.content-area form button[type="submit"].btn-light {
    background: var(--accent-active) !important;
    color: #fff !important;
    border: none !important;
    padding: 0.75rem 1.75rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    letter-spacing: 0.03em;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px -4px rgba(232, 0, 0, 0.5) !important;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease !important;
}


.btn-edit-submit:active,
.content-area form button[type="submit"].btn-light:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px -2px rgba(232, 0, 0, 0.5) !important;
}

/* === Payment Pages === */

/* Section divider */
.pay-section-divider {
    border-color: var(--border-subtle);
    margin: 1.75rem 0;
}

/* Help text below inputs */
.help-block {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.45rem;
    display: flex;
    align-items: flex-start;
    gap: 0.35rem;
    line-height: 1.5;
}

.help-block i {
    margin-top: 0.1em;
    flex-shrink: 0;
    color: var(--accent-link);
    opacity: 0.7;
}

/* Credit amount input group */
.pay-amount-group {
    display: flex;
}

.pay-amount-group .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.pay-currency-tag {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-left: none !important;
    border-radius: 0 10px 10px 0 !important;
    color: var(--text-secondary) !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.06em;
    padding: 0 1rem !important;
}

/* Payment method column dividers */
.col-border {
    border-right: 1px solid var(--border-subtle);
}

/* Payment method section h4 labels */
.content-area #client_method h4 {
    font-size: 0.68rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
    margin-bottom: 0.75rem !important;
}

/* Total amount badge */
.pay-total-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 10px;
    padding: 0.6rem 1.1rem;
}

.pay-total-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.pay-total-amount {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

/* Edit button in confirm step ? secondary styling */
.pay-edit-btn {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    color: var(--text-secondary) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    border-radius: 10px !important;
    padding: 0.75rem 1.25rem !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
    box-shadow: none !important;
    transform: none !important;
}

.pay-edit-btn:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.18) !important;
    color: var(--text-primary) !important;
    transform: none !important;
    box-shadow: none !important;
}

/* gap utility for flex rows (Bootstrap 4 doesn't have gap) */
.d-flex.gap-2 {
    gap: 0.5rem;
}

/* ==========================================
   Dashboard Hero Alert Card Styling overrides
   ========================================== */

/* Scoped Alert container inside the hero card */
.dashboard-hero-alert {
    position: relative;
    border-radius: 20px !important;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-hero-alert .alert {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #fff !important;
    position: static;
    max-width: 70%;
}

.dashboard-hero-alert .alert strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.dashboard-hero-alert .alert br {
    display: none;
}

.dashboard-hero-alert .dashboard-hero-message {
    font-size: 1rem;
    color: #cbd5e0;
    line-height: 1.6;

    .close {
        display: none;
    }
}

.dashboard-hero-alert .dashboard-hero-message p {
    margin-bottom: 0;
}

/* Close/dismiss button positioning */
.dashboard-hero-alert .alert .close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: #fff !important;
    opacity: 0.6;
    font-size: 1.75rem;
    font-weight: 400;
    text-shadow: none;
    transition: all 0.2s ease;
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin: 0;
    z-index: 10;
}

.dashboard-hero-alert .alert .close:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Custom premium gradient buttons */
.dashboard-hero-alert .alert .btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 12px;
    border: none !important;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    color: #fff !important;
    text-decoration: none !important;
}
.btn.btn-light {
    background: var(--accent-active) !important;
    border-radius: 10px !important;
    color: #fff !important;
    border: none;
    padding-block: 10px;
    margin-block: 20px;
}

/* Alert Type: WARNING */
.dashboard-hero-alert.dashboard-hero-warning {
    box-shadow: inset 0 0 20px rgba(229, 150, 0, 0.1), 0 8px 30px rgba(0, 0, 0, 0.35) !important;
}
.dashboard-hero-alert.dashboard-hero-warning .alert-warning .btn,
.dashboard-hero-alert.dashboard-hero-warning .alert-warning .btn-warning {
    background: var(--accent-active) !important;
    border-radius: 10px;
    position: absolute;
    bottom: 20px;
}
.dashboard-hero-alert.dashboard-hero-warning .alert-warning .btn:hover,
.dashboard-hero-alert.dashboard-hero-warning .alert-warning .btn-warning:hover {
    transform: translateY(-2px);
}

/* Alert Type: DANGER */
.dashboard-hero-alert.dashboard-hero-danger {
    border: 1px solid rgba(229, 62, 62, 0.3) !important;
    box-shadow: inset 0 0 20px rgba(229, 62, 62, 0.1), 0 8px 30px rgba(0, 0, 0, 0.35) !important;
}
.dashboard-hero-alert.dashboard-hero-danger .alert-danger .btn,
.dashboard-hero-alert.dashboard-hero-danger .alert-danger .btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%) !important;
}
.dashboard-hero-alert.dashboard-hero-danger .alert-danger .btn:hover,
.dashboard-hero-alert.dashboard-hero-danger .alert-danger .btn-danger:hover {
    background: linear-gradient(135deg, #fc8181 0%, #e53e3e 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

/* Alert Type: SUCCESS */
.dashboard-hero-alert.dashboard-hero-success {
    border: 1px solid rgba(56, 161, 105, 0.3) !important;
    box-shadow: inset 0 0 20px rgba(56, 161, 105, 0.1), 0 8px 30px rgba(0, 0, 0, 0.35) !important;
}
.dashboard-hero-alert.dashboard-hero-success .alert-success .btn,
.dashboard-hero-alert.dashboard-hero-success .alert-success .btn-success {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%) !important;
}
.dashboard-hero-alert.dashboard-hero-success .alert-success .btn:hover,
.dashboard-hero-alert.dashboard-hero-success .alert-success .btn-success:hover {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(56, 161, 105, 0.4);
}

/* Alert Type: INFO */
.dashboard-hero-alert.dashboard-hero-info {
    border: 1px solid rgba(49, 130, 206, 0.3) !important;
    box-shadow: inset 0 0 20px rgba(49, 130, 206, 0.1), 0 8px 30px rgba(0, 0, 0, 0.35) !important;
}
.dashboard-hero-alert.dashboard-hero-info .alert-info .btn,
.dashboard-hero-alert.dashboard-hero-info .alert-info .btn-info {
    background: linear-gradient(135deg, #3182ce 0%, #2b6cb0 100%) !important;
}
.dashboard-hero-alert.dashboard-hero-info .alert-info .btn:hover,
.dashboard-hero-alert.dashboard-hero-info .alert-info .btn-info:hover {
    background: linear-gradient(135deg, #63b3ed 0%, #3182ce 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 130, 206, 0.4);
}

/* ==========================================
   Skeleton Loading Animation and Classes
   ========================================== */

@keyframes skeleton-pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.6;
    }
}

.skeleton-pulse {
    animation: skeleton-pulse 1.5s ease-in-out infinite !important;
}

/* 1. Cards Grid Skeleton */
.skeleton-cards-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    background: transparent !important;
    z-index: 10;
}

.skeleton-card-item {
    width: 100%;
}

.skeleton-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 2rem !important;
    border-radius: 20px !important;
    min-height: 120px;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.skeleton-card-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.skeleton-line {
    border-radius: 4px;
}

.skeleton-value {
    width: 70px;
    height: 32px;
    background: rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
}

.skeleton-label {
    width: 120px;
    height: 16px;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 6px !important;
}

.skeleton-icon {
    width: 48px;
    height: 48px;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

/* 2. Table Skeleton */
.skeleton-table-container {
    width: 100% !important;
    height: auto !important;
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    border-radius: 16px !important;
    padding: 3rem 1.5rem !important;
    position: relative !important;
    display: flex;
    flex-direction: column;
    gap: 16px;
    z-index: 10;
}

.skeleton-table-header {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
    gap: 20px;
}

.skeleton-table-header .header-col {
    height: 18px;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 6px;
}

.skeleton-table-header .header-col:nth-child(1) { width: 25%; }
.skeleton-table-header .header-col:nth-child(2) { width: 40%; }
.skeleton-table-header .header-col:nth-child(3) { width: 20%; }

.skeleton-table-row {
    display: flex;
    justify-content: space-between;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    gap: 20px;
}

.skeleton-table-row .row-col {
    height: 16px;
    background: rgba(255, 255, 255, 0.04) !important;
    border-radius: 6px;
}

.skeleton-table-row .row-col:nth-child(1) { width: 20%; }
.skeleton-table-row .row-col:nth-child(2) { width: 45%; }
.skeleton-table-row .row-col:nth-child(3) { width: 15%; }

/* 3. Default Spinner Fallback */
.skeleton-default-container {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.25) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 100 !important;
}

.skeleton-default-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: skeleton-pulse 1.2s ease-in-out infinite, spin 1s linear infinite !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 4. Unified Dashboard Skeleton Wrapper */
.skeleton-dashboard-unified {
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1.5rem !important;
    width: 100% !important;
    height: auto !important;
    background: transparent !important;
    z-index: 10;
}

.search {
    .btn-group {
        gap: 20px;

        .btn.btn-light,
        a.btn.btn-light:has(i.fas.fa-hand-point-right),
        .btn.btn-success {
            border-radius: 20px !important;
        }
    }
}

#two_factor_qr {
    background: white;
}