:root {
    color-scheme: dark;
    --page: #07090d;
    --panel: rgba(19, 23, 31, 0.92);
    --panel-strong: #121720;
    --line: rgba(255, 255, 255, 0.10);
    --line-strong: rgba(255, 255, 255, 0.18);
    --text: #f7f8fa;
    --muted: #9ba5b4;
    --soft: #c9d0da;
    --accent: #d2ff3f;
    --danger: #ff8181;
    --success: #9effab;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--page);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(
            circle at top left,
            rgba(93, 113, 255, 0.13),
            transparent 34rem
        ),
        radial-gradient(
            circle at bottom right,
            rgba(210, 255, 63, 0.08),
            transparent 30rem
        ),
        var(--page);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.page-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 36px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    margin-bottom: 48px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--text);
    text-decoration: none;
}

.brand-mark,
.mini-mark,
.step-badge {
    display: inline-grid;
    place-items: center;
    color: #11150b;
    background: var(--accent);
    font-weight: 900;
}

.brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 14px;
}

.mini-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border-radius: 13px;
}

.brand strong {
    display: block;
}

.brand small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.secure-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 0.85rem;
}

.secure-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 16px rgba(210, 255, 63, 0.7);
}

.entry-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 1.15fr)
        minmax(360px, 0.85fr);
    gap: clamp(45px, 8vw, 100px);
    align-items: center;
    min-height: 650px;
}

.intro-panel {
    max-width: 680px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 17px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 22px;
    font-size: clamp(2.8rem, 5.1vw, 5.5rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

h2 {
    margin-bottom: 6px;
}

.intro-copy {
    max-width: 620px;
    margin-bottom: 38px;
    color: var(--soft);
    font-size: 1.08rem;
    line-height: 1.72;
}

.feature-list {
    display: grid;
}

.feature {
    display: flex;
    gap: 17px;
    padding: 17px 0;
    border-top: 1px solid var(--line);
}

.feature > span {
    color: var(--accent);
    font-size: 0.74rem;
    font-weight: 800;
}

.feature strong {
    display: block;
    margin-bottom: 5px;
}

.feature p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.account-card,
.activation-card,
.settings-card,
.instructions-card,
.password-card {
    border: 1px solid var(--line);
    background: var(--panel);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(22px);
}

.account-card {
    padding: 28px;
    border-radius: 25px;
}

.mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
    margin-bottom: 28px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.mode-tab {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    color: var(--muted);
    background: transparent;
    font-weight: 800;
}

.mode-tab.active {
    color: #11150b;
    background: var(--accent);
}

.card-heading {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 25px;
}

.card-heading p,
.section-heading p,
.portal-heading p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

label {
    display: block;
    margin: 17px 0 8px;
    color: var(--soft);
    font-size: 0.85rem;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 52px;
    padding: 0 15px;
    border: 1px solid var(--line-strong);
    border-radius: 13px;
    outline: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
}

input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(210, 255, 63, 0.08);
}

.password-control {
    position: relative;
}

.password-control input {
    padding-right: 70px;
}

.show-button {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    border: 0;
    color: var(--accent);
    background: transparent;
    font-size: 0.79rem;
    font-weight: 800;
}

.primary-button,
.secondary-button,
.copy-button {
    border-radius: 11px;
    font-weight: 800;
}

.primary-button {
    width: 100%;
    min-height: 52px;
    margin-top: 24px;
    border: 0;
    color: #11150b;
    background: var(--accent);
}

.primary-button:disabled {
    cursor: wait;
    opacity: 0.58;
}

.secondary-button,
.copy-button {
    border: 1px solid var(--line-strong);
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
}

.secondary-button {
    min-height: 43px;
    padding: 0 18px;
}

.copy-button {
    min-height: 34px;
    padding: 0 11px;
    color: var(--soft);
    font-size: 0.72rem;
}

.privacy-note,
.important-note,
.inline-note,
.password-requirement {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.privacy-note {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.form-message {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--danger);
    font-size: 0.84rem;
    line-height: 1.5;
}

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

.hidden {
    display: none !important;
}

.activation-layout {
    display: grid;
    place-items: center;
    min-height: 650px;
}

.activation-card {
    width: min(570px, 100%);
    padding: 38px;
    border-radius: 25px;
}

.activation-card h1 {
    font-size: clamp(2.3rem, 5vw, 4rem);
}

.activation-account {
    margin-bottom: 25px;
    color: var(--muted);
}

.activation-account strong {
    display: block;
    margin-top: 7px;
    color: var(--text);
    font-size: 1.03rem;
}

.password-requirement {
    margin: 14px 0 0;
}

.portal-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 25px;
    margin-bottom: 27px;
}

.portal-heading h1 {
    margin-bottom: 10px;
    font-size: clamp(2.5rem, 5vw, 4.7rem);
}

.account-banner {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 28px;
    align-items: center;
    margin-bottom: 24px;
    padding: 21px 24px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
}

.account-label {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.14em;
}

.account-banner strong {
    display: block;
    margin-top: 6px;
    overflow-wrap: anywhere;
}

.status-pill {
    padding: 8px 13px;
    border: 1px solid rgba(210, 255, 63, 0.3);
    border-radius: 999px;
    color: var(--accent);
    background: rgba(210, 255, 63, 0.06);
    font-size: 0.78rem;
    font-weight: 800;
}

.dashboard-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1.1fr)
        minmax(330px, 0.9fr);
    gap: 24px;
}

.settings-card,
.instructions-card,
.password-card {
    padding: 27px;
    border-radius: 22px;
}

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

.section-heading {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 22px;
}

.section-heading h2 {
    margin: 1px 0 5px;
    font-size: 1.22rem;
}

.step-badge {
    width: 29px;
    height: 29px;
    flex: 0 0 auto;
    border-radius: 9px;
    font-size: 0.73rem;
}

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

.credential-row {
    display: grid;
    grid-template-columns:
        118px
        minmax(0, 1fr)
        auto;
    gap: 12px;
    align-items: center;
    min-height: 59px;
    padding: 10px 12px 10px 16px;
    border-bottom: 1px solid var(--line);
}

.credential-row:last-child {
    border-bottom: 0;
}

.credential-row > span {
    color: var(--muted);
    font-size: 0.77rem;
    font-weight: 700;
}

.credential-row code {
    overflow: hidden;
    color: var(--text);
    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;
    font-size: 0.83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.credential-password {
    min-height: 37px;
    padding: 0 10px;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.04);
    font-family:
        "SFMono-Regular",
        Consolas,
        monospace;
    font-size: 0.82rem;
}

.credential-actions {
    display: flex;
    gap: 6px;
}

.inline-note {
    margin: 14px 0 0;
}

.instruction-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding-left: 22px;
    color: var(--soft);
    line-height: 1.55;
}

.instruction-list li::marker {
    color: var(--accent);
    font-weight: 900;
}

.important-note {
    margin-top: 22px;
    padding: 15px;
    border: 1px solid rgba(210, 255, 63, 0.17);
    border-radius: 13px;
    background: rgba(210, 255, 63, 0.045);
}

.important-note strong {
    color: var(--soft);
}

.password-card form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 15px;
}

.password-card .password-requirement,
.password-card .primary-button,
.password-card .form-message {
    grid-column: 1 / -1;
}

.password-card .primary-button {
    width: fit-content;
    min-width: 210px;
}

footer {
    padding-top: 32px;
    color: #747e8c;
    font-size: 0.76rem;
    text-align: center;
}

footer span {
    margin: 0 8px;
}

@media (max-width: 920px) {
    .entry-layout,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .entry-layout {
        min-height: auto;
    }

    .password-card {
        grid-column: auto;
    }
}

@media (max-width: 680px) {
    .page-shell {
        width: calc(100% - 24px);
        padding-top: 16px;
    }

    .topbar {
        margin-bottom: 32px;
    }

    .secure-label {
        display: none;
    }

    h1 {
        font-size: 2.7rem;
    }

    .account-card,
    .activation-card,
    .settings-card,
    .instructions-card,
    .password-card {
        padding: 21px;
        border-radius: 18px;
    }

    .portal-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-banner {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .status-pill {
        width: fit-content;
    }

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

    .credential-row > span {
        grid-column: 1 / -1;
    }

    .password-row {
        grid-template-columns: 1fr;
    }

    .credential-actions {
        justify-content: flex-start;
    }

    .password-card form {
        grid-template-columns: 1fr;
    }

    .password-card .password-requirement,
    .password-card .primary-button,
    .password-card .form-message {
        grid-column: auto;
    }

    .password-card .primary-button {
        width: 100%;
    }
}

.admin-invite-card {
    margin-bottom: 24px;
    padding: 27px;
    border: 1px solid rgba(210, 255, 63, 0.24);
    border-radius: 22px;
    background:
        linear-gradient(
            135deg,
            rgba(210, 255, 63, 0.08),
            rgba(19, 23, 31, 0.94) 55%
        );
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.admin-invite-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 20px;
}

.admin-invite-heading .eyebrow {
    margin-bottom: 9px;
}

.admin-invite-heading h2 {
    margin-bottom: 7px;
    font-size: 1.45rem;
}

.admin-invite-heading p {
    margin: 0;
    color: var(--muted);
}

.admin-badge {
    padding: 8px 13px;
    border-radius: 999px;
    color: #11150b;
    background: var(--accent);
    font-size: 0.75rem;
    font-weight: 900;
}

.admin-invite-form {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        auto;
    gap: 15px;
    align-items: end;
}

.admin-invite-form label {
    margin-top: 0;
}

.admin-invite-form .primary-button {
    width: auto;
    min-width: 275px;
    margin-top: 0;
    padding: 0 20px;
}

.admin-invite-form .form-message {
    grid-column: 1 / -1;
}

@media (max-width: 920px) {
    .admin-invite-form {
        grid-template-columns: 1fr;
    }

    .admin-invite-form .primary-button {
        width: 100%;
        min-width: 0;
    }
}
