/* Auth: login, two-factor challenge, setup pages */

:root {
    --light-gray: #f4f7f9;
    --dark-text: #202429;
    --auth-accent: rgba(51, 161, 180, 0.92);
    --auth-card-bg: rgba(193, 227, 231, 0.432);
    --auth-card-border: #fff;
    --auth-shadow: rgba(44, 43, 43, 0.103) 0 3px 6px, rgba(41, 40, 40, 0.158) 0 3px 6px;
    --auth-text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.35);
    --auth-slide-duration: 0.45s;
    --auth-slide-easing: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    height: 100vh;
    margin: 0;
    background-image: url("/image/backgrounds/bg-login.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

input {
    width: calc(100% - 6px) !important;
    border:white 1px solid;
    height: 35px;
    border-radius: 5px;
    background: #fff;
    color: var(--tg-grey-600, #6c757d);
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    box-shadow: var(--auth-shadow);
    
}

input:focus,
input:active,
input:hover {
    outline: none;
    box-shadow: none;
}

button {
    border: 1px solid white;
    border-radius: 0.25rem;
    background: rgba(242, 244, 245, 0.92);
}
.button-link {
    border: 1px solid white !important;
    border-radius: 0.25rem;
    background: rgba(242, 244, 245, 0.92);
    color:var(--dark-text);
    padding:0.25rem ;
}

.text-alert {
    color: white;
    font-weight: 400;
    font-size: 14px;
}

/* ----- Login ----- */

.auth-container {
    display: flex;
    width: 100%;
    max-width: 900px;
    overflow: hidden;
    border-radius: 10px;
    background-color: rgba(236, 234, 234, 0.171);
    backdrop-filter: blur(6px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin:1rem;
}

.auth-left-panel {
    flex-basis: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.auth-left-panel img {
    width: 150px;
    margin-bottom: 1rem;
}

.auth-right-panel {
    flex-basis: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    background-color: rgba(185, 230, 236, 0.178);
    backdrop-filter: blur(7px);
}


.btn-login {
    border: none;
    border-radius: 6px;
    padding: 0.75rem;
    background-color: var(--dark-text);
    color: #fff;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    width: 100%;
    margin-top:0.5rem;
    box-shadow: var(--auth-shadow);
}

.btn-login:hover {
    background-color: #5d5f61;
    background: linear-gradient(to top,rgb(10, 10, 10),rgb(34, 34, 34));
}

.btn-login:active {
    transform: scale(0.98);
}


.password-input-wrap {
    width:100%;
    display:grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    justify-content: center;
    width:100%;
    height:100%;
    box-shadow: var(--auth-shadow);

}

.password-input-wrap input {
    border-radius:5px 0px 0px 5px;
}

.mb-4 {
    margin-bottom: 20px;
}

.password-toggle-btn {
    height:100%;
    width:30px;   
    background:gainsboro;
    /* background:transparent; */
    border:none;
    border-radius:0px 5px 5px 0px;
}

.password-toggle-btn:hover {
    color: var(--tg-grey-800, #495057);
 
}

.tg-form-group-login {
    margin-bottom: 20px;
    border-radius: 5px;
}


.text-shadow {
    text-shadow: var(--auth-text-shadow);
}

.box-shadow {
    box-shadow: var(--auth-shadow);
}








@media (max-width: 991px) {
    .auth-left-panel {
        display: none;
    }

    .auth-right-panel {
        flex-basis: 100%;
    }
}

/* ----- Two-factor & setup ----- */

.auth-card {
    position: relative;
    width: 400px;
    min-height: 320px;
    padding: 1.5rem 1.5rem 50px;
    border-radius: 0.5rem;
    background: var(--auth-card-bg);
    backdrop-filter: blur(7px);
}

h1,p {
    margin: 0;
    padding: 0;
    color: #fff;
    text-shadow: var(--auth-text-shadow);
}

.auth-method-buttons {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    margin: 18px 0 0;
    padding: 0.25rem;
    border: none;
    border-radius: 0.5rem;
    background: #fff;
    color: #000;
}

.auth-method-switch {
    flex: 1;
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    /* background: rgba(179, 175, 175, 0.56); */
    color: #000;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    text-transform: capitalize;
    background: #cad3d6af;
}

.auth-method-switch.is-active {
    background: var(--auth-accent);
    color: #fff;
    border-color: #a1e1f1;
    box-shadow: var(--auth-shadow);
    display:none;
}

.auth-method-viewport {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 140px;
    margin-top: 14px;
}

.auth-method-panel {
    display: none;
    width: 100%;
    box-sizing: border-box;
    will-change: transform, opacity;
    transition:
        transform var(--auth-slide-duration) var(--auth-slide-easing),
        opacity 0.35s ease;
}

.auth-method-panel.is-active,
.auth-method-panel.is-enter-from-right,
.auth-method-panel.is-enter-from-left,
.auth-method-panel.is-exit-left,
.auth-method-panel.is-exit-right {
    display: block;
}

.auth-method-panel:not(.is-active) {
    position: absolute;
    inset: 0 0 auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 0;
}

.auth-method-panel[data-panel="email"]:not(.is-active) {
    transform: translateX(-100%);
}

.auth-method-panel[data-panel="authenticator"]:not(.is-active) {
    transform: translateX(100%);
}

.auth-method-panel.is-active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
    z-index: 2;
}

.auth-method-panel.is-enter-from-right {
    transform: translateX(100%);
}

.auth-method-panel.is-enter-from-left {
    transform: translateX(-100%);
}

.auth-method-panel.is-exit-left {
    transform: translateX(-100%);
    opacity: 0;
    visibility: visible;
}

.auth-method-panel.is-exit-right {
    transform: translateX(100%);
    opacity: 0;
    visibility: visible;
}

.auth-method-panel.is-enter-from-right,
.auth-method-panel.is-enter-from-left {
    visibility: visible;
}

.auth-method-panel .auth-method {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

@media (prefers-reduced-motion: reduce) {
    .auth-method-panel {
        transition: none;
    }
}





.auth-email-hint {
    font-size: 12px;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.25rem;
    border-radius: 0.5rem;
    color: #000;
}



.send-email {
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: #000;
    font-size: 12px;
}

.auth-email-form {
    margin-top: 12px;
}



.auth-footer-link {
    position: absolute;
    top: 10px;
    right: 24px;
    display: flex;
    justify-content: flex-end;
    padding: 0.25rem;
    border: none;
    border-radius: 0.25rem;
    background: rgba(245, 247, 248, 0.92);
    color: #000;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    cursor: pointer;
}

.auth-footer-link:hover {
    box-shadow: var(--auth-shadow);
}

.auth-footer-link:active {
    transform: scale(0.98);
}

.auth-feedback {
    margin: 14px 0;
    padding: 10px 12px;
    border-radius: 5px;
    font-size: 13px;
    background: rgba(255, 255, 255, 0.16);
}

.auth-feedback.error {
    background: rgba(170, 28, 28, 0.46);
}



.auth-card .auth-method {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.auth-method h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-shadow: var(--auth-text-shadow);
}

.auth-label {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 13px;
    text-shadow: var(--auth-text-shadow);
}


.setup-key-label {
    display: block;
    margin: 12px 0 6px;
    color: #fff;
    font-size: 13px;
    text-shadow: var(--auth-text-shadow);
}

.setup-key {
    display: block;
    margin: 0 0 12px;
    padding: 12px;
    border-radius: 0.25rem;
    background: #fff;
    color: #1d2730;
    font-family: Consolas, monospace;
    font-size: 14px;
    letter-spacing: 2px;
    overflow-wrap: anywhere;
    text-align: center;
    box-shadow: var(--auth-shadow);
}

.qr-frame {
    display: flex;
    justify-content: center;
    margin: 16px auto;
    padding: 10px;
    width: fit-content;
    border-radius: 0.25rem;
    background: #fff;
    box-shadow: var(--auth-shadow);
}

.qr-frame img {
    display: block;
    max-width: min(260px, calc(100vw - 86px));
    height: auto;
}
