/* Wrapper */
.login-wrapper {
    max-width: 400px;
    margin: 60px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Title */
.login-wrapper h2 {
    text-align: center;
    margin-bottom: 24px;
    font-weight: 600;
    color: #333;
}

/* Form fields */
.login-wrapper label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #555;
}

.login-wrapper input[type="text"],
.login-wrapper input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-wrapper input:focus {
    outline: none;
    border-color: #f7bb42;
    box-shadow: 0 0 0 2px rgba(247, 187, 66, 0.25);
}

/* Button */
.login-wrapper button {
    width: 100%;
    padding: 11px;
    background-color: #f7bb42;
    border: none;
    border-radius: 4px;
    color: #222;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.login-wrapper button:hover {
    background-color: #e0a92f;
}

.login-wrapper button:active {
    transform: translateY(1px);
}

/* Errors (Django form errors) */
.login-wrapper .errorlist {
    margin-bottom: 15px;
    padding: 10px;
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    color: #856404;
    font-size: 13px;
}

.signup-wrapper {
    max-width: 500px;
    margin: 20px auto;
}

.password-error {
    color: #dc3545;
    font-size: 0.875em;
}
.password-valid {
    color: #198754;
    font-size: 0.875em;
}
.password-feedback {
    min-height: 1.2em;
}

a.signup-password-mask {
    font-size: 14px;
}
input#id_password {
    margin-bottom: 0px;
}
.password-valid {
    font-size: 14px;
}

/* Validation styles */
.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-valid {
    border-color: #198754;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

/* Character counter styles */
.char-counter {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: right;
    margin-top: 0.25rem;
    display: block;
}

.char-counter.warning {
    color: #fd7e14;
    font-weight: 500;
}

.char-counter.danger {
    color: #dc3545;
    font-weight: 600;
}


/* Alert styles */
.alert-container {
    margin-bottom: 1.5rem;
}

.alert {
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.alert-dismissible .btn-close {
    padding: 0.75rem 1rem;
}
.alert-success {
    padding: 10px 14px;
    border-radius: 4px;
    background-color: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #b7dfc1;
    font-size: 14px;
    }

.alert-error {
    padding: 10px 14px;
    border-radius: 4px;
    background-color: #fdecea;
    color: #b02a37;
    border: 1px solid #f5c2c7;
    font-size: 14px;
}

/* Small screens */
@media (max-width: 480px) {
    .login-wrapper {
        margin: 30px 15px;
        padding: 24px;
    }
}
