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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        Helvetica, Arial, sans-serif;
    background: #f6f7f9;
    color: #171717;
    min-height: 100vh;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.password-card {
    width: 100%;
    max-width: 470px;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 40px;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.05),
        0 2px 8px rgba(0, 0, 0, 0.03);
}

.brand {
    display: flex;
    justify-content: center;
    margin-bottom: 28px;
}

.brand img {
    width: 200px;
    height: 58px;
    object-fit: cover;
    border-radius: 14px;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h1 {
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #111111;
    margin-bottom: 10px;
}

.card-header p {
    font-size: 14px;
    line-height: 1.7;
    color: #6b7280;
}

/* Icon */

.icon-circle {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.icon-circle span {
    font-size: 22px;
}

/* Form */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    height: 46px;
    padding: 0 41px 0 14px;
    border: 1px solid #dcdfe4;
    border-radius: 9px;
    background: #ffffff;
    color: #171717;
    font-size: 14px;
    transition: border-color 0.2s ease,
                box-shadow 0.2s ease;
}

.form-group input:hover {
    border-color: #bfc3ca;
}

.form-group input:focus {
    outline: none;
    border-color: #111111;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}
.form-group div{
    position: relative;
}
.form-group .toggle-password{
    position:absolute;
    right:16px;
    top: 68%;
    transform:translateY(-50%);
    border:none;
    background:none;
    cursor:pointer;
    color:#64748B;
    font-size:17px;
}
/* Errors */

.field-errors {
    margin-top: 7px;
    color: #dc2626;
    font-size: 12px;
}

.field-errors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.field-errors li {
    list-style: none;
}

/* Hide Django password help text */

.helptext {
    display: none;
}

#id_new_password2_helptext {
    display: none;
}

/* Button */
.submit,
.login-button {
    position: relative;
}

.submit.loading {
    cursor: wait;
    opacity: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.submit:disabled {
    cursor: wait;
}

.button-loader {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: passwordSpinner 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes passwordSpinner {
    to {
        transform: rotate(360deg);
    }
}
.submit {
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 9px;
    background: #111111;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease,
                transform 0.1s ease;
    margin-top: 8px;
}

.submit:hover {
    background: #2d2d2d;
}

.submit:active {
    transform: scale(0.99);
}

/* Login link */

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

.back-login a {
    color: #555;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.back-login a:hover {
    color: #111;
}

/* Success */

.success-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #ecfdf3;
    color: #15803d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 22px;
}

.info-box {
    background: #f8fafc;
    border: 1px solid #e9edf2;
    border-radius: 10px;
    padding: 16px;
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: left;
}

.info-box strong {
    font-size: 13px;
    color: #333;
}

.info-box span {
    font-size: 12px;
    line-height: 1.6;
    color: #737373;
}

/* Login button */

.login-button {
    width: 100%;
    height: 46px;
    border-radius: 9px;
    background: #111111;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s ease;
}

.login-button:hover {
    background: #2d2d2d;
}

/* Email field */

#id_email {
    width: 100%;
}

/* Responsive */

@media (max-width: 600px) {

    .page-wrapper {
        padding: 20px 15px;
    }

    .password-card {
        padding: 30px 22px;
        border-radius: 14px;
    }

    .card-header h1 {
        font-size: 24px;
    }

    .card-header p {
        font-size: 13px;
    }

    .brand img {
        width: 115px;
        height: 52px;
    }
}

@media (max-width: 380px) {

    .password-card {
        padding: 26px 18px;
    }

    .card-header h1 {
        font-size: 22px;
    }
}