:root {
    --navy: #061b3a;
    --navy2: #032b59;
    --blue: #0969f5;
    --cyan: #13b8d0;
    --green: #16a45b;
    --red: #e53935;
    --text: #12213a;
    --muted: #657186;
    --line: #dde4ee;
    --bg: #f5f8fc;
    --card: #fff;
    --shadow: 0 3px 16px #112c520f;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 14px;
}

body {
    background: var(--bg);
    color: var(--text);
    margin: 0;
    font-family: Inter, Arial, sans-serif;
}

button,
input,
select {
    font: inherit;
}

button,
a {
    transition: all 0.18s;
}

a {
    color: var(--blue);
    text-decoration: none;
}

.sidebar {
    background: linear-gradient(180deg, var(--navy), #021934);
    color: #fff;
    z-index: 20;
    flex-direction: column;
    width: 240px;
    padding: 22px 10px;
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
}

.brand {
    color: #fff;
    align-items: center;
    gap: 10px;
    padding: 0 14px 28px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
}

    .brand b {
        color: #16a4ff;
    }

.brand-mark {
    color: #159eff;
    border: 4px solid #159eff;
    border-radius: 50%;
    place-items: center;
    width: 34px;
    height: 34px;
    display: grid;
}

.sidebar nav {
    gap: 7px;
    display: grid;
}

    .sidebar nav a {
        color: #eaf1fb;
        border-radius: 10px;
        align-items: center;
        gap: 14px;
        height: 51px;
        padding: 0 16px;
        font-size: 14px;
        display: flex;
    }

        .sidebar nav a span {
            text-align: center;
            width: 24px;
            font-size: 22px;
        }

        .sidebar nav a:hover,
        .sidebar nav a.active {
            color: #fff;
            background: linear-gradient(90deg, #104384, #075bbf);
            box-shadow: inset 3px 0 #23b9ff;
        }

.collapse {
    color: #fff;
    background: #0c315c;
    border: 1px solid #355271;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    margin: auto auto 0;
    font-size: 25px;
}

.shell {
    min-height: 100vh;
    margin-left: 240px;
}

.topbar {
    border-bottom: 1px solid var(--line);
    z-index: 10;
    background: #fff;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 78px;
    padding: 14px 28px;
    display: flex;
    position: sticky;
    top: 0;
}

    .topbar h1 {
        letter-spacing: -0.6px;
        margin: 0;
        font-size: 24px;
    }

    .topbar p {
        color: var(--muted);
        margin: 4px 0 0;
    }

.top-actions {
    align-items: center;
    gap: 12px;
    display: flex;
}

.select-btn,
.icon-btn,
.profile {
    border: 1px solid var(--line);
    height: 44px;
    color: var(--text);
    background: #fff;
    border-radius: 8px;
}

.select-btn {
    justify-content: space-around;
    align-items: center;
    min-width: 164px;
    padding: 0 14px;
    display: flex;
}

.icon-btn {
    border: 0;
    width: 42px;
    font-size: 20px;
    position: relative;
}

    .icon-btn i {
        background: var(--blue);
        border-radius: 50%;
        width: 8px;
        height: 8px;
        position: absolute;
        top: 8px;
        right: 8px;
    }

.profile {
    border: 0;
    align-items: center;
    gap: 10px;
    display: flex;
}

    .profile span {
        background: var(--blue);
        color: #fff;
        border-radius: 50%;
        place-items: center;
        width: 40px;
        height: 40px;
        display: grid;
    }

.mobile-menu {
    background: 0 0;
    border: 0;
    font-size: 25px;
    display: none;
}

.content {
    max-width: 1800px;
    margin: auto;
    padding: 22px 28px 40px;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: 12px;
    padding: 18px;
}

    .card h2 {
        margin: 0;
        font-size: 17px;
    }

.card-head {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    display: flex;
}

.stats-grid,
.mini-stats {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
    display: grid;
}

.stat {
    border: 1px solid var(--line);
    min-height: 128px;
    box-shadow: var(--shadow);
    background: #fff;
    border-radius: 12px;
    align-items: center;
    gap: 16px;
    padding: 20px;
    display: flex;
}

.stat-icon {
    border-radius: 50%;
    place-items: center;
    width: 58px;
    height: 58px;
    font-size: 27px;
    display: grid;
}

.blue {
    color: var(--blue);
    background: #eaf3ff;
}

.green {
    color: var(--green);
    background: #e9f9ef;
}

.purple {
    color: #7445e7;
    background: #f2eafe;
}

.orange {
    color: #f47a15;
    background: #fff1e5;
}

.cyan {
    color: #079db8;
    background: #e2f9fc;
}

.red {
    color: var(--red);
    background: #ffe9eb;
}

.stat div {
    gap: 6px;
    display: grid;
}

.stat small,
.mini-stats small {
    color: var(--muted);
}

.stat strong {
    font-size: 28px;
}

.stat em {
    font-size: 12px;
    font-style: normal;
}

.up,
.ok {
    color: var(--green) !important;
}

.down,
.bad {
    color: var(--red) !important;
}

.grid-2 {
    grid-template-columns: 2fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
    display: grid;
}

.charts-row .card {
    min-height: 320px;
}

.segmented {
    display: flex;
}

    .segmented button {
        border: 1px solid var(--line);
        color: var(--muted);
        background: #fff;
        padding: 8px 13px;
    }

        .segmented button:first-child {
            border-radius: 7px 0 0 7px;
        }

        .segmented button:last-child {
            border-radius: 0 7px 7px 0;
        }

    .segmented .active {
        color: var(--blue);
        background: #f3f7ff;
    }

.line-chart {
    width: 100%;
    height: 245px;
}

.donut-wrap {
    justify-content: center;
    align-items: center;
    gap: 35px;
    height: 250px;
    display: flex;
}

.donut {
    place-items: center;
    display: grid;
    position: relative;
}

    .donut:after {
        content: "";
        background: #fff;
        border-radius: 50%;
        position: absolute;
        inset: 31%;
    }

.donut-wrap ul {
    gap: 18px;
    min-width: 140px;
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
}

.donut-wrap li {
    grid-template-columns: 12px 1fr auto;
    gap: 8px;
    display: grid;
}

    .donut-wrap li i {
        border-radius: 50%;
        width: 10px;
        height: 10px;
        margin-top: 3px;
    }

.c1 {
    background: var(--blue);
}

.c2 {
    background: var(--cyan);
}

.c3 {
    background: #5757de;
}

.c4 {
    background: #a764e8;
}

.table-wrap {
    overflow: auto;
}

table {
    border-collapse: collapse;
    white-space: nowrap;
    width: 100%;
}

th,
td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 13px 10px;
    font-size: 12px;
}

th {
    color: #344156;
    background: #fbfcfe;
    font-weight: 600;
}

.badge {
    border-radius: 20px;
    padding: 6px 10px;
    font-weight: 500;
    display: inline-flex;
}

.success {
    color: #168b4e;
    background: #e7f8ed;
}

.info {
    color: #0867dc;
    background: #e9f3ff;
}

.muted {
    color: #677184;
    background: #eef1f5;
}

.danger-bg {
    color: #d62e2e;
    background: #ffe9e9;
}

.branch-list > div {
    border-bottom: 1px solid var(--line);
    grid-template-columns: 42px 1fr 10px auto 35px 15px;
    align-items: center;
    gap: 8px;
    padding: 14px 0;
    display: grid;
}

.branch-icon {
    width: 38px;
    height: 38px;
    color: var(--blue);
    background: #eaf3ff;
    border-radius: 50%;
    place-items: center;
    font-size: 20px;
    display: grid;
}

.status-dot {
    background: var(--green);
    border-radius: 50%;
    width: 9px;
    height: 9px;
}

.toolbar,
.page-actions,
.report-actions {
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    display: flex;
}

.search {
    border: 1px solid var(--line);
    border-radius: 8px;
    align-items: center;
    min-width: 300px;
    height: 42px;
    margin-right: auto;
    padding: 0 12px;
    display: flex;
}

    .search input {
        background: 0 0;
        border: 0;
        outline: 0;
        width: 100%;
        padding: 8px;
    }

.btn {
    cursor: pointer;
    border: 1px solid #0000;
    border-radius: 7px;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-height: 41px;
    padding: 0 15px;
    display: inline-flex;
}

    .btn:hover {
        transform: translateY(-1px);
    }

.primary {
    background: var(--blue);
    color: #fff;
}

.outline {
    color: #175596;
    background: #fff;
    border-color: #9db7dc;
}

.danger {
    color: var(--red);
    background: #fff;
    border-color: #ff7a7a;
}

.excel {
    color: #167a3f;
    background: #fff;
    border-color: #41a86c;
}

.data-card {
    padding: 0;
}

    .data-card > .card-head,
    .data-card > .toolbar {
        margin: 0;
        padding: 16px 18px;
    }

.more {
    background: #f5f7fb;
    border: 0;
    border-radius: 6px;
    padding: 7px 10px;
}

.pager {
    justify-content: space-between;
    padding: 14px 18px;
    display: flex;
}

    .pager button {
        border: 1px solid var(--line);
        background: #fff;
        border-radius: 6px;
        width: 34px;
        height: 34px;
    }

        .pager button.active {
            border-color: var(--blue);
            color: var(--blue);
        }

.with-drawer {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    display: grid;
}

.user-drawer {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #fff;
    border-radius: 12px;
    padding: 20px;
}

    .user-drawer h2 {
        justify-content: space-between;
        margin: 0;
        display: flex;
    }

        .user-drawer h2 button {
            background: 0 0;
            border: 0;
            font-size: 22px;
        }

    .user-drawer section {
        border: 1px solid var(--line);
        border-radius: 8px;
        margin-top: 14px;
        padding: 13px;
    }

    .user-drawer h3 {
        margin: 0 0 12px;
        font-size: 13px;
    }

    .user-drawer section p {
        color: #3c485b;
        justify-content: space-between;
        display: flex;
    }

.drawer-actions,
.two-buttons {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    display: grid;
}

.person {
    align-items: center;
    gap: 8px;
    display: flex;
}

    .person > span {
        width: 32px;
        height: 32px;
        color: var(--blue);
        background: #e9f2ff;
        border-radius: 50%;
        place-items: center;
        display: grid;
    }

.mini-stats > div {
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #fff;
    border-radius: 12px;
    gap: 10px;
    min-height: 100px;
    padding: 20px;
    display: grid;
}

.mini-stats b {
    color: var(--blue);
    font-size: 26px;
}

.branch-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 18px;
    display: grid;
}

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

    .branch-title div {
        flex: 1;
    }

    .branch-title h2 {
        margin-bottom: 5px;
    }

    .branch-title small {
        color: var(--muted);
    }

.branch-numbers {
    border-block: 1px solid var(--line);
    grid-template-columns: 1fr 1fr;
    margin: 16px 0;
    padding: 13px 0;
    display: grid;
}

    .branch-numbers div {
        gap: 5px;
        display: grid;
    }

    .branch-numbers b {
        color: var(--blue);
        font-size: 21px;
    }

.sparkline {
    align-items: end;
    gap: 8px;
    height: 50px;
    display: flex;
}

    .sparkline i {
        background: #87baff;
        border-radius: 4px 4px 0 0;
        flex: 1;
        height: 35%;
    }

        .sparkline i:nth-child(2n) {
            height: 58%;
        }

        .sparkline i:nth-child(5) {
            height: 80%;
        }

.traffic {
    color: #1670df;
}

    .traffic span {
        float: right;
        color: var(--green);
    }

.device-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 16px;
    display: grid;
}

.health select {
    border: 1px solid var(--line);
    border-radius: 7px;
    width: 100%;
    height: 44px;
    padding: 0 10px;
}

.health > p {
    color: var(--muted);
}

.meter {
    margin: 25px 0;
}

    .meter span {
        justify-content: space-between;
        display: flex;
    }

    .meter i {
        background: linear-gradient( 90deg, var(--blue) var(--value), #dce2ea var(--value) );
        border-radius: 8px;
        height: 8px;
        margin-top: 10px;
        display: block;
    }

.uptime {
    gap: 8px;
    margin: 25px 0;
    display: grid;
}

.methods-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
    display: grid;
}

.method-card {
    min-height: 150px;
}

.method-head {
    align-items: center;
    gap: 12px;
    display: flex;
}

    .method-head h2 {
        flex: 1;
    }

.method-icon {
    width: 46px;
    height: 46px;
    color: var(--blue);
    background: #eaf3ff;
    border-radius: 9px;
    place-items: center;
    font-size: 22px;
    font-weight: 700;
    display: grid;
}

.method-card p {
    color: var(--muted);
    margin-left: 58px;
}

.method-card > .btn {
    float: right;
}

.switch {
    align-items: center;
    gap: 7px;
    display: flex;
}

    .switch input {
        display: none;
    }

    .switch i {
        background: #b8c1cd;
        border-radius: 20px;
        width: 40px;
        height: 23px;
        position: relative;
    }

        .switch i:before {
            content: "";
            background: #fff;
            border-radius: 50%;
            width: 19px;
            height: 19px;
            transition: all 0.2s;
            position: absolute;
            top: 2px;
            left: 2px;
        }

    .switch input:checked + i {
        background: var(--blue);
    }

        .switch input:checked + i:before {
            left: 19px;
        }

.priority {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    display: grid;
}

    .priority p {
        color: var(--muted);
    }

.sortable {
    padding: 0;
    list-style: none;
}

    .sortable li {
        border: 1px solid var(--line);
        border-radius: 7px;
        grid-template-columns: 35px 35px 1fr 20px;
        align-items: center;
        margin-bottom: 6px;
        padding: 12px;
        display: grid;
    }

        .sortable li b {
            width: 28px;
            height: 28px;
            color: var(--blue);
            background: #eaf3ff;
            border-radius: 50%;
            place-items: center;
            display: grid;
        }

.portal {
    color: #fff;
    text-align: center;
    background: linear-gradient(135deg, #061b3a, #0e3766);
    border-radius: 12px;
    margin-top: 15px;
    padding: 20px;
}

    .portal h3 {
        margin: 0;
    }

    .portal small {
        margin: 5px 0 15px;
        display: block;
    }

    .portal button {
        text-align: left;
        background: #fff;
        border: 0;
        border-radius: 5px;
        width: 100%;
        height: 36px;
        margin: 7px 0;
        padding: 0 12px;
        display: block;
    }

.report-actions {
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    display: flex;
}

.report-date-button {
    cursor: pointer;
    justify-content: space-between;
    gap: 10px;
    min-width: 245px;
}

.report-grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 16px;
    display: grid;
}

    .report-grid .wide {
        grid-column: auto;
    }

    .report-grid canvas {
        height: 245px;
    }

.report-stats em {
    width: max-content;
    color: var(--green);
    background: #e9f9ef;
    border-radius: 15px;
    align-items: center;
    gap: 4px;
    padding: 4px 7px;
    font-size: 10px;
    font-style: normal;
    display: inline-flex;
}

.bars {
    justify-content: space-around;
    align-items: end;
    gap: 15px;
    height: 240px;
    padding-top: 25px;
    display: flex;
}

    .bars > div {
        flex-direction: column;
        justify-content: end;
        align-items: center;
        gap: 6px;
        height: 100%;
        display: flex;
    }

    .bars i {
        width: 55px;
        height: var(--h);
        background: linear-gradient(#1976ff, #075ccd);
        border-radius: 5px 5px 0 0;
        display: block;
    }

.heatmap-card {
    grid-column: span 2;
}

.heatmap {
    grid-template-columns: repeat(12, 1fr);
    gap: 4px;
    margin-top: 25px;
    display: grid;
}

    .heatmap i {
        background: color-mix(in srgb, var(--blue) var(--heat), #edf4ff);
        border-radius: 2px;
        height: 22px;
    }

.heat-labels {
    color: var(--muted);
    justify-content: space-between;
    margin-top: 10px;
    display: flex;
}

.settings-tabs {
    z-index: 8;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    align-items: center;
    gap: 15px;
    min-height: 64px;
    margin: -5px 0 20px;
    padding: 0;
    display: flex;
    position: sticky;
    top: 78px;
}

.settings-tab-list {
    flex: 1 1 auto;
    align-items: stretch;
    gap: 28px;
    min-width: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: #b9c7d9 transparent;
}

    .settings-tab-list::-webkit-scrollbar {
        height: 4px;
    }

    .settings-tab-list::-webkit-scrollbar-thumb {
        background: #b9c7d9;
        border-radius: 10px;
    }

    .settings-tab-list > button {
        color: #3e4758;
        white-space: nowrap;
        cursor: pointer;
        background: 0 0;
        border: 0;
        border-bottom: 2px solid #0000;
        flex-shrink: 0;
        min-height: 63px;
        padding: 20px 2px 17px;
        font-size: 12px;
    }

        .settings-tab-list > button:hover {
            color: var(--blue);
        }

        .settings-tab-list > button.active {
            color: var(--blue);
            border-bottom-color: var(--blue);
        }

.save-settings {
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.settings-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
    align-items: start;
    gap: 20px;
    display: grid;
}

.settings-content {
    min-width: 0;
}

    .settings-content [hidden] {
        display: none !important;
    }

.settings-form {
    gap: 11px;
    padding: 22px;
    display: block;
}

.settings-section-head {
    border-bottom: 1px solid var(--line);
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    display: flex;
}

    .settings-section-head h2 {
        margin: 0;
    }

    .settings-section-head p {
        color: var(--muted);
        margin: 6px 0 0;
        line-height: 1.5;
    }

.settings-status {
    color: var(--green);
    background: #e9f9ef;
    border-radius: 20px;
    flex-shrink: 0;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    font-size: 10px;
    display: inline-flex;
}

.settings-fields {
    grid-template-columns: 1fr 1fr;
    gap: 17px 20px;
    display: grid;
}

.form-field {
    gap: 7px;
    min-width: 0;
    display: grid;
}

    .form-field > span {
        color: #344156;
        font-size: 11px;
        font-weight: 600;
    }

    .form-field input,
    .form-field select,
    .form-field textarea {
        width: 100%;
        min-width: 0;
        height: 43px;
        color: var(--text);
        border: 1px solid var(--line);
        background: #fff;
        border-radius: 7px;
        outline: none;
        padding: 0 12px;
        transition: border-color 0.18s, box-shadow 0.18s;
    }

    .form-field textarea {
        resize: vertical;
        height: auto;
        min-height: 82px;
        font: inherit;
        padding-block: 11px;
    }

        .form-field input:focus,
        .form-field select:focus,
        .form-field textarea:focus {
            border-color: #6da9ef;
            box-shadow: 0 0 0 3px #0969f51a;
        }

.field-full {
    grid-column: 1/-1;
}

.input-with-icon {
    position: relative;
}

    .input-with-icon > span {
        z-index: 1;
        color: var(--muted);
        position: absolute;
        top: 50%;
        left: 12px;
        transform: translateY(-50%);
    }

    .input-with-icon input {
        padding-left: 35px;
    }

.logo-upload {
    border-top: 1px solid var(--line);
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
    gap: 20px;
    margin-top: 25px;
    padding-top: 22px;
    display: grid;
}

.logo-label {
    flex-direction: column;
    gap: 5px;
    display: flex;
}

    .logo-label small {
        color: var(--muted);
        font-size: 10px;
        line-height: 1.4;
    }

.logo-preview {
    align-items: center;
    gap: 15px;
    display: flex;
}

.logo-box {
    border: 1px dashed #aebbd0;
    border-radius: 9px;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    font-size: 35px;
}

.logo-actions {
    align-items: center;
    gap: 8px;
    display: flex;
}

.logo-upload-button {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .logo-upload-button input {
        opacity: 0;
        pointer-events: none;
        width: 1px;
        height: 1px;
        position: absolute;
    }

.logo-remove {
    min-height: 40px;
    color: var(--muted);
    background: 0 0;
}

.settings-form-footer {
    border-top: 1px solid var(--line);
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 24px;
    padding-top: 18px;
    display: flex;
}

    .settings-form-footer small {
        color: var(--muted);
    }

.settings-side .card {
    padding: 19px;
}

.side-card-head {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    display: flex;
}

    .side-card-head h2 {
        margin: 0;
    }

.package-status {
    color: var(--green);
    background: #e9f9ef;
    border-radius: 15px;
    padding: 5px 8px;
    font-size: 9px;
}

.package-name {
    color: #fff;
    background: linear-gradient(135deg, #075ccd, #119bd4);
    border-radius: 9px;
    align-items: center;
    gap: 11px;
    margin: 17px 0;
    padding: 14px;
    display: flex;
}

    .package-name > span {
        font-size: 25px;
    }

    .package-name small {
        color: #dbeaff;
        font-size: 9px;
    }

    .package-name h3 {
        color: #fff;
        margin: 3px 0 0;
        font-size: 17px;
    }

.package-limits {
    gap: 8px;
    display: grid;
}

    .package-limits > div {
        background: #f6f9fd;
        border-radius: 7px;
        grid-template-columns: 25px 1fr auto;
        align-items: center;
        gap: 8px;
        padding: 10px;
        display: grid;
    }

        .package-limits > div > span {
            color: var(--blue);
            font-size: 17px;
        }

    .package-limits small {
        color: var(--muted);
    }

    .package-limits b {
        font-size: 11px;
    }

.package-renewal {
    border-top: 1px solid var(--line);
    align-items: center;
    gap: 10px;
    margin: 15px 0;
    padding-top: 15px;
    display: flex;
}

    .package-renewal > span {
        color: var(--blue);
        font-size: 20px;
    }

    .package-renewal > div {
        flex-direction: column;
        gap: 3px;
        display: flex;
    }

    .package-renewal small {
        color: var(--muted);
        font-size: 9px;
    }

    .package-renewal b {
        font-size: 11px;
    }

.side-card-button {
    width: 100%;
}

.edit-icon-button {
    width: 30px;
    height: 30px;
    color: var(--blue);
    cursor: pointer;
    background: #edf5ff;
    border: 0;
    border-radius: 6px;
    place-items: center;
    display: grid;
}

.person.large {
    margin: 18px 0;
}

    .person.large > div {
        flex-direction: column;
        gap: 4px;
        display: flex;
    }

    .person.large small {
        color: var(--muted);
        font-size: 10px;
    }

.contact-details {
    gap: 9px;
    margin-bottom: 16px;
    display: grid;
}

    .contact-details a {
        min-width: 0;
        color: var(--text);
        white-space: nowrap;
        text-overflow: ellipsis;
        align-items: center;
        gap: 8px;
        font-size: 10px;
        display: flex;
        overflow: hidden;
    }

        .contact-details a span {
            color: var(--blue);
        }

.danger-zone {
    background: snow;
    border-color: #ffcaca;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    display: grid;
}

.danger-icon {
    width: 36px;
    height: 36px;
    color: var(--red);
    background: #ffe9e9;
    border-radius: 50%;
    place-items: center;
    font-weight: 700;
    display: grid;
}

.danger-zone h2 {
    margin: 0;
}

.danger-zone p {
    color: var(--muted);
    margin: 6px 0 0;
    font-size: 10px;
    line-height: 1.5;
}

.danger-zone .side-card-button {
    grid-column: 1/-1;
}

.settings-placeholder {
    text-align: center;
    align-content: center;
    place-items: center;
    gap: 10px;
    min-height: 430px;
    display: grid;
}

    .settings-placeholder > span {
        color: var(--blue);
        font-size: 42px;
    }

    .settings-placeholder p {
        max-width: 430px;
        color: var(--muted);
        margin: 0;
    }

@media (width<=1150px) {
    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-side {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (width<=850px) {
    .settings-tabs {
        top: 69px;
    }

    .settings-tab-list {
        gap: 20px;
    }

    .save-settings {
        padding-inline: 12px;
    }

        .save-settings span {
            display: none;
        }

    .settings-side {
        grid-template-columns: 1fr;
    }
}

@media (width<=620px) {
    .settings-tabs {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding-bottom: 10px;
    }

    .settings-tab-list {
        width: 100%;
        gap: 18px;
    }

        .settings-tab-list > button {
            min-height: 44px;
            padding-block: 13px 10px;
        }

    .save-settings {
        width: 100%;
    }

    .settings-fields {
        grid-template-columns: 1fr;
    }

    .field-full {
        grid-column: auto;
    }

    .settings-section-head {
        flex-direction: column;
    }

    .logo-upload {
        grid-template-columns: 1fr;
    }

    .logo-preview,
    .logo-actions {
        flex-wrap: wrap;
    }

    .settings-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

        .settings-form-footer .btn {
            width: 100%;
        }
}

.settings-form label {
    grid-template-columns: 180px 1fr;
    align-items: center;
    display: grid;
}

.settings-form input,
.settings-form select {
    border: 1px solid var(--line);
    height: 42px;
    color: var(--text);
    background: #fff;
    border-radius: 6px;
    padding: 0 12px;
}

.logo-upload {
    align-items: center;
    gap: 20px;
    margin-top: 8px;
    display: flex;
}

    .logo-upload > span {
        width: 160px;
    }

.logo-box {
    color: #1261c8;
    border: 1px dashed #aebbd0;
    place-items: center;
    width: 80px;
    height: 80px;
    font-family: serif;
    font-size: 45px;
    display: grid;
}

.settings-side {
    gap: 16px;
    display: grid;
}

.package h3 {
    color: var(--blue);
    font-size: 20px;
}

.package .btn,
.contact .btn,
.danger-zone .btn {
    width: 100%;
}

.person.large > span {
    width: 55px;
    height: 55px;
    font-size: 20px;
}

.person.large div {
    gap: 5px;
    display: grid;
}

.person.large small {
    color: var(--blue);
}

.danger-zone h2 {
    color: var(--red);
}

.toast {
    z-index: 50;
    color: #fff;
    opacity: 0;
    pointer-events: none;
    background: #10243f;
    border-radius: 8px;
    padding: 13px 18px;
    position: fixed;
    bottom: 25px;
    right: 25px;
    transform: translateY(15px);
}

    .toast.show {
        opacity: 1;
        transform: translateY(0);
    }

@media (width<=1200px) {
    .hide-tablet {
        display: none;
    }

    .stats-grid,
    .mini-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .branch-grid {
        grid-template-columns: 1fr;
    }

    .report-grid {
        grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
        gap: 18px;
        display: grid;
    }

    report-grid .card {
        min-width: 0;
    }

    .report-trend-card {
        grid-column: 1;
    }

    .branch-traffic-card {
        grid-column: 2;
    }

    .report-donut-card {
        grid-column: 1;
    }

    .active-users {
        grid-column: 2;
    }

    .heatmap-card {
        grid-column: 1/-1;
    }

    .methods-grid,
    .with-drawer {
        grid-template-columns: 1fr;
    }

    .user-drawer {
        display: none;
    }

    .settings-layout {
        grid-template-columns: 1fr;
    }

    .settings-side {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (width<=850px) {
    .sidebar {
        transition: all 0.25s;
        transform: translate(-100%);
    }

        .sidebar.open {
            transform: translate(0);
        }

    .shell {
        margin-left: 0;
    }

    .mobile-menu {
        display: block;
    }

    .topbar {
        padding: 12px 16px;
    }

        .topbar h1 {
            font-size: 20px;
        }

    .top-actions .select-btn,
    .profile b {
        display: none;
    }

    .content {
        padding: 16px;
    }

    .grid-2,
    .priority,
    .device-layout,
    .settings-side {
        grid-template-columns: 1fr;
    }

    .report-actions {
        justify-content: flex-start;
        margin: 0 0 15px;
        overflow: auto;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

        .report-grid .wide,
        .heatmap-card {
            grid-column: auto;
        }

    .settings-tabs {
        gap: 15px;
    }

        .settings-tabs .save-settings,
        .method-card p {
            margin-left: 0;
        }
}

@media (width<=560px) {
    .stats-grid,
    .mini-stats {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .stat {
        gap: 8px;
        min-height: 100px;
        padding: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .stat strong {
        font-size: 20px;
    }

    .mini-stats > div {
        min-height: 80px;
        padding: 13px;
    }

    .mini-stats b {
        font-size: 21px;
    }

    .top-actions {
        gap: 4px;
    }

    .profile span {
        width: 35px;
        height: 35px;
    }

    .content {
        padding: 12px;
    }

    .donut-wrap {
        gap: 15px;
    }

    .donut {
        width: 130px;
    }

    .settings-form label {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .logo-upload {
        flex-wrap: wrap;
    }

        .logo-upload > span {
            width: 100%;
        }

    .toolbar {
        flex-wrap: wrap;
    }

    .search {
        order: -1;
        min-width: 100%;
    }

    .page-actions {
        margin-top: 0;
    }
}

/* Settings inner panels */
.settings-option-list {
    border-top: 1px solid var(--line);
    margin-top: 24px;
    display: grid;
}

    .settings-option-list > label {
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center;
        gap: 20px;
        padding: 16px 0;
        border-bottom: 1px solid var(--line);
    }

        .settings-option-list > label > div {
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

    .settings-option-list small {
        color: var(--muted);
        font-size: 10px;
    }

.color-field,
.input-suffix,
.api-key-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .color-field input[type="color"] {
        flex: 0 0 48px;
        width: 48px;
        padding: 4px;
        cursor: pointer;
    }

    .color-field input:last-child,
    .input-suffix input,
    .api-key-field input {
        flex: 1;
    }

.input-suffix {
    position: relative;
}

    .input-suffix input {
        padding-right: 58px;
    }

    .input-suffix > span {
        position: absolute;
        right: 12px;
        color: var(--muted);
        font-size: 10px;
        pointer-events: none;
    }

.notification-table {
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}

.notification-head,
.notification-row {
    grid-template-columns: minmax(180px, 1fr) 75px 75px 75px;
    align-items: center;
    display: grid;
}

.notification-head {
    padding: 12px 15px;
    background: #f5f8fc;
    color: #344156;
    font-size: 10px;
}

    .notification-head b:not(:first-child),
    .notification-row input {
        justify-self: center;
    }

.notification-row {
    min-height: 51px;
    padding: 8px 15px;
    border-top: 1px solid var(--line);
    font-size: 11px;
}

    .notification-row input {
        width: 17px;
        height: 17px;
        accent-color: var(--blue);
    }

.permission-list {
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}

.permission-user {
    grid-template-columns: 42px minmax(150px, 1fr) 180px 75px 34px;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 11px 14px;
    display: grid;
    border-bottom: 1px solid var(--line);
}

    .permission-user:last-child {
        border-bottom: 0;
    }

.permission-avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eaf3ff;
    color: var(--blue);
    font-size: 11px;
    font-weight: 700;
}

.permission-user > div {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.permission-user small {
    color: var(--muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
}

.permission-user select {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 0 9px;
    background: #fff;
}

.integration-grid {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    display: grid;
}

.integration-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
}

.integration-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--blue);
    background: #eaf3ff;
    font-size: 20px;
    font-weight: 700;
}

    .integration-icon.facebook {
        color: #1877f2;
    }

    .integration-icon.google {
        color: #4285f4;
    }

    .integration-icon.webhook {
        color: #7b4ce2;
        background: #f2eafe;
    }

.integration-card h3 {
    margin: 0;
    font-size: 13px;
}

.integration-card p {
    margin: 5px 0 7px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.4;
}

.integration-state {
    font-size: 9px;
}

    .integration-state.connected {
        color: var(--green);
    }

    .integration-state.disconnected {
        color: var(--muted);
    }

.integration-api {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.api-key-field .btn {
    flex-shrink: 0;
}

@media (width<=900px) {
    .integration-grid {
        grid-template-columns: 1fr;
    }

    .permission-user {
        grid-template-columns: 42px minmax(130px, 1fr) 150px 34px;
    }

        .permission-user .badge {
            display: none;
        }
}

@media (width<=620px) {
    .notification-table {
        overflow-x: auto;
    }

    .notification-head,
    .notification-row {
        min-width: 520px;
    }

    .permission-list {
        overflow-x: auto;
    }

    .permission-user {
        min-width: 620px;
    }

    .integration-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

        .integration-card .btn {
            grid-column: 1 / -1;
            width: 100%;
        }

    .api-key-field {
        align-items: stretch;
        flex-direction: column;
    }
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    border: 1px solid var(--line);
    z-index: 50;
    background: #fff;
    border-radius: 10px;
    min-width: 210px;
    padding: 8px;
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    box-shadow: 0 16px 42px #081f412e;
}

.dropdown.open .dropdown-menu {
    display: grid;
}

.dropdown-menu button,
.dropdown-menu a {
    color: var(--text);
    text-align: left;
    cursor: pointer;
    background: #fff;
    border: 0;
    border-radius: 7px;
    padding: 11px 12px;
}

    .dropdown-menu button:hover,
    .dropdown-menu a:hover {
        color: var(--blue);
        background: #edf5ff;
    }

.notifications {
    width: 330px;
}

    .notifications h3 {
        justify-content: space-between;
        margin: 0;
        padding: 8px 10px;
        display: flex;
    }

        .notifications h3 span {
            color: var(--blue);
            font-size: 11px;
        }

    .notifications a {
        border-top: 1px solid var(--line);
        display: grid;
    }

    .notifications small,
    .profile-menu small {
        color: var(--muted);
        margin-top: 4px;
    }

.profile-menu > div {
    border-bottom: 1px solid var(--line);
    padding: 10px 12px;
    display: grid;
}

.modal-backdrop {
    z-index: 100;
    background: #0412278c;
    place-items: center;
    padding: 20px;
    display: none;
    position: fixed;
    inset: 0;
}

    .modal-backdrop.open {
        display: grid;
    }

.modal {
    background: #fff;
    border-radius: 14px;
    width: min(520px, 100%);
    padding: 24px;
    position: relative;
    box-shadow: 0 30px 70px #00000040;
}

.modal-close {
    background: 0 0;
    border: 0;
    font-size: 26px;
    position: absolute;
    top: 10px;
    right: 14px;
}

.modal [data-modal-body] {
    color: var(--muted);
    min-height: 80px;
    padding: 15px 0;
}

.modal-actions {
    justify-content: flex-end;
    gap: 10px;
    display: flex;
}

.user-drawer.visible {
    display: block;
}

[data-user-row] {
    cursor: pointer;
}

    [data-user-row]:hover {
        background: #f4f8ff;
    }

.page-title {
    min-width: 170px;
}

.card-head > div {
    min-width: 0;
}

.card-head small {
    color: var(--muted);
    margin-top: 4px;
    font-size: 12px;
    font-weight: 400;
    display: block;
}

.btn-link {
    white-space: nowrap;
    flex-shrink: 0;
}

.chart-container {
    width: 100%;
    height: 245px;
    position: relative;
}

    .chart-container canvas {
        display: block;
        width: 100% !important;
        height: 100% !important;
    }

.donut-wrap {
    justify-content: center;
    align-items: center;
    gap: 42px;
    height: auto;
    min-height: 245px;
    padding: 20px 10px;
    display: flex;
}

.donut {
    background: conic-gradient( var(--blue) 0 52%, var(--cyan) 52% 80%, #5757de 80% 92%, #a764e8 92% 100% );
    border-radius: 50%;
    flex: 0 0 160px;
    place-items: center;
    width: 160px;
    height: 160px;
    display: grid;
    position: relative;
}

    .donut:after {
        content: "";
        z-index: 1;
        background: var(--card);
        border-radius: 50%;
        position: absolute;
        inset: 28px;
    }

.donut-center {
    z-index: 2;
    pointer-events: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    display: flex;
    position: relative;
}

    .donut-center b {
        color: var(--text);
        font-size: 20px;
        line-height: 1;
    }

    .donut-center small {
        color: var(--muted);
        margin-top: 6px;
        font-size: 11px;
    }

.donut-wrap .donut-legend {
    gap: 16px;
    width: 155px;
    min-width: 155px;
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
}

    .donut-wrap .donut-legend li {
        justify-content: space-between;
        align-items: center;
        gap: 14px;
        display: flex;
    }

.donut-legend li > span {
    align-items: center;
    gap: 9px;
    min-width: 0;
    display: flex;
}

.donut-wrap .donut-legend li i {
    border-radius: 50%;
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    margin: 0;
    display: block;
}

.donut-legend li b {
    color: var(--text);
    margin-left: auto;
    font-size: 13px;
}

.branch-list {
    display: grid;
}

.branch-list-item {
    width: 100%;
    min-height: 70px;
    color: inherit;
    border-bottom: 1px solid var(--line);
    grid-template-columns: 42px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    text-decoration: none;
    display: grid;
}

    .branch-list-item:last-child {
        border-bottom: 0;
    }

    .branch-list-item:hover {
        color: inherit;
        background: #f7faff;
        border-radius: 8px;
        padding-inline: 8px;
    }

    .branch-list-item .branch-icon {
        width: 38px;
        height: 38px;
    }

.branch-name {
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    display: flex;
}

    .branch-name > b {
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 13px;
        overflow: hidden;
    }

.branch-status {
    color: var(--muted);
    align-items: center;
    gap: 6px;
    font-size: 11px;
    display: flex;
}

    .branch-status .status-dot {
        flex: 0 0 9px;
    }

.branch-clients {
    text-align: right;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    min-width: 55px;
    display: flex;
}

    .branch-clients strong {
        color: var(--text);
        font-size: 14px;
    }

    .branch-clients small {
        color: var(--muted);
        font-size: 10px;
    }

.branch-arrow {
    color: var(--muted);
    text-align: right;
    font-size: 22px;
    line-height: 1;
}

.empty-state {
    text-align: center;
    align-content: center;
    place-items: center;
    min-height: 180px;
    padding: 25px;
    display: grid;
}

    .empty-state.compact {
        min-height: 190px;
    }

    .empty-state h3 {
        margin: 0 0 7px;
    }

    .empty-state p {
        color: var(--muted);
        margin: 0;
    }

@media (width<=1100px) {
    .donut-wrap {
        gap: 25px;
    }

    .donut {
        flex-basis: 140px;
        width: 140px;
        height: 140px;
    }

        .donut:after {
            inset: 25px;
        }
}

@media (width<=560px) {
    .chart-card .card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .segmented {
        width: 100%;
    }

        .segmented button {
            flex: 1;
        }

    .donut-wrap {
        flex-direction: column;
        gap: 24px;
        min-height: auto;
        padding: 20px 0 5px;
    }

    .donut {
        flex-basis: 145px;
        width: 145px;
        height: 145px;
    }

    .donut-wrap .donut-legend {
        grid-template-columns: 1fr 1fr;
        gap: 13px 20px;
        width: 100%;
        min-width: 0;
    }

    .branch-list-item {
        grid-template-columns: 38px minmax(0, 1fr) auto 14px;
        gap: 9px;
    }

    .branch-clients {
        min-width: 45px;
    }
}

.device-name-cell {
    align-items: center;
    gap: 8px;
    display: flex;
}

.device-status-icon {
    font-size: 9px;
}

    .device-status-icon.online,
    .health-status.online {
        color: var(--green);
    }

    .device-status-icon.offline,
    .health-status.offline {
        color: var(--red);
    }

.data-card .card-head {
    padding: 17px 18px;
}

    .data-card .card-head small,
    .health-head small {
        color: var(--muted);
        margin-top: 4px;
        font-size: 11px;
        display: block;
    }

.health {
    align-self: start;
    padding: 20px;
}

.health-head {
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    display: flex;
}

.health-status {
    white-space: nowrap;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    display: inline-flex;
}

.health-device-select {
    gap: 7px;
    display: grid;
}

    .health-device-select > span {
        color: var(--muted);
        font-size: 11px;
    }

.health-device-info {
    border: 1px solid var(--line);
    background: #f6f9fd;
    border-radius: 8px;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding: 13px;
    display: flex;
}

    .health-device-info small {
        color: var(--muted);
    }

    .health-device-info b {
        font-size: 12px;
    }

.health-summary {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    margin-top: 20px;
    display: grid;
}

    .health-summary > div {
        border: 1px solid var(--line);
        background: #f6f9fd;
        border-radius: 8px;
        gap: 7px;
        padding: 13px;
        display: grid;
    }

    .health-summary small {
        color: var(--muted);
        font-size: 10px;
    }

    .health-summary b {
        font-size: 18px;
    }

.health-restart {
    width: 100%;
    margin-top: 15px;
}

.temperature i {
    background: linear-gradient( 90deg, #f47a15 var(--value), #dce2ea var(--value) );
}

.empty-state-icon {
    width: 58px;
    height: 58px;
    color: var(--blue);
    background: #eaf3ff;
    border-radius: 50%;
    place-items: center;
    margin-bottom: 12px;
    font-size: 27px;
    display: grid;
}

.empty-health {
    min-height: 260px;
    color: var(--muted);
    text-align: center;
    align-content: center;
    place-items: center;
    gap: 12px;
    display: grid;
}

    .empty-health > span {
        color: #9ba8ba;
        font-size: 35px;
    }

    .empty-health p {
        max-width: 190px;
        margin: 0;
    }

@media (width<=850px) {
    .health {
        width: 100%;
    }
}

@media (width<=560px) {
    .data-card .card-head {
        flex-direction: column;
        align-items: flex-start;
    }

        .data-card .card-head .btn {
            width: 100%;
        }

    .health-summary {
        grid-template-columns: 1fr 1fr;
    }
}

.method-card {
    flex-direction: column;
    min-height: 185px;
    display: flex;
    position: relative;
}

.method-head {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    display: grid;
}

.method-title {
    min-width: 0;
}

    .method-title h2 {
        margin: 0;
    }

    .method-title small {
        color: var(--muted);
        margin-top: 4px;
        font-size: 11px;
        display: block;
    }

.method-icon.google,
.sort-method-icon.google,
.portal-button-icon.google {
    color: #4285f4;
    background: #edf4ff;
}

.method-icon.facebook,
.sort-method-icon.facebook,
.portal-button-icon.facebook {
    color: #1877f2;
    background: #eaf3ff;
}

.method-icon.sms,
.sort-method-icon.sms,
.portal-button-icon.sms {
    color: var(--blue);
    background: #eaf3ff;
}

.method-icon.voucher,
.sort-method-icon.voucher,
.portal-button-icon.voucher {
    color: #7b4ce2;
    background: #f2eafe;
}

.method-icon.guest,
.sort-method-icon.guest,
.portal-button-icon.guest {
    color: #e97616;
    background: #fff1e5;
}

.method-description {
    min-height: 40px;
    color: var(--muted);
    line-height: 1.55;
    margin: 16px 0 18px !important;
}

.method-actions {
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    display: flex;
}

.method-state {
    align-items: center;
    gap: 6px;
    font-size: 11px;
    display: inline-flex;
}

    .method-state.enabled {
        color: var(--green);
    }

    .method-state.disabled {
        color: var(--muted);
    }

.switch {
    cursor: pointer;
    user-select: none;
}

    .switch span {
        min-width: 32px;
        color: var(--muted);
        font-size: 11px;
    }

    .switch input:checked ~ span {
        color: var(--green);
    }

.priority {
    align-items: start;
}

.priority-settings {
    min-width: 0;
}

.section-head,
.preview-head {
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    display: flex;
}

    .section-head h2,
    .preview-head h2 {
        margin: 0;
    }

    .section-head p {
        margin: 6px 0 0;
    }

.drag-help,
.preview-badge {
    color: var(--blue);
    background: #edf5ff;
    border-radius: 20px;
    flex-shrink: 0;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    font-size: 10px;
    display: inline-flex;
}

.sortable {
    margin: 18px 0 0;
}

    .sortable li {
        cursor: grab;
        background: #fff;
        grid-template-columns: 24px 32px 36px minmax(0, 1fr) auto;
        gap: 10px;
        min-height: 61px;
        padding: 10px 12px;
    }

        .sortable li:active {
            cursor: grabbing;
        }

        .sortable li.dragging {
            opacity: 0.55;
            border-color: var(--blue);
            background: #f3f7ff;
        }

.drag-handle {
    color: #9ba6b6;
    letter-spacing: -5px;
    font-size: 18px;
}

.sort-number {
    width: 28px;
    height: 28px;
}

.sort-method-icon {
    border-radius: 8px;
    place-items: center;
    width: 34px;
    height: 34px;
    font-weight: 700;
    display: grid;
}

.sort-method-name {
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    display: flex;
}

    .sort-method-name strong {
        white-space: nowrap;
        text-overflow: ellipsis;
        font-size: 12px;
        overflow: hidden;
    }

    .sort-method-name small {
        color: var(--muted);
        font-size: 10px;
    }

.sort-status {
    border-radius: 15px;
    padding: 5px 8px;
    font-size: 10px;
}

    .sort-status.enabled {
        color: var(--green);
        background: #e7f8ed;
    }

    .sort-status.disabled {
        color: var(--muted);
        background: #eef1f5;
    }

.preview {
    min-width: 0;
}

.preview-head small {
    color: var(--muted);
    margin-top: 5px;
    font-size: 11px;
    display: block;
}

.portal {
    margin-top: 18px;
    padding: 24px 20px 18px;
}

.portal-logo {
    color: #fff;
    background: linear-gradient(135deg, #168dff, #075ccc);
    border-radius: 50%;
    place-items: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    font-size: 23px;
    display: grid;
}

.portal h3 {
    font-size: 18px;
}

.portal > small {
    color: #d3e3f7;
}

.portal-methods {
    gap: 8px;
    margin-top: 17px;
    display: grid;
}

.portal .portal-login-button {
    width: 100%;
    height: 40px;
    color: var(--text);
    text-align: left;
    cursor: default;
    background: #fff;
    border: 1px solid #ffffff4d;
    border-radius: 7px;
    grid-template-columns: 25px minmax(0, 1fr) 12px;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0 11px;
    display: grid;
}

.portal-login-button > span:nth-child(2) {
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 11px;
    overflow: hidden;
}

.portal-login-button > b {
    color: var(--muted);
    text-align: right;
}

.portal-button-icon {
    border-radius: 6px;
    place-items: center;
    width: 24px;
    height: 24px;
    font-size: 12px;
    font-weight: 700;
    display: grid;
}

.portal-empty {
    color: #d3e3f7;
    border: 1px dashed #52769c;
    border-radius: 7px;
    margin-top: 17px;
    padding: 13px;
    font-size: 11px;
}

.portal-terms {
    color: #9eb7d3;
    margin: 16px 0 0;
    font-size: 9px;
    line-height: 1.4;
}

@media (width<=850px) {
    .priority {
        grid-template-columns: 1fr;
    }

    .preview {
        width: 100%;
    }

    .portal {
        max-width: 420px;
        margin-inline: auto;
    }
}

@media (width<=560px) {
    .method-head {
        grid-template-columns: 42px minmax(0, 1fr);
    }

        .method-head .switch {
            grid-column: 1/-1;
            justify-self: end;
            margin-top: 5px;
        }

    .method-actions .btn {
        min-height: 38px;
    }

    .section-head {
        flex-direction: column;
    }

    .sortable li {
        grid-template-columns: 20px 30px 32px minmax(0, 1fr);
    }

    .sort-status {
        display: none;
    }

    .preview-head {
        align-items: center;
    }
}

.report-chart-container {
    width: 100%;
    height: 270px;
    position: relative;
}

    .report-chart-container canvas {
        display: block;
        width: 100% !important;
        height: 100% !important;
    }

.chart-legend {
    align-items: center;
    gap: 13px;
    display: flex;
}

    .chart-legend span {
        color: var(--muted);
        align-items: center;
        gap: 6px;
        font-size: 10px;
        display: flex;
    }

    .chart-legend i {
        border-radius: 50%;
        width: 9px;
        height: 9px;
        display: block;
    }

    .chart-legend .sessions {
        background: var(--blue);
    }

    .chart-legend .users {
        background: var(--cyan);
    }

.branch-traffic-card .bars {
    justify-content: space-around;
    align-items: stretch;
    gap: 14px;
    height: 270px;
    padding: 20px 5px 0;
    display: flex;
}

    .branch-traffic-card .bars > div {
        flex: 1;
        grid-template-rows: 24px minmax(0, 1fr) 22px;
        justify-items: center;
        gap: 7px;
        height: 100%;
        display: grid;
    }

    .branch-traffic-card .bars b {
        white-space: nowrap;
        font-size: 11px;
    }

    .branch-traffic-card .bars small {
        color: var(--muted);
        font-size: 10px;
    }

.bar-track {
    background: #edf3fa;
    border-radius: 6px 6px 2px 2px;
    align-items: flex-end;
    width: 42px;
    height: 100%;
    display: flex;
    position: relative;
    overflow: hidden;
}

    .bar-track i {
        width: 100%;
        height: var(--h);
        background: linear-gradient(#2586ff, #075ccd);
        border-radius: 6px 6px 2px 2px;
        display: block;
    }

.report-donut-card .donut-wrap {
    min-height: 270px;
}

.report-donut-card .donut {
    flex: 0 0 155px;
    width: 155px;
    height: 155px;
}

.report-donut-card .donut-center b {
    font-size: 18px;
}

.heatmap-card {
    overflow: hidden;
}

.heat-scale {
    align-items: center;
    gap: 7px;
    display: flex;
}

    .heat-scale small {
        color: var(--muted);
        font-size: 9px;
    }

    .heat-scale > span {
        gap: 3px;
        display: flex;
    }

    .heat-scale i {
        background: color-mix(in srgb, var(--blue) var(--heat), #edf4ff);
        border-radius: 3px;
        width: 14px;
        height: 14px;
        display: block;
    }

.heatmap-wrap {
    grid-template-columns: 33px minmax(0, 1fr);
    gap: 8px;
    margin-top: 22px;
    display: grid;
}

.heatmap-days {
    grid-template-rows: repeat(7, 24px);
    gap: 5px;
    display: grid;
}

    .heatmap-days span {
        color: var(--muted);
        align-items: center;
        font-size: 9px;
        display: flex;
    }

.heatmap {
    grid-template-rows: repeat(7, 24px);
    grid-template-columns: repeat(12, minmax(18px, 1fr));
    grid-auto-flow: column;
    gap: 5px;
    margin: 0;
    display: grid;
}

    .heatmap i {
        background: color-mix(in srgb, var(--blue) var(--heat), #edf4ff);
        border-radius: 4px;
        width: 100%;
        height: 24px;
        transition: transform 0.15s;
        display: block;
    }

        .heatmap i:hover {
            z-index: 2;
            outline: 2px solid #fff;
            position: relative;
            transform: scale(1.12);
        }

.heat-labels {
    color: var(--muted);
    justify-content: space-between;
    margin: 10px 0 0 41px;
    font-size: 9px;
    display: flex;
}

.active-users .table-wrap {
    margin-inline: -4px;
}

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

    .report-user > span {
        width: 28px;
        height: 28px;
        color: var(--blue);
        background: #eaf3ff;
        border-radius: 50%;
        flex: 0 0 28px;
        place-items: center;
        font-size: 10px;
        font-weight: 700;
        display: grid;
    }

    .report-user > div {
        flex-direction: column;
        gap: 3px;
        min-width: 0;
        display: flex;
    }

    .report-user b,
    .report-user small {
        white-space: nowrap;
        text-overflow: ellipsis;
        max-width: 190px;
        overflow: hidden;
    }

    .report-user small {
        color: var(--muted);
        font-size: 9px;
    }

.active-users td strong {
    color: var(--blue);
}

@media (width<=1050px) {
    .report-grid {
        grid-template-columns: 1fr 1fr;
    }

    .report-trend-card,
    .heatmap-card {
        grid-column: 1/-1;
    }

    .branch-traffic-card,
    .report-donut-card,
    .active-users {
        grid-column: auto;
    }

    .active-users {
        grid-column: 1/-1;
    }
}

@media (width<=700px) {
    .report-actions {
        justify-content: flex-start;
        padding-bottom: 4px;
        overflow-x: auto;
    }

        .report-actions > * {
            flex-shrink: 0;
        }

    .report-date-button {
        min-width: 220px;
    }

    .report-grid {
        grid-template-columns: 1fr;
    }

    .report-trend-card,
    .branch-traffic-card,
    .report-donut-card,
    .heatmap-card,
    .active-users {
        grid-column: auto;
    }

    .report-chart-container {
        height: 230px;
    }

    .heatmap-wrap {
        overflow-x: auto;
    }

    .heatmap,
    .heat-labels {
        min-width: 650px;
    }
}

@media (width<=560px) {
    .report-grid .card-head {
        align-items: flex-start;
    }

    .chart-legend,
    .heat-scale {
        display: none;
    }

    .report-donut-card .donut-wrap {
        flex-direction: column;
    }

    .report-donut-card .donut-legend {
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }
}

.session-stats .stat {
    min-width: 0;
}

.stat-content {
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    gap: 5px !important;
    display: flex !important;
}

    .stat-content strong {
        line-height: 1;
    }

    .stat-content > span {
        color: var(--muted);
        font-size: 10px;
    }

.sessions-data-card {
    overflow: hidden;
}

    .sessions-data-card .toolbar {
        min-height: 74px;
    }

    .sessions-data-card .search {
        margin-bottom: 0;
    }

        .sessions-data-card .search > span {
            color: var(--muted);
            flex: 0 0 20px;
            font-size: 19px;
        }

        .sessions-data-card .search input::-webkit-search-cancel-button {
            cursor: pointer;
        }

.sessions-table-wrap {
    border-top: 1px solid var(--line);
}

.session-user {
    align-items: center;
    gap: 9px;
    min-width: 155px;
    display: flex;
}

.session-avatar {
    width: 33px;
    height: 33px;
    color: var(--blue);
    background: #eaf3ff;
    border-radius: 50%;
    flex: 0 0 33px;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    display: grid;
}

.session-user > div {
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    display: flex;
}

.session-user b {
    white-space: nowrap;
    text-overflow: ellipsis;
    max-width: 145px;
    overflow: hidden;
}

.session-user small {
    color: var(--muted);
    font-size: 9px;
}

.phone-link {
    color: var(--text);
}

    .phone-link:hover {
        color: var(--blue);
    }

.branch-label {
    align-items: center;
    gap: 6px;
    display: inline-flex;
}

    .branch-label i {
        color: var(--blue);
        font-style: normal;
    }

.usage-value {
    color: var(--blue);
    font-weight: 600;
}

.sessions-data-card code {
    color: #30425c;
    background: #f1f5fa;
    border-radius: 4px;
    padding: 3px 5px;
    font-family: Consolas, monospace;
    font-size: 10px;
}

.table-action {
    text-align: center;
    width: 55px;
}

.session-action:hover {
    color: var(--blue);
    background: #eaf3ff;
}

.sessions-data-card .pager {
    border-top: 1px solid var(--line);
    min-height: 63px;
    color: var(--muted);
    align-items: center;
    font-size: 11px;
}

    .sessions-data-card .pager > span b {
        color: var(--text);
    }

.pager-buttons {
    align-items: center;
    gap: 5px;
    display: flex;
}

    .pager-buttons button {
        cursor: pointer;
    }

        .pager-buttons button:hover:not(:disabled),
        .pager-buttons button.active {
            color: var(--blue);
            background: #edf5ff;
            border-color: #89b5ed;
        }

        .pager-buttons button:disabled {
            cursor: not-allowed;
            opacity: 0.45;
        }

.sessions-empty {
    min-height: 380px;
}

    .sessions-empty p {
        max-width: 420px;
        line-height: 1.6;
    }

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.sr-only {
    white-space: nowrap;
    clip: rect(0, 0, 0, 0);
    border: 0;
    width: 1px;
    height: 1px;
    padding: 0;
    position: absolute;
    overflow: hidden;
}

@media (width<=1050px) {
    .session-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (width<=700px) {
    .sessions-data-card .toolbar {
        flex-wrap: wrap;
        padding: 14px;
    }

    .sessions-data-card .search {
        flex: 1 0 100%;
        min-width: 100%;
    }

    .sessions-data-card .toolbar .btn {
        flex: 1;
    }
}

@media (width<=560px) {
    .session-stats {
        grid-template-columns: 1fr 1fr;
    }

        .session-stats .stat {
            min-height: 105px;
        }

    .stat-content > span {
        display: none;
    }

    .sessions-data-card .toolbar .btn {
        min-width: calc(50% - 5px);
    }

    .sessions-data-card .pager {
        flex-direction: column;
        gap: 12px;
    }
}

.logo-box img {
    object-fit: contain;
    border-radius: inherit;
    width: 100%;
    height: 100%;
    display: block;
}

/* Settings panels - final overrides */
.settings-content > section[data-settings-panel] {
    width: 100%;
    min-width: 0;
}

    .settings-content > section[data-settings-panel][hidden] {
        display: none !important;
    }

    .settings-content > section[data-settings-panel] .settings-form {
        width: 100%;
        padding: 22px;
        display: block;
    }

    .settings-content > section[data-settings-panel] .settings-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 17px 20px;
        display: grid;
    }

    .settings-content > section[data-settings-panel] .form-field {
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 7px;
        min-width: 0;
        display: grid;
    }

        .settings-content > section[data-settings-panel] .form-field.field-full {
            grid-column: 1 / -1;
        }

        .settings-content > section[data-settings-panel] .form-field > span {
            color: #344156;
            font-size: 11px;
            font-weight: 600;
        }

.settings-content .color-field,
.settings-content .input-suffix,
.settings-content .api-key-field {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-content .input-suffix {
    position: relative;
}

    .settings-content .input-suffix > input {
        width: 100%;
        padding-right: 65px;
    }

    .settings-content .input-suffix > span {
        position: absolute;
        right: 12px;
        color: var(--muted);
        font-size: 10px;
        pointer-events: none;
    }

.settings-content .settings-option-list {
    width: 100%;
    margin-top: 24px;
    border-top: 1px solid var(--line);
    display: grid;
}

    .settings-content .settings-option-list > label {
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: 20px !important;
        min-height: 70px;
        padding: 14px 0;
        border-bottom: 1px solid var(--line);
        display: grid !important;
    }

        .settings-content .settings-option-list > label > div {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }

        .settings-content .settings-option-list > label b {
            font-size: 12px;
        }

        .settings-content .settings-option-list > label small {
            color: var(--muted);
            font-size: 10px;
            line-height: 1.45;
        }

    .settings-content .settings-option-list .switch {
        flex-shrink: 0;
    }

.settings-content .notification-table {
    width: 100%;
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}

.settings-content .notification-head,
.settings-content .notification-row {
    grid-template-columns: minmax(220px, 1fr) 90px 90px 90px;
    align-items: center;
    display: grid;
}

.settings-content .notification-head {
    min-height: 43px;
    padding: 10px 16px;
    background: #f5f8fc;
}

    .settings-content .notification-head b {
        font-size: 10px;
    }

        .settings-content .notification-head b:not(:first-child),
        .settings-content .notification-row input {
            justify-self: center;
        }

.settings-content .notification-row {
    min-height: 52px;
    padding: 9px 16px;
    border-top: 1px solid var(--line);
}

    .settings-content .notification-row input {
        width: 17px;
        height: 17px;
        accent-color: var(--blue);
    }

.settings-content .permission-list {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 9px;
    overflow: hidden;
}

.settings-content .permission-user {
    grid-template-columns: 42px minmax(180px, 1fr) 190px 80px 34px;
    align-items: center;
    gap: 12px;
    min-height: 72px;
    padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    display: grid;
}

    .settings-content .permission-user:last-child {
        border-bottom: 0;
    }

    .settings-content .permission-user > div {
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .settings-content .permission-user select {
        width: 100%;
        height: 39px;
    }

.settings-content .integration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    display: grid;
}

.settings-content .integration-card {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 9px;
    display: grid;
}

    .settings-content .integration-card > div {
        min-width: 0;
    }

.settings-content .integration-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    color: var(--blue);
    background: #eaf3ff;
    font-size: 20px;
    font-weight: 700;
}

.settings-content .integration-card h3 {
    margin: 0;
    font-size: 13px;
}

.settings-content .integration-card p {
    margin: 5px 0 7px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.settings-content .integration-state.connected {
    color: var(--green);
}

.settings-content .integration-state.disconnected {
    color: var(--muted);
}

@media (width <= 900px) {
    .settings-content .integration-grid {
        grid-template-columns: 1fr;
    }

    .settings-content .permission-user {
        grid-template-columns: 42px minmax(150px, 1fr) 160px 34px;
    }

        .settings-content .permission-user .badge {
            display: none;
        }
}

@media (width <= 620px) {
    .settings-content > section[data-settings-panel] .settings-fields {
        grid-template-columns: 1fr;
    }

    .settings-content > section[data-settings-panel] .form-field.field-full {
        grid-column: auto;
    }

    .settings-content .notification-table,
    .settings-content .permission-list {
        overflow-x: auto;
    }

    .settings-content .notification-head,
    .settings-content .notification-row {
        min-width: 540px;
    }

    .settings-content .permission-user {
        min-width: 620px;
    }

    .settings-content .integration-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }

        .settings-content .integration-card .btn {
            grid-column: 1 / -1;
            width: 100%;
        }

    .settings-content .api-key-field {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Sidebar - refined final design */
.sidebar {
    width: 220px;
    padding: 20px 12px 16px;
    background: radial-gradient(circle at 20% 0%, rgba(20, 116, 230, 0.18), transparent 32%), linear-gradient(180deg, #061d3d 0%, #031831 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 8px 0 28px rgba(5, 24, 51, 0.08);
}

.shell {
    margin-left: 220px;
}

.brand {
    min-height: 54px;
    gap: 11px;
    margin-bottom: 22px;
    padding: 0 10px;
    font-size: 19px;
    line-height: 1.1;
    letter-spacing: -0.2px;
}

.brand-mark {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-width: 3px;
    box-shadow: 0 0 0 5px rgba(21, 158, 255, 0.08);
}

.sidebar nav {
    gap: 5px;
}

    .sidebar nav a {
        position: relative;
        height: 46px;
        gap: 11px;
        padding: 0 12px;
        color: #cfdded;
        border: 1px solid transparent;
        border-radius: 9px;
        font-size: 13px;
        font-weight: 500;
    }

        .sidebar nav a span {
            flex: 0 0 28px;
            width: 28px;
            height: 28px;
            display: grid;
            place-items: center;
            color: #a9c7e8;
            background: rgba(255, 255, 255, 0.045);
            border-radius: 7px;
            font-size: 16px;
            transition: 0.18s ease;
        }

        .sidebar nav a:hover {
            color: #fff;
            background: rgba(255, 255, 255, 0.07);
            border-color: rgba(255, 255, 255, 0.06);
            box-shadow: none;
            transform: translateX(2px);
        }

            .sidebar nav a:hover span {
                color: #fff;
                background: rgba(26, 142, 255, 0.16);
            }

        .sidebar nav a.active {
            color: #fff;
            background: linear-gradient(90deg, rgba(14, 104, 211, 0.7), rgba(12, 91, 184, 0.48));
            border-color: rgba(77, 172, 255, 0.25);
            box-shadow: inset 3px 0 #20b8ff, 0 7px 18px rgba(0, 63, 139, 0.18);
        }

            .sidebar nav a.active span {
                color: #fff;
                background: rgba(255, 255, 255, 0.11);
            }

.collapse {
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    margin: auto auto 4px;
    color: #dcecff;
    background: rgba(19, 70, 124, 0.65);
    border: 1px solid rgba(135, 190, 245, 0.25);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.13);
    font-size: 20px;
    cursor: pointer;
}

    .collapse:hover {
        color: #fff;
        background: #0b5fb7;
        border-color: #278de9;
        transform: translateY(-1px);
    }

@media (width <= 850px) {
    .sidebar {
        width: 220px;
    }

    .shell {
        margin-left: 0;
    }
}
