/* ===== GENERAL ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #fdfbfb, #f7f7f7);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== WRAPPER ===== */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* ===== CARD ===== */
.auth-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 28px;
    padding: 40px 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    position: relative;
    animation: fadeUp 0.5s ease;
    margin: auto;
}

/* ===== CLOSE BUTTON ===== */
.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    text-decoration: none;
    font-size: 30px;
    color: #333;
    font-weight: 400;
    transition: 0.2s ease;
}

.close-btn:hover {
    color: #ff385c;
}

.auth-theme-toggle {
    position: absolute;
    top: 22px;
    right: 70px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    color: #333;
    font-size: 17px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.auth-theme-toggle:hover {
    border-color: #ff385c;
    background: #fff5f7;
    color: #d71345;
}

.auth-theme-toggle:focus-visible {
    border-color: #ff385c;
    box-shadow: 0 0 0 4px rgba(255, 56, 92, 0.18);
    outline: none;
}

/* ===== BRAND ===== */
.brand-section {
    margin-bottom: 30px;
}

.verification-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto 18px;
    color: #8b8b8b;
    font-size: 12px;
    font-weight: 600;
}

.step-pill {
    padding: 5px 9px;
    border: 1px solid #dedede;
    border-radius: 999px;
    white-space: nowrap;
}

.step-pill.is-active,
.step-pill.is-complete {
    border-color: #ff385c;
    background: #fff1f4;
    color: #d71345;
}

.step-line {
    width: 28px;
    height: 1px;
    background: #dedede;
}

.brand-icon {
    width: 65px;
    height: 65px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff385c, #e61e4d);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    font-weight: bold;
    box-shadow: 0 8px 20px rgba(255, 56, 92, 0.25);
}

.auth-title {
    font-size: 30px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
}

.auth-subtitle {
    color: #6b6b6b;
    font-size: 14px;
}

/* ===== INPUTS ===== */
.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.custom-input {
    height: 55px;
    border-radius: 16px;
    border: 1px solid #ddd;
    padding: 14px 18px;
    font-size: 15px;
    transition: 0.3s ease;
    box-shadow: none !important;
}

.custom-input:focus {
    border-color: #ff385c;
    box-shadow: 0 0 0 4px rgba(255, 56, 92, 0.10) !important;
}

.gmail-input-group .input-group-text {
    border: 1px solid #ddd;
    border-right: 0;
    border-radius: 16px 0 0 16px;
    background: #f8f8f8;
    color: #d93025;
    padding-left: 18px;
}

.gmail-input-group .custom-input {
    border-radius: 0 16px 16px 0 !important;
}

.otp-input {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 10px;
    padding-left: 28px;
}

.verification-card {
    max-width: 500px;
}

.resend-button {
    border: 0;
    background: transparent;
}

.resend-button:disabled {
    color: #8d8d8d;
    text-decoration: none;
}

/* ===== PASSWORD TOGGLE ===== */
.password-wrapper {
    position: relative;
}

.password-wrapper .custom-input {
    padding-right: 48px;
}

/* Edge/Internet Explorer adds its own password-reveal button. Hide it because
   RentiFlow provides the accessible toggle below. */
.password-wrapper input[type="password"]::-ms-reveal,
.password-wrapper input[type="password"]::-ms-clear {
    display: none;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #555;
    cursor: pointer;
    font-size: 18px;
    -webkit-user-select: none;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.toggle-password:hover,
.toggle-password:focus-visible {
    background: transparent;
    color: #222;
}

.toggle-password:focus-visible {
    outline: 2px solid #ff385c;
    outline-offset: 1px;
}

/* ===== LINKS ===== */
.small-link {
    font-size: 13px;
    color: #ff385c;
    text-decoration: none;
    font-weight: 500;
}

.small-link:hover {
    text-decoration: underline;
}

/* ===== BUTTONS ===== */
.continue-btn {
    background: linear-gradient(135deg, #ff385c, #e61e4d);
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 14px;
    border-radius: 16px;
    border: none;
    transition: 0.3s ease;
    box-shadow: 0 10px 25px rgba(255, 56, 92, 0.25);
}

.continue-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #e61e4d, #d71345);
    color: white;
}

.alt-btn {
    background: white;
    border: 1px solid #ddd;
    color: #333;
    font-weight: 500;
    padding: 12px;
    border-radius: 16px;
    transition: 0.3s ease;
}

.alt-btn:hover {
    border-color: #ff385c;
    color: #ff385c;
    background: #fff5f7;
}

/* ===== DIVIDER ===== */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    border-bottom: 1px solid #eee;
}

.divider:not(:empty)::before {
    margin-right: 12px;
}

.divider:not(:empty)::after {
    margin-left: 12px;
}

/* ===== ANIMATION ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 576px) {
    .auth-wrapper {
        align-items: flex-start;
        padding: 16px;
    }

    .auth-card {
        padding: 30px 20px;
        border-radius: 22px;
    }

    .auth-title {
        font-size: 24px;
    }

    .custom-input {
        height: 50px;
    }
}

@media (max-width: 380px) {
    .auth-wrapper {
        padding: 10px;
    }

    .auth-card {
        padding: 26px 16px;
        border-radius: 18px;
    }

    .close-btn {
        top: 12px;
        right: 16px;
    }

    .auth-theme-toggle {
        top: 12px;
        right: 58px;
    }

    .brand-icon {
        width: 56px;
        height: 56px;
    }

    .auth-title {
        font-size: 22px;
    }

    .auth-form .d-flex.gap-2 {
        gap: 6px !important;
    }

    .custom-input {
        padding-inline: 12px;
        font-size: 14px;
    }
}

/* ===== DARK THEME ===== */
html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body {
    background: linear-gradient(135deg, #111317, #191c21);
    color: #f3f4f6;
}

html[data-theme="dark"] .auth-card {
    background: #1d2026;
    border: 1px solid #343941;
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
}

html[data-theme="dark"] .auth-title,
html[data-theme="dark"] .form-label,
html[data-theme="dark"] .form-check-label {
    color: #f3f4f6;
}

html[data-theme="dark"] .auth-subtitle,
html[data-theme="dark"] .text-muted {
    color: #b8bec8 !important;
}

html[data-theme="dark"] .close-btn {
    color: #d4d7dd;
}

html[data-theme="dark"] .close-btn:hover {
    color: #ff7891;
}

html[data-theme="dark"] .auth-theme-toggle {
    background: #282c33;
    border-color: #454b55;
    color: #f3f4f6;
}

html[data-theme="dark"] .auth-theme-toggle:hover {
    background: #353a43;
    border-color: #ff7891;
    color: #ff9aad;
}

html[data-theme="dark"] .custom-input {
    background: #252930;
    border-color: #454b55;
    color: #f3f4f6;
}

html[data-theme="dark"] .gmail-input-group .input-group-text {
    background: #20242a;
    border-color: #454b55;
    color: #ff8377;
}

html[data-theme="dark"] .step-pill {
    border-color: #454b55;
}

html[data-theme="dark"] .step-pill.is-active,
html[data-theme="dark"] .step-pill.is-complete {
    border-color: #ff7891;
    background: #38242b;
    color: #ff9aad;
}

html[data-theme="dark"] .step-line {
    background: #454b55;
}

html[data-theme="dark"] .custom-input::placeholder {
    color: #9299a5;
}

html[data-theme="dark"] .custom-input:focus {
    background: #292d34;
    border-color: #ff6b86;
    color: #fff;
}

html[data-theme="dark"] .toggle-password {
    background: transparent;
    color: #e5e7eb;
}

html[data-theme="dark"] .toggle-password:hover,
html[data-theme="dark"] .toggle-password:focus-visible {
    background: transparent;
    color: #fff;
}

html[data-theme="dark"] .alt-btn {
    background: #252930;
    border-color: #454b55;
    color: #f3f4f6;
}

html[data-theme="dark"] .alt-btn:hover {
    background: #30353d;
    border-color: #ff7891;
    color: #ff9aad;
}

html[data-theme="dark"] .divider {
    color: #a7adb7;
}

html[data-theme="dark"] .divider::before,
html[data-theme="dark"] .divider::after {
    border-bottom-color: #3a4049;
}

html[data-theme="dark"] .small-link,
html[data-theme="dark"] a:not(.btn):not(.close-btn) {
    color: #ff8ca1;
}

@media (prefers-reduced-motion: reduce) {
    .auth-card {
        animation: none;
    }

    .auth-theme-toggle {
        transition: none;
    }
}
