.account-page {
    min-height: 100dvh;
    padding: 24px;
    user-select: text;
}

.account-shell {
    width: min(100%, 440px);
    margin: 0 auto;
}

.account-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
}

.account-home:hover,
.account-home:focus-visible {
    color: var(--teal-dark);
}

.account-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(38, 57, 70, 0.12);
}

.account-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.account-brand h1 {
    margin: 0;
    color: var(--text);
    font-size: 28px;
}

.account-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.account-tabs button {
    min-height: 42px;
    border: 0;
    border-right: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.account-tabs button:last-child {
    border-right: 0;
}

.account-tabs button[aria-selected="true"] {
    background: var(--teal);
    color: #fff;
}

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

.account-form[hidden],
.account-message[hidden] {
    display: none;
}

.account-form label {
    margin-top: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.account-form input {
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

.account-form input:focus {
    border-color: var(--teal);
    outline: 2px solid rgba(47, 131, 125, 0.2);
    outline-offset: 1px;
}

.account-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.account-primary,
.account-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 46px;
    margin-top: 14px;
    border: 0;
    border-radius: 6px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.account-primary {
    background: var(--teal);
    color: #fff;
}

.account-primary:hover,
.account-primary:focus-visible {
    background: var(--teal-dark);
}

.account-primary:disabled {
    cursor: wait;
    opacity: 0.65;
}

.account-secondary {
    width: 100%;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--text);
}

.account-hint {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.account-message {
    display: flex;
    align-items: center;
    min-height: 44px;
    box-sizing: border-box;
    margin-bottom: 16px;
    padding: 10px 12px;
    border: 1px solid #c77c75;
    border-radius: 6px;
    background: #fff2f0;
    color: #8a302a;
    animation: account-message-enter 180ms ease-out;
}

.account-message[data-type="success"] {
    border-color: #78a77d;
    background: #eef8ef;
    color: #285f33;
}

.account-signed-in {
    text-align: center;
}

.account-signed-in > i {
    color: var(--teal);
    font-size: 32px;
}

.account-signed-in h2 {
    margin: 14px 0 8px;
    color: var(--text);
    font-size: 21px;
}

.account-signed-in p {
    margin: 0;
    color: var(--muted);
}

@keyframes account-message-enter {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 520px) {
    .account-page { padding: 16px; }
    .account-panel { padding: 22px 18px; }
    .account-tabs button { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .account-message { animation: none; }
}
