:root {
    --account-bg: #050505;
    --account-panel: #0d0d0f;
    --account-raised: #151518;
    --account-line: #29292e;
    --account-text: #f2f2ef;
    --account-muted: #8d8d91;
    --account-dim: #5d5d61;
    --account-error: #f08b92;
    --account-success: #80d7ab;
}

.account-page [hidden] {
    display: none !important;
}

.account-page {
    min-width: 320px;
    min-height: 100vh;
    background: var(--account-bg);
    color: var(--account-text);
}

.account-page::before {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 26%, rgba(90, 90, 98, 0.18), transparent 32%),
        radial-gradient(circle at 78% 70%, rgba(58, 58, 64, 0.15), transparent 30%);
    content: '';
    pointer-events: none;
}

.account-navbar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 5, 5, 0.86);
}

.account-navbar .nav-links a {
    color: #8e8e92;
}

.account-navbar .nav-links a:hover {
    color: var(--account-text);
}

.account-shell {
    display: grid;
    width: min(1120px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 142px 0 72px;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.72fr);
    gap: clamp(54px, 8vw, 110px);
    align-items: center;
}

.account-eyebrow,
.account-kicker {
    color: var(--account-dim);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.account-intro h1,
.dashboard-head h1 {
    margin-top: 20px;
    font-size: clamp(60px, 7.5vw, 104px);
    font-weight: 850;
    letter-spacing: -0.075em;
    line-height: 0.88;
}

.account-intro > p:not(.account-eyebrow) {
    max-width: 520px;
    margin-top: 30px;
    color: var(--account-muted);
    font-size: 14px;
    line-height: 1.8;
}

.account-access-notes {
    display: grid;
    max-width: 520px;
    margin-top: 44px;
    border-top: 1px solid var(--account-line);
    grid-template-columns: 1fr 1fr;
}

.account-access-notes div {
    padding: 18px 0;
    border-bottom: 1px solid var(--account-line);
}

.account-access-notes div + div {
    padding-left: 24px;
    border-left: 1px solid var(--account-line);
}

.account-access-notes span,
.account-access-notes strong {
    display: block;
}

.account-access-notes span {
    margin-bottom: 5px;
    color: var(--account-dim);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.account-access-notes strong {
    font-size: 12px;
}

.account-card {
    padding: 32px;
    border: 1px solid var(--account-line);
    border-radius: 16px;
    background: linear-gradient(145deg, #121214, #09090a);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
}

@keyframes account-mode-change {
    0% { opacity: 0.72; transform: translateY(5px) scale(0.995); }
    100% { opacity: 1; transform: none; }
}

.account-card.mode-changing {
    animation: account-mode-change 300ms cubic-bezier(0.22, 1, 0.36, 1);
}

.account-tabs {
    display: grid;
    margin-bottom: 34px;
    padding: 5px;
    border-radius: 10px;
    background: #070708;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.account-tab {
    padding: 11px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #76767b;
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.account-tab:active {
    transform: scale(0.98);
}

.account-tab.active {
    background: #1a1a1e;
    color: var(--account-text);
}

.account-tab:focus-visible,
.account-submit:focus-visible,
.account-field input:focus-visible,
.account-logout:focus-visible {
    outline: 2px solid var(--account-text);
    outline-offset: 3px;
}

.account-form-head {
    margin-bottom: 28px;
}

.account-form-head h2 {
    margin-top: 8px;
    font-size: 30px;
    letter-spacing: -0.045em;
}

.account-form-head > p:last-child {
    margin-top: 7px;
    color: var(--account-muted);
    font-size: 12px;
}

.account-field {
    display: block;
    margin-bottom: 18px;
}

.account-field > span {
    display: block;
    margin-bottom: 8px;
    color: #aaaab0;
    font-size: 11px;
    font-weight: 600;
}

.account-field input {
    width: 100%;
    height: 48px;
    padding: 0 13px;
    border: 1px solid #2a2a2f;
    border-radius: 9px;
    outline: none;
    background: #080809;
    color: var(--account-text);
    font: inherit;
    font-size: 13px;
    transition: border-color 150ms ease, background 150ms ease;
}

.account-field input:focus {
    border-color: #727278;
    background: #0b0b0d;
}

.account-field small {
    display: block;
    margin-top: 7px;
    color: var(--account-dim);
    font-size: 10px;
}

.account-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 5px;
    border: 0;
    border-radius: 9px;
    background: var(--account-text);
    color: #090909;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 150ms ease, opacity 150ms ease;
}

.account-secondary {
    width: 100%;
    min-height: 42px;
    margin-top: 10px;
    border: 1px solid #2a2a2f;
    border-radius: 9px;
    background: transparent;
    color: var(--account-muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.account-secondary:hover {
    border-color: #55555b;
    color: var(--account-text);
}

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

.account-submit:disabled {
    opacity: 0.55;
    cursor: wait;
    transform: none;
}

.account-message {
    min-height: 21px;
    margin-top: 15px;
    color: var(--account-error);
    font-size: 11px;
    line-height: 1.6;
}

.account-message.success {
    color: var(--account-success);
}

.dashboard-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}

.dashboard-nav span {
    color: var(--account-muted);
    font-size: 11px;
}

.account-logout {
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--account-line);
    border-radius: 8px;
    background: #101012;
    color: var(--account-text);
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.dashboard-shell {
    width: min(1120px, calc(100% - 48px));
    margin: 0 auto;
    padding: 150px 0 85px;
}

.dashboard-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 66px;
}

.dashboard-head h1 {
    font-size: clamp(56px, 8vw, 96px);
}

.account-rank {
    display: inline-flex;
    padding: 7px 10px;
    border: 1px solid var(--account-line);
    color: var(--account-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.account-rank.premium {
    border-color: var(--account-text);
    background: var(--account-text);
    color: #080808;
}

.dashboard-grid {
    display: grid;
    border-top: 1px solid #37373c;
    grid-template-columns: 1fr 1fr;
}

.dashboard-panel {
    min-height: 370px;
    padding: 34px 34px 45px 0;
    border-bottom: 1px solid var(--account-line);
}

.dashboard-panel + .dashboard-panel {
    padding-right: 0;
    padding-left: 34px;
    border-left: 1px solid var(--account-line);
}

.dashboard-panel h2 {
    margin: 17px 0 34px;
    font-size: 28px;
    letter-spacing: -0.045em;
}

.account-facts {
    margin: 0;
}

.account-facts div {
    display: grid;
    padding: 14px 0;
    border-top: 1px solid #202024;
    grid-template-columns: 130px 1fr;
    gap: 20px;
}

.account-facts dt {
    color: var(--account-dim);
    font-size: 10px;
}

.account-facts dd {
    margin: 0;
    color: #d9d9d6;
    font-size: 11px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.dashboard-devices {
    display: grid;
    gap: 12px;
}

.hwid-panel h2 {
    margin-bottom: 12px;
}

.hwid-policy {
    margin: 0 0 14px;
}

.security-panel {
    min-height: 0;
    padding: 32px 0 38px;
    border-left: 0 !important;
    grid-column: 1 / -1;
}

.discord-panel {
    min-height: 0;
    padding: 32px 0 38px;
    border-left: 0 !important;
    grid-column: 1 / -1;
}

.discord-heading,
.discord-account {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.discord-heading h2 {
    margin-bottom: 8px;
}

.discord-heading-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.discord-account {
    margin-top: 22px;
    padding: 14px;
    border: 1px solid #252529;
    border-radius: 10px;
    background: #09090b;
    justify-content: flex-start;
}

.discord-account img {
    border-radius: 50%;
    background: #18181c;
    object-fit: cover;
}

.discord-account div {
    min-width: 0;
    flex: 1;
}

.discord-account strong,
.discord-account span {
    display: block;
}

.discord-account strong {
    font-size: 12px;
    overflow-wrap: anywhere;
}

.discord-account span,
.discord-link-code p {
    margin-top: 4px;
    color: var(--account-muted);
    font-size: 10px;
}

#discord-link-actions {
    margin-top: 0;
}

.discord-link-code {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #29292e;
    border-radius: 9px;
    background: #070708;
}

.discord-link-code > div {
    display: flex;
    margin-top: 10px;
    align-items: center;
    gap: 9px;
}

.discord-link-code code {
    min-width: 0;
    padding: 11px 13px;
    flex: 1;
    border: 1px solid #29292e;
    border-radius: 7px;
    color: #ededeb;
    font-size: 12px;
    user-select: all;
}

.downloads-panel {
    min-height: 0;
    padding: 32px 0 45px;
    border-left: 0 !important;
    grid-column: 1 / -1;
}

.license-panel,
.moderation-panel {
    min-height: 0;
    padding: 32px 0 45px;
    border-left: 0 !important;
    grid-column: 1 / -1;
}

.license-heading,
.moderation-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.license-heading h2,
.moderation-heading h2 {
    margin-bottom: 8px;
}

.license-key-row {
    display: grid;
    margin-top: 22px;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 9px;
}

.license-key-value {
    min-height: 42px;
    padding: 13px 14px;
    overflow: hidden;
    border: 1px solid #29292e;
    border-radius: 8px;
    background: #070708;
    color: #e7e7e4;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: all;
}

#license-created {
    margin-top: 10px;
}

.moderation-count,
.moderation-badge {
    display: inline-flex;
    min-height: 28px;
    padding: 0 9px;
    align-items: center;
    border: 1px solid #34343a;
    border-radius: 999px;
    color: #a8a8ad;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.moderation-badge.active {
    border-color: #315441;
    color: var(--account-success);
}

.moderation-badge.disabled {
    border-color: #56343a;
    color: var(--account-error);
}

.moderation-toolbar {
    display: flex;
    margin-top: 24px;
    gap: 9px;
}

.moderation-search {
    flex: 1;
}

.moderation-search input,
.custom-select-trigger {
    width: 100%;
    height: 38px;
    padding: 0 11px;
    border: 1px solid #2a2a2f;
    border-radius: 8px;
    outline: none;
    background: #080809;
    color: var(--account-text);
    font: inherit;
    font-size: 10px;
}

.moderation-search input:focus,
.custom-select-trigger:focus-visible,
.custom-select.open .custom-select-trigger {
    border-color: #727278;
}

.custom-select {
    position: relative;
    min-width: 0;
}

.custom-select.open {
    z-index: 30;
}

.custom-select-trigger {
    appearance: none;
    display: flex;
    padding: 0 13px;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    text-align: left;
}

.custom-select-trigger::after {
    width: 6px;
    height: 6px;
    margin: -3px 1px 0 12px;
    border-right: 1.5px solid #a9a9ad;
    border-bottom: 1.5px solid #a9a9ad;
    content: '';
    transform: rotate(45deg);
    transition: transform 150ms ease, margin 150ms ease;
}

.custom-select.open .custom-select-trigger::after {
    margin-top: 3px;
    transform: rotate(225deg);
}

.custom-select-trigger:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.custom-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    min-width: 130px;
    padding: 5px;
    border: 1px solid #34343a;
    border-radius: 9px;
    background: #111113;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48);
}

.custom-select-menu[hidden] {
    display: none;
}

.custom-select-option {
    appearance: none;
    display: block;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    outline: none;
    background: transparent;
    color: #b8b8bd;
    cursor: pointer;
    font: inherit;
    font-size: 10px;
    text-align: left;
}

.custom-select-option:hover,
.custom-select-option:focus-visible {
    background: #202024;
    color: #f1f1ef;
}

.custom-select-option[aria-selected='true'] {
    background: #29292e;
    color: #ffffff;
}

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

.moderation-user {
    padding: 18px;
    border: 1px solid #252529;
    border-radius: 11px;
    background: #09090b;
}

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

.moderation-user-name {
    display: block;
    color: #ededeb;
    font-size: 13px;
}

.moderation-user-email {
    display: block;
    margin-top: 5px;
    color: var(--account-muted);
    font-size: 9px;
    overflow-wrap: anywhere;
}

.moderation-meta {
    display: grid;
    margin: 16px 0;
    border-top: 1px solid #202024;
    grid-template-columns: 1fr 1fr;
}

.moderation-meta div {
    padding: 11px 0;
    border-bottom: 1px solid #202024;
}

.moderation-meta div:nth-child(even) {
    padding-left: 14px;
    border-left: 1px solid #202024;
}

.moderation-meta span,
.moderation-meta strong {
    display: block;
}

.moderation-meta span {
    margin-bottom: 5px;
    color: var(--account-dim);
    font-size: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.moderation-meta strong {
    color: #b8b8ba;
    font-size: 9px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.moderation-fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 8px;
}

.moderation-actions {
    display: flex;
    margin-top: 10px;
    gap: 8px;
    flex-wrap: wrap;
}

.moderation-empty {
    padding: 28px;
    border: 1px dashed #29292f;
    border-radius: 10px;
    color: var(--account-muted);
    font-size: 10px;
    text-align: center;
    grid-column: 1 / -1;
}

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

.downloads-panel h2 {
    margin-bottom: 8px;
}

.downloads-intro {
    margin: 0 0 20px;
}

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

.dashboard-download-card {
    display: flex;
    min-height: 92px;
    padding: 18px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #252529;
    border-radius: 10px;
    background: #09090b;
}

.dashboard-download-card strong,
.dashboard-download-card span {
    display: block;
}

.dashboard-download-card strong {
    margin-bottom: 6px;
    font-size: 12px;
}

.dashboard-download-card span {
    color: var(--account-muted);
    font-size: 10px;
    line-height: 1.5;
}

.dashboard-download-button {
    min-height: 38px;
    padding: 0 14px;
    flex: 0 0 auto;
    border: 1px solid #3a3a40;
    border-radius: 8px;
    background: #18181b;
    color: #ececea;
    font: inherit;
    font-size: 10px;
    font-weight: 750;
    cursor: pointer;
}

.dashboard-download-button.premium {
    border-color: var(--account-text);
    background: var(--account-text);
    color: #080808;
}

.dashboard-download-button:disabled {
    border-color: #2a2a2f;
    background: #121215;
    color: #77777f;
    opacity: 1;
    cursor: not-allowed;
}

.dashboard-download-button:focus-visible {
    outline: 2px solid var(--account-text);
    outline-offset: 2px;
}

.security-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.security-heading h2 {
    margin-bottom: 8px;
}

.two-factor-form {
    display: flex;
    align-items: end;
    max-width: 580px;
    margin-top: 24px;
    gap: 10px;
}

.two-factor-form label {
    display: grid;
    flex: 1;
    gap: 7px;
    color: var(--account-dim);
    font-size: 10px;
}

.two-factor-form input {
    height: 38px;
    padding: 0 12px;
    border: 1px solid #2a2a2f;
    border-radius: 8px;
    outline: none;
    background: #080809;
    color: var(--account-text);
    font: inherit;
    letter-spacing: 0.22em;
}

.two-factor-form input:focus {
    border-color: #727278;
}

.dashboard-device {
    padding: 17px;
    border: 1px solid #252529;
    border-radius: 10px;
    background: #09090b;
}

.dashboard-device strong,
.dashboard-device span {
    display: block;
}

.dashboard-device strong {
    margin-bottom: 6px;
    font-size: 12px;
}

.dashboard-device span,
.dashboard-muted {
    color: var(--account-muted);
    font-size: 10px;
    line-height: 1.65;
}

.dashboard-hwid-value {
    display: block;
    margin-top: 13px;
    padding: 10px 11px;
    overflow: hidden;
    border: 1px solid #222226;
    border-radius: 7px;
    background: #050506;
    color: #85858a;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: all;
}

.dashboard-device-actions {
    display: flex;
    margin-top: 12px;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-device-button {
    min-height: 34px;
    padding: 0 11px;
    border: 1px solid #343439;
    border-radius: 7px;
    background: #151518;
    color: #d9d9d7;
    font: inherit;
    font-size: 10px;
    font-weight: 650;
    cursor: pointer;
}

.dashboard-device-button.danger {
    border-color: #4d3035;
    color: #eba0a5;
}

.dashboard-device-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.dashboard-device-button:focus-visible {
    outline: 2px solid var(--account-text);
    outline-offset: 2px;
}

.clipboard-helper {
    position: fixed;
    top: -1000px;
    left: -1000px;
}

@media (max-width: 820px) {
    .account-shell {
        grid-template-columns: 1fr;
        gap: 52px;
    }

    .account-intro h1 {
        font-size: clamp(58px, 14vw, 84px);
    }

    .account-card {
        width: 100%;
        max-width: 520px;
    }

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

    .dashboard-panel + .dashboard-panel {
        padding-left: 0;
        border-left: 0;
    }

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

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

@media (max-width: 520px) {
    .account-shell,
    .dashboard-shell {
        width: min(100% - 30px, 1120px);
    }

    .account-shell {
        padding-top: 118px;
    }

    .account-card {
        padding: 22px;
    }

    .account-access-notes {
        grid-template-columns: 1fr;
    }

    .account-access-notes div + div {
        padding-left: 0;
        border-left: 0;
    }

    .dashboard-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-nav span {
        display: none;
    }

    .account-facts div {
        grid-template-columns: 95px 1fr;
    }

    .discord-heading,
    .security-heading,
    .two-factor-form,
    .license-heading,
    .moderation-heading,
    .moderation-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-download-card {
        align-items: stretch;
        flex-direction: column;
    }

    .license-key-row,
    .moderation-fields {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .account-submit,
    .account-field input {
        transition: none;
    }
}
