:root {
    --emerald-50: #e8fff1;
    --emerald-200: #92f7b7;
    --emerald-400: #37d169;
    --emerald-500: #00bb31;
    --emerald-600: #02903a;
    --emerald-800: #064024;
    --slate-950: #0a1120;
    --slate-900: #141c2c;
    --slate-700: #3f5168;
    --slate-300: #cbd5e1;
    --slate-100: #eef3f9;
}

body {
    background: #eef2f6;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", "Roboto", sans-serif;
    color: var(--slate-900);
}

    body.identity-shell {
        overflow: auto;
    }

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

@keyframes auroraShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmerPulse {
    0% {
        opacity: 0.65;
        transform: translateX(-60%);
    }

    50% {
        opacity: 0.95;
        transform: translateX(20%);
    }

    100% {
        opacity: 0.65;
        transform: translateX(-60%);
    }
}

@keyframes loopOrbit {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.motion-gradient {
    background-size: 200% 200%;
}

.motion-fade-up,
.motion-fade-left,
.motion-fade-right,
.motion-drop-in {
    will-change: opacity, transform;
}

body.motion-ready .motion-gradient {
    animation: auroraShift 22s ease-in-out infinite;
}

body.motion-ready .motion-fade-up {
    animation: fadeUp 0.75s ease forwards;
}

body.motion-ready .motion-fade-left {
    animation: fadeInLeft 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.motion-ready .app-sidebar.motion-fade-left {
    animation: none;
}

body.motion-ready .motion-fade-right {
    animation: fadeInRight 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

body.motion-ready .motion-drop-in {
    animation: dropIn 0.65s ease forwards;
}

.motion-delay-100 {
    animation-delay: 0.1s;
}

.motion-delay-200 {
    animation-delay: 0.2s;
}

.motion-delay-300 {
    animation-delay: 0.3s;
}

html, body {
    height: 100%;
}

body {
    overflow: hidden;
}

.app-shell {
    background: linear-gradient(140deg, #f6f9fc 0%, #eef4fb 38%, #edf5ff 100%);
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.app-shell-content {
    background: radial-gradient(circle at top, rgb(255 255 255), #d5d5d5);
    backdrop-filter: blur(6px);
    width: calc(100vw - 250px);
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.app-main {
    padding: 1rem;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: auto;
}

.app-sidebar {
    position: relative;
    width: 250px;
    min-height: 100vh;
    padding: 1.5rem 1rem;
    background: linear-gradient(195deg, #041d16 0%, #063220 60%, #041d16 100%);
    color: #fff;
    overflow: hidden;
    box-shadow: 10px 0 40px rgba(8, 24, 16, 0.25);
    visibility: visible;
    pointer-events: auto;
}

.app-sidebar-sheen {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.25), transparent 40%), radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.15), transparent 55%);
    opacity: 0.7;
    pointer-events: none;
}

.app-sidebar-surface {
    position: relative;
    z-index: 1;
    height: 100%;
}

.app-sidebar-brand .brand-mark {
    width: 70px;
    height: 70px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.12);
    /*border: 1px solid rgba(255, 255, 255, 0.25);*/
}

    .app-sidebar-brand .brand-mark img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.25));
    }

.app-sidebar-brand h5 {
    letter-spacing: 0.03em;
}

.app-sidebar .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.08);
}

    .app-sidebar .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(0, 187, 49, 0.35);
    }

.app-sidebar .navbar-toggler-icon {
    filter: invert(1);
}

.app-sidebar-scroll {
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    padding-right: 0.25rem;
    margin-right: -0.25rem;
}

    .app-sidebar-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .app-sidebar-scroll::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.15);
        border-radius: 999px;
    }

.app-sidebar-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.9rem;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    border-radius: 0.75rem;
    font-weight: 500;
    ed concierge supp transition: all 0.2s ease;
}

    .app-sidebar .nav-link .icon {
        width: 1.5rem;
        text-align: center;
        font-size: 1.1rem;
    }

    .app-sidebar .nav-link.active {
        background: linear-gradient(120deg, rgba(0, 187, 49, 0.35), rgba(0, 187, 49, 0.12));
        color: #fff !important;
    }

    .app-sidebar .nav-link:hover {
        color: #fff !important;
        background: rgba(255, 255, 255, 0.12);
    }

.app-sidebar-footer .glass-panel {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(18px);
}

.app-topbar {
    background: linear-gradient(120deg, #042319, #063221 55%, #042319 100%);
    padding: 0.5rem clamp(1.5rem, 3vw, 2.5rem);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 12px 32px rgba(6, 40, 25, 0.25);
}

    .app-topbar h1 {
        letter-spacing: 0.02em;
    }

.app-topbar-badge {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.75);
    padding: 0.45rem 1rem;
    border-radius: 999px;
    letter-spacing: 0.16em;
}

.app-topbar-search {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.25rem 1rem;
    gap: 0.5rem;
    color: #fff;
}

    .app-topbar-search .form-control {
        color: #fff;
        padding-left: 0;
    }

        .app-topbar-search .form-control::placeholder {
            color: rgba(255, 255, 255, 0.7);
        }

        .app-topbar-search .form-control:focus {
            box-shadow: none;
        }

.app-topbar-search-icon {
    color: rgba(255, 255, 255, 0.65);
}

.app-topbar-search-icon {
    font-size: 1.15rem;
}

.usermenu-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-emerald {
    background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
    color: #fff;
    border: none;
}

    .btn-emerald:hover {
        color: #fff;
        background: linear-gradient(135deg, var(--emerald-600), var(--emerald-500));
        box-shadow: 0 12px 28px rgba(0, 146, 60, 0.35);
    }

.btn-success,
.btn-primary {
    background-color: var(--emerald-500);
    border-color: var(--emerald-500);
}

    .btn-success:hover,
    .btn-primary:hover {
        background-color: var(--emerald-600);
        border-color: var(--emerald-600);
    }

.nav-link {
    color: var(--emerald-600);
}

    .nav-link:hover {
        color: var(--emerald-500);
    }

    .nav-link.active {
        color: var(--emerald-600) !important;
        font-weight: 600;
    }

.form-check-input:checked {
    background-color: var(--emerald-600);
    border-color: var(--emerald-600);
}

.form-check-input:focus,
.form-control:focus {
    border-color: var(--emerald-500);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(0, 187, 49, 0.25);
}

.validation-summary-valid {
    display: none;
}

.identity-shell {
    position: relative;
    min-height: 100vh;
    background: radial-gradient(circle at 20% 20%, rgba(0, 187, 49, 0.25), transparent 55%), linear-gradient(160deg, #041713 0%, #0b221b 35%, #071112 100%);
    /*overflow: hidden;*/
}

.identity-gradient,
.identity-noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.identity-gradient {
    background: radial-gradient(circle at 70% 20%, rgba(0, 255, 186, 0.18), transparent 55%), radial-gradient(circle at 10% 80%, rgba(0, 187, 49, 0.25), transparent 60%);
}

.identity-noise {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Crect width='200' height='200' fill='rgba(255,255,255,0)'/%3E%3Ccircle cx='10' cy='10' r='1' fill='rgba(255,255,255,0.15)'/%3E%3Ccircle cx='60' cy='40' r='1' fill='rgba(255,255,255,0.1)'/%3E%3Ccircle cx='120' cy='80' r='1' fill='rgba(255,255,255,0.08)'/%3E%3Ccircle cx='170' cy='20' r='1' fill='rgba(255,255,255,0.12)'/%3E%3C/svg%3E");
    opacity: 0.35;
}

.identity-header {
    position: relative;
    z-index: 1;
}

.identity-body {
    position: relative;
    z-index: 1;
}

.identity-logo {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
}

    .identity-logo img {
        width: 100%;
    }

.identity-footer {
    position: relative;
    z-index: 1;
}

.identity-body {
    max-width: min(100%, 1100px);
    padding-inline: clamp(1.25rem, 4vw, 3rem);
}

.login-hero {
    position: relative;
    z-index: 1;
    --bs-gutter-x: clamp(1.5rem, 3vw, 2.75rem);
    gap: clamp(1.5rem, 3vw, 3.5rem);
}

    .login-hero::before {
        content: "";
        position: absolute;
        inset: -12% -25% -18% -25%;
        background: radial-gradient(circle at 10% 20%, rgba(58, 255, 164, 0.18), transparent 55%), radial-gradient(circle at 90% 20%, rgba(0, 123, 63, 0.18), transparent 65%);
        z-index: -1;
        filter: blur(20px);
        opacity: 0.7;
    }

.login-intro {
    border-radius: 2rem;
    background: linear-gradient(140deg, rgba(0, 187, 49, 0.85), rgba(0, 140, 40, 0.95));
    box-shadow: 0 28px 65px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}



.login-highlights li {
    margin-bottom: 0.65rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.92);
}

    .login-highlights li:last-child {
        margin-bottom: 0;
    }

.login-card {
    border-radius: 1.75rem;
    box-shadow: 0 24px 55px rgba(9, 34, 22, 0.16);
}

    .login-card .form-floating > label {
        color: var(--slate-700);
    }

    .login-card .form-control {
        border-radius: 1rem;
        border-color: rgba(0, 0, 0, 0.08);
    }

.password-field .password-toggle {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    z-index: 4;
    padding: 0.25rem;
    line-height: 1;
}

    .password-field .password-toggle:hover {
        color: var(--slate-900);
    }

.login-trust {
    border: 1px dashed rgba(4, 53, 32, 0.25);
    background: rgba(4, 53, 32, 0.05);
}

.login-intro.motion-fade-left,
.login-card.motion-fade-right {
    will-change: transform, opacity;
}

.manage-shell {
    background: linear-gradient(135deg, #f4f8ff 0%, #eef7f3 55%, #f9f7ff 100%);
}

.manage-card {
    border-radius: 2rem;
    overflow: hidden;
}

.manage-nav-pane {
    background: linear-gradient(180deg, #032a1c 0%, #06432a 60%, #032a1c 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.manage-nav {
    padding: 0;
    margin: 0;
}

.manage-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.85rem;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 500;
    transition: all 0.2s ease;
}

    .manage-nav-link:hover {
        color: #fff;
        background: rgba(255, 255, 255, 0.12);
    }

    .manage-nav-link.active {
        background: linear-gradient(130deg, rgba(0, 187, 49, 0.45), rgba(0, 187, 49, 0.2));
        color: #fff;
        box-shadow: 0 12px 25px rgba(0, 187, 49, 0.3);
    }

.manage-content {
    background: #fff;
    border-radius: 1.5rem;
}

@media (max-width: 991px) {
    .app-shell {
        height: 100dvh;
    }

    .app-shell-content {
        width: 100%;
        min-height: 100dvh;
        max-height: 100dvh;
    }

    .app-sidebar {
        width: 100%;
        min-height: auto;
        padding: 1.5rem;
    }

    .app-sidebar-scroll {
        max-height: none;
    }

    .app-topbar {
        border-radius: 0;
    }

    .app-main {
        padding: 1.5rem;
    }

    .manage-nav-pane {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }
}

@media (max-width: 767.98px) {
    .login-intro {
        border-radius: 1.5rem;
        padding: 2.5rem !important;
    }

    .login-card {
        border-radius: 1.5rem;
    }

    .identity-header .container {
        text-align: center;
    }
}

.etl-running-alert .spinner-border {
    width: 2.5rem;
    height: 2.5rem;
}

.etl-progress .progress-bar {
    background-image: linear-gradient(45deg, rgba(0, 187, 49, 0.9) 25%, rgba(0, 187, 49, 0.4) 25%, rgba(0, 187, 49, 0.4) 50%, rgba(0, 187, 49, 0.9) 50%, rgba(0, 187, 49, 0.9) 75%, rgba(0, 187, 49, 0.4) 75%, rgba(0, 187, 49, 0.4) 100%);
    background-size: 1.5rem 1.5rem;
}

.etl-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 7rem;
    justify-content: center;
}

.etl-job-row {
    animation: etl-pulse 1.5s ease-in-out infinite;
}

@keyframes etl-pulse {
    0% {
        box-shadow: inset 0 0 0 rgba(0, 187, 49, 0.45);
    }

    50% {
        box-shadow: inset 0 0 0 999px rgba(0, 187, 49, 0.08);
    }

    100% {
        box-shadow: inset 0 0 0 rgba(0, 187, 49, 0.45);
    }
}

.modal-backdrop.show {
    opacity: 0.3;
}

.dxbl-grid {
    font-size: 0.9rem;
    border-radius: 8px;
}

.dxbl-grid-header {
    background-color: #f9f9f9;
    font-weight: 600;
}

/* Admin Users Enhancements */
.admin-hero {
    background: radial-gradient(circle at top left, rgba(0, 187, 49, 0.85), rgba(0, 150, 49, 0.92)), linear-gradient(135deg, rgba(0, 187, 49, 0.85) 0%, rgba(0, 120, 33, 0.85) 100%);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
}

    .admin-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 45%), radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.15), transparent 55%);
        pointer-events: none;
    }

.hero-metric-value {
    font-size: clamp(2.25rem, 3vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
}

.hero-metric-label {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.search-page {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 4vw, 2.75rem);
}

.search-hero {
    background: radial-gradient(circle at top, rgba(0, 187, 49, 0.75), rgba(0, 140, 45, 0.9)), linear-gradient(140deg, rgba(3, 58, 31, 0.95), rgba(3, 34, 21, 0.98));
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 24px 60px rgba(6, 36, 21, 0.35);
}

    .search-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(125deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0));
        opacity: 0.8;
        mix-blend-mode: screen;
    }

.search-hero-content {
    position: relative;
    z-index: 1;
    gap: clamp(1.5rem, 3vw, 2.75rem);
}

.search-hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.search-metric {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 1.5rem;
    padding: 1.25rem 1.5rem;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.search-metric-value {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1.1;
}

.search-metric-label {
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
}

.search-placeholder,
.search-empty,
.search-loading {
    background: #fff;
    border-radius: 1.75rem;
    padding: clamp(3rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3rem);
    box-shadow: 0 24px 48px rgba(10, 25, 18, 0.08);
}

.search-loading-visual {
    position: relative;
    width: clamp(80px, 12vw, 110px);
    height: clamp(80px, 12vw, 110px);
    border-radius: 50%;
    border: 6px solid rgba(0, 187, 49, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .search-loading-visual::after,
    .search-loading-visual::before {
        content: "";
        position: absolute;
        inset: 12%;
        border-radius: 50%;
        border: 3px solid transparent;
        border-top-color: rgba(0, 187, 49, 0.85);
        animation: loopOrbit 1.4s linear infinite;
    }

    .search-loading-visual::before {
        inset: 25%;
        border-top-color: rgba(0, 187, 49, 0.55);
        animation-duration: 1.8s;
        animation-direction: reverse;
    }

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: clamp(1.25rem, 3vw, 2rem);
    align-items: stretch;
}

.search-collection {
    background: #fff;
    border-radius: 1.75rem;
    box-shadow: 0 24px 55px rgba(9, 34, 22, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.search-collection-inner {
    padding: clamp(1.75rem, 3vw, 2.25rem);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
}

.search-collection-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.search-collection-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.search-collection-subtitle {
    font-size: 0.85rem;
    color: var(--slate-700);
}

.search-collection-body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.search-result-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.search-result-list-item {
    border-radius: 1.1rem;
    padding: 0.85rem 1rem;
    background: linear-gradient(120deg, rgba(238, 242, 246, 0.55), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(10, 17, 32, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .search-result-list-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 30px rgba(10, 25, 18, 0.12);
        background: linear-gradient(120deg, rgba(233, 251, 241, 0.9), rgba(255, 255, 255, 0.95));
    }

.search-collection-empty {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: rgba(10, 17, 32, 0.05);
    color: var(--slate-700);
    font-style: italic;
}

.search-collection-footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--slate-700);
}

.btn-ghost-light {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.4rem 0.95rem;
    border: 1px solid rgba(4, 64, 36, 0.18);
    background: rgba(255, 255, 255, 0.6);
    color: var(--emerald-600);
    font-weight: 600;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .btn-ghost-light:hover {
        background: rgba(255, 255, 255, 0.9);
        transform: translateY(-1px);
        box-shadow: 0 12px 22px rgba(9, 34, 22, 0.12);
    }

.search-results-grid > * {
    animation: fadeUp 0.75s ease forwards;
}

    .search-results-grid > *:nth-child(1) {
        animation-delay: 0.05s;
    }

    .search-results-grid > *:nth-child(2) {
        animation-delay: 0.1s;
    }

    .search-results-grid > *:nth-child(3) {
        animation-delay: 0.15s;
    }

    .search-results-grid > *:nth-child(4) {
        animation-delay: 0.2s;
    }

    .search-results-grid > *:nth-child(5) {
        animation-delay: 0.25s;
    }

.status-card {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .status-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
    }

.status-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #6c757d;
}

.status-value {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 700;
}

.status-indicator {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: inset 0 0 0 1px currentColor;
}

.premium-card {
    border-radius: 1.5rem;
}

.premium-search {
    max-width: 480px;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

    .premium-search .input-group-text {
        background: rgba(0, 0, 0, 0.04);
        border: none;
    }

.premium-search-input {
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

    .premium-search-input:focus {
        box-shadow: none;
    }

.premium-input-icon i {
    color: #00bb31;
    font-size: 1rem;
}

.app-sidebar .nav-link .icon i {
    display: inline-block;
    font-size: inherit;
    line-height: 1;
}

.premium-table thead th {
    border-bottom-width: 0;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6c757d;
    background: rgba(0, 187, 49, 0.05);
}

.premium-table tbody tr {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

    .premium-table tbody tr:hover {
        background: #a6cda6;
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06);
    }

.premium-role-badge {
    background: rgba(0, 187, 49, 0.12);
    color: #008b2a;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.bg-success-subtle {
    background-color: rgba(25, 135, 84, 0.12) !important;
}

.bg-secondary-subtle {
    background-color: rgba(108, 117, 125, 0.12) !important;
}

.bg-primary-subtle {
    background-color: rgba(13, 110, 253, 0.12) !important;
}

.bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.12) !important;
}

.premium-empty-state {
    max-width: 360px;
    margin: 0 auto;
}

    .premium-empty-state h6 {
        font-size: 1rem;
    }

.premium-modal .modal-content {
    border-radius: 1.5rem;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}

.premium-modal {
    position: fixed;
    inset: 0;
    z-index: 1059;
    overflow-y: auto;
}

.premium-modal--open {
    animation: premium-modal-backdrop-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.premium-modal--closing {
    animation: premium-modal-backdrop-out 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.premium-modal--open .modal-dialog {
    animation: premium-modal-in 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

.premium-modal--closing .modal-dialog {
    animation: premium-modal-out 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.premium-modal-backdrop--open {
    animation: premium-modal-backdrop-in 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.premium-modal-backdrop--closing {
    animation: premium-modal-backdrop-out 180ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes premium-modal-in {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes premium-modal-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
}

@keyframes premium-modal-backdrop-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes premium-modal-backdrop-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .premium-modal--open,
    .premium-modal--closing,
    .premium-modal--open .modal-dialog,
    .premium-modal--closing .modal-dialog,
    .premium-modal-backdrop--open,
    .premium-modal-backdrop--closing {
        animation: none;
    }
}

.premium-modal .modal-header .modal-title {
    font-size: 1.35rem;
}

.premium-modal .modal-header p {
    color: #6c757d;
}

.premium-modal .btn-close {
    filter: invert(48%) sepia(13%) saturate(870%) hue-rotate(83deg) brightness(96%) contrast(95%);
}

.premium-modal .modal-footer {
    gap: 0.75rem;
}

.premium-modal .form-control,
.premium-modal .form-select {
    border-radius: 0.85rem;
    padding: 0.75rem 1rem;
}

    .premium-modal .form-control:focus,
    .premium-modal .form-select:focus {
        box-shadow: 0 0 0 0.25rem rgba(0, 187, 49, 0.2);
    }

.hero-highlight > div {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 8rem;
}

.premium-toolbar {
    width: 100%;
}

    .premium-toolbar .premium-search {
        flex: 1 1 420px;
    }

    .premium-toolbar .premium-search-input {
        background-color: #fff;
    }

.premium-progress {
    background: linear-gradient(120deg, rgba(0, 187, 49, 0.08), rgba(0, 187, 49, 0.02));
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.premium-alert {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

    .premium-alert .btn-close {
        filter: invert(48%) sepia(13%) saturate(870%) hue-rotate(83deg) brightness(96%) contrast(95%);
    }

.premium-dxgrid {
    border-radius: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(15, 36, 50, 0.08);
    overflow: hidden;
    max-height: 80vh;
    background: #fff;
}

    .premium-dxgrid table {
        width: 100%;
    }


    .premium-dxgrid thead tr {
        color: white;
        background: #00bb31;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        font-size: 0.75rem;
    }

    .premium-dxgrid tbody tr {
        transition: background 0.05s ease, box-shadow 0.15s ease;
    }

        .premium-dxgrid tbody tr:hover {
            background: #b4d5b4;
            box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
        }

    .premium-dxgrid .dxbl-grid-pager {
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        background: #f8fafb;
        padding: 0.75rem;
    }

.bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.18) !important;
}

@media (max-width: 767.98px) {
    .admin-hero {
        padding: 2.5rem 1.75rem;
    }

    .status-card {
        border-radius: 1.25rem;
    }

    .premium-card {
        border-radius: 1rem;
    }

    .premium-modal .modal-dialog {
        margin: 1rem;
    }

    .premium-toolbar {
        align-items: stretch;
    }

        .premium-toolbar .premium-search {
            flex: 1 1 100%;
        }
}

.z-index-20 {
    z-index: 20;
}

header {
    z-index: 20;
}
/* Invoice detail workspace */
.invoice-hero {
    background: radial-gradient(circle at 20% 20%, rgba(52, 199, 89, 0.35), transparent 35%), radial-gradient(circle at 80% 0%, rgba(0, 123, 255, 0.35), transparent 30%), linear-gradient(135deg, #0d6efd, #198754);
    box-shadow: 0 20px 60px rgba(13, 110, 253, 0.25);
}

    .invoice-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.08), transparent 30%);
        pointer-events: none;
    }

.invoice-hero-accent {
    position: absolute;
    width: 240px;
    height: 240px;
    right: -40px;
    bottom: -40px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35), transparent 60%);
    filter: blur(10px);
    opacity: 0.8;
}

.invoice-hero-metric {
    min-width: 160px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
}

.invoice-detail-card {
    background: #fff;
    border: 1px solid #eef2f7;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    padding: 24px;
}

.info-chip {
    background: #f8fafc;
    border: 1px dashed #e3e8ef;
}

.invoice-health-list li + li {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e5e7eb;
}

.icon-circle {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.95rem;
}

.invoice-line-table thead {
    background: #f8fafc;
    border-bottom: 1px solid #e9ecef;
}

.invoice-line-table tbody tr:hover {
    background: #f2f7ff;
}

.invoice-card {
    transition: all 0.35s ease;
}

    .invoice-card:hover {
        transform: translateY(-3px);
    }

@keyframes invoicePulseSuccess {
    0% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.45);
    }

    70% {
        box-shadow: 0 0 0 12px rgba(25, 135, 84, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
    }
}

.invoice-card.border-success {
    animation: invoicePulseSuccess 1.2s ease-in-out;
}

.survey-page {
    max-width: 1200px;
    margin: 0 auto;
}

.survey-fill-shell {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.5rem;
}

.survey-step-card {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
    padding: 1rem;
}

.customer-summary-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #f8fffb;
    padding: 1rem;
}

.survey-animated {
    animation: fadeUp 0.35s ease;
}

@media (max-width: 768px) {
    .survey-step-card {
        border-radius: 1rem;
        padding: 0.85rem;
    }

    .survey-fill-shell .btn,
    .survey-fill-shell .form-control,
    .survey-fill-shell .form-select {
        min-height: 48px;
        font-size: 1rem;
    }
}


.survey-section-pill {
    display: inline-block;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #0f5132;
    background: #d1e7dd;
}

.survey-crm-suggestions {
    max-height: 260px;
    overflow-y: auto;
}

.app-mobile-menu-btn {
    position: fixed;
    top: 0.65rem;
    left: 0.8rem;
    z-index: 1200;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    border-radius: 999px;
    background: #03391f;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
}
    .app-mobile-menu-btn:hover, .app-mobile-menu-btn:active {
        background: #fff;
        color: #03391f;
        border-color: black;

    }
.app-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(10, 17, 32, 0.45);
}

@media (max-width: 991.98px) {
    .app-shell {
        flex-direction: column;
        height: 100vh;
        min-height: 100vh;
        overflow: hidden;
    }

    .app-shell-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        min-height: 100vh;
        overflow: hidden;
        position: relative;
        z-index: 1;
    }

    .app-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(82vw, 320px);
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 1100;
        min-height: 100vh;
        border-radius: 0 1rem 1rem 0;
        visibility: hidden;
        pointer-events: none;
    }

        .app-sidebar.is-open {
            transform: translateX(0);
            visibility: visible;
            pointer-events: auto;
        }

    .app-topbar {
        margin-top: 0;
        padding: 0.75rem 0.75rem 0.75rem 4.1rem;
    }

    .app-main {
        padding: 1rem;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive,
    .premium-dxgrid,
    .card,
    .survey-step-card {
        overflow-x: auto;
    }
}

@media (max-width: 767.98px) {
    .app-topbar {
        padding: 0.75rem 0.75rem 0.75rem 4.1rem;
    }

    .survey-fill-shell {
        padding: 0;
    }
}

.app-sidebar-subgroup {
    list-style: none;
    margin: .35rem 0;
    padding: .5rem .45rem .55rem;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 1rem;
    background: rgba(15,23,42,.18);
}

.app-sidebar-subgroup-title {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .2rem .55rem .45rem;
    color: rgba(255,255,255,.62);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-sidebar-subgroup .nav-link {
    padding-left: 1.9rem;
}


.app-sidebar,
.app-sidebar-surface,
.app-sidebar-scroll,
.app-sidebar-subgroup,
.app-mega-menu,
.app-mega-col {
    min-width: 0;
}

    .app-sidebar .nav,
    .app-sidebar .nav-item,
    .app-sidebar .nav-link,
    .app-sidebar-subgroup-title,
    .app-mega-heading {
        max-width: 100%;
    }

    .app-sidebar .nav-link,
    .app-sidebar-subgroup-title {
        overflow-wrap: anywhere;
    }

    .app-sidebar .nav-link {
        display: flex;
        align-items: center;
        gap: .6rem;
    }

        .app-sidebar .nav-link i {
            flex-shrink: 0;
        }

/* Distribution Report module */
.distribution-page {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.distribution-hero {
    border-radius: 30px;
    padding: clamp(1.5rem, 3vw, 2.75rem);
    color: #fff;
    background: radial-gradient(circle at top left, rgba(0, 187, 49, 0.85), rgba(0, 150, 49, 0.92)), linear-gradient(135deg, rgba(0, 187, 49, 0.85) 0%, rgba(0, 120, 33, 0.85) 100%);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    overflow: hidden;
    position: relative;
}

    .distribution-hero.compact {
        padding-block: clamp(1.5rem, 3vw, 2.75rem);
    }

    .distribution-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 45%), radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.15), transparent 55%);
        pointer-events: none;
    }

    .distribution-hero > * {
        position: relative;
        z-index: 1;
    }

    .distribution-hero h1 {
        font-size: clamp(2.25rem, 3vw, 2.75rem);
        font-weight: 700;
        letter-spacing: -.02em;
        margin: .2rem 0 .6rem;
    }

    .distribution-hero p {
        max-width: 760px;
        color: rgba(255,255,255,.78);
        font-size: 1.05rem;
        margin: 0;
    }

.distribution-eyebrow {
    text-transform: uppercase;
    letter-spacing: .16em;
    color: rgba(255,255,255,.65);
    font-size: .78rem;
    font-weight: 700;
}

.distribution-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.distribution-filter-bar,
.distribution-grid-card,
.distribution-bar-card {
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(148,163,184,.22);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(15,23,42,.08);
    padding: 1.25rem;
}

.distribution-filter-bar {
    /*position: sticky;*/
    top: 1rem;
    z-index: 8;
    backdrop-filter: blur(18px);
}

.distribution-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

    .distribution-filter-header strong {
        display: block;
        font-size: 1rem;
        color: #0f172a;
    }

    .distribution-filter-header span, .distribution-microcopy {
        color: #64748b;
        font-size: .9rem;
    }

.distribution-preset-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.distribution-validation {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: 16px;
    color: #9f1239;
    background: #fff1f2;
    border: 1px solid #fecdd3;
    font-weight: 700;
}

.distribution-kpi-grid,
.distribution-division-grid,
.distribution-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.distribution-kpi-card,
.distribution-division-card,
.distribution-empty-state,
.distribution-skeleton-card {
    background: #fff;
    border: 1px solid rgba(226,232,240,.9);
    border-radius: 24px;
    box-shadow: 0 16px 44px rgba(15,23,42,.07);
}

.distribution-kpi-card {
    padding: 1.2rem;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

    .distribution-kpi-card span, .distribution-card-topline span {
        color: #64748b;
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: .12em;
        font-weight: 800;
    }

    .distribution-kpi-card strong {
        color: #0f172a;
        font-size: clamp(1.55rem, 3vw, 2.35rem);
        line-height: 1.1;
        letter-spacing: -.04em;
    }

    .distribution-kpi-card small {
        color: #64748b;
    }

.distribution-division-card {
    padding: 1.15rem;
    display: grid;
    gap: 1rem;
}

.distribution-card-topline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

    .distribution-card-topline h3 {
        color: #0f172a;
        font-size: 1.2rem;
        margin: .15rem 0 0;
    }

.distribution-donut {
    --percent: 0;
    width: min(210px, 70vw);
    aspect-ratio: 1;
    margin: .25rem auto;
    border-radius: 50%;
    border: 0;
    background: conic-gradient(#10b981 calc(var(--percent) * 1%), #f43f5e 0), radial-gradient(circle, #fff 58%, transparent 59%);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: inset 0 0 0 1px rgba(15,23,42,.04), 0 16px 36px rgba(15,23,42,.08);
}

    .distribution-donut span {
        background: #fff;
        border-radius: 999px;
        padding: .7rem .9rem;
        font-weight: 900;
        color: #0f172a;
        box-shadow: 0 12px 32px rgba(15,23,42,.1);
    }

.distribution-legend-row {
    display: flex;
    justify-content: space-between;
    gap: .8rem;
    color: #475569;
    font-size: .9rem;
}

    .distribution-legend-row i {
        width: .65rem;
        height: .65rem;
        border-radius: 999px;
        display: inline-block;
        margin-right: .35rem;
    }

    .distribution-legend-row .available {
        background: #10b981;
    }

    .distribution-legend-row .unavailable {
        background: #f43f5e;
    }

.distribution-empty-state {
    padding: 3rem 1.25rem;
    text-align: center;
    color: #64748b;
}

    .distribution-empty-state.slim {
        box-shadow: none;
        border-style: dashed;
    }

    .distribution-empty-state i {
        font-size: 2.4rem;
        color: #2563eb;
        margin-bottom: 1rem;
    }

    .distribution-empty-state h3 {
        color: #0f172a;
        font-weight: 800;
    }

.distribution-skeleton-card {
    min-height: 180px;
    background: linear-gradient(90deg, #f8fafc 25%, #e2e8f0 38%, #f8fafc 63%);
    background-size: 400% 100%;
    animation: distribution-shimmer 1.35s ease infinite;
}

    .distribution-skeleton-card.large {
        min-height: 430px;
    }

@keyframes distribution-shimmer {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: 0 0;
    }
}

.distribution-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
    color: #94a3b8;
    padding-inline: .35rem;
}

    .distribution-breadcrumbs button {
        border: 0;
        background: #fff;
        color: #2563eb;
        font-weight: 800;
        border-radius: 999px;
        padding: .45rem .8rem;
        box-shadow: 0 8px 22px rgba(15,23,42,.06);
    }

.distribution-row-actions {
    display: flex;
    gap: .55rem;
    align-items: center;
}

    .distribution-row-actions .form-select {
        min-width: 135px;
    }

.comparison-table-wrap {
    overflow: auto;
    padding: 0;
}

.distribution-comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 820px;
}

    .distribution-comparison-table th {
        position: sticky;
        top: 0;
        background: #f8fafc;
        color: #334155;
        font-size: .82rem;
        text-transform: uppercase;
        letter-spacing: .08em;
        padding: 1rem;
        z-index: 1;
    }

    .distribution-comparison-table td {
        padding: .75rem 1rem;
        border-top: 1px solid #eef2f7;
    }

    .distribution-comparison-table .criterion-cell {
        font-weight: 800;
        color: #0f172a;
        min-width: 240px;
    }

.heat-cell {
    --heat: 0%;
    position: relative;
    border-radius: 999px;
    overflow: hidden;
    background: #f1f5f9;
    min-width: 120px;
    padding: .45rem .7rem;
    font-weight: 800;
    color: #0f172a;
}

    .heat-cell::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: var(--heat);
        background: linear-gradient(90deg, rgba(37,99,235,.18), rgba(37,99,235,.35));
    }

    .heat-cell.weak::before {
        background: linear-gradient(90deg, rgba(244,63,94,.16), rgba(244,63,94,.35));
    }

    .heat-cell.strong::before {
        background: linear-gradient(90deg, rgba(16,185,129,.16), rgba(16,185,129,.35));
    }

    .heat-cell span {
        position: relative;
        z-index: 1;
    }

.distribution-bar-card h3 {
    color: #0f172a;
    font-weight: 800;
}

.distribution-bar-card p {
    color: #64748b;
}

.distribution-bars {
    display: grid;
    gap: .8rem;
}

.distribution-bar-group {
    display: grid;
    grid-template-columns: minmax(160px, 260px) 1fr;
    gap: 1rem;
    align-items: center;
}

    .distribution-bar-group span {
        color: #334155;
        font-weight: 700;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .distribution-bar-group div {
        display: flex;
        gap: .25rem;
        align-items: center;
    }

    .distribution-bar-group i {
        height: 14px;
        min-width: 2px;
        border-radius: 999px;
        background: linear-gradient(90deg, #38bdf8, #2563eb);
    }

@media (max-width: 768px) {
    .distribution-hero, .distribution-filter-header, .distribution-card-topline {
        flex-direction: column;
    }

    .distribution-filter-bar {
        top: .5rem;
    }

    .distribution-row-actions, .distribution-legend-row {
        flex-direction: column;
        align-items: stretch;
    }

    .distribution-bar-group {
        grid-template-columns: 1fr;
    }
}

/* --- Enterprise navigation refinements --- */
.app-mega-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .9rem;
    padding: .45rem .35rem .2rem;
}

.app-mega-menu-single {
    grid-template-columns: 1fr;
}

.app-mega-col {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: .85rem;
    padding: .55rem;
    background: rgba(2,6,23,.18);
    overflow: hidden;
}

.app-mega-heading {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.62);
    margin: .15rem .35rem .4rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .app-mega-menu {
        grid-template-columns: 1fr;
    }

    .app-sidebar-subgroup .nav-link {
        padding-left: 1.1rem;
    }
}

/* --- Mobile scroll + login UX fixes --- */
html, body {
    min-height: 100%;
}

@media (max-width: 991.98px) {
    body {
        overflow: auto;
    }

    .app-shell,
    .app-shell-content {
        height: auto;
        min-height: 100vh;
        max-height: none;
    }

    .app-main {
        min-height: calc(100vh - 64px);
        padding-bottom: 2rem;
    }
}

.identity-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

@media (max-width: 991.98px) {
    .identity-body {
        align-items: flex-start;
        padding-top: 1.25rem;
        padding-bottom: 2rem;
    }

    .login-hero {
        margin: 0;
        row-gap: 1rem;
    }

    .login-intro {
        padding: 1.25rem !important;
    }

    .login-card {
        margin-top: 0;
        padding: 1.25rem !important;
    }
}

/* v2 enterprise navigation - premium only, SyncSure palette */
.app-sidebar-v2 {
    width: 320px;
    scrollbar-width: none;
    background: linear-gradient(195deg,#041d16 0%,#063220 60%,#041d16 100%);
    color: #e9f7ef;
    border-right: 1px solid rgba(255,255,255,.12);
    display: flex;
    flex-direction: column;
    transition: width .25s ease,transform .25s ease;
    position: relative;
    z-index: 1040;
    box-shadow: 10px 0 40px rgba(8,24,16,.25)
}

    .app-sidebar-v2.collapsed {
        width: 86px
    }

    .app-sidebar-v2 .sidebar-head {
        display: flex;
        align-items: center;
        gap: .5rem;
        padding: 14px;
        border-bottom: 1px solid rgba(255,255,255,.1)
    }

    .app-sidebar-v2 .brand {
        display: flex;
        align-items: center;
        gap: .6rem
    }

        .app-sidebar-v2 .brand img {
            width: 32px;
            height: 32px
        }

    .app-sidebar-v2.collapsed .brand span, .app-sidebar-v2.collapsed .sidebar-search input, .app-sidebar-v2.collapsed .nav-link span, .app-sidebar-v2.collapsed .env-badge, .app-sidebar-v2.collapsed .fav, .app-sidebar-v2.collapsed .caret, .app-sidebar-v2.collapsed .ext {
        display: none
    }

.collapse-btn {
    margin-left: auto;
    border: 1px solid rgba(255,255,255,.24);
    background: rgba(255,255,255,.08);
    color: #d7f5e4;
    border-radius: 8px;
    padding: .3rem .5rem
}

.env-badge {
    font-size: .7rem;
    padding: .2rem .45rem;
    border-radius: 999px;
    background: rgba(255,255,255,.12)
}

    .env-badge.dev {
        color: #b7f3d2
    }

    .env-badge.qa {
        color: #ffe4a3
    }

    .env-badge.prod {
        color: #bfe9ff
    }

.sidebar-search {
    padding: .75rem 1rem;
    display: flex;
    gap: .5rem;
    border-bottom: 1px solid rgba(255,255,255,.08)
}

    .sidebar-search input {
        background: rgba(255,255,255,.08);
        border: 1px solid rgba(255,255,255,.16);
        color: #e9fff7;
        border-radius: 8px;
        padding: .35rem .6rem;
        width: 100%
    }

.sidebar-tree {
    padding: .5rem;
    scrollbar-width: none;
    overflow: auto
}

.nav-node {
    display: flex;
    align-items: center;
    gap: .35rem
}

.fav {
    background: none;
    border: none;
    color: #b0e6c9
}

.nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex: 1;
    padding: .5rem .6rem;
    border-radius: 10px;
    color: rgba(255,255,255,.84);
    text-decoration: none;
    border: 1px solid transparent
}

    .nav-link:hover {
        background: rgba(255,255,255,.12);
        border-color: rgba(255,255,255,.18);
        transform: translateX(2px);
        box-shadow: 0 6px 14px rgba(0,0,0,.2)
    }

.nav-node.active > .nav-link {
    background: linear-gradient(120deg,rgba(0,187,49,.35),rgba(0,187,49,.12));
    border-color: rgba(0,187,49,.45);
    color: #fff
}

.nav-children {
    margin-left: 1rem;
    padding-left: .5rem;
    border-left: 1px solid rgba(255,255,255,.18)
}

.caret {
    margin-left: auto;
    transition: transform .2s
}

    .caret.open {
        transform: rotate(180deg)
    }

@media (max-width:991.98px) {
    .app-sidebar-v2 {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-105%)
    }

        .app-sidebar-v2.is-open {
            transform: translateX(0)
        }

    .app-sidebar-v2 {
        width: min(86vw,340px) !important
    }
}


