:root {
    --bg: #f5f6f8;
    --text: #17191c;
    --muted: #737982;
    --border: #e6e8ec;
    --card: #fff;
    --sidebar: #fff;
    --primary: #111318;
    --green: #15945a;
    --blue: #2769d7;
    --purple: #7c3aed;
    --orange: #c46d00;
    --red: #c43737
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif
}

.app-shell {
    min-height: 100vh
}

.sidebar {
    width: 258px;
    background: var(--sidebar);
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    padding: 22px 15px;
    display: flex;
    flex-direction: column;
    overflow-y: auto
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 9px
}

.sidebar-brand strong {
    display: block;
    font-size: 15px
}

.sidebar-brand small {
    display: block;
    color: #8f949d;
    font-size: 11px
}

.brand-icon {
    width: 39px;
    height: 39px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    color: #111;
    font-size: 19px
}

.workspace-chip {
    margin: 24px 4px 8px;
    padding: 11px;
    border: 1px solid #e6e8ec;
    background: #f5f6f8;
    border-radius: 13px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.workspace-chip small,
.workspace-chip strong {
    display: block
}

.workspace-chip small {
    color: #858b95;
    font-size: 10px;
    line-height: normal;
}

.workspace-chip strong {
    font-size: 12px;
    margin-top: 2px;
    max-width: 165px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #202329;
    line-height: normal;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2bd477;
    box-shadow: 0 0 0 4px rgba(43, 212, 119, .1);
    flex: none
}

.nav-section {
    font-size: 9px;
    letter-spacing: .12em;
    color: #666c76;
    font-weight: 700;
    padding: 9px 12px 5px
}

.nav-link {
    color: #131313;
    padding: 10px 12px;
    border-radius: 10px;
    margin: 2px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    text-decoration: none
}

.nav-link:hover,
.nav-link.active {
    background: #1370fe;
    color: #fff
}

.nav-link i {
    font-size: 16px
}

.sidebar-bottom {
    margin-top: auto
}

.support-card {
    border: 1px solid #272a31;
    background: #17191e;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 30px 4px 10px
}

.support-card i {
    font-size: 18px
}

.support-card strong,
.support-card small {
    display: block
}

.support-card strong {
    font-size: 11px;
    color: #858585;
}

.support-card small {
font-size: 15px;
    color: #ffffff;
    margin-top: 0px;
    line-height: normal;
    font-weight: bold;
}

.main-content {
    margin-left: 258px;
    width: calc(100% - 258px)
}

.topbar {
    height: 76px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 30px;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 900
}

.avatar {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    background: #f0f1f4;
    display: grid;
    place-items: center
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 9px
}

.user-menu strong,
.user-menu small {
    display: block
}

.user-menu strong {
    font-size: 12px
}

.user-menu small {
    font-size: 10px;
    color: #8b9098;
    margin-top: 2px
}

.content-wrap {
    padding: 28px 30px 60px;
    max-width: 1550px;
    margin: auto
}

.hero-card {
    background: linear-gradient(135deg, #111318, #1b1e24);
    color: #fff;
    border-radius: 20px;
    padding: 28px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    position: relative;
    box-shadow: 0 16px 40px rgba(17, 19, 24, .12)
}

.hero-card:after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    right: -100px;
    top: -130px
}

.hero-card h2 {
    font-size: 27px;
    margin: 8px 0
}

.hero-card p {
    color: #b7bbc2;
    margin: 0;
    max-width: 680px
}

.eyebrow {
    font-size: 11px;
    color: #c4c9d1;
    text-transform: uppercase;
    letter-spacing: .08em
}

.hero-icon {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    background: #24272e;
    display: grid;
    place-items: center;
    font-size: 38px;
    flex: none;
    z-index: 1
}

.stat-card,
.panel-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 17px;
    box-shadow: 0 5px 24px rgba(20, 25, 35, .035)
}

.stat-card {
    padding: 19px;
    display: flex;
    align-items: center;
    gap: 13px;
    height: 100%
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-size: 20px
}

.stat-icon.blue {
    background: #eaf2ff;
    color: var(--blue)
}

.stat-icon.green {
    background: #e9fbf2;
    color: var(--green)
}

.stat-icon.purple {
    background: #f3edff;
    color: var(--purple)
}

.stat-icon.orange {
    background: #fff2df;
    color: var(--orange)
}

.stat-card small {
    display: block;
    color: var(--muted);
    font-size: 11px
}

.stat-card strong {
    font-size: 24px;
    display: block;
    margin-top: 2px
}

.panel-card {
    padding: 20px
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 18px
}

.panel-head h3 {
    font-size: 15px;
    margin: 0;
    font-weight: 700
}

.panel-head p {
    font-size: 11px;
    color: var(--muted);
    margin: 4px 0 0
}

.chart-box {
    height: 285px
}

.mini-stat {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: #fafbfc
}

.mini-stat small {
    display: block;
    color: var(--muted);
    font-size: 10px
}

.mini-stat strong {
    display: block;
    font-size: 19px;
    margin-top: 4px
}

.quick-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px
}

.quick-grid a {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 13px;
    color: #30343a;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12px
}

.quick-grid a:hover {
    background: #f8f9fb
}

.quick-grid i {
    font-size: 17px
}

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700
}

.badge-soft.success {
    background: #e9f9f0;
    color: #13814e
}

.badge-soft.danger {
    background: #fff0f0;
    color: #c43737
}

.badge-soft.purple {
    background: #f3edff;
    color: #7040d6
}

.badge-soft.secondary {
    background: #f1f2f4;
    color: #666
}

.badge-soft.warning {
    background: #fff5dd;
    color: #a56600
}

.mini-pill {
    font-size: 10px;
    background: #f5f6f8;
    border: 1px solid #e8e9ed;
    padding: 4px 6px;
    border-radius: 7px;
    white-space: nowrap;
    display: inline-flex;
    margin: 2px 2px 2px 0
}

.table {
    --bs-table-bg: transparent
}

.table th {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #8a8f97;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    white-space: nowrap
}

.table td {
    font-size: 12px;
    border-color: #f0f1f3;
    vertical-align: middle
}

.table>tbody>tr:hover>* {
    background: #fafbfc
}

.form-control,
.form-select,
.input-group-text {
    border-color: #dfe2e7;
    border-radius: 10px;
    min-height: 40px
}

.input-group .input-group-text {
    border-radius: 10px 0 0 10px;
    background: #fff
}

.auth-bg {
    background: radial-gradient(circle at 20% 10%, #fff 0, #f5f6f8 45%, #eceef2 100%)
}

.auth-card {
    border-radius: 22px
}

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

.brand strong {
    display: block
}

.brand small {
    display: block;
    color: #8a8f97;
    font-size: 11px
}

.modal-content {
    border-radius: 18px !important
}

.btn {
    border-radius: 10px
}

.btn-dark {
    background: #111318;
    border-color: #111318
}

.btn-dark:hover {
    background: #25282e;
    border-color: #25282e
}

.dataTables_wrapper .dt-search input,
.dataTables_wrapper .dt-length select {
    border: 1px solid #dfe2e7;
    border-radius: 9px;
    padding: .4rem .6rem
}

.dataTables_wrapper {
    font-size: 12px
}

.dataTables_wrapper .dt-info {
    color: #777;
    font-size: 11px
}

.install-code {
    background: #111318;
    color: #dce1e8;
    border-radius: 12px;
    padding: 15px;
    font-size: 11px;
    line-height: 1.6;
    word-break: break-all
}

.filter-bar {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 14px
}

.empty-state {
    text-align: center;
    padding: 55px 20px;
    color: #777
}

.empty-state i {
    font-size: 35px;
    color: #a5aab2
}

.kpi-label {
    font-size: 10px;
    color: #858a92;
    text-transform: uppercase;
    letter-spacing: .06em
}

.mobile-backdrop {
    display: none
}

.menu-open {
    overflow: hidden
}

@media(max-width:991px) {
    .sidebar {
        transform: translateX(-105%);
        transition: .22s
    }

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

    .mobile-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .45);
        z-index: 1030;
        display: block;
        opacity: 0;
        visibility: hidden;
        transition: .2s
    }

    .mobile-backdrop.show {
        opacity: 1;
        visibility: visible
    }

    .main-content {
        margin-left: 0;
        width: 100%
    }

    .topbar {
        padding: 0 18px
    }

    .content-wrap {
        padding: 20px 16px 40px
    }

    .hero-card h2 {
        font-size: 23px
    }

    .hero-icon {
        display: none
    }
}

@media(max-width:575px) {
    .hero-card {
        padding: 22px
    }

    .quick-grid {
        grid-template-columns: 1fr
    }

    .content-wrap {
        padding-top: 16px
    }

    .table {
        min-width: 900px
    }

    .stat-card strong {
        font-size: 21px
    }
}

/* V11 Dashboard Analytics */
.trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    margin-top: 4px
}

.trend.up {
    color: #15945a
}

.trend.down {
    color: #c43737
}

.trend.neutral {
    color: #777
}

.chart-box-lg {
    height: 320px
}

.chart-box-device {
    height: 245px
}

.stat-icon-sm {
    width: 34px;
    height: 34px;
    font-size: 15px;
    border-radius: 10px
}

.metric-progress {
    margin-bottom: 18px
}

.metric-progress:last-child {
    margin-bottom: 0
}

.metric-progress .progress {
    height: 8px;
    background: #eef0f3;
    border-radius: 999px
}

.metric-progress .progress-bar {
    border-radius: 999px
}

.bar-blue {
    background: #2769d7 !important
}

.bar-green {
    background: #15945a !important
}

.bar-orange {
    background: #c46d00 !important
}

.bar-purple {
    background: #7c3aed !important
}

.filter-bar .form-label {
    margin-bottom: 6px;
    color: #4f555e
}

.filter-bar .form-select {
    background-color: #fff
}

.filter-bar {
    box-shadow: 0 4px 18px rgba(20, 25, 35, .025)
}

.cm-preview-wrap {
    background: #f1f2f4;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 14px;
    min-height: 430px
}

.cm-preview-browser {
    height: 32px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px
}

.cm-preview-browser>span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c9ccd2
}

.cm-preview-url {
    margin-left: 8px;
    flex: 1;
    background: #fff;
    border: 1px solid #e6e8ec;
    border-radius: 8px;
    text-align: center;
    color: #8a9098;
    font-size: 11px;
    padding: 5px
}

.cm-preview-page {
    height: 380px;
    background: linear-gradient(145deg, #fff, #f7f8fa);
    border: 1px solid #e6e8ec;
    border-radius: 16px;
    position: relative;
    overflow: hidden
}

.cm-preview-nav {
    height: 38px;
    border-bottom: 1px solid #edf0f2;
    background: #fff
}

.cm-preview-lines {
    padding: 30px
}

.cm-preview-lines i {
    display: block;
    height: 10px;
    background: #e8eaed;
    border-radius: 6px;
    margin-bottom: 12px;
    width: 55%
}

.cm-preview-lines i:nth-child(2) {
    width: 80%
}

.cm-preview-lines i:nth-child(3) {
    width: 65%
}

.cm-preview-lines i:nth-child(4) {
    width: 42%
}

.cm-preview-banner {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    padding: 18px;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .15);
    border-radius: 18px;
    color: #111
}

.cm-preview-logo {
    display: none;
    width: 80px;
    height: 24px;
    background: center/contain no-repeat;
    margin-bottom: 8px
}

.cm-preview-banner strong {
    display: block;
    font-size: 14px
}

.cm-preview-banner p {
    font-size: 11px;
    line-height: 1.5;
    color: #737982;
    margin: 6px 0 12px
}

.cm-preview-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px
}

.cm-preview-actions button {
    border: 1px solid #ddd;
    background: #fff;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600
}

.cm-preview-actions button:last-child {
    background: #111;
    color: #fff;
    border-color: #111
}

.cm-preview-launcher {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .15);
    display: grid;
    place-items: center;
    font-size: 18px
}

.report-bars {
    height: 190px;
    display: flex;
    align-items: flex-end;
    gap: 5px;
    overflow-x: auto;
    padding: 10px 4px 0
}

.report-bar-wrap {
    min-width: 26px;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 6px
}

.report-bar {
    width: 100%;
    max-width: 24px;
    border-radius: 8px 8px 3px 3px;
    background: #111
}

.report-bar-wrap span {
    font-size: 10px;
    color: #8b8f98;
    white-space: nowrap
}

.stat-card {
    height: 100%;
    padding: 20px;
    border: 1px solid #e8e9ed;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 30px rgba(20, 20, 30, .04)
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: #f2f3f5;
    display: grid;
    place-items: center;
    margin-bottom: 12px
}

.stat-label {
    font-size: 12px;
    color: #737780
}

.stat-value {
    font-size: 28px;
    font-weight: 750;
    letter-spacing: -.03em;
    margin-top: 4px
}

.analytics-insight-card {
    background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%)
}

.insight-tile {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff
}

.insight-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    flex: none;
    font-size: 17px
}

.insight-icon.blue {
    background: #eaf2ff;
    color: var(--blue)
}

.insight-icon.green {
    background: #e9fbf2;
    color: var(--green)
}

.insight-icon.purple {
    background: #f3edff;
    color: var(--purple)
}

.insight-icon.orange {
    background: #fff2df;
    color: var(--orange)
}

.insight-tile small,
.insight-tile span {
    display: block;
    color: var(--muted);
    font-size: 10px
}

.insight-tile strong {
    display: block;
    font-size: 18px;
    line-height: 1.2;
    margin: 3px 0
}

.insight-tile .insight-country {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px
}

.analytics-row {
    margin-bottom: 15px
}

.analytics-row:last-child {
    margin-bottom: 0
}

.analytics-row .progress {
    height: 7px;
    background: #eef0f3;
    border-radius: 999px;
    margin-top: 7px
}

.analytics-row .progress-bar {
    border-radius: 999px
}