/* --- LAYOUT --- */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    /* Min-height ensures it fills the screen between nav and footer */
    min-height: calc(100vh - 140px);
    padding: 20px 0;
}

/* --- CARD --- */
.auth-container {
    background-color: var(--bg);
    padding: 40px;
    border-radius: 16px;
    /* Soft shadow for Light Mode, Border for Dark Mode logic handled by border var */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--nav-border);
    width: 100%;
    max-width: 400px;
    text-align: center;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.auth-container h2 {
    margin-bottom: 24px;
    color: var(--text);
    font-weight: 800;
    font-size: 24px;
}

/* --- FORM ELEMENTS --- */
.form-group {
    text-align: left;
    margin-bottom: 16px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    opacity: 0.8;
}

/* Targeting Django Form Widgets */
input[type="text"],
input[type="password"],
input[type="email"] {
    width: 100%;
    padding: 12px;
    background-color: transparent;
    border: 1px solid var(--nav-border);
    border-radius: 8px;
    font-size: 16px;
    color: var(--text);
    transition: 0.2s ease;
    box-sizing: border-box;
}

input:focus {
    border-color: var(--blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

/* --- BUTTON --- */
.btn-submit {
    width: 100%;
    padding: 14px;
    background-color: var(--blue);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 10px;
    transition: transform 0.1s ease, background 0.2s;
}

.btn-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

/* --- LINKS & FOOTER --- */
.footer-text {
    margin-top: 24px;
    font-size: 14px;
    color: var(--text);
    opacity: 0.7;
}

.footer-text a {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

.footer-text a:hover {
    text-decoration: underline;
}

/* --- ERROR MESSAGES --- */
.error-msg {
    background-color: rgba(239, 68, 68, 0.1); /* Red with opacity */
    color: var(--danger);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* --- PASSWORD TOGGLE --- */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
/* --- JS INJECTED EYE ICON STYLES --- */

.input-wrapper {
    position: relative; /* Creates the boundary for the absolute icon */
    width: 100%;
}

.eye-btn {
    position: absolute;
    right: 12px;        /* Spacing from the right edge */
    top: 50%;           /* Move down to the middle of the wrapper */
    transform: translateY(-50%); /* Pull it back up by half its own height to center perfectly */

    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    opacity: 0.6;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: opacity 0.2s;
    z-index: 10;        /* Ensure it sits ON TOP of the input */
}

.eye-btn:hover {
    opacity: 1;
}

/* Ensure the icon doesn't block clicks if it's too big,
   though the button needs to be clickable */
.eye-btn svg {
    pointer-events: none;
}
/* ... Previous auth.css codes ... */

/* --- FORM HELP TEXT --- */
.help-text {
    display: block;
    margin-top: 6px;
    color: var(--text);
    font-size: 12px;
    opacity: 0.6;
    line-height: 1.4;
    text-align: left;
}

/* Make ul lists (common in Django password help) look cleaner */
.help-text ul {
    margin: 5px 0 0 15px;
    padding: 0;
}

/* --- FIELD ERRORS --- */
.field-error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
    font-size: 13px;
    margin-top: 6px;
    font-weight: 500;
    text-align: left;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- JS INJECTED EYE ICON STYLES --- */
.input-wrapper {
    position: relative; /* Essential for absolute positioning of eye icon */
}