:root {
    --sxpo-primary: var(--p);
    --sxpo-primary-dark: var(--pd);
    --sxpo-primary-soft: #eef4ff;
    --sxpo-success: var(--ok);
    --sxpo-warning: var(--warn);
    --sxpo-danger: var(--danger);
    --sxpo-bg: var(--bg);
    --sxpo-surface: var(--card);
    --sxpo-border: var(--border);
    --sxpo-text: var(--text);
    --sxpo-text-muted: var(--muted);
}

:root {
    --p: #155eef;
    --pd: #0b3aa4;
    --bg: #f5f7fb;
    --card: #fff;
    --text: #172033;
    --muted: #667085;
    --border: #e7eaf0;
    --ok: #12b76a;
    --warn: #f79009;
    --danger: #f04438;
    --side: #111827
}

.badge {
    --bs-badge-padding-x: 0.85em;
    --bs-badge-padding-y: 0.65em;
    --bs-badge-font-size: 0.75em;
    --bs-badge-font-weight: 700;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}

a {
    text-decoration: none;
    color: inherit
}
.fs-9 {
    font-size: 9px;
}
.fs-10 {
    font-size: 10px;
}
.fs-11 {
    font-size: 11px;
}
.fs-12 {
    font-size: 12px;
}
.fs-13 {
    font-size: 13px;
}
.fs-14 {
    font-size: 14px;
}
.app {
    display: flex;
    min-height: 100vh
}

.sidebar {
    width: 258px;
    background: var(--side);
    color: #d7deea;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    overflow: auto
}

.brand {
    height: 72px;
    display: flex;
    align-items: center;
    padding: 0 15px;
    border-bottom: 1px solid #ffffff14;
    gap: 11px
}

.brand-mark {
    width: 57px;
    height: 48px;
    border-radius: 11px;
    background: linear-gradient(135deg,#2f80ff,#6b5cff);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 800;
    font-size: 18px
}

.brand b {
    color: #fff;
    font-size: 17px
}

.brand small {
    display: block;
    color: #8f9bad;
    font-size: 10px
}

.nav-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #718096;
    padding: 20px 20px 8px
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 18px;
    margin: 3px 10px;
    border-radius: 9px;
    color: #aeb8c8
}

    .nav a:hover, .nav a.active {
        background: #202b3f;
        color: #fff;
        width: 100%;
    }

.nav i {
    width: 20px;
    text-align: center;
    font-style: normal
}

.sidebar-footer {
    margin: 18px 14px;
    padding: 13px;
    border: 1px solid #ffffff14;
    border-radius: 10px;
    color: #8f9bad;
    font-size: 11px
}

.main {
    margin-left: 258px;
    width: calc(100% - 258px)
}

.topbar {
    height: 72px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 20
}

.top-left {
    display: flex;
    align-items: center;
    gap: 12px
}

.page-title {
    font-size: 18px;
    font-weight: 750
}

.crumb {
    font-size: 12px;
    color: var(--muted)
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px
}

.icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #fff;
    display: grid;
    place-items: center;
    color: #667085
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #dbe7ff;
    color: #155eef;
    display: grid;
    place-items: center;
    font-weight: 750
}

.content {
    /*padding: 26px 28px 40px*/
    padding: 15px;
}

.welcome {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 22px
}

    .welcome h1 {
        font-size: 25px;
        margin: 0 0 5px
    }

.muted {
    color: var(--muted)
}

.btn {
    border: 0;
    border-radius: 8px;
    padding: 10px 15px;
    font-weight: 650;
    cursor: pointer;
    /*display: inline-flex;*/
    align-items: center;
    gap: 7px
}

.btn-primary {
    background: var(--p);
    color: #fff
}

.btn-light {
    background: #fff;
    border: 1px solid var(--border);
    color: #344054
}

.orange-link {
    background: #fff3eb;
    color: #d65b19;
    font-size: 12px;
    border-radius: 8px;
    padding: 6px 10px;
    font-weight: 700;
}
.grid {
    display: grid;
    gap: 18px
}

.g4 {
    grid-template-columns: repeat(4,1fr)
}

.g3 {
    grid-template-columns: repeat(3,1fr)
}

.g2 {
    grid-template-columns: repeat(2,1fr)
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 28px #1018280f
}

.card-head {
    padding: 17px 19px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center
}

    .card-head h3 {
        margin: 0;
        font-size: 14px
    }

.card-body {
    padding: 12px
}

.kpi {
    padding: 18px
}

.kpi-top {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #eef4ff;
    color: #155eef;
    display: grid;
    place-items: center
}

.kpi .value {
    font-size: 27px;
    font-weight: 780;
    margin: 10px 0 3px
}

.trend {
    font-size: 11px
}

.up {
    color: var(--ok)
}

.table-wrap {
    overflow: auto
}

.table {
    width: 100%;
    border-collapse: collapse
}

    .table th {
        background: #fafbfc;
        color: #667085;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .04em;
        text-align: left
    }

    .table th, .table td {
        padding: 13px 15px;
        border-bottom: 1px solid #edf0f4;
        white-space: nowrap
    }

    .table td {
        font-size: 13px
    }

.company {
    display: flex;
    align-items: center;
    gap: 10px
}

.company-logo {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #edf2ff;
    display: grid;
    place-items: center;
    color: #155eef;
    font-weight: 750
}

.status {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700
}

.s-success {
    background: #eafaf2;
    color: #087443
}

.s-warning {
    background: #fff4e5;
    color: #a15c00
}

.s-info {
    background: #eef4ff;
    color: #155eef
}

.s-neutral {
    background: #f1f3f6;
    color: #667085
}

.filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap
}

.input, .select {
    border: 1px solid #d9dee8;
    background: #fff;
    border-radius: 8px;
    padding: 10px 11px;
    outline: none;
    color: #344054;
    min-height: 40px
}

    .input:focus, .select:focus {
        border-color: #84adff;
        box-shadow: 0 0 0 3px #e8f0ff
    }

.progress {
    height: 7px;
    background: #edf0f5;
    border-radius: 20px;
    overflow: hidden
}

    .progress > span {
        display: block;
        height: 100%;
        background: var(--p);
        border-radius: 20px
    }

.login-forgot {
    color: var(--sxpo-muted);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.event-card {
    padding: 18px
}

    .event-card .cover {
        height: 110px;
        border-radius: 10px;
        background: linear-gradient(135deg,#123d8f,#4f46e5);
        margin-bottom: 15px
    }

.event-title {
    font-size: 15px;
    font-weight: 750
}

.meta {
    display: flex;
    gap: 12px;
    color: #667085;
    font-size: 11px;
    margin: 9px 0 13px;
    flex-wrap: wrap
}

.statline {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 12px
}

.divider {
    border-top: 1px solid var(--border);
    margin: 18px 0
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 16px
}

.profile-logo {
    width: 68px;
    height: 68px;
    border-radius: 14px;
    background: #edf2ff;
    color: #155eef;
    display: grid;
    place-items: center;
    font-size: 25px;
    font-weight: 800
}

.tabs {
    display: flex;
    gap: 22px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px
}

    .tabs a {
        padding: 12px 3px;
        color: #667085
    }

        .tabs a.active {
            color: #155eef;
            border-bottom: 2px solid #155eef;
            font-weight: 700
        }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2,1fr);
    gap: 16px
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 7px
}

.field.full {
    grid-column: 1/-1
}

.textarea {
    min-height: 100px;
    width: 100%;
    resize: vertical
}

.form-control {
    font-size: 13px;
}

.form-select {
    font-size: 13px;
}

.notice {
    padding: 13px 15px;
    border-radius: 9px;
    background: #eef4ff;
    color: #24477e;
    border: 1px solid #d6e5ff
}

.mobile-toggle {
    display: none
}

@media(max-width:1100px) {
    .g4 {
        grid-template-columns: repeat(2,1fr)
    }

    .g3 {
        grid-template-columns: repeat(2,1fr)
    }
}

@media(max-width:800px) {
    .sidebar {
        transform: translateX(-100%);
        transition: .2s
    }

        .sidebar.open {
            transform: translateX(0)
        }

    .main {
        margin-left: 0;
        width: 100%
    }

    .mobile-toggle {
        display: grid
    }

    .topbar {
        padding: 0 16px
    }

    .content {
        padding: 18px 16px 30px
    }

    .g4, .g3, .g2, .form-grid {
        grid-template-columns: 1fr
    }

    .welcome {
        align-items: flex-start;
        gap: 12px;
        flex-direction: column
    }

    .table th, .table td {
        padding: 11px 10px
    }

    .top-left .crumb {
        display: none
    }
}
/* ============================================================
   SXPO Alert Stack
   Reusable Success / Error / Warning / Info Messages
   ============================================================ */
.sxpo-alert-stack {
    position: fixed;
    top: 1px;
    right: 480px;
    z-index: 1090;
    width: min(420px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}
/* ------------------------------------------------------------
   Alert
   ------------------------------------------------------------ */

.sxpo-alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 10px 35px 10px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.06);
    pointer-events: auto;
    animation: sxpoAlertSlideIn 0.25s ease-out;
}
/* ------------------------------------------------------------
   Alert Icon
   ------------------------------------------------------------ */

.sxpo-alert-icon {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    background: #dc3545;
    color: #ffffff;
}
/* ------------------------------------------------------------
   Alert Content
   ------------------------------------------------------------ */

.sxpo-alert-content {
    min-width: 0;
    padding-top: 1px;
    color: #343a40;
    font-size: 14px;
    line-height: 1.5;
}

    .sxpo-alert-content strong {
        display: block;
        margin-bottom: 2px;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.4;
    }

    .sxpo-alert-content > div {
        color: #6c757d;
        font-size: 13px;
        line-height: 1.5;
        overflow-wrap: anywhere;
    }
/* ------------------------------------------------------------
   Close Button
   ------------------------------------------------------------ */

.sxpo-alert-close {
    position: absolute;
    top: 13px;
    right: 12px;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
    opacity: 0.55;
    border-radius: 6px;
    transition: opacity 0.15s ease, background-color 0.15s ease;
}

    .sxpo-alert-close:hover {
        opacity: 0.9;
        background-color: rgba(0, 0, 0, 0.05);
    }

    .sxpo-alert-close:focus {
        box-shadow: none;
        outline: none;
    }
/* ------------------------------------------------------------
   Danger / Error
   ------------------------------------------------------------ */

.sxpo-alert.alert-danger {
    border-color: #f1b0b7;
    border-left: 4px solid #dc3545;
}

    .sxpo-alert.alert-danger .sxpo-alert-icon {
        background: #dc3545;
    }
/* ------------------------------------------------------------
   Success
   ------------------------------------------------------------ */

.sxpo-alert.alert-success {
    border-color: #a3cfbb;
    border-left: 4px solid #198754;
}

    .sxpo-alert.alert-success .sxpo-alert-icon {
        background: #198754;
    }
/* ------------------------------------------------------------
   Warning
   ------------------------------------------------------------ */

.sxpo-alert.alert-warning {
    border-color: #ffda6a;
    border-left: 4px solid #ffc107;
}

    .sxpo-alert.alert-warning .sxpo-alert-icon {
        background: #ffc107;
        color: #212529;
    }
/* ------------------------------------------------------------
   Information
   ------------------------------------------------------------ */

.sxpo-alert.alert-info {
    border-color: #9eeaf9;
    border-left: 4px solid #0dcaf0;
}

    .sxpo-alert.alert-info .sxpo-alert-icon {
        background: #0dcaf0;
        color: #212529;
    }
/* ------------------------------------------------------------
   Optional Primary
   ------------------------------------------------------------ */

.sxpo-alert.alert-primary {
    border-color: #9ec5fe;
    border-left: 4px solid #0d6efd;
}

    .sxpo-alert.alert-primary .sxpo-alert-icon {
        background: #0d6efd;
    }
/* ------------------------------------------------------------
   Animation
   ------------------------------------------------------------ */

@keyframes sxpoAlertSlideIn {
    from {
        opacity: 0;
        transform: translate3d(24px, 0, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}
/* ------------------------------------------------------------
   Mobile
   ------------------------------------------------------------ */

@media (max-width: 576px) {
    .sxpo-alert-stack {
        top: 68px;
        right: 16px;
        left: 16px;
        width: auto;
    }

    .sxpo-alert {
        padding: 14px 38px 14px 14px;
    }

    .sxpo-alert-icon {
        flex-basis: 28px;
        width: 28px;
        height: 28px;
    }
}

.sxpo-page {
    padding: 5px 0 28px;
}

.sxpo-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

    .sxpo-page-header .sxpo-page-eyebrow {
        color: var(--ts-primary);
        font-size: .72rem;
        font-weight: 800;
        letter-spacing: .12em;
        text-transform: uppercase;
    }

    .sxpo-page-header .sxpo-page-title {
        margin: 2px 0 5px;
        color: var(--ts-text);
        font-size: clamp(1.65rem, 2vw, 2.15rem);
        font-weight: 800;
        letter-spacing: -.035em;
    }

.sxpo-standard-page-header button {
    padding: 10px 15px;
}

.btn-sm-font {
    font-size: 13px;
}

.btn-sm-list {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 650;
    line-height: 1.25;
    white-space: nowrap;
    vertical-align: middle;
}

.sxpo-page-header .sxpo-page-subtitle,
.ts-muted {
    color: var(--ts-muted);
}

.sxpo-page-header .sxpo-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.sxpo-btn-filter-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}
/* Streamlined grouped sidebar */
.sxpo-sidebar {
    transition: width .22s ease;
}

.sxpo-sidebar-scroll {
    padding-bottom: 8px;
}

.sxpo-brand-link {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    flex: 1;
}

.sxpo-brand-copy {
    min-width: 0;
}

.sxpo-sidebar-collapse {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    border: 1px solid #ffffff14;
    border-radius: 8px;
    background: transparent;
    color: #8f9bad;
    cursor: pointer;
}

    .sxpo-sidebar-collapse:hover {
        color: #fff;
        background: #202b3f;
    }

.sxpo-nav-section-title {
    padding: 17px 20px 7px;
    color: #667085;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sxpo-nav-group {
    margin-bottom: 2px;
}

.sxpo-nav-parent {
    width: calc(100% - 20px);
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.sxpo-nav-arrow {
    margin-left: auto;
    color: #667085;
    font-size: 10px;
    transition: transform .2s ease;
}

.sxpo-nav-group.open .sxpo-nav-arrow {
    transform: rotate(180deg);
}

.sxpo-nav-children {
    max-height: 0;
    overflow: hidden;
    transition: max-height .22s ease;
}

.sxpo-nav-group.open .sxpo-nav-children {
    max-height: 520px;
}

.sxpo-nav-child {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 35px;
    margin: 2px 10px 2px 24px;
    padding: 7px 12px 7px 28px;
    position: relative;
    border-radius: 8px;
    color: #929db0;
    font-size: 11px;
}

    .sxpo-nav-child::before {
        content: "";
        position: absolute;
        left: 12px;
        width: 5px;
        height: 5px;
        border: 1px solid #667085;
        border-radius: 50%;
    }

    .sxpo-nav-child:hover,
    .sxpo-nav-child.active {
        background: #202b3f;
        color: #fff;
    }

        .sxpo-nav-child.active::before {
            border-color: #f79009;
            background: #f79009;
        }

    .sxpo-nav-child small {
        margin-left: auto;
        color: #f79009;
        font-size: 8px;
        font-weight: 800;
        text-transform: uppercase;
    }

.sxpo-sidebar-collapsed .sxpo-sidebar {
    width: 78px;
}

.sxpo-sidebar-collapsed .main {
    margin-left: 78px;
    width: calc(100% - 78px);
}

.sxpo-sidebar-collapsed .sxpo-brand-copy,
.sxpo-sidebar-collapsed .sxpo-nav-section-title,
.sxpo-sidebar-collapsed .sxpo-nav-text,
.sxpo-sidebar-collapsed .sxpo-nav-arrow,
.sxpo-sidebar-collapsed .sxpo-nav-children,
.sxpo-sidebar-collapsed .sxpo-sidebar-footer-text {
    display: none;
}

.sxpo-sidebar-collapsed .sxpo-sidebar-brand {
    justify-content: center;
    padding: 0 10px;
}

.sxpo-sidebar-collapsed .sxpo-brand-link {
    flex: 0 0 auto;
}

.sxpo-sidebar-collapsed .sxpo-sidebar-collapse {
    position: absolute;
    top: 20px;
    right: 8px;
}

.sxpo-sidebar-collapsed .sxpo-nav-link {
    width: calc(100% - 20px);
    justify-content: center;
    padding: 11px 10px;
}

    .sxpo-sidebar-collapsed .sxpo-nav-parent.active,
    .sxpo-sidebar-collapsed .sxpo-nav-link:hover {
        width: calc(100% - 20px);
    }

.sxpo-sidebar-collapsed .sxpo-nav-group {
    position: relative;
}

    .sxpo-sidebar-collapsed .sxpo-nav-group:hover::after {
        content: attr(data-title);
    }

@media (max-width: 800px) {
    .sxpo-sidebar-collapsed .sidebar,
    .sxpo-sidebar-collapsed .sxpo-sidebar {
        width: 258px;
    }

    .sxpo-sidebar-collapsed .main {
        margin-left: 0;
        width: 100%;
    }
}
