:root {
    color-scheme: dark;
    font-family: Inter, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0c0d0c;
    color: #f5f5f5;
}

/* Global minimized focus policy */

button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 1px solid rgba(83, 252, 24, 0.42);
    outline-offset: 1px;
}

a:focus-visible {
    outline: 1px solid rgba(83, 252, 24, 0.32);
    outline-offset: 1px;
}

.content {
    padding: 28px 32px;
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 140ms ease,
        transform 140ms ease;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 50%;
    background: #53fc18;
}

/* General typography */

.muted {
    color: #888;
}

h1 {
    margin: 0 0 22px;
    font-size: 2rem;
}

h2 {
    margin-top: 0;
}

/* Panels and grids */

.panel {
    padding: 20px;
    background: #181a18;
    border: 1px solid #2d302d;
    border-radius: 14px;
}

.grid {
    display: grid;
    gap: 18px;
    margin-bottom: 18px;
}

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

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

.stat {
    min-width: 0;
    padding: 20px;
    background: #181a18;
    border: 1px solid #2d302d;
    border-radius: 14px;
}

.stat > span {
    display: block;
    color: #888;
    font-size: 0.8rem;
}

.stat > strong {
    display: block;
    font-size: 2rem;
}

/* Forms */

form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.inline {
    grid-template-columns: 1fr auto;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px;
    background: #0f100f;
    border: 1px solid #3b3f3b;
    border-radius: 8px;
    color: #fff;
}

input[type="color"] {
    height: 42px;
    padding: 2px;
    background: transparent;
    border: 1px solid #3b3f3b;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

button,
.button {
    padding: 11px 14px;
    background: #53fc18;
    border: 0;
    border-radius: 8px;
    color: #101010;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #1b1e1b;
    color: #f4f4f4;
    font-weight: 800;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.16);
}

.btn-primary {
    background: linear-gradient(135deg, #53fc18, #3ed611);
    color: #041102;
    border-color: rgba(83, 252, 24, 0.28);
    box-shadow: 0 8px 20px rgba(83, 252, 24, 0.12);
}

.btn-secondary {
    background: #161816;
    color: #e8e8e8;
    border-color: rgba(255, 255, 255, 0.12);
}

.btn-danger {
    background: #261414;
    color: #ff9d9d;
    border-color: rgba(255, 82, 82, 0.32);
}

.danger {
    background: #7c2d2d;
    color: #fff;
}

.small {
    padding: 7px 10px;
}

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

.toolbar form,
.actions form {
    margin: 0;
}

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

.check input {
    width: auto;
}

/* Tables and rows */

.table {
    display: grid;
    gap: 8px;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #101210;
    border-radius: 8px;
}

.leader-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px;
    border-bottom: 1px solid #2b2e2b;
}

.hero-value {
    font-size: 2.2rem;
    font-weight: 900;
}

/* Utility elements */

code {
    display: block;
    padding: 10px;
    margin: 8px 0;
    overflow: auto;
    background: #0e100e;
    border-radius: 8px;
}

.toast {
    padding: 12px 14px;
    margin-bottom: 16px;
    background: #173b1d;
    border-radius: 10px;
}

.notice {
    padding: 14px 16px;
    margin-bottom: 18px;
    background: #3a3415;
    border: 1px solid #6b5b1f;
    border-radius: 10px;
}

/* Moderation */

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

.moderation-card {
    padding: 14px;
    background: #101210;
    border-radius: 10px;
}

/* Landing page */

.landing {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        radial-gradient(
            circle at top,
            rgba(83, 252, 24, 0.12),
            transparent 38%
        ),
        #0c0d0c;
}

.landing-card {
    width: min(560px, 92vw);
    padding: 36px;
    background: #181a18;
    border: 1px solid #2d302d;
    border-radius: 18px;
}

.eyebrow {
    color: #53fc18;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

/* Chat */

.chat-list {
    max-height: 420px;
    display: grid;
    gap: 6px;
    padding-right: 4px;
    overflow: auto;
}

.chat-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    background: #101210;
    border-radius: 8px;
}

.chat-time {
    min-width: 86px;
    color: #7f857f;
    font-size: 0.76rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 5px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 900;
}

.badge.mod {
    background: #5b2a86;
    color: #fff;
}

.badge.sub {
    background: #1f6a3b;
    color: #fff;
}

.chat-platform-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.6rem;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0.04em;
}

.chat-platform-badge.kick {
    background: #53fc18;
    color: #071004;
}

.chat-platform-badge.twitch {
    background: #9146ff;
    color: #ffffff;
}

/* Analytics status */

.status-live {
    display: inline;
    color: #53fc18 !important;
    font-weight: 900;
}

.status-offline {
    display: inline;
    color: #8d938d !important;
    font-weight: 900;
}

.stat strong .status-live,
.stat strong .status-offline {
    display: inline;
    font-size: 1rem;
}

/* Combined live stream stat card */

.stream-summary {
    margin-top: 10px;
    color: #bdbdbd;
    font-size: 0.9rem;
    line-height: 1.5;
}

.stream-summary div {
    overflow-wrap: anywhere;
}

.stream-summary strong {
    color: #fff;
    font-size: 1.1rem;
}

.stream-title {
    margin-top: 8px;
    color: #fff;
    font-weight: 600;
    line-height: 1.35;
}

/* Current stream panel */

.current-stream-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    margin-top: 15px;
    background: #101210;
    border: 1px solid #2d302d;
    border-radius: 14px;
}

.stream-thumbnail {
    width: min(320px, 100%);
    height: auto;
    flex-shrink: 0;
    object-fit: cover;
    border: 1px solid #2d302d;
    border-radius: 12px;
}

.stream-info {
    min-width: 0;
    flex: 1;
}

.stream-info h3 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 1.4rem;
    overflow-wrap: anywhere;
}

.stream-info p {
    margin: 8px 0;
    color: #bdbdbd;
    font-size: 0.95rem;
}

/* Responsive layout */

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

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

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

    .sidebar {
        position: relative;
        height: auto;
    }

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

    .content {
        padding: 20px;
    }

    .grid.two,
    .moderation-grid {
        grid-template-columns: 1fr;
    }

    .current-stream-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .stream-thumbnail {
        width: 100%;
    }
}

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

    .content {
        padding: 16px;
    }

    .sidebar nav {
        grid-template-columns: 1fr;
    }

    .toolbar,
    .actions {
        align-items: stretch;
        flex-direction: column;
    }

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

/* Queue Manager redesign */

.queue-page {
    --queue-card: #151715;
    --queue-card-soft: #111311;
    --queue-border: rgba(255, 255, 255, 0.09);
    --queue-border-strong: rgba(255, 255, 255, 0.14);
    --queue-muted: #929892;
    --queue-green: #53fc18;
    --queue-danger: #ff6b6b;
    width: min(1500px, 100%);
    margin: 0 auto;
}

.queue-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.queue-page-header h1 {
    margin: 5px 0 7px;
    font-size: clamp(2rem, 3vw, 2.75rem);
    letter-spacing: -0.04em;
}

.queue-page-header p,
.queue-section-header p,
.queue-danger-panel p {
    margin: 0;
    color: var(--queue-muted);
    line-height: 1.55;
}

.queue-eyebrow,
.queue-section-kicker {
    color: var(--queue-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.queue-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid var(--queue-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: #d7dbd7;
    font-size: 0.84rem;
    font-weight: 800;
}

.queue-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--queue-green);
    box-shadow: 0 0 0 4px rgba(83, 252, 24, 0.1);
}

.queue-status-pill.is-locked .queue-status-dot {
    background: #ffb454;
    box-shadow: 0 0 0 4px rgba(255, 180, 84, 0.1);
}

.queue-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.queue-stat-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--queue-border);
    border-radius: 14px;
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 60%),
        var(--queue-card);
}

.queue-stat-label {
    display: block;
    margin-bottom: 12px;
    color: var(--queue-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.queue-stat-value {
    display: block;
    overflow: hidden;
    margin-bottom: 5px;
    color: #fff;
    font-size: 1.7rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-stat-player {
    font-size: 1.28rem;
}

.queue-stat-card small {
    color: #747b74;
    font-size: 0.8rem;
}

.queue-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.75fr);
    align-items: start;
    gap: 18px;
}

.queue-page .panel {
    border-color: var(--queue-border);
    background: var(--queue-card);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

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

.queue-section-header.compact {
    margin-bottom: 18px;
}

.queue-section-header h2,
.queue-danger-panel h2 {
    margin: 5px 0 5px;
    font-size: 1.22rem;
    letter-spacing: -0.02em;
}

.queue-count-badge {
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid var(--queue-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #dfe2df;
    font-size: 0.82rem;
    font-weight: 900;
}

.queue-sidebar-stack {
    display: grid;
    gap: 18px;
}

.queue-add-form,
.queue-settings-form,
.queue-action-buttons form,
.queue-member-actions form,
.queue-danger-panel form {
    margin: 0;
}

.queue-add-form {
    display: grid;
    gap: 8px;
}

.queue-add-form > label,
.queue-field > span {
    color: #d7dbd7;
    font-size: 0.84rem;
    font-weight: 800;
}

.queue-add-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
}

.queue-add-row .btn {
    white-space: nowrap;
}

.queue-page input {
    min-height: 44px;
    border-color: var(--queue-border-strong);
    background: #0d0f0d;
}

.queue-page input:focus {
    outline: none;
    border-color: rgba(83, 252, 24, 0.55);
    box-shadow: 0 0 0 3px rgba(83, 252, 24, 0.09);
}

.queue-control-divider {
    height: 1px;
    margin: 18px 0;
    background: var(--queue-border);
}

.queue-action-buttons {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 9px;
}

.queue-action-buttons .btn,
.queue-action-buttons form {
    width: 100%;
}

.queue-page .btn:disabled,
.queue-page button:disabled {
    cursor: not-allowed;
    opacity: 0.4;
    transform: none;
}

.queue-settings-form {
    display: grid;
    gap: 15px;
}

.queue-field {
    display: grid;
    gap: 8px;
}

.queue-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 13px 14px;
    border: 1px solid var(--queue-border);
    border-radius: 11px;
    background: var(--queue-card-soft);
    cursor: pointer;
}

.queue-toggle-row strong,
.queue-toggle-row small {
    display: block;
}

.queue-toggle-row strong {
    margin-bottom: 3px;
    font-size: 0.88rem;
}

.queue-toggle-row small {
    color: var(--queue-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.queue-switch {
    position: relative;
    width: 44px;
    height: 24px;
    flex: 0 0 44px;
}

.queue-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.queue-switch-track {
    position: absolute;
    inset: 0;
    border: 1px solid var(--queue-border-strong);
    border-radius: 999px;
    background: #292c29;
    transition: 0.2s ease;
}

.queue-switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f3f3f3;
    transition: 0.2s ease;
}

.queue-switch input:checked + .queue-switch-track {
    border-color: rgba(83, 252, 24, 0.4);
    background: rgba(83, 252, 24, 0.22);
}

.queue-switch input:checked + .queue-switch-track::after {
    transform: translateX(20px);
    background: var(--queue-green);
}

.queue-save-button {
    width: 100%;
}

.queue-member-list {
    display: grid;
    gap: 9px;
}

.queue-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--queue-border);
    border-radius: 12px;
    background: var(--queue-card-soft);
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        transform 0.18s ease;
}

.queue-member:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: #141714;
    transform: translateY(-1px);
}

.queue-member.is-next {
    border-color: rgba(83, 252, 24, 0.22);
    background:
        linear-gradient(90deg, rgba(83, 252, 24, 0.06), transparent 45%),
        var(--queue-card-soft);
}

.queue-member-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.queue-position {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 1px solid var(--queue-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #cfd4cf;
    font-size: 0.86rem;
    font-weight: 900;
}

.queue-member.is-next .queue-position {
    border-color: rgba(83, 252, 24, 0.26);
    background: rgba(83, 252, 24, 0.09);
    color: var(--queue-green);
}

.queue-member-text {
    min-width: 0;
}

.queue-member-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.queue-member-text strong {
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.queue-member-text small {
    display: block;
    margin-top: 4px;
    color: var(--queue-muted);
    font-size: 0.77rem;
}

.queue-next-badge,
.queue-host-badge {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 900;
}

.queue-next-badge {
    border: 1px solid rgba(83, 252, 24, 0.22);
    background: rgba(83, 252, 24, 0.09);
    color: var(--queue-green);
}

.queue-host-badge {
    border: 1px solid rgba(173, 139, 255, 0.26);
    background: rgba(173, 139, 255, 0.09);
    color: #c8adff;
}

.queue-member-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
}

.queue-icon-button,
.queue-delete-button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 900;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.queue-icon-button {
    border: 1px solid var(--queue-border);
    background: rgba(255, 255, 255, 0.035);
    color: #d5d9d5;
}

.queue-icon-button:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.queue-delete-button {
    border: 1px solid rgba(255, 107, 107, 0.18);
    background: rgba(255, 107, 107, 0.055);
    color: #ff8d8d;
    font-size: 1.2rem;
}

.queue-delete-button:hover {
    border-color: rgba(255, 107, 107, 0.45);
    background: rgba(255, 107, 107, 0.12);
}

.queue-empty-state {
    display: grid;
    place-items: center;
    gap: 7px;
    min-height: 270px;
    padding: 32px;
    border: 1px dashed var(--queue-border-strong);
    border-radius: 13px;
    background: var(--queue-card-soft);
    color: var(--queue-muted);
    text-align: center;
}

.queue-empty-state strong {
    color: #fff;
}

.queue-empty-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 5px;
    border: 1px solid var(--queue-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #b8beb8;
    font-size: 1.5rem;
}

.queue-danger-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border-color: rgba(255, 107, 107, 0.16) !important;
    background:
        linear-gradient(90deg, rgba(255, 107, 107, 0.035), transparent 55%),
        var(--queue-card) !important;
}

.queue-danger-panel h2 {
    font-size: 1rem;
}

.danger-kicker {
    color: #d57878;
}

.queue-danger-panel .btn {
    white-space: nowrap;
}

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

    .queue-dashboard-grid {
        grid-template-columns: minmax(0, 1.25fr) minmax(310px, 0.75fr);
    }
}

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

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

    .queue-danger-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 680px) {
    .queue-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .queue-stats-grid,
    .queue-sidebar-stack {
        grid-template-columns: 1fr;
    }

    .queue-danger-panel {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .queue-add-row,
    .queue-action-buttons {
        grid-template-columns: 1fr;
    }

    .queue-add-row .btn,
    .queue-danger-panel .btn {
        width: 100%;
    }

    .queue-member {
        align-items: flex-start;
    }

    .queue-member-actions {
        gap: 4px;
    }

    .queue-icon-button,
    .queue-delete-button {
        width: 32px;
        height: 32px;
    }
}

.giveaway-entry-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    margin-bottom: 12px;
}

.giveaway-entry-header h3 {
    margin: 0;
}

.giveaway-entry-header span {
    font-size: 0.9rem;
    opacity: 0.75;
}

.giveaway-entry-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.giveaway-entry-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
}

.giveaway-entry-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.08);
}

.giveaway-entry-name {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.giveaway-entry-weight {
    font-size: 0.85rem;
    opacity: 0.7;
}

.muted {
    opacity: 0.7;
}
/* =========================================================
   TOP GIFTERS
   ========================================================= */

.top-gifters-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.page-heading h1 {
    margin: 3px 0 6px;
}

.page-eyebrow,
.panel-eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    opacity: 0.58;
}

.page-subtitle {
    margin: 0;
    opacity: 0.68;
}

.leader-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid rgba(83, 252, 24, 0.2);
    border-radius: 999px;
    background: rgba(83, 252, 24, 0.06);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.leader-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #53fc18;
    box-shadow: 0 0 12px rgba(83, 252, 24, 0.7);
}

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

.gifter-stat-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.045),
            rgba(255, 255, 255, 0.015)
        );
}

.gifter-stat-label {
    display: block;
    margin-bottom: 9px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.62;
}

.gifter-stat-value {
    display: block;
    overflow: hidden;
    margin-bottom: 5px;
    font-size: 1.75rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gifter-stat-name {
    font-size: 1.25rem;
}

.gifter-stat-detail {
    font-size: 0.8rem;
    opacity: 0.55;
}

.gifter-champion-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    min-height: 150px;
    padding: 24px;
    background:
        radial-gradient(
            circle at 90% 10%,
            rgba(83, 252, 24, 0.13),
            transparent 35%
        ),
        rgba(255, 255, 255, 0.025);
}

.gifter-champion-card::after {
    position: absolute;
    right: -45px;
    bottom: -80px;
    width: 210px;
    height: 210px;
    border: 1px solid rgba(83, 252, 24, 0.11);
    border-radius: 50%;
    content: "";
}

.champion-crown {
    display: grid;
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    place-items: center;
    border: 1px solid rgba(245, 196, 73, 0.3);
    border-radius: 18px;
    background: rgba(245, 196, 73, 0.1);
    font-size: 2rem;
    color: #f5c449;
}

.champion-content {
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 0;
}

.champion-label {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: #f5c449;
}

.champion-content h2 {
    overflow: hidden;
    margin: 7px 0 4px;
    font-size: 1.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.champion-content p {
    margin: 0 0 14px;
    opacity: 0.66;
}

.champion-progress,
.leaderboard-progress {
    overflow: hidden;
    width: 100%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.champion-progress {
    height: 7px;
}

.champion-progress span,
.leaderboard-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #53fc18,
        #8aff61
    );
}

.champion-rank {
    position: relative;
    z-index: 1;
    min-width: 100px;
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1;
    text-align: right;
    opacity: 0.14;
}

.champion-rank span {
    font-size: 1.5rem;
}

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

.leaderboard-panel {
    min-width: 0;
}

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

.panel-heading-row h2 {
    margin: 4px 0 0;
}

.leaderboard-count {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.76rem;
    opacity: 0.7;
    white-space: nowrap;
}

.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.022);
    transition:
        transform 150ms ease,
        border-color 150ms ease,
        background 150ms ease;
}

.leaderboard-entry:hover {
    transform: translateY(-1px);
    border-color: rgba(83, 252, 24, 0.2);
    background: rgba(255, 255, 255, 0.04);
}

.leaderboard-first {
    border-color: rgba(245, 196, 73, 0.24);
    background: rgba(245, 196, 73, 0.045);
}

.leaderboard-second {
    border-color: rgba(193, 205, 216, 0.2);
    background: rgba(193, 205, 216, 0.035);
}

.leaderboard-third {
    border-color: rgba(205, 127, 50, 0.22);
    background: rgba(205, 127, 50, 0.04);
}

.leaderboard-rank {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    font-weight: 800;
}

.leaderboard-first .leaderboard-rank {
    background: rgba(245, 196, 73, 0.12);
    color: #f5c449;
}

.leaderboard-second .leaderboard-rank {
    background: rgba(193, 205, 216, 0.11);
    color: #c1cdd8;
}

.leaderboard-third .leaderboard-rank {
    background: rgba(205, 127, 50, 0.12);
    color: #cd7f32;
}

.rank-medal {
    font-size: 1.1rem;
}

.rank-number {
    font-size: 0.85rem;
    opacity: 0.68;
}

.leaderboard-user {
    flex: 1;
    min-width: 0;
}

.leaderboard-user-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.leaderboard-user-line strong,
.empty-position {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.leaderboard-user-line span:last-child {
    flex: 0 0 auto;
    font-size: 0.8rem;
    opacity: 0.64;
}

.leaderboard-progress {
    height: 5px;
}

.leaderboard-second .leaderboard-progress span {
    background: linear-gradient(
        90deg,
        #9eabb7,
        #d4dbe1
    );
}

.leaderboard-third .leaderboard-progress span {
    background: linear-gradient(
        90deg,
        #a86127,
        #d9995c
    );
}

.leaderboard-empty-row {
    opacity: 0.42;
}

.leaderboard-empty-row:hover {
    transform: none;
    border-color: rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.022);
}

.gifter-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.control-description {
    margin: -4px 0 18px;
    font-size: 0.86rem;
    line-height: 1.5;
    opacity: 0.62;
}

.gifter-control-form {
    display: flex;
    flex-direction: column;
}

.gifter-danger-panel {
    border-color: rgba(229, 86, 86, 0.18);
    background: rgba(229, 86, 86, 0.025);
}

.gifter-danger-panel h2 {
    margin: 5px 0 8px;
}

.gifter-danger-panel p:not(.panel-eyebrow) {
    margin: 0 0 18px;
    font-size: 0.84rem;
    line-height: 1.5;
    opacity: 0.62;
}

.danger-eyebrow {
    color: #ef7777;
    opacity: 0.9;
}

.gifter-empty-state {
    display: grid;
    min-height: 370px;
    padding: 40px 20px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.gifter-empty-icon {
    margin-bottom: 14px;
    font-size: 2.8rem;
}

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

.gifter-empty-state p {
    max-width: 420px;
    margin: 0;
    line-height: 1.55;
    opacity: 0.58;
}

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

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

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

@media (max-width: 700px) {
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .gifter-stat-grid,
    .gifter-sidebar {
        grid-template-columns: 1fr;
    }

    .gifter-champion-card {
        align-items: flex-start;
    }

    .champion-rank {
        display: none;
    }

    .leaderboard-user-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}
/* =========================================================
   COMMANDS PAGE
   ========================================================= */

.commands-page {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.commands-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 13px;
    border: 1px solid rgba(83, 252, 24, 0.2);
    border-radius: 999px;
    background: rgba(83, 252, 24, 0.06);
    font-size: 0.84rem;
    font-weight: 700;
    white-space: nowrap;
}

.commands-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #53fc18;
    box-shadow: 0 0 12px rgba(83, 252, 24, 0.65);
}

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

.command-stat-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.045),
            rgba(255, 255, 255, 0.015)
        );
}

.command-stat-label {
    display: block;
    margin-bottom: 9px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 0.62;
}

.command-stat-value {
    display: block;
    margin-bottom: 5px;
    font-size: 1.75rem;
    line-height: 1.1;
}

.command-stat-detail {
    font-size: 0.8rem;
    opacity: 0.55;
}

.commands-layout {
    display: block;
    width: 100%;
}

/* Command Variable Chips & Reference Modal */
.var-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    background: #101210;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid #2d302d;
}

.var-chip {
    background: #1f231f;
    border: 1px solid #363b36;
    color: #00e701;
    font-family: monospace;
    font-size: 0.78rem;
    padding: 0.22rem 0.55rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.var-chip:hover {
    background: rgba(0, 231, 1, 0.15);
    border-color: #00e701;
    transform: translateY(-1px);
}

.cmd-modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 1.5rem !important;
    background: rgba(0, 0, 0, 0.82) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.cmd-modal-backdrop.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.cmd-modal-card {
    background: #181a18 !important;
    border: 1px solid #2d302d !important;
    border-radius: 16px !important;
    width: 100% !important;
    max-width: 760px !important;
    max-height: 85vh !important;
    overflow-y: auto !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85) !important;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex !important;
    flex-direction: column !important;
    margin: auto !important;
}

.cmd-modal-backdrop.active .cmd-modal-card {
    transform: scale(1);
}

.cmd-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #2d302d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #181a18;
    position: sticky;
    top: 0;
    z-index: 10;
}

.cmd-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

.cmd-modal-close {
    background: none;
    border: none;
    color: #9ea4b0;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    transition: color 0.15s ease, background 0.15s ease;
}

.cmd-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.cmd-modal-body {
    padding: 1.5rem;
    flex: 1;
}

.cmd-modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #2d302d;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    background: #101210;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.var-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.var-card {
    background: #101210;
    border: 1px solid #2d302d;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.5rem;
}

.var-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.var-card code {
    background: #181a18;
    border: 1px solid #2d302d;
    color: #00e701;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

.var-card-desc {
    font-size: 0.8rem;
    color: #9ea4b0;
    line-height: 1.3;
}

.var-card-example {
    font-size: 0.75rem;
    color: #717784;
    font-family: monospace;
    background: #181a18;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-copy-var {
    background: #252a25;
    border: 1px solid #3a423a;
    color: #e1e3e6;
    font-size: 0.72rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.btn-copy-var:hover {
    background: #00e701;
    color: #000;
    border-color: #00e701;
}

.cmd-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #181a18;
    border: 1px solid #00e701;
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    font-size: 0.88rem;
    font-weight: 600;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

.command-library-panel {
    min-width: 0;
}

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

.command-library-header h2 {
    margin: 4px 0 0;
}

.command-library-count {
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.76rem;
    opacity: 0.7;
    white-space: nowrap;
}

.command-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 10px;
    margin-bottom: 16px;
}

.command-search {
    position: relative;
}

.command-search-icon {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.45;
    pointer-events: none;
}

.command-search input {
    width: 100%;
    padding-left: 38px;
}

.command-toolbar select {
    width: 100%;
}

.command-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.command-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.022);
    transition:
        border-color 150ms ease,
        background 150ms ease;
}

.command-card:hover {
    border-color: rgba(83, 252, 24, 0.17);
    background: rgba(255, 255, 255, 0.032);
}

.command-card-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 15px;
}

.command-card-left {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.command-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid rgba(83, 252, 24, 0.21);
    border-radius: 11px;
    background: rgba(83, 252, 24, 0.08);
    color: #53fc18;
    font-size: 1.1rem;
    font-weight: 900;
}

.command-icon-disabled {
    border-color: rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.45);
}

.command-card-info {
    min-width: 0;
}

.command-name-row {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.command-name-row h3 {
    overflow: hidden;
    margin: 0;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-alias-hint {
    margin-left: 6px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.82rem;
    font-weight: 500;
}

.command-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 7px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.command-badge-enabled {
    border: 1px solid rgba(83, 252, 24, 0.2);
    background: rgba(83, 252, 24, 0.08);
    color: #7aff4d;
}

.command-badge-disabled {
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.55);
}

.command-response-preview {
    overflow: hidden;
    margin: 6px 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.72rem;
    opacity: 0.43;
}

.command-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.command-card-actions form {
    margin: 0;
}

.command-action-button {
    width: auto;
    min-width: 72px;
    margin: 0;
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    color: inherit;
    font-size: 0.76rem;
}

.command-action-button:hover {
    border-color: rgba(83, 252, 24, 0.23);
    background: rgba(83, 252, 24, 0.07);
}

.command-editor {
    padding: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(0, 0, 0, 0.16);
}

.command-editor[hidden] {
    display: none;
}

.command-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 12px;
}

.command-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 14px;
}

.command-field label {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.75;
}

.command-field textarea {
    width: 100%;
    resize: vertical;
}

.command-number-input,
.command-prefix-input {
    display: flex;
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.22);
}

.command-number-input input,
.command-prefix-input input {
    min-width: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.command-number-input input:focus,
.command-prefix-input input:focus {
    outline: none;
}

.command-number-input span,
.command-prefix-input span {
    flex: 0 0 auto;
    padding: 0 12px;
    font-size: 0.76rem;
    opacity: 0.55;
}

.command-prefix-input span {
    color: #53fc18;
    font-weight: 900;
    opacity: 1;
}

.command-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 2px 0 16px;
    cursor: pointer;
}

.command-switch-row > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.command-switch-row strong {
    font-size: 0.85rem;
}

.command-switch-row small {
    font-size: 0.75rem;
    opacity: 0.52;
}

.command-switch {
    position: relative;
    width: 46px;
    height: 25px;
    flex: 0 0 46px;
}

.command-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.command-switch-slider {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    transition: background 150ms ease;
}

.command-switch-slider::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: white;
    content: "";
    transition: transform 150ms ease;
}

.command-switch input:checked + .command-switch-slider {
    background: #53fc18;
}

.command-switch input:checked + .command-switch-slider::after {
    transform: translateX(21px);
    background: #0b0d0b;
}

.command-editor-actions {
    display: flex;
    justify-content: flex-end;
}

.command-save-button,
.create-command-button {
    margin: 0;
}

.command-delete-zone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(229, 86, 86, 0.15);
}

.command-delete-zone strong {
    font-size: 0.8rem;
    color: #ef7777;
}

.command-delete-zone p {
    margin: 3px 0 0;
    font-size: 0.73rem;
    opacity: 0.48;
}

.command-delete-zone form {
    margin: 0;
}

.command-delete-button {
    width: auto;
    min-width: 90px;
    margin: 0;
    padding: 8px 12px;
}

.commands-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.create-command-form {
    display: flex;
    flex-direction: column;
}

.command-help-panel h2 {
    margin: 5px 0 8px;
}

.command-help-panel > p:not(.panel-eyebrow) {
    margin: 0 0 16px;
    font-size: 0.84rem;
    line-height: 1.5;
    opacity: 0.62;
}

.command-variable-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.command-variable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.025);
}

.command-variable code {
    color: #7aff4d;
    font-size: 0.76rem;
}

.command-variable span {
    font-size: 0.72rem;
    opacity: 0.55;
}

.command-empty-state {
    display: grid;
    min-height: 330px;
    padding: 40px 20px;
    place-items: center;
    align-content: center;
    text-align: center;
}

.command-empty-icon {
    display: grid;
    width: 56px;
    height: 56px;
    margin-bottom: 14px;
    place-items: center;
    border: 1px solid rgba(83, 252, 24, 0.18);
    border-radius: 16px;
    background: rgba(83, 252, 24, 0.06);
    color: #53fc18;
    font-size: 1.7rem;
    font-weight: 900;
}

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

.command-empty-state p {
    max-width: 410px;
    margin: 0;
    line-height: 1.5;
    opacity: 0.56;
}

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

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

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

@media (max-width: 760px) {
    .command-stat-grid,
    .commands-sidebar {
        grid-template-columns: 1fr;
    }

    .command-toolbar,
    .command-editor-grid {
        grid-template-columns: 1fr;
    }

    .command-card-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .command-card-actions {
        width: 100%;
    }

    .command-card-actions form,
    .command-card-actions button {
        flex: 1;
    }

    .command-action-button {
        width: 100%;
    }

    .command-response-preview {
        white-space: normal;
    }
}
/* =========================================================
   ANALYTICS DASHBOARD
   ========================================================= */

.analytics-page {
    --analytics-card: #151715;
    --analytics-card-soft: #111311;
    --analytics-border: rgba(255, 255, 255, 0.09);
    --analytics-border-strong: rgba(255, 255, 255, 0.14);
    --analytics-muted: #929892;
    --analytics-green: #53fc18;
    width: min(1500px, 100%);
    margin: 0 auto;
}

.analytics-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 20px;
}

.analytics-page-header h1 {
    margin: 5px 0 7px;
    font-size: clamp(2rem, 3vw, 2.75rem);
    letter-spacing: -0.04em;
}

.analytics-page-header p,
.analytics-section-header p {
    margin: 0;
    color: var(--analytics-muted);
    line-height: 1.55;
}

.analytics-eyebrow,
.analytics-section-kicker {
    color: var(--analytics-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.analytics-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid rgba(83, 252, 24, 0.2);
    border-radius: 999px;
    background: rgba(83, 252, 24, 0.06);
    color: #dfffd5;
    font-size: 0.84rem;
    font-weight: 800;
}

.analytics-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--analytics-green);
    box-shadow: 0 0 0 4px rgba(83, 252, 24, 0.1);
}

.analytics-status-pill.is-offline {
    border-color: var(--analytics-border);
    background: rgba(255, 255, 255, 0.035);
    color: #a4aaa4;
}

.analytics-status-pill.is-offline .analytics-status-dot {
    background: #727872;
    box-shadow: 0 0 0 4px rgba(114, 120, 114, 0.1);
}

.analytics-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding: 10px 12px 10px 15px;
    border: 1px solid var(--analytics-border);
    border-radius: 13px;
    background: var(--analytics-card);
}

.analytics-filter-label {
    color: var(--analytics-muted);
    font-size: 0.8rem;
}

.analytics-filter-label strong {
    color: #fff;
}

.analytics-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.analytics-filter-options a {
    padding: 7px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #aab0aa;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        color 0.18s ease;
}

.analytics-filter-options a:hover {
    border-color: var(--analytics-border);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.analytics-filter-options a.is-active {
    border-color: rgba(83, 252, 24, 0.2);
    background: rgba(83, 252, 24, 0.09);
    color: var(--analytics-green);
}

.analytics-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.analytics-stat-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--analytics-border);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            transparent 60%
        ),
        var(--analytics-card);
}

.analytics-stat-card.is-live-card {
    border-color: rgba(83, 252, 24, 0.18);
    background:
        linear-gradient(
            145deg,
            rgba(83, 252, 24, 0.055),
            transparent 65%
        ),
        var(--analytics-card);
}

.analytics-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.analytics-stat-label {
    color: var(--analytics-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.analytics-stat-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--analytics-border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
    color: #aeb4ae;
    font-size: 0.78rem;
    font-weight: 900;
}

.analytics-stat-value {
    display: block;
    overflow: hidden;
    margin-bottom: 5px;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-stat-card small {
    color: #747b74;
    font-size: 0.8rem;
}

.analytics-main-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(330px, 0.75fr);
    align-items: start;
    gap: 18px;
}

.analytics-primary-stack,
.analytics-sidebar-stack {
    display: grid;
    gap: 18px;
}

.analytics-page .panel {
    border-color: var(--analytics-border);
    background: var(--analytics-card);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

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

.analytics-section-header.compact {
    margin-bottom: 18px;
}

.analytics-section-header h2 {
    margin: 5px 0;
    font-size: 1.22rem;
    letter-spacing: -0.02em;
}

.analytics-period-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid var(--analytics-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    color: #dfe2df;
    font-size: 0.76rem;
    font-weight: 800;
}

.analytics-stream-title-block {
    margin-bottom: 14px;
    padding: 16px;
    border: 1px solid rgba(83, 252, 24, 0.14);
    border-radius: 12px;
    background:
        linear-gradient(
            90deg,
            rgba(83, 252, 24, 0.045),
            transparent 70%
        ),
        var(--analytics-card-soft);
}

.analytics-stream-title-block span,
.analytics-detail-grid span {
    display: block;
    margin-bottom: 6px;
    color: var(--analytics-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.analytics-stream-title-block strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 1.1rem;
}

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

.analytics-detail-grid article {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--analytics-border);
    border-radius: 11px;
    background: var(--analytics-card-soft);
}

.analytics-detail-grid strong {
    display: block;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 0.9rem;
}

.analytics-ranking-list,
.analytics-compact-list,
.analytics-activity-list {
    display: grid;
    gap: 8px;
}

.analytics-ranking-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 14px;
    border: 1px solid var(--analytics-border);
    border-radius: 11px;
    background: var(--analytics-card-soft);
    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        transform 0.18s ease;
}

.analytics-ranking-row:hover {
    transform: translateY(-1px);
    border-color: rgba(83, 252, 24, 0.18);
    background: #141714;
}

.analytics-ranking-row.rank-1 {
    border-color: rgba(245, 196, 73, 0.22);
}

.analytics-ranking-row.rank-2 {
    border-color: rgba(193, 205, 216, 0.16);
}

.analytics-ranking-row.rank-3 {
    border-color: rgba(205, 127, 50, 0.18);
}

.analytics-rank-number,
.analytics-compact-rank {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border: 1px solid var(--analytics-border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #cfd4cf;
    font-size: 0.82rem;
    font-weight: 900;
}

.rank-1 .analytics-rank-number {
    color: #f5c449;
}

.rank-2 .analytics-rank-number {
    color: #c1cdd8;
}

.rank-3 .analytics-rank-number {
    color: #cd7f32;
}

.analytics-ranking-user,
.analytics-compact-row > div {
    flex: 1;
    min-width: 0;
}

.analytics-ranking-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.analytics-ranking-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.analytics-ranking-line span {
    flex: 0 0 auto;
    color: var(--analytics-muted);
    font-size: 0.77rem;
}

.analytics-progress {
    overflow: hidden;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.analytics-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        #53fc18,
        #8aff61
    );
}

.analytics-mini-stat-list {
    display: grid;
    gap: 8px;
}

.analytics-mini-stat-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 13px;
    border: 1px solid var(--analytics-border);
    border-radius: 10px;
    background: var(--analytics-card-soft);
}

.analytics-mini-stat-list span {
    color: var(--analytics-muted);
    font-size: 0.8rem;
}

.analytics-mini-stat-list strong {
    color: #fff;
    font-size: 0.92rem;
}

.analytics-compact-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border: 1px solid var(--analytics-border);
    border-radius: 10px;
    background: var(--analytics-card-soft);
}

.analytics-compact-rank {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
    font-size: 0.75rem;
}

.analytics-activity-row {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border: 1px solid var(--analytics-border);
    border-radius: 10px;
    background: var(--analytics-card-soft);
}

.analytics-activity-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: var(--analytics-green);
    box-shadow: 0 0 0 4px rgba(83, 252, 24, 0.08);
}

.analytics-activity-row strong,
.analytics-activity-row small {
    display: block;
}

.analytics-activity-row strong {
    margin-bottom: 3px;
    font-size: 0.84rem;
}

.analytics-activity-row small {
    color: var(--analytics-muted);
    font-size: 0.72rem;
}

.analytics-empty-state {
    display: grid;
    min-height: 250px;
    padding: 32px;
    place-items: center;
    align-content: center;
    border: 1px dashed var(--analytics-border-strong);
    border-radius: 13px;
    background: var(--analytics-card-soft);
    color: var(--analytics-muted);
    text-align: center;
}

.analytics-empty-state strong {
    margin-bottom: 6px;
    color: #fff;
}

.analytics-empty-state p {
    max-width: 420px;
    margin: 0;
    font-size: 0.83rem;
    line-height: 1.5;
}

.analytics-empty-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
    place-items: center;
    border: 1px solid var(--analytics-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #b8beb8;
    font-size: 1.2rem;
    font-weight: 900;
}

.analytics-small-empty {
    padding: 18px;
    border: 1px dashed var(--analytics-border-strong);
    border-radius: 11px;
    background: var(--analytics-card-soft);
    color: var(--analytics-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}

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

    .analytics-main-grid {
        grid-template-columns:
            minmax(0, 1.25fr)
            minmax(310px, 0.75fr);
    }
}

@media (max-width: 900px) {
    .analytics-main-grid {
        grid-template-columns: 1fr;
    }

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

    .analytics-activity-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .analytics-page-header,
    .analytics-filter-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .analytics-filter-options {
        width: 100%;
    }

    .analytics-filter-options a {
        flex: 1 1 auto;
        text-align: center;
    }

    .analytics-stats-grid,
    .analytics-sidebar-stack,
    .analytics-detail-grid {
        grid-template-columns: 1fr;
    }

    .analytics-activity-panel {
        grid-column: auto;
    }

    .analytics-section-header {
        flex-direction: column;
    }

    .analytics-ranking-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

/* =========================================================
   CREATOR OVERVIEW DASHBOARD
   ========================================================= */

.overview-page {
    --overview-card: #151715;
    --overview-card-soft: #111311;
    --overview-border: rgba(255, 255, 255, 0.09);
    --overview-border-strong: rgba(255, 255, 255, 0.14);
    --overview-muted: #929892;
    --overview-green: #53fc18;
    width: min(1500px, 100%);
    margin: 0 auto;
}

.overview-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.overview-page-header h1 {
    margin: 5px 0 7px;
    font-size: clamp(2rem, 3vw, 2.75rem);
    letter-spacing: -0.04em;
}

.overview-page-header p,
.overview-section-header p {
    margin: 0;
    color: var(--overview-muted);
    line-height: 1.55;
}

.overview-eyebrow,
.overview-section-kicker {
    color: var(--overview-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.13em;
}

.overview-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    flex: 0 0 auto;
    padding: 9px 13px;
    border: 1px solid rgba(83, 252, 24, 0.2);
    border-radius: 999px;
    background: rgba(83, 252, 24, 0.06);
    color: #dfffd5;
    font-size: 0.84rem;
    font-weight: 800;
}

.overview-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--overview-green);
    box-shadow: 0 0 0 4px rgba(83, 252, 24, 0.1);
}

.overview-status-pill.is-offline {
    border-color: var(--overview-border);
    background: rgba(255, 255, 255, 0.035);
    color: #a4aaa4;
}

.overview-status-pill.is-offline .overview-status-dot {
    background: #727872;
    box-shadow: 0 0 0 4px rgba(114, 120, 114, 0.1);
}

.overview-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.overview-stat-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--overview-border);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            transparent 60%
        ),
        var(--overview-card);
}

.overview-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.overview-stat-label {
    color: var(--overview-muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.overview-stat-icon {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--overview-border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.035);
    color: #aeb4ae;
    font-size: 0.8rem;
    font-weight: 900;
}

.overview-stat-value {
    display: block;
    overflow: hidden;
    margin-bottom: 5px;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-stat-card small {
    color: #747b74;
    font-size: 0.8rem;
    line-height: 1.4;
}

.overview-main-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.55fr)
        minmax(330px, 0.75fr);
    align-items: start;
    gap: 18px;
}

.overview-primary-stack,
.overview-sidebar-stack {
    display: grid;
    gap: 18px;
}

.overview-page .panel {
    border-color: var(--overview-border);
    background: var(--overview-card);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

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

.overview-section-header.compact {
    margin-bottom: 18px;
}

.overview-section-header h2 {
    margin: 5px 0;
    font-size: 1.22rem;
    letter-spacing: -0.02em;
}

.overview-live-badge,
.overview-count-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid rgba(83, 252, 24, 0.2);
    border-radius: 999px;
    background: rgba(83, 252, 24, 0.07);
    color: var(--overview-green);
    font-size: 0.74rem;
    font-weight: 900;
}

.overview-live-badge.is-offline {
    border-color: var(--overview-border);
    background: rgba(255, 255, 255, 0.035);
    color: #878d87;
}

.overview-stream-layout {
    display: grid;
    grid-template-columns:
        minmax(260px, 0.72fr)
        minmax(0, 1.28fr);
    gap: 16px;
    align-items: stretch;
}

.overview-stream-information {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.overview-stream-title {
    padding: 16px;
    border: 1px solid rgba(83, 252, 24, 0.15);
    border-radius: 12px;
    background:
        linear-gradient(
            90deg,
            rgba(83, 252, 24, 0.045),
            transparent 70%
        ),
        var(--overview-card-soft);
}

.overview-stream-title span,
.overview-stream-details span {
    display: block;
    margin-bottom: 6px;
    color: var(--overview-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.overview-stream-title strong {
    display: block;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 1.05rem;
    line-height: 1.4;
}

.overview-stream-details {
    display: grid;
    gap: 8px;
}

.overview-stream-details article {
    padding: 13px 14px;
    border: 1px solid var(--overview-border);
    border-radius: 11px;
    background: var(--overview-card-soft);
}

.overview-stream-details strong {
    display: block;
    overflow-wrap: anywhere;
    color: #fff;
    font-size: 0.9rem;
}

.overview-thumbnail-wrap {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--overview-border);
    border-radius: 13px;
    background: #090a09;
}

.overview-stream-thumbnail {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 270px;
    max-height: 390px;
    object-fit: cover;
}

.overview-thumbnail-placeholder,
.overview-offline-state {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 270px;
    padding: 32px;
    border: 1px dashed var(--overview-border-strong);
    border-radius: 13px;
    background: var(--overview-card-soft);
    color: var(--overview-muted);
    text-align: center;
}

.overview-thumbnail-placeholder span {
    margin-bottom: 8px;
    color: var(--overview-green);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.16em;
}

.overview-thumbnail-placeholder strong,
.overview-offline-state strong {
    color: #fff;
}

.overview-offline-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin-bottom: 12px;
    place-items: center;
    border: 1px solid var(--overview-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #747a74;
}

.overview-offline-state p {
    max-width: 440px;
    margin: 8px 0 0;
    font-size: 0.84rem;
    line-height: 1.5;
}

.overview-gifter-card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(245, 196, 73, 0.2);
    border-radius: 13px;
    background:
        linear-gradient(
            135deg,
            rgba(245, 196, 73, 0.075),
            transparent 70%
        ),
        var(--overview-card-soft);
}

.overview-gifter-crown {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border: 1px solid rgba(245, 196, 73, 0.22);
    border-radius: 14px;
    background: rgba(245, 196, 73, 0.09);
    color: #f5c449;
    font-size: 1.2rem;
}

.overview-gifter-content {
    min-width: 0;
}

.overview-gifter-content span {
    display: block;
    margin-bottom: 5px;
    color: var(--overview-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.overview-gifter-content strong {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 1.18rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-gifter-content p {
    margin: 4px 0 0;
    color: #f5c449;
    font-size: 0.82rem;
    font-weight: 800;
}

.overview-ranking-list {
    display: grid;
    gap: 8px;
}

.overview-ranking-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 11px;
    border: 1px solid var(--overview-border);
    border-radius: 10px;
    background: var(--overview-card-soft);
}

.overview-ranking-row strong {
    overflow: hidden;
    color: #fff;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-ranking-row > span:last-child {
    color: var(--overview-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.overview-ranking-number,
.overview-command-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--overview-border);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.04);
    color: #cfd4cf;
    font-size: 0.74rem;
    font-weight: 900;
}

.overview-command-icon {
    color: var(--overview-green);
}

.overview-overlay-list {
    display: grid;
    gap: 8px;
}

.overview-overlay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding: 11px;
    border: 1px solid var(--overview-border);
    border-radius: 10px;
    background: var(--overview-card-soft);
}

.overview-overlay-row > div {
    min-width: 0;
}

.overview-overlay-row strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 0.8rem;
}

.overview-overlay-row code {
    display: block;
    overflow: hidden;
    max-width: 100%;
    padding: 0;
    background: transparent;
    color: #7f867f;
    font-size: 0.68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-copy-button {
    flex: 0 0 auto;
    padding: 7px 9px;
    border: 1px solid var(--overview-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    color: #cfd4cf;
    font-size: 0.72rem;
    font-weight: 800;
}

.overview-copy-button:hover {
    border-color: rgba(83, 252, 24, 0.22);
    background: rgba(83, 252, 24, 0.07);
    color: var(--overview-green);
}

.overview-chat-list {
    display: grid;
    gap: 7px;
    max-height: 475px;
    overflow-y: auto;
    padding-right: 4px;
}

.overview-chat-line {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    padding: 10px 11px;
    border: 1px solid var(--overview-border);
    border-radius: 10px;
    background: var(--overview-card-soft);
}

.overview-chat-time {
    padding-top: 2px;
    color: #676d67;
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.overview-chat-content {
    min-width: 0;
}

.overview-chat-user-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 4px;
}

.overview-chat-user-row strong {
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-chat-message {
    display: block;
    overflow-wrap: anywhere;
    color: #c9cdc9;
    font-size: 0.8rem;
    line-height: 1.45;
}

.overview-chat-message .kick-chat-emote {
    display: inline-block;
    width: auto;
    height: 1.8em;
    max-width: 3.6em;
    margin: 0 0.08em;
    object-fit: contain;
    vertical-align: -0.4em;
}

.overview-small-empty {
    padding: 18px;
    border: 1px dashed var(--overview-border-strong);
    border-radius: 11px;
    background: var(--overview-card-soft);
    color: var(--overview-muted);
    font-size: 0.8rem;
    line-height: 1.5;
    text-align: center;
}

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

    .overview-main-grid {
        grid-template-columns:
            minmax(0, 1.25fr)
            minmax(310px, 0.75fr);
    }

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

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

@media (max-width: 900px) {
    .overview-main-grid {
        grid-template-columns: 1fr;
    }

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

    .overview-overlays-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .overview-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .overview-stats-grid,
    .overview-sidebar-stack,
    .overview-stream-details {
        grid-template-columns: 1fr;
    }

    .overview-overlays-panel {
        grid-column: auto;
    }

    .overview-section-header {
        flex-direction: column;
    }

    .overview-stream-thumbnail {
        min-height: 210px;
    }

    .overview-chat-line {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .overview-chat-time {
        padding: 0;
    }

    .overview-overlay-row {
        align-items: stretch;
        flex-direction: column;
    }

    .overview-copy-button {
        width: 100%;
    }
}

.overview-top-reset-form {
    margin: 12px 0 0;
}

.overview-reset-gifter-button {
    width: 100%;
    border: 1px solid rgba(255, 107, 107, 0.2);
    background: rgba(255, 107, 107, 0.055);
    color: #ff9696;
}

.overview-reset-gifter-button:hover {
    border-color: rgba(255, 107, 107, 0.42);
    background: rgba(255, 107, 107, 0.11);
    color: #ffb0b0;
}

/* GIVEAWAY OVERVIEW REDESIGN */

.giveaway-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.giveaway-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
}

.giveaway-page-header h1 {
    margin: 5px 0 8px;
    font-size: clamp(2rem, 3vw, 2.65rem);
    line-height: 1;
}

.giveaway-page-header p {
    max-width: 680px;
    margin: 0;
    color: #858b86;
}

.giveaway-eyebrow {
    display: block;
    color: #6cff47;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.giveaway-page-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #969c97;
    font-size: 0.86rem;
}

.giveaway-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #545954;
}

.giveaway-status-dot.is-active {
    background: #6cff47;
    box-shadow: 0 0 13px rgba(108, 255, 71, 0.55);
}

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

.giveaway-stat-card {
    padding: 18px;
    border: 1px solid #303531;
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.025),
            transparent
        ),
        #171a18;
}

.giveaway-stat-card > span {
    display: block;
    margin-bottom: 10px;
    color: #858b86;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.giveaway-stat-card strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 1.75rem;
    line-height: 1;
}

.giveaway-stat-card small {
    color: #6f7570;
}

.giveaway-main-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.08fr)
        minmax(350px, 0.92fr);
    gap: 18px;
    align-items: start;
}

.giveaway-panel {
    padding: 20px;
    border: 1px solid #303531;
    border-radius: 15px;
    background: #171a18;
    overflow: hidden;
}

.giveaway-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 19px;
}

.giveaway-panel-heading h2 {
    margin: 4px 0 0;
    font-size: 1.28rem;
}

.giveaway-panel-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid #363c37;
    border-radius: 10px;
    color: #6cff47;
    background: #1d211e;
    font-size: 1.25rem;
}

.giveaway-form {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.giveaway-form-row {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 14px;
}

.giveaway-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.giveaway-field label {
    color: #eef1ee;
    font-size: 0.87rem;
    font-weight: 700;
}

.giveaway-field input,
.giveaway-field textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #3a403b;
    border-radius: 9px;
    outline: none;
    background: #101211;
    color: #f7f8f7;
}

.giveaway-field input {
    min-height: 42px;
    padding: 0 12px;
}

.giveaway-field textarea {
    padding: 11px 12px;
    resize: vertical;
}

.giveaway-field input:focus,
.giveaway-field textarea:focus {
    border-color: #6cff47;
    box-shadow: 0 0 0 3px rgba(108, 255, 71, 0.1);
}

.giveaway-field small {
    color: #747a75;
    font-size: 0.76rem;
}

.giveaway-form-section {
    padding: 16px;
    border: 1px solid #2d322e;
    border-radius: 12px;
    background: #141715;
}

.giveaway-section-heading {
    margin-bottom: 14px;
}

.giveaway-section-heading h3 {
    margin: 0 0 3px;
    font-size: 1rem;
}

.giveaway-section-heading p {
    margin: 0;
    color: #777d78;
    font-size: 0.8rem;
}

.giveaway-option-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-bottom: 15px;
}

.giveaway-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px;
    border: 1px solid #303631;
    border-radius: 10px;
    background: #191c1a;
    cursor: pointer;
}

.giveaway-option:hover {
    border-color: #485049;
}

.giveaway-option input {
    width: 15px;
    height: 15px;
    margin: 2px 0 0;
    accent-color: #6cff47;
}

.giveaway-option > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.giveaway-option strong {
    font-size: 0.79rem;
}

.giveaway-option small {
    color: #727873;
    font-size: 0.7rem;
    line-height: 1.35;
}

.giveaway-advanced {
    border: 1px solid #303531;
    border-radius: 11px;
    background: #141715;
}

.giveaway-advanced summary {
    padding: 13px 15px;
    color: #e8ebe8;
    font-size: 0.85rem;
    font-weight: 750;
    cursor: pointer;
}

.giveaway-advanced-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 15px 15px;
}

.giveaway-button {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 800;
    cursor: pointer;
}

.giveaway-button-primary {
    color: #0d110d;
    background: #6cff47;
}

.giveaway-button-primary:hover {
    filter: brightness(0.94);
}

.giveaway-button-secondary {
    border-color: #3a403b;
    color: #edf0ed;
    background: #242824;
}

.giveaway-button-danger {
    border-color: rgba(255, 93, 93, 0.35);
    color: #ff8d8d;
    background: rgba(255, 93, 93, 0.1);
}

.giveaway-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    padding: 0 9px;
    border: 1px solid #3a403b;
    border-radius: 999px;
    color: #969c97;
    background: #202421;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.giveaway-badge.is-active {
    border-color: rgba(108, 255, 71, 0.25);
    color: #6cff47;
    background: rgba(108, 255, 71, 0.08);
}

.giveaway-active-card {
    padding: 18px;
    border: 1px solid rgba(108, 255, 71, 0.2);
    border-radius: 13px;
    background:
        radial-gradient(
            circle at top right,
            rgba(108, 255, 71, 0.11),
            transparent 45%
        ),
        #131614;
}

.giveaway-active-card > span {
    color: #6cff47;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.giveaway-active-card h3 {
    margin: 8px 0 5px;
    font-size: 1.4rem;
}

.giveaway-active-card p {
    margin: 0;
    color: #898f8a;
}

.giveaway-active-card strong {
    color: #fff;
}

.giveaway-current-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.giveaway-current-stats > div {
    padding: 14px;
    border: 1px solid #2e332f;
    border-radius: 11px;
    background: #141715;
}

.giveaway-current-stats span,
.giveaway-detail-grid span,
.giveaway-winner-card span {
    display: block;
    margin-bottom: 5px;
    color: #777d78;
    font-size: 0.7rem;
    font-weight: 750;
    text-transform: uppercase;
}

.giveaway-current-stats strong {
    font-size: 1.4rem;
}

.giveaway-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid #2d322e;
    border-radius: 11px;
    background: #2d322e;
}

.giveaway-detail-grid > div {
    padding: 13px;
    background: #151816;
}

.giveaway-detail-grid strong {
    font-size: 0.86rem;
}

.giveaway-winner-card {
    margin-top: 12px;
    padding: 15px;
    border: 1px solid rgba(108, 255, 71, 0.2);
    border-radius: 11px;
    background: rgba(108, 255, 71, 0.06);
}

.giveaway-winner-card strong {
    color: #6cff47;
    font-size: 1.1rem;
}

.giveaway-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 14px;
}

.giveaway-actions form,
.giveaway-actions button {
    width: 100%;
}

.giveaway-entry-section {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid #2d322e;
}

.giveaway-entry-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 11px;
}

.giveaway-entry-heading h3 {
    margin: 4px 0 0;
    font-size: 1rem;
}

.giveaway-entry-heading > span {
    color: #787e79;
    font-size: 0.77rem;
}

.giveaway-entry-list {
    display: flex;
    max-height: 330px;
    flex-direction: column;
    gap: 6px;
    overflow-y: auto;
}

.giveaway-entry-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 1px solid #2d322e;
    border-radius: 9px;
    background: #141715;
}

.giveaway-entry-number {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 7px;
    color: #6cff47;
    background: rgba(108, 255, 71, 0.08);
    font-size: 0.72rem;
    font-weight: 800;
}

.giveaway-entry-name {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.giveaway-entry-weight {
    color: #737974;
    font-size: 0.73rem;
}

.giveaway-small-empty {
    padding: 19px;
    border: 1px dashed #303531;
    border-radius: 10px;
    color: #747a75;
    text-align: center;
}

.giveaway-empty-state {
    display: flex;
    min-height: 330px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #7d837e;
    text-align: center;
}

.giveaway-empty-state h3 {
    margin: 10px 0 5px;
    color: #e8ebe8;
}

.giveaway-empty-state p {
    max-width: 330px;
    margin: 0;
}

.giveaway-empty-icon {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid #353b36;
    border-radius: 50%;
    color: #6cff47;
    background: #1d211e;
    font-size: 1.35rem;
}

.giveaway-history-empty {
    min-height: 180px;
}

.giveaway-history-count {
    color: #777d78;
    font-size: 0.76rem;
}

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

.giveaway-table {
    width: 100%;
    border-collapse: collapse;
}

.giveaway-table th {
    padding: 10px 12px;
    border-bottom: 1px solid #303531;
    color: #747a75;
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
}

.giveaway-table td {
    padding: 13px 12px;
    border-bottom: 1px solid #272c28;
    color: #dfe2df;
    vertical-align: middle;
}

.giveaway-table tbody tr:last-child td {
    border-bottom: 0;
}

.giveaway-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.018);
}

.giveaway-history-title {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.giveaway-history-title small,
.giveaway-muted {
    color: #727873;
    font-size: 0.74rem;
}

.giveaway-table code {
    padding: 4px 7px;
    border: 1px solid #303531;
    border-radius: 6px;
    color: #6cff47;
    background: #111311;
}

.giveaway-winner-name {
    color: #f0f2f0;
}

.giveaway-actions-column {
    text-align: right !important;
}

.giveaway-delete-button {
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid rgba(255, 93, 93, 0.3);
    border-radius: 8px;
    color: #ff8989;
    background: rgba(255, 93, 93, 0.08);
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
}

.giveaway-delete-button:hover {
    border-color: rgba(255, 93, 93, 0.5);
    background: rgba(255, 93, 93, 0.14);
}

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

    .giveaway-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .giveaway-page-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .giveaway-stat-grid,
    .giveaway-form-row,
    .giveaway-option-grid,
    .giveaway-advanced-fields,
    .giveaway-current-stats,
    .giveaway-detail-grid,
    .giveaway-actions {
        grid-template-columns: 1fr;
    }

    .giveaway-panel {
        padding: 15px;
    }
}
.dashboard-viewing {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.dashboard-viewing select {
    max-width: 18rem;
}

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

/* sidebar-redesign-start */

:root {
    --sidebar-width: 280px;
    --sidebar-bg: #111311;
    --sidebar-panel: #181b18;
    --sidebar-border: #292d29;
    --sidebar-text: #d9ded9;
    --sidebar-muted: #7f897f;
    --sidebar-hover: #202420;
    --sidebar-active: #252c24;
    --sidebar-green: #53fc18;
}

.app-shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.app-shell > .content {
    grid-column: 2;
}

.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 0;
    overflow: visible;
    z-index: 99999;
    background:
        linear-gradient(
            180deg,
            rgba(83, 252, 24, 0.025),
            transparent 180px
        ),
        var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    flex: 0 0 auto;
    padding: 22px 18px 16px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0;
    color: #fff;
    text-decoration: none;
}

.sidebar-brand:hover {
    background: transparent;
}

.sidebar-brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    background: var(--sidebar-green);
    color: #071006;
    font-size: 20px;
    font-weight: 950;
    box-shadow: 0 8px 24px rgba(83, 252, 24, 0.12);
}

.sidebar-brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.sidebar-brand-text strong {
    color: #fff;
    font-size: 15px;
    font-weight: 850;
    letter-spacing: 0.02em;
}

.sidebar-brand-text small {
    margin-top: 4px;
    color: var(--sidebar-muted);
    font-size: 11px;
    font-weight: 600;
}

.sidebar-nav {
    display: block;
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: 4px 12px 18px;
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #343934 transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #343934;
}

.sidebar-section {
    margin-top: 16px;
}

.sidebar-section:first-child {
    margin-top: 4px;
}

.sidebar-section-label {
    padding: 0 11px 7px;
    color: #667066;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sidebar .sidebar-link {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 11px;
    margin: 2px 0;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--sidebar-text);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: none;
}

body.nav-ready .sidebar .sidebar-link {
    transition:
        background 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease;
}

.sidebar .sidebar-link:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

.sidebar .sidebar-link:focus-visible {
    outline: none !important;
    border-color: transparent !important;
    box-shadow: inset 0 0 0 1px rgba(83, 252, 24, 0.2) !important;
}

.sidebar .sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
    transform: translateX(2px);
}

.sidebar .sidebar-link.active {
    border-color: transparent;
    box-shadow: none;
    background: transparent;
    color: #fff;
}

.sidebar-active-box {
    position: absolute;
    top: 0;
    left: 12px;
    right: 12px;
    z-index: 0;
    height: 42px;
    border: 1px solid rgba(83, 252, 24, 0.18);
    border-radius: 10px;
    background:
        linear-gradient(
            90deg,
            rgba(83, 252, 24, 0.16),
            rgba(83, 252, 24, 0.04)
        );
    box-shadow:
        0 0 0 1px rgba(83, 252, 24, 0.06) inset,
        0 0 12px rgba(83, 252, 24, 0.2);
    opacity: 0;
    transform: translateY(0);
    transition:
        transform 180ms cubic-bezier(0.22, 0.61, 0.36, 1),
        height 180ms cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 180ms ease,
        opacity 120ms ease;
    pointer-events: none;
}

.sidebar-active-box.is-moving {
    box-shadow:
        0 0 0 1px rgba(83, 252, 24, 0.1) inset,
        0 0 18px rgba(83, 252, 24, 0.35);
}

.sidebar-icon {
    display: grid;
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
    place-items: center;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.045);
    color: #9ea79e;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.sidebar-link:hover .sidebar-icon,
.sidebar-link.active .sidebar-icon {
    background: rgba(83, 252, 24, 0.1);
    color: var(--sidebar-green);
}

.sidebar-link-text {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    font-size: 13px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-badge {
    flex: 0 0 auto;
    padding: 3px 5px;
    border: 1px solid rgba(83, 252, 24, 0.17);
    border-radius: 5px;
    background: rgba(83, 252, 24, 0.075);
    color: var(--sidebar-green);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.sidebar-footer {
    position: relative;
    flex: 0 0 auto;
    padding: 12px;
    border-top: 1px solid var(--sidebar-border);
    background: rgba(0, 0, 0, 0.12);
}

.sidebar .sidebar-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--sidebar-border);
    border-radius: 12px;
    background: var(--sidebar-panel);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font: inherit;
}

.sidebar .sidebar-profile:hover {
    border-color: #3b423b;
    background: #1e221e;
}

.sidebar-avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 10px;
    background: rgba(83, 252, 24, 0.12);
    color: var(--sidebar-green);
    font-weight: 900;
}

.sidebar-profile-details {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-profile-details strong {
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-profile-details small {
    margin-top: 3px;
    color: var(--sidebar-muted);
    font-size: 10px;
}

.sidebar-profile-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #788178;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-profile-popup {
    display: flex;
    flex-direction: column;
    margin-bottom: 0;
    width: 100%;
    background: #141714;
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    color: #fff;
    max-height: 0;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition:
        max-height 0.26s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.22s ease,
        transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
        margin-bottom 0.26s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.22s ease;
}

.sidebar-profile-popup.is-open {
    max-height: 380px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    margin-bottom: 10px;
    border-color: var(--sidebar-border);
}

.sidebar .sidebar-profile[aria-expanded="true"] .sidebar-profile-arrow {
    transform: rotate(180deg);
}

.sidebar-profile-popup[hidden] {
    display: none !important;
}

.sidebar-profile-popup-header {
    padding: 10px 14px 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--sidebar-muted);
}

.sidebar-profile-popup-list {
    max-height: 220px;
    overflow-y: auto;
    padding: 4px 6px;
}

.sidebar-profile-popup-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: background 0.15s ease;
}

.sidebar-profile-popup-item:hover {
    background: rgba(83, 252, 24, 0.08);
}

.sidebar-profile-popup-item.active {
    background: rgba(83, 252, 24, 0.12);
    border: 1px solid rgba(83, 252, 24, 0.22);
}

.sidebar-profile-popup-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.sidebar-profile-popup-info strong {
    font-size: 13px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-popup-info small {
    font-size: 11px;
    color: var(--sidebar-green);
    margin-top: 2px;
    font-weight: 600;
}

.sidebar-profile-popup-check {
    color: var(--sidebar-green);
    font-weight: 700;
    font-size: 14px;
}

.sidebar-profile-popup-divider {
    height: 1px;
    background: var(--sidebar-border);
    margin: 4px 0;
}

.sidebar-profile-popup-footer {
    display: flex;
    flex-direction: column;
    padding: 4px 6px 8px;
    gap: 2px;
}

.sidebar-profile-popup-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    transition: background 0.15s ease;
}

.sidebar-profile-popup-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-avatar.small {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    font-size: 12px;
}

.topbar-current-creator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.topbar-creator-name {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
}

.topbar-role-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(83, 252, 24, 0.12);
    border: 1px solid rgba(83, 252, 24, 0.25);
    color: #53fc18;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.sidebar .sidebar-logout-form {
    margin-top: 8px;
}

.sidebar-logout-button {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: #899289;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-logout-button:hover {
    border-color: #343934;
    background: #1b1e1b;
    color: #fff;
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        overflow: visible;
    }

    .sidebar-header {
        padding-bottom: 10px;
    }

    .sidebar-nav {
        display: grid;
        max-height: none;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        overflow: visible;
    }

    .sidebar-section {
        margin-top: 0;
    }

    .sidebar-footer {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 140px;
        gap: 10px;
    }

    .sidebar .sidebar-logout-form {
        margin-top: 0;
    }

    .sidebar-logout-button {
        height: 100%;
        border-color: var(--sidebar-border);
        background: var(--sidebar-panel);
    }
}

@media (max-width: 600px) {
    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .sidebar-footer {
        grid-template-columns: 1fr;
    }
}

/* sidebar-redesign-end */

/* shared team management */
.team-page{max-width:1180px;margin:0 auto;padding:24px}.team-header,.section-heading,.dashboard-item,.member-cell,.form-destination{display:flex;align-items:center;justify-content:space-between;gap:16px}.team-header{margin-bottom:20px}.team-header h1{margin:.15rem 0}.team-context{text-align:right;display:grid;gap:4px}.eyebrow{color:var(--sidebar-green);font-weight:800;text-transform:uppercase;letter-spacing:.08em;font-size:.75rem}.team-stats{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}.team-stats .panel{padding:16px}.team-stats span{display:block;color:#929a92;font-size:.78rem}.team-stats strong{display:block;margin-top:8px;font-size:1.35rem}.team-grid{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr);gap:16px;margin:16px 0}.invite-card form{display:grid;gap:9px}.invite-card button{justify-self:start}.form-destination{padding:10px 0}.dashboard-list{display:grid;gap:10px}.dashboard-item{justify-content:flex-start;padding:12px;border:1px solid var(--sidebar-border);border-radius:10px}.dashboard-item>div{display:grid;flex:1}.dashboard-item small,.member-cell small{color:#929a92}.member-avatar{display:grid;place-items:center;width:38px;height:38px;flex:0 0 38px;border-radius:10px;background:rgba(83,252,24,.1);color:var(--sidebar-green);font-weight:900}.role-badge,.status-badge{display:inline-flex;padding:4px 8px;border-radius:999px;background:#282d28;color:#cbd1cb;font-size:.72rem;font-weight:800}.status-badge.accepted{background:rgba(83,252,24,.12);color:var(--sidebar-green)}.status-badge.pending{background:rgba(241,190,62,.13);color:#f1be3e}.status-badge.revoked,.status-badge.removed,.status-badge.declined,.status-badge.expired{background:rgba(239,82,82,.12);color:#ef6b6b}.table-wrap{max-width:100%;overflow:auto}.members-table{min-width:900px}.compact-actions,.compact-actions form{display:flex;gap:6px;align-items:center}.compact-actions select{min-width:105px}.permission-panel{margin-top:16px}.permission-panel table{text-align:center;min-width:760px}.permission-panel td:first-child,.permission-panel th:first-child{text-align:left}.permission-category th{background:#181b18;color:#aab2aa}.permission-yes{color:var(--sidebar-green);font-weight:900}.permission-no{color:#596159}.invitation-result input{width:100%;font-family:monospace}button:focus-visible,input:focus-visible,select:focus-visible,a:focus-visible{outline:none}button:disabled{opacity:.55;cursor:not-allowed}
@media(max-width:900px){.team-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.team-grid{grid-template-columns:1fr}.team-header{align-items:flex-start}.members-table{min-width:0}.members-table thead{display:none}.members-table,.members-table tbody,.members-table tr,.members-table td{display:block;width:100%}.members-table tr{padding:12px 0;border-bottom:1px solid var(--sidebar-border)}.members-table td{display:grid;grid-template-columns:100px 1fr;gap:10px;padding:7px}.members-table td:before{content:attr(data-label);color:#929a92;font-size:.75rem;font-weight:800}.compact-actions{flex-wrap:wrap}}
@media(max-width:600px){.team-page{padding:14px}.team-header{display:block}.team-context{text-align:left;margin-top:12px}.team-stats{grid-template-columns:1fr 1fr}}


/* Community Intelligence */
.community-page {
    display: grid;
    gap: 1.25rem;
}

.community-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    background:
        radial-gradient(
            circle at top right,
            rgba(83, 252, 162, 0.14),
            transparent 42%
        ),
        rgba(17, 22, 29, 0.9);
}

.community-header h1,
.community-panel h2,
.community-profile h2 {
    margin: 0.25rem 0;
}

.community-header p {
    max-width: 720px;
    margin: 0.5rem 0 0;
    color: var(--muted, #9da8b5);
}

.community-eyebrow {
    display: block;
    color: #53fca2;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.community-health-card {
    min-width: 190px;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(83, 252, 162, 0.25);
    border-radius: 16px;
    background: rgba(83, 252, 162, 0.08);
}

.community-health-card span,
.community-health-card small {
    display: block;
}

.community-health-card strong {
    display: block;
    margin: 0.2rem 0;
    font-size: 2rem;
}

.community-health-card small {
    color: var(--muted, #9da8b5);
}

.community-search {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(17, 22, 29, 0.85);
}

.community-search label {
    display: block;
    margin-bottom: 0.45rem;
    font-weight: 700;
}

.community-search-row {
    display: flex;
    gap: 0.75rem;
}

.community-search-row input {
    flex: 1;
    min-width: 0;
}

.community-search-row button {
    white-space: nowrap;
}

.community-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.community-stat-card {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(17, 22, 29, 0.85);
}

.community-stat-card span {
    display: block;
    color: var(--muted, #9da8b5);
    font-size: 0.8rem;
}

.community-stat-card strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.65rem;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: start;
}

.community-panel,
.community-profile {
    overflow: hidden;
}

.community-panel-header,
.community-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.community-count {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(83, 252, 162, 0.1);
    color: #53fca2;
    font-weight: 800;
}

.community-viewer-list {
    display: grid;
}

.community-viewer-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.065);
    color: inherit;
    text-decoration: none;
}

.community-viewer-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.community-leaders-panel .community-viewer-list {
    gap: 0.25rem;
}

.community-leader-row {
    grid-template-columns: 40px 48px 1fr auto;
    min-height: 64px;
    padding: 0.3rem 0.4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    align-items: center;
    gap: 0.55rem;
    transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.community-leader-row:hover {
    transform: translateY(-1px);
    background: rgba(83, 252, 162, 0.08);
    border-color: rgba(83, 252, 162, 0.18);
}

.community-leader-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(83, 252, 162, 0.12);
    border: 1px solid rgba(83, 252, 162, 0.22);
    color: #d7ffe8;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.community-leader-username {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
}

.community-leader-row .community-role-row {
    margin-top: 0.2rem;
    gap: 0.22rem;
}

.community-leader-row .community-role {
    padding: 0.14rem 0.38rem;
    font-size: 0.59rem;
}

.community-leader-metrics {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 0.14rem;
    min-width: 62px;
}

.community-leader-score {
    font-size: 1.35rem;
    line-height: 1;
    font-weight: 850;
    color: #e7fff2;
}

.community-leader-trend {
    font-size: 0.69rem;
    line-height: 1;
    font-weight: 700;
}

.community-rank-number {
    color: var(--muted, #9da8b5);
    font-weight: 800;
}

.community-viewer-main {
    min-width: 0;
}

.community-viewer-main strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-viewer-score {
    min-width: 58px;
    text-align: right;
}

.community-viewer-score strong,
.community-viewer-score span {
    display: block;
}

.community-viewer-score strong {
    font-size: 1.05rem;
}

.community-viewer-score span {
    color: var(--muted, #9da8b5);
    font-size: 0.68rem;
    text-transform: uppercase;
}

.community-role-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.3rem;
}

.community-role {
    display: inline-flex;
    padding: 0.18rem 0.45rem;
    border: 1px solid rgba(83, 252, 162, 0.2);
    border-radius: 999px;
    background: rgba(83, 252, 162, 0.08);
    color: #a8ffd1;
    font-size: 0.65rem;
    font-weight: 800;
    line-height: 1;
}

.community-score-circle {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border: 3px solid #53fca2;
    border-radius: 50%;
    background: rgba(83, 252, 162, 0.06);
}

.community-score-circle strong {
    font-size: 1.7rem;
    line-height: 1;
}

.community-score-circle span {
    color: var(--muted, #9da8b5);
    font-size: 0.7rem;
}

.community-score-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
}

.community-score-card {
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.community-score-card span,
.community-score-card strong {
    display: block;
}

.community-score-card > span {
    color: var(--muted, #9da8b5);
    font-size: 0.72rem;
}

.community-score-card strong {
    margin: 0.2rem 0 0.5rem;
    font-size: 1.2rem;
}

.community-progress {
    height: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.community-progress span {
    height: 100%;
    border-radius: inherit;
    background: #53fca2;
}

.community-profile-stats {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.community-profile-stats article {
    padding: 0.75rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.community-profile-stats span,
.community-profile-stats strong {
    display: block;
}

.community-profile-stats span {
    color: var(--muted, #9da8b5);
    font-size: 0.7rem;
}

.community-recommendation {
    display: inline-flex;
    margin: 0.9rem 0.5rem 0 0;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    font-size: 0.78rem;
    font-weight: 700;
}

.community-recommendation.is-positive {
    background: rgba(83, 252, 162, 0.12);
    color: #7dffbb;
}

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

.community-table {
    width: 100%;
    border-collapse: collapse;
}

.community-table th,
.community-table td {
    padding: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.065);
    text-align: left;
    white-space: nowrap;
}

.community-table th {
    color: var(--muted, #9da8b5);
    font-size: 0.72rem;
    text-transform: uppercase;
}

.community-table a {
    color: inherit;
    font-weight: 750;
}

.community-empty {
    padding: 1.25rem;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--muted, #9da8b5);
    text-align: center;
}

.community-muted {
    color: var(--muted, #9da8b5);
}

.trend-surging,
.trend-up {
    color: #53fca2;
}

.trend-falling,
.trend-down {
    color: #ff7272;
}

.trend-steady {
    color: var(--muted, #9da8b5);
}

@media (max-width: 1100px) {
    .community-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .community-score-grid,
    .community-profile-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .community-header,
    .community-profile-header {
        flex-direction: column;
    }

    .community-health-card {
        width: 100%;
    }

    .community-stat-grid,
    .community-grid,
    .community-score-grid,
    .community-profile-stats {
        grid-template-columns: 1fr;
    }

    .community-search-row {
        flex-direction: column;
    }

    .community-viewer-row {
        grid-template-columns: 28px minmax(0, 1fr) auto;
    }

    .community-viewer-trend {
        display: none;
    }

    .community-leader-row {
        grid-template-columns: 40px 48px 1fr auto;
        min-height: 62px;
    }

    .community-leader-metrics {
        min-width: 56px;
    }

    .community-leader-score {
        font-size: 1.2rem;
    }
}



.community-grid > .community-panel,
.community-grid > .community-profile {
    display: inline-block;
    width: 100%;
    margin: 0 0 16px;
    vertical-align: top;
    break-inside: avoid;
    page-break-inside: avoid;
    height: auto !important;
    min-height: 0 !important;
}

.sidebar-brand-mark img{
    width:100%;
    height:100%;
    object-fit:contain;
    display:block;
}

/* Community Intelligence compact viewer rows */
.community-page .community-leader-row,
.community-page .community-viewer-row {
    display: grid;
    grid-template-columns: 32px 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 68px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
}

.community-page .community-leader-row:last-child,
.community-page .community-viewer-row:last-child {
    border-bottom: 0;
}

.community-page .community-leader-row:hover,
.community-page .community-viewer-row:hover {
    background: rgba(255, 255, 255, 0.025);
}

.community-page .community-rank-number {
    width: 32px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    text-align: center;
}

.community-page .community-leader-avatar,
.community-page .community-viewer-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--panel2);
    color: var(--text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.community-page .community-viewer-main {
    min-width: 0;
    display: grid;
    gap: 5px;
    justify-self: stretch;
}

.community-page .community-leader-username,
.community-page .community-viewer-main > strong {
    display: block;
    min-width: 0;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.community-page .community-role-row {
    display: flex;
    min-width: 0;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.community-page .community-leader-metrics,
.community-page .community-viewer-score {
    min-width: 64px;
    display: grid;
    gap: 4px;
    justify-items: end;
    text-align: right;
}

.community-page .community-leader-score,
.community-page .community-viewer-score strong {
    font-size: 20px;
    font-weight: 850;
    line-height: 1;
}

.community-page .community-leader-trend,
.community-page .community-viewer-score span,
.community-page .community-viewer-trend {
    font-size: 11px;
    line-height: 1.1;
}

.community-page .community-viewer-trend {
    display: none;
}

/* Recognition cards side by side */
.community-page .community-recognition-grid,
.community-page .community-pipeline-grid,
.community-page .community-category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.community-page .community-recognition-grid > *,
.community-page .community-pipeline-grid > *,
.community-page .community-category-grid > * {
    min-width: 0;
    align-self: start;
}

@media (max-width: 1100px) {
    .community-page .community-recognition-grid,
    .community-page .community-pipeline-grid,
    .community-page .community-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .community-page .community-recognition-grid,
    .community-page .community-pipeline-grid,
    .community-page .community-category-grid {
        grid-template-columns: 1fr;
    }

    .community-page .community-leader-row,
    .community-page .community-viewer-row {
        grid-template-columns: 28px 38px minmax(0, 1fr) auto;
        gap: 9px;
        padding: 11px 10px;
    }

    .community-page .community-leader-avatar,
    .community-page .community-viewer-avatar {
        width: 38px;
        height: 38px;
    }
}

/* Final Community Intelligence row alignment */
.community-page .community-viewer-list {
    display: grid;
    width: 100%;
}

.community-page a.community-viewer-row.community-leader-row {
    display: grid;
    grid-template-columns: 30px 42px minmax(0, 1fr) 70px;
    column-gap: 12px;
    align-items: center;
    justify-content: initial;
    width: 100%;
    min-height: 68px;
    padding: 12px 14px;
}

.community-page
a.community-viewer-row.community-leader-row
.community-rank-number {
    grid-column: 1;
    justify-self: center;
    width: auto;
    margin: 0;
}

.community-page
a.community-viewer-row.community-leader-row
.community-leader-avatar {
    grid-column: 2;
    justify-self: center;
    width: 42px;
    height: 42px;
    margin: 0;
}

.community-page
a.community-viewer-row.community-leader-row
.community-viewer-main {
    grid-column: 3;
    justify-self: stretch;
    align-self: center;
    min-width: 0;
    width: auto;
    margin: 0;
    text-align: left;
}

.community-page
a.community-viewer-row.community-leader-row
.community-leader-username {
    display: block;
    overflow: hidden;
    width: 100%;
    margin: 0 0 5px;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.community-page
a.community-viewer-row.community-leader-row
.community-role-row {
    justify-content: flex-start;
    margin: 0;
}

.community-page
a.community-viewer-row.community-leader-row
.community-leader-metrics {
    grid-column: 4;
    justify-self: end;
    align-self: center;
    width: auto;
    min-width: 58px;
    margin: 0;
    text-align: right;
}

.community-page
a.community-viewer-row.community-leader-row
.community-leader-score {
    display: block;
    margin: 0;
    font-size: 20px;
    line-height: 1;
}

.community-page
a.community-viewer-row.community-leader-row
.community-leader-trend {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    line-height: 1;
}

@media (max-width: 600px) {
    .community-page a.community-viewer-row.community-leader-row {
        grid-template-columns: 24px 36px minmax(0, 1fr) 52px;
        column-gap: 8px;
        min-height: 62px;
        padding: 10px 8px;
    }

    .community-page
    a.community-viewer-row.community-leader-row
    .community-leader-avatar {
        width: 36px;
        height: 36px;
    }
}

/* Final Community Intelligence desktop layout */
.community-page .community-recognition-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.community-page .community-recognition-grid > .community-panel {
    min-width: 0;
    align-self: start;
}

.community-page a.community-viewer-row.community-leader-row {
    display: grid;
    grid-template-columns: 30px 42px minmax(0, 1fr) 68px;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 66px;
    padding: 10px 12px;
}

.community-page a.community-viewer-row.community-leader-row .community-rank-number {
    grid-column: 1;
    justify-self: center;
}

.community-page a.community-viewer-row.community-leader-row .community-leader-avatar {
    grid-column: 2;
    justify-self: center;
}

.community-page a.community-viewer-row.community-leader-row .community-viewer-main {
    grid-column: 3;
    justify-self: stretch;
    min-width: 0;
    text-align: left;
}

.community-page a.community-viewer-row.community-leader-row .community-leader-metrics {
    grid-column: 4;
    justify-self: end;
    min-width: 58px;
    text-align: right;
}

@media (max-width: 1100px) {
    .community-page .community-recognition-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .community-page .community-recognition-grid {
        grid-template-columns: 1fr;
    }

    .community-page a.community-viewer-row.community-leader-row {
        grid-template-columns: 24px 36px minmax(0, 1fr) 52px;
        gap: 8px;
        padding: 10px 8px;
    }
}

/* Community Intelligence dashboard grid */
.community-page .community-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    align-items: start;
}

.community-page .community-grid > .community-panel,
.community-page .community-grid > .community-profile {
    min-width: 0;
    width: 100%;
    height: auto;
    margin: 0;
}

.community-page .community-leaders-panel {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .community-page .community-grid {
        grid-template-columns: 1fr;
    }

    .community-page .community-leaders-panel {
        grid-column: auto;
    }
}

/* Fix regular Community Intelligence rows */
.community-page a.community-viewer-row:not(.community-leader-row) {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 72px;
    gap: 14px;
    align-items: center;
    width: 100%;
    min-height: 70px;
    padding: 12px 14px;
}

.community-page a.community-viewer-row:not(.community-leader-row)
.community-rank-number {
    grid-column: 1;
    width: auto;
    justify-self: center;
    text-align: center;
}

.community-page a.community-viewer-row:not(.community-leader-row)
.community-viewer-main {
    grid-column: 2;
    min-width: 0;
    width: 100%;
    justify-self: stretch;
    text-align: left;
}

.community-page a.community-viewer-row:not(.community-leader-row)
.community-viewer-main > strong {
    display: block;
    width: 100%;
    overflow: visible;
    color: var(--text);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-overflow: clip;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.community-page a.community-viewer-row:not(.community-leader-row)
.community-role-row {
    justify-content: flex-start;
    margin-top: 6px;
}

.community-page a.community-viewer-row:not(.community-leader-row)
.community-viewer-score {
    grid-column: 3;
    min-width: 72px;
    justify-self: end;
    text-align: right;
}

/* Leaders have an avatar, so they keep four columns */
.community-page a.community-viewer-row.community-leader-row {
    grid-template-columns: 32px 42px minmax(0, 1fr) 72px;
}

@media (max-width: 600px) {
    .community-page a.community-viewer-row:not(.community-leader-row) {
        grid-template-columns: 28px minmax(0, 1fr) 58px;
        gap: 9px;
        padding: 11px 8px;
    }

    .community-page a.community-viewer-row:not(.community-leader-row)
    .community-viewer-main > strong {
        font-size: 13px;
    }
}

/* Community Intelligence signal chart */
.community-page .community-signals-panel {
    grid-column: 1 / -1;
}

.community-page .community-panel-description {
    max-width: 620px;
    margin: 6px 0 0;
    color: var(--muted, #9da8b5);
    font-size: 0.83rem;
    line-height: 1.5;
}

.community-page .community-signals-total {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(83, 252, 162, 0.2);
    border-radius: 999px;
    background: rgba(83, 252, 162, 0.1);
    color: #53fca2;
    font-size: 0.95rem;
    font-weight: 850;
}

.community-page .community-signal-chart {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.community-page .community-signal-row {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(180px, 1fr) 42px;
    gap: 16px;
    align-items: center;
}

.community-page .community-signal-label {
    min-width: 0;
}

.community-page .community-signal-label strong,
.community-page .community-signal-label span {
    display: block;
}

.community-page .community-signal-label strong {
    color: var(--text, #f5f7f8);
    font-size: 0.88rem;
    font-weight: 800;
    line-height: 1.25;
}

.community-page .community-signal-label span {
    margin-top: 3px;
    color: var(--muted, #9da8b5);
    font-size: 0.72rem;
    line-height: 1.25;
}

.community-page .community-signal-track {
    position: relative;
    height: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 999px;
    background:
        linear-gradient(
            to right,
            transparent 24.5%,
            rgba(255, 255, 255, 0.06) 25%,
            transparent 25.5%,
            transparent 49.5%,
            rgba(255, 255, 255, 0.06) 50%,
            transparent 50.5%,
            transparent 74.5%,
            rgba(255, 255, 255, 0.06) 75%,
            transparent 75.5%
        ),
        rgba(255, 255, 255, 0.045);
}

.community-page .community-signal-bar {
    display: block;
    width: min(calc(var(--signal-value) * 6.6667%), 100%);
    height: 100%;
    min-width: calc(var(--signal-value) * 1px);
    border-radius: inherit;
    transition: width 0.35s ease;
}

.community-page .signal-vip {
    background: linear-gradient(90deg, #53fca2, #77ffc0);
}

.community-page .signal-og {
    background: linear-gradient(90deg, #b28cff, #d1b7ff);
}

.community-page .signal-rising {
    background: linear-gradient(90deg, #57b8ff, #81cbff);
}

.community-page .signal-trending {
    background: linear-gradient(90deg, #ffca57, #ffe08c);
}

.community-page .signal-hidden {
    background: linear-gradient(90deg, #ff7d9c, #ffa5ba);
}

.community-page .community-signal-value {
    color: var(--text, #f5f7f8);
    font-size: 1rem;
    font-weight: 850;
    text-align: right;
}

.community-page .community-signal-scale {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 10px 56px 0 236px;
    color: var(--muted, #9da8b5);
    font-size: 0.66rem;
}

.community-page .community-signal-scale span:nth-child(2),
.community-page .community-signal-scale span:nth-child(3) {
    text-align: center;
}

.community-page .community-signal-scale span:last-child {
    text-align: right;
}

@media (max-width: 760px) {
    .community-page .community-signal-row {
        grid-template-columns: minmax(0, 1fr) 38px;
        gap: 8px 12px;
    }

    .community-page .community-signal-label {
        grid-column: 1;
    }

    .community-page .community-signal-value {
        grid-column: 2;
        grid-row: 1;
    }

    .community-page .community-signal-track {
        grid-column: 1 / -1;
        height: 12px;
    }

    .community-page .community-signal-scale {
        margin: 10px 0 0;
    }
}

/* =========================================================
   Community Intelligence Pro Dashboard
   ========================================================= */

.community-page .community-pro-section-heading {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 8px;
}

.community-page .community-pro-section-heading h2 {
    margin: 5px 0 0;
}

.community-page .community-pro-badge {
    padding: 7px 11px;
    border: 1px solid rgba(83, 252, 162, 0.24);
    border-radius: 999px;
    background: rgba(83, 252, 162, 0.1);
    color: #53fca2;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.community-page .community-pro-health-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(300px, 1.7fr) repeat(3, minmax(150px, 1fr));
    gap: 16px;
}

.community-page .community-pro-health {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
    padding: 22px;
}

.community-page .community-pro-health-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    min-width: 104px;
    height: 104px;
    border: 8px solid rgba(83, 252, 162, 0.16);
    border-top-color: #53fca2;
    border-radius: 50%;
    flex-direction: column;
    text-align: center;
}

.community-page .community-pro-health-score strong {
    color: #53fca2;
    font-size: 2rem;
    line-height: 1;
}

.community-page .community-pro-health-score span {
    color: var(--muted, #9da8b5);
    font-size: 0.75rem;
}

.community-page .community-pro-health h2 {
    margin: 4px 0;
}

.community-page .community-pro-health p {
    margin: 0;
    color: var(--muted, #9da8b5);
    font-size: 0.8rem;
    line-height: 1.5;
}

.community-page .community-pro-kpi {
    display: flex;
    min-height: 148px;
    padding: 22px;
    flex-direction: column;
    justify-content: center;
}

.community-page .community-pro-kpi > span {
    color: var(--muted, #9da8b5);
    font-size: 0.74rem;
    font-weight: 750;
}

.community-page .community-pro-kpi > strong {
    margin: 8px 0;
    color: var(--text, #f5f7f8);
    font-size: 2rem;
}

.community-page .community-pro-kpi > small {
    color: var(--muted, #9da8b5);
    font-size: 0.7rem;
}

.community-page .community-pro-two-column {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.community-page .community-pro-three-column {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.community-page .community-pro-card {
    min-width: 0;
    padding: 20px;
}

.community-page .community-pro-full {
    grid-column: 1 / -1;
}

.community-page .community-pro-insight-list,
.community-page .community-pro-action-list,
.community-page .community-pro-alerts,
.community-page .community-pro-goals {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.community-page .community-pro-insight {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.community-page .community-pro-insight-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(83, 252, 162, 0.1);
    color: #53fca2;
}

.community-page .community-pro-insight p {
    margin: 0;
    color: var(--text, #f5f7f8);
    font-size: 0.8rem;
    line-height: 1.4;
}

.community-page .community-pro-action {
    display: grid;
    gap: 3px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid #53fca2;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
    text-decoration: none;
}

.community-page .community-pro-action:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-1px);
}

.community-page .community-pro-action.action-og {
    border-left-color: #b28cff;
}

.community-page .community-pro-action.action-hidden {
    border-left-color: #ff7d9c;
}

.community-page .community-pro-action.action-risk {
    border-left-color: #ffca57;
}

.community-page .community-pro-action strong {
    color: var(--text, #f5f7f8);
    font-size: 0.78rem;
}

.community-page .community-pro-action span {
    color: var(--muted, #9da8b5);
    font-size: 0.7rem;
    line-height: 1.35;
}

.community-page .community-pro-funnel {
    display: grid;
    gap: 8px;
    margin-top: 20px;
}

.community-page .community-pro-funnel-step {
    display: flex;
    width: max(52%, calc(100% - var(--funnel-step) * 7%));
    min-width: 180px;
    margin-inline: auto;
    padding: 11px 15px;
    border: 1px solid rgba(83, 252, 162, 0.12);
    border-radius: 9px;
    background: rgba(83, 252, 162, 0.055);
    align-items: center;
    justify-content: space-between;
}

.community-page .community-pro-funnel-step span {
    color: var(--muted, #9da8b5);
    font-size: 0.74rem;
}

.community-page .community-pro-funnel-step strong {
    color: #53fca2;
}

.community-page .community-pro-donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    margin-top: 22px;
}

.community-page .community-pro-donut {
    display: grid;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    background:
        conic-gradient(
            #53fca2 0 calc(var(--positive) * 1%),
            #85919f calc(var(--positive) * 1%)
                calc((var(--positive) + var(--steady)) * 1%),
            #ff6d7a calc((var(--positive) + var(--steady)) * 1%)
                100%
        );
    place-items: center;
}

.community-page .community-pro-donut::before {
    grid-area: 1 / 1;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: var(--panel, #151a20);
    content: "";
}

.community-page .community-pro-donut > div {
    z-index: 1;
    grid-area: 1 / 1;
    text-align: center;
}

.community-page .community-pro-donut strong,
.community-page .community-pro-donut span {
    display: block;
}

.community-page .community-pro-donut strong {
    color: #53fca2;
    font-size: 1.65rem;
}

.community-page .community-pro-donut span {
    color: var(--muted, #9da8b5);
    font-size: 0.7rem;
}

.community-page .community-pro-legend {
    display: grid;
    gap: 10px;
    min-width: 160px;
}

.community-page .community-pro-legend > div {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    gap: 8px;
    align-items: center;
    color: var(--muted, #9da8b5);
    font-size: 0.74rem;
}

.community-page .community-pro-legend strong {
    color: var(--text, #f5f7f8);
}

.community-page .legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.community-page .legend-dot.is-positive {
    background: #53fca2;
}

.community-page .legend-dot.is-steady {
    background: #85919f;
}

.community-page .legend-dot.is-negative {
    background: #ff6d7a;
}

.community-page .community-pro-bars {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.community-page .community-pro-bar-row {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(180px, 1fr) 36px;
    gap: 14px;
    align-items: center;
}

.community-page .community-pro-bar-row > div:first-child strong,
.community-page .community-pro-bar-row > div:first-child span {
    display: block;
}

.community-page .community-pro-bar-row > div:first-child strong {
    color: var(--text, #f5f7f8);
    font-size: 0.8rem;
}

.community-page .community-pro-bar-row > div:first-child span {
    margin-top: 3px;
    color: var(--muted, #9da8b5);
    font-size: 0.68rem;
}

.community-page .community-pro-bar-track {
    height: 13px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
}

.community-page .community-pro-bar {
    display: block;
    width: min(calc(var(--bar-value) * 6.6667%), 100%);
    height: 100%;
    border-radius: inherit;
    background: #53fca2;
}

.community-page .community-pro-bar.bar-og {
    background: #b28cff;
}

.community-page .community-pro-bar.bar-rising {
    background: #57b8ff;
}

.community-page .community-pro-bar.bar-trending {
    background: #ffca57;
}

.community-page .community-pro-bar.bar-hidden {
    background: #ff7d9c;
}

.community-page .community-pro-bar-row > strong {
    color: var(--text, #f5f7f8);
    text-align: right;
}

.community-page .community-pro-distribution {
    display: grid;
    gap: 15px;
    margin-top: 22px;
}

.community-page .community-pro-distribution-row {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 32px;
    gap: 12px;
    align-items: center;
}

.community-page .community-pro-distribution-row > span {
    color: var(--muted, #9da8b5);
    font-size: 0.73rem;
}

.community-page .community-pro-distribution-row > strong {
    color: var(--text, #f5f7f8);
    text-align: right;
}

.community-page .community-pro-distribution-track {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
}

.community-page .community-pro-distribution-track > span {
    display: block;
    min-width: 2px;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #53fca2, #57b8ff);
}

.community-page .community-pro-goal {
    display: grid;
    gap: 8px;
}

.community-page .community-pro-goal > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.community-page .community-pro-goal strong {
    color: var(--text, #f5f7f8);
    font-size: 0.74rem;
}

.community-page .community-pro-goal span {
    color: var(--muted, #9da8b5);
    font-size: 0.68rem;
}

.community-page .community-pro-goal-track {
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
}

.community-page .community-pro-goal-track > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #53fca2;
}

.community-page .community-pro-milestones {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.community-page .community-pro-milestones > div {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 8px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.community-page .community-pro-milestones strong {
    grid-row: 1 / 3;
    align-self: center;
    color: #53fca2;
    font-size: 1.3rem;
}

.community-page .community-pro-milestones span,
.community-page .community-pro-milestones small {
    color: var(--muted, #9da8b5);
    font-size: 0.68rem;
}

.community-page .community-pro-alert {
    display: grid;
    gap: 3px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid #57b8ff;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.community-page .community-pro-alert.alert-success {
    border-left-color: #53fca2;
}

.community-page .community-pro-alert.alert-warning {
    border-left-color: #ffca57;
}

.community-page .community-pro-alert.alert-danger {
    border-left-color: #ff6d7a;
}

.community-page .community-pro-alert strong {
    color: var(--text, #f5f7f8);
    font-size: 0.75rem;
}

.community-page .community-pro-alert span {
    color: var(--muted, #9da8b5);
    font-size: 0.68rem;
    line-height: 1.35;
}

@media (max-width: 1100px) {
    .community-page .community-pro-health-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .community-page .community-pro-health {
        grid-column: 1 / -1;
    }

    .community-page .community-pro-three-column {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .community-page .community-pro-health-grid,
    .community-page .community-pro-two-column {
        grid-template-columns: 1fr;
    }

    .community-page .community-pro-health {
        align-items: flex-start;
        flex-direction: column;
    }

    .community-page .community-pro-bar-row {
        grid-template-columns: minmax(0, 1fr) 34px;
    }

    .community-page .community-pro-bar-track {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .community-page .community-pro-donut-wrap {
        align-items: center;
        flex-direction: column;
    }

    .community-page .community-pro-funnel-step {
        width: 100%;
        min-width: 0;
    }
}

/* Revenue Dashboard */
.revenue-page {
    display: grid;
    gap: 22px;
}

.revenue-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.revenue-header h1 {
    margin: 4px 0 7px;
}

.revenue-header p {
    max-width: 720px;
    margin: 0;
    color: var(--muted, #9da8b5);
}

.revenue-eyebrow,
.revenue-section-kicker {
    color: #53fc18;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.revenue-status-pill,
.revenue-rate-badge,
.revenue-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid rgba(83, 252, 24, 0.2);
    border-radius: 999px;
    background: rgba(83, 252, 24, 0.07);
    color: #dffff0;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}

.revenue-status-pill.is-offline,
.revenue-rate-badge.is-muted {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    color: var(--muted, #9da8b5);
}

.revenue-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #53fc18;
    box-shadow: 0 0 12px rgba(83, 252, 24, 0.75);
}

.revenue-status-pill.is-offline .revenue-status-dot {
    background: #727b86;
    box-shadow: none;
}

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

.revenue-stat-card {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.045),
            rgba(255, 255, 255, 0.018)
        );
}

.revenue-feature-card {
    border-color: rgba(83, 252, 24, 0.2);
    background:
        linear-gradient(
            145deg,
            rgba(83, 252, 24, 0.11),
            rgba(83, 252, 24, 0.025)
        );
}

.revenue-stat-label {
    color: var(--muted, #9da8b5);
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.revenue-stat-value {
    overflow-wrap: anywhere;
    color: var(--text, #f5f7f8);
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    line-height: 1;
}

.revenue-stat-card small {
    color: var(--muted, #9da8b5);
}

.revenue-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(290px, 0.8fr);
    gap: 18px;
    align-items: start;
}

.revenue-primary-stack,
.revenue-sidebar-stack {
    display: grid;
    gap: 18px;
    min-width: 0;
}

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

.revenue-section-header.compact {
    margin-bottom: 14px;
}

.revenue-section-header h2,
.revenue-highlight-panel h2 {
    margin: 4px 0 3px;
}

.revenue-section-header p {
    margin: 0;
    color: var(--muted, #9da8b5);
    font-size: 0.85rem;
}

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

.revenue-money-grid article {
    display: grid;
    gap: 7px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.revenue-money-grid span {
    color: var(--muted, #9da8b5);
    font-size: 0.76rem;
}

.revenue-money-grid strong {
    font-size: 1.35rem;
}

.revenue-rate-notice {
    margin-top: 14px;
    padding: 11px 12px;
    border-left: 3px solid #ffca57;
    border-radius: 9px;
    background: rgba(255, 202, 87, 0.07);
    color: var(--muted, #9da8b5);
    font-size: 0.78rem;
}

.revenue-rate-notice code {
    color: #ffdd91;
}

.revenue-ranking-list,
.revenue-activity-list {
    display: grid;
    gap: 9px;
}

.revenue-ranking-row {
    display: grid;
    grid-template-columns: 34px 42px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.revenue-ranking-row.rank-1 {
    border-color: rgba(83, 252, 24, 0.2);
}

.revenue-rank {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.045);
    font-weight: 800;
}

.revenue-supporter-avatar,
.revenue-activity-avatar {
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(83, 252, 24, 0.12);
    color: #91ff6c;
    font-weight: 800;
}

.revenue-supporter-avatar {
    width: 40px;
    height: 40px;
}

.revenue-activity-avatar {
    width: 36px;
    height: 36px;
}

.revenue-supporter-avatar img,
.revenue-activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.revenue-ranking-content {
    min-width: 0;
}

.revenue-ranking-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.revenue-ranking-line strong,
.revenue-ranking-line span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.revenue-ranking-line span {
    color: #91ff6c;
    font-size: 0.78rem;
    font-weight: 700;
}

.revenue-ranking-content small {
    color: var(--muted, #9da8b5);
    font-size: 0.7rem;
}

.revenue-progress {
    height: 5px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
}

.revenue-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(
            90deg,
            #39d60c,
            #75ff48
        );
}

.revenue-highlight-panel {
    text-align: center;
}

.revenue-largest-value {
    margin-top: 18px;
    color: #91ff6c;
    font-size: clamp(2.4rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 0.95;
}

.revenue-largest-unit {
    display: block;
    margin-top: 5px;
    color: var(--muted, #9da8b5);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.revenue-largest-sender {
    display: block;
    margin-top: 14px;
    font-size: 1.05rem;
}

.revenue-highlight-panel blockquote {
    margin: 14px 0 0;
    padding: 11px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted, #9da8b5);
    font-size: 0.8rem;
}

.revenue-mini-stat-list {
    display: grid;
    gap: 9px;
}

.revenue-mini-stat-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.revenue-mini-stat-list div:last-child {
    border-bottom: 0;
}

.revenue-mini-stat-list span {
    color: var(--muted, #9da8b5);
}

.revenue-activity-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.revenue-activity-row:last-child {
    border-bottom: 0;
}

.revenue-activity-row div:last-child {
    display: grid;
    min-width: 0;
}

.revenue-activity-row span,
.revenue-activity-row small {
    color: var(--muted, #9da8b5);
    font-size: 0.73rem;
}

.revenue-empty-state,
.revenue-small-empty {
    padding: 28px 18px;
    text-align: center;
    color: var(--muted, #9da8b5);
}

.revenue-empty-state span {
    display: block;
    margin-bottom: 8px;
    color: #53fc18;
    font-size: 2rem;
}

.revenue-empty-state strong {
    display: block;
    color: var(--text, #f5f7f8);
}

.revenue-empty-state p {
    margin: 7px auto 0;
    max-width: 430px;
}

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

    .revenue-main-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .revenue-header,
    .revenue-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .revenue-stat-grid,
    .revenue-money-grid {
        grid-template-columns: 1fr;
    }

    .revenue-ranking-line {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
    }
}

/* Monetization Dashboard V2 */
.monetization-page {
    display: grid;
    gap: 20px;
}

.monetization-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.monetization-header h1 {
    margin: 5px 0 7px;
}

.monetization-header p {
    max-width: 760px;
    margin: 0;
    color: var(--muted, #9da8b5);
}

.monetization-eyebrow,
.monetization-card-kicker,
.monetization-section-header > div > span {
    color: #53fc18;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.monetization-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 11px;
    border: 1px solid rgba(83, 252, 24, 0.2);
    border-radius: 999px;
    background: rgba(83, 252, 24, 0.07);
    font-size: 0.74rem;
    white-space: nowrap;
}

.monetization-live-pill > span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #53fc18;
    box-shadow: 0 0 10px rgba(83, 252, 24, 0.7);
}

.monetization-live-pill.is-offline {
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--muted, #9da8b5);
    background: rgba(255, 255, 255, 0.03);
}

.monetization-live-pill.is-offline > span {
    background: #717983;
    box-shadow: none;
}

.monetization-total-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
    gap: 20px;
    padding: 22px;
    border: 1px solid rgba(83, 252, 24, 0.24);
    border-radius: 18px;
    background:
        radial-gradient(
            circle at top right,
            rgba(83, 252, 24, 0.15),
            transparent 38%
        ),
        rgba(255, 255, 255, 0.025);
}

.monetization-total-card > div {
    display: grid;
    align-content: center;
    gap: 6px;
}

.monetization-total-card span,
.monetization-total-card small {
    color: var(--muted, #9da8b5);
}

.monetization-total-card > div > strong {
    color: #91ff6c;
    font-size: clamp(2.2rem, 5vw, 4.25rem);
    line-height: 1;
}

.monetization-total-side {
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.monetization-total-side > strong {
    font-size: clamp(1.65rem, 3vw, 2.5rem) !important;
    color: var(--text, #f5f7f8) !important;
}

.monetization-period-grid,
.monetization-sub-grid,
.monetization-platform-grid {
    display: grid;
    gap: 12px;
}

.monetization-period-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.monetization-sub-grid,
.monetization-platform-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.monetization-period-grid article,
.monetization-sub-grid article,
.monetization-platform-grid article {
    display: grid;
    gap: 7px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.monetization-period-grid span,
.monetization-sub-grid span,
.monetization-platform-grid span,
.monetization-period-grid small,
.monetization-platform-grid small {
    color: var(--muted, #9da8b5);
    font-size: 0.75rem;
}

.monetization-period-grid strong {
    font-size: 1.4rem;
}

.monetization-sub-grid strong {
    color: #91ff6c;
    font-size: 1.85rem;
}

.monetization-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.72fr);
    gap: 18px;
    align-items: start;
}

.monetization-primary,
.monetization-sidebar {
    display: grid;
    gap: 18px;
    min-width: 0;
}

.monetization-section-header {
    margin-bottom: 17px;
}

.monetization-section-header h2 {
    margin: 4px 0;
}

.monetization-section-header p {
    margin: 0;
    color: var(--muted, #9da8b5);
    font-size: 0.82rem;
}

.monetization-platform-grid {
    margin-top: 12px;
}

.monetization-support-list,
.monetization-timeline {
    display: grid;
    gap: 9px;
}

.monetization-support-row {
    display: grid;
    grid-template-columns: 32px 42px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    padding: 11px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.02);
}

.monetization-rank {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(83, 252, 24, 0.1);
    color: #91ff6c;
    font-weight: 850;
}

.monetization-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(83, 252, 24, 0.12);
    color: #91ff6c;
    font-weight: 850;
}

.monetization-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.monetization-support-main {
    min-width: 0;
}

.monetization-support-name {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.monetization-support-name span {
    color: #91ff6c;
    font-size: 0.74rem;
    font-weight: 750;
}

.monetization-support-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    margin-top: 3px;
    color: var(--muted, #9da8b5);
    font-size: 0.69rem;
}

.monetization-score-track {
    height: 5px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
}

.monetization-score-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #37d40b, #82ff58);
}

.monetization-timeline article {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.02);
}

.monetization-timeline-date,
.monetization-timeline-details {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.monetization-timeline-date span {
    color: #91ff6c;
    font-weight: 750;
}

.monetization-timeline-details {
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 7px;
    color: var(--muted, #9da8b5);
    font-size: 0.71rem;
}

.monetization-kicks-card {
    text-align: center;
}

.monetization-kicks-total,
.monetization-largest {
    display: block;
    margin-top: 16px;
    color: #91ff6c;
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1;
}

.monetization-largest-unit {
    color: var(--muted, #9da8b5);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.monetization-mini-list {
    display: grid;
    gap: 0;
    margin-top: 16px;
    text-align: left;
}

.monetization-mini-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.monetization-mini-list div:last-child {
    border-bottom: 0;
}

.monetization-mini-list span {
    color: var(--muted, #9da8b5);
}

.monetization-warning {
    margin-top: 13px;
    padding: 10px;
    border-left: 3px solid #ffca57;
    border-radius: 8px;
    background: rgba(255, 202, 87, 0.07);
    color: var(--muted, #9da8b5);
    font-size: 0.72rem;
    line-height: 1.45;
}

.monetization-empty {
    padding: 24px;
    color: var(--muted, #9da8b5);
    text-align: center;
}

.monetization-sidebar blockquote {
    margin: 12px 0 0;
    padding: 10px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted, #9da8b5);
}

@media (max-width: 1100px) {
    .monetization-main-grid {
        grid-template-columns: 1fr;
    }

    .monetization-period-grid,
    .monetization-sub-grid,
    .monetization-platform-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .monetization-header {
        flex-direction: column;
    }

    .monetization-total-card {
        grid-template-columns: 1fr;
    }

    .monetization-total-side {
        padding-top: 18px;
        padding-left: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-left: 0;
    }

    .monetization-period-grid,
    .monetization-sub-grid,
    .monetization-platform-grid {
        grid-template-columns: 1fr;
    }

    .monetization-support-name,
    .monetization-timeline-date {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Monetization financial disclaimer */
.monetization-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 193, 7, 0.38);
    border-radius: 14px;
    background: rgba(255, 193, 7, 0.08);
}

.monetization-disclaimer-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffc107;
    color: #111;
    font-size: 17px;
    font-weight: 800;
}

.monetization-disclaimer strong {
    display: block;
    margin-bottom: 4px;
    color: #ffd45c;
    font-size: 14px;
}

.monetization-disclaimer p {
    margin: 0;
    color: #c3c8cf;
    font-size: 13px;
    line-height: 1.55;
}


.community-viewer-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.community-viewer-actions form {
    margin: 0;
}

/* Sub-a-thon dashboard */
.subathon-page {
    display: grid;
    gap: 20px;
}

.subathon-header,
.subathon-panel-heading,
.subathon-milestone-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.subathon-header h1,
.subathon-panel-heading h2,
.subathon-hero h2 {
    margin: 0;
}

.subathon-mode-card {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.subathon-mode-card.is-active {
    border-color: rgba(83, 252, 24, 0.42);
    box-shadow: 0 0 24px rgba(83, 252, 24, 0.08);
}

.subathon-mode-name {
    color: var(--muted, #9da8b5);
    font-size: 0.78rem;
    font-weight: 800;
}

.subathon-mode-name.active {
    color: #91ff6c;
}

.subathon-live-pill {
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted, #9da8b5);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.is-active .subathon-live-pill {
    background: rgba(83, 252, 24, 0.12);
    color: #91ff6c;
}

.subathon-mode-card form,
.subathon-switch-button {
    margin: 0;
}

.subathon-switch-button {
    padding: 0;
    border: 0;
    background: transparent;
}

.subathon-switch {
    position: relative;
    display: inline-flex;
    width: 48px;
    height: 26px;
    cursor: pointer;
}

.subathon-switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.subathon-switch > span,
.subathon-switch-button .subathon-switch > span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #343b45;
    transition: 180ms ease;
}

.subathon-switch > span::after,
.subathon-switch-button .subathon-switch > span::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    content: "";
    transition: 180ms ease;
}

.subathon-switch input:checked + span,
.subathon-switch.checked > span {
    background: #53fc18;
}

.subathon-switch input:checked + span::after,
.subathon-switch.checked > span::after {
    transform: translateX(22px);
}

.subathon-switch-readonly {
    cursor: default;
}

.subathon-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 28px;
    overflow: hidden;
    border-color: rgba(83, 252, 24, 0.3);
    background:
        radial-gradient(circle at 80% 20%, rgba(83, 252, 24, 0.13), transparent 35%),
        rgba(10, 15, 12, 0.88);
}

.subathon-hero.is-ended {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.025);
}

.subathon-kicker {
    display: inline-block;
    margin-bottom: 8px;
    color: #91ff6c;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.15em;
}

.subathon-hero-copy p,
.subathon-overlay-card p,
.subathon-readonly-card p,
.subathon-control-note {
    color: var(--muted, #9da8b5);
    line-height: 1.55;
}

.subathon-dashboard-timer {
    min-width: 330px;
    padding: 20px 24px;
    border: 1px solid rgba(83, 252, 24, 0.4);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.32);
    text-align: center;
}

.subathon-dashboard-timer > span,
.subathon-stat-card > span,
.subathon-milestone-heading span:first-child {
    display: block;
    color: var(--muted, #9da8b5);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.subathon-dashboard-timer strong {
    display: block;
    margin: 6px 0;
    color: #fff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: clamp(2.25rem, 5vw, 4.1rem);
    letter-spacing: 0.035em;
    line-height: 1;
    text-shadow: 0 0 24px rgba(83, 252, 24, 0.38);
}

.subathon-dashboard-timer small {
    color: #91ff6c;
}

.subathon-dashboard-timer.is-complete strong,
.subathon-dashboard-timer.is-complete small {
    color: #ffca57;
    text-shadow: 0 0 22px rgba(255, 202, 87, 0.25);
}

.subathon-dashboard-timer.is-ended {
    border-color: rgba(255, 255, 255, 0.1);
}

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

.subathon-stat-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.subathon-stat-card strong {
    display: block;
    margin: 8px 0 5px;
    color: #91ff6c;
    font-size: 2rem;
}

.subathon-stat-card small,
.subathon-panel-heading > span,
.subathon-overlay-card small {
    color: var(--muted, #9da8b5);
}

.subathon-milestone-card {
    padding: 18px 20px;
}

.subathon-milestone-heading strong {
    display: block;
    margin-top: 4px;
}

.subathon-milestone-heading > span {
    color: #91ff6c;
    font-weight: 850;
}

.subathon-progress {
    height: 9px;
    margin-top: 14px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
}

.subathon-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #34c90a, #8cff63);
    box-shadow: 0 0 14px rgba(83, 252, 24, 0.42);
    transition: width 350ms ease;
}

.subathon-leaderboard-grid,
.subathon-control-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.subathon-board,
.subathon-setup,
.subathon-overlay-card,
.subathon-readonly-card,
.subathon-activity-panel,
.subathon-history-panel {
    padding: 20px;
}

.subathon-panel-heading {
    margin-bottom: 16px;
}

.subathon-rank-row {
    display: grid;
    grid-template-columns: 34px 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin-top: 9px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.subathon-rank-row.rank-1 {
    border-color: rgba(255, 215, 0, 0.28);
    background: rgba(255, 215, 0, 0.045);
}

.subathon-rank-medal {
    font-size: 1.25rem;
    text-align: center;
}

.subathon-rank-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border-radius: 50%;
    background: rgba(83, 252, 24, 0.12);
    color: #91ff6c;
    font-weight: 900;
}

.subathon-rank-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subathon-rank-name {
    overflow: hidden;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subathon-rank-row strong {
    color: #91ff6c;
}

.subathon-empty {
    padding: 28px 12px;
    color: var(--muted, #9da8b5);
    text-align: center;
}

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

.subathon-field {
    display: grid;
    gap: 7px;
}

.subathon-field > span {
    color: #cbd2da;
    font-size: 0.75rem;
    font-weight: 750;
}

.subathon-field-wide {
    grid-column: 1 / -1;
}

.subathon-field input,
.subathon-field select,
.subathon-copy-row input {
    width: 100%;
}

.subathon-primary-button {
    min-height: 44px;
    border: 0;
    border-radius: 10px;
    background: #53fc18;
    color: #071006;
    font-weight: 900;
}

.subathon-copy-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    margin: 14px 0 8px;
}

.subathon-copy-row button {
    border: 1px solid rgba(83, 252, 24, 0.38);
    border-radius: 9px;
    background: rgba(83, 252, 24, 0.1);
    color: #91ff6c;
    font-weight: 850;
}

.subathon-activity-list,
.subathon-history-list {
    display: grid;
    gap: 9px;
}

.subathon-activity-list article,
.subathon-history-list article {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.02);
}

.subathon-activity-list article {
    grid-template-columns: 34px minmax(0, 1fr) auto;
}

.subathon-history-list article {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.subathon-history-delete-form {
    margin: 0;
}

.subathon-history-delete-button {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(255, 92, 92, 0.38);
    border-radius: 8px;
    background: rgba(255, 92, 92, 0.08);
    color: #ff9b9b;
    font-weight: 800;
    cursor: pointer;
}

.subathon-history-delete-button:hover {
    border-color: rgba(255, 92, 92, 0.72);
    background: rgba(255, 92, 92, 0.16);
    color: #ffd0d0;
}

.subathon-activity-list small,
.subathon-history-list small {
    display: block;
    margin-top: 3px;
    color: var(--muted, #9da8b5);
}

.subathon-activity-icon {
    font-size: 1.2rem;
    text-align: center;
}

.subathon-time-delta {
    color: #91ff6c;
    font-weight: 850;
}

.subathon-time-delta.negative {
    color: #ff8080;
}

@media (max-width: 1050px) {
    .subathon-header,
    .subathon-hero {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .subathon-header {
        flex-direction: column;
    }

    .subathon-mode-card {
        align-self: flex-start;
    }

    .subathon-dashboard-timer {
        min-width: 0;
    }

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

@media (max-width: 760px) {
    .subathon-leaderboard-grid,
    .subathon-control-grid,
    .subathon-form,
    .subathon-stat-grid {
        grid-template-columns: 1fr;
    }

    .subathon-field-wide {
        grid-column: auto;
    }

    .subathon-rank-row {
        grid-template-columns: 30px 38px minmax(0, 1fr);
    }

    .subathon-rank-row strong {
        grid-column: 3;
    }

    .subathon-history-list article {
        grid-template-columns: 1fr;
    }
}


/* Creator Hype Train dashboard */
.hype-train-page {
    display: grid;
    gap: 20px;
}

.hype-train-header,
.hype-train-section-heading,
.hype-train-live-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hype-train-header h1,
.hype-train-section-heading h2,
.hype-train-live-card h2,
.hype-train-overlay-card h2 {
    margin: 0;
}

.hype-train-status-card {
    min-width: 150px;
    padding: 14px 18px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.hype-train-status-card span {
    display: block;
    color: var(--muted, #9da8b5);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hype-train-status-card strong {
    display: block;
    margin-top: 5px;
    color: #91ff6c;
}

.hype-train-live-card {
    border-color: rgba(83, 252, 24, 0.34);
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(83, 252, 24, 0.12),
            transparent 36%
        ),
        rgba(255, 255, 255, 0.025);
}

.hype-train-live-timer {
    min-width: 210px;
    padding: 16px 20px;
    border: 1px solid rgba(83, 252, 24, 0.35);
    border-radius: 14px;
    text-align: center;
}

.hype-train-live-timer span {
    display: block;
    color: var(--muted, #9da8b5);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.12em;
}

.hype-train-live-timer strong {
    display: block;
    margin-top: 7px;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        monospace;
    font-size: 2.4rem;
}

.hype-train-overlay-card {
    padding: 20px;
}

.hype-train-overlay-card p {
    color: var(--muted, #9da8b5);
}

.hype-train-copy-row {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto
        auto;
    gap: 9px;
    margin-top: 15px;
}

.hype-train-copy-row input {
    min-width: 0;
    width: 100%;
}

.hype-train-copy-row button {
    border: 1px solid rgba(83, 252, 24, 0.38);
    border-radius: 9px;
    background: rgba(83, 252, 24, 0.1);
    color: #91ff6c;
    font-weight: 850;
}

.hype-train-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.6fr)
        minmax(300px, 0.75fr);
    gap: 18px;
    align-items: start;
}

.hype-train-settings-panel,
.hype-train-level-panel {
    padding: 20px;
}

.hype-train-section-heading {
    margin-bottom: 18px;
}

.hype-train-section-heading > span {
    color: #91ff6c;
    font-size: 0.75rem;
    font-weight: 800;
}

.hype-train-form {
    display: grid;
    gap: 20px;
}

.hype-train-form h3 {
    margin: 4px 0 -5px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

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

.hype-train-toggle-grid label {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.02);
}

.hype-train-field-grid label {
    display: grid;
    gap: 7px;
}

.hype-train-field-grid label > span {
    color: #cbd2da;
    font-size: 0.75rem;
    font-weight: 750;
}

.hype-train-field-grid input {
    width: 100%;
}

.hype-train-input-unit {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        auto;
    align-items: center;
    gap: 8px;
}

.hype-train-input-unit small {
    color: var(--muted, #9da8b5);
}

.hype-train-level-table-wrap {
    max-height: 720px;
    overflow: auto;
}

.hype-train-level-table {
    width: 100%;
    border-collapse: collapse;
}

.hype-train-level-table th,
.hype-train-level-table td {
    padding: 11px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
    text-align: left;
    vertical-align: top;
}

.hype-train-level-table th {
    position: sticky;
    top: 0;
    background: var(--panel, #11161b);
    color: var(--muted, #9da8b5);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hype-train-level-table td:first-child {
    color: #91ff6c;
    font-weight: 900;
}

.hype-train-level-table small {
    display: block;
    margin-top: 3px;
    color: var(--muted, #9da8b5);
}

@media (max-width: 1050px) {
    .hype-train-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hype-train-header,
    .hype-train-live-card,
    .hype-train-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .hype-train-toggle-grid,
    .hype-train-field-grid,
    .hype-train-copy-row {
        grid-template-columns: 1fr;
    }

    .hype-train-live-timer {
        min-width: 0;
    }
}


/* Hype Train custom sound controls */
.hype-train-sound-card {
    display: grid;
    grid-template-columns:
        minmax(260px, 0.7fr)
        minmax(320px, 1fr);
    gap: 24px;
    align-items: start;
    padding: 20px;
}

.hype-train-sound-card h2 {
    margin: 0;
}

.hype-train-sound-card p {
    color: var(--muted, #9da8b5);
    line-height: 1.55;
}

.hype-train-sound-form {
    display: grid;
    gap: 14px;
}

.hype-train-sound-form label {
    display: grid;
    gap: 7px;
}

.hype-train-sound-form label > span {
    color: #cbd2da;
    font-size: 0.78rem;
    font-weight: 800;
}

.hype-train-sound-form small {
    color: var(--muted, #9da8b5);
}

.hype-train-sound-form input[type="file"] {
    width: 100%;
    padding: 11px;
    border: 1px dashed rgba(83, 252, 24, 0.35);
    border-radius: 10px;
    background: rgba(83, 252, 24, 0.04);
}

.hype-train-sound-form input[type="range"] {
    width: 100%;
    accent-color: #53fc18;
}

.hype-train-current-sound {
    grid-column: 2;
    display: grid;
    gap: 12px;
}

.hype-train-current-sound audio {
    width: 100%;
}

.hype-train-current-sound form {
    margin: 0;
}

.hype-train-audio-editor {
    display: grid;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hype-train-audio-editor > audio {
    display: none;
}

.hype-train-audio-summary,
.hype-train-clip-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.hype-train-audio-summary > span {
    color: #53fc18;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.82rem;
    font-weight: 800;
}

.hype-train-waveform-shell {
    display: grid;
    gap: 5px;
}

.hype-train-waveform {
    position: relative;
    height: 82px;
    overflow: hidden;
    border: 1px solid #3b423b;
    border-radius: 9px;
    background: #242a2d;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.hype-train-waveform canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hype-train-waveform-progress {
    position: absolute;
    z-index: 1;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 0;
    border-right: 3px solid #53fc18;
    background: linear-gradient(
        90deg,
        rgba(83, 252, 24, 0.22),
        rgba(83, 252, 24, 0.48)
    );
    box-shadow: 2px 0 10px rgba(83, 252, 24, 0.58);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease;
}

.hype-train-waveform-progress.is-playing {
    opacity: 1;
}

.hype-train-waveform-selection {
    position: absolute;
    z-index: 2;
    box-sizing: border-box;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 100%;
    min-width: 2px;
    border: 3px solid #f8fafc;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55);
    cursor: grab;
    touch-action: none;
}

.hype-train-waveform-selection.is-dragging {
    cursor: grabbing;
}

.hype-train-waveform-handle {
    position: absolute;
    box-sizing: border-box;
    top: -5px;
    bottom: -5px;
    width: 14px;
    min-width: 14px;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: #f8fafc;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.7);
    cursor: ew-resize;
    touch-action: none;
}

.hype-train-waveform-handle::after {
    position: absolute;
    top: 24%;
    bottom: 24%;
    left: 6px;
    width: 2px;
    border-radius: 2px;
    background: #626a6f;
    content: "";
}

.hype-train-waveform-handle-start {
    left: -8px;
}

.hype-train-waveform-handle-end {
    right: -8px;
}

.hype-train-waveform-handle:focus-visible {
    outline: 3px solid #53fc18;
    outline-offset: 2px;
}

.hype-train-waveform-times {
    display: flex;
    justify-content: space-between;
    color: var(--muted, #9da8b5);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72rem;
}

.hype-train-clip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hype-train-sound-form .hype-train-clip-control {
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 9px;
    background: rgba(0, 0, 0, 0.18);
}

.hype-train-clip-control > span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.hype-train-clip-control strong {
    color: #53fc18;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.hype-train-clip-control input[type="number"] {
    width: 100%;
}

.hype-train-clip-actions {
    justify-content: flex-start;
}

.hype-train-clip-actions > span {
    flex: 1 1 220px;
    color: var(--muted, #9da8b5);
    font-size: 0.78rem;
    text-align: right;
}

.hype-train-remove-sound {
    padding: 9px 13px;
    border: 1px solid rgba(255, 92, 92, 0.4);
    border-radius: 9px;
    background: rgba(255, 92, 92, 0.08);
    color: #ff9b9b;
    font-weight: 800;
    cursor: pointer;
}

.hype-train-remove-sound:hover {
    background: rgba(255, 92, 92, 0.15);
    color: #ffd0d0;
}

@media (max-width: 850px) {
    .hype-train-sound-card {
        grid-template-columns: 1fr;
    }

    .hype-train-current-sound {
        grid-column: auto;
    }

    .hype-train-clip-grid {
        grid-template-columns: 1fr;
    }

    .hype-train-clip-actions > span {
        flex-basis: 100%;
        text-align: left;
    }
}


/* MyInstants or uploaded Hype Train audio selector */
.hype-train-sound-or {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 24px;
    color: var(--muted, #9da8b5);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.hype-train-sound-or::before {
    position: absolute;
    right: 0;
    left: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    content: "";
}

.hype-train-sound-or span {
    position: relative;
    z-index: 1;
    padding: 0 10px;
    background: var(--panel, #11161b);
}


/* Hype Train temporary test controls */
.hype-train-test-card {
    margin-bottom: 24px;
}

.hype-train-test-controls {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.hype-train-test-controls button {
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid rgba(83, 255, 138, 0.35);
    border-radius: 10px;
    background: rgba(83, 255, 138, 0.1);
    color: var(--text-primary, #ffffff);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition:
        border-color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.hype-train-test-controls button:hover {
    border-color: rgba(83, 255, 138, 0.9);
    background: rgba(83, 255, 138, 0.18);
    transform: translateY(-1px);
}

.hype-train-test-controls .hype-train-test-reset {
    border-color: rgba(255, 100, 100, 0.35);
    background: rgba(255, 100, 100, 0.08);
}

.hype-train-test-controls .hype-train-test-reset:hover {
    border-color: rgba(255, 100, 100, 0.9);
    background: rgba(255, 100, 100, 0.16);
}

.hype-train-test-note {
    margin: 14px 0 0;
    color: var(--text-muted, #a8adb7);
    font-size: 0.9rem;
}

/* GREEN_PRO_PURPLE_PREMIUM_START */
:root {
    --pro-badge-background: rgba(83, 252, 24, 0.12);
    --pro-badge-border: rgba(83, 252, 24, 0.40);
    --pro-badge-text: #8cff67;

    --premium-badge-background: rgba(168, 85, 247, 0.15);
    --premium-badge-border: rgba(168, 85, 247, 0.42);
    --premium-badge-text: #c084fc;
}

/*
 * Final plan hierarchy:
 *   Pro     = ItzKickCreator green
 *   Premium = purple
 *
 * AI, Free, Pack, and other badges keep their existing colors.
 */
.pro-badge-green,
.sidebar-badge--pro,
.overlay-pro-badge,
.overlay-access-badge--pro,
.badge-pro,
.badge.badge-pro,
.pro-badge,
.badge--pro,
.plan-badge--pro,
.feature-badge--pro {
    border: 1px solid var(--pro-badge-border) !important;
    background: var(--pro-badge-background) !important;
    color: var(--pro-badge-text) !important;
    box-shadow: none !important;
}

.premium-badge-purple,
.sidebar-badge--premium,
.badge-premium,
.badge.badge-premium,
.premium-badge,
.badge--premium,
.plan-badge--premium,
.feature-badge--premium {
    border: 1px solid var(--premium-badge-border) !important;
    background: var(--premium-badge-background) !important;
    color: var(--premium-badge-text) !important;
    box-shadow: none !important;
}

/* Keep compact sidebar badge sizing unchanged. */
.sidebar-badge.pro-badge-green,
.sidebar-badge--pro {
    border-color: var(--pro-badge-border) !important;
    background: var(--pro-badge-background) !important;
    color: var(--pro-badge-text) !important;
}

.sidebar-badge.premium-badge-purple,
.sidebar-badge--premium {
    border-color: var(--premium-badge-border) !important;
    background: var(--premium-badge-background) !important;
    color: var(--premium-badge-text) !important;
}
/* GREEN_PRO_PURPLE_PREMIUM_END */
