:root {
    --campus-wine: #b31245;
    --campus-wine-deep: #831035;
    --campus-wine-soft: #d55778;
    --campus-blush: #efdadd;
    --campus-pearl: #fffaf9;
    --campus-ink: #242329;
    color-scheme: only light;
}

@media (min-width: 821px) {
    html,
    body {
        width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
        background: var(--campus-blush);
    }

    body {
        padding: 0;
        color: var(--campus-ink);
    }

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

    .aurora-page {
        position: fixed;
        z-index: 0;
        inset: 0;
        width: 100vw;
        height: 100vh;
        min-height: 0;
        display: grid;
        grid-template-columns: 50% 50%;
        overflow: hidden;
        border: 0;
        border-radius: 0;
        background: var(--campus-blush);
        box-shadow: none;
        transform: none;
        isolation: isolate;
    }

    .aurora-page::before,
    .aurora-page::after {
        display: none;
    }

    .r2-scene,
    .r2-brand-signature,
    .aurora-hero picture {
        display: none !important;
    }

    .aurora-hero {
        position: relative;
        z-index: 2;
        inset: auto;
        min-width: 0;
        min-height: 0;
        grid-column: 1;
        overflow: hidden;
        background-color: #f8e8e7;
        background-image: url("assets/img/fokus-r2-ai-campus-login.png");
        background-repeat: no-repeat;
        background-position: left center;
        background-size: 200% 100%;
        pointer-events: none;
    }

    .aurora-hero::before {
        position: absolute;
        z-index: 2;
        top: 0;
        right: -2px;
        bottom: 0;
        width: 18px;
        display: block;
        content: "";
        pointer-events: none;
        background: linear-gradient(90deg, transparent, rgba(255, 250, 249, 0.9));
        filter: blur(1px);
    }

    .aurora-hero::after {
        display: none;
    }

    .hero-copy {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

    .auth-panel {
        position: relative;
        z-index: 1;
        top: auto;
        right: auto;
        bottom: auto;
        left: auto;
        width: auto;
        height: 100vh;
        min-width: 0;
        min-height: 0;
        grid-column: 2;
        padding: clamp(32px, 5vh, 68px) clamp(32px, 5vw, 94px);
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        background:
            radial-gradient(circle at 45% 31%, rgba(255, 252, 250, 0.98) 0 19%, transparent 51%),
            radial-gradient(circle at 8% 51%, rgba(255, 245, 244, 0.95), transparent 35%),
            linear-gradient(118deg, #f7e6e6 0%, #edd4d8 55%, #c9929f 100%);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        isolation: isolate;
    }

    .auth-panel::before {
        position: absolute;
        z-index: -2;
        inset: -18%;
        display: block;
        content: "";
        pointer-events: none;
        border: 0;
        border-radius: 0;
        background:
            repeating-radial-gradient(
                ellipse at 29% 52%,
                transparent 0 77px,
                rgba(255, 255, 255, 0.4) 78px 80px,
                transparent 81px 118px
            );
        box-shadow: none;
        opacity: 0.72;
        transform: rotate(-7deg) scale(1.08);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
    }

    .auth-panel::after {
        position: absolute;
        z-index: -1;
        right: -6%;
        bottom: -11%;
        left: -8%;
        height: 34%;
        display: block;
        content: "";
        pointer-events: none;
        border: 0;
        background:
            linear-gradient(167deg, transparent 0 44%, rgba(255, 255, 255, 0.82) 45% 45.5%, transparent 46% 100%),
            linear-gradient(8deg, transparent 0 54%, rgba(255, 243, 242, 0.76) 55% 55.7%, transparent 56% 100%),
            radial-gradient(ellipse at 45% 100%, rgba(255, 255, 255, 0.68), transparent 63%);
        opacity: 0.8;
        filter: blur(0.2px);
    }

    .auth-view {
        position: relative;
        inset: auto;
        width: min(100%, 660px);
        margin: 0;
    }

    .login-form-view,
    .reset-view,
    .reset-success-view {
        position: relative;
        inset: auto;
        width: 100%;
        min-height: min(74vh, 690px);
        margin: 0;
        padding: clamp(34px, 4.4vh, 52px) clamp(34px, 3.4vw, 58px) clamp(24px, 3vh, 34px);
        overflow: auto;
        border: 1px solid rgba(168, 28, 72, 0.56);
        border-radius: 30px;
        background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 249, 0.9));
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.98),
            0 24px 58px rgba(111, 38, 62, 0.16),
            0 0 48px rgba(255, 249, 247, 0.58);
        -webkit-backdrop-filter: blur(18px) saturate(112%);
        backdrop-filter: blur(18px) saturate(112%);
    }

    .login-form-view {
        display: flex;
        flex-direction: column;
    }

    .login-form-view[hidden],
    .reset-success-view[hidden],
    .auth-view[hidden] {
        display: none;
    }

    .login-form-view::before {
        display: block;
        margin: 4px 0 clamp(42px, 6vh, 68px);
        color: var(--campus-wine-deep);
        content: "ACESSE SUA CONTA";
        font-family: "Manrope", system-ui, sans-serif;
        font-size: clamp(0.75rem, 0.86vw, 1rem);
        font-weight: 800;
        letter-spacing: 0.17em;
    }

    .login-form-view > .sr-only {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        padding: 0 !important;
        overflow: hidden !important;
        clip: rect(0 0 0 0) !important;
        white-space: nowrap !important;
        border: 0 !important;
    }

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

    #formLogin {
        position: relative;
        z-index: 2;
        top: auto;
        left: auto;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }

    #formLogin::before,
    #formLogin::after {
        display: none;
    }

    #formLogin .field {
        margin: 0 0 clamp(18px, 2.4vh, 26px);
    }

    #formLogin .field:nth-child(2) {
        margin-bottom: 16px;
    }

    #formLogin .field label {
        margin: 0 0 9px 2px;
        color: #45434a;
        font-size: clamp(0.78rem, 0.86vw, 0.96rem);
        font-weight: 600;
    }

    #formLogin .field-control {
        height: clamp(54px, 6.4vh, 64px);
        overflow: hidden;
        border: 1px solid rgba(119, 96, 107, 0.22);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: inset 0 1px 0 #fff, 0 10px 24px rgba(88, 51, 64, 0.07);
        transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
    }

    #formLogin .field-control::after {
        right: 22px;
        bottom: 0;
        left: 22px;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(213, 87, 120, 0.68), transparent);
    }

    #formLogin .field:focus-within .field-control {
        border-color: rgba(179, 18, 69, 0.48);
        box-shadow: 0 0 0 4px rgba(179, 18, 69, 0.07), 0 14px 30px rgba(131, 16, 53, 0.1);
        transform: translateY(-1px);
    }

    #formLogin .field-input {
        height: 100%;
        padding: 0 68px 0 20px;
        color: #222127;
        font-size: clamp(0.84rem, 0.9vw, 1rem);
        background: transparent;
    }

    #formLogin .field-icon {
        right: 18px;
        left: auto;
        color: #74727a;
    }

    #formLogin .field:nth-child(2) .field-icon {
        right: 52px;
    }

    #formLogin .field-action {
        right: 6px;
        color: #74727a;
    }

    #formLogin .form-options {
        min-height: 42px;
        margin: 0 0 24px;
        display: flex;
        justify-content: space-between;
        gap: 20px;
    }

    #formLogin .check-label {
        color: #65616a;
        font-size: clamp(0.68rem, 0.73vw, 0.82rem);
    }

    #formLogin .check-label input:checked {
        border-color: var(--campus-wine);
        background: linear-gradient(145deg, var(--campus-wine-soft), var(--campus-wine-deep));
    }

    #formLogin .account-recovery-button {
        position: static;
        width: auto;
        min-height: 42px;
        padding: 0 18px;
        display: inline-flex;
        align-items: center;
        gap: 14px;
        border: 1px solid rgba(179, 18, 69, 0.2);
        border-radius: 14px;
        color: var(--campus-wine-deep);
        background: rgba(255, 249, 249, 0.74);
        font-size: clamp(0.67rem, 0.73vw, 0.8rem);
        text-decoration: none;
    }

    #formLogin > .primary-button,
    .reset-view .primary-button,
    .reset-success-view .primary-button {
        height: clamp(56px, 6.2vh, 64px);
        margin: 0;
        border: 0;
        border-radius: 20px;
        background: linear-gradient(105deg, #c8174f 0%, #a70f3d 58%, #7f0d30 100%);
        box-shadow: 0 16px 32px rgba(131, 16, 53, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }

    #formLogin > .primary-button > img,
    .reset-view .primary-button > img,
    .reset-success-view .primary-button > img {
        display: none;
    }

    .secure-note {
        margin: auto 0 0;
        padding-top: 28px;
        color: #77727b;
    }

    .secure-note i,
    .security-note i {
        color: var(--campus-wine);
    }

    .privacy-note {
        position: absolute;
        z-index: 3;
        right: clamp(40px, 5vw, 96px);
        bottom: clamp(12px, 2.1vh, 24px);
        left: clamp(40px, 5vw, 96px);
        margin: 0;
        color: rgba(86, 74, 80, 0.68);
        font-size: 0.66rem;
        text-align: center;
    }

    .privacy-note a,
    .text-button,
    .back-button,
    .auth-kicker {
        color: var(--campus-wine-deep);
    }

    .reset-view,
    .reset-success-view {
        min-height: 0;
        max-height: 88vh;
    }

    .reset-view .recovery-method.is-selected .recovery-method__icon {
        background: linear-gradient(145deg, var(--campus-wine-soft), var(--campus-wine-deep));
    }

    .reset-view .recovery-method.is-selected::after {
        background: linear-gradient(90deg, #e98aa2, var(--campus-wine), var(--campus-wine-deep));
    }
}

@media (min-width: 821px) and (max-height: 760px) {
    .auth-panel {
        padding-top: 22px;
        padding-bottom: 34px;
    }

    .login-form-view {
        min-height: calc(100vh - 70px);
        padding-top: 28px;
        padding-bottom: 22px;
    }

    .login-form-view::before {
        margin-bottom: 28px;
    }

    #formLogin .field {
        margin-bottom: 14px;
    }

    #formLogin .field-control,
    #formLogin > .primary-button {
        height: 50px;
    }

    #formLogin .form-options {
        margin-bottom: 16px;
    }

    .secure-note {
        padding-top: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-panel::before,
    .auth-panel::after,
    .aurora-hero::before {
        animation: none !important;
    }
}
