/* ══════════════════════════════════════
   SNR Community — Auth & Profile Styles
   ══════════════════════════════════════ */

/* ── Auth Page (Login/Register) ── */
.auth-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}
.auth-container {
    width: 100%;
    max-width: 420px;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 2rem;
}
.auth-title {
    font-family: var(--display);
    font-size: 1.6rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}
.auth-subtitle {
    font-family: var(--body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}
.auth-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    padding: 0.6rem 0.8rem;
    font-family: var(--ui);
    font-size: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 2px;
}
[data-theme="dark"] .auth-error {
    background: #3b1c1c;
    border-color: #7f1d1d;
    color: #fca5a5;
}

/* ── Forms ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.form-group label {
    font-family: var(--ui);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--text-secondary);
}
.form-group input,
.form-group textarea,
.form-group select {
    font-family: var(--body);
    font-size: 0.88rem;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    border-radius: 2px;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--crimson);
}
.form-group input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.form-hint {
    font-family: var(--ui);
    font-size: 0.58rem;
    color: var(--text-secondary);
}
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.form-checkbox {
    font-family: var(--ui);
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
}
.form-link {
    font-family: var(--ui);
    font-size: 0.65rem;
    color: var(--crimson);
    text-decoration: none;
}
.form-link:hover {
    text-decoration: underline;
}

/* ── Auth Button ── */
.auth-btn {
    font-family: var(--ui);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    background: var(--crimson);
    color: #fff;
    border: none;
    padding: 0.7rem;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    border-radius: 2px;
    margin-top: 0.5rem;
}
.auth-btn:hover {
    background: var(--crimson-dark, #7a1526);
}
.auth-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ── Auth Switch ── */
.auth-switch {
    font-family: var(--ui);
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1.2rem;
}
.auth-switch a {
    color: var(--crimson);
    text-decoration: none;
    font-weight: 600;
}
.auth-switch a:hover {
    text-decoration: underline;
}

/* ── Profile Page ── */
.profile-page {
    max-width: 1380px;
    margin: 0 auto;
}
.profile-header {
    border-bottom: 1px solid var(--border);
    padding: 2rem 2rem 1.5rem;
}
.profile-header-inner {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}
.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--crimson);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--ui);
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}
.profile-info {
    flex: 1;
    min-width: 0;
}
.profile-name-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.profile-name {
    font-family: var(--display);
    font-size: 1.3rem;
    font-weight: 500;
    line-height: 1.2;
}
.profile-badge {
    font-family: var(--ui);
    font-size: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    padding: 0.15em 0.5em;
    border-radius: 2px;
    line-height: 1.3;
}
.badge-member { color: var(--text-secondary); border: 1px solid var(--border); }
.badge-moderator { color: #1d4ed8; border: 1px solid #93c5fd; background: #eff6ff; }
.badge-analyst { color: #059669; border: 1px solid #6ee7b7; background: #ecfdf5; }
.badge-premium { color: var(--gold); border: 1px solid var(--gold); }
.badge-admin { color: var(--crimson); border: 1px solid var(--crimson); }
[data-theme="dark"] .badge-moderator { background: #1e3a5f; }
[data-theme="dark"] .badge-analyst { background: #064e3b; }

.profile-meta {
    font-family: var(--ui);
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin-top: 0.2rem;
}
.profile-dot { margin: 0 0.3rem; }
.profile-bio {
    font-family: var(--body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.6rem;
}
.profile-karma-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin-top: 0.6rem;
}
.karma-display {
    font-family: var(--ui);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--crimson);
}
.karma-label {
    font-family: var(--ui);
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}
.profile-empty {
    font-family: var(--body);
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding: 2rem 0;
}

/* ── Profile Content ── */
.profile-content-wrap {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    padding: 1.5rem 2rem 3rem;
}
.profile-link {
    display: block;
    font-family: var(--ui);
    font-size: 0.72rem;
    color: var(--crimson);
    text-decoration: none;
    margin-bottom: 0.3rem;
}
.profile-link:hover { text-decoration: underline; }

/* ── Account Page ── */
.account-page {
    max-width: 1380px;
    margin: 0 auto;
}
.account-header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 2rem;
}
.account-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.acct-avatar { width: 48px; height: 48px; font-size: 1.2rem; }
.acct-info {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}
.acct-name {
    font-family: var(--display);
    font-size: 1.1rem;
    font-weight: 500;
}
.acct-karma {
    font-family: var(--ui);
    font-size: 0.68rem;
    color: var(--text-secondary);
}
.acct-public-link {
    font-family: var(--ui);
    font-size: 0.62rem;
    color: var(--crimson);
    text-decoration: none;
}
.acct-public-link:hover { text-decoration: underline; }

/* ── Account Layout ── */
.account-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 2rem;
    padding: 1.5rem 2rem 3rem;
}
.acct-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    position: sticky;
    top: 5rem;
    align-self: start;
}
.acct-nav-item {
    font-family: var(--ui);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 0.8rem;
    border-radius: 3px;
    transition: background 0.15s, color 0.15s;
}
.acct-nav-item:hover {
    background: var(--warm);
    color: var(--text);
}
.acct-nav-item.active {
    background: var(--warm);
    color: var(--text);
    font-weight: 700;
}
.acct-nav-logout {
    margin-top: 1rem;
    color: var(--crimson);
}

/* ── Stat Cards ── */
.acct-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.acct-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1rem;
    text-align: center;
}
.acct-stat-number {
    display: block;
    font-family: var(--ui);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--crimson);
}
.acct-stat-label {
    font-family: var(--ui);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
}

/* ── Save Messages ── */
.acct-msg {
    padding: 0.6rem 0.8rem;
    font-family: var(--ui);
    font-size: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 2px;
}
.acct-msg-ok { background: #ecfdf5; border: 1px solid #6ee7b7; color: #065f46; }
.acct-msg-err { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
[data-theme="dark"] .acct-msg-ok { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .acct-msg-err { background: #3b1c1c; color: #fca5a5; }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
    .profile-content-wrap { grid-template-columns: 1fr; }
    .account-layout { grid-template-columns: 1fr; }
    .acct-sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        position: static;
        gap: 0;
    }
    .acct-nav-item { white-space: nowrap; }
    .acct-nav-logout { margin-top: 0; }
}

@media (max-width: 640px) {
    .auth-card { padding: 1.5rem; }
    .profile-header { padding: 1.5rem 1rem; }
    .profile-header-inner { flex-direction: column; gap: 1rem; }
    .profile-content-wrap { padding: 1rem; }
    .account-header { padding: 1rem; }
    .account-layout { padding: 1rem; }
    .acct-stats { grid-template-columns: 1fr; }
}
