*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        "IBM Plex Sans",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;
    background: #f3f4f6;
}

/* PAGE WRAPPER */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TOP BAR */
.auth-topbar {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 12px 40px;
    background: rgba(255, 255, 255, 1);
}

/* Logo */
.ab-logo img {
    height: 51px;
    width: 120px;
    display: block;
}

/* MAIN AREA (CENTER CARD) */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px 48px;
}

/* CARD */
.auth-card {
    width: 450px;
    max-width: 100%;
    background: rgba(255, 255, 255, 1);
    border-radius: 16px;
    border: 1px solid rgba(245, 245, 245, 1);
    padding: 40px 48px;
    text-align: left;
}

/* TITLE & SUBTITLE */
.auth-title {
    margin: 0 0 6px;
    font-size: 29.52px;
    font-weight: 600;
    color: rgba(52, 64, 84, 1);
    text-align: center;
}

.auth-subtitle {
    margin: 0 0 20px;
    font-size: 16px;
    color: rgba(102, 112, 133, 1);
    text-align: center;
    font-weight: 400;
}

/* FORM */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(84, 84, 84, 1);
}

.auth-input::placeholder {
    color: rgba(175, 175, 175, 1);
}

.auth-input-wrapper {
    position: relative;
    width: 100%;
}
/* Input field */

.auth-input {
    width: 100%;
    padding: 9.22px 30px;
    border: 1px solid rgba(226, 226, 226, 1);
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background-color: #ffffff !important;
    color: rgba(84, 84, 84, 1);
}

/* FOCUS RING */
.auth-input:focus {
    border: 2px solid rgba(135, 159, 239, 1) !important;
    background-color: #ffffff !important;
    box-shadow:
        0 0 0 3px rgba(10, 13, 18, 0.05),
        0 0 0 1px rgba(220, 228, 252, 1) !important;
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #111827 !important;
}

/* Left icon */
.auth-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(6, 53, 209, 1);
    font-size: 14px;
}

/* Right eye icon */
.auth-input-eye {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(175, 175, 175, 1);
    cursor: pointer;
    font-size: 15px;
}

.auth-input:autofill,
.auth-input:autofill:hover,
.auth-input:autofill:focus {
    background-color: #ffffff !important;
    -webkit-text-fill-color: #111827 !important;
}

/* Remember + forgot row */
.auth-row {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

/* Custom checkbox */
.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: rgba(83, 88, 98, 1);
    font-size: 13px;
}

.auth-remember input {
    display: none;
}

.auth-remember-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
    position: relative;
    background: #ffffff;
}

.auth-remember input:checked + .auth-remember-box {
    border-color: rgba(6, 53, 209, 1);
    background: rgba(240, 244, 255, 1);
}

.auth-remember input:checked + .auth-remember-box::after {
    content: "";
    position: absolute;
    left: 4px;
    top: 2px;
    width: 6px;
    height: 10px;
    border-right: 2px solid rgba(6, 53, 209, 1);
    border-bottom: 2px solid rgba(6, 53, 209, 1);
    transform: rotate(45deg);
}

/* Forgot link */
.auth-link {
    color: rgba(6, 53, 209, 1);
    text-decoration: none;
    font-size: 14.7px;
    font-weight: 400;
}

.auth-link:hover {
    text-decoration: underline;
}

/* BUTTON */
.auth-btn-primary {
    margin-top: 10px;
    width: 100%;
    border-radius: 8px;
    border: none;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 1);
    background: rgba(6, 53, 209, 1);
    cursor: pointer;
}

.auth-btn-primary:hover {
    background: #1d4ed8;
}
/* Forgot password row */
.auth-fgpassword {
    text-align: right;
    font-size: 14.7px;
    color: rgba(83, 88, 98, 1);
    font-weight: 400;
}

.auth-fgpassword span {
    color: rgba(6, 53, 209, 1);
    margin-left: 4px;
    cursor: pointer;
    font-weight: 400;
}

.auth-fgpassword span:hover {
    text-decoration: underline;
}

/* Responsive – tablet and below */
@media (max-width: 640px) {
    .auth-topbar {
        padding: 0 16px;
        height: 54px;
    }

    .ab-logo img {
        height: 42px;
        width: auto;
        max-width: 100px;
    }

    .auth-main {
        padding: 20px 12px 32px;
    }

    .auth-card {
        width: 100%;
        padding: 24px 20px 28px;
        border-radius: 14px;
        margin: 0;
    }

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

    .auth-subtitle {
        font-size: 14px;
        margin-bottom: 18px;
    }

    .auth-input {
        padding: 12px 36px 12px 36px;
        font-size: 16px; /* reduces zoom on iOS */
    }

    .auth-row {
        flex-wrap: wrap;
        gap: 12px;
    }

    .auth-remember {
        font-size: 13px;
    }

    .auth-link {
        font-size: 13px;
    }

    .auth-btn-primary {
        padding: 12px 16px;
        min-height: 44px;
        font-size: 16px;
    }
}

/* Responsive – small phones */
@media (max-width: 380px) {
    .auth-topbar {
        padding: 0 12px;
        height: 50px;
    }

    .ab-logo img {
        height: 36px;
    }

    .auth-main {
        padding: 16px 10px 24px;
    }

    .auth-card {
        padding: 20px 16px 24px;
    }

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

    .auth-subtitle {
        font-size: 13px;
    }
}

/* Reset password */

.auth-rest {
    width: 500px;
    max-width: 100%;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(245, 245, 245, 1);
    padding: 40px 48px;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.1);
}

/* Title */
.reset-title {
    margin: 0 0 6px;
    font-size: 29.52px;
    font-weight: 600;
    color: rgba(52, 64, 84, 1);
    text-align: center;
}

/* Subtitle */
.reset-subtitle {
    font-size: 14px;
    color: rgba(102, 112, 133, 1);
    font-weight: 400;
    line-height: 1.45;

    max-width: 360px;
    margin: 0 auto 22px;
    text-align: center;
    overflow: hidden;
}

/* "Remember password? Sign in" */
.auth-fgpassword {
    font-size: 14px;
    color: rgba(83, 88, 98, 1);
    font-weight: 400;
}

.auth-fgpassword a {
    margin-left: 4px;
    color: rgba(6, 53, 209, 1);
    text-decoration: none;
    font-weight: 400;
}

.auth-fgpassword a:hover {
    text-decoration: underline;
}

/* Button */
.auth-btn-primary {
    width: 100%;
    border-radius: 8px;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #ffffff;
    background: rgba(6, 53, 209, 1);
    cursor: pointer;
}

.auth-btn-primary:hover {
    background: #1d4ed8;
}

/* Responsive – .auth-rest (reset/forgot/create password cards) */
@media (max-width: 640px) {
    .auth-rest {
        width: 100%;
        padding: 24px 20px 28px;
        border-radius: 14px;
    }

    .reset-title {
        font-size: 24px;
    }

    .reset-subtitle {
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .auth-rest {
        padding: 20px 16px 24px;
    }

    .reset-title {
        font-size: 22px;
    }
}
/* ================= PASSWORD RULES ================= */

.pw-rules {
    margin: 10px 0 14px;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pw-rule {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgba(175, 175, 175, 1);
    font-weight: 400;
}

/* Circle bullet */
.pw-bullet {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 1px solid rgba(208, 213, 221, 1);
    background: #ffffff;
    position: relative;
    flex-shrink: 0;
}

/* When rule is satisfied */
.pw-rule.pw-rule-met .pw-bullet {
    border-color: rgba(6, 53, 209, 1);
    background: rgba(6, 53, 209, 1);
}

/* THICK CHECKMARK INSIDE */
.pw-rule.pw-rule-met .pw-bullet::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 8px;
    border-right: 3px solid rgba(255, 255, 255, 1); /* THICK */
    border-bottom: 3px solid rgba(255, 255, 255, 1); /* THICK */
    transform: translate(-50%, -60%) rotate(45deg);
    top: 50%;
    left: 50%;
}

.pw-rule.pw-rule-met .pw-text {
    color: rgba(4, 50, 107, 1);
    font-weight: 500;
}
