:root {
    --jg-primary: #2563eb;
    --jg-accent: #16a34a;
    --jg-sidebar: #111827;
    --jg-bg: #f4f7fb;
    --jg-surface: #ffffff;
    --jg-border: #e5e7eb;
    --jg-text: #111827;
    --jg-muted: #6b7280;
    --jg-radius: 8px;
}

* {
    box-sizing: border-box;
}

body.admin-body {
    margin: 0;
    min-height: 100vh;
    background: var(--jg-bg);
    color: var(--jg-text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    text-decoration: none;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
}

.admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 18px 14px;
    background: var(--jg-sidebar);
    color: #fff;
    z-index: 1030;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 8px 10px 18px;
    color: #fff;
    font-weight: 800;
    font-size: 1.05rem;
}

.admin-brand img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: contain;
    background: rgba(255, 255, 255, .08);
}

.admin-nav {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: var(--jg-radius);
    color: rgba(255, 255, 255, .76);
    font-size: 15px;
    font-weight: 650;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

.admin-nav-link.active {
    box-shadow: inset 3px 0 0 var(--jg-accent);
}

.admin-sidebar-footer {
    margin-top: auto;
    padding: 14px 12px;
    border-radius: var(--jg-radius);
    background: rgba(255, 255, 255, .08);
    display: grid;
    gap: 2px;
}

.admin-sidebar-footer span {
    font-weight: 750;
}

.admin-sidebar-footer small {
    color: rgba(255, 255, 255, .65);
}

.admin-main {
    min-width: 0;
}

.admin-topbar {
    min-height: 78px;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid var(--jg-border);
    position: sticky;
    top: 0;
    z-index: 1010;
    backdrop-filter: blur(16px);
}

.admin-topbar h1 {
    margin: 0;
    font-size: clamp(1.25rem, 2.2vw, 1.8rem);
    font-weight: 820;
    letter-spacing: 0;
}

.eyebrow {
    color: var(--jg-muted);
    font-size: .78rem;
    font-weight: 750;
    text-transform: uppercase;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-user {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid var(--jg-border);
    border-radius: var(--jg-radius);
    background: #fff;
    color: var(--jg-muted);
    font-size: .9rem;
    font-weight: 650;
}

.admin-content {
    padding: 28px;
}

.page-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card,
.panel,
.table-panel {
    background: var(--jg-surface);
    border: 1px solid var(--jg-border);
    border-radius: var(--jg-radius);
    box-shadow: 0 14px 35px rgba(15, 23, 42, .06);
}

.stat-card {
    padding: 18px;
    display: flex;
    justify-content: space-between;
    gap: 14px;
    min-height: 116px;
}

.stat-card .label {
    color: var(--jg-muted);
    font-size: .86rem;
    font-weight: 750;
}

.stat-card .value {
    margin-top: 8px;
    font-size: 2rem;
    line-height: 1;
    font-weight: 850;
}

.stat-card .hint {
    margin-top: 8px;
    color: var(--jg-muted);
    font-size: .82rem;
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--jg-radius);
    background: color-mix(in srgb, var(--jg-primary) 13%, #fff);
    color: var(--jg-primary);
    font-size: 1.35rem;
    flex: 0 0 auto;
}

.panel {
    padding: 20px;
}

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

.panel-title {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
}

.panel-subtitle {
    margin: 4px 0 0;
    color: var(--jg-muted);
    font-size: .9rem;
}

.table-panel {
    overflow: hidden;
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    border-bottom: 1px solid var(--jg-border);
    flex-wrap: wrap;
}

.table-toolbar .form-control,
.table-toolbar .form-select {
    max-width: 260px;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    color: #475569;
    background: #f8fafc;
    font-size: .75rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.users-panel .table-responsive {
    min-height: 0;
    overflow-x: hidden;
}

.users-toolbar {
    padding: 14px 16px;
}

.users-toolbar .panel-title {
    font-size: 1.22rem;
    line-height: 1.28;
}

.users-toolbar .panel-subtitle {
    font-size: .92rem;
}

.users-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 150px 190px 170px;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--jg-border);
    background: #fff;
}

.users-filters .form-control,
.users-filters .form-select {
    min-height: 40px;
    padding-top: 7px;
    padding-bottom: 7px;
    font-size: 15px;
    line-height: 1.35;
}

.users-compact-table {
    table-layout: fixed;
    width: 100%;
    font-size: 15px;
    border-collapse: separate;
    border-spacing: 0;
}

.users-compact-table th,
.users-compact-table td {
    padding: 11px 16px;
    line-height: 1.35;
    border-color: #edf1f6;
}

.users-compact-table th:nth-child(1) {
    width: 30%;
}

.users-compact-table th:nth-child(2) {
    width: 24%;
}

.users-compact-table th:nth-child(3) {
    width: 18%;
}

.users-compact-table th:nth-child(4) {
    width: 11%;
}

.users-compact-table th:nth-child(5) {
    width: 17%;
}

.users-compact-table thead th {
    height: 44px;
    font-size: 16px;
    letter-spacing: 0;
    font-weight: 750;
    vertical-align: middle;
}

.users-compact-table tbody td {
    height: 48px;
    vertical-align: middle;
}

.users-compact-table tbody tr {
    transition: background .16s ease;
}

.users-compact-table tbody tr:hover {
    background: #f8fafc;
}

.user-name-cell {
    min-width: 0;
}

.user-name-cell span,
.user-name-cell small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-name-cell small {
    color: var(--jg-muted);
    font-size: 13px;
}

.mac-cell {
    min-width: 0;
}

.mac-code {
    display: inline-block;
    max-width: 100%;
    padding: 4px 7px;
    border: 1px solid #dbe3ef;
    border-radius: 5px;
    background: #f8fafc;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.validity-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-size: 15px;
}

.status-cell {
    white-space: nowrap;
}

.details-button {
    min-width: 104px;
    min-height: 36px;
    padding: 6px 10px;
    justify-content: center;
    gap: 6px;
    font-size: 15px;
    line-height: 1.2;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.details-grid > div {
    border: 1px solid var(--jg-border);
    border-radius: var(--jg-radius);
    padding: 12px;
    background: #f8fafc;
    min-width: 0;
}

.details-grid span {
    display: block;
    color: var(--jg-muted);
    font-size: .75rem;
    font-weight: 750;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.details-grid strong {
    display: block;
    font-size: .9rem;
    word-break: break-word;
}

.user-action-footer {
    justify-content: flex-start;
    gap: 8px;
}

.muted {
    color: var(--jg-muted);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    display: inline-block;
}

.action-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.icon-button,
.action-button {
    width: 34px;
    height: 34px;
    border-radius: var(--jg-radius);
    border: 1px solid var(--jg-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #334155;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.icon-button:hover,
.action-button:hover {
    background: #f8fafc;
    color: var(--jg-primary);
    border-color: color-mix(in srgb, var(--jg-primary) 25%, var(--jg-border));
}

.pagination-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 14px;
    border-top: 1px solid var(--jg-border);
    flex-wrap: wrap;
    font-size: .8rem;
}

.form-shell {
    max-width: 920px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

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

.brand-preview {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border-radius: var(--jg-radius);
    background: #f8fafc;
    border: 1px solid var(--jg-border);
    padding: 8px;
}

.personalization-shell {
    max-width: 1180px;
}

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

.branding-card {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--jg-border);
    border-radius: var(--jg-radius);
    background: #fff;
}

.branding-card-preview {
    width: 96px;
    height: 96px;
    display: grid;
    place-items: center;
    border: 1px dashed #cbd5e1;
    border-radius: var(--jg-radius);
    background: #f8fafc;
    overflow: hidden;
}

.branding-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.branding-card-body {
    min-width: 0;
}

.branding-card-actions {
    margin-top: 8px;
}

.api-preview {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 12px;
    border: 1px solid var(--jg-border);
    border-radius: var(--jg-radius);
    background: #f8fafc;
}

.chart-box {
    min-height: 280px;
}

.log-box {
    max-height: 520px;
    overflow: auto;
    padding: 16px;
    background: #0f172a;
    color: #dbeafe;
    border-radius: var(--jg-radius);
    font-family: "Cascadia Mono", Consolas, monospace;
    font-size: .82rem;
    white-space: pre-wrap;
}

.empty-state {
    padding: 36px 18px;
    text-align: center;
    color: var(--jg-muted);
}

.btn-primary {
    --bs-btn-bg: var(--jg-primary);
    --bs-btn-border-color: var(--jg-primary);
    --bs-btn-hover-bg: color-mix(in srgb, var(--jg-primary) 85%, #000);
    --bs-btn-hover-border-color: color-mix(in srgb, var(--jg-primary) 85%, #000);
}

.btn-success {
    --bs-btn-bg: var(--jg-accent);
    --bs-btn-border-color: var(--jg-accent);
}

@media (max-width: 1180px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .users-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        width: min(82vw, 300px);
        transition: transform .22s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, .45);
        z-index: 1020;
        display: none;
    }

    .sidebar-backdrop.open {
        display: block;
    }

    .admin-topbar {
        align-items: flex-start;
        padding: 16px;
    }

    .admin-content {
        padding: 16px;
    }
}

@media (max-width: 680px) {
    .stats-grid,
    .form-grid,
    .branding-grid,
    .details-grid,
    .users-filters {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .table-toolbar .form-control,
    .table-toolbar .form-select {
        max-width: 100%;
        width: 100%;
    }

    .users-compact-table th,
    .users-compact-table td {
        padding: 10px 9px;
    }

    .users-compact-table th:nth-child(1) {
        width: 28%;
    }

    .users-compact-table th:nth-child(2) {
        width: 28%;
    }

    .users-compact-table th:nth-child(3) {
        width: 20%;
    }

    .users-compact-table th:nth-child(4) {
        width: 12%;
    }

    .users-compact-table th:nth-child(5) {
        width: 12%;
    }

    .details-button {
        min-width: 42px;
        width: 42px;
        padding-left: 0;
        padding-right: 0;
    }

    .details-button span {
        display: none;
    }

    .mac-code {
        font-size: 13px;
        padding: 3px 5px;
    }

    .validity-cell {
        font-size: 14px;
    }

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

    .branding-card-preview {
        width: 78px;
        height: 78px;
    }
}

@media (max-width: 560px) {
    .users-panel .table-responsive {
        overflow-x: auto;
    }

    .users-compact-table {
        min-width: 650px;
    }
}

/* Visual refresh for the users panel. CSS-only: keeps PHP, JS, APIs and data flow unchanged. */
body.admin-body {
    font-size: 16px;
    line-height: 1.5;
    background:
        linear-gradient(180deg, #f8fbff 0%, #f3f6fb 42%, #eef3f9 100%);
    font-family: Inter, "Segoe UI", Roboto, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
}

.admin-shell {
    grid-template-columns: 300px minmax(0, 1fr);
}

.admin-sidebar {
    padding: 20px 16px;
    box-shadow: 12px 0 30px rgba(15, 23, 42, .16);
}

.admin-brand {
    min-height: 66px;
    padding: 8px 12px 22px;
    gap: 14px;
    font-size: 17px;
    letter-spacing: 0;
}

.admin-brand img {
    width: 48px;
    height: 48px;
}

.admin-nav {
    gap: 7px;
    margin-top: 10px;
}

.admin-nav-link {
    min-height: 50px;
    padding: 13px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 720;
    color: rgba(255, 255, 255, .82);
}

.admin-nav-link i {
    width: 22px;
    font-size: 18px;
    text-align: center;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(37, 99, 235, .26);
    color: #fff;
}

.admin-nav-link.active {
    box-shadow: inset 4px 0 0 #60a5fa, 0 10px 24px rgba(15, 23, 42, .18);
}

.admin-sidebar-footer {
    padding: 16px 14px;
    font-size: 15px;
}

.admin-sidebar-footer small {
    font-size: 14px;
}

.admin-topbar {
    min-height: 92px;
    padding: 22px 32px;
    background: rgba(255, 255, 255, .96);
}

.admin-topbar h1 {
    font-size: clamp(30px, 2.4vw, 34px);
    line-height: 1.1;
    font-weight: 850;
}

.eyebrow {
    font-size: 14px;
    line-height: 1.35;
}

.admin-user {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 15px;
    border-radius: 8px;
}

.admin-content {
    padding: 30px 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 720;
    line-height: 1.25;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}

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

.btn-sm {
    min-height: 38px;
    padding: 7px 12px;
    font-size: 15px;
}

.btn-primary {
    box-shadow: 0 10px 20px rgba(37, 99, 235, .2);
}

.table-panel.users-panel {
    overflow: hidden;
    border: 1px solid #dce5f2;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .10);
}

.users-toolbar {
    min-height: 84px;
    padding: 22px 24px;
    border-bottom: 1px solid #e1e8f3;
    background:
        linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.users-toolbar .panel-title {
    font-size: 20px;
    line-height: 1.2;
    font-weight: 850;
    color: #0f172a;
}

.users-toolbar .panel-subtitle {
    margin-top: 7px;
    font-size: 15px;
    line-height: 1.35;
    color: #64748b;
}

.users-toolbar .btn-primary {
    min-width: 112px;
}

.users-filters {
    grid-template-columns: minmax(340px, 1fr) 170px 220px 190px;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid #e1e8f3;
    background: #f8fbff;
}

.users-filters .form-control,
.users-filters .form-select {
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #cbd7e6;
    border-radius: 8px;
    background-color: #fff;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.35;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03);
}

.users-filters .form-control:focus,
.users-filters .form-select:focus {
    border-color: var(--jg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.users-panel .table-responsive {
    overflow-x: hidden;
    background: #fff;
}

.users-compact-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 16px;
}

.users-compact-table th,
.users-compact-table td {
    padding: 17px 22px;
    line-height: 1.45;
    border-color: #e6edf6;
}

.users-compact-table th:nth-child(1) {
    width: 31%;
}

.users-compact-table th:nth-child(2) {
    width: 23%;
}

.users-compact-table th:nth-child(3) {
    width: 18%;
}

.users-compact-table th:nth-child(4) {
    width: 12%;
}

.users-compact-table th:nth-child(5) {
    width: 16%;
}

.users-compact-table thead th {
    height: 58px;
    background: #eef5ff;
    color: #0f172a;
    font-size: 17px;
    font-weight: 820;
    text-transform: none;
    vertical-align: middle;
    border-bottom: 1px solid #d7e3f3;
}

.users-compact-table tbody td {
    height: 66px;
    color: #1f2937;
    font-size: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #edf2f8;
}

.users-compact-table tbody tr {
    transition: background .18s ease, box-shadow .18s ease;
}

.users-compact-table tbody tr:hover {
    background: #f5f9ff;
    box-shadow: inset 4px 0 0 var(--jg-primary);
}

.user-name-cell span {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.user-name-cell small {
    font-size: 14px;
}

.mac-code {
    padding: 6px 9px;
    border: 1px solid #d4dfed;
    border-radius: 7px;
    background: #f7faff;
    color: #172033;
    font-size: 15px;
    line-height: 1.25;
}

.validity-cell {
    font-size: 16px;
    color: #1f2937;
}

.status-cell .badge {
    min-width: 58px;
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.details-button {
    min-width: 126px;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #d5deea;
    background: #fff;
    color: #0f172a;
    font-size: 15px;
    font-weight: 780;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .06);
}

.details-button:hover {
    border-color: var(--jg-primary);
    color: var(--jg-primary);
    background: #f8fbff;
}

.table-footer {
    min-height: 62px;
    padding: 16px 24px;
    background: #fbfdff;
    font-size: 15px;
}

.table-footer .btn {
    min-height: 38px;
}

.empty-state {
    padding: 44px 22px;
    font-size: 16px;
}

.details-grid span {
    font-size: 14px;
}

.details-grid strong {
    font-size: 16px;
}

.user-action-footer .btn {
    min-height: 40px;
    font-size: 15px;
}

@media (max-width: 1180px) {
    .admin-shell {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .users-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        width: min(86vw, 320px);
    }

    .admin-topbar {
        min-height: auto;
        padding: 20px;
    }

    .admin-content {
        padding: 20px;
    }
}

@media (max-width: 680px) {
    .admin-topbar h1 {
        font-size: 30px;
    }

    .users-toolbar {
        padding: 20px;
        gap: 16px;
    }

    .users-toolbar .panel-title {
        font-size: 20px;
    }

    .users-filters {
        grid-template-columns: 1fr;
        padding: 16px 20px;
    }

    .users-panel .table-responsive {
        overflow-x: auto;
    }

    .users-compact-table {
        min-width: 760px;
    }

    .users-compact-table th,
    .users-compact-table td {
        padding: 15px 16px;
    }

    .details-button {
        min-width: 46px;
        width: 46px;
        padding-left: 0;
        padding-right: 0;
    }

    .details-button span {
        display: none;
    }
}

/* Dashboard cleanup final override - 20260713. Keep this block at the end. */
.dashboard-page .admin-topbar {
    min-height: 60px !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.dashboard-page .admin-topbar .eyebrow {
    display: none !important;
}

.dashboard-page .admin-topbar h1 {
    color: var(--jg-primary) !important;
    font-size: clamp(18px, 1.4vw, 20px) !important;
    line-height: 1.1 !important;
    font-weight: 900 !important;
}

.dashboard-page .admin-content {
    padding-top: 18px !important;
}

.dashboard-page .dashboard-layout {
    gap: 14px !important;
}

.dashboard-page .dashboard-hero,
.dashboard-page .status-chart-layout,
.dashboard-page .compact-doughnut-shell {
    display: none !important;
}

.dashboard-page .dashboard-grid-clean {
    grid-template-columns: minmax(420px, .92fr) minmax(520px, 1.08fr) !important;
    gap: 14px !important;
}

.dashboard-page .chart-panel,
.dashboard-page .installs-panel {
    min-height: 0 !important;
    padding: 18px !important;
}

.dashboard-page .compact-bar-shell {
    height: 176px !important;
}

.dashboard-page .installs-panel .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.dashboard-page .installs-panel .app-install-card {
    min-height: 72px !important;
}

.dashboard-page .premium-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 12px !important;
}

.dashboard-page .premium-stat-card {
    min-height: 108px !important;
}

@media (max-width: 1440px) {
    .dashboard-page .dashboard-grid-clean {
        grid-template-columns: minmax(380px, .94fr) minmax(470px, 1.06fr) !important;
    }
}

@media (max-width: 1180px) {
    .dashboard-page .dashboard-grid-clean,
    .dashboard-page .premium-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 760px) {
    .dashboard-page .dashboard-grid-clean,
    .dashboard-page .premium-stats-grid,
    .dashboard-page .installs-panel .apps-grid {
        grid-template-columns: 1fr !important;
    }

    .dashboard-page .admin-topbar h1 {
        font-size: 18px !important;
    }
}

/* Final compact dashboard override - 20260713. Must stay after all panel rules. */
.dashboard-layout {
    gap: 16px;
}

.premium-stats-grid {
    gap: 12px;
}

.premium-stat-card {
    min-height: 118px;
    padding: 16px;
}

.stat-copy strong {
    font-size: 30px;
}

.dashboard-grid {
    grid-template-columns: minmax(360px, .9fr) minmax(460px, 1.1fr);
    gap: 16px;
    align-items: stretch;
}

.chart-panel {
    min-height: 0;
    padding: 18px;
}

.chart-panel .premium-panel-header {
    margin-bottom: 14px;
}

.status-chart-layout {
    min-height: 188px;
    display: grid;
    grid-template-columns: 174px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.compact-doughnut-shell {
    width: 166px;
    height: 166px;
    justify-self: center;
    position: relative;
}

.compact-doughnut-shell canvas,
.compact-bar-shell canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.status-summary-list {
    display: grid;
    gap: 8px;
}

.status-summary-item {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 11px;
    border: 1px solid var(--jg-line);
    border-left-width: 4px;
    border-radius: 8px;
    background: var(--jg-surface-soft);
}

.status-summary-item span {
    color: var(--jg-muted);
    font-size: 14px;
    font-weight: 800;
}

.status-summary-item strong {
    color: var(--jg-text);
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
}

.status-summary-item.is-active {
    border-left-color: #16a34a;
}

.status-summary-item.is-expired {
    border-left-color: #f59e0b;
}

.status-summary-item.is-blocked {
    border-left-color: #ef4444;
}

.status-summary-item.is-open {
    border-left-color: #06b6d4;
}

.status-summary-item.is-total {
    border-left-color: var(--jg-primary);
}

.compact-bar-shell {
    height: 188px;
}

.apps-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.app-install-card {
    min-height: 78px;
    padding: 14px;
}

.app-install-card .app-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
}

.app-info strong {
    font-size: 15px;
}

.app-info small {
    font-size: 13px;
}

@media (max-width: 1440px) {
    .dashboard-grid {
        grid-template-columns: minmax(330px, .92fr) minmax(420px, 1.08fr);
    }

    .apps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .status-chart-layout {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dashboard-layout {
        gap: 14px;
    }

    .premium-stat-card,
    .chart-panel,
    .app-install-card {
        padding: 15px;
    }

    .status-chart-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .compact-doughnut-shell {
        width: 154px;
        height: 154px;
    }

    .compact-bar-shell {
        height: 170px;
    }

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

/* Dashboard cleanup - 20260713. Removes oversized hero/status chart spacing. */
.dashboard-page .admin-topbar {
    min-height: 60px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.dashboard-page .admin-topbar .eyebrow {
    display: none;
}

.dashboard-page .admin-topbar h1 {
    color: var(--jg-primary);
    font-size: clamp(18px, 1.4vw, 20px);
    line-height: 1.1;
    font-weight: 900;
}

.dashboard-page .admin-content {
    padding-top: 18px;
}

.dashboard-page .dashboard-layout {
    gap: 14px;
}

.dashboard-page .dashboard-hero,
.dashboard-page .status-chart-layout,
.dashboard-page .compact-doughnut-shell {
    display: none !important;
}

.dashboard-page .dashboard-grid-clean {
    grid-template-columns: minmax(420px, .92fr) minmax(520px, 1.08fr);
    gap: 14px;
}

.dashboard-page .chart-panel,
.dashboard-page .installs-panel {
    min-height: 0;
    padding: 18px;
}

.dashboard-page .compact-bar-shell {
    height: 176px;
}

.dashboard-page .installs-panel .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.dashboard-page .installs-panel .app-install-card {
    min-height: 72px;
}

.dashboard-page .premium-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-page .premium-stat-card {
    min-height: 108px;
}

@media (max-width: 1440px) {
    .dashboard-page .dashboard-grid-clean {
        grid-template-columns: minmax(380px, .94fr) minmax(470px, 1.06fr);
    }
}

@media (max-width: 1180px) {
    .dashboard-page .dashboard-grid-clean,
    .dashboard-page .premium-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .dashboard-page .dashboard-grid-clean,
    .dashboard-page .premium-stats-grid,
    .dashboard-page .installs-panel .apps-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-page .admin-topbar h1 {
        font-size: 18px;
    }
}

/* Compact CRM dashboard refresh - 20260713. Visual layer only. */
.dashboard-layout {
    gap: 16px;
}

.premium-stats-grid {
    gap: 12px;
}

.premium-stat-card {
    min-height: 118px;
    padding: 16px;
}

.stat-copy strong {
    font-size: 30px;
}

.dashboard-grid {
    grid-template-columns: minmax(360px, .9fr) minmax(460px, 1.1fr);
    gap: 16px;
    align-items: stretch;
}

.chart-panel {
    min-height: 0;
    padding: 18px;
}

.chart-panel .premium-panel-header {
    margin-bottom: 14px;
}

.chart-panel .metric-pill {
    min-height: 32px;
    padding: 5px 10px;
}

.status-chart-layout {
    min-height: 188px;
    display: grid;
    grid-template-columns: 174px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.compact-doughnut-shell {
    width: 166px;
    height: 166px;
    justify-self: center;
    position: relative;
}

.compact-doughnut-shell canvas,
.compact-bar-shell canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.status-summary-list {
    display: grid;
    gap: 8px;
}

.status-summary-item {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 11px;
    border: 1px solid var(--jg-line);
    border-left-width: 4px;
    border-radius: 8px;
    background: var(--jg-surface-soft);
}

.status-summary-item span {
    color: var(--jg-muted);
    font-size: 14px;
    font-weight: 800;
}

.status-summary-item strong {
    color: var(--jg-text);
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
}

.status-summary-item.is-active {
    border-left-color: #16a34a;
}

.status-summary-item.is-expired {
    border-left-color: #f59e0b;
}

.status-summary-item.is-blocked {
    border-left-color: #ef4444;
}

.status-summary-item.is-open {
    border-left-color: #06b6d4;
}

.status-summary-item.is-total {
    border-left-color: var(--jg-primary);
}

.compact-bar-shell {
    height: 188px;
}

.apps-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.app-install-card {
    min-height: 78px;
    padding: 14px;
}

.app-install-card .app-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
}

.app-info strong {
    font-size: 15px;
}

.app-info small {
    font-size: 13px;
}

@media (max-width: 1440px) {
    .dashboard-grid {
        grid-template-columns: minmax(330px, .92fr) minmax(420px, 1.08fr);
    }

    .apps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .status-chart-layout {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dashboard-layout {
        gap: 14px;
    }

    .premium-stat-card,
    .chart-panel,
    .app-install-card {
        padding: 15px;
    }

    .status-chart-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .compact-doughnut-shell {
        width: 154px;
        height: 154px;
    }

    .compact-bar-shell {
        height: 170px;
    }

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

/* Premium panel refresh - 20260713. Visual layer only. */
:root {
    --jg-page: #eef4fb;
    --jg-page-soft: #f7fbff;
    --jg-surface-strong: #ffffff;
    --jg-surface-soft: #f8fbff;
    --jg-line: #d9e5f4;
    --jg-shadow-lg: 0 24px 70px rgba(15, 23, 42, .11);
    --jg-shadow-md: 0 14px 34px rgba(15, 23, 42, .09);
    --jg-radius-lg: 8px;
    --jg-chart-text: #475569;
    --jg-chart-grid: #e2e8f0;
}

html[data-theme="dark"] {
    --jg-bg: #06111f;
    --jg-page: #071426;
    --jg-page-soft: #0a182a;
    --jg-surface: #0d1b2f;
    --jg-surface-strong: #10213a;
    --jg-surface-soft: #0b1a2d;
    --jg-border: #1d3556;
    --jg-line: #203a5d;
    --jg-text: #e8f1ff;
    --jg-muted: #9db3cf;
    --jg-sidebar: #040d19;
    --jg-chart-text: #b8c8df;
    --jg-chart-grid: #1e3552;
}

body.admin-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .10), transparent 28rem),
        linear-gradient(180deg, var(--jg-page-soft) 0%, var(--jg-page) 100%);
    color: var(--jg-text);
    font-family: Inter, "Segoe UI", Roboto, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.admin-shell {
    grid-template-columns: 300px minmax(0, 1fr);
}

.admin-sidebar {
    padding: 20px 16px;
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--jg-sidebar) 92%, #1d4ed8) 0%, var(--jg-sidebar) 100%);
    box-shadow: 12px 0 34px rgba(15, 23, 42, .18);
}

.admin-brand {
    min-height: 68px;
    padding: 8px 12px 22px;
    gap: 14px;
    font-size: 18px;
    font-weight: 850;
}

.admin-brand img {
    width: 50px;
    height: 50px;
}

.admin-nav {
    gap: 8px;
    margin-top: 10px;
}

.admin-nav-link {
    min-height: 52px;
    padding: 13px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 760;
    color: rgba(255, 255, 255, .82);
}

.admin-nav-link i {
    width: 24px;
    font-size: 18px;
    text-align: center;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(37, 99, 235, .30);
    color: #fff;
}

.admin-nav-link.active {
    box-shadow: inset 4px 0 0 #60a5fa, 0 12px 30px rgba(0, 0, 0, .20);
}

.admin-sidebar-footer {
    padding: 17px 14px;
    font-size: 15px;
    border-radius: 8px;
}

.admin-sidebar-footer small {
    font-size: 14px;
}

.admin-topbar {
    min-height: 94px;
    padding: 22px 34px;
    background: color-mix(in srgb, var(--jg-surface-strong) 94%, transparent);
    border-bottom: 1px solid var(--jg-line);
}

.admin-topbar h1 {
    font-size: clamp(30px, 2.4vw, 36px);
    line-height: 1.08;
    font-weight: 880;
}

.eyebrow {
    color: var(--jg-muted);
    font-size: 14px;
    line-height: 1.35;
}

.topbar-actions {
    gap: 12px;
}

.admin-user {
    min-height: 40px;
    padding: 8px 13px;
    border-color: var(--jg-line);
    border-radius: 8px;
    background: var(--jg-surface-strong);
    color: var(--jg-muted);
    font-size: 15px;
}

.admin-content {
    padding: 30px 34px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 760;
    line-height: 1.25;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
}

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

.btn-sm {
    min-height: 40px;
    padding: 8px 13px;
    font-size: 15px;
}

.btn-light {
    background: var(--jg-surface-strong);
    border-color: var(--jg-line);
    color: var(--jg-text);
}

.btn-primary {
    box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.theme-toggle {
    min-width: 134px;
}

.stat-card,
.panel,
.table-panel,
.premium-panel {
    background: var(--jg-surface-strong);
    border: 1px solid var(--jg-line);
    border-radius: var(--jg-radius-lg);
    box-shadow: var(--jg-shadow-md);
}

.panel-title,
.premium-panel-header h2 {
    color: var(--jg-text);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 850;
}

.users-toolbar .panel-title,
.table-toolbar .panel-title {
    color: var(--jg-text);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 850;
}

.panel-subtitle,
.premium-panel-header p {
    color: var(--jg-muted);
    font-size: 15px;
    line-height: 1.35;
}

.users-toolbar .panel-subtitle,
.table-toolbar .panel-subtitle {
    color: var(--jg-muted);
    font-size: 15px;
    line-height: 1.35;
}

.dashboard-layout {
    display: grid;
    gap: 20px;
}

.dashboard-hero {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    padding: 26px;
    border: 1px solid var(--jg-line);
    border-radius: var(--jg-radius-lg);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--jg-primary) 12%, var(--jg-surface-strong)) 0%, var(--jg-surface-strong) 58%),
        var(--jg-surface-strong);
    box-shadow: var(--jg-shadow-lg);
}

.dashboard-hero h2 {
    margin: 6px 0 8px;
    color: var(--jg-text);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.06;
    font-weight: 900;
}

.dashboard-hero p {
    max-width: 720px;
    margin: 0;
    color: var(--jg-muted);
    font-size: 16px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--jg-line);
    border-radius: 999px;
    background: var(--jg-surface-soft);
    color: var(--jg-primary);
    font-size: 14px;
    font-weight: 820;
}

.hero-summary {
    min-width: 190px;
    display: grid;
    align-content: center;
    gap: 2px;
    padding: 20px;
    border: 1px solid var(--jg-line);
    border-radius: var(--jg-radius-lg);
    background: var(--jg-surface-soft);
}

.hero-summary span,
.hero-summary small {
    color: var(--jg-muted);
    font-size: 14px;
    font-weight: 760;
}

.hero-summary strong {
    color: var(--jg-text);
    font-size: 42px;
    line-height: 1;
    font-weight: 900;
}

.premium-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.premium-stat-card {
    min-height: 142px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border: 1px solid var(--jg-line);
    border-radius: var(--jg-radius-lg);
    background: var(--jg-surface-strong);
    box-shadow: var(--jg-shadow-md);
}

.stat-copy {
    display: grid;
    gap: 7px;
}

.stat-copy span {
    color: var(--jg-muted);
    font-size: 15px;
    font-weight: 820;
}

.stat-copy strong {
    color: var(--jg-text);
    font-size: 34px;
    line-height: 1;
    font-weight: 900;
}

.stat-copy small {
    color: var(--jg-muted);
    font-size: 14px;
}

.premium-stat-icon,
.app-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex: 0 0 auto;
    font-size: 22px;
}

.tone-blue .premium-stat-icon,
.app-icon {
    color: #2563eb;
    background: rgba(37, 99, 235, .12);
}

.tone-green .premium-stat-icon {
    color: #16a34a;
    background: rgba(22, 163, 74, .12);
}

.tone-amber .premium-stat-icon {
    color: #d97706;
    background: rgba(245, 158, 11, .14);
}

.tone-red .premium-stat-icon {
    color: #dc2626;
    background: rgba(239, 68, 68, .12);
}

.tone-cyan .premium-stat-icon {
    color: #0891b2;
    background: rgba(6, 182, 212, .12);
}

.tone-purple .premium-stat-icon {
    color: #7c3aed;
    background: rgba(124, 58, 237, .12);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
}

.premium-panel {
    padding: 22px;
}

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

.premium-panel-header h2,
.premium-panel-header p {
    margin: 0;
}

.premium-panel-header p {
    margin-top: 6px;
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var(--jg-line);
    border-radius: 999px;
    background: var(--jg-surface-soft);
    color: var(--jg-muted);
    font-size: 14px;
    font-weight: 820;
    white-space: nowrap;
}

.chart-panel {
    min-height: 390px;
}

.empty-data {
    min-height: 170px;
    display: grid;
    place-items: center;
    border: 1px dashed var(--jg-line);
    border-radius: var(--jg-radius-lg);
    background: var(--jg-surface-soft);
    color: var(--jg-muted);
    font-size: 16px;
    font-weight: 780;
    text-align: center;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.app-install-card {
    min-height: 86px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--jg-line);
    border-radius: var(--jg-radius-lg);
    background: var(--jg-surface-soft);
    color: var(--jg-text);
    text-align: left;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.app-install-card:hover {
    transform: translateY(-2px);
    border-color: var(--jg-primary);
    box-shadow: var(--jg-shadow-md);
}

.app-info {
    min-width: 0;
    display: grid;
    gap: 3px;
    flex: 1 1 auto;
}

.app-info strong {
    font-size: 16px;
    font-weight: 850;
}

.app-info small {
    color: var(--jg-muted);
    font-size: 14px;
}

.table-panel.users-panel,
.dashboard-table-panel {
    overflow: hidden;
    border-color: var(--jg-line);
    border-radius: var(--jg-radius-lg);
    background: var(--jg-surface-strong);
    box-shadow: var(--jg-shadow-lg);
}

.table-toolbar,
.users-toolbar {
    min-height: 88px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--jg-line);
    background: var(--jg-surface-strong);
}

.users-filters {
    grid-template-columns: minmax(360px, 1fr) 170px 220px 190px;
    gap: 12px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--jg-line);
    background: var(--jg-surface-soft);
}

.form-control,
.form-select,
.users-filters .form-control,
.users-filters .form-select {
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid color-mix(in srgb, var(--jg-line) 86%, #94a3b8);
    border-radius: 8px;
    background-color: var(--jg-surface-strong);
    color: var(--jg-text);
    font-size: 15px;
    line-height: 1.35;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--jg-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.users-panel .table-responsive,
.dashboard-table-panel .table-responsive {
    overflow-x: hidden;
    background: var(--jg-surface-strong);
}

.premium-table,
.users-compact-table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--jg-text);
    --bs-table-border-color: var(--jg-line);
    --bs-table-hover-bg: color-mix(in srgb, var(--jg-primary) 6%, var(--jg-surface-strong));
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 16px;
}

.premium-table > :not(caption) > * > *,
.users-compact-table > :not(caption) > * > * {
    background-color: transparent;
    color: var(--jg-text);
    border-color: var(--jg-line);
}

.premium-table th,
.premium-table td,
.users-compact-table th,
.users-compact-table td {
    padding: 17px 22px;
    line-height: 1.45;
    border-color: var(--jg-line);
}

.premium-table thead th,
.users-compact-table thead th {
    height: 60px;
    background: color-mix(in srgb, var(--jg-primary) 9%, var(--jg-surface-soft)) !important;
    color: var(--jg-text);
    font-size: 17px;
    font-weight: 850;
    text-transform: none;
    vertical-align: middle;
    border-bottom: 1px solid var(--jg-line);
}

.premium-table tbody td,
.users-compact-table tbody td {
    height: 68px;
    background: var(--jg-surface-strong);
    color: var(--jg-text);
    font-size: 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--jg-line);
}

.premium-table tbody tr,
.users-compact-table tbody tr {
    transition: background .18s ease, box-shadow .18s ease;
}

.premium-table tbody tr:hover,
.users-compact-table tbody tr:hover {
    background: color-mix(in srgb, var(--jg-primary) 6%, var(--jg-surface-strong));
    box-shadow: inset 4px 0 0 var(--jg-primary);
}

.users-compact-table th:nth-child(1) {
    width: 30%;
}

.users-compact-table th:nth-child(2) {
    width: 25%;
}

.users-compact-table th:nth-child(3) {
    width: 17%;
}

.users-compact-table th:nth-child(4) {
    width: 12%;
}

.users-compact-table th:nth-child(5) {
    width: 16%;
}

.user-name-cell span {
    color: var(--jg-text);
    font-size: 16px;
    font-weight: 850;
}

.mac-code,
code.mac-code,
.premium-table code {
    display: inline-block;
    max-width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--jg-line);
    border-radius: 7px;
    background: var(--jg-surface-soft);
    color: var(--jg-text);
    font-family: "Cascadia Mono", "Roboto Mono", Consolas, monospace;
    font-size: 15px;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.validity-cell {
    color: var(--jg-text);
    font-size: 16px;
}

.status-cell .badge,
.premium-table .badge {
    min-width: 60px;
    padding: 8px 11px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 850;
    line-height: 1;
}

.details-button {
    min-width: 128px;
    min-height: 44px;
    padding: 9px 14px;
    border: 1px solid var(--jg-line);
    background: var(--jg-surface-strong);
    color: var(--jg-text);
    font-size: 15px;
    font-weight: 820;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .07);
}

.details-button:hover {
    border-color: var(--jg-primary);
    color: var(--jg-primary);
    background: color-mix(in srgb, var(--jg-primary) 5%, var(--jg-surface-strong));
}

.table-footer {
    min-height: 64px;
    padding: 16px 24px;
    background: var(--jg-surface-soft);
    color: var(--jg-muted);
    font-size: 15px;
}

.modal-content {
    border: 1px solid var(--jg-line);
    border-radius: var(--jg-radius-lg);
    background: var(--jg-surface-strong);
    color: var(--jg-text);
    box-shadow: var(--jg-shadow-lg);
}

.modal-header,
.modal-footer {
    border-color: var(--jg-line);
}

.details-grid > div {
    background: var(--jg-surface-soft);
    border-color: var(--jg-line);
}

.details-grid span {
    color: var(--jg-muted);
    font-size: 14px;
}

.details-grid strong {
    color: var(--jg-text);
    font-size: 16px;
}

.empty-state {
    padding: 44px 22px;
    color: var(--jg-muted);
    font-size: 16px;
}

html[data-theme="dark"] .text-bg-success {
    color: #052e16 !important;
    background-color: #86efac !important;
}

html[data-theme="dark"] .text-bg-warning {
    color: #451a03 !important;
    background-color: #fcd34d !important;
}

html[data-theme="dark"] .text-bg-danger {
    color: #450a0a !important;
    background-color: #fca5a5 !important;
}

html[data-theme="dark"] .text-bg-primary {
    color: #082f49 !important;
    background-color: #93c5fd !important;
}

html[data-theme="dark"] .btn-close {
    filter: invert(1) grayscale(100%);
}

html[data-theme="dark"] .alert {
    border-color: var(--jg-line);
}

@media (max-width: 1280px) {
    .premium-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .admin-shell {
        grid-template-columns: 280px minmax(0, 1fr);
    }

    .users-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        width: min(86vw, 320px);
    }

    .admin-topbar {
        min-height: auto;
        padding: 20px;
    }

    .admin-content {
        padding: 20px;
    }

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

    .dashboard-hero {
        flex-direction: column;
    }
}

@media (max-width: 680px) {
    .admin-topbar h1 {
        font-size: 30px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .premium-stats-grid,
    .apps-grid,
    .users-filters {
        grid-template-columns: 1fr;
    }

    .dashboard-hero,
    .premium-panel,
    .premium-stat-card {
        padding: 18px;
    }

    .table-toolbar,
    .users-toolbar {
        padding: 20px;
    }

    .users-panel .table-responsive,
    .dashboard-table-panel .table-responsive,
    .app-details-modal .table-responsive {
        overflow-x: auto;
    }

    .users-compact-table,
    .premium-table {
        min-width: 780px;
    }

    .premium-table th,
    .premium-table td,
    .users-compact-table th,
    .users-compact-table td {
        padding: 15px 16px;
    }

    .details-button {
        min-width: 48px;
        width: 48px;
        padding-left: 0;
        padding-right: 0;
    }

    .details-button span {
        display: none;
    }
}

/* Final compact dashboard override - 20260713 dashboard compact. Keep this block last. */
.dashboard-layout {
    gap: 16px;
}

.premium-stats-grid {
    gap: 12px;
}

.premium-stat-card {
    min-height: 118px;
    padding: 16px;
}

.stat-copy strong {
    font-size: 30px;
}

.dashboard-grid {
    grid-template-columns: minmax(360px, .9fr) minmax(460px, 1.1fr);
    gap: 16px;
    align-items: stretch;
}

.chart-panel {
    min-height: 0;
    padding: 18px;
}

.chart-panel .premium-panel-header {
    margin-bottom: 14px;
}

.status-chart-layout {
    min-height: 188px;
    display: grid;
    grid-template-columns: 174px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.compact-doughnut-shell {
    width: 166px;
    height: 166px;
    justify-self: center;
    position: relative;
}

.compact-doughnut-shell canvas,
.compact-bar-shell canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.status-summary-list {
    display: grid;
    gap: 8px;
}

.status-summary-item {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 11px;
    border: 1px solid var(--jg-line);
    border-left-width: 4px;
    border-radius: 8px;
    background: var(--jg-surface-soft);
}

.status-summary-item span {
    color: var(--jg-muted);
    font-size: 14px;
    font-weight: 800;
}

.status-summary-item strong {
    color: var(--jg-text);
    font-size: 20px;
    line-height: 1;
    font-weight: 900;
}

.status-summary-item.is-active {
    border-left-color: #16a34a;
}

.status-summary-item.is-expired {
    border-left-color: #f59e0b;
}

.status-summary-item.is-blocked {
    border-left-color: #ef4444;
}

.status-summary-item.is-open {
    border-left-color: #06b6d4;
}

.status-summary-item.is-total {
    border-left-color: var(--jg-primary);
}

.compact-bar-shell {
    height: 188px;
}

.apps-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.app-install-card {
    min-height: 78px;
    padding: 14px;
}

.app-install-card .app-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
}

.app-info strong {
    font-size: 15px;
}

.app-info small {
    font-size: 13px;
}

@media (max-width: 1440px) {
    .dashboard-grid {
        grid-template-columns: minmax(330px, .92fr) minmax(420px, 1.08fr);
    }

    .apps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .status-chart-layout {
        grid-template-columns: 190px minmax(0, 1fr);
    }

    .apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .dashboard-layout {
        gap: 14px;
    }

    .premium-stat-card,
    .chart-panel,
    .app-install-card {
        padding: 15px;
    }

    .status-chart-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .compact-doughnut-shell {
        width: 154px;
        height: 154px;
    }

    .compact-bar-shell {
        height: 170px;
    }

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