/* VPSRox — user console (dashboard) */

body.dash-console {
    --dash-text: var(--text-main);
    --dash-text-muted: var(--text-secondary);
    --dash-text-faint: var(--text-muted);
    --dash-bg: var(--bg-main);
    --dash-surface: var(--bg-white);
    --dash-border: var(--border-light);
    --dash-header-h: 56px;
    --cb-rail-w: 248px;
    --dash-mobile-bar-h: 62px;
    --cb-text: var(--dash-text);
    --cb-text-2: var(--dash-text-muted);
    --cb-text-3: var(--dash-text-faint);
    --cb-bg: var(--dash-bg);
    --amber-deep: var(--accent-green);

    min-height: 100vh;
    background: var(--dash-bg);
    color: var(--dash-text-muted);
}

body.dash-console::before,
body.dash-console::after {
    opacity: 0.08;
}

@keyframes dash-spin {
    to { transform: rotate(360deg); }
}

@keyframes dash-pulse {
    0%, 100% { opacity: 0.45; }
    50% { opacity: 1; }
}

.dash-spin {
    animation: dash-spin 1s linear infinite;
    flex-shrink: 0;
}

/* ── Top bar ── */

.cb-topbar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--dash-header-h);
    background: linear-gradient(90deg, #071410 0%, var(--bg-card) 52%, #0c2419 100%);
    border-bottom: 1px solid rgba(42, 211, 135, 0.14);
    box-shadow: 0 8px 32px rgba(7, 20, 16, 0.22);
}

.cb-topbar-inner {
    max-width: none;
    margin: 0;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cb-topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cb-topbar-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(42, 211, 135, 0.16);
    border: 1px solid rgba(42, 211, 135, 0.28);
    color: var(--accent-green);
    font-size: 15px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cb-topbar-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-light);
}

.cb-topbar-tag {
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-light-secondary);
}

.cb-topbar-end {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cb-user-chip {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.cb-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-green);
    color: var(--bg-card);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.cb-user-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cb-exit-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light-secondary);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.cb-exit-link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(42, 211, 135, 0.35);
    color: var(--text-light);
}

/* ── Loading ── */

.dash-loading {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(247, 246, 242, 0.92);
}

.dash-loading-spinner {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid rgba(15, 42, 29, 0.12);
    border-top-color: var(--accent-green);
    animation: dash-spin 0.8s linear infinite;
}

.dash-loading-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--dash-text-muted);
}

/* ── Single-page dashboard ── */

.cb-page {
    position: relative;
    z-index: 1;
    min-height: calc(100vh - var(--dash-header-h));
    padding: 28px 24px 48px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(247, 246, 242, 0.35) 100%);
}

.cb-page-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cb-gate-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--dash-header-h) - 96px);
}

.cb-dash-row {
    display: grid;
    gap: 18px;
}

.cb-dash-row--hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

/* Profile card */
.cb-profile-card {
    padding: 22px 24px 18px;
    border-radius: 20px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    box-shadow: 0 10px 30px rgba(15, 42, 29, 0.05);
}

.cb-profile-main {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.cb-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--bg-card);
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    flex-shrink: 0;
}

.cb-profile-name {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--dash-text);
}

.cb-profile-role {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dash-text-faint);
}

.cb-profile-email {
    margin: 0;
    font-size: 14px;
    color: var(--dash-text-muted);
    word-break: break-all;
}

.cb-profile-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 16px;
    border-top: 1px solid var(--dash-border);
}

.cb-profile-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}

.cb-profile-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 8px;
    border-radius: 12px;
    border: 1px solid rgba(42, 211, 135, 0.3);
    background: linear-gradient(145deg, #0f2a1d 0%, #153828 42%, #1a4530 100%);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    box-shadow:
        0 4px 18px rgba(15, 42, 29, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition: background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.cb-profile-action svg {
    color: var(--accent-green);
}

.cb-profile-action:hover {
    background: linear-gradient(145deg, #153828 0%, #1a4530 42%, #227a52 100%);
    border-color: rgba(42, 211, 135, 0.45);
    color: #fff;
    box-shadow:
        0 8px 26px rgba(15, 42, 29, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.cb-profile-action.is-active {
    background: linear-gradient(145deg, #1a4530 0%, #227a52 50%, #2ad387 155%);
    border-color: rgba(255, 255, 255, 0.26);
    color: #fff;
    box-shadow:
        0 6px 22px rgba(42, 211, 135, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.cb-profile-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--dash-text-muted);
    cursor: pointer;
    padding: 0;
}

.cb-profile-link:hover {
    color: var(--bg-card);
}

.cb-profile-logout {
    padding: 8px 16px;
    border-radius: 9999px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    background: rgba(220, 38, 38, 0.06);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #dc2626;
    cursor: pointer;
}

.cb-profile-logout:hover {
    background: rgba(220, 38, 38, 0.1);
}

/* Support card */
.cb-support-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(15, 42, 29, 0.16);
}

.cb-support-card-hit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    min-height: 100%;
    padding: 24px 26px;
    border: none;
    cursor: pointer;
    text-align: left;
    background: linear-gradient(135deg, #0f2a1d 0%, #1a4530 52%, #2ad387 160%);
    color: var(--text-light);
    transition: filter 0.2s;
}

.cb-support-card-hit:hover {
    filter: brightness(1.06);
}

.cb-support-card-hit.is-active {
    outline: 2px solid rgba(255, 255, 255, 0.35);
    outline-offset: -2px;
}

.cb-support-title {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #fff;
}

.cb-support-lead {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    max-width: 280px;
}

.cb-support-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.92);
}

/* Instances hub */
.cb-instances-hub {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--dash-surface);
    border: 1px solid rgba(42, 211, 135, 0.12);
    box-shadow: 0 14px 36px rgba(15, 42, 29, 0.1);
}

.cb-instances-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #0f2a1d 0%, #1a4530 52%, #227a52 120%);
}

.cb-instances-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cb-instances-heading {
    min-width: 0;
}

.cb-instances-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(42, 211, 135, 0.14);
    border: 1px solid rgba(42, 211, 135, 0.28);
    color: var(--accent-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cb-instances-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
}

.cb-instances-count {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
}

.cb-instances-count[hidden] {
    display: none;
}

.cb-instances-buy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    backdrop-filter: blur(6px);
    transition: background 0.2s, border-color 0.2s;
}

.cb-instances-buy:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.32);
}

.cb-instances-body {
    padding: 18px 20px 20px;
}

.cb-instance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
    min-height: 0;
}

.cb-instance-grid--scroll {
    max-height: min(440px, 58vh);
    overflow-y: auto;
    padding-right: 4px;
    scrollbar-width: thin;
    scrollbar-color: rgba(42, 211, 135, 0.35) transparent;
}

.cb-instance-grid--scroll::-webkit-scrollbar {
    width: 6px;
}

.cb-instance-grid--scroll::-webkit-scrollbar-thumb {
    background: rgba(42, 211, 135, 0.35);
    border-radius: 9999px;
}

.cb-instances-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 36px 24px 28px;
    border-radius: 16px;
    border: 1px dashed rgba(42, 211, 135, 0.22);
    background: linear-gradient(180deg, rgba(15, 42, 29, 0.03) 0%, rgba(42, 211, 135, 0.04) 100%);
}

.cb-instances-empty[hidden] {
    display: none;
}

.cb-instances-empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(145deg, #0f2a1d 0%, #1a4530 100%);
    border: 1px solid rgba(42, 211, 135, 0.22);
    color: var(--accent-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.cb-instances-empty-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 800;
    color: var(--dash-text);
}

.cb-instances-empty-desc {
    margin: 0 0 20px;
    max-width: 420px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--dash-text-muted);
}

.cb-instances-empty-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 9999px;
    border: none;
    background: linear-gradient(145deg, #0f2a1d 0%, #1a4530 42%, #227a52 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 42, 29, 0.22);
    transition: filter 0.2s;
}

.cb-instances-empty-cta:hover {
    filter: brightness(1.08);
}

.cb-instance-detail {
    margin-top: 4px;
}

.cb-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: var(--cb-rail-w) minmax(0, 1fr);
    min-height: calc(100vh - var(--dash-header-h));
    width: 100%;
}

.cb-rail {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px 14px 24px;
    background: rgba(255, 255, 255, 0.55);
    border-right: 1px solid var(--dash-border);
    position: sticky;
    top: var(--dash-header-h);
    height: calc(100vh - var(--dash-header-h));
    overflow-y: auto;
}

.cb-rail-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 12px;
    border-radius: 16px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    box-shadow: 0 4px 16px rgba(15, 42, 29, 0.04);
}

.cb-rail-card--account {
    flex-shrink: 0;
}

.cb-rail-card--fleet {
    flex: 1;
    min-height: 0;
}

.cb-rail-card-title {
    margin: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dash-text-faint);
}

.cb-account-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cb-account-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 11px;
    border-radius: 11px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--dash-text-muted);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cb-account-btn:hover {
    background: rgba(15, 42, 29, 0.05);
    color: var(--dash-text);
}

.cb-account-btn.is-active {
    background: var(--bg-card);
    color: var(--text-light);
    border-color: rgba(42, 211, 135, 0.18);
    box-shadow: 0 4px 12px rgba(15, 42, 29, 0.12);
}

.cb-account-btn--out {
    margin-top: 4px;
    color: #b45309;
}

.cb-account-btn--out:hover {
    background: rgba(180, 83, 9, 0.08);
    color: #92400e;
}

.cb-account-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

.cb-rail-label {
    margin: 0 0 10px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--dash-text-faint);
}

.cb-rail-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0;
    margin: 0 0 16px;
    border: none;
}

.cb-rail-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--dash-text-muted);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cb-rail-link:hover {
    background: rgba(15, 42, 29, 0.05);
    color: var(--dash-text);
}

.cb-rail-link.s-nav-active {
    background: var(--bg-card);
    color: var(--text-light);
    border-color: rgba(42, 211, 135, 0.18);
    box-shadow: 0 6px 18px rgba(15, 42, 29, 0.14);
}

.cb-rail-link--out {
    margin-top: 6px;
    color: #b45309;
}

.cb-rail-link--out:hover {
    background: rgba(180, 83, 9, 0.08);
    color: #92400e;
}

.cb-rail-icon {
    flex-shrink: 0;
    opacity: 0.9;
}

.cb-rail-split {
    height: 1px;
    margin: 0 6px 16px;
    background: linear-gradient(90deg, transparent, var(--dash-border), transparent);
}

.cb-rail-fleet {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.cb-rail-fleet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
    padding: 0 2px;
}

.cb-rail-fleet-label {
    margin: 0;
}

.cb-rail-fleet-add {
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(42, 211, 135, 0.35);
    background: rgba(42, 211, 135, 0.1);
    font-size: 12px;
    font-weight: 700;
    color: var(--bg-card);
    cursor: pointer;
    transition: background 0.2s;
}

.cb-rail-fleet-add:hover {
    background: rgba(42, 211, 135, 0.18);
}

.cb-stage {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 24px 28px 36px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(247, 246, 242, 0.35) 100%);
}

.dash-panel {
    flex: 1;
    min-width: 0;
}

.dash-panel--sub {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dash-fleet-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    min-height: 0;
}

.dash-fleet-placeholder {
    font-size: 13px;
    color: var(--dash-text-faint);
    text-align: center;
    padding: 14px 8px;
    margin: 0;
}

.dash-fleet-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 12px;
    border-radius: 14px;
    border: 1px solid rgba(42, 211, 135, 0.22);
    background: linear-gradient(145deg, #0f2a1d 0%, #153828 42%, #1a4530 100%);
    cursor: pointer;
    box-shadow:
        0 4px 16px rgba(15, 42, 29, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s, background 0.2s;
}

.dash-fleet-item:hover {
    border-color: rgba(42, 211, 135, 0.42);
    transform: translateY(-2px);
    box-shadow:
        0 8px 24px rgba(15, 42, 29, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.dash-fleet-item.is-selected {
    border-color: rgba(42, 211, 135, 0.55);
    background: linear-gradient(145deg, #1a4530 0%, #227a52 50%, #2ad387 155%);
    box-shadow:
        0 8px 26px rgba(42, 211, 135, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.dash-fleet-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}

.dash-fleet-dot--active { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25); }
.dash-fleet-dot--pending_setup { background: #eab308; animation: dash-pulse 1.4s ease infinite; }
.dash-fleet-dot--default { background: #ef4444; }

.dash-fleet-body { min-width: 0; flex: 1; }

.dash-fleet-title-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.dash-fleet-flag { font-size: 13px; }

.dash-fleet-item .dash-fleet-title {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-fleet-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
}

.dash-fleet-region {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.62);
}

.dash-fleet-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.dash-fleet-status--active {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

.dash-fleet-status--pending_setup {
    background: rgba(234, 179, 8, 0.18);
    color: #fde047;
}

.dash-fleet-status--default {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

.dash-fleet-id {
    margin-left: auto;
    font-size: 11px;
    font-family: ui-monospace, monospace;
    color: rgba(255, 255, 255, 0.45);
}

.dash-workspace {
    min-width: 0;
}

/* ── Instance view ── */

.cb-machine {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.cb-machine-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-radius: 18px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    box-shadow: 0 10px 30px rgba(15, 42, 29, 0.05);
}

.cb-machine-label {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--dash-text-faint);
}

.cb-machine-bar h1 {
    margin: 0 0 10px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--dash-text);
    background: none;
    -webkit-text-fill-color: unset;
}

.cb-machine-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cb-machine-uuid {
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--dash-text-faint);
    background: var(--bg-main);
    padding: 4px 8px;
    border-radius: 8px;
}

.cb-machine-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.cb-machine-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cb-block-title {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--dash-text);
}

.cb-block-lead {
    margin: 0;
    font-size: 13px;
    color: var(--dash-text-muted);
    line-height: 1.55;
}

.cb-terminal {
    padding: 22px 24px;
    border-radius: 18px;
    background: #0b1712;
    border: 1px solid rgba(42, 211, 135, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.cb-terminal-head {
    margin-bottom: 16px;
}

.cb-terminal-head .cb-block-title {
    color: #e8fff4;
}

.cb-terminal-head .cb-block-lead {
    color: rgba(153, 178, 164, 0.92);
}

.cb-terminal-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cb-term-line {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.cb-term-line .dash-cred-key {
    color: rgba(153, 178, 164, 0.95);
}

.cb-term-line .dash-cred-val {
    color: #f0fdf8;
}

.cb-term-line .dash-cred-copy {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(232, 255, 244, 0.88);
}

.cb-term-line .dash-cred-copy:hover {
    background: rgba(42, 211, 135, 0.16);
    border-color: rgba(42, 211, 135, 0.35);
    color: #e8fff4;
}

.cb-terminal-tip {
    color: rgba(153, 178, 164, 0.92);
    margin-top: 14px;
}

.cb-spec-board,
.cb-addon-board {
    padding: 20px 22px;
    border-radius: 18px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
}

.cb-spec-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0 0;
}

.cb-spec-tile {
    border-radius: 12px;
    background: var(--bg-main);
}

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

.cb-shortcut {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px dashed var(--dash-border);
    background: rgba(255, 255, 255, 0.65);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, transform 0.15s;
}

.cb-shortcut:hover {
    border-color: rgba(42, 211, 135, 0.45);
    background: rgba(42, 211, 135, 0.06);
    transform: translateY(-1px);
}

.cb-shortcut.qa-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.cb-shortcut-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--dash-text);
}

.cb-shortcut-desc {
    font-size: 12px;
    color: var(--dash-text-faint);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
}

.status-pill--active { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.status-pill--pending { background: rgba(234, 179, 8, 0.14); color: #a16207; }
.status-pill--warn { background: rgba(251, 146, 60, 0.14); color: #c2410c; }
.status-pill--muted { background: var(--bg-main); color: var(--dash-text-faint); }

.dash-pending-banner {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(234, 179, 8, 0.1);
    border: 1px solid rgba(234, 179, 8, 0.25);
    font-size: 14px;
    color: #92400e;
}

.dash-cred-row {
    display: grid;
    grid-template-columns: 72px 1fr auto auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--dash-border);
}

.dash-cred-key {
    font-size: 12px;
    font-weight: 700;
    color: var(--dash-text-faint);
}

.dash-cred-val {
    font-size: 13px;
    color: var(--dash-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dash-cred-val--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
}

.dash-cred-copy {
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--dash-border);
    background: var(--dash-surface);
    font-size: 12px;
    font-weight: 600;
    color: var(--dash-text-muted);
    cursor: pointer;
    transition: background 0.2s;
}

.dash-cred-copy:hover {
    background: rgba(42, 211, 135, 0.1);
    border-color: rgba(42, 211, 135, 0.35);
    color: var(--bg-card);
}

.dash-connect-waiting {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 16px;
    gap: 8px;
}

.dash-connect-waiting-title {
    font-size: 15px;
    font-weight: 700;
    color: #e8fff4;
    margin: 0;
}

.dash-connect-waiting-desc {
    font-size: 13px;
    color: rgba(153, 178, 164, 0.92);
    margin: 0;
    max-width: 320px;
}

.dash-connect-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.55;
}

.pwr-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 9999px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, opacity 0.2s;
}

.pwr-btn--vnc {
    background: var(--bg-card);
    color: var(--text-light);
}

.pwr-btn--start {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border-color: rgba(34, 197, 94, 0.25);
}

.pwr-btn--restart {
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    border-color: rgba(59, 130, 246, 0.22);
}

.pwr-btn--stop {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.2);
}

.pwr-btn:hover:not(:disabled) { filter: brightness(1.05); }

.pwr-btn--disabled,
.pwr-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.dash-metrics-grid {
    margin: 0;
}

.dash-metric {
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg-main);
}

.dash-metric dt {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dash-text-faint);
    margin-bottom: 4px;
}

.dash-metric dd {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--dash-text);
}

.dash-addon-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.dash-addon-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: var(--bg-main);
    border: 1px solid var(--dash-border);
}

/* Legacy aliases kept for JS-generated markup compatibility */
.dash-tab { /* styled via .cb-rail-link */ }
.dash-tabs { /* styled via .cb-rail-nav */ }
.dash-tab--logout { /* styled via .cb-rail-link--out */ }

/* ── Sub-panels ── */

.dash-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.dash-panel-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--dash-text);
    margin: 0 0 4px;
}

.dash-panel-lead {
    font-size: 15px;
    color: var(--dash-text-muted);
    margin: 0;
}

.dash-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 9999px;
    border: 1px solid var(--dash-border);
    background: var(--dash-surface);
    font-size: 13px;
    font-weight: 600;
    color: var(--dash-text-muted);
    cursor: pointer;
}

.dash-stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dash-stat-card {
    flex: 1;
    min-width: 180px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 16px;
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
}

.dash-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dash-stat-icon--paid { background: rgba(34, 197, 94, 0.12); color: #16a34a; }
.dash-stat-icon--total { background: rgba(42, 211, 135, 0.12); color: var(--bg-card); }

.dash-stat-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--dash-text-faint);
    margin-bottom: 2px;
}

.dash-stat-val {
    font-size: 22px;
    font-weight: 800;
    color: var(--dash-text);
}

.dash-card {
    background: var(--dash-surface);
    border: 1px solid var(--dash-border);
    border-radius: 18px;
    overflow: hidden;
}

.dash-card--flush { padding: 0; }

.dash-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--dash-border);
}

.dash-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--dash-text);
}

.dash-muted-count {
    font-size: 13px;
    color: var(--dash-text-faint);
}

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

.dash-card-body { padding: 20px; }

.dash-panel-loading {
    padding: 40px 20px;
    text-align: center;
    color: var(--dash-text-muted);
}

.dash-spinner {
    width: 28px;
    height: 28px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 3px solid rgba(15, 42, 29, 0.1);
    border-top-color: var(--accent-green);
    animation: dash-spin 0.8s linear infinite;
}

.dash-table-wrap {
    overflow-x: auto;
}

.inv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.inv-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--dash-text-faint);
    border-bottom: 1px solid var(--dash-border);
    background: var(--bg-main);
}

.inv-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--dash-border);
    vertical-align: middle;
}

.bill-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
}

.bill-badge-paid { background: rgba(34, 197, 94, 0.12); color: #15803d; }
.bill-badge-unpaid { background: rgba(234, 179, 8, 0.12); color: #a16207; }
.bill-badge-expired,
.bill-badge-canceled { background: rgba(239, 68, 68, 0.1); color: #b91c1c; }
.bill-badge-refunded { background: var(--bg-main); color: var(--dash-text-faint); }

.bill-period-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-main);
    color: var(--dash-text-muted);
}

.bill-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 9999px;
    border: none;
    background: var(--bg-card);
    color: var(--text-light);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.bill-view-btn:hover { filter: brightness(1.08); }

.bill-cards-mobile { display: none; padding: 16px; }

.bill-card {
    padding: 16px;
    border-radius: 14px;
    border: 1px solid var(--dash-border);
    background: var(--bg-main);
    margin-bottom: 10px;
}

.bill-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.bill-card-meta { display: flex; flex-direction: column; gap: 2px; }

.bill-card-nr {
    font-family: ui-monospace, monospace;
    font-size: 12px;
    font-weight: 700;
    color: var(--dash-text-faint);
}

.bill-card-date { font-size: 12px; color: var(--dash-text-faint); }

.bill-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--dash-text);
    margin-bottom: 6px;
}

.bill-card-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--dash-text);
}

.dash-empty-panel {
    padding: 48px 24px;
    text-align: center;
}

.dash-empty-panel h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dash-text);
    margin: 0 0 8px;
}

.dash-empty-panel p {
    font-size: 14px;
    color: var(--dash-text-muted);
    margin: 0 0 20px;
}

/* ── Tickets ── */

.tkt-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
    gap: 16px;
    min-height: 480px;
}

.dash-ticket-detail {
    display: flex;
    flex-direction: column;
    min-height: 480px;
}

.dash-ticket-placeholder {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    gap: 12px;
}

.dash-ticket-placeholder h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dash-text);
    margin: 0;
}

.dash-ticket-placeholder p {
    font-size: 14px;
    color: var(--dash-text-muted);
    line-height: 1.6;
    margin: 0;
}

.tkt-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--dash-border);
    cursor: pointer;
    transition: background 0.2s;
}

.tkt-item:hover { background: var(--bg-main); }
.tkt-item.active { background: rgba(42, 211, 135, 0.08); }

.tkt-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    background: var(--bg-main);
    color: var(--dash-text-muted);
}

.dash-ticket-detail-head { min-width: 0; }

.dash-ticket-detail-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--dash-text);
}

.dash-ticket-detail-meta {
    font-size: 12px;
    color: var(--dash-text-faint);
    margin: 4px 0 0;
}

.dash-msg-thread {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 420px;
}

.tkt-msg-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.tkt-msg-row.is-user { flex-direction: row-reverse; }

.tkt-msg-col { flex: 1; min-width: 0; max-width: 85%; }

.tkt-msg-meta {
    font-size: 12px;
    color: var(--dash-text-faint);
    margin-bottom: 4px;
}

.tkt-msg-meta.is-user { text-align: right; }

.tkt-msg-bubble {
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
}

.tkt-msg-bubble.is-admin {
    background: var(--bg-main);
    border: 1px solid var(--dash-border);
    color: var(--dash-text);
}

.tkt-msg-bubble.is-user {
    background: rgba(42, 211, 135, 0.1);
    border: 1px solid rgba(42, 211, 135, 0.22);
    color: var(--dash-text);
}

.tkt-msg-text { margin: 0; white-space: pre-wrap; }

.dash-reply-bar {
    border-top: 1px solid var(--dash-border);
    padding: 16px 20px;
}

/* ── Forms & modals ── */

.dash-form-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.dash-form-actions--between {
    justify-content: space-between;
    align-items: center;
}

.dash-field-hint {
    font-size: 12px;
    color: var(--dash-text-faint);
    margin: 6px 0 0;
}

.dash-inline-input {
    display: flex;
    gap: 8px;
}

.dash-inline-input .m-input { flex: 1; }

.cp-security-note {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(42, 211, 135, 0.08);
    border: 1px solid rgba(42, 211, 135, 0.2);
    font-size: 13px;
    color: var(--dash-text-muted);
}

.dash-strength { margin-top: 8px; }

.dash-strength-track {
    height: 4px;
    border-radius: 9999px;
    background: var(--bg-main);
    overflow: hidden;
}

.dash-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 9999px;
    transition: width 0.3s, background 0.3s;
}

.dash-strength-label {
    font-size: 12px;
    margin-top: 4px;
}

.dash-cp-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
}

.dash-footer-link {
    font-size: 13px;
    color: var(--dash-text-muted);
    text-align: center;
    margin: 0;
}

.dash-footer-link a {
    color: var(--bg-card);
    font-weight: 600;
}

.dash-btn-full { width: 100%; justify-content: center; }

.dash-portal-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 28px;
}

.dash-portal-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(42, 211, 135, 0.12);
    border: 1px solid rgba(42, 211, 135, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-card);
}

.dash-portal-card h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dash-text);
    margin: 0 0 6px;
}

.dash-portal-card p {
    font-size: 14px;
    color: var(--dash-text-muted);
    margin: 0;
    line-height: 1.6;
}

.m-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--dash-text);
    margin-bottom: 6px;
}

.m-input {
    width: 100%;
    padding: 11px 14px;
    border-radius: 12px;
    border: 1px solid var(--dash-border);
    background: var(--dash-surface);
    font-size: 14px;
    font-family: inherit;
    color: var(--dash-text);
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.m-input:focus {
    outline: none;
    border-color: rgba(42, 211, 135, 0.55);
    box-shadow: 0 0 0 3px rgba(42, 211, 135, 0.12);
}

.m-input::placeholder { color: var(--dash-text-faint); }

textarea.m-input { resize: vertical; min-height: 88px; }

.m-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 9999px;
    border: none;
    background: var(--bg-card);
    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s, opacity 0.2s;
}

.m-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.m-btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.m-btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 9999px;
    border: 1px solid var(--dash-border);
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    color: var(--dash-text-muted);
    cursor: pointer;
}

.m-btn-ghost:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.03);
    color: var(--dash-text);
}

.icon-btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--dash-border);
    background: transparent;
    color: var(--dash-text-muted);
    cursor: pointer;
}

.icon-btn-ghost:hover {
    background: var(--bg-main);
    color: var(--dash-text);
}

.m-overlay {
    background: rgba(18, 24, 20, 0.45);
    backdrop-filter: blur(4px);
}

/* ── Billing modal ── */

.cb-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cb-modal[hidden] {
    display: none;
}

.cb-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 24, 20, 0.48);
    backdrop-filter: blur(4px);
}

.cb-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 720px;
    max-height: min(88vh, 820px);
    display: flex;
    flex-direction: column;
    background: var(--dash-surface);
    border-radius: 18px;
    border: 1px solid var(--dash-border);
    box-shadow: 0 24px 48px rgba(15, 42, 29, 0.2);
    overflow: hidden;
}

.cb-modal-panel--wide {
    max-width: 920px;
}

.cb-modal--tickets .cb-modal-panel {
    max-width: 960px;
    max-height: min(90vh, 860px);
}

.cb-modal-body--tickets {
    padding-top: 12px;
}

.cb-modal-body--tickets .tkt-grid {
    min-height: 420px;
}

.cb-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--dash-border);
    flex-shrink: 0;
}

.cb-modal-title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--dash-text);
}

.cb-modal-lead {
    margin: 0;
    font-size: 13px;
    color: var(--dash-text-muted);
    line-height: 1.5;
}

.cb-modal-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.cb-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--dash-border);
    background: transparent;
    color: var(--dash-text-faint);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.cb-modal-close:hover {
    background: var(--bg-main);
    color: var(--dash-text);
}

.cb-modal-body {
    padding: 18px 22px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.m-panel {
    width: 100%;
    background: var(--dash-surface);
    border-radius: 18px;
    border: 1px solid var(--dash-border);
    box-shadow: 0 24px 48px rgba(15, 42, 29, 0.18);
    overflow: hidden;
}

.m-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid var(--dash-border);
}

.m-head-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--dash-text);
}

.m-head-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--dash-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--dash-text-faint);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m-close:hover {
    background: var(--bg-main);
    color: var(--dash-text);
}

.m-body { padding: 18px; }

.btn-spin { animation: dash-spin 1s linear infinite; }

/* ── Empty / gate states ── */

.dash-empty,
.dash-gate {
    padding: 48px 32px;
    border-radius: 18px;
    border: 1px dashed var(--dash-border);
    background: var(--dash-surface);
}

.dash-gate {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 420px;
    margin: 0 auto;
}

.dash-gate-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(42, 211, 135, 0.1);
    border: 1px solid rgba(42, 211, 135, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--bg-card);
}

/* ── Mobile bar ── */

.dash-mobile-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    height: var(--dash-mobile-bar-h);
    background: rgba(247, 246, 242, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--dash-border);
    padding: 0 8px;
    align-items: stretch;
    justify-content: space-around;
}

.dash-mobile-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: transparent;
    font-size: 10px;
    font-weight: 600;
    color: var(--dash-text-faint);
    cursor: pointer;
}

.dash-mobile-btn.s-nav-active { color: var(--bg-card); }
.dash-mobile-btn--logout { color: #b45309; }

/* ── Responsive ── */

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

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

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

@media (max-width: 768px) {
    .cb-page {
        padding: 18px 14px 32px;
    }

    .cb-dash-row--hero {
        grid-template-columns: 1fr;
    }

    .cb-instances-head {
        flex-wrap: wrap;
        padding: 18px 16px;
    }

    .cb-instances-body {
        padding: 14px 14px 16px;
    }

    .cb-profile-actions {
        grid-template-columns: 1fr;
    }

    .cb-instance-grid {
        grid-template-columns: 1fr;
    }

    .cb-instance-grid--scroll {
        max-height: min(360px, 50vh);
    }

    .cb-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .cb-modal-panel {
        max-height: 92vh;
        border-radius: 18px 18px 0 0;
    }

    .cb-machine-bar {
        flex-direction: column;
    }

    .cb-machine-toolbar {
        width: 100%;
        justify-content: flex-start;
    }

    .dash-cred-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .dash-table-wrap { display: none !important; }

    .bill-cards-mobile { display: block; }

    .dash-portal-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .dash-portal-icon {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .cb-topbar-inner,
    .cb-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .cb-machine-bar h1 {
        font-size: 22px;
    }

    .cb-spec-grid,
    .cb-shortcuts {
        grid-template-columns: 1fr;
    }

    .cb-user-label { display: none; }
}
