/* kfbeta16 — auth (đăng nhập / hồ sơ) */

.auth-wrapper {
    max-width: 420px;
    margin: 24px auto 40px;
    padding: 0;
}
@media (min-width: 768px) { .auth-wrapper { margin-top: 48px; } }

.auth-box,
.profile-box {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: none;
    overflow: hidden;
}
.profile-box { padding: 28px 22px; }
.forms-container { padding: 24px 22px 26px; }

/* Tabs Login / Register */
.auth-tabs {
    display: flex;
    gap: 4px;
    margin: 14px 14px 0;
    padding: 4px;
    background: var(--bg);
    border: 0;
    border-radius: var(--radius);
}
.tab-item {
    flex: 1;
    height: 40px;
    padding: 0 12px;
    background: transparent;
    border: 0;
    border-radius: var(--r-sm);
    color: var(--text2);
    font-size: var(--fs);
    font-weight: 700;
    cursor: pointer;
    transition: background-color var(--tr), color var(--tr);
}
.tab-item:hover { background: var(--bg3); color: var(--text1); }
.tab-item.active { background: var(--accent); color: var(--on-accent); }

/* Form */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--text2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.form-group input {
    display: block;
    width: 100%;
    height: 46px;
    padding: 0 14px;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    color: var(--text1);
    font-size: var(--fs);
    transition: border-color var(--tr);
}
.form-group input:focus { border-color: var(--accent); background: var(--bg); }

.auth-btn {
    width: 100%;
    height: 46px;
    margin-top: 6px;
    background: var(--accent);
    border: 0;
    border-radius: var(--radius);
    color: var(--on-accent);
    font-size: var(--fs-md);
    font-weight: 800;
    cursor: pointer;
    transition: background-color var(--tr);
}
.auth-btn:hover { background: var(--accent-hover); }
.auth-btn:disabled { opacity: .6; cursor: not-allowed; }

/* Hồ sơ */
.profile-header {
    margin-bottom: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}
.profile-avatar-wrapper {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 14px;
    background: var(--bg3);
    border: 3px solid var(--accent);
    border-radius: 50%;
    overflow: hidden;
}
.profile-avatar { width: 100%; height: 100%; object-fit: cover; }
.avatar-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
    font-size: 2.6em;
    font-weight: 800;
    text-transform: uppercase;
}
.profile-name { margin: 4px 0 8px; color: var(--text1); font-size: var(--fs-xl); }
.role-badge {
    display: inline-block;
    padding: 3px 12px;
    background: var(--bg3);
    border-radius: var(--r-pill);
    color: var(--text2);
    font-size: var(--fs-xs);
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text2);
    font-size: var(--fs);
}
.detail-row:last-child { border-bottom: 0; }
.detail-row .value { color: var(--text1); font-weight: 600; text-align: right; word-break: break-all; }
.detail-row .coin { color: var(--yellow); font-weight: 800; }

.profile-actions { display: grid; gap: 8px; margin-top: 20px; }
.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 14px;
    background: var(--bg3);
    border: 0;
    border-radius: var(--radius);
    color: var(--text1);
    font-size: var(--fs);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color var(--tr), color var(--tr);
}
.action-btn:hover { background: var(--bg4); color: var(--text1); }
.action-btn.logout { background: rgba(248, 87, 107, .12); color: var(--red); }
.action-btn.logout:hover { background: var(--red); color: #fff; }

.auth-notify { min-height: 20px; margin-top: 16px; font-size: var(--fs); font-weight: 600; text-align: center; }
.auth-notify.error { color: var(--red); }
.auth-notify.success { color: var(--green); }

.fade-in { animation: kf-fadein .35s ease both; }
