/* ── Design Tokens ── */
:root {
    --color-primary: #eb6b9b;
    --color-primary-dark: #e03e7f;
    --color-primary-darker: #d13570;
    --color-primary-light: #f8e2ea;
    --color-primary-xlight: #fdf2f8;
    --color-border-pink: #f2d8e0;
    --color-text-dark: #1a1a1a;
    --color-text-mid: #5c3a40;
    --color-text-muted: #999;
    --gradient-primary: linear-gradient(135deg, #eb6b9b, #e03e7f);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-base: 'DM Sans', Arial, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-full: 999px;
    --shadow-pink: 0 6px 20px rgba(235, 107, 155, .30);
    --transition-slide: .7s cubic-bezier(.77, 0, .175, 1);
}

/* ── Reset ── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-base);
    min-height: 100vh;
    background: var(--gradient-primary);
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

/* Bolhas decorativas de fundo */
body::before {
    content: '';
    position: fixed;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    top: -120px;
    right: -80px;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    bottom: -80px;
    left: -60px;
    pointer-events: none;
}

/* ══════════════════════════════════════════
   CARD PRINCIPAL
══════════════════════════════════════════ */
.auth-card {
    position: relative;
    width: 980px;
    max-width: 100%;
    height: 740px;
    max-height: calc(100vh - 32px);
    border-radius: 24px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 32px 80px rgba(0, 0, 0, .25);
    z-index: 1;
}

/* ══════════════════════════════════════════
   WRAPPER
══════════════════════════════════════════ */
.auth-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
}

/* ══════════════════════════════════════════
   PAINÉIS DE FORMULÁRIO
══════════════════════════════════════════ */
.panel-form {
    width: 58%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 44px;
    background: #fff;
    position: relative;
    transition: transform var(--transition-slide), opacity .5s ease;
    overflow: hidden;
    /* sem barra de rolagem */
}

.panel-login {
    position: absolute;
    right: 0;
    opacity: 1;
    transform: translateX(0);
}

.panel-cadastro {
    position: absolute;
    left: 0;
    opacity: 0;
    transform: translateX(-40px);
    pointer-events: none;
}

.auth-wrapper.modo-cadastro .panel-login {
    opacity: 0;
    transform: translateX(80px);
    pointer-events: none;
}

.auth-wrapper.modo-cadastro .panel-cadastro {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* ══════════════════════════════════════════
   PAINEL ROSA — deslizante
══════════════════════════════════════════ */
.panel-brand {
    position: absolute;
    top: 0;
    left: 0;
    width: 42%;
    height: 100%;
    background:
        linear-gradient(135deg, rgba(235, 107, 155, .55) 0%, rgba(209, 53, 112, .65) 100%),
        url('../image/unha.png') no-repeat center 30%;
    background-size: cover, cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 52px 44px;
    overflow: hidden;
    z-index: 10;
    border-radius: 0 210px 210px 0;
    transition: transform var(--transition-slide), border-radius var(--transition-slide);
    will-change: transform;
}

.auth-wrapper.modo-cadastro .panel-brand {
    transform: translateX(calc(100% / 0.42 * 0.58));
    border-radius: 210px 0 0 210px;
}

.panel-brand::before {
    content: '';
    position: absolute;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
    top: -80px;
    right: -100px;
}

.panel-brand::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    bottom: -60px;
    left: -60px;
}

.brand-blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.brand-blob-1 {
    width: 160px;
    height: 160px;
    bottom: 160px;
    right: -40px;
}

.brand-blob-2 {
    width: 80px;
    height: 80px;
    top: 200px;
    right: 40px;
}

/* Conteúdo do painel — dois estados */
.brand-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    transition: opacity .25s ease, transform .25s ease;
}

.brand-content.for-login {
    opacity: 1;
    transform: translateY(0);
}

.brand-content.for-cadastro {
    opacity: 0;
    transform: translateY(10px);
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    width: 100%;
    pointer-events: none;
}

.auth-wrapper.modo-cadastro .brand-content.for-login {
    opacity: 0;
    transform: translateY(-10px);
}

.auth-wrapper.modo-cadastro .brand-content.for-cadastro {
    opacity: 1;
    transform: translateY(0);
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    width: 100%;
    pointer-events: auto;
}

.brand-logo {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 12px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}

.brand-divider {
    width: 48px;
    height: 3px;
    background: rgba(255, 255, 255, .5);
    border-radius: 99px;
    margin-bottom: 28px;
}

.brand-tagline {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .18);
}

.brand-sub {
    font-size: 14px;
    color: rgba(255, 255, 255, .92);
    font-weight: 400;
    line-height: 1.7;
    max-width: 260px;
    margin: 0 auto 32px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .15);
}

.brand-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.brand-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, .9);
    font-size: 14px;
    font-weight: 500;
}

.brand-feature-icon {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, .18);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.brand-cta-text {
    font-size: 15px;
    color: rgba(255, 255, 255, .92);
    margin-bottom: 20px;
    line-height: 1.6;
    text-shadow: 0 1px 6px rgba(0, 0, 0, .15);
}

.brand-cta-btn {
    display: inline-block;
    padding: 12px 32px;
    border: 2px solid rgba(255, 255, 255, .7);
    border-radius: var(--radius-full);
    color: #fff;
    font-family: var(--font-base);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    transition: background .3s, border-color .3s;
}

.brand-cta-btn:hover {
    background: rgba(255, 255, 255, .2);
    border-color: #fff;
    color: #fff;
}

/* ══════════════════════════════════════════
   FORMULÁRIOS
══════════════════════════════════════════ */
.form-shell {
    width: 100%;
    max-width: 400px;
    position: relative;
    z-index: 1;
    max-height: 100%;
    overflow: hidden;
}

.form-head {
    margin-bottom: 22px;
}

.form-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 10px;
    display: block;
}

.form-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-primary-darker);
    line-height: 1.1;
    margin: 0;
}

.form-label {
    color: var(--color-text-mid);
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.form-control {
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--color-border-pink);
    font-size: 14px;
    color: var(--color-text-dark);
    font-family: var(--font-base);
    background: #fff;
    transition: all .3s ease;
    width: 100%;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(235, 107, 155, .12);
    outline: none;
}

.form-control::placeholder {
    color: var(--color-text-muted);
    font-weight: 300;
}

.input-group {
    position: relative;
}

.input-group-text {
    background: var(--color-primary-xlight);
    border: 1.5px solid var(--color-border-pink);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--color-primary);
    padding: 0 14px;
    display: flex;
    align-items: center;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0;
    width: 1%;
    flex: 1 1 auto;
}

.btn-pass {
    background: var(--color-primary-light);
    border: 1.5px solid var(--color-border-pink);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    color: var(--color-primary);
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s ease;
}

.btn-pass:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.input-group:focus-within .form-control,
.input-group:focus-within .input-group-text,
.input-group:focus-within .btn-pass {
    border-color: var(--color-primary);
}

.input-group:focus-within {
    box-shadow: 0 0 0 3px rgba(235, 107, 155, .12);
    border-radius: var(--radius-md);
}

.btn-custom {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-family: var(--font-base);
    font-weight: 700;
    font-size: 15px;
    padding: 14px 24px;
    border-radius: var(--radius-full);
    width: 100%;
    cursor: pointer;
    transition: all .3s ease;
}

.btn-custom:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-pink);
    color: #fff;
}

.toggle-link {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    transition: all .3s ease;
}

.toggle-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

.senha-error {
    color: #dc3545;
    font-size: .85em;
    margin-top: 6px;
    display: none;
}

.form-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--color-text-muted);
    font-size: 12px;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border-pink);
}

.field-group {
    margin-bottom: 14px;
}

.field-group-sm {
    margin-bottom: 10px;
}


/* ════════════════════════════════════════════════════════
   BREAKPOINTS
════════════════════════════════════════════════════════ */

/* ── Desktop grande 1400px+ ── */
@media (min-width: 1400px) {
    .auth-card {
        width: 1100px;
        height: 780px;
    }

    .brand-logo {
        font-size: 46px;
    }

    .brand-tagline {
        font-size: 30px;
    }

    .brand-sub {
        font-size: 15px;
        max-width: 290px;
    }

    .form-title {
        font-size: 2.8rem;
    }

    .form-control {
        padding: 15px 18px;
        font-size: 16px;
    }

    .field-group {
        margin-bottom: 18px;
    }

    .field-group-sm {
        margin-bottom: 14px;
    }

    .form-divider {
        margin: 24px 0;
    }
}

/* ── Desktop médio 1200–1399px ── */
@media (max-width: 1399px) and (min-width: 1200px) {
    .auth-card {
        width: 1000px;
        height: 750px;
    }
}

/* ── Laptop 1025–1199px ── */
@media (max-width: 1199px) and (min-width: 1025px) {
    .auth-card {
        width: 920px;
        height: 720px;
    }

    .brand-logo {
        font-size: 36px;
    }

    .brand-tagline {
        font-size: 23px;
    }

    .panel-form {
        padding: 36px 40px;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    body {
        padding: 12px;
    }

    .auth-card {
        width: 100%;
        height: min(660px, calc(100vh - 24px));
        border-radius: 20px;
    }

    .panel-brand {
        width: 38%;
        padding: 32px 22px;
        border-radius: 0 130px 130px 0;
    }

    .auth-wrapper.modo-cadastro .panel-brand {
        transform: translateX(calc(100% / 0.38 * 0.62));
        border-radius: 130px 0 0 130px;
    }

    .panel-form {
        width: 62%;
        padding: 24px 30px;
    }

    .brand-logo {
        font-size: 30px;
    }

    .brand-tagline {
        font-size: 20px;
    }

    .brand-sub {
        font-size: 12px;
        max-width: 220px;
        margin-bottom: 20px;
    }

    .brand-divider {
        margin-bottom: 18px;
    }

    .brand-features {
        gap: 10px;
    }

    .brand-feature {
        font-size: 13px;
    }

    .brand-feature-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .form-title {
        font-size: 1.9rem;
    }

    .form-head {
        margin-bottom: 18px;
    }

    .field-group {
        margin-bottom: 12px;
    }

    .field-group-sm {
        margin-bottom: 8px;
    }

    .form-divider {
        margin: 12px 0;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 13px;
    }

    .btn-custom {
        padding: 12px 20px;
        font-size: 13px;
    }
}

/* ── Nest Hub (1024×600) — tablet com altura muito baixa ── */
@media (max-width: 1024px) and (min-width: 769px) and (max-height: 660px) {
    .auth-card {
        height: min(560px, calc(100vh - 16px));
    }

    .panel-brand {
        padding: 20px 16px;
    }

    .brand-logo {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .brand-divider {
        margin-bottom: 10px;
    }

    .brand-tagline {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .brand-sub {
        font-size: 11px;
        margin-bottom: 10px;
    }

    .brand-features {
        gap: 6px;
    }

    .brand-feature {
        font-size: 11px;
    }

    .brand-feature-icon {
        width: 24px;
        height: 24px;
        font-size: 11px;
    }

    .brand-cta-text {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .brand-cta-btn {
        padding: 8px 20px;
        font-size: 12px;
    }

    .panel-form {
        padding: 14px 22px;
    }

    .form-head {
        margin-bottom: 10px;
    }

    .form-eyebrow {
        margin-bottom: 4px;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .field-group {
        margin-bottom: 8px;
    }

    .field-group-sm {
        margin-bottom: 5px;
    }

    .form-divider {
        margin: 8px 0;
    }

    .form-control {
        padding: 8px 10px;
        font-size: 12px;
    }

    .btn-custom {
        padding: 10px 18px;
        font-size: 12px;
    }
}

/* ── Mobile — até 768px ── */
@media (max-width: 768px) {
    body {
        padding: 0;
        background: #fff;
        align-items: stretch;
    }

    body::before,
    body::after {
        display: none;
    }

    .auth-card {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        box-shadow: none;
        background: #fff;
    }

    .auth-wrapper {
        flex-direction: column;
        overflow-y: auto;
        height: 100%;
    }

    .panel-brand {
        display: none !important;
    }

    .panel-form {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        flex: 1;
        left: auto !important;
        right: auto !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        padding: 48px 32px;
        background: #fff;
        display: none;
        align-items: center;
        overflow-y: auto;
    }

    /* Barra decorativa rosa no topo */
    .panel-form::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 5px;
        background: var(--gradient-primary);
        z-index: 100;
    }

    .panel-login {
        display: flex;
    }

    .panel-cadastro {
        display: none;
    }

    .auth-wrapper.modo-cadastro .panel-login {
        display: none;
    }

    .auth-wrapper.modo-cadastro .panel-cadastro {
        display: flex;
    }

    .panel-login,
    .panel-cadastro {
        opacity: 1 !important;
        transform: none !important;
    }

    .form-shell {
        max-width: 460px;
        width: 100%;
        max-height: none;
        overflow: visible;
    }

    .form-title {
        font-size: 2rem;
    }

    .form-head::before {
        content: 'Nail Pro';
        display: block;
        font-family: var(--font-display);
        font-size: 28px;
        font-weight: 800;
        color: var(--color-primary);
        margin-bottom: 20px;
        letter-spacing: -.5px;
    }

    .field-group {
        margin-bottom: 18px;
    }

    .field-group-sm {
        margin-bottom: 14px;
    }

    .form-divider {
        margin: 24px 0;
    }
}

/* ── Mobile médio 481–768px ── */
@media (max-width: 768px) and (min-width: 481px) {
    .panel-form {
        padding: 48px 48px;
    }
}

/* ── Mobile pequeno até 480px ── */
@media (max-width: 480px) {
    .panel-form {
        padding: 40px 20px;
    }

    .form-title {
        font-size: 1.7rem;
    }

    .form-control {
        padding: 11px 14px;
        font-size: 14px;
    }

    .btn-custom {
        font-size: 14px;
        padding: 13px 20px;
    }

    .field-group {
        margin-bottom: 14px;
    }

    .field-group-sm {
        margin-bottom: 10px;
    }

    .form-head::before {
        font-size: 24px;
    }
}

/* ── Mobile muito pequeno até 360px ── */
@media (max-width: 360px) {
    .panel-form {
        padding: 32px 16px;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 13px;
    }

    .form-label {
        font-size: 11px;
    }

    .btn-custom {
        font-size: 13px;
        padding: 12px 16px;
    }

    .input-group-text {
        padding: 0 10px;
        font-size: 13px;
    }

    .form-head::before {
        font-size: 22px;
        margin-bottom: 14px;
    }

    .form-head {
        margin-bottom: 18px;
    }

    .field-group {
        margin-bottom: 12px;
    }

    .field-group-sm {
        margin-bottom: 8px;
    }
}

/* ── Landscape mobile — altura < 500px ── */
@media (max-height: 500px) and (max-width: 900px) {
    .panel-brand {
        display: none !important;
    }

    .panel-form {
        position: relative !important;
        width: 100% !important;
        padding: 24px 32px !important;
        display: none;
        align-items: flex-start !important;
        overflow-y: auto;
        height: 100vh !important;
    }

    .panel-login {
        display: flex;
    }

    .panel-cadastro {
        display: none;
    }

    .auth-wrapper.modo-cadastro .panel-login {
        display: none;
    }

    .auth-wrapper.modo-cadastro .panel-cadastro {
        display: flex;
    }

    .panel-login,
    .panel-cadastro {
        opacity: 1 !important;
        transform: none !important;
    }

    .form-head::before {
        display: none;
    }

    .form-head {
        margin-bottom: 12px;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .field-group {
        margin-bottom: 10px;
    }

    .field-group-sm {
        margin-bottom: 8px;
    }

    .form-control {
        padding: 9px 12px;
    }

    .btn-custom {
        padding: 11px 20px;
    }

    .form-divider {
        margin: 12px 0;
    }
}