/* ==========================================================
   EngageX Layout — ConcatorsVertex Dark Theme
   Enhanced Enterprise SaaS Layout
   ========================================================== */

/* ==========================================================
   App Shell
   ========================================================== */

.app-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--vx-body-bg);
}

.vx-app-body {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
}

.vx-skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 1100;
    padding: 0.625rem 0.875rem;
    color: #fff;
    background: #1d4ed8;   /* UX27-B04: white on this blue is 6.7:1 (the --vx-primary blue was 3.7:1) */
    border: 1px solid var(--vx-primary-border);
    border-radius: var(--vx-radius-sm);
    box-shadow: var(--vx-shadow);
    text-decoration: none;
    transform: translateY(calc(-100% - 1rem));
    transition: transform var(--vx-transition-fast);
}

.vx-skip-link:focus {
    color: #fff;
    transform: translateY(0);
    box-shadow: var(--vx-shadow-focus);
}


/* ==========================================================
   Navbar
   ========================================================== */

.vx-navbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    height: var(--vx-navbar-height);
    background:
        linear-gradient(
            180deg,
            rgba(17, 24, 39, 0.98),
            rgba(15, 23, 42, 0.98)
        );
    border-bottom: 1px solid var(--vx-border);
    box-shadow:
        0 4px 24px rgba(0, 0, 0, 0.30),
        0 1px 0 rgba(255,255,255,0.025);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.vx-navbar-inner {
    height: var(--vx-navbar-height);
    min-height: var(--vx-navbar-height);
    padding: 0 1rem 0 1.25rem;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0;
    overflow: visible;
}


/* Brand */

.vx-navbar .navbar-brand {
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: -0.015em;
    gap: 0.5rem;
    padding: 0;
    margin-right: 1rem;
    flex-shrink: 0;
    transition: color var(--vx-transition);
}

.vx-navbar .navbar-brand:hover {
    color: var(--vx-accent);
}


/* Horizontal product navigation */

.vx-nav-tabs {
    display: flex;
    align-items: stretch;
    height: var(--vx-navbar-height);
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    flex: 1 1 0;
    min-width: 0;
}

.vx-nav-tabs .vx-nav-tab {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 1rem;
    color: rgba(255,255,255,0.62);
    font-size: .82rem;
    font-weight: 500;
    white-space: nowrap;
    text-decoration: none;
    gap: 0.4rem;
    border-bottom: 2px solid transparent;
    transition:
        color var(--vx-transition),
        background var(--vx-transition),
        border-color var(--vx-transition);
}

.vx-nav-tabs .vx-nav-tab:hover {
    color: #fff;
    background: rgba(255,255,255,0.025);
    border-bottom-color: rgba(255,255,255,0.25);
}

.vx-nav-tabs .vx-nav-tab.active {
    color: #fff;
    font-weight: 600;
    border-bottom-color: var(--vx-accent);
    background: linear-gradient(
        180deg,
        transparent 55%,
        rgba(249,115,22,0.055)
    );
}

.vx-nav-tabs .vx-nav-tab.active::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -1px;
    width: 24px;
    height: 2px;
    transform: translateX(-50%);
    background: var(--vx-accent);
    border-radius: 2px 2px 0 0;
    box-shadow: 0 0 10px rgba(249,115,22,0.45);
}


/* Navbar right-side controls */

.vx-navbar-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-left: 0.75rem;
    margin-left: auto;
}


/* User dropdown */

.vx-navbar-right .dropdown-menu {
    z-index: 1050;
    min-width: 190px;
    margin-top: .45rem;
    background: #1a2744;
    border: 1px solid var(--vx-border-strong);
    border-radius: var(--vx-radius);
    box-shadow:
        0 16px 40px rgba(0,0,0,0.48),
        0 2px 8px rgba(0,0,0,0.25);
}

.vx-navbar-right .dropdown-menu .dropdown-item {
    color: var(--vx-text-muted);
    font-size: .775rem;
    padding: .5rem .8rem;
}

.vx-navbar-right .dropdown-menu .dropdown-item:hover,
.vx-navbar-right .dropdown-menu .dropdown-item:focus {
    background: rgba(255,255,255,0.07);
    color: #fff;
}


/* Notification */

.vx-navbar-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    color: rgba(255,255,255,0.65);
    background: transparent;
    border: 1px solid var(--vx-border);
    cursor: pointer;
    text-decoration: none;
    transition:
        background var(--vx-transition),
        color var(--vx-transition),
        border-color var(--vx-transition),
        transform var(--vx-transition);
}

.vx-navbar-bell:hover {
    background: var(--vx-surface-hover);
    color: #fff;
    border-color: var(--vx-border-strong);
    transform: translateY(-1px);
}

.vx-navbar-bell:focus-visible {
    outline: none;
    box-shadow: var(--vx-shadow-focus);
}

.vx-navbar-bell .vx-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    background: var(--vx-accent);
    color: #fff;
    font-size: .58rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 2px solid #111827;
}


/* User avatar pill */

.vx-user-pill {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem .6rem .25rem .25rem;
    border-radius: 2rem;
    cursor: pointer;
    transition:
        background var(--vx-transition),
        border-color var(--vx-transition),
        box-shadow var(--vx-transition);
    border: 1px solid var(--vx-border);
    background: rgba(255,255,255,0.035);
    color: #fff;
}

.vx-user-pill:hover {
    background: var(--vx-surface-hover);
    border-color: var(--vx-border-strong);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.vx-user-pill:focus-visible {
    outline: none;
    box-shadow: var(--vx-shadow-focus);
}

.vx-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        var(--vx-primary),
        var(--vx-accent)
    );
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow:
        0 0 0 2px rgba(255,255,255,0.06),
        0 4px 12px rgba(0,0,0,0.25);
}

.vx-user-info {
    text-align: left;
    line-height: 1.2;
}

.vx-user-name {
    font-size: .82rem;
    font-weight: 600;
    color: #fff;
}

.vx-user-role {
    font-size: .72rem;
    color: rgba(255,255,255,0.78);   /* UX27-B04: was .52 (4.3:1); now above 4.5:1 */
}


/* ==========================================================
   Sidebar
   ========================================================== */

.vx-sidebar {
    position: sticky;
    top: var(--vx-navbar-height);
    flex-shrink: 0;
    align-self: flex-start;
    height: calc(100vh - var(--vx-navbar-height));
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1020;
    width: var(--vx-sidebar-width);

    background:
        linear-gradient(
            180deg,
            #111827 0%,
            #0f172a 100%
        );

    border-right: 1px solid var(--vx-border);

    scrollbar-width: thin;
    scrollbar-color: var(--vx-border) transparent;

    transition:
        width .22s ease,
        transform .22s ease,
        box-shadow .22s ease;
}

.vx-sidebar::-webkit-scrollbar {
    width: 5px;
}

.vx-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.vx-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.10);
    border-radius: 10px;
}

.vx-sidebar-inner {
    min-height: 100%;
    padding: .75rem 0 1.5rem;
}


/* Section label */

.vx-sidebar-section-label {
    padding: 1rem 1rem .4rem;
    font-size: .63rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--vx-accent);
    opacity: .82;
}


/* Navigation item */

.vx-sidebar .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .48rem 1rem;
    margin: .1rem .5rem;
    min-height: 34px;
    border-radius: var(--vx-radius-sm);
    color: var(--vx-text-muted);
    font-size: .82rem;
    font-weight: 500;
    border-left: 2px solid transparent;
    text-decoration: none;

    transition:
        color var(--vx-transition),
        background var(--vx-transition),
        border-color var(--vx-transition),
        transform var(--vx-transition);
}

.vx-sidebar .nav-link i {
    width: 1.1rem;
    text-align: center;
    font-size: .85rem;
    flex-shrink: 0;
    opacity: .85;
}

.vx-sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.055);
}

.vx-sidebar .nav-link:hover i {
    opacity: 1;
}

.vx-sidebar .nav-link.active {
    color: #fff;
    background:
        linear-gradient(
            90deg,
            rgba(59,130,246,0.16),
            rgba(59,130,246,0.06)
        );
    border-left-color: var(--vx-accent);
    font-weight: 600;
    box-shadow: inset 0 0 18px rgba(59,130,246,0.035);
}

.vx-sidebar .nav-link.active i {
    color: #60a5fa;
    opacity: 1;
}


/* Collapse footer */

.vx-sidebar-footer {
    padding: .75rem 1rem;
    border-top: 1px solid var(--vx-border);
    margin-top: auto;
}

.vx-sidebar-collapse-btn {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--vx-text-muted);
    font-size: .78rem;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    padding: .4rem .5rem;
    border-radius: var(--vx-radius-sm);
    width: 100%;
    transition:
        color var(--vx-transition),
        background var(--vx-transition);
}

.vx-sidebar-collapse-btn:hover {
    color: #fff;
    background: var(--vx-surface-hover);
}

.vx-sidebar-collapse-btn:focus-visible {
    outline: none;
    box-shadow: var(--vx-shadow-focus);
}


/* Collapsed sidebar */

.vx-sidebar--collapsed {
    width: 58px;
}

.vx-sidebar--collapsed .nav-link span,
.vx-sidebar--collapsed .vx-sidebar-section-label,
.vx-sidebar--collapsed .vx-sidebar-collapse-btn span {
    display: none;
}

.vx-sidebar--collapsed .nav-link {
    justify-content: center;
    padding: .5rem;
}

.vx-sidebar--collapsed .nav-link i {
    margin: 0;
}

.vx-sidebar--collapsed .vx-sidebar-footer {
    padding-left: .45rem;
    padding-right: .45rem;
}


/* ==========================================================
   Main Content
   ========================================================== */

.app-main {
    flex: 1;
    min-width: 0;
    min-height: calc(100vh - var(--vx-navbar-height));
    padding: 1.75rem 2rem;

    background:
        radial-gradient(
            circle at 10% 0%,
            rgba(59,130,246,0.045),
            transparent 30%
        ),
        #0f172a;
}


/* ==========================================================
   Page Header
   ========================================================== */

.vx-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.vx-page-heading {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.vx-page-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.025em;
    margin: 0;
    line-height: 1.2;
}

.vx-page-subtitle {
    font-size: .82rem;
    color: var(--vx-text-muted);
    margin: .3rem 0 0;
}

.vx-page-badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .65rem;
    background: var(--vx-primary-soft);
    color: #60a5fa;
    border-radius: 2rem;
    font-size: .72rem;
    font-weight: 600;
    border: 1px solid var(--vx-primary-border);
    white-space: nowrap;
}


/* ==========================================================
   Content Card
   ========================================================== */

.vx-content {
    position: relative;
    overflow: visible;
    background:
        linear-gradient(
            180deg,
            rgba(30,45,71,0.98),
            rgba(26,39,68,0.98)
        );
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-lg);
    box-shadow:
        0 8px 32px rgba(0,0,0,0.25),
        0 1px 0 rgba(255,255,255,0.025);
}


/* ==========================================================
   Toolbar
   ========================================================== */

.vx-toolbar-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--vx-border);
    flex-wrap: wrap;
    background: rgba(255,255,255,0.025);
    border-radius: var(--vx-radius-lg) var(--vx-radius-lg) 0 0;
}

.vx-search-wrap {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 380px;
}

.vx-search-wrap .vx-search-icon {
    position: absolute;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vx-text-light);
    font-size: .85rem;
    pointer-events: none;
}

.vx-search-input {
    width: 100%;
    min-height: 36px;
    box-sizing: border-box;
    padding: .45rem .75rem .45rem 2.1rem;
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-sm);
    background: rgba(255,255,255,.055);
    color: var(--vx-text);
    font-size: .82rem;
    transition:
        border-color var(--vx-transition),
        box-shadow var(--vx-transition),
        background var(--vx-transition);
    outline: none;
}

.vx-search-input::placeholder {
    color: var(--vx-text-light);
}

.vx-search-input:focus {
    border-color: var(--vx-primary);
    box-shadow: var(--vx-shadow-focus);
    background: rgba(255,255,255,.075);
}

.vx-filter-select {
    min-height: 36px;
    padding: .45rem 2rem .45rem .75rem;
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-sm);
    background-color: rgba(255,255,255,.055);
    color: var(--vx-text);
    font-size: .82rem;
    cursor: pointer;
    appearance: none;
    outline: none;

    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%2394a3b8' d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right .6rem center;

    transition:
        border-color var(--vx-transition),
        box-shadow var(--vx-transition);
}

.vx-filter-select:focus {
    border-color: var(--vx-primary);
    box-shadow: var(--vx-shadow-focus);
}

.vx-filter-select option {
    background: #1e2d47;
    color: var(--vx-text);
}


/* CTA */

.vx-btn-create {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-height: 36px;
    padding: .45rem 1rem;

    background:
        linear-gradient(
            135deg,
            #c2410c,
            #9a3412
        );   /* UX27-B04: white text on the old orange (#f97316 to #ea6c0a) was 3.7:1; this pair is 5.2:1 or better */

    color: #fff;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: var(--vx-radius-sm);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    margin-left: auto;

    box-shadow:
        0 4px 16px rgba(249,115,22,.22);

    transition:
        transform var(--vx-transition),
        box-shadow var(--vx-transition),
        filter var(--vx-transition);
}

.vx-btn-create:hover {
    color: #fff;
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow:
        0 8px 24px rgba(249,115,22,.34);
}

.vx-btn-create:active {
    transform: translateY(0);
}

.vx-btn-create:focus-visible {
    outline: none;
    box-shadow:
        var(--vx-shadow-focus),
        0 8px 24px rgba(249,115,22,.28);
}


/* ==========================================================
   Table
   ========================================================== */

.vx-table-wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
}

.vx-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .82rem;
}

.vx-table thead th {
    padding: .7rem 1rem;
    font-size: .66rem;
    font-weight: 700;
    color: rgba(255,255,255,.46);
    text-transform: uppercase;
    letter-spacing: .075em;
    border-bottom: 1px solid var(--vx-border);
    background: rgba(255,255,255,.025);
    white-space: nowrap;
}

.vx-table tbody tr {
    border-bottom: 1px solid var(--vx-border);
    transition:
        background var(--vx-transition),
        box-shadow var(--vx-transition);
}

.vx-table tbody tr:last-child {
    border-bottom: none;
}

.vx-table tbody tr:hover {
    background: rgba(255,255,255,.035);
    box-shadow: inset 3px 0 0 rgba(59,130,246,.30);
}

.vx-table tbody td {
    padding: .8rem 1rem;
    color: var(--vx-text);
    vertical-align: middle;
    font-size: .82rem;
}

.vx-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--vx-radius-lg);
}

.vx-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--vx-radius-lg);
}


/* Row icon */

.vx-row-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--vx-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    background: var(--vx-primary-soft);
    color: #60a5fa;
    border: 1px solid var(--vx-primary-border);
}


/* Row title */

.vx-row-title {
    font-weight: 600;
    color: #fff;
    margin: 0;
    font-size: .82rem;
}

.vx-row-subtitle {
    font-size: .72rem;
    color: var(--vx-text-muted);
    margin: .1rem 0 0;
}


/* Tags */

.vx-tag {
    display: inline-flex;
    align-items: center;
    padding: .15rem .5rem;
    border-radius: .3rem;
    font-size: .7rem;
    font-weight: 500;
    background: rgba(255,255,255,.055);
    color: var(--vx-text-muted);
    border: 1px solid var(--vx-border);
    margin: .1rem;
}


/* Status */

.vx-status {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .2rem .6rem;
    border-radius: 2rem;
    font-size: .7rem;
    font-weight: 600;
    white-space: nowrap;
}

.vx-status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

.vx-status-active {
    background: var(--vx-success-soft);
    color: var(--vx-success);
}

.vx-status-inactive {
    background: var(--vx-danger-soft);
    color: var(--vx-danger);
}

.vx-status-pending {
    background: var(--vx-warning-soft);
    color: var(--vx-warning);
}

.vx-status-draft {
    background: rgba(255,255,255,.06);
    color: var(--vx-text-muted);
}

.vx-status-running {
    background: var(--vx-info-soft);
    color: var(--vx-info);
}

.vx-status-completed {
    background: var(--vx-success-soft);
    color: var(--vx-success);
}


/* Actions */

.vx-row-actions {
    text-align: right;
    white-space: nowrap;
    position: relative;
}

.vx-table .dropdown-menu {
    z-index: 1050;
    min-width: 150px;
    font-size: .82rem;
    background: #1e2d47;
    border: 1px solid var(--vx-border-strong);
    border-radius: var(--vx-radius);
    box-shadow: 0 12px 36px rgba(0,0,0,.48);
}

.vx-table .dropdown-menu .dropdown-item {
    color: var(--vx-text-muted);
    padding: .45rem .75rem;
}

.vx-table .dropdown-menu .dropdown-item:hover,
.vx-table .dropdown-menu .dropdown-item:focus {
    background: rgba(255,255,255,.07);
    color: #fff;
}

.vx-actions-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: var(--vx-radius-sm);
    border: 1px solid var(--vx-border);
    background: rgba(255,255,255,.05);
    color: var(--vx-text-muted);
    cursor: pointer;
    transition:
        background var(--vx-transition),
        color var(--vx-transition),
        border-color var(--vx-transition);
    font-size: 1rem;
    line-height: 1;
}

.vx-actions-btn:hover {
    background: var(--vx-surface-hover);
    color: #fff;
    border-color: var(--vx-border-strong);
}

.vx-actions-btn:focus-visible {
    outline: none;
    box-shadow: var(--vx-shadow-focus);
}


/* ==========================================================
   Pagination
   ========================================================== */

.vx-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .75rem 1rem;
    border-top: 1px solid var(--vx-border);
    font-size: .78rem;
    color: var(--vx-text-muted);
    flex-wrap: wrap;
    gap: .5rem;
    background: rgba(255,255,255,.018);
}

.vx-pagination-pages {
    display: flex;
    align-items: center;
    gap: .25rem;
}

.vx-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 .4rem;
    border-radius: var(--vx-radius-sm);
    border: 1px solid var(--vx-border);
    background: rgba(255,255,255,.045);
    color: var(--vx-text-muted);
    font-size: .72rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition:
        background var(--vx-transition),
        color var(--vx-transition),
        border-color var(--vx-transition);
}

.vx-page-btn:hover {
    background: var(--vx-surface-hover);
    color: #fff;
    border-color: var(--vx-border-strong);
}

.vx-page-btn.active {
    background: var(--vx-primary);
    color: #fff;
    border-color: var(--vx-primary);
    box-shadow: 0 4px 12px rgba(59,130,246,.22);
}

.vx-page-btn:disabled,
.vx-page-btn[disabled] {
    opacity: .35;
    cursor: not-allowed;
}


/* ==========================================================
   Empty State
   ========================================================== */

.vx-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    color: var(--vx-text-muted);
}

.vx-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--vx-radius-lg);
    background: rgba(255,255,255,.055);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--vx-text-light);
    margin-bottom: 1rem;
    border: 1px solid var(--vx-border);
}

.vx-empty-state h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin: 0 0 .4rem;
}

.vx-empty-state p {
    font-size: .82rem;
    margin: 0 0 1.25rem;
    max-width: 360px;
    line-height: 1.6;
}


/* ==========================================================
   Dashboard
   ========================================================== */

.vx-dashboard {
    width: 100%;
}

.vx-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vx-stat-card {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.055),
            rgba(255,255,255,.025)
        );
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    backdrop-filter: var(--vx-blur-sm);
    -webkit-backdrop-filter: var(--vx-blur-sm);
    box-shadow: 0 4px 24px rgba(0,0,0,.22);

    transition:
        transform var(--vx-transition),
        border-color var(--vx-transition),
        box-shadow var(--vx-transition);
}

.vx-stat-card::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(
        circle,
        rgba(59,130,246,.08),
        transparent 70%
    );
    pointer-events: none;
}

.vx-stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--vx-border-strong);
    box-shadow: 0 10px 32px rgba(0,0,0,.34);
}

.vx-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--vx-radius);
    background: var(--vx-primary-soft);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 1px solid var(--vx-primary-border);
}

.vx-stat-label {
    font-size: .67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .055em;
    color: var(--vx-text-muted);
    margin: 0 0 .2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vx-stat-value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.03em;
    line-height: 1;
    margin: 0;
}


/* Module cards */

.vx-module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.vx-module-card {
    position: relative;
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.018)
        );
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-lg);
    padding: 1.25rem;
    backdrop-filter: var(--vx-blur-sm);
    -webkit-backdrop-filter: var(--vx-blur-sm);
    box-shadow: 0 4px 20px rgba(0,0,0,.20);

    transition:
        transform var(--vx-transition),
        border-color var(--vx-transition),
        box-shadow var(--vx-transition);
}

.vx-module-card:hover {
    transform: translateY(-2px);
    border-color: var(--vx-border-strong);
    box-shadow: 0 10px 32px rgba(0,0,0,.32);
}

.vx-module-header {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding-bottom: .875rem;
    border-bottom: 1px solid var(--vx-border);
    margin-bottom: .875rem;
}

.vx-module-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--vx-radius-sm);
    background: var(--vx-primary-soft);
    color: #60a5fa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
    border: 1px solid var(--vx-primary-border);
}

.vx-module-title {
    font-size: .9rem;
    font-weight: 650;
    color: #fff;
    margin: 0;
}

.vx-module-desc {
    font-size: .78rem;
    color: var(--vx-text-muted);
    margin: 0;
}


/* ==========================================================
   Forms
   ========================================================== */

.vx-form-card {
    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.018)
        );
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-lg);
    padding: 1.75rem;
    backdrop-filter: var(--vx-blur-sm);
    -webkit-backdrop-filter: var(--vx-blur-sm);
    box-shadow: 0 8px 32px rgba(0,0,0,.25);
}

.vx-form .form-label {
    font-size: .82rem;
    font-weight: 600;
    color: var(--vx-text);
    margin-bottom: .4rem;
}

.vx-form .form-control,
.vx-form .form-select {
    min-height: 38px;
    border-color: var(--vx-border);
    border-radius: var(--vx-radius-sm);
    color: var(--vx-text);
    background: rgba(255,255,255,.055);
    font-size: .88rem;
    transition:
        border-color var(--vx-transition),
        box-shadow var(--vx-transition),
        background var(--vx-transition);
}

.vx-form .form-control:focus,
.vx-form .form-select:focus {
    border-color: var(--vx-primary);
    box-shadow: var(--vx-shadow-focus);
    background: rgba(255,255,255,.085);
    color: var(--vx-text);
}

.vx-form .form-control::placeholder {
    color: var(--vx-text-light);
}

.vx-form .form-select option {
    background: #1e2d47;
    color: var(--vx-text);
}

.vx-form-actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--vx-border);
}


/* ==========================================================
   Auth / Blank Layout
   ========================================================== */

.vx-auth-main {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;

    background:
        radial-gradient(
            circle at 10% 10%,
            rgba(59,130,246,.18),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(249,115,22,.07),
            transparent 28%
        ),
        #0f172a;
}

.vx-blank {
    width: 100%;
    max-width: 440px;
    padding: 2.25rem;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.065),
            rgba(255,255,255,.035)
        );

    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-xl);
    backdrop-filter: var(--vx-blur);
    -webkit-backdrop-filter: var(--vx-blur);

    box-shadow:
        0 20px 60px rgba(0,0,0,.42),
        0 1px 0 rgba(255,255,255,.035);
}


/* ==========================================================
   Breadcrumbs
   ========================================================== */

.vx-breadcrumbs {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    color: var(--vx-text-muted);
    margin-bottom: .75rem;
    flex-wrap: wrap;
}

.vx-breadcrumbs a {
    color: var(--vx-text-muted);
}

.vx-breadcrumbs a:hover {
    color: #60a5fa;
}

.vx-breadcrumbs .vx-bc-sep {
    color: var(--vx-text-light);
}

.vx-breadcrumbs .vx-bc-current {
    color: #fff;
    font-weight: 500;
}


/* ==========================================================
   Footer
   ========================================================== */

.vx-footer {
    padding: .875rem 2rem;
    border-top: 1px solid var(--vx-border);
    color: var(--vx-text-muted);
    background: rgba(15,23,42,.72);
    backdrop-filter: var(--vx-blur-sm);
    -webkit-backdrop-filter: var(--vx-blur-sm);
    font-size: .78rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* ==========================================================
   Focus / Accessibility
   ========================================================== */

.vx-sidebar a:focus-visible,
.vx-nav-tabs a:focus-visible,
.vx-footer a:focus-visible,
.vx-page-btn:focus-visible,
.vx-actions-btn:focus-visible {
    outline: none;
    box-shadow: var(--vx-shadow-focus);
}


/* ==========================================================
   Sidebar Overlay
   ========================================================== */

.vx-sidebar-overlay {
    display: none;
}


/* ==========================================================
   Hamburger
   ========================================================== */

.vx-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--vx-border);
    border-radius: var(--vx-radius-sm);
    background: rgba(255,255,255,.04);
    color: var(--vx-text-muted);
    cursor: pointer;
}

.vx-hamburger:hover {
    color: #fff;
    background: var(--vx-surface-hover);
}

.vx-hamburger:focus-visible {
    outline: none;
    box-shadow: var(--vx-shadow-focus);
}


/* ==========================================================
   Responsive — Tablet
   ========================================================== */

@media (max-width: 991.98px) {

    .vx-hamburger {
        display: flex !important;
    }

    .vx-sidebar {
        position: fixed;
        top: var(--vx-navbar-height);
        left: 0;
        bottom: 0;
        height: calc(100vh - var(--vx-navbar-height));

        transform: translateX(-100%);
        transition: transform .25s ease;

        z-index: 1040;

        box-shadow: 8px 0 30px rgba(0,0,0,.38);
    }

    .vx-sidebar.show {
        transform: translateX(0);
    }

    .vx-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        top: var(--vx-navbar-height);
        background: rgba(0,0,0,.48);
        z-index: 1039;
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s ease;
    }

    .vx-sidebar-overlay.show {
        opacity: 1;
        pointer-events: auto;
    }

    .app-main {
        padding: 1.25rem;
        width: 100%;
    }

    .vx-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vx-module-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .vx-nav-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .vx-nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .vx-product-switcher {
        display: none !important;
    }
}


/* ==========================================================
   Responsive — Mobile
   ========================================================== */

@media (max-width: 767.98px) {

    #vx-user-info-block {
        display: none !important;
    }

    .app-main {
        padding: .875rem;
    }

    .vx-page-title {
        font-size: 1.2rem;
    }

    .vx-page-subtitle {
        font-size: .78rem;
    }

    .vx-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: .75rem;
    }

    .vx-toolbar-row {
        flex-direction: column;
        align-items: stretch;
        gap: .5rem;
        padding: .75rem;
    }

    .vx-search-wrap {
        max-width: 100%;
        min-width: 0;
    }

    .vx-search-input,
    .vx-filter-select {
        min-height: 38px;
    }

    .vx-filter-select {
        width: 100%;
    }

    .vx-btn-create {
        margin-left: 0;
        width: 100%;
    }

    .vx-stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: .75rem;
    }

    .vx-module-grid {
        grid-template-columns: 1fr;
    }

    .vx-stat-card {
        padding: .875rem;
        gap: .75rem;
    }

    .vx-stat-value {
        font-size: 1.65rem;
    }

    .vx-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .vx-table {
        min-width: 560px;
    }

    .vx-table thead th {
        padding: .6rem .875rem;
        font-size: .65rem;
    }

    .vx-table tbody td {
        padding: .7rem .875rem;
        font-size: .78rem;
    }

    .vx-pagination {
        flex-direction: column;
        align-items: center;
        gap: .5rem;
        padding: .75rem;
        font-size: .72rem;
    }

    .vx-form-card {
        padding: 1.1rem;
    }

    .vx-form-actions {
        flex-wrap: wrap;
    }

    .vx-nav-tabs .vx-nav-tab {
        padding: 0 .65rem;
        font-size: .72rem;
    }

    .vx-nav-tabs .vx-nav-tab i {
        display: none;
    }

    .vx-breadcrumbs {
        font-size: .72rem;
    }

    .vx-footer {
        flex-direction: column;
        gap: .25rem;
        text-align: center;
        padding: .75rem 1rem;
        font-size: .72rem;
    }

    .vx-content {
        border-radius: var(--vx-radius);
    }

}


/* ==========================================================
   Responsive — Small Mobile
   ========================================================== */

@media (max-width: 479px) {

    .vx-stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: .5rem;
    }

    .vx-stat-card {
        padding: .7rem;
        gap: .55rem;
    }

    .vx-stat-value {
        font-size: 1.4rem;
    }

    .vx-stat-icon {
        width: 34px;
        height: 34px;
        font-size: .9rem;
    }

    .app-main {
        padding: .625rem;
    }

    .vx-page-title {
        font-size: 1.1rem;
    }

    .vx-nav-tabs .vx-nav-tab {
        padding: 0 .5rem;
        font-size: .65rem;
    }

    .vx-page-badge {
        font-size: .65rem;
    }

    .vx-empty-state {
        padding: 3rem 1rem;
    }
}


/* ==========================================================
   Reduced Motion
   ========================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}


/* ==========================================================
   Entrance Animations
   ========================================================== */

@keyframes vx-fade-up {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes vx-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.vx-animate-in {
    animation: vx-fade-up 0.35s ease both;
}

.vx-animate-in:nth-child(1) { animation-delay: 0.00s; }
.vx-animate-in:nth-child(2) { animation-delay: 0.06s; }
.vx-animate-in:nth-child(3) { animation-delay: 0.12s; }
.vx-animate-in:nth-child(4) { animation-delay: 0.18s; }
.vx-animate-in:nth-child(5) { animation-delay: 0.22s; }
.vx-animate-in:nth-child(6) { animation-delay: 0.26s; }
.vx-animate-in:nth-child(7) { animation-delay: 0.30s; }
.vx-animate-in:nth-child(8) { animation-delay: 0.34s; }

@media (prefers-reduced-motion: reduce) {
    .vx-animate-in { animation: none; }
}
