* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.tdyp-auth-page,
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #0b0e11;
    color: #eaecef;
    color-scheme: dark;
}

.login-layout {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0b0e11;
    padding: 20px;
}

.bg-overlay {
    display: none;
}

.login-card {
    position: relative;
    z-index: 2;
    background: #161a1e;
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border-radius: 8px;
    border: 1px solid #2b3139;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    text-align: center;
}

.login-logo {
    margin-bottom: 24px;
}

.login-logo img,
.m-header-logo img {
    height: 44px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
}

.login-title,
.m-auth-title {
    color: #eaecef;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 0 0 10px 0;
}

.login-subtitle,
.m-auth-subtitle {
    color: #848e9c;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0 28px 0;
}

.login-form,
.m-auth-form {
    text-align: left;
}

.form-group-login,
.m-form-group {
    margin-bottom: 18px;
}

.form-group-login label,
.m-form-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #848e9c;
    margin-bottom: 8px;
}

.input-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-wrapper i.icon-left {
    position: absolute;
    left: 14px;
    color: #848e9c;
    font-size: 0.95rem;
}

.input-icon-wrapper i.icon-right {
    position: absolute;
    right: 14px;
    color: #848e9c;
    cursor: pointer;
    font-size: 0.9rem;
}

.input-icon-wrapper input,
.m-form-input {
    width: 100%;
    background-color: #1e2329 !important;
    border: 1px solid #2b3139 !important;
    padding: 14px 14px 14px 40px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: #eaecef !important;
    -webkit-text-fill-color: #eaecef !important;
    caret-color: #eaecef !important;
    font-variant-numeric: tabular-nums;
}

.m-form-input {
    padding-left: 14px;
    min-height: 48px;
}

body.tdyp-auth-page input:-webkit-autofill,
body.tdyp-auth-page input:-webkit-autofill:hover,
body.tdyp-auth-page input:-webkit-autofill:focus,
.m-form-input:-webkit-autofill {
    -webkit-text-fill-color: #eaecef !important;
    caret-color: #eaecef !important;
    box-shadow: 0 0 0 1000px #1e2329 inset !important;
    transition: background-color 99999s ease-out;
}

.input-icon-wrapper input:focus,
.m-form-input:focus {
    outline: none;
    border-color: #f0b90b;
    box-shadow: 0 0 0 2px rgba(240, 185, 11, 0.15);
}

.input-icon-wrapper input::placeholder,
.m-form-input::placeholder {
    color: #848e9c !important;
    -webkit-text-fill-color: #848e9c !important;
    opacity: 1;
}

.btn-login-submit,
.m-btn-submit {
    width: 100%;
    background-color: #0ecb81;
    color: #0b0e11;
    border: none;
    padding: 14px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-top: 8px;
    cursor: pointer;
    min-height: 48px;
    font-family: inherit;
}

.btn-login-submit:hover,
.m-btn-submit:hover {
    background-color: #0bb872;
}

.btn-login-submit:disabled,
.m-btn-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

.login-remember {
    margin-top: 24px;
    text-align: center;
}

.remember-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: #848e9c;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.remember-label input {
    position: absolute;
    opacity: 0;
    height: 0;
    width: 0;
}

.checkmark-square {
    width: 16px;
    height: 16px;
    background-color: #0ecb81;
    border: 1px solid #0ecb81;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
}

.checkmark-square:after {
    content: "";
    position: absolute;
    display: block;
    left: 4px;
    top: 1px;
    width: 4px;
    height: 8px;
    border: solid #0b0e11;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.remember-label input:not(:checked) ~ .checkmark-square {
    background-color: #0b0e11;
    border-color: #2b3139;
}

.remember-label input:not(:checked) ~ .checkmark-square:after {
    display: none;
}

.forgot-password {
    display: block;
    text-align: center;
    color: #f0b90b;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-top: 24px;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    font-size: 0.8rem;
    color: #848e9c;
}

.login-footer a {
    color: #0ecb81;
    font-weight: 700;
    text-decoration: none;
}

.auth-switch {
    display: flex;
    width: 100%;
    gap: 4px;
    margin: 0 0 24px;
    padding: 4px;
    background: #0b0e11;
    border: 1px solid #2b3139;
    border-radius: 4px;
    box-sizing: border-box;
}

.auth-switch-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 8px;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    color: #848e9c;
    background: transparent;
}

.auth-switch-btn.is-active {
    background: #1e2329;
    color: #eaecef;
}

.m-pass-wrap {
    position: relative;
}

.m-pass-wrap .m-form-input {
    padding-right: 72px;
}

.m-pass-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #f0b90b;
    font-size: 13px;
    font-weight: 600;
    min-height: 44px;
    min-width: 56px;
    padding: 0 8px;
    cursor: pointer;
}

.m-name-row {
    display: flex;
    gap: 10px;
}

.m-name-row .m-form-group {
    flex: 1;
    min-width: 0;
}

.login-container.m-auth-full {
    min-height: 100vh;
    min-height: 100dvh;
    background: #0b0e11;
    padding: 16px;
}

.m-header-logo {
    text-align: center;
    margin: 24px 0;
}

.m-auth-card {
    background: #161a1e;
    border: 1px solid #2b3139;
    border-radius: 8px;
    padding: 24px 16px;
}

@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
        background: #0b0e11 !important;
    }

    body.tdyp-auth-page {
        background: #0b0e11 !important;
    }

    .login-layout {
        padding: calc(16px + env(safe-area-inset-top, 0)) 16px calc(24px + env(safe-area-inset-bottom, 0));
        align-items: stretch;
    }

    .login-card {
        padding: 28px 16px;
        max-width: 100%;
        box-shadow: none;
        border: none;
        background: transparent;
    }

    .input-icon-wrapper input,
    .form-group-login input,
    .btn-login-submit,
    .m-form-input,
    .m-btn-submit {
        min-height: 48px;
        font-size: 16px;
    }

    .m-auth-card {
        background: transparent;
        border: 0;
        padding: 8px 0 20px;
    }

    .m-btn-submit {
        position: sticky;
        bottom: calc(8px + env(safe-area-inset-bottom, 0));
        z-index: 5;
    }
}
