body.app-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), transparent 22%),
        linear-gradient(180deg, #f8fbff 0%, #eef3fa 100%);
}

/* User Requested: Global Border Radius 5px Override */
.card, 
.form-control, 
.form-select, 
.btn, 
.badge, 
.rounded, 
.rounded-1, 
.rounded-2, 
.rounded-3, 
.rounded-4, 
.rounded-5,
.rounded-pill,
.glass-card,
.sidebar-card,
.dashboard-metric-card,
.workflow-icon-btn,
.search-box input,
.login-input,
.login-submit-btn,
.brand-mark,
.auth-modern-shell,
.login-modern-shell {
    border-radius: 5px !important;
}

/* Global Select2 Scrolling Fix */
body.select2-container--open {
    overflow: auto !important;
}

.select2-container--open {
    z-index: 9999999 !important;
}

body.guest-auth-body {
    min-height: 100vh;
    margin: 0;
}

.required-label::after {
    content: ' *';
    color: #dc3545;
    font-weight: 700;
}

.custom-alert {
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
}

.flash-alert-stack {
    position: fixed;
    bottom: 3.5rem;
    right: 1.2rem;
    z-index: 1080;
    display: grid;
    gap: 0.65rem;
    width: min(300px, calc(100vw - 1.5rem));
    pointer-events: none;
}

.flash-alert-item,
.flash-alert-stack .custom-alert {
    pointer-events: auto;
}

.custom-alert {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.62rem;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.custom-alert::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.68);
    transform-origin: left center;
    animation: customAlertProgress 2s linear forwards;
}

.custom-alert--success {
    background: linear-gradient(135deg, #56b84f 0%, #4caf50 100%);
}

.custom-alert--error {
    background: linear-gradient(135deg, #ff6266 0%, #ff5257 100%);
}

.custom-alert--warning {
    background: linear-gradient(135deg, #ffc928 0%, #f7b500 100%);
}

.custom-alert--info {
    background: linear-gradient(135deg, #3b97e3 0%, #2f86d7 100%);
}

.custom-alert-icon {
    width: 1.95rem;
    height: 1.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.98);
    font-size: 0.92rem;
    flex-shrink: 0;
}

.custom-alert--success .custom-alert-icon {
    color: #45a548;
}

.custom-alert--error .custom-alert-icon {
    color: #f44b53;
}

.custom-alert--warning .custom-alert-icon {
    color: #d99800;
}

.custom-alert--info .custom-alert-icon {
    color: #2b86da;
}

.custom-alert-copy {
    min-width: 0;
}

.custom-alert-title {
    margin: 0;
}

.custom-alert-message {
    margin: 0;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.custom-alert-close {
    width: 1.7rem;
    height: 1.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
}

.custom-alert-close:hover,
.custom-alert-close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    outline: 0;
}

.custom-alert-close .bi {
    font-size: 0.82rem;
    line-height: 1;
}

@keyframes customAlertProgress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.app-navbar,
.workspace-header,
.glass-card {
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
}

.app-navbar,
.workspace-header,
.glass-card,
.sidebar-card,
.feature-panel {
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 24px 70px rgba(83, 45, 23, 0.12);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg, #d4662e 0%, #8e3f18 100%);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0;
}

.brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.feature-panel,
.sidebar-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 24%),
        linear-gradient(165deg, #26120a 0%, #4a2210 50%, #7e3211 100%);
    color: #fff7f0;
}

.feature-panel .text-muted,
.sidebar-card .text-muted,
.sidebar-card .list-group-item small {
    color: rgba(255, 247, 240, 0.72) !important;
}

.feature-panel .badge,
.sidebar-card .badge {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff7f0 !important;
}

.sidebar-sticky {
    position: sticky;
    top: 1.5rem;
}

.sidebar-card .sidebar-link {
    border: 1px solid transparent !important;
    background: transparent !important;
    color: #fff7f0 !important;
    border-radius: 1rem !important;
    margin-bottom: 0.5rem;
    padding: 0.9rem 1rem !important;
}

.sidebar-card .sidebar-link.active,
.sidebar-card .sidebar-link:hover,
.sidebar-card .sidebar-link:focus {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
}

.sidebar-card .sidebar-link strong {
    display: block;
    font-size: 0.98rem;
}

.workspace-badge {
    background: rgba(212, 102, 46, 0.12);
    color: #9d471d;
    border: 1px solid rgba(212, 102, 46, 0.18);
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.8rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.hero-copy {
    max-width: 42rem;
    line-height: 1.8;
}

.auth-shell {
    overflow: hidden;
    border-radius: 1.75rem;
}

.auth-form-card {
    background: rgba(255, 252, 249, 0.97);
}

.subtle-muted {
    color: #725f53 !important;
}

.stat-card strong {
    font-size: 1.8rem;
    letter-spacing: -0.04em;
}

.module-card,
.detail-card,
.page-hero-card,
.stat-card {
    border-radius: 1.5rem;
}

.section-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    background: rgba(212, 102, 46, 0.12);
    color: #9d471d;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-demo-shell {
    align-content: start;
}

.dashboard-hero-card {
    background:
        radial-gradient(circle at top right, rgba(103, 140, 255, 0.12), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.98));
}

.dashboard-hero-copy {
    max-width: 42rem;
}

.dashboard-hero-title {
    color: #1f2937;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
}

.dashboard-hero-text {
    color: #64748b;
    max-width: 38rem;
    font-size: 1rem;
    line-height: 1.75;
}

.dashboard-hero-aside {
    min-width: 230px;
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(212, 222, 238, 0.9);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 18px 32px rgba(105, 125, 161, 0.08);
}

.dashboard-hero-aside-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #7a879a;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-hero-aside-name {
    display: block;
    color: #1f2937;
    font-size: 1.15rem;
    font-weight: 700;
}

.dashboard-hero-aside-meta {
    display: block;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

.dashboard-metric-card {
    border-radius: 1.3rem;
}

.dashboard-metric-label {
    display: block;
    margin-bottom: 0.45rem;
    color: #7a879a;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dashboard-metric-value {
    display: block;
    color: #1f2937;
    font-size: clamp(1.7rem, 2.6vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
}

.dashboard-metric-note {
    display: block;
    margin-top: 0.5rem;
    color: #64748b;
    font-size: 0.9rem;
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem;
}

.dashboard-action-link {
    min-height: 86px;
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.25rem;
    text-align: left;
}

.dashboard-action-link-label {
    font-size: 0.98rem;
    font-weight: 700;
}

.dashboard-action-link-hint {
    font-size: 0.84rem;
    opacity: 0.88;
}

.app-create-btn {
    min-height: 1.8rem;
    padding: 0.72rem 1.22rem;
    border: 0 !important;
    border-radius: 0.4rem;
    background: #256ef0 !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.62rem;
    font-size: 0.98rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 10px 20px -12px rgba(37, 110, 240, 0.38);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.app-create-btn:hover,
.app-create-btn:focus-visible {
    transform: translateY(-1px);
    background: #1f63e4 !important;
    color: #ffffff !important;
    box-shadow: 0 14px 24px -14px rgba(37, 110, 240, 0.48);
}

.app-create-btn:focus-visible {
    outline: 0;
}

.app-create-btn__icon {
    width: 1.1rem;
    height: 1.1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.92);
    background: transparent;
    flex-shrink: 0;
}

.app-create-btn__icon i {
    font-size: 0.8rem;
    line-height: 1;
}

.dashboard-focus-list,
.dashboard-highlight-list {
    display: grid;
    gap: 0.85rem;
}

.dashboard-focus-item,
.dashboard-highlight-item {
    display: flex;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border: 1px solid rgba(220, 228, 240, 0.9);
    border-radius: 1rem;
    background: rgba(248, 251, 255, 0.9);
}

.dashboard-focus-index {
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(51, 103, 232, 0.12);
    color: #3367e8;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
}

.dashboard-permission-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.58rem 0.95rem;
    border-radius: 999px;
    background: #1f2937;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

.auth-note code,
.seed-list code {
    color: #8e3f18;
    font-weight: 600;
}

.guest-auth-page {
    min-height: 100vh;
    padding: 1.5rem;
}

.guest-auth-main {
    min-height: calc(100vh - 3rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.guest-auth-alerts,
.login-stage {
    width: 100%;
    max-width: 1040px;
}

.guest-auth-alerts .alert {
    margin-bottom: 0;
}

.login-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 0;
}

.login-modern-shell {
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(217, 226, 239, 0.9);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 22px 44px rgba(96, 121, 163, 0.16);
    backdrop-filter: blur(8px);
}

.login-brand-side {
    min-height: 470px;
    padding: 2rem;
    background: #050505;
}

.login-brand-card {
    width: 100%;
    max-width: 340px;
}

.login-brand-image {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
}

.login-form-side {
    min-height: 470px;
    padding: 2rem 2.25rem;
    background: #ffffff;
}

.login-form-shell {
    max-width: 380px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.6rem;
    min-height: auto;
}

.login-panel-head {
    margin-bottom: 0;
}

.login-panel-title {
    color: #1e293b;
    font-size: clamp(1.55rem, 2.4vw, 2.05rem);
    font-weight: 700;
    line-height: 1.08;
}

.login-panel-title span {
    color: #3367e8;
}

.login-panel-copy {
    color: #6f86aa;
    font-size: 0.84rem;
    font-weight: 500;
}

.login-label {
    margin-bottom: 0.55rem;
    color: #2a3547;
    font-size: 0.8rem;
    font-weight: 700;
}

.login-input-wrap {
    position: relative;
}

.login-input {
    min-height: 48px;
    padding-left: 2.7rem;
    padding-right: 1rem;
    border: 1px solid #dfe7f5;
    border-radius: 12px;
    background: #edf3ff;
    color: #24344e;
    font-size: 0.86rem;
    box-shadow: none;
}

.login-input:focus {
    border-color: #7aa2ff;
    background: #edf3ff;
    box-shadow: 0 0 0 0.18rem rgba(51, 103, 232, 0.12);
}

.login-input::placeholder {
    color: #7e93b4;
}

.login-input-password {
    padding-right: 2.7rem;
}

.login-input-icon,
.login-input-trailing {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a6c4;
}

.login-input-icon {
    left: 1rem;
}

.login-input-trailing {
    right: 1rem;
}

.login-input-icon svg,
.login-input-trailing svg {
    width: 0.92rem;
    height: 0.92rem;
}

.login-submit-btn {
    min-height: 48px;
    border-radius: 12px;
    background: #3367e8;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.login-submit-btn:hover,
.login-submit-btn:focus {
    background: #2556d6;
    color: #ffffff;
}

.login-form-shell form {
    gap: 1.3rem !important;
}

@media (max-width: 991.98px) {
    .flash-alert-stack {
        bottom: 2.5rem;
        right: 0.75rem;
        width: min(310px, calc(100vw - 1rem));
    }

    .sidebar-sticky {
        position: static;
    }

    .custom-alert {
        grid-template-columns: auto 1fr;
        padding: 0.76rem 0.82rem;
    }

    .custom-alert-close {
        grid-column: 2;
        justify-self: end;
    }

    .guest-auth-page {
        padding: 0.75rem;
    }

    .guest-auth-main {
        min-height: calc(100vh - 1.5rem);
        gap: 0.75rem;
    }

    .login-stage {
        max-width: 100%;
        min-height: 100vh;
    }

    .login-modern-shell {
        border-radius: 1rem;
    }

    .login-brand-side,
    .login-form-side {
        min-height: auto;
        padding: 2rem 1.5rem;
    }

    .login-brand-card {
        max-width: 260px;
    }

    .login-brand-image {
        max-height: 200px;
    }

    .login-form-shell {
        max-width: 100%;
        gap: 1.4rem;
    }

    .dashboard-hero-aside {
        min-width: 100%;
    }

    .dashboard-action-grid {
        grid-template-columns: 1fr;
    }
}

.analytics-demo-shell {
    align-content: start;
}

.analytics-section-chip {
    background: rgba(255, 255, 255, 0.72);
    color: #1e3a8a;
    border: 1px solid rgba(191, 219, 254, 0.9);
}

.analytics-page-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.analytics-page-copy {
    max-width: 44rem;
}

.analytics-page-title {
    color: #111827;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 0.98;
    letter-spacing: -0.05em;
}

.analytics-page-text {
    color: #64748b;
    max-width: 40rem;
    font-size: 1rem;
    line-height: 1.7;
}

.analytics-user-panel {
    min-width: 240px;
    padding: 1.15rem 1.2rem;
    border: 1px solid rgba(219, 231, 249, 0.92);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 20px 40px rgba(96, 121, 163, 0.12);
    display: grid;
    gap: 0.3rem;
}

.analytics-user-panel-label {
    color: #7c8ca8;
    font-size: 0.77rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.analytics-user-panel-name {
    color: #0f172a;
    font-size: 1.12rem;
    font-weight: 700;
}

.analytics-user-panel-meta {
    color: #64748b;
    font-size: 0.92rem;
}

.analytics-summary-card {
    min-height: 148px;
    padding: 1.15rem 1.15rem 0.95rem;
    border-radius: 1.25rem;
    color: #ffffff;
    box-shadow: 0 24px 44px rgba(43, 61, 94, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.analytics-summary-card--violet {
    background: linear-gradient(135deg, #6d28d9 0%, #8b5cf6 100%);
}

.analytics-summary-card--emerald {
    background: linear-gradient(135deg, #0f9f6e 0%, #198754 100%);
}

.analytics-summary-card--cyan {
    background: linear-gradient(135deg, #0891b2 0%, #22c1f1 100%);
}

.analytics-summary-card--amber {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.analytics-summary-card__header,
.analytics-summary-card__footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.analytics-summary-value {
    display: block;
    font-size: clamp(1.8rem, 3vw, 2.2rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
}

.analytics-summary-label {
    display: block;
    margin-top: 0.55rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
}

.analytics-summary-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.analytics-summary-card__footer {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.82rem;
}

.analytics-inline-link {
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.analytics-inline-link:hover,
.analytics-inline-link:focus {
    color: #ffffff;
    opacity: 0.88;
}

.analytics-panel {
    background:
        radial-gradient(circle at top right, rgba(96, 165, 250, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.98));
}

.analytics-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.analytics-panel-header--compact {
    align-items: flex-start;
}

.analytics-panel-kicker {
    display: block;
    margin-bottom: 0.35rem;
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.analytics-panel-title {
    color: #111827;
    font-size: 1.35rem;
    line-height: 1.15;
}

.analytics-stat-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 1.25rem;
}

.analytics-strip-item {
    min-width: 86px;
    text-align: right;
}

.analytics-strip-item strong {
    display: block;
    color: #111827;
    font-size: 1.45rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.analytics-strip-item span {
    color: #64748b;
    font-size: 0.82rem;
}

.analytics-bar-chart {
    min-height: 270px;
    padding-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 1rem;
    align-items: end;
}

.analytics-bar-column {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
}

.analytics-bar-stack {
    width: min(56px, 100%);
    padding: 0 0.2rem;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.2rem;
    justify-content: flex-start;
}

.analytics-bar-segment {
    width: 100%;
    border-radius: 0.95rem 0.95rem 0.4rem 0.4rem;
}

.analytics-bar-segment--primary {
    background: #22c55e;
}

.analytics-bar-segment--secondary {
    background: #2563eb;
}

.analytics-bar-segment--tertiary {
    background: #e2e8f0;
}

.analytics-bar-label {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
}

.analytics-legend,
.analytics-series-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: #64748b;
    font-size: 0.82rem;
}

.analytics-legend-dot {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    background: var(--legend-color, #2563eb);
    display: inline-block;
    margin-right: 0.45rem;
}

.analytics-filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(219, 231, 249, 0.95);
    background: rgba(255, 255, 255, 0.92);
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
}

.analytics-radar-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.analytics-radar-chart {
    width: 100%;
    max-width: 260px;
    height: auto;
}

.analytics-radar-grid,
.analytics-radar-axis {
    fill: none;
    stroke: rgba(148, 163, 184, 0.3);
    stroke-width: 1;
}

.analytics-radar-center {
    fill: #94a3b8;
}

.analytics-radar-label {
    fill: #64748b;
    font-size: 10px;
    font-weight: 600;
    text-anchor: middle;
}

.analytics-panel-note {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.6;
}

.analytics-timeline {
    display: grid;
    gap: 0.95rem;
}

.analytics-timeline-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: start;
    gap: 0.8rem;
    padding-bottom: 0.95rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.analytics-timeline-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.analytics-timeline-dot {
    width: 0.68rem;
    height: 0.68rem;
    border-radius: 999px;
    margin-top: 0.35rem;
}

.analytics-timeline-dot--violet {
    background: #7c3aed;
}

.analytics-timeline-dot--emerald {
    background: #10b981;
}

.analytics-timeline-dot--cyan {
    background: #06b6d4;
}

.analytics-timeline-dot--amber {
    background: #f59e0b;
}

.analytics-timeline-copy strong {
    display: block;
    color: #111827;
    font-size: 0.95rem;
}

.analytics-timeline-copy span {
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.5;
}

.analytics-timeline-time {
    color: #94a3b8;
    font-size: 0.76rem;
    white-space: nowrap;
}

.analytics-action-grid {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.analytics-action-card {
    padding: 1rem 1.05rem;
    border: 1px solid rgba(219, 231, 249, 0.95);
    border-radius: 1rem;
    background: rgba(248, 251, 255, 0.92);
    display: grid;
    gap: 0.3rem;
    color: #111827;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.analytics-action-card:hover,
.analytics-action-card:focus {
    transform: translateY(-1px);
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow: 0 18px 32px rgba(96, 121, 163, 0.12);
    color: #111827;
}

.analytics-action-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.85rem;
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.analytics-action-card strong {
    font-size: 0.95rem;
}

.analytics-action-card small {
    color: #64748b;
    font-size: 0.83rem;
}

.analytics-donut-shell {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.analytics-donut-chart {
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, #ffffff 0 44%, transparent 45% 100%),
        conic-gradient(var(--analytics-donut-accent, #2563eb) 0 calc(var(--analytics-donut-value, 0) * 1%),
            rgba(226, 232, 240, 0.92) calc(var(--analytics-donut-value, 0) * 1%) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.9);
}

.analytics-donut-center {
    width: 108px;
    height: 108px;
    border-radius: 999px;
    background: #ffffff;
    display: grid;
    place-items: center;
    text-align: center;
    box-shadow: 0 12px 24px rgba(96, 121, 163, 0.12);
}

.analytics-donut-center strong {
    display: block;
    color: #111827;
    font-size: 1.55rem;
    line-height: 1;
}

.analytics-donut-center span {
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
}

.analytics-split-list {
    display: grid;
    gap: 0.75rem;
}

.analytics-split-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.75);
}

.analytics-split-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.analytics-split-copy {
    color: #475569;
    font-size: 0.86rem;
}

.analytics-split-item strong {
    color: #111827;
    font-size: 0.94rem;
}

.analytics-permission-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.58rem 0.92rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid rgba(191, 219, 254, 0.9);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1;
}

@media (max-width: 991.98px) {

    .analytics-page-intro,
    .analytics-panel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .analytics-user-panel {
        min-width: 100%;
    }

    .analytics-stat-strip {
        justify-content: flex-start;
    }

    .analytics-strip-item {
        text-align: left;
    }

    .analytics-bar-chart {
        gap: 0.65rem;
    }

    .analytics-timeline-item {
        grid-template-columns: auto 1fr;
    }

    .analytics-timeline-time {
        grid-column: 2;
    }
}

.app-action-group,
.workflow-action-group {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.app-action-btn,
.workflow-icon-btn {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 5px;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 12px 24px -16px rgba(15, 23, 42, 0.6);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
    cursor: pointer;
}

.app-action-btn:hover,
.app-action-btn:focus-visible,
.workflow-icon-btn:hover,
.workflow-icon-btn:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 28px -18px rgba(15, 23, 42, 0.68);
    color: #ffffff;
    opacity: 0.96;
}

.app-action-btn:focus-visible,
.workflow-icon-btn:focus-visible {
    outline: 0;
}

.app-action-btn i,
.workflow-icon-btn i {
    font-size: 1rem;
    line-height: 1;
}

.app-action-btn--view,
.workflow-icon-btn--view {
    background: linear-gradient(135deg, #3cb8ff 0%, #2584f8 100%);
}

.app-action-btn--edit,
.workflow-icon-btn--edit {
    background: linear-gradient(135deg, #3fd8d1 0%, #28bed7 100%);
}

.app-action-btn--delete,
.workflow-icon-btn--delete {
    background: linear-gradient(135deg, #fb7185 0%, #ef4444 100%);
}

.app-action-btn--permission,
.workflow-icon-btn--permission {
    background: linear-gradient(135deg, #64748b 0%, #334155 100%);
}

.app-action-btn--download,
.workflow-icon-btn--download {
    background: linear-gradient(135deg, #22c55e 0%, #0ea5a4 100%);
}

.app-action-btn--status,
.workflow-icon-btn--status {
    background: linear-gradient(135deg, #22c55e 0%, #14b8a6 100%);
}

.table-filter-panel {
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 8px 24px -20px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.table-filter-panel__toggle {
    width: 100%;
    border: 0;
    background: #ffffff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: left;
    box-shadow: none;
}

.table-filter-panel__toggle:hover,
.table-filter-panel__toggle:focus-visible {
    background: #f8fbff;
    color: #1d4ed8;
    outline: 0;
}

.table-filter-panel__title {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.table-filter-panel__title i {
    font-size: 1rem;
    line-height: 1;
}

.table-filter-panel__chevron {
    font-size: 0.9rem;
    line-height: 1;
    transition: transform 0.2s ease;
}

.table-filter-panel__toggle[aria-expanded='true'] .table-filter-panel__chevron {
    transform: rotate(180deg);
}

.table-filter-panel__collapse {
    border-top: 1px solid #edf2f7;
}

.table-filter-panel__body {
    padding: 1rem 1.25rem 1.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

body.app-body .main-stage-inner .card-body {
    padding: 0.95rem 1rem;
}

body.app-body .main-stage-inner .card-header,
body.app-body .main-stage-inner .card-footer {
    padding: 0.82rem 1rem;
}

body.app-body .main-stage-inner .btn {
    font-size: 0.9rem;
}

body.app-body .main-stage-inner .form-control,
body.app-body .main-stage-inner .form-select {
    font-size: 0.9rem;
}

body.app-body .main-stage-inner .small,
body.app-body .main-stage-inner small {
    font-size: 0.79rem;
}

body.app-body .main-stage-inner .finance-metric-card__body {
    padding: 0.88rem 1rem;
    min-height: 92px;
}

body.app-body .main-stage-inner .finance-metric-card__icon {
    width: 42px;
    height: 42px;
    font-size: 1.15rem;
}

body.app-body .main-stage-inner .finance-metric-card__label {
    font-size: 0.76rem;
}

body.app-body .main-stage-inner .finance-metric-card__value {
    font-size: 0.98rem;
}

body.app-body .main-stage-inner .finance-metric-card__meta {
    font-size: 0.68rem;
}

body.app-body .main-stage-inner .workflow-table-loading__card,
body.app-body .main-stage-inner .monthly-cost-loading__card {
    padding: 0.72rem 0.88rem;
    font-size: 0.82rem;
}

.table thead th {
    font-weight: 700 !important;
}

.table tbody td:nth-child(1),
.table tbody td:nth-child(2) {
    font-weight: 700 !important;
}

.table tbody td:nth-child(1) .form-control,
.table tbody td:nth-child(1) .form-select,
.table tbody td:nth-child(1) .select2-selection__rendered,
.table tbody td:nth-child(2) .form-control,
.table tbody td:nth-child(2) .form-select,
.table tbody td:nth-child(2) .select2-selection__rendered {
    font-weight: 700 !important;
}

.table tbody td:nth-child(1) strong,
.table tbody td:nth-child(1) .badge,
.table tbody td:nth-child(1) .workflow-name-cell strong,
.table tbody td:nth-child(1) .workflow-name-cell span,
.table tbody td:nth-child(2) strong,
.table tbody td:nth-child(2) .badge,
.table tbody td:nth-child(2) .workflow-name-cell strong,
.table tbody td:nth-child(2) .workflow-name-cell span {
    font-weight: 700 !important;
}

.table tbody td:nth-child(n + 3) {
    font-weight: 400 !important;
}

.table tbody td:nth-child(n + 3) .form-control,
.table tbody td:nth-child(n + 3) .form-select,
.table tbody td:nth-child(n + 3) .select2-selection__rendered,
.table tbody td:nth-child(n + 3) strong,
.table tbody td:nth-child(n + 3) .badge,
.table tbody td:nth-child(n + 3) .workflow-name-cell strong,
.table tbody td:nth-child(n + 3) .workflow-name-cell span {
    font-weight: 400 !important;
}

/* Scoped custom scrollbar styles for module/tooling areas and tables */
:where(.workflow-toolbar,
    .workflow-table-wrapper .dataTables_scrollBody,
    .dataTables_scrollBody,
    .table-responsive,
    .table,
    .custom-table,
    .custom-report-table,
    .custom-notif-table,
    .workflow-data-table,
    .roles-table,
    .profit-loss-demo-table,
    .users-data-table,
    .roles-data-table) {
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: #0f1720 #f3f4f6;
    /* thumb track */
}

/* WebKit browsers */
:where(.workflow-toolbar,
    .workflow-table-wrapper .dataTables_scrollBody,
    .dataTables_scrollBody,
    .table-responsive,
    .table,
    .custom-table,
    .custom-report-table,
    .custom-notif-table,
    .workflow-data-table,
    .roles-table,
    .profit-loss-demo-table,
    .users-data-table,
    .roles-data-table)::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

:where(.workflow-toolbar,
    .workflow-table-wrapper .dataTables_scrollBody,
    .dataTables_scrollBody,
    .table-responsive,
    .table,
    .custom-table,
    .custom-report-table,
    .custom-notif-table,
    .workflow-data-table,
    .roles-table,
    .profit-loss-demo-table,
    .users-data-table,
    .roles-data-table)::-webkit-scrollbar-track {
    background: #f3f4f6;
    /* light track */
    border-radius: 999px;
}

:where(.workflow-toolbar,
    .workflow-table-wrapper .dataTables_scrollBody,
    .dataTables_scrollBody,
    .table-responsive,
    .table,
    .custom-table,
    .custom-report-table,
    .custom-notif-table,
    .workflow-data-table,
    .roles-table,
    .profit-loss-demo-table,
    .users-data-table,
    .roles-data-table)::-webkit-scrollbar-thumb {
    background: #0f1720;
    /* dark thumb */
    border-radius: 999px;
    border: 2px solid #f3f4f6;
    /* creates the inset gap look */
}

:where(.workflow-toolbar,
    .workflow-table-wrapper .dataTables_scrollBody,
    .dataTables_scrollBody,
    .table-responsive,
    .table,
    .custom-table,
    .custom-report-table,
    .custom-notif-table,
    .workflow-data-table,
    .roles-table,
    .profit-loss-demo-table,
    .users-data-table,
    .roles-data-table)::-webkit-scrollbar-thumb:hover {
    background: #081014;
}

/* keep scrollbars visible space stable when possible */
:where(.workflow-table-wrapper .dataTables_scrollBody,
    .dataTables_scrollBody,
    .workflow-toolbar) {
    scrollbar-gutter: stable both-edges;
}

/* Compact layout for module pages: smaller text, tighter tables */
.main-stage-inner.compact,
.main-stage-inner {
    --compact-font-size: 0.88rem;
    /* ~14px */
}

.main-stage-inner.compact .card-body,
.main-stage-inner .card-body {
    padding: 0.6rem 0.75rem !important;
}

.main-stage-inner.compact .card-header,
.main-stage-inner .card-header,
.main-stage-inner.compact .card-footer,
.main-stage-inner .card-footer {
    padding: 0.45rem 0.75rem !important;
}

.main-stage-inner.compact .workflow-toolbar,
.main-stage-inner .workflow-toolbar {
    gap: 0.45rem;
    margin-bottom: 0.6rem;
}

.main-stage-inner.compact .workflow-toolbar__search .form-control,
.main-stage-inner .workflow-toolbar__search .form-control,
.main-stage-inner.compact .workflow-toolbar__filter .form-select,
.main-stage-inner .workflow-toolbar__filter .form-select {
    min-height: 34px;
    font-size: var(--compact-font-size);
}

.main-stage-inner.compact .table,
.main-stage-inner .table,
.main-stage-inner.compact table,
.main-stage-inner table {
    font-size: var(--compact-font-size);
}

.main-stage-inner.compact .table td,
.main-stage-inner.compact .table th,
.main-stage-inner .table td,
.main-stage-inner .table th {
    padding: 0.45rem 0.55rem !important;
}

.main-stage-inner.compact .badge,
.main-stage-inner .badge {
    font-size: 0.68rem;
    padding: 0.28rem 0.45rem;
}

.main-stage-inner.compact .page-hero-title,
.main-stage-inner .page-hero-title,
.main-stage-inner.compact .hero-title,
.main-stage-inner .hero-title {
    font-size: clamp(1.4rem, 3.4vw, 1.9rem) !important;
}

/* Reduce action button size inside module pages */
.main-stage-inner.compact .app-action-btn,
.main-stage-inner .app-action-btn,
.main-stage-inner.compact .workflow-icon-btn,
.main-stage-inner .workflow-icon-btn {
    width: 2rem;
    height: 2rem;
}

/* DataTables compact spacing */
.main-stage-inner.compact .dataTables_wrapper .dataTables_paginate .paginate_button,
.main-stage-inner .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.28rem 0.45rem;
    font-size: var(--compact-font-size);
}

/* Make forms and inputs slightly smaller in modules */
.main-stage-inner.compact .form-control,
.main-stage-inner .form-control,
.main-stage-inner.compact .form-select,
.main-stage-inner .form-select {
    font-size: var(--compact-font-size);
    padding: 0.36rem 0.6rem;
}

@media (max-width: 767.98px) {

    .main-stage-inner.compact .card-body,
    .main-stage-inner .card-body {
        padding: 0.5rem 0.6rem !important;
    }
}
