/* =========================================================
   River Roleplay — páginas de conta (entrar / criar / perfil)
   ========================================================= */

:root {
    --accent: #FF0066;
    --danger: #ff4d6d;
    --panel: linear-gradient(249deg, rgba(62, 62, 66, 0.2), rgba(67, 67, 70, 0.2));
    --stroke: rgba(255, 255, 255, 0.07);
}

/* ---------- Campos (compartilhado) ---------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.field > label,
.field-label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.field > label em {
    margin-left: 6px;
    color: rgba(255, 255, 255, 0.3);
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: none;
}

.input {
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--white);
    font: 400 16px var(--font-text);
    outline: none;
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.input::placeholder {
    color: rgba(255, 255, 255, 0.25);
}

.input:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}

textarea.input {
    height: auto;
    min-height: 140px;
    padding: 14px 16px;
    line-height: 1.55;
    resize: vertical;
}

.field.invalid .input {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.14);
}

.input-wrap,
.input-prefix {
    position: relative;
}

.input-wrap .input {
    padding-right: 52px;
}

.input-prefix span {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.35);
    pointer-events: none;
}

.input-prefix .input {
    padding-left: 34px;
}

.pass-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 10px;
    background: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.pass-toggle:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.pass-toggle .slash {
    stroke-dasharray: 23;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 0.3s ease;
}

.pass-toggle.on .slash {
    stroke-dashoffset: 23;
}

.check {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: fit-content;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
    cursor: pointer;
    user-select: none;
}

.check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check i {
    flex: none;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.check i::after {
    content: '';
    width: 10px;
    height: 5px;
    margin-top: -3px;
    border-left: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: rotate(-45deg) scale(0);
    transition: transform 0.2s var(--ease-out);
}

.check input:checked + i {
    background: var(--accent);
    border-color: var(--accent);
}

.check input:checked + i::after {
    transform: rotate(-45deg) scale(1);
}

.check input:focus-visible + i {
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent);
}

.btn.loading span::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 10px;
    vertical-align: -2px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--white);
    animation: spin 0.7s linear infinite;
}

/* ---------- Toast ---------- */

.toast {
    position: fixed;
    top: 24px;
    left: 50%;
    z-index: 50;
    max-width: calc(100% - 32px);
    padding: 14px 20px 14px 46px;
    border-radius: 14px;
    background: rgba(28, 28, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    font-size: 15px;
    font-weight: 700;
    opacity: 0;
    transform: translate(-50%, -20px);
    transition: opacity 0.35s ease, transform 0.45s var(--ease-out);
    pointer-events: none;
}

.toast::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border-radius: 50%;
    background: #2fd18b;
    box-shadow: 0 0 0 4px rgba(47, 209, 139, 0.2);
}

.toast[data-type="error"]::before {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.2);
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* =========================================================
   Página: entrar / criar conta
   ========================================================= */

.page-auth {
    background: var(--bg-deep);
}

.auth {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(460px, 1fr);
    min-height: 100vh;
}

.auth-visual {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px var(--content) 64px calc(var(--gutter) + 8px);
    overflow: hidden;
    background: var(--bg-deep);
}

.auth-visual-img {
    position: absolute;
    inset: 0;
    background: url('assets/novidades.jpg') center / cover no-repeat;
    opacity: 0.6;
    animation: zoom 24s ease-in-out infinite alternate;
}

.auth-visual-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, var(--bg-deep) 0%, rgba(10, 12, 9, 0.3) 50%, rgba(10, 12, 9, 0.65) 100%),
        linear-gradient(to right, transparent 55%, var(--bg-deep));
}

.auth-visual .halftone {
    left: -8%;
    top: auto;
    bottom: -12%;
    opacity: 0.14;
}

.auth-visual .corner-tl { top: 32px; left: var(--gutter); }
.auth-visual .corner-br { bottom: 32px; right: 32px; }

.auth-visual > .logo,
.auth-visual-copy {
    position: relative;
    z-index: 3;
}

.auth-visual > .logo {
    margin: 24px 0 0 24px;
}

.auth-visual-copy {
    padding-left: 24px;
    animation: rise 0.9s var(--ease-out) both;
}

.auth-visual-copy h2 {
    margin: 6px 0 22px;
    font-family: var(--font-display);
    font-size: clamp(44px, 5.2vw, 82px);
    line-height: 0.96;
}

.auth-visual-copy p {
    max-width: 440px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    line-height: 1.35;
}

.auth-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 40px clamp(20px, 5vw, 80px) 56px;
    background:
        radial-gradient(ellipse 70% 50% at 80% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%),
        var(--bg-deep);
}

.auth-panel-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 44px;
}

.auth-mobile-logo {
    display: none;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    transition: color 0.25s ease;
}

.auth-back span {
    transition: transform 0.25s ease;
}

.auth-back:hover {
    color: var(--white);
}

.auth-back:hover span {
    transform: translateX(-4px);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 40px 0;
}

.auth-tabs {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 40px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--stroke);
}

.auth-tabs button {
    position: relative;
    z-index: 1;
    height: 44px;
    border: 0;
    border-radius: 999px;
    background: none;
    color: rgba(255, 255, 255, 0.5);
    font: 700 15px var(--font-text);
    cursor: pointer;
    transition: color 0.3s ease;
}

.auth-tabs button:hover,
.auth-tabs button.active {
    color: var(--white);
}

.auth-tabs-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 5px;
    width: calc(50% - 5px);
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 40%, transparent);
    transition: transform 0.5s var(--ease-out);
}

.auth-tabs[data-active="criar"] .auth-tabs-indicator {
    transform: translateX(100%);
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: rise 0.55s var(--ease-out);
}

.auth-heading {
    margin-bottom: 6px;
}

.auth-heading h1 {
    font-family: var(--font-display);
    font-size: 36px;
    line-height: 1.05;
}

.auth-heading p {
    margin-top: 10px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.4;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.strength {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: -6px;
}

.strength-bars {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.strength-bars i {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.3s ease;
}

.strength-label {
    min-width: 64px;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.strength[data-level="1"] i:nth-child(-n + 1) { background: var(--danger); }
.strength[data-level="2"] i:nth-child(-n + 2) { background: #ffb020; }
.strength[data-level="3"] i:nth-child(-n + 3) { background: #8bd450; }
.strength[data-level="4"] i { background: #2fd18b; }

.form-error {
    display: none;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 77, 109, 0.3);
    background: rgba(255, 77, 109, 0.1);
    color: #ff8fa3;
    font-size: 14px;
    line-height: 1.4;
}

.form-error.show {
    display: block;
    animation: shake 0.4s ease;
}

.auth-form .btn-block {
    margin-top: 4px;
}

.auth-switch {
    color: var(--muted);
    font-size: 15px;
    text-align: center;
}

.auth-switch button {
    border: 0;
    background: none;
    color: var(--white);
    font: 700 15px var(--font-text);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-underline-offset: 4px;
}

/* =========================================================
   Página: perfil
   ========================================================= */

.page-profile {
    background: var(--bg-deep);
}

.page-profile .btn-primary {
    background: var(--accent);
}

.page-profile .btn-primary:hover {
    box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 45%, transparent);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 var(--gutter);
    background: rgba(10, 12, 9, 0.75);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topbar .logo {
    font-size: 26px;
}

.topbar .logo span {
    font-size: 16px;
}

.topbar-links {
    display: flex;
    gap: 28px;
}

.topbar-links a {
    font-size: 16px;
    opacity: 0.4;
    transition: opacity 0.25s ease;
}

.topbar-links a:hover {
    opacity: 0.75;
}

.topbar-links a.active {
    font-weight: 700;
    opacity: 1;
}

.profile {
    max-width: 1240px;
    margin: 0 auto;
    padding: 28px var(--gutter) 160px;
}

.profile-hero {
    animation: rise 0.8s var(--ease-out) both;
}

/* Banner */

.banner {
    position: relative;
    aspect-ratio: 10 / 3;
    min-height: 210px;
    border-radius: 22px;
    overflow: hidden;
    background:
        radial-gradient(ellipse 60% 90% at 85% 10%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 70%),
        radial-gradient(ellipse 50% 80% at 10% 100%, color-mix(in srgb, var(--accent) 25%, transparent), transparent 70%),
        #151517;
    transition: background 0.5s ease;
}

.banner::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.18;
    background-image: radial-gradient(circle, #ffffff 1.6px, transparent 2px);
    background-size: 16px 16px;
    -webkit-mask-image: radial-gradient(ellipse 50% 80% at 20% 30%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 50% 80% at 20% 30%, #000 20%, transparent 75%);
}

.banner-img {
    position: absolute;
    inset: 0;
    background: center / cover no-repeat;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.5s ease, transform 0.8s var(--ease-out);
}

.banner-img.has-image {
    opacity: 1;
    transform: none;
}

.banner-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 12, 9, 0.75), transparent 55%);
}

.banner-actions {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    gap: 10px;
}

.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(10, 12, 9, 0.55);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}

.chip-btn:hover {
    transform: translateY(-2px);
    background: rgba(10, 12, 9, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Avatar + identidade */

.profile-head {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    gap: 28px;
    margin-top: -78px;
    padding: 0 36px;
}

.avatar {
    position: relative;
    flex: none;
    width: 164px;
    height: 164px;
    padding: 4px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, var(--accent), color-mix(in srgb, var(--accent) 35%, #ffffff), var(--accent));
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    cursor: pointer;
    transition: transform 0.35s var(--ease-out);
}

.avatar:hover {
    transform: translateY(-3px);
}

.avatar-img {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 5px solid var(--bg-deep);
    background:
        radial-gradient(circle at 30% 25%, color-mix(in srgb, var(--accent) 45%, #1d1d1f), #1d1d1f 70%) center / cover no-repeat;
    font: 700 54px var(--font-display);
    overflow: hidden;
}

.avatar-img[style*="url"] {
    background-size: cover;
    background-position: center;
}

.avatar-hover {
    position: absolute;
    inset: 9px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.avatar:hover .avatar-hover,
.avatar:focus-within .avatar-hover {
    opacity: 1;
}

.avatar-badge {
    position: absolute;
    right: 6px;
    bottom: 10px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 4px solid var(--bg-deep);
    background: var(--accent);
}

.profile-id {
    min-width: 0;
    padding-bottom: 14px;
}

.profile-id h1 {
    font-family: var(--font-display);
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
    overflow-wrap: anywhere;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
}

.profile-meta .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
}

.profile-meta .tag {
    padding: 5px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--accent) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
    color: color-mix(in srgb, var(--accent) 55%, #ffffff);
    font-size: 13px;
    font-weight: 700;
}

.profile-meta .tag[hidden] {
    display: none;
}

.profile-bio {
    max-width: 760px;
    margin: 24px 36px 0;
    padding-left: 18px;
    border-left: 2px solid var(--accent);
    color: rgba(255, 255, 255, 0.78);
    font-size: 17px;
    line-height: 1.6;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.profile-bio.empty {
    border-left-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.3);
    font-style: italic;
}

/* Painéis */

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
    margin-top: 56px;
    animation: rise 0.8s 0.12s var(--ease-out) both;
}

.panel {
    padding: 34px;
    border-radius: 22px;
    background: var(--panel);
    border: 1px solid var(--stroke);
    backdrop-filter: blur(21.55px);
}

.panel-head h2 {
    font-family: var(--font-display);
    font-size: 28px;
    line-height: 1.1;
}

.panel-head p {
    max-width: 520px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px 20px;
    margin-top: 30px;
}

.span-2 {
    grid-column: 1 / -1;
}

.field-foot {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 13px;
}

.counter {
    font-variant-numeric: tabular-nums;
    transition: color 0.2s ease;
}

.counter.warn {
    color: #ffb020;
}

.swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.swatch {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.swatch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.swatch span {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--c);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.swatch b {
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
    font-weight: 700;
    transition: color 0.2s ease;
}

.swatch:hover span {
    transform: scale(1.08);
}

.swatch input:checked + span {
    transform: scale(1.06);
    box-shadow: 0 0 0 3px var(--bg-deep), 0 0 0 5px var(--c);
}

.swatch input:checked ~ b {
    color: var(--white);
}

.swatch input:focus-visible + span {
    box-shadow: 0 0 0 3px var(--bg-deep), 0 0 0 5px var(--white);
}

/* Lateral */

.panel-side {
    position: sticky;
    top: 102px;
    padding: 28px;
}

.side-block + .side-block {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--stroke);
}

.side-block h3 {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 14px;
}

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

.info-row span {
    flex: none;
    color: var(--muted);
}

.info-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-hint {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.side-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.side-actions .btn {
    padding: 0 12px;
}

.link-danger {
    display: block;
    margin: 16px auto 0;
    border: 0;
    background: none;
    color: #ff6b81;
    font: 700 14px var(--font-text);
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.link-danger:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Barra de salvar */

.savebar {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 22px;
    max-width: calc(100% - 32px);
    padding: 10px 10px 10px 24px;
    border-radius: 999px;
    background: rgba(28, 28, 30, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    transform: translate(-50%, 160%);
    transition: transform 0.55s var(--ease-out);
}

.savebar.show {
    transform: translate(-50%, 0);
}

.savebar p {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    white-space: nowrap;
}

.savebar p i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    animation: pulse 1.6s ease-in-out infinite;
}

.savebar-actions {
    display: flex;
    gap: 8px;
}

/* ---------- Animações ---------- */

@keyframes rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
    50% { box-shadow: 0 0 0 6px transparent; }
}

/* ---------- Responsivo ---------- */

@media (max-width: 1000px) {
    .auth {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
    }

    .auth-panel-top {
        justify-content: space-between;
    }

    .auth-mobile-logo {
        display: inline-block;
        font-size: 24px;
    }

    .auth-mobile-logo span {
        font-size: 14px;
    }

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

    .panel-side {
        position: static;
    }
}

@media (max-width: 640px) {
    .auth-panel {
        padding-top: 24px;
    }

    .auth-card {
        padding-top: 28px;
    }

    .auth-heading h1 {
        font-size: 30px;
    }

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

    .topbar {
        height: 68px;
    }

    .topbar .logo {
        font-size: 22px;
    }

    .topbar .logo span {
        font-size: 13px;
    }

    .topbar-links {
        display: none;
    }

    .profile {
        padding-top: 16px;
    }

    .banner {
        aspect-ratio: 16 / 9;
        min-height: 0;
        border-radius: 16px;
    }

    .banner-actions {
        top: 12px;
        right: 12px;
    }

    .chip-btn {
        height: 38px;
        padding: 0 14px;
        font-size: 13px;
    }

    .profile-head {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        margin-top: -64px;
        padding: 0;
        text-align: center;
    }

    .avatar {
        width: 128px;
        height: 128px;
    }

    .avatar-img {
        font-size: 42px;
    }

    .avatar-badge {
        right: 0;
        bottom: 4px;
        width: 38px;
        height: 38px;
    }

    .profile-id {
        padding-bottom: 0;
    }

    .profile-meta {
        justify-content: center;
    }

    .profile-meta .dot {
        display: none;
    }

    .profile-bio {
        margin: 20px 0 0;
    }

    .profile-grid {
        margin-top: 36px;
    }

    .panel,
    .panel-side {
        padding: 22px;
        border-radius: 18px;
    }

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

    .savebar {
        left: 16px;
        right: 16px;
        bottom: 16px;
        flex-direction: column;
        gap: 10px;
        padding: 14px;
        border-radius: 20px;
        transform: translateY(160%);
    }

    .savebar.show {
        transform: none;
    }

    .savebar-actions {
        width: 100%;
    }

    .savebar-actions .btn {
        flex: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-visual-img { animation: none; }
    .auth-form.active,
    .auth-visual-copy,
    .profile-hero,
    .profile-grid { animation: none; }
}

/* ---------- Mensagens do formulário (Supabase) ---------- */

.form-error.success {
    border-color: rgba(47, 209, 139, 0.3);
    background: rgba(47, 209, 139, 0.1);
    color: #7ee2b5;
    animation: rise 0.4s var(--ease-out);
}

.form-msg-action {
    border: 0;
    background: none;
    color: var(--white);
    font: 700 14px var(--font-text);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
