@import url("https://fonts.googleapis.com/css?family=Montserrat:400,800");

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    background: #f6f5f7;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    font-family: "Montserrat", sans-serif;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
}

h1 {
    font-weight: bold;
    margin: 0;
}

h2 {
    text-align: center;
    margin: 0 0 18px;
}

p {
    font-size: 14px;
    font-weight: 100;
    line-height: 20px;
    letter-spacing: 0.5px;
    margin: 20px 0 30px;
}

span {
    font-size: 12px;
}

a {
    color: #333;
    font-size: 14px;
    text-decoration: none;
    margin: 15px 0;
}

button {
    border-radius: 20px;
    border: 1px solid #ff4b2b;
    background-color: #ff4b2b;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    padding: 12px 45px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: transform 80ms ease-in;
    cursor: pointer;
}

button:active {
    transform: scale(0.95);
}

button:focus {
    outline: none;
}

button:disabled,
input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

button.ghost {
    background-color: transparent;
    border-color: #ffffff;
}

form {
    background-color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 50px;
    height: 100%;
    text-align: center;
}

input {
    background-color: #eee;
    border: none;
    padding: 12px 15px;
    margin: 8px 0;
    width: 100%;
}

input:focus {
    outline: 2px solid rgba(255, 75, 43, 0.25);
}

.container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.22);
    position: relative;
    overflow: hidden;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
}

.form-container {
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in-container {
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.right-panel-active .sign-in-container {
    transform: translateX(100%);
}

.sign-up-container {
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.right-panel-active .sign-up-container {
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: show 0.6s;
}

@keyframes show {
    0%,
    49.99% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

.overlay-container {
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.container.right-panel-active .overlay-container {
    transform: translateX(-100%);
}

.overlay {
    background: #ff416c;
    background: linear-gradient(to right, #ff4b2b, #ff416c);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 0 0;
    color: #ffffff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.container.right-panel-active .overlay {
    transform: translateX(50%);
}

.overlay-panel {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 40px;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.overlay-left {
    transform: translateX(-20%);
}

.container.right-panel-active .overlay-left {
    transform: translateX(0);
}

.overlay-right {
    right: 0;
    transform: translateX(0);
}

.container.right-panel-active .overlay-right {
    transform: translateX(20%);
}

.social-container {
    margin: 20px 0;
}

.social-container a {
    border: 1px solid #dddddd;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 5px;
    height: 40px;
    width: 40px;
    font-weight: 800;
}

.remember-me {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 6px 0 0;
    color: #555;
    cursor: pointer;
}

.remember-me input {
    width: auto;
    margin: 0;
    accent-color: #ff4b2b;
}

.validation-summary {
    width: 100%;
    color: #b42318;
    font-size: 12px;
    margin: 8px 0 4px;
    text-align: left;
}

.validation-summary ul {
    margin: 0;
    padding-left: 18px;
}

.field-validation {
    display: block;
    width: 100%;
    color: #b42318;
    font-size: 11px;
    text-align: left;
}

.forgot-password-page h2 {
    margin-bottom: 24px;
}

.forgot-container {
    display: flex;
    width: 768px;
    max-width: 100%;
    min-height: 480px;
    overflow: hidden;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow:
        0 14px 28px rgba(0, 0, 0, 0.25),
        0 10px 10px rgba(0, 0, 0, 0.22);
}

.forgot-left,
.forgot-right {
    width: 50%;
    min-height: 480px;
}

.forgot-left form {
    padding: 0 48px;
}

.forgot-description {
    color: #555;
    margin: 18px 0 18px;
}

.success-message {
    width: 100%;
    margin: 0 0 12px;
    border-radius: 12px;
    padding: 12px 14px;
    background: #ecfdf3;
    color: #027a48;
    font-size: 12px;
    line-height: 18px;
    text-align: left;
}

.back-to-login {
    margin-top: 18px;
    color: #ff4b2b;
    font-weight: 700;
}

.forgot-right {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: linear-gradient(to right, #ff4b2b, #ff416c);
    color: #ffffff;
    text-align: center;
}

.forgot-panel p {
    margin-bottom: 32px;
}

.forgot-panel .ghost {
    border-color: #ffffff;
    background: transparent;
}

.tenant-display {
    cursor: default;
    text-transform: none;
}

.two-factor-container {
    display: block;
    width: 430px;
    min-height: 0;
    border-radius: 18px;
}

.two-factor-container .forgot-left {
    width: 100%;
    min-height: 0;
}

.two-factor-container .forgot-left form {
    height: auto;
    min-height: 0;
    padding: 46px 48px 40px;
}

.two-factor-container h2 {
    margin: 0;
    color: #1f2937;
    font-size: 24px;
    line-height: 1.3;
}

.two-factor-container .forgot-description {
    margin: 12px 0 26px;
    color: #6b7280;
    font-size: 13px;
    line-height: 21px;
}

.two-factor-container .validation-summary {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fef2f2;
}

.two-factor-code {
    margin: 0;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #f9fafb;
    padding: 15px 16px;
    color: #111827;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 7px;
    text-align: center;
}

.two-factor-code:focus {
    border-color: #ff4b2b;
    background: #ffffff;
    outline: 3px solid rgba(255, 75, 43, 0.14);
}

.two-factor-code::placeholder {
    color: #9ca3af;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    opacity: 1;
}

.two-factor-container button[type="submit"] {
    width: 100%;
    margin-top: 16px;
    border-radius: 12px;
    padding: 14px 24px;
    background: linear-gradient(100deg, #ff4b2b, #ff416c);
    box-shadow: 0 10px 20px rgba(255, 75, 43, 0.2);
}

.two-factor-container .back-to-login {
    margin: 20px 0 0;
    font-size: 13px;
}

.tenant-trigger {
    position: fixed;
    top: 22px;
    right: 24px;
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    background: #ffffff;
    color: #ff4b2b;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.tenant-trigger span {
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.tenant-trigger strong {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tenant-inline-button {
    margin-top: 14px;
    padding: 8px 16px;
    border: 1px solid rgba(255, 75, 43, 0.18);
    background: rgba(255, 75, 43, 0.08);
    color: #ff4b2b;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.tenant-inline-button strong {
    font-weight: 800;
}

.tenant-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.tenant-modal.is-open {
    display: flex;
}

.tenant-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 24, 27, 0.62);
    backdrop-filter: blur(5px);
}

.tenant-dialog {
    position: relative;
    width: 420px;
    max-width: 100%;
    border-radius: 24px;
    padding: 30px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    animation: tenant-pop 0.2s ease-out;
}

@keyframes tenant-pop {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.tenant-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: #f4f4f5;
    color: #52525b;
    font-size: 24px;
    line-height: 1;
}

.tenant-dialog-header {
    text-align: left;
}

.tenant-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: #ff4b2b;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.tenant-dialog h3 {
    margin: 0;
    color: #18181b;
    font-size: 28px;
}

.tenant-dialog p {
    margin: 10px 0 24px;
    color: #71717a;
}

.tenant-field {
    margin-bottom: 16px;
    text-align: left;
}

.tenant-field label {
    display: block;
    margin-bottom: 8px;
    color: #3f3f46;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

.tenant-field input,
.tenant-field select {
    width: 100%;
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    background: #fafafa;
    padding: 13px 14px;
    color: #18181b;
    font-family: "Montserrat", sans-serif;
}

.tenant-field select:focus,
.tenant-field input:focus {
    outline: 2px solid rgba(255, 75, 43, 0.22);
    border-color: #ff4b2b;
}

.tenant-field small {
    display: block;
    margin-top: 8px;
    color: #71717a;
    font-size: 11px;
}

.tenant-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.tenant-secondary,
.tenant-primary {
    padding: 11px 20px;
}

.tenant-secondary {
    border-color: #e4e4e7;
    background: #ffffff;
    color: #52525b;
}

.tenant-primary {
    border-color: #ff4b2b;
    background: linear-gradient(to right, #ff4b2b, #ff416c);
    color: #ffffff;
}

@media (max-width: 768px) {
    body {
        height: auto;
        min-height: 100vh;
        margin: 0;
        padding: 64px 12px 16px;
        overflow-y: auto;
    }

    body:not(.forgot-password-page) {
        justify-content: flex-start;
    }

    h2 {
        margin-bottom: 10px;
        font-size: 20px;
    }

    .container {
        min-height: min(540px, calc(100vh - 116px));
    }

    .sign-in-container,
    .sign-up-container {
        width: 100%;
    }

    .sign-up-container,
    .overlay-container {
        display: none;
    }

    form {
        padding: 20px 26px;
    }

    .sign-in-container form {
        justify-content: flex-start;
        padding-top: 28px;
    }

    .sign-in-container h1 {
        font-size: 26px;
    }

    .sign-in-container .social-container {
        display: none;
    }

    .sign-in-container form > span:not(.field-validation) {
        display: none;
    }

    .tenant-inline-button {
        margin-top: 10px;
        padding: 7px 14px;
    }

    .sign-in-container input {
        margin: 6px 0;
        padding: 11px 14px;
    }

    .remember-me {
        margin-top: 4px;
    }

    .sign-in-container a {
        margin: 10px 0;
    }

    .sign-in-container button[type="submit"] {
        padding: 11px 38px;
    }

    .forgot-container {
        flex-direction: column;
        min-height: auto;
    }

    .forgot-left,
    .forgot-right {
        width: 100%;
        min-height: auto;
    }

    .forgot-left form {
        min-height: 460px;
        padding: 36px 28px;
    }

    .two-factor-container .forgot-left form {
        min-height: 0;
        padding: 36px 28px 32px;
    }

    .two-factor-code {
        letter-spacing: 5px;
    }

    .forgot-right {
        padding: 32px 24px;
    }

    .tenant-trigger {
        top: 12px;
        right: 12px;
        padding: 8px 12px;
    }

    .tenant-dialog {
        padding: 26px 20px;
    }

    .tenant-actions {
        flex-direction: column-reverse;
    }

    .tenant-actions button {
        width: 100%;
    }
}

@media (max-width: 768px) and (max-height: 640px) {
    body:not(.forgot-password-page) {
        padding-top: 52px;
        padding-bottom: 10px;
    }

    body:not(.forgot-password-page) h2 {
        display: none;
    }

    body:not(.forgot-password-page) .container {
        min-height: calc(100vh - 62px);
    }

    .sign-in-container form {
        padding-top: 20px;
        padding-bottom: 16px;
    }

    .sign-in-container h1 {
        font-size: 24px;
    }

    .tenant-trigger span {
        display: none;
    }
}
